- A slightly more generic solution for the Necropotence+The Rack problem, seems like the culprit is the "card that was exiled face down returning to hand" scenario does not reset the ETB replacement effects for some reason. Advice and better solution still welcome.

This commit is contained in:
Agetian
2017-01-19 18:15:27 +00:00
parent 8260c611a8
commit 83a200ef69
2 changed files with 6 additions and 3 deletions

View File

@@ -435,6 +435,8 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
Card movedCard = null; Card movedCard = null;
boolean retExiledFaceDownToHand = originZone.getZoneType().equals(ZoneType.Exile) && destination.equals(ZoneType.Hand) && tgtC.isFaceDown();
if (destination.equals(ZoneType.Library)) { if (destination.equals(ZoneType.Library)) {
// library position is zero indexed // library position is zero indexed
int libraryPosition = 0; int libraryPosition = 0;
@@ -615,9 +617,10 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
} }
// Without this, for example, The Rack returned from exile to hand via Necropotence has // Without this, for example, The Rack returned from exile to hand via Necropotence has
// its ETB replacement effect missing and does not work. // its ETB replacement effect missing and does not work (ditto via any other card that
// exiles a card face down and then returns it to hand, e.g. Bane Alley Broker).
// TODO: Why does this happen? How generic should this "ETB keyword reset" be and where is it best done? // TODO: Why does this happen? How generic should this "ETB keyword reset" be and where is it best done?
if (sa.hasParam("ResetETBKeywords")) { if (retExiledFaceDownToHand) {
CardFactoryUtil.setupEtbKeywords(movedCard); CardFactoryUtil.setupEtbKeywords(movedCard);
} }
} }

View File

@@ -6,7 +6,7 @@ T:Mode$ Discarded | ValidCard$ Card.YouCtrl | TriggerZones$ Battlefield | Execut
SVar:TrigChange:AB$ChangeZone | Cost$ 0 | Defined$ TriggeredCard | Origin$ Graveyard | Destination$ Exile SVar:TrigChange:AB$ChangeZone | Cost$ 0 | Defined$ TriggeredCard | Origin$ Graveyard | Destination$ Exile
A:AB$ ChangeZone | Cost$ PayLife<1> | Defined$ TopOfLibrary | Origin$ Library | Destination$ Exile | ExileFaceDown$ True | RememberChanged$ True | SubAbility$ DelayedReturn | AILogic$ Necropotence | AILifeThreshold$ 1 | SpellDescription$ Exile the top card of your library face down. Put that card into your hand at the beginning of your next end step. A:AB$ ChangeZone | Cost$ PayLife<1> | Defined$ TopOfLibrary | Origin$ Library | Destination$ Exile | ExileFaceDown$ True | RememberChanged$ True | SubAbility$ DelayedReturn | AILogic$ Necropotence | AILifeThreshold$ 1 | SpellDescription$ Exile the top card of your library face down. Put that card into your hand at the beginning of your next end step.
SVar:DelayedReturn:DB$ DelayedTrigger | Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | Execute$ TrigReturn | RememberObjects$ Remembered | TriggerDescription$ Put the exiled card into your hand. | SubAbility$ DBCleanup SVar:DelayedReturn:DB$ DelayedTrigger | Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | Execute$ TrigReturn | RememberObjects$ Remembered | TriggerDescription$ Put the exiled card into your hand. | SubAbility$ DBCleanup
SVar:TrigReturn:DB$ ChangeZone | Origin$ Exile | Destination$ Hand | ResetETBKeywords$ True | Defined$ DelayTriggerRemembered SVar:TrigReturn:DB$ ChangeZone | Origin$ Exile | Destination$ Hand | Defined$ DelayTriggerRemembered
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:AICastPreference:NeverCastIfLifeBelow$ 7 SVar:AICastPreference:NeverCastIfLifeBelow$ 7
SVar:RemRandomDeck:True SVar:RemRandomDeck:True