public HashSet <Tile> GetAvailableTargets(Tile tile) { HashSet <Tile> ret = new HashSet <Tile>(RangeAndMelee.StaticGetTiles(tile)); ret.UnionWith(IncreasedRange.StaticGetTiles(tile)); return(ret); }
public HashSet <Tile> GetAvailableTargets(Tile tile) { Unit host = GetComponent <Unit>(); HashSet <Tile> retVal = new HashSet <Tile>(); if (host == null) { Debug.LogError("host not found for Cure"); } else { foreach (Tile t in Melee.StaticGetTiles(tile)) { if (t.isOccuppied && !host.isHostile(t.Unit)) { retVal.Add(t); } } foreach (Tile t in IncreasedRange.StaticGetTiles(tile)) { if (t.isOccuppied && !host.isHostile(t.Unit)) { retVal.Add(t); } } } return(retVal); }
public HashSet <Tile> GetAvailableTargets(Tile tile) { HashSet <Tile> h = new HashSet <Tile>(Melee.StaticGetTiles(tile)); h.UnionWith(IncreasedRange.StaticGetTiles(tile)); return(h); }
public HashSet <Tile> GetAvailableTargets() { Tile t = GetComponent <Unit>().Tile; HashSet <Tile> ret = new HashSet <Tile>(RangeAndMelee.StaticGetTiles(t)); ret.UnionWith(IncreasedRange.StaticGetTiles(t)); return(ret); }
public float judgeAbility(Unit user, Tile move, out Tile target) { target = null; float value = 50; HashSet <Unit> enemyUnits = UnitManager.Instance.GetUnitsByHostility(user); foreach (Unit u in enemyUnits) { if (IncreasedRange.StaticGetTiles(u.Tile).Contains(move)) { value += 3; } } return(value); }
public HashSet <Tile> GetAvailableTargets(Tile tile) { return(new HashSet <Tile>(IncreasedRange.StaticGetTiles(tile))); }
public HashSet <Tile> GetAvailableTargets() { Tile t = GetComponent <Unit>().Tile; return(new HashSet <Tile>(IncreasedRange.StaticGetTiles(t))); }