summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-05-27 11:33:42 +0000
committerrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-05-27 11:33:42 +0000
commit2039c2c09ba7ec99c94a7b7f78ea3d4789cceafe (patch)
tree08752564dda3f1ca52b7f4b0b75eb301af4478ba /src/map/battle.c
parent7f631a0654aa1ab4d9356753c49457a0f571c58b (diff)
downloadhercules-2039c2c09ba7ec99c94a7b7f78ea3d4789cceafe.tar.gz
hercules-2039c2c09ba7ec99c94a7b7f78ea3d4789cceafe.tar.bz2
hercules-2039c2c09ba7ec99c94a7b7f78ea3d4789cceafe.tar.xz
hercules-2039c2c09ba7ec99c94a7b7f78ea3d4789cceafe.zip
Fixed bugreport:5821 GN_SLINGITEM item requirements(item throwables) should now works normally.
Fixed bugreport:5223 GN_BLOOD_SUCKER should now work like official behavior. Fixed part of bugreport:5674 Spiral Pierce is now in RE. Fixed setmadogear now it accepts optional parameter(0=unmount 1=mount). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16155 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c45
1 files changed, 38 insertions, 7 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 02fe69beb..558e90a08 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1596,6 +1596,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
wd.damage = sstatus->max_hp* 9/100;
wd.damage2 = 0;
break;
+#ifndef RENEWAL
case LK_SPIRALPIERCE:
case ML_SPIRALPIERCE:
if (sd) {
@@ -1622,6 +1623,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
break;
}
break;
+#endif
case CR_SHIELDBOOMERANG:
case PA_SHIELDCHAIN:
case LG_SHIELDPRESS:
@@ -2419,6 +2421,9 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
}
}
//Div fix.
+#ifdef RENEWAL
+ if( skill_num != LK_SPIRALPIERCE && skill_num != ML_SPIRALPIERCE)
+#endif
damage_div_fix(wd.damage, wd.div_);
//The following are applied on top of current damage and are stackable.
@@ -2590,12 +2595,41 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
flag.idef2||flag.pdef2?0:-vit_def
);
}
-
+#ifdef RENEWAL
+ /**
+ * Racial/Size and etc modifications should not work with this formula(only the ATK is affected w/ mods) except for now, since RE ATK formula is not yet fully implemented in rA. [malufett]
+ * Formula: Floor[Floor(Weapon Weight/2)*skill level + ATK ]*(100%+50%*s.lvl) * 5 multi-hits
+ **/
+ if( skill_num == LK_SPIRALPIERCE || skill_num == ML_SPIRALPIERCE)
+ {
+ short index = sd?sd->equip_index[EQI_HAND_R]:0;
+ int weight = sstatus->rhw.atk2;
+
+ if (sd && index >= 0 &&
+ sd->inventory_data[index] &&
+ sd->inventory_data[index]->type == IT_WEAPON)
+ weight = sd->inventory_data[index]->weight/20;
+
+ ATK_ADD(weight * skill_lv);
+ ATK_RATE(100+50*skill_lv);
+
+ damage_div_fix(wd.damage, wd.div_);
+ }
+#endif
//Post skill/vit reduction damage increases
- if( sc && skill_num != LK_SPIRALPIERCE && skill_num != ML_SPIRALPIERCE )
+ if( sc )
{ //SC skill damages
- if(sc->data[SC_AURABLADE])
- ATK_ADD(20*sc->data[SC_AURABLADE]->val1);
+ if(sc->data[SC_AURABLADE]
+#ifndef RENEWAL
+ && skill_num != LK_SPIRALPIERCE && skill_num != ML_SPIRALPIERCE
+#endif
+ ){
+ int lv = sc->data[SC_AURABLADE]->val1;
+#ifdef RENEWAL
+ lv *= ((skill_num == LK_SPIRALPIERCE || skill_num == ML_SPIRALPIERCE)?wd.div_:1); // +100 per hit in lv 5
+#endif
+ ATK_ADD(20*lv);
+ }
}
//Refine bonus
@@ -3913,9 +3947,6 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *
case GN_THORNS_TRAP:
md.damage = 100 + 200 * skill_lv + sstatus->int_;
break;
- case GN_BLOOD_SUCKER:
- md.damage = 200 + 100 * skill_lv + sstatus->int_;
- break;
case GN_HELLS_PLANT_ATK:
md.damage = sstatus->int_ * 4 * skill_lv * (10 / (10 - pc_checkskill(sd,AM_CANNIBALIZE)));//Need accurate official formula. [Rytech]
break;