Beispiel #1
0
        public void TestWaterSpellCardAgainstKnights()
        {
            SpellCard   spell   = new SpellCard(ElementType.Water);
            MonsterCard monster = new Knight();

            Assert.IsTrue(spell.Attack(monster));
        }
Beispiel #2
0
        public void TestNoEffectivenessSpellCardsFight()
        {
            //  rules:
            //  water -> fire
            //  fire -> normal
            //  normal -> water

            for (int i = 0; i < 10000; i++)
            {
                {
                    Card attacker = new SpellCard(ElementType.Normal);
                    Card defender = new SpellCard(ElementType.Normal);
                    Assert.AreEqual(attacker.Attack(defender), attacker.Damage > defender.Damage);
                }

                {
                    Card attacker = new SpellCard(ElementType.Water);
                    Card defender = new SpellCard(ElementType.Water);
                    Assert.AreEqual(attacker.Attack(defender), attacker.Damage > defender.Damage);
                }


                {
                    Card attacker = new SpellCard(ElementType.Fire);
                    Card defender = new SpellCard(ElementType.Fire);
                    Assert.AreEqual(attacker.Attack(defender), attacker.Damage > defender.Damage);
                }
            }
        }
Beispiel #3
0
        public void TestKnightVsWaterSpellCard()
        {
            // The armor of Knights is so heavy that WaterSpells make them drown them
            //instantly. => water spell card always wins

            Card dragon = new Knight();
            Card water  = new SpellCard(ElementType.Water);

            Assert.IsTrue(water.Attack(dragon));
            Assert.IsFalse(dragon.Attack(water));
        }
Beispiel #4
0
        public void TestKrakenVsSpells()
        {
            // The Kraken is immune against spells. => kraken wins against all spells
            Card kraken = new Kraken();

            Card water  = new SpellCard(ElementType.Water);
            Card normal = new SpellCard(ElementType.Normal);
            Card fire   = new SpellCard(ElementType.Fire);

            Assert.IsTrue(kraken.Attack(water));
            Assert.IsTrue(kraken.Attack(normal));
            Assert.IsTrue(kraken.Attack(fire));

            Assert.IsFalse(water.Attack(kraken));
            Assert.IsFalse(normal.Attack(kraken));
            Assert.IsFalse(fire.Attack(kraken));
        }
Beispiel #5
0
        public void TestSpellCardAgainstKraken()
        {
            MonsterCard monster = new Kraken();

            {
                Card spell = new SpellCard(ElementType.Fire);
                Assert.IsFalse(spell.Attack(monster));
            }

            {
                Card spell = new SpellCard(ElementType.Water);
                Assert.IsFalse(spell.Attack(monster));
            }

            {
                Card spell = new SpellCard(ElementType.Normal);
                Assert.IsFalse(spell.Attack(monster));
            }
        }