* Pharika, God of Affliction - Added missing exile target card in graveyard effect.

This commit is contained in:
LevelX2 2014-06-18 13:33:42 +02:00
parent 9bd7bbd661
commit 997fdf1653

View file

@ -76,7 +76,7 @@ public class PharikaGodOfAffliction extends CardImpl {
Effect effect = new LoseCreatureTypeSourceEffect(new DevotionCount(ColoredManaSymbol.B, ColoredManaSymbol.G), 7); Effect effect = new LoseCreatureTypeSourceEffect(new DevotionCount(ColoredManaSymbol.B, ColoredManaSymbol.G), 7);
effect.setText("As long as your devotion to black and green is less than seven, Pharika isn't a creature"); effect.setText("As long as your devotion to black and green is less than seven, Pharika isn't a creature");
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
// BG: Exile target creature card from a graveyard. It's owner puts a 1/1 black and green Snake enchantment creature token with deathtouch onto the battlefield. // {B}{G}: Exile target creature card from a graveyard. It's owner puts a 1/1 black and green Snake enchantment creature token with deathtouch onto the battlefield.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PharikaExileEffect(), new ManaCostsImpl("{B}{G}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PharikaExileEffect(), new ManaCostsImpl("{B}{G}"));
Target target = new TargetCardInGraveyard(new FilterCreatureCard("a creature card from a graveyard")); Target target = new TargetCardInGraveyard(new FilterCreatureCard("a creature card from a graveyard"));
ability.addTarget(target); ability.addTarget(target);
@ -108,13 +108,19 @@ class PharikaExileEffect extends OneShotEffect {
@Override @Override
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
Card targetCard = game.getCard(source.getFirstTarget()); Card targetCard = game.getCard(source.getFirstTarget());
if (targetCard != null) { if (targetCard != null) {
if (game.getState().getZone(source.getFirstTarget()).equals(Zone.GRAVEYARD)) {
controller.moveCardToExileWithInfo(targetCard, null, "", source.getSourceId(), game, Zone.GRAVEYARD);
}
Player tokenController = game.getPlayer(targetCard.getOwnerId()); Player tokenController = game.getPlayer(targetCard.getOwnerId());
if (tokenController != null) { if (tokenController != null) {
return new PharikaSnakeToken().putOntoBattlefield(1, game, source.getSourceId(), tokenController.getId()); return new PharikaSnakeToken().putOntoBattlefield(1, game, source.getSourceId(), tokenController.getId());
} }
} }
}
return false; return false;
} }