Explorar el Código

- Fixed Energy Coat reducing and consuming more than it should when you have 100% SP

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8460 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex hace 19 años
padre
commit
44a5b037a3
Se han modificado 2 ficheros con 3 adiciones y 1 borrados
  1. 2 0
      Changelog-Trunk.txt
  2. 1 1
      src/map/battle.c

+ 2 - 0
Changelog-Trunk.txt

@@ -4,6 +4,8 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
 2006/08/23
+	* Fixed Energy Coat reducing and consuming more than it should when you
+	  have 100% SP [Skotlex]
 	* Cleaned up getmapxy script function, also added support for type 4 so
 	  that it returns a player's homunculus position if such exists. [Skotlex]
 	* SC_ARMOR_ELEMENT looks like gone away from status_change_start since ... rev 6791.

+ 1 - 1
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))