From f194af03216a47988a4165387fccbaed3dedb493 Mon Sep 17 00:00:00 2001 From: LoneFox Date: Thu, 18 Jun 2015 21:40:38 +0300 Subject: [PATCH] Fix Kaervek's Torch vs. multi-mode spells like Cryptic Command --- .../src/mage/sets/vintagemasters/KaerveksTorch.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Mage.Sets/src/mage/sets/vintagemasters/KaerveksTorch.java b/Mage.Sets/src/mage/sets/vintagemasters/KaerveksTorch.java index 70af01ee4f..d94e06339c 100644 --- a/Mage.Sets/src/mage/sets/vintagemasters/KaerveksTorch.java +++ b/Mage.Sets/src/mage/sets/vintagemasters/KaerveksTorch.java @@ -97,13 +97,16 @@ class KaerveksTorchCostIncreaseEffect extends CostModificationEffectImpl { public boolean applies(Ability abilityToModify, Ability source, Game game) { if(abilityToModify instanceof SpellAbility || abilityToModify instanceof FlashbackAbility) { - for(Target target: abilityToModify.getTargets()) { - for(UUID id: target.getTargets()) { - if(id.equals(source.getSourceObject(game).getId())) { - return true; + for(UUID modeId: abilityToModify.getModes().getSelectedModes()) { + abilityToModify.getModes().setActiveMode(modeId); + for(Target target: abilityToModify.getTargets()) { + for(UUID id: target.getTargets()) { + if(id.equals(source.getSourceObject(game).getId())) { + return true; + } } } - } + } } return false; }