Reworked selected modes handling. That fixed the Subtle Strike targeting problem.

This commit is contained in:
LevelX2 2016-09-24 01:12:01 +02:00
parent 0b118d074e
commit c9bb0be016
33 changed files with 163 additions and 131 deletions

View file

@ -1,4 +1,4 @@
/*
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
@ -82,7 +82,8 @@ public class HeroicAbility extends TriggeredAbilityImpl {
private boolean checkSpell(Spell spell, Game game) {
if (spell != null) {
SpellAbility sa = spell.getSpellAbility();
for (Mode mode : sa.getModes().getSelectedModes()) {
for (UUID modeId : sa.getModes().getSelectedModes()) {
Mode mode = sa.getModes().get(modeId);
for (Target target : mode.getTargets()) {
if (!target.isNotTarget() && target.getTargets().contains(this.getSourceId())) {
return true;