* Miracle - Fixed that miracle was also checked for inital card draw.

This commit is contained in:
LevelX2 2015-02-22 11:16:39 +01:00
parent 2767ff3846
commit 4adc55eb80
2 changed files with 3 additions and 2 deletions

View file

@ -38,7 +38,6 @@ import mage.constants.Outcome;
import mage.constants.Zone; import mage.constants.Zone;
import mage.game.Game; import mage.game.Game;
import mage.game.events.GameEvent; import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
import mage.players.Player; import mage.players.Player;
import mage.target.targetpointer.FixedTarget; import mage.target.targetpointer.FixedTarget;
import mage.watchers.common.MiracleWatcher; import mage.watchers.common.MiracleWatcher;

View file

@ -69,8 +69,10 @@ public class MiracleWatcher extends Watcher {
public void watch(GameEvent event, Game game) { public void watch(GameEvent event, Game game) {
if (event.getType() == GameEvent.EventType.UNTAP_STEP_PRE) { if (event.getType() == GameEvent.EventType.UNTAP_STEP_PRE) {
reset(); reset();
return;
} }
if (event.getType() == GameEvent.EventType.DREW_CARD) { // inital card draws do not trigger miracle so check that phase != null
if (game.getPhase() != null && event.getType() == GameEvent.EventType.DREW_CARD) {
UUID playerId = event.getPlayerId(); UUID playerId = event.getPlayerId();
if (playerId != null) { if (playerId != null) {
Integer amount = amountOfCardsDrawnThisTurn.get(playerId); Integer amount = amountOfCardsDrawnThisTurn.get(playerId);