summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-23 21:27:51 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-23 21:27:51 +0000
commitb201c7119eb5da8b519de795a241ebe5e251029b (patch)
tree7e686339624b61c7ef1937ec1c43367174f7b7ae /src/map
parent807bbb2d5494b1a9c65fc7a6fac2fd68079349cf (diff)
downloadhercules-b201c7119eb5da8b519de795a241ebe5e251029b.tar.gz
hercules-b201c7119eb5da8b519de795a241ebe5e251029b.tar.bz2
hercules-b201c7119eb5da8b519de795a241ebe5e251029b.tar.xz
hercules-b201c7119eb5da8b519de795a241ebe5e251029b.zip
- Fixed Energy Coat reducing and consuming more than it should when you have 100% SP
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8460 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/battle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 0c417243a..9a7402bcb 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -365,7 +365,7 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i
if(sc->data[SC_ENERGYCOAT].timer!=-1 && flag&BF_WEAPON){
struct status_data *status = status_get_status_data(bl);
- int per = 100*status->sp / status->max_sp;
+ int per = 100*status->sp / status->max_sp -1; //100% should be counted as the 80~99% interval
per /=20; //Uses 20% SP intervals.
//SP Cost: 1% + 0.5% per every 20% SP
if (!status_charge(bl, 0, (10+5*per)*status->max_sp/1000))