forked from External/mage
Revised Odyssey cards
This commit is contained in:
parent
4160fca787
commit
5cb89e38d5
1 changed files with 39 additions and 4 deletions
|
|
@ -31,12 +31,17 @@ import java.util.UUID;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||
import mage.abilities.effects.common.ExileTargetEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.target.common.TargetCardInOpponentsGraveyard;
|
||||
import mage.filter.predicate.other.OwnerIdPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetCardInGraveyard;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -54,8 +59,8 @@ public class ZombieCannibal extends CardImpl<ZombieCannibal> {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// Whenever Zombie Cannibal deals combat damage to a player, you may exile target card from that player's graveyard.
|
||||
Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(new ExileTargetEffect(), false, true);
|
||||
ability.addTarget(new TargetCardInOpponentsGraveyard(new FilterCard()));
|
||||
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new ZombieCannibalEffect(), true, true));
|
||||
|
||||
}
|
||||
|
||||
public ZombieCannibal(final ZombieCannibal card) {
|
||||
|
|
@ -67,3 +72,33 @@ public class ZombieCannibal extends CardImpl<ZombieCannibal> {
|
|||
return new ZombieCannibal(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ZombieCannibalEffect extends OneShotEffect<ZombieCannibalEffect> {
|
||||
|
||||
public ZombieCannibalEffect() {
|
||||
super(Outcome.Exile);
|
||||
staticText = "you may exile target card from that player's graveyard.";
|
||||
}
|
||||
|
||||
public ZombieCannibalEffect(final ZombieCannibalEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ZombieCannibalEffect copy() {
|
||||
return new ZombieCannibalEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
FilterCard filter = new FilterCard();
|
||||
Player player = game.getPlayer(source.getTargets().getFirstTarget());
|
||||
if (player != null) {
|
||||
filter.add(new OwnerIdPredicate(player.getId()));
|
||||
Target target = new TargetCardInGraveyard(filter);
|
||||
game.getPermanent(target.getFirstTarget()).moveToExile(null, null, source.getSourceId(), game);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue