1
0
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:
Konstantin
2023-03-20 14:02:09 +03:00
parent 6c5f5dba75
commit aab5b47038
23 changed files with 784 additions and 136 deletions

View File

@@ -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;
}