* Deicide - Fixed a bug that subtype was taken from permanent instead from card in exile. So Deicide did not allow to search for other God cards as long as the Theros God was only an enchantment as he was exiled.

This commit is contained in:
LevelX2 2014-07-31 15:49:29 +02:00
parent 1a1fc09221
commit 3d292c3495

View file

@ -87,10 +87,15 @@ class DeicideExileEffect extends SearchTargetGraveyardHandLibraryForCardNameAndE
if (controller != null && sourceCard != null) {
Permanent targetEnchantment = game.getPermanent(getTargetPointer().getFirst(game, source));
if (targetEnchantment != null) {
controller.moveCardToExileWithInfo(targetEnchantment, null, null, source.getSourceId(), game, Zone.BATTLEFIELD);
if (targetEnchantment.hasSubtype("God")) {
controller.moveCardToExileWithInfo(targetEnchantment, null, "", source.getSourceId(), game, Zone.BATTLEFIELD);
// 4/26/2014
// Deicide looks at the card in exile, not the permanent that was exiled, to determine
// if it is a God. For each of the Gods in the Theros block, it wont matter what your
// devotion to its color(s) was. The card is a God card when not on the battlefield.
Card cardInExile = game.getExile().getCard(targetEnchantment.getId(), game);
if (cardInExile != null && cardInExile.hasSubtype("God")) {
Player enchantmentController = game.getPlayer(targetEnchantment.getControllerId());
return super.applySearchAndExile(game, source, targetEnchantment.getName(), enchantmentController.getId());
return super.applySearchAndExile(game, source, cardInExile.getName(), enchantmentController.getId());
}
}
}