mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
* 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:
parent
deec6dc1a4
commit
12932cd712
1 changed files with 6 additions and 0 deletions
|
@ -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())) {
|
||||
|
|
Loading…
Reference in a new issue