Example #1
0
        public void MinionTakeDamage(IMinion minion, int damage)
        {
            var damageResult = minion.TakeDamage(damage);

            if (damageResult.tookDamage)
            {
                minion.OnDamage(new TriggerParams()
                {
                    Activator = minion, Board = this, Damage = damage
                });
                OnMinionTookDamage(minion);
            }

            if (damageResult.lostDivine)
            {
                OnMinionLostDivineShield(minion);
            }
        }
Example #2
0
        public (bool tookDamage, bool lostDivine, bool overkill, bool killed) MinionTakeDamage(IMinion minion, int damage)
        {
            var damageResult = minion.TakeDamage(damage);

            if (damageResult.tookDamage)
            {
                minion.OnDamage(new TriggerParams()
                {
                    Activator = minion, Board = this, Damage = damage
                });
                OnMinionTookDamage(minion);
            }

            if (damageResult.lostDivine)
            {
                OnMinionLostDivineShield(minion);
            }

            return(damageResult);
        }