Fix Kaervek's Torch vs. multi-mode spells like Cryptic Command

This commit is contained in:
LoneFox 2015-06-18 21:40:38 +03:00
parent ee7cb581a2
commit f194af0321

View file

@ -97,6 +97,8 @@ class KaerveksTorchCostIncreaseEffect extends CostModificationEffectImpl {
public boolean applies(Ability abilityToModify, Ability source, Game game) {
if(abilityToModify instanceof SpellAbility || abilityToModify instanceof FlashbackAbility)
{
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())) {
@ -105,6 +107,7 @@ class KaerveksTorchCostIncreaseEffect extends CostModificationEffectImpl {
}
}
}
}
return false;
}