summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-11-28 13:13:42 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-11-28 13:13:42 +0000
commit42920b57960ba73431fc71de217058a64c6a3871 (patch)
tree99ba2f6e76d284a43cd13ac94fdc00d317f5df5b /src/map/battle.c
parent83a75b6e94e5092edbdce71ddf2cba16a747e4fc (diff)
downloadhercules-42920b57960ba73431fc71de217058a64c6a3871.tar.gz
hercules-42920b57960ba73431fc71de217058a64c6a3871.tar.bz2
hercules-42920b57960ba73431fc71de217058a64c6a3871.tar.xz
hercules-42920b57960ba73431fc71de217058a64c6a3871.zip
- Applied the required changes to handle def as a signed char (allows for negative def)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11837 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index ada30c949..266207358 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1670,7 +1670,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
if (!flag.idef || !flag.idef2)
{ //Defense reduction
short vit_def;
- signed char def1 = (signed char)status_get_def(target); //Don't use tstatus->def1 due to skill timer reductions.
+ signed char def1 = status_get_def(target); //Don't use tstatus->def1 due to skill timer reductions.
short def2 = (short)tstatus->def2;
if(battle_config.vit_penalty_type &&
battle_config.vit_penalty_target&target->type)
@@ -1686,7 +1686,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
def2 -= (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num;
}
}
- if(def1 < 0 || skill_num == AM_ACIDTERROR) def1 = 0; //Acid Terror ignores only armor defense. [Skotlex]
+ if(skill_num == AM_ACIDTERROR) def1 = 0; //Acid Terror ignores only armor defense. [Skotlex]
if(def2 < 1) def2 = 1;
}
//Vitality reduction from rodatazone: http://rodatazone.simgaming.net/mechanics/substats.php#def
@@ -2323,7 +2323,7 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
}
if(!flag.imdef){
- int mdef = tstatus->mdef;
+ char mdef = tstatus->mdef;
int mdef2= tstatus->mdef2;
if(sd) {
i = sd->ignore_mdef[is_boss(target)?RC_BOSS:RC_NONBOSS];