Bläddra i källkod

- Modified the meaning of the third column in the skill_require_db. Instead of MaxHP, this is now called MaxHPTrigger. This column (which was previously unused by all skills) signals the limit HP% that you can have to be able to use the skill. For example, setting it to 20 means the skill is unusable if you have more than 20% life (not that this is merely a threshold setting, it won't actually substract HP when used!)
- Adjusted LK_BERSERK so you can only use it when you have 20% or less life.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9045 54d463be-8e91-2dee-dedb-b68131a5f0ec

skotlex 18 år sedan
förälder
incheckning
c87ac4f0a5
4 ändrade filer med 19 tillägg och 4 borttagningar
  1. 8 0
      Changelog-Trunk.txt
  2. 3 0
      db/Changelog.txt
  3. 2 2
      db/skill_require_db.txt
  4. 6 2
      src/map/skill.c

+ 8 - 0
Changelog-Trunk.txt

@@ -4,6 +4,14 @@ 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/10/23
+	* Modified the meaning of the third column in the skill_require_db. Instead
+	  of MaxHP, this is now called MaxHPTrigger. This column (which was
+	  previously unused by all skills) signals the limit HP% that you can have to
+	  be able to use the skill. For example, setting it to 20 means the skill is
+	  unusable if you have more than 20% life (note that this is merely a
+	  threshold setting, it won't actually substract HP when used!) [Skotlex]
+	* Adjusted LK_BERSERK so you can only use it when you have 20% or less
+	  life. [Skotlex]
 	* Removed NJ_TOBIDOUGU adding damage to W_HUUMA weapons which somehow got
 	  readded. [Skotlex]
 	* When nonplayers use Cloaking, it will be forced to level 10 since mobs

+ 3 - 0
db/Changelog.txt

@@ -19,6 +19,9 @@
 	-----
 
 ========================
+10/23
+	* Adjusted LK_BERSERK so you can only use it when you have 20% or less
+	  life. [Skotlex]
 10/20
 	* Official Muscipular drops [Playtester]
 10/19

+ 2 - 2
db/skill_require_db.txt

@@ -1,7 +1,7 @@
 // Skill Requirements Database
 //
 // Structure of Database:
-// SkillID,HPCost,MaxHPCost,SPCost,HPRateCost,SPRateCost,ZenyCost,RequiredWeapons,RequiredAmmoTypes,RequiredAmmoAmount,RequiredState,SpiritSphereCost,RequiredItemID1,RequiredItemAmount1,RequiredItemID2,RequiredItemAmount2,RequiredItemID3,RequiredItemAmount3,RequiredItemID4,RequiredItemAmount4,RequiredItemID5,RequiredItemAmount5,RequiredItemID6,RequiredItemAmount6,RequiredItemID7,RequiredItemAmount7,RequiredItemID8,RequiredItemAmount8,RequiredItemID9,RequiredItemAmount9,RequiredItemID10,RequiredItemAmount10
+// SkillID,HPCost,MaxHPTrigger,SPCost,HPRateCost,SPRateCost,ZenyCost,RequiredWeapons,RequiredAmmoTypes,RequiredAmmoAmount,RequiredState,SpiritSphereCost,RequiredItemID1,RequiredItemAmount1,RequiredItemID2,RequiredItemAmount2,RequiredItemID3,RequiredItemAmount3,RequiredItemID4,RequiredItemAmount4,RequiredItemID5,RequiredItemAmount5,RequiredItemID6,RequiredItemAmount6,RequiredItemID7,RequiredItemAmount7,RequiredItemID8,RequiredItemAmount8,RequiredItemID9,RequiredItemAmount9,RequiredItemID10,RequiredItemAmount10
 //
 // If HP/SPratecost is positive, it is a percent of your current life, otherwise it is a percent of your max life.
 //
@@ -267,7 +267,7 @@
 356,0,0,50,0,0,0,3,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//LK_PARRYING#パリイング#
 357,0,0,14:18:22:26:30,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//LK_CONCENTRATION#コンセントレ?ション#
 358,0,0,15,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//LK_TENSIONRELAX#テンションリラックス#
-359,0,0,100,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//LK_BERSERK#バ?サ?ク#
+359,0,20,100,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//LK_BERSERK#バ?サ?ク#
 361,0,0,20:30:40:50:60,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//HP_ASSUMPTIO#アスムプティオ#
 362,0,0,80:90:100:110:120,0,0,0,99,0,0,none,0,715,1,716,1,717,1,523,1,0,0,0,0,0,0,0,0,0,0,0,0	//HP_BASILICA#バジリカ#
 

+ 6 - 2
src/map/skill.c

@@ -7887,8 +7887,12 @@ int skill_check_condition (struct map_session_data *sd, int skill, int lv, int t
 		itemid[i] = skill_db[j].itemid[i];
 		amount[i] = skill_db[j].amount[i];
 	}
-	if(mhp > 0)
-		hp += (status->max_hp * mhp)/100;
+	if(mhp > 0 && 100 * status->hp / status->max_hp > mhp) {
+		//mhp is the max-hp-requirement, that is,
+		//you must have this % or less of HP to cast it.
+		clif_skill_fail(sd,skill,2,0);
+		return 0;
+	}
 	if(hp_rate > 0)
 		hp += (status->hp * hp_rate)/100;
 	else