public void DecreasePanic(Tile.Places position) //decreases the panic level of the specified tile { foreach (Tile tile in Tiles) { if (tile.Name == position) { switch (tile.panic) { case Tile.Panic.Level_3: tile.panic = Tile.Panic.Level_2; break; case Tile.Panic.Level_2: tile.panic = Tile.Panic.Level_1; break; case Tile.Panic.Level_1: tile.panic = Tile.Panic.Level_0; break; default: break; } return; } } }
public void PlaceWeapon(Tile.Places place, Weapon weapon) //Places a weapon at a specified tile { foreach (var tile in Tiles) { if (tile.Name == place) { tile.PlacedWeapons.Add(weapon); } } }
public bool CanAttack(Tile.Places _tile, List<Tile.Places> tiles) // outdated ranging method Use GameActions.Target() instead { bool result = false; foreach (var tile in tiles) { if (tile.ToString() == _tile.ToString()) result = true; } if (Position == _tile) result = true; return result; }
public Tile.Panic GetPanic(Tile.Places position) //returns the panic level of the specified tile { Tile.Panic result; foreach (Tile tile in Tiles) { if (tile.Name == position) { result = tile.panic; return(result); } } throw new Exception(); }
public List <Tile.Places> GetAdjacentTiles(Tile.Places position) //returns a list of adjacent tiles to the selected tile { List <Tile.Places> result; foreach (Tile tile in Tiles) { if (tile.Name == position) { result = tile.AdjacentPaths; return(result); } } throw new Exception(); }
public bool springTrap(Tile.Places place, Monster monster, List <Monster> monsters, Board board) { foreach (var tile in Tiles) { if (place == tile.Name) { if (tile.PlacedWeapons.Count > 0) { WeaponAbilities.ActivateTraps(tile.PlacedWeapons, monster, monsters, board); return(true); } } } return(false); }