using System.Collections.Generic;
namespace Heroes.Battle
{
///
/// Pure-data description of a generated battlefield. Contains no Unity
/// references so it can be produced, serialized or tested without the
/// engine.
///
public sealed class BattlefieldConfig
{
public const int Width = 15;
public const int Height = 11;
/// Default PPU used for the VCMI-style reference layout.
public const int ReferencePixelsPerUnit = 64;
/// Horizontal step between hexes in the same row, in pixels (matches VCMI BattleHex::WIDTH).
public const int HexHorizontalStepPx = 44;
/// Vertical step between rows, in pixels (matches VCMI hex layout; rows overlap by ~10 px).
public const int HexVerticalStepPx = 32;
/// Horizontal shift applied to odd rows, in pixels (half of horizontal step, VCMI convention).
public const int OddRowOffsetPx = 22;
/// Default horizontal distance between hex centers in world units (at ReferencePixelsPerUnit).
public const float HexHorizontalStep = (float)HexHorizontalStepPx / ReferencePixelsPerUnit;
/// Default vertical distance between hex rows in world units (at ReferencePixelsPerUnit).
public const float HexVerticalStep = (float)HexVerticalStepPx / ReferencePixelsPerUnit;
public int Seed;
public TerrainType Terrain;
/// Identifier of the background to use (obstacle DB resolves it to a sprite).
public string BackgroundId;
public readonly List Obstacles = new List();
}
/// Single obstacle placed on the battlefield.
public struct PlacedObstacle
{
/// Identifier of the obstacle definition in the database.
public string ObstacleId;
/// Column of the obstacle anchor hex (0..Width-1).
public int X;
/// Row of the obstacle anchor hex (0..Height-1).
public int Y;
}
}