mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 19:41:59 -08:00
Fix missing reset code
This commit is contained in:
parent
090ea444d9
commit
2d3804079f
16 changed files with 78 additions and 74 deletions
|
|
@ -1,20 +1,19 @@
|
||||||
|
|
||||||
package mage.watchers.common;
|
package mage.watchers.common;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Map.Entry;
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
import mage.constants.WatcherScope;
|
import mage.constants.WatcherScope;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.watchers.Watcher;
|
import mage.watchers.Watcher;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Map.Entry;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author jeffwadsworth
|
* @author jeffwadsworth
|
||||||
*
|
* <p>
|
||||||
* Amount of damage received by a player this turn
|
* Amount of damage received by a player this turn
|
||||||
*/
|
*/
|
||||||
public class AmountOfDamageAPlayerReceivedThisTurnWatcher extends Watcher {
|
public class AmountOfDamageAPlayerReceivedThisTurnWatcher extends Watcher {
|
||||||
|
|
||||||
|
|
@ -48,6 +47,7 @@ public class AmountOfDamageAPlayerReceivedThisTurnWatcher extends Watcher {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void reset() {
|
public void reset() {
|
||||||
|
super.reset();
|
||||||
amountOfDamageReceivedThisTurn.clear();
|
amountOfDamageReceivedThisTurn.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,20 @@
|
||||||
|
|
||||||
|
|
||||||
package mage.watchers.common;
|
package mage.watchers.common;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Map.Entry;
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
import mage.constants.PhaseStep;
|
import mage.constants.PhaseStep;
|
||||||
import mage.constants.WatcherScope;
|
import mage.constants.WatcherScope;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.watchers.Watcher;
|
import mage.watchers.Watcher;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Map.Entry;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
*
|
* <p>
|
||||||
* Counts cards drawn during draw step
|
* Counts cards drawn during draw step
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class CardsDrawnDuringDrawStepWatcher extends Watcher {
|
public class CardsDrawnDuringDrawStepWatcher extends Watcher {
|
||||||
|
|
@ -54,6 +52,7 @@ public class CardsDrawnDuringDrawStepWatcher extends Watcher {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void reset() {
|
public void reset() {
|
||||||
|
super.reset();
|
||||||
amountOfCardsDrawnThisTurn.clear();
|
amountOfCardsDrawnThisTurn.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.watchers.common;
|
package mage.watchers.common;
|
||||||
|
|
||||||
import mage.MageObjectReference;
|
import mage.MageObjectReference;
|
||||||
|
|
@ -49,6 +48,7 @@ public class CastSpellLastTurnWatcher extends Watcher {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void reset() {
|
public void reset() {
|
||||||
|
super.reset();
|
||||||
amountOfSpellsCastOnPrevTurn.clear();
|
amountOfSpellsCastOnPrevTurn.clear();
|
||||||
amountOfSpellsCastOnPrevTurn.putAll(amountOfSpellsCastOnCurrentTurn);
|
amountOfSpellsCastOnPrevTurn.putAll(amountOfSpellsCastOnCurrentTurn);
|
||||||
amountOfSpellsCastOnCurrentTurn.clear();
|
amountOfSpellsCastOnCurrentTurn.clear();
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.watchers.common;
|
package mage.watchers.common;
|
||||||
|
|
||||||
import mage.constants.WatcherScope;
|
import mage.constants.WatcherScope;
|
||||||
|
|
@ -6,8 +5,10 @@ import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.watchers.Watcher;
|
import mage.watchers.Watcher;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author nantuko, BetaSteward_at_googlemail.com (spjspj)
|
* @author nantuko, BetaSteward_at_googlemail.com (spjspj)
|
||||||
|
|
@ -46,6 +47,7 @@ public class CastSpellYourLastTurnWatcher extends Watcher {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void reset() {
|
public void reset() {
|
||||||
|
super.reset();
|
||||||
if (amountOfSpellsCastOnPrevTurn != null
|
if (amountOfSpellsCastOnPrevTurn != null
|
||||||
&& lastActivePlayer != null
|
&& lastActivePlayer != null
|
||||||
&& amountOfSpellsCastOnPrevTurn.get(lastActivePlayer) != null) {
|
&& amountOfSpellsCastOnPrevTurn.get(lastActivePlayer) != null) {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.watchers.common;
|
package mage.watchers.common;
|
||||||
|
|
||||||
import mage.constants.WatcherScope;
|
import mage.constants.WatcherScope;
|
||||||
|
|
@ -7,7 +6,6 @@ import mage.game.events.GameEvent;
|
||||||
import mage.watchers.Watcher;
|
import mage.watchers.Watcher;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author L_J
|
* @author L_J
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -28,6 +26,7 @@ public class ChooseBlockersRedundancyWatcher extends Watcher { // workaround for
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void reset() {
|
public void reset() {
|
||||||
|
super.reset();
|
||||||
copyCount = 0;
|
copyCount = 0;
|
||||||
copyCountApply = 0;
|
copyCountApply = 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,19 @@
|
||||||
|
|
||||||
package mage.watchers.common;
|
package mage.watchers.common;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Map.Entry;
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.constants.WatcherScope;
|
import mage.constants.WatcherScope;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.watchers.Watcher;
|
import mage.watchers.Watcher;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Map.Entry;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author jeffwadsworth
|
* @author jeffwadsworth
|
||||||
*
|
* <p>
|
||||||
* Return the last player that was attacked by specified creature this turn
|
* Return the last player that was attacked by specified creature this turn
|
||||||
*/
|
*/
|
||||||
public class CreatureAttackedWhichPlayerWatcher extends Watcher {
|
public class CreatureAttackedWhichPlayerWatcher extends Watcher {
|
||||||
|
|
||||||
|
|
@ -48,6 +48,7 @@ public class CreatureAttackedWhichPlayerWatcher extends Watcher {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void reset() {
|
public void reset() {
|
||||||
|
super.reset();
|
||||||
getPlayerAttackedThisTurnByCreature.clear();
|
getPlayerAttackedThisTurnByCreature.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,15 @@
|
||||||
|
|
||||||
package mage.watchers.common;
|
package mage.watchers.common;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.constants.WatcherScope;
|
import mage.constants.WatcherScope;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.events.ZoneChangeEvent;
|
import mage.game.events.ZoneChangeEvent;
|
||||||
import mage.watchers.Watcher;
|
import mage.watchers.Watcher;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
*/
|
*/
|
||||||
|
|
@ -45,6 +45,7 @@ public class CreaturesDiedWatcher extends Watcher {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void reset() {
|
public void reset() {
|
||||||
|
super.reset();
|
||||||
amountOfCreaturesThatDiedByController.clear();
|
amountOfCreaturesThatDiedByController.clear();
|
||||||
amountOfCreaturesThatDiedByOwner.clear();
|
amountOfCreaturesThatDiedByOwner.clear();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,5 @@
|
||||||
|
|
||||||
package mage.watchers.common;
|
package mage.watchers.common;
|
||||||
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
import mage.abilities.costs.Cost;
|
import mage.abilities.costs.Cost;
|
||||||
import mage.abilities.costs.common.RevealTargetFromHandCost;
|
import mage.abilities.costs.common.RevealTargetFromHandCost;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
|
|
@ -15,8 +10,11 @@ import mage.game.events.GameEvent;
|
||||||
import mage.game.stack.Spell;
|
import mage.game.stack.Spell;
|
||||||
import mage.watchers.Watcher;
|
import mage.watchers.Watcher;
|
||||||
|
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
*/
|
*/
|
||||||
public class DragonOnTheBattlefieldWhileSpellWasCastWatcher extends Watcher {
|
public class DragonOnTheBattlefieldWhileSpellWasCastWatcher extends Watcher {
|
||||||
|
|
@ -53,7 +51,7 @@ public class DragonOnTheBattlefieldWhileSpellWasCastWatcher extends Watcher {
|
||||||
if (!revealedOrOnBattlefield) {
|
if (!revealedOrOnBattlefield) {
|
||||||
revealedOrOnBattlefield = game.getBattlefield().countAll(filter, spell.getControllerId(), game) > 0;
|
revealedOrOnBattlefield = game.getBattlefield().countAll(filter, spell.getControllerId(), game) > 0;
|
||||||
}
|
}
|
||||||
if (revealedOrOnBattlefield){
|
if (revealedOrOnBattlefield) {
|
||||||
castWithDragonOnTheBattlefield.add(spell.getId());
|
castWithDragonOnTheBattlefield.add(spell.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -63,6 +61,7 @@ public class DragonOnTheBattlefieldWhileSpellWasCastWatcher extends Watcher {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void reset() {
|
public void reset() {
|
||||||
|
super.reset();
|
||||||
castWithDragonOnTheBattlefield.clear();
|
castWithDragonOnTheBattlefield.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,15 @@
|
||||||
package mage.watchers.common;
|
package mage.watchers.common;
|
||||||
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.constants.WatcherScope;
|
import mage.constants.WatcherScope;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.watchers.Watcher;
|
import mage.watchers.Watcher;
|
||||||
|
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author BetaSteward_at_googlemail.com
|
* @author BetaSteward_at_googlemail.com
|
||||||
* @author Loki
|
* @author Loki
|
||||||
|
|
@ -48,9 +49,9 @@ public class LandfallWatcher extends Watcher {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void reset() {
|
public void reset() {
|
||||||
|
super.reset();
|
||||||
playerPlayedLand.clear();
|
playerPlayedLand.clear();
|
||||||
landEnteredBattlefield.clear();
|
landEnteredBattlefield.clear();
|
||||||
super.reset();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean landPlayed(UUID playerId) {
|
public boolean landPlayed(UUID playerId) {
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,5 @@
|
||||||
|
|
||||||
package mage.watchers.common;
|
package mage.watchers.common;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Map.Entry;
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.keyword.MiracleAbility;
|
import mage.abilities.keyword.MiracleAbility;
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
|
|
@ -18,6 +12,11 @@ import mage.game.events.GameEvent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.watchers.Watcher;
|
import mage.watchers.Watcher;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Map.Entry;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Counts amount of cards drawn this turn by players. Asks players about Miracle
|
* Counts amount of cards drawn this turn by players. Asks players about Miracle
|
||||||
* ability to be activated if it the first card drawn this turn.
|
* ability to be activated if it the first card drawn this turn.
|
||||||
|
|
@ -80,6 +79,7 @@ public class MiracleWatcher extends Watcher {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void reset() {
|
public void reset() {
|
||||||
|
super.reset();
|
||||||
amountOfCardsDrawnThisTurn.clear();
|
amountOfCardsDrawnThisTurn.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@ import mage.watchers.Watcher;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author LevelX2 (spjspj)
|
* @author LevelX2 (spjspj)
|
||||||
*/
|
*/
|
||||||
public class PermanentsEnteredBattlefieldYourLastTurnWatcher extends Watcher {
|
public class PermanentsEnteredBattlefieldYourLastTurnWatcher extends Watcher {
|
||||||
|
|
@ -62,6 +61,7 @@ public class PermanentsEnteredBattlefieldYourLastTurnWatcher extends Watcher {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void reset() {
|
public void reset() {
|
||||||
|
super.reset();
|
||||||
if (enteringBattlefieldLastTurn != null
|
if (enteringBattlefieldLastTurn != null
|
||||||
&& lastActivePlayer != null
|
&& lastActivePlayer != null
|
||||||
&& enteringBattlefieldLastTurn.get(lastActivePlayer) != null) {
|
&& enteringBattlefieldLastTurn.get(lastActivePlayer) != null) {
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
|
|
||||||
package mage.watchers.common;
|
package mage.watchers.common;
|
||||||
|
|
||||||
|
import mage.constants.WatcherScope;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.events.GameEvent;
|
||||||
|
import mage.watchers.Watcher;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.constants.WatcherScope;
|
|
||||||
import mage.game.Game;
|
|
||||||
import mage.game.events.GameEvent;
|
|
||||||
import mage.watchers.Watcher;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Counts the number of times the planar die has been rolled per player per turn
|
* Counts the number of times the planar die has been rolled per player per turn
|
||||||
|
|
@ -40,7 +40,7 @@ public class PlanarRollWatcher extends Watcher {
|
||||||
if (amount == null) {
|
if (amount == null) {
|
||||||
amount = 1;
|
amount = 1;
|
||||||
} else {
|
} else {
|
||||||
amount ++;
|
amount++;
|
||||||
}
|
}
|
||||||
numberTimesPlanarDieRolled.put(playerId, amount);
|
numberTimesPlanarDieRolled.put(playerId, amount);
|
||||||
}
|
}
|
||||||
|
|
@ -53,6 +53,7 @@ public class PlanarRollWatcher extends Watcher {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void reset() {
|
public void reset() {
|
||||||
|
super.reset();
|
||||||
numberTimesPlanarDieRolled.clear();
|
numberTimesPlanarDieRolled.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,15 @@
|
||||||
package mage.watchers.common;
|
package mage.watchers.common;
|
||||||
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.constants.WatcherScope;
|
import mage.constants.WatcherScope;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.watchers.Watcher;
|
import mage.watchers.Watcher;
|
||||||
|
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author jeffwadsworth
|
* @author jeffwadsworth
|
||||||
*/
|
*/
|
||||||
|
|
@ -47,9 +48,9 @@ public class PlayLandWatcher extends Watcher {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void reset() {
|
public void reset() {
|
||||||
|
super.reset();
|
||||||
playerPlayedLand.clear();
|
playerPlayedLand.clear();
|
||||||
landPlayed.clear();
|
landPlayed.clear();
|
||||||
super.reset();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean landPlayed(UUID playerId) {
|
public boolean landPlayed(UUID playerId) {
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
|
|
||||||
package mage.watchers.common;
|
package mage.watchers.common;
|
||||||
|
|
||||||
import mage.constants.WatcherScope;
|
import mage.constants.WatcherScope;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.DamagedPlayerEvent;
|
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.watchers.Watcher;
|
import mage.watchers.Watcher;
|
||||||
|
|
@ -72,6 +70,7 @@ public class PlayerLostLifeNonCombatWatcher extends Watcher {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void reset() {
|
public void reset() {
|
||||||
|
super.reset();
|
||||||
amountOfLifeLostLastTurn.clear();
|
amountOfLifeLostLastTurn.clear();
|
||||||
amountOfLifeLostLastTurn.putAll(amountOfLifeLostThisTurn);
|
amountOfLifeLostLastTurn.putAll(amountOfLifeLostThisTurn);
|
||||||
amountOfLifeLostThisTurn.clear();
|
amountOfLifeLostThisTurn.clear();
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,16 @@
|
||||||
|
|
||||||
package mage.watchers.common;
|
package mage.watchers.common;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Map.Entry;
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.constants.WatcherScope;
|
import mage.constants.WatcherScope;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.watchers.Watcher;
|
import mage.watchers.Watcher;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Map.Entry;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Counts amount of life lost current or last turn by players.
|
* Counts amount of life lost current or last turn by players.
|
||||||
* This watcher is automatically started in gameImpl.init for each game
|
* This watcher is automatically started in gameImpl.init for each game
|
||||||
|
|
@ -70,6 +70,7 @@ public class PlayerLostLifeWatcher extends Watcher {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void reset() {
|
public void reset() {
|
||||||
|
super.reset();
|
||||||
amountOfLifeLostLastTurn.clear();
|
amountOfLifeLostLastTurn.clear();
|
||||||
amountOfLifeLostLastTurn.putAll(amountOfLifeLostThisTurn);
|
amountOfLifeLostLastTurn.putAll(amountOfLifeLostThisTurn);
|
||||||
amountOfLifeLostThisTurn.clear();
|
amountOfLifeLostThisTurn.clear();
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,5 @@
|
||||||
|
|
||||||
package mage.watchers.common;
|
package mage.watchers.common;
|
||||||
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.constants.WatcherScope;
|
import mage.constants.WatcherScope;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
|
|
@ -13,8 +9,11 @@ import mage.game.events.ZoneChangeEvent;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.watchers.Watcher;
|
import mage.watchers.Watcher;
|
||||||
|
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author BetaSteward_at_googlemail.com
|
* @author BetaSteward_at_googlemail.com
|
||||||
*/
|
*/
|
||||||
public class RevoltWatcher extends Watcher {
|
public class RevoltWatcher extends Watcher {
|
||||||
|
|
@ -49,6 +48,7 @@ public class RevoltWatcher extends Watcher {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void reset() {
|
public void reset() {
|
||||||
|
super.reset();
|
||||||
revoltActivePlayerIds.clear();
|
revoltActivePlayerIds.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue