mirror of
https://github.com/magefree/mage.git
synced 2025-12-21 02:52:02 -08:00
fixed Dack Fayden emblem not using all targets from modal spells
This commit is contained in:
parent
8a2874dec6
commit
eadd9d61d5
1 changed files with 9 additions and 6 deletions
|
|
@ -31,6 +31,7 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.Mode;
|
||||||
import mage.abilities.SpellAbility;
|
import mage.abilities.SpellAbility;
|
||||||
import mage.abilities.TriggeredAbilityImpl;
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
import mage.abilities.effects.ContinuousEffectImpl;
|
import mage.abilities.effects.ContinuousEffectImpl;
|
||||||
|
|
@ -92,7 +93,8 @@ class DackFaydenEmblemTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
Spell spell = game.getStack().getSpell(event.getTargetId());
|
Spell spell = game.getStack().getSpell(event.getTargetId());
|
||||||
if (spell != null) {
|
if (spell != null) {
|
||||||
SpellAbility spellAbility = spell.getSpellAbility();
|
SpellAbility spellAbility = spell.getSpellAbility();
|
||||||
for (Target target : spellAbility.getTargets()) {
|
for (Mode mode : spellAbility.getModes().values()) {
|
||||||
|
for (Target target : mode.getTargets()) {
|
||||||
if (!target.isNotTarget()) {
|
if (!target.isNotTarget()) {
|
||||||
for (UUID targetId : target.getTargets()) {
|
for (UUID targetId : target.getTargets()) {
|
||||||
if (game.getBattlefield().containsPermanent(targetId)) {
|
if (game.getBattlefield().containsPermanent(targetId)) {
|
||||||
|
|
@ -102,6 +104,7 @@ class DackFaydenEmblemTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
for (Effect effect : spellAbility.getEffects()) {
|
for (Effect effect : spellAbility.getEffects()) {
|
||||||
for (UUID targetId : effect.getTargetPointer().getTargets(game, spellAbility)) {
|
for (UUID targetId : effect.getTargetPointer().getTargets(game, spellAbility)) {
|
||||||
if (game.getBattlefield().containsPermanent(targetId)) {
|
if (game.getBattlefield().containsPermanent(targetId)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue