Пример #1
0
		public Boolean HasData(HitType hittype)
		{
			if (hittype.Class == AttackClass.None || hittype.Power == AttackPower.None) return false;

			foreach (HitType type in AttackData)
			{
				if (HitType.Match(hittype, type) == true) return true;
			}

			return false;
		}
Пример #2
0
		public static Boolean Match(HitType lhs, HitType rhs)
		{
			if (lhs.Class == AttackClass.None || lhs.Power == AttackPower.None) return false;
			if (rhs.Class == AttackClass.None || rhs.Power == AttackPower.None) return false;

			if (lhs.Class == rhs.Class && lhs.Power == rhs.Power) return true;
			if ((lhs.Class == AttackClass.All || rhs.Class == AttackClass.All) && lhs.Power == rhs.Power) return true;
			if (lhs.Class == rhs.Class && (lhs.Power == AttackPower.All || rhs.Power == AttackPower.All)) return true;

			return false;
		}