summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-04-25 10:03:23 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-04-25 10:03:23 +0000
commitd68700b564d67f64ed4f75ca5d812f51855c6656 (patch)
tree0f65c3cc582f06af28bb43dee6051916cabe7791 /src/map
parente1e9fa78cd325190e3fc0a72b9b90b2ab01694ee (diff)
downloadhercules-d68700b564d67f64ed4f75ca5d812f51855c6656.tar.gz
hercules-d68700b564d67f64ed4f75ca5d812f51855c6656.tar.bz2
hercules-d68700b564d67f64ed4f75ca5d812f51855c6656.tar.xz
hercules-d68700b564d67f64ed4f75ca5d812f51855c6656.zip
Added an int64 typecast to both the acid demonstration equation (which couldn't handle 1000-ish stats), and the misc damage reduction code (followup to r13694).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13700 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-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 6f9228226..bf2119dc3 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -2654,7 +2654,7 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *
break;
case CR_ACIDDEMONSTRATION: // updated the formula based on a Japanese formula found to be exact [Reddozen]
if(tstatus->vit+sstatus->int_) //crash fix
- md.damage = 7*tstatus->vit*sstatus->int_*sstatus->int_ / (10*(tstatus->vit+sstatus->int_));
+ md.damage = (int64)7*tstatus->vit*sstatus->int_*sstatus->int_ / (10*(tstatus->vit+sstatus->int_));
else
md.damage = 0;
if (tsd) md.damage>>=1;
@@ -2739,7 +2739,7 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *
}
if( md.damage && tsd && !(nk&NK_NO_CARDFIX_DEF) )
- {
+ {// misc damage reduction from equipment
int cardfix = 10000;
int race2 = status_get_race2(src);
if (!(nk&NK_NO_ELEFIX))
@@ -2758,7 +2758,7 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *
cardfix=cardfix*(100-tsd->long_attack_def_rate)/100;
if (cardfix != 10000)
- md.damage=md.damage*((double)cardfix/10000);
+ md.damage=(int64)md.damage*cardfix/10000;
}
if (sd && (i = pc_skillatk_bonus(sd, skill_num)))