[Rules] ResurrectionEffectBlock to prevent/allow/move buffs. (#3288)

* [Rules] ResurrectionEffectsBlock to prevent/allow/move buffs.

This removes the rule ResurrectionEffectsBlock (Bool) and creates ResurrectionEffectsBlock (Int)

Default = 2

Setting to 0 = Functions as it did before any blocking changes, Focus of Spirit and Strength buffs can overwrite Resurrection Effects.

Setting to 1 = Blocks all buffs that could overwrite Resurrection Effects.

Setting to 2 = Allows all buffs that would overwrite Resurrection Effects to land, however they will be moved to a new buff slot if one is available to allow both the beneficial buff to land and detrimental effects of Resurrection Effects to stay in effect until the duration is expired.

* Update logging

---------

Co-authored-by: Akkadius <akkadius1@gmail.com>
This commit is contained in:
nytmyr
2023-05-08 08:32:21 -05:00
committed by GitHub
parent 434f270f68
commit 93a4153a4b
4 changed files with 60 additions and 11 deletions
+23 -6
View File
@@ -776,6 +776,23 @@ bool IsResurrectionEffects(uint16 spell_id)
return false;
}
int8 GetResurrectionSicknessCheck(uint16 spell_id1, uint16 spell_id2)
{
if (RuleI(Spells, ResurrectionEffectBlock) == RES_EFFECTS_BLOCK) {
LogSpells("[{}] is blocked by [{}]", spells[spell_id2].name, spells[spell_id1].name);
return -1; // can't stack
}
else if (RuleI(Spells, ResurrectionEffectBlock) == RES_EFFECTS_BLOCK_WITH_BUFFS) {
LogSpells(
"[{}] is blocked by [{}], moving to empty slot if available",
spells[spell_id2].name,
spells[spell_id1].name
);
return MOVE_NEW_SLOT; // move to empty slot if available
}
return NO_RES_EFFECTS_BLOCK;
}
bool IsRuneSpell(uint16 spell_id)
{
if (IsValidSpell(spell_id))
@@ -1003,7 +1020,7 @@ bool IsFastHealSpell(uint16 spell_id)
(
spells[spell_id].effect_id[i] == SE_CurrentHP ||
spells[spell_id].effect_id[i] == SE_CurrentHPOnce
) &&
) &&
spells[spell_id].base_value[i] > 0
) {
return true;
@@ -1029,7 +1046,7 @@ bool IsVeryFastHealSpell(uint16 spell_id)
(
spells[spell_id].effect_id[i] == SE_CurrentHP ||
spells[spell_id].effect_id[i] == SE_CurrentHPOnce
) &&
) &&
spells[spell_id].base_value[i] > 0
) {
return true;
@@ -1054,8 +1071,8 @@ bool IsRegularSingleTargetHealSpell(uint16 spell_id)
(
spells[spell_id].effect_id[i] == SE_CurrentHP ||
spells[spell_id].effect_id[i] == SE_CurrentHPOnce
) &&
spells[spell_id].base_value[i] > 0 &&
) &&
spells[spell_id].base_value[i] > 0 &&
spells[spell_id].buff_duration == 0
) {
return true;
@@ -1080,8 +1097,8 @@ bool IsRegularGroupHealSpell(uint16 spell_id)
(
spells[spell_id].effect_id[i] == SE_CurrentHP ||
spells[spell_id].effect_id[i] == SE_CurrentHPOnce
) &&
spells[spell_id].base_value[i] > 0 &&
) &&
spells[spell_id].base_value[i] > 0 &&
spells[spell_id].buff_duration == 0
) {
return true;