From 22c207bcd850a53ca58925c4babad1301ef05b63 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Mon, 9 Sep 2024 06:43:24 +0400 Subject: [PATCH] Lunar Convocation - fixed game error on usage (miss watcher); --- .../Mage.Player.Human/src/mage/player/human/HumanPlayer.java | 4 ++-- Mage.Sets/src/mage/cards/l/LunarConvocation.java | 1 + Mage/src/main/java/mage/watchers/Watchers.java | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java b/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java index 54bfae64d49..25a7d7540fe 100644 --- a/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java +++ b/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java @@ -68,13 +68,13 @@ public class HumanPlayer extends PlayerImpl { private static final boolean ALLOW_USERS_TO_PUT_NON_PLAYABLE_SPELLS_ON_STACK_WORKAROUND = false; // warning, see workaround's info on usage - // TODO: all user feedback actions executed and waited in diff threads and can't catch exeptions, e.g. on wrong code usage + // TODO: all user feedback actions executed and waited in diff threads and can't catch exceptions, e.g. on wrong code usage // must catch and log such errors // Network and threads logic: // * starting point: ThreadExecutorImpl.java // * server executing a game's code by single game thread (named: "GAME xxx", one thread per game) - // * data transfering goes by inner jboss threads (named: "WorkerThread xxx", one thread per client connection) + // * data transferring goes by inner jboss threads (named: "WorkerThread xxx", one thread per client connection) // - from server to client: sync mode, a single game thread uses jboss networking to send data to each player and viewer/watcher one by one // - from client to server: async mode, each income command executes by shared call thread // diff --git a/Mage.Sets/src/mage/cards/l/LunarConvocation.java b/Mage.Sets/src/mage/cards/l/LunarConvocation.java index 40e36bc073e..f0133974330 100644 --- a/Mage.Sets/src/mage/cards/l/LunarConvocation.java +++ b/Mage.Sets/src/mage/cards/l/LunarConvocation.java @@ -45,6 +45,7 @@ public final class LunarConvocation extends CardImpl { new DrawCardSourceControllerEffect(1), new ManaCostsImpl<>("{1}{B}") ); ability.addCost(new PayLifeCost(2)); + ability.addWatcher(new PlayerGainedLifeWatcher()); this.addAbility(ability); } diff --git a/Mage/src/main/java/mage/watchers/Watchers.java b/Mage/src/main/java/mage/watchers/Watchers.java index 0e842186486..c907997f335 100644 --- a/Mage/src/main/java/mage/watchers/Watchers.java +++ b/Mage/src/main/java/mage/watchers/Watchers.java @@ -47,7 +47,7 @@ public class Watchers extends HashMap { if (containsKey(key)) { return super.get(key); } - // can't add game exeption here because it's an easy way to ruin any game with bugged card + // can't add game exception here because it's an easy way to ruin any game with bugged card logger.error(key + " not found in watchers", new Throwable()); return null; }