Re: Help implementing a card
@cbt33
Also, consider these changes to your apply section (the formating is messed up, but it is readable. I just took your code and "tried" to modify it in the code block:
Also, consider these changes to your apply section (the formating is messed up, but it is readable. I just took your code and "tried" to modify it in the code block:
- Code: Select all
@Override
public boolean apply(Game game, Ability source) {
Player you = game.getPlayer(source.getControllerId());
if (you != null) {
FilterCard filter = new FilterCard();
Player damagedPlayer = game.getPlayer(this.getTargetPointer().getFirst(game, source));
if (damagedPlayer != null) {
filter.add(new OwnerIdPredicate(damagedPlayer.getId()));
Target target = new TargetCardInGraveyard(filter);
if (you.chooseTarget(Outcome.Neutral, target, source, game) {
UUID exileId = CardUtil.getCardExileZoneId(game, source);
game.getPermanent(target.getFirstTarget()).moveToExile(exileId, "Zombie Canibal", source.getSourceId(), game);
return true;
}
}
}
return false;
}
Creature - Merfolk with Tap, sac: return target artifact from your graveyard to your hand. Code is