Skip to content

fix(cards): add default SVar:X:1 for Clay Golem monstrosity roll - #12219

Open
steple wants to merge 1 commit into
Card-Forge:masterfrom
steple:bugfix/clay-golem-monstrosity-svar
Open

steple wants to merge 1 commit into
Card-Forge:masterfrom
steple:bugfix/clay-golem-monstrosity-svar

Conversation

@steple

@steple steple commented Oct 10, 2026 •

Copy link
Copy Markdown

Summary

Fixes an issue with Clay Golem where calculating the monstrosity counter amount before or outside of dynamic dice resolution could fail or misbehave due to a missing fallback definition for variable X.

Details

  • Added SVar:X:1 to clay_golem.txt.
  • When rolling for monstrosity (RollDice<1/8/X>), X is determined dynamically during activation/resolution, but having a default value (SVar:X:1) ensures AbilityUtils.calculateAmount and any static/AI evaluations evaluate safely to a valid base value instead of evaluating an undefined variable.
  • Added a unit test (ClayGolemTest) verifying that Clay Golem loads with default SVar:X=1, retains its Monstrosity X ability parameter, and correctly calculates the amount.

Gemini contributed.


@Test
public void testClayGolemHasDefaultSVarXAndResolvesMonstrosityAmount() {
Game game = initAndCreateGame();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants