mirror of
https://github.com/magefree/mage.git
synced 2026-01-22 19:29:59 -08:00
* Mirrorwing Dragon - Fixed wrong target handling.
This commit is contained in:
parent
4302186032
commit
e5117a967d
2 changed files with 6 additions and 1 deletions
|
|
@ -108,7 +108,9 @@ class MirrorwingDragonCopyTriggeredAbility extends TriggeredAbilityImpl {
|
|||
private boolean checkSpell(Spell spell, Game game) {
|
||||
if (spell != null
|
||||
&& (spell.getCardType().contains(CardType.INSTANT) || spell.getCardType().contains(CardType.SORCERY))) {
|
||||
boolean noTargets = true;
|
||||
for (TargetAddress addr : TargetAddress.walk(spell)) {
|
||||
noTargets = false;
|
||||
Target targetInstance = addr.getTarget(spell);
|
||||
for (UUID target : targetInstance.getTargets()) {
|
||||
Permanent permanent = game.getPermanent(target);
|
||||
|
|
@ -117,6 +119,9 @@ class MirrorwingDragonCopyTriggeredAbility extends TriggeredAbilityImpl {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (noTargets) {
|
||||
return false;
|
||||
}
|
||||
getEffects().get(0).setValue("triggeringSpell", spell);
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue