summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authormalufett <malufett.eat.my.binaries@gmail.com>2013-07-01 17:11:24 +0800
committermalufett <malufett.eat.my.binaries@gmail.com>2013-07-01 17:11:24 +0800
commitc1401ff17207e9c2aac551066f0bd90928dd90bb (patch)
tree11558437e30ab312fed3f421a87d814ee238409d /src/map
parentf34be4ae424942d385dd97c211002301e0f24462 (diff)
downloadhercules-c1401ff17207e9c2aac551066f0bd90928dd90bb.tar.gz
hercules-c1401ff17207e9c2aac551066f0bd90928dd90bb.tar.bz2
hercules-c1401ff17207e9c2aac551066f0bd90928dd90bb.tar.xz
hercules-c1401ff17207e9c2aac551066f0bd90928dd90bb.zip
Follow up 074662a4b30e5d380fda32fd7df2d3ae2de759e0
-where target def card is not working properly Renewal Update: -Updated MO_EXTREMITYFIST to its official RE damage formula. -Special thanks to Awesome Yommy..:D Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
Diffstat (limited to 'src/map')
-rw-r--r--src/map/battle.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 1242d62ae..37d3ec13e 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -958,7 +958,7 @@ int battle_calc_cardfix(int attack_type, struct block_list *src, struct block_li
break;
case BF_WEAPON:
t_race2 = status_get_race2(target);
- if( sd ){
+ if( sd && !tsd ){
short cardfix_ = 1000;
if( !(nk&NK_NO_CARDFIX_ATK) || !(cflag&2) )
break;
@@ -4401,20 +4401,21 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
ATK_ADD(-totaldef);
if( is_boss(target) )
ATK_RATE(50);
- flag.idef = 1;
}
break;
case NJ_SYURIKEN: // [malufett]
GET_NORMAL_ATTACK( (sc && sc->data[SC_MAXIMIZEPOWER]?1:0)|(sc && sc->data[SC_WEAPONPERFECT]?8:0) );
wd.damage += battle->calc_masteryfix(src, target, skill_id, skill_lv, 4 * skill_lv + (sd ? sd->bonus.arrow_atk : 0), wd.div_, 0, flag.weapon) - status_get_total_def(target);
- flag.idef = 1;
break;
case MO_EXTREMITYFIST: // [malufett]
- GET_NORMAL_ATTACK( (sc && sc->data[SC_MAXIMIZEPOWER]?1:0)|8 );
- // first value is still not confirm.
- if( wd.damage )
- wd.damage = status_get_sp(src) + 10 * status_get_sp(src) * wd.damage / 100 + 8 * wd.damage + 250 + 150 * skill_lv;
- flag.tdef = 1;
+ {
+ short totaldef = status_get_total_def(target);
+ GET_NORMAL_ATTACK( (sc && sc->data[SC_MAXIMIZEPOWER]?1:0)|8 );
+ if( wd.damage ){
+ wd.damage = (250 + 150 * skill_lv) + (10 * (status_get_sp(src)+1) * wd.damage / 100) + (8 * wd.damage);
+ ATK_ADD(-totaldef);
+ }
+ }
#endif
break;
#ifndef RENEWAL
@@ -4514,9 +4515,10 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
if (sd->bonus.atk_rate)
ATK_ADDRATE(sd->bonus.atk_rate);
+#ifndef RENEWAL
if(flag.cri && sd->bonus.crit_atk_rate)
ATK_ADDRATE(sd->bonus.crit_atk_rate);
-#ifndef RENEWAL
+
if(sd->status.party_id && (temp=pc->checkskill(sd,TK_POWER)) > 0){
if( (i = party_foreachsamemap(party->sub_count, sd, 0)) > 1 ) // exclude the player himself [Inkfish]
ATK_ADDRATE(2*temp*i);
@@ -4814,8 +4816,8 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
if( flag.lh)
wd.damage2 = battle->calc_masteryfix(src, target, skill_id, skill_lv, wd.damage2, wd.div_, 1, flag.weapon);
#else
- if( flag.cri )
- ATK_ADDRATE(40);
+ if( sd && flag.cri )
+ ATK_ADDRATE(sd->bonus.crit_atk_rate >= 100 ? sd->bonus.crit_atk_rate : 40);
#endif
} //Here ends flag.hit section, the rest of the function applies to both hitting and missing attacks
else if(wd.div_ < 0) //Since the attack missed...
@@ -4869,10 +4871,7 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
wd.damage = battle->calc_cardfix(BF_WEAPON, src, target, nk, s_ele, s_ele_, wd.damage, 2, wd.flag);
if( flag.lh )
wd.damage2 = battle->calc_cardfix(BF_WEAPON, src, target, nk, s_ele, s_ele_, wd.damage2, 3, wd.flag);
-#ifdef RENEWAL
- if( flag.cri )
- ATK_ADDRATE(sd->bonus.crit_atk_rate>=100?sd->bonus.crit_atk_rate-60:40);
-#endif
+
if( skill_id == CR_SHIELDBOOMERANG || skill_id == PA_SHIELDCHAIN )
{ //Refine bonus applies after cards and elements.
short index= sd->equip_index[EQI_HAND_L];