mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +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")) {
|
||||
|
||||
Reference in New Issue
Block a user