implement [MH3] Herigast, Erupting Nullkite

This commit is contained in:
xenohedron 2024-06-15 14:43:19 -04:00
parent f08d5acb30
commit 391c01c87d
4 changed files with 193 additions and 1 deletions

View file

@ -0,0 +1,49 @@
package mage.abilities.costs.common;
import mage.abilities.Ability;
import mage.abilities.costs.Cost;
import mage.abilities.costs.CostImpl;
import mage.constants.Zone;
import mage.game.Game;
import mage.players.Player;
import java.util.UUID;
/**
* @author xenohedron
*/
public class ExileHandCost extends CostImpl {
public ExileHandCost() {
}
private ExileHandCost(final ExileHandCost cost) {
super(cost);
}
@Override
public ExileHandCost copy() {
return new ExileHandCost(this);
}
@Override
public boolean canPay(Ability ability, Ability source, UUID controllerId, Game game) {
return true;
}
@Override
public boolean pay(Ability ability, Game game, Ability source, UUID controllerId, boolean noMana, Cost costToPay) {
Player player = game.getPlayer(controllerId);
if (player == null) {
return paid;
}
player.moveCards(player.getHand(), Zone.EXILED, source, game);
paid = true;
return paid;
}
@Override
public String getText() {
return "exile your hand";
}
}