forked from External/mage
Refactoring cards that mill (WIP, do not merge) (#6713)
* added mill method * updated mill effects to use new method * refactored individual cards * small updated to Grindstone and Sphinx's Tutelage * another updated to Grindstone * fixed a test * fixed Countermand null check * more refactoring * updated dredge ability to use mill
This commit is contained in:
parent
8b5f4f28f0
commit
785be83484
102 changed files with 738 additions and 957 deletions
|
|
@ -4193,6 +4193,17 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Cards millCards(int toMill, Ability source, Game game) {
|
||||
GameEvent event = GameEvent.getEvent(EventType.MILL_CARDS, getId(), source.getSourceId(), getId(), toMill);
|
||||
if (game.replaceEvent(event)) {
|
||||
return new CardsImpl();
|
||||
}
|
||||
Cards cards = new CardsImpl(this.getLibrary().getTopCards(game, event.getAmount()));
|
||||
this.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
return cards;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasOpponent(UUID playerToCheckId, Game game) {
|
||||
return !this.getId().equals(playerToCheckId)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue