* 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.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
import mage.players.Player;
import mage.target.targetpointer.FixedTarget;
import mage.watchers.common.MiracleWatcher;

View file

@ -69,8 +69,10 @@ public class MiracleWatcher extends Watcher {
public void watch(GameEvent event, Game game) {
if (event.getType() == GameEvent.EventType.UNTAP_STEP_PRE) {
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();
if (playerId != null) {
Integer amount = amountOfCardsDrawnThisTurn.get(playerId);