- FIXME: There is a strange bug with ETB replacement effects not being recreated under certain specific circumstances, for example, when an exiled-face-down card is returned to hand via AF ChangeZone: e.g. The Rack obtained via Necropotence does not work because its ETB effect ends up somehow being not set up correctly.

- For now, introduced a local change specific to Necropotence, but I think this is indicative of a bigger issue in the underlying code. If anyone knows why this is happening and where this is best fixed, please assist.
This commit is contained in:
Agetian
2017-01-19 16:44:01 +00:00
parent 5b3250b420
commit 4f10d64b82
3 changed files with 10 additions and 2 deletions

View File

@@ -613,7 +613,15 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
hostCard.addImprintedCard(movedCard);
}
}
// Without this, for example, The Rack returned from exile to hand via Necropotence has
// its ETB replacement effect missing and does not work.
// TODO: Why does this happen? How generic should this "ETB keyword reset" be and where is it best done?
if (sa.hasParam("ResetETBKeywords")) {
CardFactoryUtil.setupEtbKeywords(movedCard);
}
}
if (!triggerList.isEmpty()) {
final HashMap<String, Object> runParams = new HashMap<String, Object>();

View File

@@ -2449,7 +2449,7 @@ public class CardFactoryUtil {
* TODO: Write javadoc for this method.
* @param card
*/
private static void setupEtbKeywords(final Card card) {
public static void setupEtbKeywords(final Card card) {
for (String kw : card.getKeywords()) {
if (kw.startsWith("ETBReplacement")) {

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
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:TrigReturn:DB$ ChangeZone | Origin$ Exile | Destination$ Hand | Defined$ DelayTriggerRemembered
SVar:TrigReturn:DB$ ChangeZone | Origin$ Exile | Destination$ Hand | ResetETBKeywords$ True | Defined$ DelayTriggerRemembered
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:AICastPreference:NeverCastIfLifeBelow$ 7
SVar:RemRandomDeck:True