mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
vcmi: setup moats using MoatAbility
Setup moats using moat ability, need playtest for now. -3 to defence not added for now.
This commit is contained in:
@@ -162,6 +162,7 @@ void SpellCreatedObstacle::serializeJson(JsonSerializeFormat & handler)
|
||||
handler.serializeInt("spellLevel", spellLevel);
|
||||
handler.serializeInt("casterSide", casterSide);
|
||||
handler.serializeInt("minimalDamage", minimalDamage);
|
||||
handler.serializeInt("type", obstacleType);
|
||||
|
||||
handler.serializeBool("hidden", hidden);
|
||||
handler.serializeBool("revealed", revealed);
|
||||
@@ -201,7 +202,7 @@ int SpellCreatedObstacle::getAnimationYOffset(int imageHeight) const
|
||||
{
|
||||
int offset = imageHeight % 42;
|
||||
|
||||
if(obstacleType == CObstacleInstance::SPELL_CREATED)
|
||||
if(obstacleType == CObstacleInstance::SPELL_CREATED || obstacleType == CObstacleInstance::MOAT)
|
||||
{
|
||||
offset += animationYOffset;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user