mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-26 23:57:17 +00:00
Rule-based update to 'Bind Wound' behavior
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
||||||
-------------------------------------------------------
|
-------------------------------------------------------
|
||||||
|
== 09/03/2016 ==
|
||||||
|
Uleat: Changed 'Bind Wound' behavior to match the best references that I could find for post-2004 era.
|
||||||
|
Note: If you wish to retain the old method, source in the optional '2016_09_03_old_bind_wound_rule.sql' script file.
|
||||||
|
|
||||||
== 08/27/2016 ==
|
== 08/27/2016 ==
|
||||||
Kinglykrab: Added optional IP-based account exemptions.
|
Kinglykrab: Added optional IP-based account exemptions.
|
||||||
- To use this system simply set World:EnableIPExemptions to true and create an entry in the ip_exemptions table.
|
- To use this system simply set World:EnableIPExemptions to true and create an entry in the ip_exemptions table.
|
||||||
|
|||||||
@@ -145,6 +145,8 @@ RULE_BOOL(Character, UseStackablePickPocketing, true) // Allows stackable pickpo
|
|||||||
RULE_BOOL(Character, EnableAvoidanceCap, false)
|
RULE_BOOL(Character, EnableAvoidanceCap, false)
|
||||||
RULE_INT(Character, AvoidanceCap, 750) // 750 Is a pretty good value, seen people dodge all attacks beyond 1,000 Avoidance
|
RULE_INT(Character, AvoidanceCap, 750) // 750 Is a pretty good value, seen people dodge all attacks beyond 1,000 Avoidance
|
||||||
RULE_BOOL(Character, AllowMQTarget, false) // Disables putting players in the 'hackers' list for targeting beyond the clip plane or attempting to target something untargetable
|
RULE_BOOL(Character, AllowMQTarget, false) // Disables putting players in the 'hackers' list for targeting beyond the clip plane or attempting to target something untargetable
|
||||||
|
RULE_BOOL(Character, UseOldBindWound, false) // Uses the original bind wound behavior
|
||||||
|
|
||||||
RULE_CATEGORY_END()
|
RULE_CATEGORY_END()
|
||||||
|
|
||||||
RULE_CATEGORY(Mercs)
|
RULE_CATEGORY(Mercs)
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES (1, 'Character:UseOldBindWound', 'true', 'Uses the original bind wound behavior');
|
||||||
+64
-4
@@ -2655,13 +2655,14 @@ bool Client::BindWound(Mob *bindmob, bool start, bool fail)
|
|||||||
bind_out->type = 0;
|
bind_out->type = 0;
|
||||||
CheckIncreaseSkill(EQEmu::skills::SkillBindWound, nullptr, 5);
|
CheckIncreaseSkill(EQEmu::skills::SkillBindWound, nullptr, 5);
|
||||||
|
|
||||||
|
if (RuleB(Character, UseOldBindWound)) {
|
||||||
int maxHPBonus = spellbonuses.MaxBindWound + itembonuses.MaxBindWound +
|
int maxHPBonus = spellbonuses.MaxBindWound + itembonuses.MaxBindWound +
|
||||||
aabonuses.MaxBindWound;
|
aabonuses.MaxBindWound;
|
||||||
|
|
||||||
int max_percent = 50 + 10 * maxHPBonus;
|
int max_percent = 50 + maxHPBonus;
|
||||||
|
|
||||||
if (GetClass() == MONK && GetSkill(EQEmu::skills::SkillBindWound) > 200) {
|
if (GetClass() == MONK && GetSkill(EQEmu::skills::SkillBindWound) > 200) {
|
||||||
max_percent = 70 + 10 * maxHPBonus;
|
max_percent = 70 + maxHPBonus;
|
||||||
}
|
}
|
||||||
|
|
||||||
max_percent = mod_bindwound_percent(max_percent, bindmob);
|
max_percent = mod_bindwound_percent(max_percent, bindmob);
|
||||||
@@ -2697,7 +2698,8 @@ bool Client::BindWound(Mob *bindmob, bool start, bool fail)
|
|||||||
|
|
||||||
bindmob->SetHP(chp);
|
bindmob->SetHP(chp);
|
||||||
bindmob->SendHPUpdate();
|
bindmob->SendHPUpdate();
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
// I dont have the real, live
|
// I dont have the real, live
|
||||||
Message(15, "You cannot bind wounds above %d%% hitpoints.",
|
Message(15, "You cannot bind wounds above %d%% hitpoints.",
|
||||||
max_percent);
|
max_percent);
|
||||||
@@ -2708,7 +2710,65 @@ bool Client::BindWound(Mob *bindmob, bool start, bool fail)
|
|||||||
max_percent);
|
max_percent);
|
||||||
// Too many hp message goes here.
|
// Too many hp message goes here.
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
|
int percent_base = 50;
|
||||||
|
if (GetRawSkill(EQEmu::skills::SkillBindWound) > 200) {
|
||||||
|
if ((GetClass() == MONK) || (GetClass() == BEASTLORD))
|
||||||
|
percent_base = 70;
|
||||||
|
else if ((GetLevel() > 50) && ((GetClass() == WARRIOR) || (GetClass() == ROGUE) || (GetClass() == CLERIC)))
|
||||||
|
percent_base = 70;
|
||||||
|
}
|
||||||
|
|
||||||
|
int percent_bonus = 0;
|
||||||
|
if (percent_base >= 70)
|
||||||
|
percent_bonus = spellbonuses.MaxBindWound + itembonuses.MaxBindWound + aabonuses.MaxBindWound;
|
||||||
|
|
||||||
|
int max_percent = percent_base + percent_bonus;
|
||||||
|
if (max_percent < 0)
|
||||||
|
max_percent = 0;
|
||||||
|
if (max_percent > 100)
|
||||||
|
max_percent = 100;
|
||||||
|
|
||||||
|
max_percent = mod_bindwound_percent(max_percent, bindmob);
|
||||||
|
|
||||||
|
int max_hp = (bindmob->GetMaxHP() * max_percent) / 100;
|
||||||
|
if (max_hp > bindmob->GetMaxHP())
|
||||||
|
max_hp = bindmob->GetMaxHP();
|
||||||
|
|
||||||
|
if (bindmob->GetHP() < bindmob->GetMaxHP() && bindmob->GetHP() < max_hp) {
|
||||||
|
int bindhps = 3; // base bind hp
|
||||||
|
if (percent_base >= 70)
|
||||||
|
bindhps = (GetSkill(EQEmu::skills::SkillBindWound) * 4) / 10; // 8:5 skill-to-hp ratio
|
||||||
|
else if (GetSkill(EQEmu::skills::SkillBindWound) >= 12)
|
||||||
|
bindhps = GetSkill(EQEmu::skills::SkillBindWound) / 4; // 4:1 skill-to-hp ratio
|
||||||
|
|
||||||
|
int bonus_hp_percent = 0;
|
||||||
|
if (percent_base >= 70)
|
||||||
|
bonus_hp_percent = spellbonuses.BindWound + itembonuses.BindWound + aabonuses.BindWound;
|
||||||
|
|
||||||
|
bindhps += (bindhps * bonus_hp_percent) / 100;
|
||||||
|
|
||||||
|
if (bindhps < 3)
|
||||||
|
bindhps = 3;
|
||||||
|
|
||||||
|
bindhps = mod_bindwound_hp(bindhps, bindmob);
|
||||||
|
|
||||||
|
bindhps += bindmob->GetHP();
|
||||||
|
if (bindhps > max_hp)
|
||||||
|
bindhps = max_hp;
|
||||||
|
|
||||||
|
bindmob->SetHP(bindhps);
|
||||||
|
bindmob->SendHPUpdate();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Message(15, "You cannot bind wounds above %d%% hitpoints", max_percent);
|
||||||
|
if (bindmob != this && bindmob->IsClient())
|
||||||
|
bindmob->CastToClient()->Message(15, "You cannot have your wounds bound above %d%% hitpoints", max_percent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
// Send client bind failed
|
// Send client bind failed
|
||||||
if (bindmob != this)
|
if (bindmob != this)
|
||||||
bind_out->type = 6; // They moved
|
bind_out->type = 6; // They moved
|
||||||
|
|||||||
Reference in New Issue
Block a user