diff options
author | Kenpachi Developer <Kenpachi.Developer@gmx.de> | 2020-07-02 04:16:29 +0200 |
---|---|---|
committer | Kenpachi Developer <Kenpachi.Developer@gmx.de> | 2020-07-02 04:33:06 +0200 |
commit | 7888d7144db4c4e71542b786eb7e143dbd066230 (patch) | |
tree | 3e008d3c2225af164b60541b9fa41630a35f4f64 /src/map/battle.c | |
parent | 1dfebbd4966310387357cbddae600418a56df658 (diff) | |
download | hercules-7888d7144db4c4e71542b786eb7e143dbd066230.tar.gz hercules-7888d7144db4c4e71542b786eb7e143dbd066230.tar.bz2 hercules-7888d7144db4c4e71542b786eb7e143dbd066230.tar.xz hercules-7888d7144db4c4e71542b786eb7e143dbd066230.zip |
Add bSubDefEle item bonus
Diffstat (limited to 'src/map/battle.c')
-rw-r--r-- | src/map/battle.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 689622cf4..12d85993f 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -1234,6 +1234,20 @@ static int64 battle_calc_cardfix(int attack_type, struct block_list *src, struct } cardfix = cardfix * (100 - ele_fix_lh) / 100; } + + // Apply bSubDefEle damage reduction. + switch (src->type) { + case BL_MOB: + ele_fix = tsd->sub_def_ele[status_get_element(src)].rate_mob; + break; + case BL_PC: + ele_fix = tsd->sub_def_ele[status_get_element(src)].rate_pc; + break; + default: + break; + } + + cardfix = cardfix * (100 - ele_fix) / 100; } cardfix = cardfix * (100-tsd->subsize[sstatus->size]) / 100; cardfix = cardfix * (100-tsd->subrace2[s_race2]) / 100; |