summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-20 21:38:02 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-20 21:38:02 +0000
commitf076819852059809b4281ef2e87e50aee102cfd0 (patch)
treed45a2a5311abe91268b7ed93be120adb84c9081b /src/map/battle.c
parentd2b562b8242d07c6a373baaa6dce66fa85df9eb5 (diff)
downloadhercules-f076819852059809b4281ef2e87e50aee102cfd0.tar.gz
hercules-f076819852059809b4281ef2e87e50aee102cfd0.tar.bz2
hercules-f076819852059809b4281ef2e87e50aee102cfd0.tar.xz
hercules-f076819852059809b4281ef2e87e50aee102cfd0.zip
- Gravitation now only blocks the caster from using potions.
- Corrected Madness Canceller not letting you walk while the effect lasts. - Splitted yet again ASC_BREAKER into a two-part attack. This time the int-based damage is a MISC type attack, and gets reduced by skills as such. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8392 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index d78b83c31..fff1dbe81 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -754,6 +754,9 @@ void battle_consume_ammo(TBL_PC*sd, int skill, int lv)
pc_delitem(sd,sd->equip_index[10],qty,0);
}
+struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list *target,int skill_num,int skill_lv,int mflag);
+struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *target,int skill_num,int skill_lv,int mflag);
+
//For quick div adjustment.
#define damage_div_fix(dmg, div) { if (div > 1) (dmg)*=div; else if (div < 0) (div)*=-1; }
/*==========================================
@@ -1813,10 +1816,6 @@ static struct Damage battle_calc_weapon_attack(
}
}
- //Breaker's int-based damage (applies after attribute modifiers)
- if(skill_num==ASC_BREAKER)
- ATK_ADD(rand()%500 + 500 + skill_lv * sstatus->int_ * 5);
-
if ((!flag.rh || !wd.damage) && (!flag.lh || !wd.damage2))
flag.cardfix = 0; //When the attack does no damage, avoid doing %bonuses
@@ -2027,6 +2026,12 @@ static struct Damage battle_calc_weapon_attack(
}
}
+ if(skill_num==ASC_BREAKER)
+ { //Breaker's int-based damage (a misc attack?)
+ struct Damage md = battle_calc_misc_attack(src, target, skill_num, skill_lv, wflag);
+ wd.damage += md.damage;
+ }
+
if (wd.damage || wd.damage2) {
if (sd && battle_config.equip_self_break_rate)
{ // Self weapon breaking
@@ -2518,6 +2523,7 @@ struct Damage battle_calc_misc_attack(
case SN_FALCONASSAULT:
case PA_GOSPEL:
case CR_ACIDDEMONSTRATION:
+ case ASC_BREAKER:
md.flag = (md.flag&~BF_RANGEMASK)|BF_LONG;
break;
case HVAN_EXPLOSION:
@@ -2613,6 +2619,9 @@ struct Damage battle_calc_misc_attack(
case HVAN_EXPLOSION: //[orn]
md.damage = sstatus->hp * (50 + 50 * skill_lv) / 100 ;
break ;
+ case ASC_BREAKER:
+ md.damage = 500+rand()%500 + 5*skill_lv * sstatus->int_;
+ break;
}
damage_div_fix(md.damage, md.div_);