- 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,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);

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")) {