mirror of
https://github.com/correl/mage.git
synced 2024-12-26 19:16:54 +00:00
Fix Kaervek's Torch vs. multi-mode spells like Cryptic Command
This commit is contained in:
parent
ee7cb581a2
commit
f194af0321
1 changed files with 8 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue