mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-19 00:17:56 +02:00
[refactor] spell handling
* more config options for spells + mind immunity handled by config + direct damage immunity handled by config + immunity icon configurable - removed mind_spell flag * more use of new spell identifacation
This commit is contained in:
@ -1199,7 +1199,7 @@ DLL_LINKAGE void StartAction::applyGs( CGameState *gs )
|
||||
}
|
||||
else
|
||||
{
|
||||
gs->curB->usedSpellsHistory[ba.side].push_back(VLC->spellh->spells[ba.additionalInfo]);
|
||||
gs->curB->usedSpellsHistory[ba.side].push_back(SpellID(ba.additionalInfo).toSpell());
|
||||
}
|
||||
|
||||
switch(ba.actionType)
|
||||
@ -1240,7 +1240,7 @@ DLL_LINKAGE void BattleSpellCast::applyGs( CGameState *gs )
|
||||
}
|
||||
|
||||
//Handle spells removing effects from stacks
|
||||
const CSpell *spell = VLC->spellh->spells[id];
|
||||
const CSpell *spell = SpellID(id).toSpell();
|
||||
const bool removeAllSpells = id == SpellID::DISPEL;
|
||||
const bool removeHelpful = id == SpellID::DISPEL_HELPFUL_SPELLS;
|
||||
|
||||
|
Reference in New Issue
Block a user