コード例 #1
0
        public static bool CanBlockerBeDealtLeathalCombatDamage(BlockerEvaluationParameters p)
        {
            var blockerEvaluation = new BlockerEvaluation(p);
            var results           = blockerEvaluation.Evaluate();

            return(results.ReceivesLeathalDamage);
        }
コード例 #2
0
        public static int CalculateGainBlockerWouldGetIfPowerAndThougnessWouldIncrease(Card attacker,
                                                                                       Card blocker, int powerIncrease, int toughnessIncrease)
        {
            if (attacker == null)
            {
                return(0);
            }

            var p = new BlockerEvaluationParameters
            {
                Attacker = attacker,
                Blocker  = blocker,
            };

            var canBeDealtLeathalDamageWithoutBoost = CanBlockerBeDealtLeathalCombatDamage(p);

            if (canBeDealtLeathalDamageWithoutBoost == false)
            {
                return(0);
            }

            p.BlockerPowerIncrease     += powerIncrease;
            p.BlockerToughnessIncrease += toughnessIncrease;

            var canBeDealtLeathalDamageWithBoost = CanBlockerBeDealtLeathalCombatDamage(p);

            return(canBeDealtLeathalDamageWithBoost == false ? blocker.Score : 1);
        }
コード例 #3
0
ファイル: QuickCombat.cs プロジェクト: leloulight/magicgrove
        public static int CalculateGainBlockerWouldGetIfPowerAndThougnessWouldIncrease(Card attacker,
      Card blocker, int powerIncrease, int toughnessIncrease)
        {
            if (attacker == null)
            return 0;

              var p = new BlockerEvaluationParameters
            {
              Attacker = attacker,
              Blocker = blocker,
            };

              var canBeDealtLeathalDamageWithoutBoost = CanBlockerBeDealtLeathalCombatDamage(p);

              if (canBeDealtLeathalDamageWithoutBoost == false)
            return 0;

              p.BlockerPowerIncrease += powerIncrease;
              p.BlockerToughnessIncrease += toughnessIncrease;

              var canBeDealtLeathalDamageWithBoost = CanBlockerBeDealtLeathalCombatDamage(p);
              return canBeDealtLeathalDamageWithBoost == false ? blocker.Score : 1;
        }
コード例 #4
0
ファイル: QuickCombat.cs プロジェクト: leloulight/magicgrove
        public static bool CanBlockerBeDealtLeathalCombatDamage(BlockerEvaluationParameters p)
        {
            var blockerEvaluation = new BlockerEvaluation(p);
              var results = blockerEvaluation.Evaluate();

              return results.ReceivesLeathalDamage;
        }