diff options
author | Dastgir <dastgirpojee@rocketmail.com> | 2016-01-11 19:37:02 +0530 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2016-02-28 22:22:30 +0100 |
commit | 6fccf18b6112475d00c3abc63804043df8cb4df6 (patch) | |
tree | 89305c9080421768ceea19bc7cfd78293dc691cf | |
parent | 21f992314cde9243474bb171d09ec3d971b07214 (diff) | |
download | hercules-6fccf18b6112475d00c3abc63804043df8cb4df6.tar.gz hercules-6fccf18b6112475d00c3abc63804043df8cb4df6.tar.bz2 hercules-6fccf18b6112475d00c3abc63804043df8cb4df6.tar.xz hercules-6fccf18b6112475d00c3abc63804043df8cb4df6.zip |
Added NoKnockback Mode for monsters
Signed-off-by: Haru <haru@dotalux.com>
-rw-r--r-- | db/mob_db2.conf | 1 | ||||
-rw-r--r-- | db/pre-re/mob_db.conf | 1 | ||||
-rw-r--r-- | db/re/mob_db.conf | 1 | ||||
-rw-r--r-- | doc/mob_db_mode_list.txt | 35 | ||||
-rw-r--r-- | src/map/mob.c | 3 | ||||
-rw-r--r-- | src/map/skill.c | 2 | ||||
-rw-r--r-- | src/map/status.h | 1 |
7 files changed, 27 insertions, 17 deletions
diff --git a/db/mob_db2.conf b/db/mob_db2.conf index e1084cff2..f7b8bd9af 100644 --- a/db/mob_db2.conf +++ b/db/mob_db2.conf @@ -76,6 +76,7 @@ mob_db: ( ChangeTargetMelee: true/false (bool, defaults to false) ChangeTargetChase: true/false (bool, defaults to false) TargetWeak: true/false (bool, defaults to false) + NoKnockback: true/false (bool, defaults to false) } MoveSpeed: move speed (int, defaults to 0) AttackDelay: attack delay (int, defaults to 4000) diff --git a/db/pre-re/mob_db.conf b/db/pre-re/mob_db.conf index baf88d52c..7d3da3f6d 100644 --- a/db/pre-re/mob_db.conf +++ b/db/pre-re/mob_db.conf @@ -76,6 +76,7 @@ mob_db: ( ChangeTargetMelee: true/false (bool, defaults to false) ChangeTargetChase: true/false (bool, defaults to false) TargetWeak: true/false (bool, defaults to false) + NoKnockback: true/false (bool, defaults to false) } MoveSpeed: move speed (int, defaults to 0) AttackDelay: attack delay (int, defaults to 4000) diff --git a/db/re/mob_db.conf b/db/re/mob_db.conf index d4e4f4357..41dd8a35b 100644 --- a/db/re/mob_db.conf +++ b/db/re/mob_db.conf @@ -76,6 +76,7 @@ mob_db: ( ChangeTargetMelee: true/false (bool, defaults to false) ChangeTargetChase: true/false (bool, defaults to false) TargetWeak: true/false (bool, defaults to false) + NoKnockback: true/false (bool, defaults to false) } MoveSpeed: move speed (int, defaults to 0) AttackDelay: attack delay (int, defaults to 4000) diff --git a/doc/mob_db_mode_list.txt b/doc/mob_db_mode_list.txt index 08abf800d..32e7a0e8d 100644 --- a/doc/mob_db_mode_list.txt +++ b/doc/mob_db_mode_list.txt @@ -11,22 +11,23 @@ Bit Legend: ------------------------------------------------------------------------------- -MD_CANMOVE | 0x0001 | 1 -MD_LOOTER | 0x0002 | 2 -MD_AGGRESSIVE | 0x0004 | 4 -MD_ASSIST | 0x0008 | 8 -MD_CASTSENSOR_IDLE | 0x0010 | 16 -MD_BOSS | 0x0020 | 32 -MD_PLANT | 0x0040 | 64 -MD_CANATTACK | 0x0080 | 128 -MD_DETECTOR | 0x0100 | 256 -MD_CASTSENSOR_CHASE | 0x0200 | 512 -MD_CHANGECHASE | 0x0400 | 1024 -MD_ANGRY | 0x0800 | 2048 -MD_CHANGETARGET_MELEE | 0x1000 | 4096 -MD_CHANGETARGET_CHASE | 0x2000 | 8192 -MD_TARGETWEAK | 0x4000 | 16384 -MD_RANDOMTARGET | 0x8000 | 32768 (not implemented) +MD_CANMOVE | 0x00001 | 1 +MD_LOOTER | 0x00002 | 2 +MD_AGGRESSIVE | 0x00004 | 4 +MD_ASSIST | 0x00008 | 8 +MD_CASTSENSOR_IDLE | 0x00010 | 16 +MD_BOSS | 0x00020 | 32 +MD_PLANT | 0x00040 | 64 +MD_CANATTACK | 0x00080 | 128 +MD_DETECTOR | 0x00100 | 256 +MD_CASTSENSOR_CHASE | 0x00200 | 512 +MD_CHANGECHASE | 0x00400 | 1024 +MD_ANGRY | 0x00800 | 2048 +MD_CHANGETARGET_MELEE | 0x01000 | 4096 +MD_CHANGETARGET_CHASE | 0x02000 | 8192 +MD_TARGETWEAK | 0x04000 | 16384 +MD_NOKNOCKBACK | 0x08000 | 32768 +MD_RANDOMTARGET | 0x10000 | 65536 (not implemented) Explanation for modes: ------------------------------------------------------------------------------- @@ -74,6 +75,8 @@ Target Weak: Allows aggressive monsters to only be aggressive against characters that are five levels below it's own level. For example, a monster of level 104 will not pick fights with a level 99. +NoKnockback: Monsters will be immune to Knockback's. + Random Target: Picks a new random target in range on each attack / skill. (not implemented) diff --git a/src/map/mob.c b/src/map/mob.c index 063a1ff6e..e26006599 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -3760,6 +3760,8 @@ int mob_read_db_mode_sub(struct mob_db *entry, struct config_setting_t *t) mode |= libconfig->setting_get_bool(t2) ? MD_CHANGETARGET_CHASE : 0; if ((t2 = libconfig->setting_get_member(t, "TargetWeak"))) mode |= libconfig->setting_get_bool(t2) ? MD_TARGETWEAK : 0; + if ((t2 = libconfig->setting_get_member(t, "NoKnockback"))) + mode |= libconfig->setting_get_bool(t2) ? MD_NOKNOCKBACK : 0; return mode; } @@ -4109,6 +4111,7 @@ int mob_read_db_sub(struct config_setting_t *mobt, int n, const char *source) * ChangeTargetMelee: true/false * ChangeTargetChase: true/false * TargetWeak: true/false + * NoKnockback: true/false * } * MoveSpeed: move speed * AttackDelay: attack delay diff --git a/src/map/skill.c b/src/map/skill.c index 366d66234..fb08103e7 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -2089,7 +2089,7 @@ int skill_blown(struct block_list* src, struct block_list* target, int count, in case BL_MOB: { const struct mob_data *md = BL_UCCAST(BL_MOB, target); - if (md->class_ == MOBID_EMPELIUM) + if (md->status.mode&MD_NOKNOCKBACK) return 0; if (src != target && is_boss(target)) // Bosses can't be knocked-back return 0; diff --git a/src/map/status.h b/src/map/status.h index 85219b280..14cda8545 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -1823,6 +1823,7 @@ enum e_mode MD_CHANGETARGET_MELEE = 0x1000, MD_CHANGETARGET_CHASE = 0x2000, MD_TARGETWEAK = 0x4000, + MD_NOKNOCKBACK = 0x8000, MD_MASK = 0xFFFF, }; |