summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index dea2f9056..db526dda8 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1644,8 +1644,8 @@ static struct Damage battle_calc_weapon_attack(
skillratio += sc->data[SC_EDP].val3;
}
switch (skill_num) {
- case AS_SONICBLOW: //EDP will not stack with Soul Link bonus.
- if (sc && sc->data[SC_EDP].timer == -1 && sc->data[SC_SPIRIT].timer != -1 && sc->data[SC_SPIRIT].val2 == SL_ASSASIN)
+ case AS_SONICBLOW:
+ if (sc && sc->data[SC_SPIRIT].timer != -1 && sc->data[SC_SPIRIT].val2 == SL_ASSASIN)
skillratio += (map_flag_gvg(src->m))?25:100; //+25% dmg on woe/+100% dmg on nonwoe
if(sd && pc_checkskill(sd,AS_SONICACCEL)>0)
skillratio += 10;
@@ -2378,15 +2378,6 @@ struct Damage battle_calc_magic_attack(
break;
}
- if (sd && sd->skillatk[0].id != 0)
- {
- for (i = 0; i < MAX_PC_BONUS && sd->skillatk[i].id != 0 && sd->skillatk[i].id != skill_num; i++)
- if (i < MAX_PC_BONUS && sd->skillatk[i].id == skill_num)
- //If we apply skillatk[] as ATK_RATE, it will also affect other skills,
- //unfortunately this way ignores a skill's constant modifiers...
- skillratio += sd->skillatk[i].val;
- }
-
MATK_RATE(skillratio);
//Constant/misc additions from skills
@@ -2396,6 +2387,14 @@ struct Damage battle_calc_magic_attack(
}
if(sd) {
+ //Damage bonuses
+ if (sd->skillatk[0].id)
+ {
+ for (i = 0; i < MAX_PC_BONUS && sd->skillatk[i].id && sd->skillatk[i].id != skill_num; i++);
+ if (i < MAX_PC_BONUS && sd->skillatk[i].id == skill_num)
+ ad.damage += ad.damage*sd->skillatk[i].val/100;
+ }
+
//Ignore Defense?
if (!flag.imdef && (
sd->ignore_mdef_ele & (1<<tstatus->def_ele) ||