/// <summary> /// Looks through all equipped weapons to determine all applicable utility ranges (in tiles) /// and returns a unique list of possible ranges. /// </summary> /// <returns></returns> public HashSet <Position> AllUtilityRanges() { HashSet <Position> retList = new HashSet <Position>(); HashSet <int> ranges = new HashSet <int>(); foreach (IWeaponItem iw in WeaponList) { if (iw is FEWeapon) { continue; } foreach (int i in iw.Range) { ranges.Add(i); } } foreach (int i in ranges) { foreach (Position p in MapRanges.GetRangesExactly(i)) { retList.Add(p); } } return(retList); }
/// <summary> /// Looks through all equipped weapons to determine all applicable attack ranges (in tiles) /// and returns a unique list of possible ranges. /// </summary> /// <returns></returns> public HashSet <Position> AllAttackRanges() { HashSet <Position> retList = new HashSet <Position>(); foreach (int i in GetWeaponRanges()) { foreach (Position p in MapRanges.GetRangesExactly(i)) { retList.Add(p); } } return(retList); }