From e25a966abcd80eb928576372f20550dc49b25f6d Mon Sep 17 00:00:00 2001 From: Northmoc Date: Mon, 27 Sep 2021 10:33:14 -0400 Subject: [PATCH 1/3] lynde_cheerful_tormentor.txt --- .../upcoming/lynde_cheerful_tormentor.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 forge-gui/res/cardsfolder/upcoming/lynde_cheerful_tormentor.txt diff --git a/forge-gui/res/cardsfolder/upcoming/lynde_cheerful_tormentor.txt b/forge-gui/res/cardsfolder/upcoming/lynde_cheerful_tormentor.txt new file mode 100644 index 00000000000..6a962a596d5 --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/lynde_cheerful_tormentor.txt @@ -0,0 +1,16 @@ +Name:Lynde, Cheerful Tormentor +ManaCost:1 U B R +Types:Legendary Creature Human Warlock +PT:2/4 +K:Deathtouch +T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Curse.YouOwn | Execute$ TrigDelayedTrig | TriggerDescription$ Whenever a curse is put into your graveyard from the battlefield, return it to the battlefield attached to you at the beginning of the next end step. +SVar:TrigDelayedTrig:DB$ DelayedTrigger | Mode$ Phase | Phase$ End Of Turn | Execute$ TrigReturn | RememberObjects$ TriggeredNewCardLKICopy | TriggerDescription$ Whenever a curse is put into your graveyard from the battlefield, return it to the battlefield attached to you at the beginning of the next end step. +SVar:TrigReturn:DB$ ChangeZone | Defined$ DelayTriggerRememberedLKI | Origin$ Graveyard | Destination$ Battlefield | AttachedToPlayer$ You +T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ TrigChooseCurse | TriggerZones$ Battlefield | OptionalDecider$ You | IsPresent$ Curse.AttachedTo You | TriggerDescription$ At the beginning of your upkeep, you may attach a Curse attached to you to one of your opponents. If you do, draw two cards. +SVar:TrigChooseCurse:DB$ ChooseCard | Choices$ Curse.AttachedTo You | ChoiceTitle$ Select a curse attached to you | SubAbility$ DBChooseOpponent +SVar:DBChooseOpponent:DB$ ChoosePlayer | ConditionDefined$ ChosenCard | ConditionPresent$ Card | Defined$ You | Choices$ Player.Opponent | ChoiceTitle$ Select an opponent to attach the curse to | SubAbility$ DBAttach +SVar:DBAttach:DB$ Attach | Object$ ChosenCard | Defined$ ChosenPlayer | RememberAttached$ True | SubAbility$ DBDraw | +SVar:DBDraw:DB$ Draw | ConditionDefined$ Remembered | ConditionPresent$ Curse.AttachedTo ChosenPlayer | Defined$ You | NumCards$ 2 | SubAbility$ DBCleanup +SVar:DBCleanup:DB$ Cleanup | ClearChosenCard$ True | ClearChosenPlayer$ True | ClearRemembered$ True +DeckNeeds:Type$Curse +Oracle:Deathtouch\nWhenever a Curse is put into your graveyard from the battlefield, return it to the battlefield attached to you at the beginning of the next end step.\nAt the beginning of your upkeep, you may attach a Curse attached to you to one of your opponents. If you do, draw two cards. From 78e2998cc68dce229076a573c0f66b87d5c1cfdc Mon Sep 17 00:00:00 2001 From: Northmoc Date: Mon, 27 Sep 2021 10:33:53 -0400 Subject: [PATCH 2/3] support "RememberAttached" --- .../src/main/java/forge/game/ability/effects/AttachEffect.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/forge-game/src/main/java/forge/game/ability/effects/AttachEffect.java b/forge-game/src/main/java/forge/game/ability/effects/AttachEffect.java index 3bdefc145b1..e32d38d2469 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/AttachEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/AttachEffect.java @@ -122,6 +122,9 @@ public class AttachEffect extends SpellAbilityEffect { continue; attachment.attachToEntity(attachTo); + if (sa.hasParam("RememberAttached") && attachment.isAttachedToEntity(attachTo)) { + source.addRemembered(attachment); + } } if (source.isAura() && sa.isSpell()) { From 9e84e2b359aabf206767104450312993538fcae3 Mon Sep 17 00:00:00 2001 From: Northmoc Date: Mon, 27 Sep 2021 10:34:33 -0400 Subject: [PATCH 3/3] implement specific isAttachedTo --- forge-game/src/main/java/forge/game/card/Card.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/forge-game/src/main/java/forge/game/card/Card.java b/forge-game/src/main/java/forge/game/card/Card.java index 7172fde14ab..b22045ff580 100644 --- a/forge-game/src/main/java/forge/game/card/Card.java +++ b/forge-game/src/main/java/forge/game/card/Card.java @@ -3427,6 +3427,9 @@ public class Card extends GameEntity implements Comparable, IHasSVars { public final boolean isAttachedToEntity() { return entityAttachedTo != null; } + public final boolean isAttachedToEntity(final GameEntity e) { + return (entityAttachedTo == e); + } public final Card getAttachedTo() { if (entityAttachedTo instanceof Card) {