summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-12-11 16:04:24 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-12-11 16:04:24 +0000
commitebf34f01ebc8d2c1e3af90c58c6be5b240efc01c (patch)
treef773155526ba89186626de09faf7f2dcbe2bb1c9 /src/map/battle.c
parent1ce32a605550e2e3418d2ba23948ecc832d7c76c (diff)
downloadhercules-ebf34f01ebc8d2c1e3af90c58c6be5b240efc01c.tar.gz
hercules-ebf34f01ebc8d2c1e3af90c58c6be5b240efc01c.tar.bz2
hercules-ebf34f01ebc8d2c1e3af90c58c6be5b240efc01c.tar.xz
hercules-ebf34f01ebc8d2c1e3af90c58c6be5b240efc01c.zip
- Spirit of Sin and Enchant Deadly Poison now stack.
- Fixed skill damage card bonuses not working on magic skills. - Moved the setting of sd->npc_id = 0 in npc_dequeue to the beginning, since this function is called when a script is cancelled (TODO: but when this happens, shouldn't the previously ongoing script also be free'd?) - Made homunc's speed be recalculated when you respawn it from rest state. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9453 54d463be-8e91-2dee-dedb-b68131a5f0ec
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) ||