summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-04-17 03:18:21 -0300
committershennetsind <ind@henn.et>2013-04-17 03:18:21 -0300
commit904caf6f8c77f50f7d89725cec7b8bc200406ae5 (patch)
tree27e5abbb9f1fde91a4b8304ecdcf9ddc1ff93d19 /src/map/battle.c
parent2e909cf1f7ad5ab6f5c05cffba4744b132f280cd (diff)
downloadhercules-904caf6f8c77f50f7d89725cec7b8bc200406ae5.tar.gz
hercules-904caf6f8c77f50f7d89725cec7b8bc200406ae5.tar.bz2
hercules-904caf6f8c77f50f7d89725cec7b8bc200406ae5.tar.xz
hercules-904caf6f8c77f50f7d89725cec7b8bc200406ae5.zip
Fixed Bug #7060
Magical Reflection behavior is finally 100% official (or so we hope) http://hercules.ws/board/tracker/issue-7060-bmagicdamagereturn/ Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index b8ca0d92b..29b861c18 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -433,8 +433,6 @@ int battle_calc_cardfix(int attack_type, struct block_list *src, struct block_li
switch(attack_type){
case BF_MAGIC:
- if( battle->isMagicReflect )
- nk |= NK_NO_CARDFIX_ATK;
if ( sd && !(nk&NK_NO_CARDFIX_ATK) ) {
cardfix=cardfix*(100+sd->magic_addrace[tstatus->race])/100;
if (!(nk&NK_NO_ELEFIX))
@@ -993,7 +991,7 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damag
//Finally damage reductions....
// Assumptio doubles the def & mdef on RE mode, otherwise gives a reduction on the final damage. [Igniz]
#ifndef RENEWAL
- if( sc->data[SC_ASSUMPTIO] && !battle->isMagicReflect ) {
+ if( sc->data[SC_ASSUMPTIO] ) {
if( map_flag_vs(bl->m) )
damage = damage*2/3; //Receive 66% damage
else
@@ -1038,9 +1036,9 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damag
damage -= damage * sc->data[SC_ARMOR]->val2 / 100;
#ifdef RENEWAL
- if(sc->data[SC_ENERGYCOAT] && (battle->isMagicReflect || ((flag&BF_WEAPON || flag&BF_MAGIC) && skill_id != WS_CARTTERMINATION)))
+ if(sc->data[SC_ENERGYCOAT] && (flag&BF_WEAPON || flag&BF_MAGIC) && skill_id != WS_CARTTERMINATION)
#else
- if(sc->data[SC_ENERGYCOAT] && (battle->isMagicReflect || (flag&BF_WEAPON && skill_id != WS_CARTTERMINATION)))
+ if(sc->data[SC_ENERGYCOAT] && (flag&BF_WEAPON && skill_id != WS_CARTTERMINATION))
#endif
{
struct status_data *status = status_get_status_data(bl);
@@ -4085,8 +4083,7 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
if (!flag.imdef && (
sd->bonus.ignore_mdef_ele & ( 1 << tstatus->def_ele ) ||
sd->bonus.ignore_mdef_race & ( 1 << tstatus->race ) ||
- sd->bonus.ignore_mdef_race & ( is_boss(target) ? 1 << RC_BOSS : 1 << RC_NONBOSS ) ||
- battle->isMagicReflect
+ sd->bonus.ignore_mdef_race & ( is_boss(target) ? 1 << RC_BOSS : 1 << RC_NONBOSS )
))
flag.imdef = 1;
}