public Tile(int map, int x, int y, int owner, Terrain ter, Construction con, City city, Army arm) { MapID = map; this.TileX = x; this.TileY = y; Terrain = ter; //foliage = fol; Construction = con; this.City = city; Army = arm; PlayerID = owner; }
public void Attack(Army target) { foreach (Unit a in Unit) { foreach (Unit t in target.Unit) { if (a.UnitRanged) { if (target.ArmyBacklineProtected && t.UnitPosition == 2) a.Rattack(t); else if (t.UnitPosition == 1) a.Rattack(t); } else { if (target.ArmyBacklineProtected && t.UnitPosition == 2) a.attack(t); else if (t.UnitPosition == 1) a.attack(t); } } } }