public static bool CanAttackerBeDealtLeathalDamage(AttackerEvaluationParameters p) { var attackerEvaluation = new AttackerEvaluation(p); var results = attackerEvaluation.Evaluate(); return(results.ReceivesLeathalDamage); }
public static Card GetBlockerThatDealsLeathalDamageToAttacker(Card attacker, IEnumerable <Card> blockers) { var p = new AttackerEvaluationParameters(attacker, blockers); var performance = new AttackerEvaluation(p); var results = performance.Evaluate(); return(results.LeathalBlocker); }
public static int GetAmountOfDamageThatNeedsToBePreventedToSafeAttackerFromDying(Card attacker, IEnumerable <Card> blockers) { var p = new AttackerEvaluationParameters(attacker, blockers); var results = new AttackerEvaluation(p).Evaluate(); if (!results.ReceivesLeathalDamage) { return(0); } if (results.DeathTouchDamage > 0) { return(results.DeathTouchDamage); } var prevented = results.TotalDamage - attacker.Life + 1; return(prevented); }
public static int GetAmountOfDamageThatWillBeDealtToAttacker(AttackerEvaluationParameters p) { var results = new AttackerEvaluation(p).Evaluate(); return(results.TotalDamage); }
public static Card GetBlockerThatDealsLeathalDamageToAttacker(Card attacker, IEnumerable<Card> blockers) { var p = new AttackerEvaluationParameters(attacker, blockers); var performance = new AttackerEvaluation(p); var results = performance.Evaluate(); return results.LeathalBlocker; }
public static int GetAmountOfDamageThatWillBeDealtToAttacker(AttackerEvaluationParameters p) { var results = new AttackerEvaluation(p).Evaluate(); return results.TotalDamage; }
public static int GetAmountOfDamageThatNeedsToBePreventedToSafeAttackerFromDying(Card attacker, IEnumerable<Card> blockers) { var p = new AttackerEvaluationParameters(attacker, blockers); var results = new AttackerEvaluation(p).Evaluate(); if (!results.ReceivesLeathalDamage) return 0; if (results.DeathTouchDamage > 0) return results.DeathTouchDamage; var prevented = results.TotalDamage - attacker.Life + 1; return prevented; }
public static bool CanAttackerBeDealtLeathalDamage(AttackerEvaluationParameters p) { var attackerEvaluation = new AttackerEvaluation(p); var results = attackerEvaluation.Evaluate(); return results.ReceivesLeathalDamage; }