[Spells] Update to how Bard Instrument mods are applied to spell effects (#1628)

* new instrument mod spell effect checks

PR split

* format

* Update spdat.cpp

correction, all direct damage spells get modifiers. Made a mistake with the parse, was using wrong mod.

* restriction changes

cure effects can be modified.
decided to keep a list of known effects that are not modified to return false. and will keep the default to be true for anything as to not inhibit custom bard song development

* SE_ProcChance is modified

* Update spdat.cpp

* update

* Update spell_effects.cpp
This commit is contained in:
KayenEQ
2021-10-24 17:07:25 -04:00
committed by GitHub
parent c98f3cfb4c
commit 0b18671e91
3 changed files with 97 additions and 10 deletions
+93
View File
@@ -1366,6 +1366,99 @@ bool SpellRequiresTarget(int spell_id)
return true;
}
bool IsInstrumentModAppliedToSpellEffect(int32 spell_id, int effect)
{
//Effects that are verified modifiable by bard instrument/singing mods, or highly likely due to similiar type of effect.
switch (effect) {
//Only modify instant endurance or mana effects (Ie. Mana drain, Crescendo line)
case SE_CurrentEndurance:
case SE_CurrentMana: {
if (spells[spell_id].buffduration == 0) {
return true;
}
//Mana regen is not modified.
return false;
}
case SE_CurrentHP:
case SE_ArmorClass:
case SE_ACv2:
case SE_MovementSpeed:
case SE_ATK:
case SE_STR:
case SE_DEX:
case SE_AGI:
case SE_STA:
case SE_INT:
case SE_WIS:
case SE_CHA:
case SE_AllStats:
case SE_ResistFire:
case SE_ResistCold:
case SE_ResistPoison:
case SE_ResistDisease:
case SE_ResistMagic:
case SE_ResistAll:
case SE_ResistCorruption:
case SE_Rune:
case SE_AbsorbMagicAtt:
case SE_DamageShield:
case SE_MitigateDamageShield:
case SE_Amplification: //On live Amplification is modified by singing mods, including itself.
case SE_TripleAttackChance:
case SE_Flurry:
case SE_DamageModifier:
case SE_DamageModifier2:
case SE_MinDamageModifier:
case SE_ProcChance:
case SE_PetFlurry: // ? Need verified
case SE_DiseaseCounter:
case SE_PoisonCounter:
case SE_CurseCounter:
case SE_CorruptionCounter:
return true;
/*
Following are confirmed NOT modifiable by instrument/singing mods.
Focus Effects, Proc Effects, Spell Triggers are not modified but handled elsewhere, not neccessary to checked here.
*/
case SE_AttackSpeed: //(Haste AND Slow not modifiable)
case SE_AttackSpeed2:
case SE_AttackSpeed3:
case SE_Lull:
case SE_ChangeFrenzyRad:
case SE_Harmony:
case SE_AddFaction:
//case SE_CurrentMana: // duration only
case SE_ManaRegen_v2:
//case SE_CurrentEndurance: // duration only
case SE_PersistentEffect:
case SE_ReduceReuseTimer:
case SE_Stun:
case SE_Mez:
case SE_WipeHateList: //?
case SE_CancelMagic:
case SE_ManaAbsorbPercentDamage:
case SE_ResistSpellChance:
case SE_Reflect:
case SE_MitigateSpellDamage:
case SE_MitigateMeleeDamage:
case SE_AllInstrumentMod:
case SE_AddSingingMod:
case SE_SongModCap:
case SE_BardSongRange:
case SE_TemporaryPets:
case SE_SpellOnDeath:
return false;
default:
return true;
}
//Allowing anything not confirmed to be restricted / allowed to receive modifiers, as to not inhbit anyone making custom bard songs.
}
int GetSpellStatValue(uint32 spell_id, const char* stat_identifier, uint8 slot)
{
if (!IsValidSpell(spell_id))