diff options
Diffstat (limited to 'src/map/battle.c')
-rw-r--r-- | src/map/battle.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 5aa862c67..4f164dd3c 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -287,15 +287,10 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i sc = status_get_sc(bl); - if((flag&(BF_MAGIC|BF_LONG)) == BF_LONG && - map_getcell(bl->m, bl->x, bl->y, CELL_CHKPNEUMA) && - skill_num != NPC_GUIDEDATTACK) - return 0; - if (sc && sc->count) { //First, sc_*'s that reduce damage to 0. - if (sc->data[SC_SAFETYWALL] && flag&BF_SHORT && skill_num != NPC_GUIDEDATTACK - ) { + if( sc->data[SC_SAFETYWALL] && flag&BF_SHORT && skill_num != NPC_GUIDEDATTACK ) + { struct skill_unit_group *group = (struct skill_unit_group *)sc->data[SC_SAFETYWALL]->val3; if (group) { if (--group->val2<=0) @@ -304,7 +299,10 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i } status_change_end(bl,SC_SAFETYWALL,-1); } - + + if( sc->data[SC_PNEUMA] && (flag&(BF_MAGIC|BF_LONG)) == BF_LONG && skill_num != NPC_GUIDEDATTACK ) + return 0; + if((sce=sc->data[SC_AUTOGUARD]) && flag&BF_WEAPON && !(skill_get_nk(skill_num)&NK_NO_CARDFIX_ATK) && rand()%100 < sce->val2) |