[Rules] Mend/Sneak allow success tuning (#4390)

MendAlwaysSucceedValue allows you to adjust skill at which mend will always succeed its check.

SneakAlwaysSucceedOver100 allows sneak to always succeed when over skill 100 (Higher skill increases the movement speed).
This commit is contained in:
Fryguy
2024-06-14 12:57:31 -04:00
committed by GitHub
parent 55a7e1646d
commit 4478328b2a
2 changed files with 11 additions and 3 deletions
+9 -3
View File
@@ -10434,7 +10434,7 @@ void Client::Handle_OP_Mend(const EQApplicationPacket *app)
int mendhp = GetMaxHP() / 4;
int currenthp = GetHP();
if (zone->random.Int(0, 199) < (int)GetSkill(EQ::skills::SkillMend)) {
if (zone->random.Int(0, RuleI(Character, MendAlwaysSucceedValue)) < (int)GetSkill(EQ::skills::SkillMend)) {
int criticalchance = spellbonuses.CriticalMend + itembonuses.CriticalMend + aabonuses.CriticalMend;
@@ -14644,12 +14644,18 @@ void Client::Handle_OP_Sneak(const EQApplicationPacket *app)
sa_out->parameter = 0;
entity_list.QueueClients(this, outapp, true);
safe_delete(outapp);
}
else {
} else {
CheckIncreaseSkill(EQ::skills::SkillSneak, nullptr, 5);
}
float hidechance = ((GetSkill(EQ::skills::SkillSneak) / 300.0f) + .25) * 100;
if (RuleB(Character, SneakAlwaysSucceedOver100)) {
hidechance = std::max(10, (int)GetSkill(EQ::skills::SkillSneak));
}
float random = zone->random.Real(0, 99);
if (!was && random < hidechance) {
sneaking = true;
}