Example #1
0
        public void TestPoisonBuff()
        {
            character.AddBuff(new Poisoned());
            character.ActiveBuffs[0].Trigger <ITurnEndTrigger>();

            Assert.That(character.Stats[Stat.HP] < STARTING_HP);
        }
Example #2
0
        public void TestNotAddingDuplicateBuffs()
        {
            character.AddBuff(new Poisoned());
            character.AddBuff(new Poisoned());

            Assert.AreEqual(1, character.ActiveBuffs.Count);
        }
Example #3
0
        public void TestBuffDecayng()
        {
            var buff = new Poisoned();

            attacker.AddBuff(buff);

            for (var x = 0; x < buff.GetDurationInTurns(); x++)
            {
                Assert.That(attacker.HasBuff(buff));
                battle.DoRound();
            }

            Assert.That(!attacker.HasBuff(buff));
        }
 public override IEnumerator Execute()
 {
     battleCharacter.AddBuff(buff);
     yield break;
 }
Example #5
0
 public void UseAbility(BattleCharacter self, BattleCharacter target)
 {
     self.DealDamageTo(target, 7, DamageType.POISON);
     target.AddBuff(new Poisoned());
 }