mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08:00
* Commander storm abilities - fixed rollback error on card usage in non commander games;
This commit is contained in:
parent
18cca57b44
commit
84ea133ec5
9 changed files with 12 additions and 13 deletions
|
|
@ -44,8 +44,8 @@ public abstract class GameCommanderImpl extends GameImpl {
|
|||
protected void init(UUID choosingPlayerId) {
|
||||
// Karn Liberated calls it to restart game, all data and commanders must be re-initialized
|
||||
|
||||
// plays watcher
|
||||
state.addWatcher(new CommanderPlaysCountWatcher());
|
||||
// add game mode specific watchers here
|
||||
//state.addWatcher(new CommanderPlaysCountWatcher());
|
||||
|
||||
// move commanders to command zone
|
||||
for (UUID playerId : state.getPlayerList(startingPlayerId)) {
|
||||
|
|
|
|||
|
|
@ -161,6 +161,7 @@ public abstract class GameImpl implements Game {
|
|||
this.startingLife = startingLife;
|
||||
this.executingRollback = false;
|
||||
this.startingHandSize = startingHandSize;
|
||||
|
||||
initGameDefaultWatchers();
|
||||
}
|
||||
|
||||
|
|
@ -1266,6 +1267,7 @@ public abstract class GameImpl implements Game {
|
|||
newWatchers.add(new CardsDrawnThisTurnWatcher());
|
||||
newWatchers.add(new ManaSpentToCastWatcher());
|
||||
newWatchers.add(new ManaPaidSourceWatcher());
|
||||
newWatchers.add(new CommanderPlaysCountWatcher()); // commander plays count uses in non commander games by some cards
|
||||
|
||||
// runtime check - allows only GAME scope (one watcher per game)
|
||||
newWatchers.forEach(watcher -> {
|
||||
|
|
|
|||
|
|
@ -44,8 +44,8 @@ public abstract class GameTinyLeadersImpl extends GameImpl {
|
|||
|
||||
@Override
|
||||
protected void init(UUID choosingPlayerId) {
|
||||
// plays watcher
|
||||
state.addWatcher(new CommanderPlaysCountWatcher());
|
||||
// add game mode specific watchers here
|
||||
//state.addWatcher(new CommanderPlaysCountWatcher());
|
||||
|
||||
// move tiny leader to command zone
|
||||
for (UUID playerId : state.getPlayerList(startingPlayerId)) {
|
||||
|
|
|
|||
|
|
@ -12,11 +12,10 @@ import mage.watchers.Watcher;
|
|||
import java.util.*;
|
||||
|
||||
/**
|
||||
* Default game watcher, no need to add it with abilities
|
||||
* <p>
|
||||
* Calcs commanders play count only from command zone (spell or land)
|
||||
* Cards like Remand can put command to hand and cast it without commander tax increase
|
||||
* <p>
|
||||
* Warning, if your code can be called in non commander games then you must watcher in your ability
|
||||
* (example: you are using watcher in trigger, hint or effect, but do not checking another things like commander source or cost)
|
||||
*
|
||||
* @author JayDi85
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue