mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
spjspj - Fix copy's owner for Mirrorwing Dragon (EMN)
This commit is contained in:
parent
e5117a967d
commit
09cc97dd85
2 changed files with 16 additions and 0 deletions
|
@ -172,6 +172,17 @@ class MirrorwingDragonCopySpellEffect extends CopySpellForEachItCouldTargetEffec
|
|||
|
||||
@Override
|
||||
protected void modifyCopy(Spell copy, Game game, Ability source) {
|
||||
Spell spell = getSpell(game, source);
|
||||
copy.setControllerId(spell.getControllerId());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean okUUIDToCopyFor(UUID potentialTarget, Game game, Ability source, Spell spell) {
|
||||
Permanent permanent = game.getPermanent(potentialTarget);
|
||||
if (permanent == null || !permanent.getControllerId().equals(spell.getControllerId())) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -82,6 +82,10 @@ public abstract class CopySpellForEachItCouldTargetEffect<T extends MageItem> ex
|
|||
modifyCopy(copy, game, source);
|
||||
}
|
||||
|
||||
protected boolean okUUIDToCopyFor(UUID potentialTarget, Game game, Ability source, Spell spell) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player actingPlayer = getPlayer(game, source);
|
||||
|
@ -146,6 +150,7 @@ public abstract class CopySpellForEachItCouldTargetEffect<T extends MageItem> ex
|
|||
}
|
||||
}
|
||||
|
||||
legal &= okUUIDToCopyFor(objId, game, source, spell);
|
||||
if (legal) {
|
||||
for (TargetAddress addr : targetsToBeChanged) {
|
||||
Target targetInstance = addr.getTarget(copy);
|
||||
|
|
Loading…
Reference in a new issue