Skip to content

Build creature tokens through one helper - #470

Merged
valzargaming merged 1 commit into
mainfrom
claude/project-thread-unhs00
Nov 12, 2026
Merged

valzargaming merged 1 commit into
mainfrom
claude/project-thread-unhs00

Conversation

@valzargaming

Copy link
Copy Markdown
Member

Requested by Val · project thread

Item 5 of the structural review: token catalog.

What changed

Nine places spelled out the same nine-key card array for a creature token: Fish, Warrior, Rebel, Phyrexian Germ, Spirit, the Incubator's Phyrexian back face, Hero and Servo in Game, and the parsed "create a 2/2 red Goblin creature token" case in TextParser. Tokens::creature() now builds that array. The result is identical key for key, so saved games and token behavior are unchanged.

Smaller than estimated

The review counted 19 inline token arrays. On a closer look the seven artifact tokens (Food, Clue, Treasure, …) are already one table in TextParser, and the Incubator front face, Jace and the OptionalChoices Goblin (a constant, which cannot call a function) are one-offs left as they are. This is a readability change more than a size change: lines get shorter, but with the new file's doc comments the total is slightly up.

Verification

Full suite locally: 2591 tests, 2 skipped (the existing missing-import skips). Pint clean. Pins for Game.php and TextParser.php refreshed with composer pins.


Generated by Claude Code

Nine places in Game and TextParser spelled out the same nine-key card
array for a creature token. Tokens::creature() now builds it; the arrays
produced are identical, key for key.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WTP2SqPTWy8sMSFHkDL2C
Copilot AI balanced review requested due to automatic review settings November 12, 2026 23:12
@valzargaming valzargaming self-assigned this Nov 12, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@valzargaming
valzargaming merged commit 20f9a4d into main Nov 12, 2026
4 checks passed
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.

3 participants