Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Mods] Added Hastev3Cap #1506

Merged
merged 2 commits into from
Sep 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions common/ruletypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ RULE_INT(Character, ItemDSMitigationCap, 50, "Limit on damageshield mitigation g
RULE_INT(Character, ItemEnduranceRegenCap, 15, "Limit on endurance regeneration granted by items")
RULE_INT(Character, ItemExtraDmgCap, 150, "Cap for bonuses to melee skills like Bash, Frenzy, etc.")
RULE_INT(Character, HasteCap, 100, "Haste cap for non-v3(over haste) haste")
RULE_INT(Character, Hastev3Cap, 25, "Haste cap for v3(over haste) haste")
RULE_INT(Character, SkillUpModifier, 100, "The probability for a skill-up is multiplied by value/100")
RULE_BOOL(Character, SharedBankPlat, false, "Shared bank platinum. Off by default to prevent duplication")
RULE_BOOL(Character, BindAnywhere, false, "Allows players to bind their soul anywhere in the world")
Expand Down
7 changes: 6 additions & 1 deletion zone/client_mods.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1054,7 +1054,12 @@ int Client::CalcHaste()
}
// 51+ 25 (despite there being higher spells...), 1-50 10
if (level > 50) { // 51+
h += spellbonuses.hastetype3 > 25 ? 25 : spellbonuses.hastetype3;
cap = RuleI(Character, Hastev3Cap);
if (spellbonuses.hastetype3 > cap) {
h += cap;
} else {
h += spellbonuses.hastetype3;
}
}
else { // 1-50
h += spellbonuses.hastetype3 > 10 ? 10 : spellbonuses.hastetype3;
Expand Down
13 changes: 9 additions & 4 deletions zone/mob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3257,11 +3257,16 @@ int Mob::GetHaste()
h = cap;

// 51+ 25 (despite there being higher spells...), 1-50 10
if (level > 50) // 51+
h += spellbonuses.hastetype3 > 25 ? 25 : spellbonuses.hastetype3;
else // 1-50
if (level > 50) { // 51+
cap = RuleI(Character, Hastev3Cap);
if (spellbonuses.hastetype3 > cap) {
h += cap;
} else {
h += spellbonuses.hastetype3;
}
} else { // 1-50
h += spellbonuses.hastetype3 > 10 ? 10 : spellbonuses.hastetype3;

}
h += ExtraHaste; //GM granted haste.

return 100 + h;
Expand Down