Minor changes to Dreamborn Muse.

This commit is contained in:
LevelX2 2015-06-17 00:57:28 +02:00
parent c987ae7a21
commit ae2eb8bb50
2 changed files with 5 additions and 3 deletions

View file

@ -50,10 +50,9 @@ public class DreambornMuse extends CardImpl {
this.power = new MageInt(2); this.power = new MageInt(2);
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
// At the beginning of each player's upkeep, that player puts the top X cards of his or her library into his or her graveyard, where X is the number of cards in his or her hand.
PutLibraryIntoGraveTargetEffect effect = new PutLibraryIntoGraveTargetEffect(new CardsInTargetPlayerHandCount()); PutLibraryIntoGraveTargetEffect effect = new PutLibraryIntoGraveTargetEffect(new CardsInTargetPlayerHandCount());
effect.setText("that player puts the top X cards of his or her library into his or her graveyard, where X is the number of cards in his or her hand."); effect.setText("that player puts the top X cards of his or her library into his or her graveyard, where X is the number of cards in his or her hand.");
// At the beginning of each player's upkeep, that player puts the top X cards of his or her library into his or her graveyard, where X is the number of cards in his or her hand.
this.addAbility(new BeginningOfUpkeepTriggeredAbility(effect, TargetController.ANY, false)); this.addAbility(new BeginningOfUpkeepTriggeredAbility(effect, TargetController.ANY, false));
} }

View file

@ -15,8 +15,11 @@ public class CardsInTargetPlayerHandCount implements DynamicValue {
@Override @Override
public int calculate(Game game, Ability sourceAbility, Effect effect) { public int calculate(Game game, Ability sourceAbility, Effect effect) {
Player player = game.getPlayer(effect.getTargetPointer().getFirst(game, sourceAbility)); Player player = game.getPlayer(effect.getTargetPointer().getFirst(game, sourceAbility));
if (player != null) {
return player.getHand().size(); return player.getHand().size();
} }
return 0;
}
@Override @Override
public DynamicValue copy() { public DynamicValue copy() {