Skip to content

Conversation

@Wulgaren
Copy link

Problem

The base game's simulation code at card.lua:6801 attempts to index the 'extra' field as a table, but Cryptid's green_joker override sets extra to a number (1). This causes a crash:

card.lua:6801: attempt to index field 'extra' (a number value)

Solution

This fix adds a simulate function to the green_joker override that:

  • Normalizes the extra field to a number before simulation
  • Handles cases where extra might be a table or nil
  • Returns proper simulation results so the base code doesn't need to access extra directly

Testing

Tested in multiplayer game - no crashes when simulating Green Joker effects.

Fixes the crash reported in issue where Green Joker causes game to crash during simulation.

The base game's simulation code at card.lua:6801 attempts to index the 'extra' field as a table, but Cryptid's green_joker override sets extra to a number (1). This causes a crash: 'attempt to index field 'extra' (a number value)'.

This fix adds a simulate function that:
- Normalizes the extra field to a number before simulation
- Handles cases where extra might be a table or nil
- Returns proper simulation results so the base code doesn't need to access extra directly

Fixes crash when simulating Green Joker effects.
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.

1 participant