mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
Improve trigger auto ordering and aura attachment (Lynde QOL fixes) (#10648)
* Lynde trigger references objects * Changed triggered ability auto-order to care about targets * Copy card test * When a copy effect comes in as a copy of an aura, it checks if it's already attached before asking player to attach * add comments and null check per review --------- Co-authored-by: xenohedron <xenohedron@users.noreply.github.com>
This commit is contained in:
parent
38dd582adc
commit
87921494b8
4 changed files with 116 additions and 10 deletions
|
|
@ -157,10 +157,15 @@ public class CopyPermanentEffect extends OneShotEffect {
|
|||
|
||||
// select new target
|
||||
auraTarget.withNotTarget(true);
|
||||
if (!controller.choose(auraOutcome, auraTarget, source, game)) {
|
||||
return true;
|
||||
|
||||
UUID targetId = (UUID) game.getState().getValue("attachTo:" + sourcePermanent.getId());
|
||||
if (targetId == null) {
|
||||
if (!controller.choose(auraOutcome, auraTarget, source, game)) {
|
||||
return true;
|
||||
}
|
||||
targetId = auraTarget.getFirstTarget();
|
||||
}
|
||||
UUID targetId = auraTarget.getFirstTarget();
|
||||
|
||||
Permanent targetPermanent = game.getPermanent(targetId);
|
||||
Player targetPlayer = game.getPlayer(targetId);
|
||||
if (targetPermanent != null) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue