mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
[ODY] Added Charmed Pendant.
This commit is contained in:
parent
cddb4af9e6
commit
f56b2fb86c
4 changed files with 618 additions and 397 deletions
|
|
@ -27,10 +27,13 @@
|
|||
*/
|
||||
package mage.abilities.costs.common;
|
||||
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.CostImpl;
|
||||
import mage.cards.Card;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
|
@ -38,7 +41,8 @@ import mage.util.CardUtil;
|
|||
|
||||
public class PutTopCardOfYourLibraryToGraveyardCost extends CostImpl {
|
||||
|
||||
int numberOfCards;
|
||||
private final int numberOfCards;
|
||||
private final Set<Card> cardsMovedToGraveyard = new LinkedHashSet<>();
|
||||
|
||||
public PutTopCardOfYourLibraryToGraveyardCost() {
|
||||
this(1);
|
||||
|
|
@ -52,6 +56,7 @@ public class PutTopCardOfYourLibraryToGraveyardCost extends CostImpl {
|
|||
public PutTopCardOfYourLibraryToGraveyardCost(PutTopCardOfYourLibraryToGraveyardCost cost) {
|
||||
super(cost);
|
||||
this.numberOfCards = cost.numberOfCards;
|
||||
this.cardsMovedToGraveyard.addAll(cost.getCardsMovedToGraveyard());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -59,6 +64,7 @@ public class PutTopCardOfYourLibraryToGraveyardCost extends CostImpl {
|
|||
Player player = game.getPlayer(controllerId);
|
||||
if (player != null && player.getLibrary().size() >= numberOfCards) {
|
||||
paid = true;
|
||||
this.cardsMovedToGraveyard.addAll(player.getLibrary().getTopCards(game, numberOfCards));
|
||||
player.moveCards(player.getLibrary().getTopCards(game, numberOfCards), Zone.GRAVEYARD, ability, game);
|
||||
}
|
||||
return paid;
|
||||
|
|
@ -75,6 +81,10 @@ public class PutTopCardOfYourLibraryToGraveyardCost extends CostImpl {
|
|||
return new PutTopCardOfYourLibraryToGraveyardCost(this);
|
||||
}
|
||||
|
||||
public Set<Card> getCardsMovedToGraveyard() {
|
||||
return cardsMovedToGraveyard;
|
||||
}
|
||||
|
||||
private String setText() {
|
||||
StringBuilder sb = new StringBuilder("Put the top ");
|
||||
if (numberOfCards == 1) {
|
||||
|
|
|
|||
|
|
@ -122,6 +122,10 @@ public class MonoHybridManaCost extends ManaCostImpl {
|
|||
return mana == coloredManaSymbol;
|
||||
}
|
||||
|
||||
public ColoredManaSymbol getManaColor() {
|
||||
return mana;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Mana> getManaOptions() {
|
||||
List<Mana> manaList = new ArrayList<>();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue