mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-17 00:07:41 +02:00
Cumulative spell effects
* Added experimental support for cumulative effects for ENCHANTED bonus * Updated and fixed SPECIAL_PECULIAR_ENCHANT processing * Initial implementation of cumulative spell effects. * Scheme for new spell feature - cumulative bonus.
This commit is contained in:
committed by
Arseniy Shestakov
parent
0c7eeeaa5c
commit
0f5202689e
@ -104,21 +104,6 @@ si32 CStack::magicResistance() const
|
||||
return magicResistance;
|
||||
}
|
||||
|
||||
void CStack::stackEffectToFeature(std::vector<Bonus> & sf, const Bonus & sse)
|
||||
{
|
||||
const CSpell * sp = SpellID(sse.sid).toSpell();
|
||||
|
||||
std::vector<Bonus> tmp;
|
||||
sp->getEffects(tmp, sse.val);
|
||||
|
||||
for(Bonus& b : tmp)
|
||||
{
|
||||
if(b.turnsRemain == 0)
|
||||
b.turnsRemain = sse.turnsRemain;
|
||||
sf.push_back(b);
|
||||
}
|
||||
}
|
||||
|
||||
bool CStack::willMove(int turn /*= 0*/) const
|
||||
{
|
||||
return ( turn ? true : !vstd::contains(state, EBattleStackState::DEFENDING) )
|
||||
|
Reference in New Issue
Block a user