Skip to content

fix & update Debug.PreAddCounter#827

Merged
mercury233 merged 1 commit into
Fluorohydride:masterfrom
mercury233:patch-copilot-4
Mar 13, 2026
Merged

fix & update Debug.PreAddCounter#827
mercury233 merged 1 commit into
Fluorohydride:masterfrom
mercury233:patch-copilot-4

Conversation

@mercury233

Copy link
Copy Markdown
Collaborator

It was requiring 2 params in check_param_count, but actually require 3. Now it use 1 as the default value of the 3rd param count.
And the truncation logic was redundant.

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.

Pull request overview

This PR fixes Debug.PreAddCounter’s Lua argument handling so it no longer implicitly depends on a 3rd stack argument being present, and simplifies counter type handling to match the underlying card::counter_map key type.

Changes:

  • Default the optional 3rd parameter (count) to 1 and only read it when provided.
  • Simplify counter type handling by using uint16_t directly (matching card::counter_map).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mercury233 mercury233 merged commit 048396e into Fluorohydride:master Mar 13, 2026
6 checks passed
@mercury233 mercury233 deleted the patch-copilot-4 branch March 13, 2026 02:00
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