mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-15 01:24:45 +02:00
cast without skip
This commit is contained in:
@ -330,6 +330,7 @@ CUnitState::CUnitState():
|
||||
drainedMana(false),
|
||||
fear(false),
|
||||
hadMorale(false),
|
||||
usedSpell(SpellID::NONE),
|
||||
ghost(false),
|
||||
ghostPending(false),
|
||||
movedThisRound(false),
|
||||
@ -362,6 +363,7 @@ CUnitState & CUnitState::operator=(const CUnitState & other)
|
||||
drainedMana = other.drainedMana;
|
||||
fear = other.fear;
|
||||
hadMorale = other.hadMorale;
|
||||
usedSpell = other.usedSpell;
|
||||
ghost = other.ghost;
|
||||
ghostPending = other.ghostPending;
|
||||
movedThisRound = other.movedThisRound;
|
||||
@ -532,7 +534,7 @@ bool CUnitState::hasClone() const
|
||||
|
||||
bool CUnitState::canCast() const
|
||||
{
|
||||
return casts.canUse(1);//do not check specific cast abilities here
|
||||
return casts.canUse(1) && usedSpell == SpellID::NONE;//do not check specific cast abilities here
|
||||
}
|
||||
|
||||
bool CUnitState::isCaster() const
|
||||
@ -748,6 +750,7 @@ void CUnitState::serializeJson(JsonSerializeFormat & handler)
|
||||
handler.serializeBool("drainedMana", drainedMana);
|
||||
handler.serializeBool("fear", fear);
|
||||
handler.serializeBool("hadMorale", hadMorale);
|
||||
handler.serializeInt("usedSpell", usedSpell);
|
||||
handler.serializeBool("ghost", ghost);
|
||||
handler.serializeBool("ghostPending", ghostPending);
|
||||
handler.serializeBool("moved", movedThisRound);
|
||||
@ -782,6 +785,7 @@ void CUnitState::reset()
|
||||
drainedMana = false;
|
||||
fear = false;
|
||||
hadMorale = false;
|
||||
usedSpell = SpellID::NONE;
|
||||
ghost = false;
|
||||
ghostPending = false;
|
||||
movedThisRound = false;
|
||||
@ -864,6 +868,7 @@ void CUnitState::afterNewRound()
|
||||
waitedThisTurn = false;
|
||||
movedThisRound = false;
|
||||
hadMorale = false;
|
||||
usedSpell = SpellID::NONE;
|
||||
fear = false;
|
||||
drainedMana = false;
|
||||
counterAttacks.reset();
|
||||
|
Reference in New Issue
Block a user