diff options
author | Emistry Haoyan <equinox1991@gmail.com> | 2019-07-23 22:24:57 +0800 |
---|---|---|
committer | Emistry Haoyan <equinox1991@gmail.com> | 2019-07-24 07:36:26 +0800 |
commit | b372b02e9cc21ceeb42a428177d992998aed2eec (patch) | |
tree | fae024ea4d1357514d998b363cb971961224761b /src/map/mob.c | |
parent | a5eb6ec995612c878a3b6cb522520ffae8b13a3b (diff) | |
download | hercules-b372b02e9cc21ceeb42a428177d992998aed2eec.tar.gz hercules-b372b02e9cc21ceeb42a428177d992998aed2eec.tar.bz2 hercules-b372b02e9cc21ceeb42a428177d992998aed2eec.tar.xz hercules-b372b02e9cc21ceeb42a428177d992998aed2eec.zip |
Update mob_db - DamageTakenRate field
- adjust the damage taken by monster. (default = `100 = 1x`)
- ref: https://github.com/idathena/trunk/commit/e267d2e2dada6196b479a6f2f35e9d25291ef22b
Diffstat (limited to 'src/map/mob.c')
-rw-r--r-- | src/map/mob.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/map/mob.c b/src/map/mob.c index 8511f8523..73f739264 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -4604,6 +4604,7 @@ static int mob_read_db_sub(struct config_setting_t *mobt, int n, const char *sou * AttackMotion: attack motion * DamageMotion: damage motion * MvpExp: mvp experience + * DamageTakenRate: damage taken rate * MvpDrops: { * AegisName: chance * ... @@ -4837,6 +4838,12 @@ static int mob_read_db_sub(struct config_setting_t *mobt, int n, const char *sou } } + if (mob->lookup_const(mobt, "DamageTakenRate", &i32) && i32 >= 0) { + md.dmg_taken_rate = cap_value(i32, 1, INT_MAX); + } else if (!inherit) { + md.dmg_taken_rate = 100; + } + mob->read_db_additional_fields(&md, mobt, n, source); return mob->db_validate_entry(&md, n, source); |