summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt8
-rw-r--r--db/Changelog.txt3
-rw-r--r--db/skill_require_db.txt4
-rw-r--r--src/map/skill.c8
4 files changed, 19 insertions, 4 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 2d181edb2..3ff697d30 100644
--- a/Changelog-Trunk.txt
+++ b/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
diff --git a/db/Changelog.txt b/db/Changelog.txt
index 8b724944b..d0c1925e4 100644
--- a/db/Changelog.txt
+++ b/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
diff --git a/db/skill_require_db.txt b/db/skill_require_db.txt
index c971c00e7..445d7866c 100644
--- a/db/skill_require_db.txt
+++ b/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#バジリカ#
diff --git a/src/map/skill.c b/src/map/skill.c
index de0f9518b..27ad7d4c2 100644
--- a/src/map/skill.c
+++ b/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