Merge branch 'master' into 'master'

Remove Optional$ True when precasting spells in effect from a script (e.g. Puzzle Mode).

See merge request core-developers/forge!6170
This commit is contained in:
Michael Kamensky
2022-02-06 05:30:26 +00:00

View File

@@ -935,6 +935,11 @@ public abstract class GameState {
svarValue += " | ValidTgts$ Card";
}
}
// We don't want to ask for Optional, since the effect is being precast as already active
if (svarValue.contains("| Optional$")) {
svarValue = TextUtil.fastReplace(svarValue, "| Optional$", "| RemovedOptional$");
}
}
sa = AbilityFactory.getAbility(svarValue, c);