Переглянути джерело

One more small fix on 'bSPVanishRate' (tsd->status.hp * sd->sp_vanish_per/100 -> tsd->status.sp * sd->sp_vanish_per/100)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5111 54d463be-8e91-2dee-dedb-b68131a5f0ec
Komurka 19 роки тому
батько
коміт
28c7a61687
3 змінених файлів з 3 додано та 1 видалено
  1. 1 0
      Changelog-Trunk.txt
  2. 1 0
      doc/item_bonus.txt
  3. 1 1
      src/map/battle.c

+ 1 - 0
Changelog-Trunk.txt

@@ -5,6 +5,7 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.  EV
 GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
 
 2006/01/30
+	* One more small fix on 'bSPVanishRate' (hp -> sp) [Komurka]
 	* Added bSPVanishRate to const.txt - Dark Priest Card should work now ^^
 	* Implemented bonus2 bSPVanishRate for Dark Priest Card [Komurka]
 	- it isn't finished - I get '[Warning]: pc_bonus2: unknown type 0 50 10!' ><

+ 1 - 0
doc/item_bonus.txt

@@ -115,6 +115,7 @@ bonus2 bAddDefClass,n,x;		In monster of class n the damage reduction of x% (only
 bonus2 bAddMDefClass,n,x;		In monster of class n in case of the magical damage reduction and prayer of x% in n occupation the magical damage reduction of x%
 bonus2 bHPDrainRate,n,x;		it obtained to the enemy -- ? ME ? JI -- n % probability -- x % -- HP -- absorption (+ n and x are carried out)
 bonus2 bSPDrainRate,n,x;		it obtained to the enemy -- ? ME ? JI -- n % probability -- x % -- SP -- absorption (+ n and x are carried out)
+bonus2 bSPVanishRate,n,x;		Add the (n/10)% chance of decreasing enemy's SP (player) amount by x% when attacking
 bonus2 bAddMonsterDropItem,n,x;		When killing any monsters with physical attack, the probability which drops item n +x% (the item which the monster drops unrelated ones)
 									if 'x' is negative value, then it's a part of formula
 										chance = -x*(killed_mob_level/10)+1

+ 1 - 1
src/map/battle.c

@@ -3136,7 +3136,7 @@ int battle_weapon_attack( struct block_list *src,struct block_list *target,
 
 			if (target && target->type == BL_PC && rand()%1000 < sd->sp_vanish_rate)
 			{
-				sp = tsd->status.hp * sd->sp_vanish_per/100;
+				sp = tsd->status.sp * sd->sp_vanish_per/100;
 				if (sp > 0)
 					pc_heal(tsd, 0, -sp);