* Deicide - Fixed possible NPE bug.

This commit is contained in:
LevelX2 2014-07-21 15:35:13 +02:00
parent c70828bda0
commit 6669d1780a

View file

@ -88,10 +88,9 @@ class DeicideExileEffect extends SearchTargetGraveyardHandLibraryForCardNameAndE
Permanent targetEnchantment = game.getPermanent(getTargetPointer().getFirst(game, source)); Permanent targetEnchantment = game.getPermanent(getTargetPointer().getFirst(game, source));
if (targetEnchantment != null) { if (targetEnchantment != null) {
controller.moveCardToExileWithInfo(targetEnchantment, null, null, source.getSourceId(), game, Zone.BATTLEFIELD); controller.moveCardToExileWithInfo(targetEnchantment, null, null, source.getSourceId(), game, Zone.BATTLEFIELD);
Card exiledCard = game.getCard(targetEnchantment.getId()); if (targetEnchantment.hasSubtype("God")) {
if (exiledCard.hasSubtype("God")) {
Player enchantmentController = game.getPlayer(targetEnchantment.getControllerId()); Player enchantmentController = game.getPlayer(targetEnchantment.getControllerId());
return super.applySearchAndExile(game, source, exiledCard.getName(), enchantmentController.getId()); return super.applySearchAndExile(game, source, targetEnchantment.getName(), enchantmentController.getId());
} }
} }
} }