diff options
Diffstat (limited to 'src/map/battle.c')
-rw-r--r-- | src/map/battle.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 4b762a559..17f12741b 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -1759,7 +1759,10 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo } } - if( sc && sc->count && sc->data[SC_DEFRATIOATK] && skill_num != PA_SACRIFICE && skill_num != CR_GRANDCROSS && skill_num != NPC_GRANDDARKNESS && skill_num != PA_SHIELDCHAIN && !flag.cri ) + if( sc && sc->count && sc->data[SC_DEFRATIOATK] + && !is_boss(target) + && skill_num != PA_SACRIFICE && skill_num != CR_GRANDCROSS && skill_num != NPC_GRANDDARKNESS && skill_num != PA_SHIELDCHAIN + && !flag.cri ) flag.pdef = flag.pdef2 = sc->data[SC_DEFRATIOATK]->val1; // Occult Impact Effect if (!flag.idef || !flag.idef2) @@ -1780,6 +1783,15 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo } } + if( sc && sc->count && sc->data[SC_IGNOREDEF] + && !is_boss(target) + && skill_num != CR_GRANDCROSS && skill_num != NPC_GRANDDARKNESS ) + { + i = cap_value(sc->data[SC_IGNOREDEF]->val1,1,100); + def1 -= def1 * i / 100; + def2 -= def2 * i / 100; + } + if( battle_config.vit_penalty_type && battle_config.vit_penalty_target&target->type ) { unsigned char target_count; //256 max targets should be a sane max |