mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
- 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:
@@ -613,8 +613,16 @@ 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>();
|
||||
runParams.put("Cards", triggerList);
|
||||
|
||||
@@ -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")) {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user