mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
Lunar Convocation - fixed game error on usage (miss watcher);
This commit is contained in:
parent
aa72c3a63d
commit
22c207bcd8
3 changed files with 4 additions and 3 deletions
|
|
@ -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
|
||||
//
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ public class Watchers extends HashMap<String, Watcher> {
|
|||
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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue