Represents a minion at the most basic level
Inheritance: BaseCard, IAttacker, IDamageableEntity
Esempio n. 1
0
        public static void OnMinionPlayed(BaseMinion minionPlayed)
        {
            // If a tree falls in a forest without any one listening...
            if (!_minionPlayedListeners.Any()) return;

            // Listeners for this are called in the order in which they were played on the board
            var sortedListeners = _minionPlayedListeners.OrderBy(kvp => kvp.Item1.TimePlayed).ToList();
            foreach (var handler in sortedListeners.Select(kvp => kvp.Item2))
            {
                handler(minionPlayed);
            }
        }
Esempio n. 2
0
 /// <summary>
 /// Removes all deathrattles registered by the source card.
 /// </summary>
 /// <param name="source">The triggering card</param>
 public static void UnregisterDeathrattle(BaseMinion source)
 {
     GameEngine.Deathrattles.Remove(source);
 }
Esempio n. 3
0
        public static void OnMinionPlaced(BaseMinion minionPlaced)
        {
            if (!_minionPlacedListeners.Any()) return;

            // Listeners for this are called in the order in which they are played on the baord
            var sortedListeners = _minionPlacedListeners.OrderBy(kvp => kvp.Item1.TimePlayed).ToList();
            foreach (var handler in sortedListeners.Select(kvp => kvp.Item2))
            {
                handler(minionPlaced);
            }
        }