* Heroic ability - Fixed a bug, that some spells with multiple targets did not trigger heroic (Hunt the Hunter, Time to Feed).

This commit is contained in:
LevelX2 2013-09-25 07:47:29 +02:00
parent deec6dc1a4
commit 12932cd712

View file

@ -36,6 +36,7 @@ import mage.constants.Zone;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.stack.Spell;
import mage.target.Target;
/**
* Heroic
@ -77,6 +78,11 @@ public class HeroicAbility extends TriggeredAbilityImpl<HeroicAbility> {
private boolean checkSpell(Spell spell, Game game) {
if (spell != null) {
SpellAbility sa = spell.getSpellAbility();
for (Target target : sa.getTargets()) {
if (!target.isNotTarget() && target.getTargets().contains(this.getSourceId())) {
return true;
}
}
for (Effect effect : sa.getEffects()) {
for (UUID targetId : effect.getTargetPointer().getTargets(game, sa)) {
if (targetId.equals(this.getSourceId())) {