public CreatureState GetState(Masterplan.Data.CombatData data) { int hP = this.fCard.HP; int num = hP / 2; int damage = hP - data.Damage; if (damage <= 0) { return(CreatureState.Defeated); } if (damage <= num) { return(CreatureState.Bloodied); } return(CreatureState.Active); }
public Masterplan.Data.CombatData FindCombatData(Point location) { Masterplan.Data.CombatData combatDatum; List <Masterplan.Data.CombatData> .Enumerator enumerator = this.fCombatData.GetEnumerator(); try { while (enumerator.MoveNext()) { Masterplan.Data.CombatData current = enumerator.Current; if (current.Location != location) { continue; } combatDatum = current; return(combatDatum); } return(null); } finally { ((IDisposable)enumerator).Dispose(); } }