From b372b02e9cc21ceeb42a428177d992998aed2eec Mon Sep 17 00:00:00 2001 From: Emistry Haoyan Date: Tue, 23 Jul 2019 22:24:57 +0800 Subject: Update mob_db - DamageTakenRate field - adjust the damage taken by monster. (default = `100 = 1x`) - ref: https://github.com/idathena/trunk/commit/e267d2e2dada6196b479a6f2f35e9d25291ef22b --- src/map/mob.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/map/mob.c') 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); -- cgit v1.2.3-70-g09d2