mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
- A temporary hacky fix to make it possible to disable the damage prevention replacement effects when a card loses the relevant keyword (e.g. Glittering Lion).
- Most likely won't work in certain corner cases, so it's in until a rewrite is done to properly support this.
This commit is contained in:
@@ -3513,7 +3513,7 @@ public class CardFactoryUtil {
|
||||
if (isCombat) {
|
||||
rep += "| IsCombat$ True";
|
||||
}
|
||||
rep += "| Secondary$ True | Description$ " + keyword;
|
||||
rep += "| Secondary$ True | TiedToKeyword$ " + keyword + " | Description$ " + keyword;
|
||||
|
||||
if (from) {
|
||||
String fromRep = rep + " | ValidSource$ Card.Self";
|
||||
|
||||
@@ -110,6 +110,15 @@ public class ReplacementHandler {
|
||||
// getting hit by mass removal should still produce tokens).
|
||||
Zone cardZone = "True".equals(replacementEffect.getMapParams().get("CheckSelfLKIZone")) ? game.getChangeZoneLKIInfo(crd).getLastKnownZone() : game.getZoneOf(crd);
|
||||
|
||||
// Replacement effects that are tied to keywords (e.g. damage prevention effects - if the keyword is removed, the replacement
|
||||
// effect should be inactive)
|
||||
if (replacementEffect.hasParam("TiedToKeyword")) {
|
||||
String kw = replacementEffect.getParam("TiedToKeyword");
|
||||
if (!crd.hasKeyword(kw)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (!replacementEffect.hasRun()
|
||||
&& (layer == null || replacementEffect.getLayer() == layer)
|
||||
&& replacementEffect.requirementsCheck(game)
|
||||
|
||||
Reference in New Issue
Block a user