Пример #1
0
		public bool SpellPassesRules(Spell spell)
		{
			if (CantripsToLookFor.Count == 0)
				return true;

			foreach (Spell cantrip in CantripsToLookFor)
			{
				if (spell.IsSameOrSurpasses(cantrip))
					return true;
			}

			return false;
		}
Пример #2
0
		public bool IsSameOrSurpasses(Spell compareSpell)
		{
			return (this == compareSpell || Surpasses(compareSpell));
		}
Пример #3
0
		public bool Surpasses(Spell compareSpell)
		{
			if (Family == 0 || Family != compareSpell.Family)
				return false;

			if (BuffLevel > 0 && compareSpell.BuffLevel > 0 && BuffLevel > compareSpell.BuffLevel)
				return true;

			if (CantripLevel > 0 && compareSpell.CantripLevel > 0 && CantripLevel > compareSpell.CantripLevel)
				return true;

			return false;
		}
Пример #4
0
		public bool IsOfSameFamilyAndGroup(Spell compareSpell)
		{
			if (Family != compareSpell.Family)
				return false;

			if (BuffLevel != 0 && compareSpell.BuffLevel != 0)
				return true;

			if (CantripLevel != 0 && compareSpell.CantripLevel != 0)
				return true;

			// Are both spells are of an unkown group?
			if (BuffLevel == 0 && compareSpell.BuffLevel == 0 && CantripLevel == 0 && compareSpell.CantripLevel == 0)
				return true;

			return false;
		}