- DGM: Notion Thief

This commit is contained in:
swordshine
2013-04-17 11:08:30 +00:00
parent 9b3bf168ad
commit ce8ac3fcdd
2 changed files with 21 additions and 0 deletions

View File

@@ -21,6 +21,8 @@ import java.util.Map;
import forge.Card; import forge.Card;
import forge.card.spellability.SpellAbility; import forge.card.spellability.SpellAbility;
import forge.game.phase.PhaseType;
import forge.game.player.Player;
/** /**
* TODO: Write javadoc for this type. * TODO: Write javadoc for this type.
@@ -51,6 +53,14 @@ public class ReplaceDraw extends ReplacementEffect {
return false; return false;
} }
} }
if (this.getMapParams().containsKey("NotFirstCardInDrawStep")) {
final Player p = (Player)runParams.get("Affected");
if (p.numDrawnThisDrawStep() == 0
&& this.getHostCard().getController().getGame().getPhaseHandler().is(PhaseType.DRAW)
&& this.getHostCard().getController().getGame().getPhaseHandler().getPlayerTurn().equals(p)) {
return false;
}
}
return true; return true;
} }

View File

@@ -1565,6 +1565,17 @@ public abstract class Player extends GameEntity implements Comparable<Player> {
return this.numDrawnThisTurn; return this.numDrawnThisTurn;
} }
/**
* <p>
* Getter for the field <code>numDrawnThisTurnDrawStep</code>.
* </p>
*
* @return a int.
*/
public final int numDrawnThisDrawStep() {
return this.numDrawnThisDrawStep;
}
// ////////////////////////////// // //////////////////////////////
// / // /
// / replaces Singletons.getModel().getGameAction().discard* methods // / replaces Singletons.getModel().getGameAction().discard* methods