Ejemplo n.º 1
0
        public void DamageDoesntChangeHealth(int damage, Weapon source)
        {
            var ameer = new Ameer();

            ameer.Damage(damage, source);
            Assert.That(ameer.CurrentHealth, Is.EqualTo(ameer.TotalHealth));
        }
Ejemplo n.º 2
0
        public void DamageStunsIfSourceIsZapper()
        {
            var ameer = new Ameer();

            ameer.Damage(0, Weapon.Zapper);
            Assert.That(ameer.IsStunned);
            Assert.That(ameer.turnsLeftStunned, Is.GreaterThan(0));
        }
Ejemplo n.º 3
0
        public void AmeerDiesIfTouchedByQuantumPlasma(int damage)
        {
            object whoDied = null;

            EventBus.Instance.AddListener(GameEvent.EntityDeath, (data) => whoDied = data);
            var ameer = new Ameer();

            ameer.Damage(damage, Weapon.QuantumPlasma);

            Assert.That(ameer.CurrentHealth, Is.LessThanOrEqualTo(0));
            Assert.That(whoDied, Is.EqualTo(ameer));
        }