Skip to content

Update mechanism for marking effects ("register flags")#1190

Merged
that-hatter merged 11 commits intomasterfrom
register-flag
Jun 29, 2025
Merged

Update mechanism for marking effects ("register flags")#1190
that-hatter merged 11 commits intomasterfrom
register-flag

Conversation

@that-hatter
Copy link
Copy Markdown
Member

  • removed redundant step of "mapping" bits into the actual effect codes (now the effect codes are simply passed directly)
  • renamed REGISTER_FLAG_ constants to EFFECT_MARKER_ constants and updated uses
  • added Card.GetMarkedEffects helper function to fetch a card's effects that were registered with a marker
  • updated "Thunder Dragon Thunderstormech" to use new helper function

Since `Card.RegisterEffect` loops through the passed register flags, they don't need to have unique bits. This removes the unnecessary conversion step from flag to code.
A function for retrieving a card's effects that were registered with "register flags". This returns the actual effects directly, instead of the flag effects that have them as label object (which is what `GetCardEffect` returns).
Made the card use `GetEffectsWithRegisterFlag` instead of `GetCardEffect`.
Since `Card.RegisterEffect` loops through the passed register flags, they don't need to have unique bits. This removes the unnecessary conversion step from flag to code.
A function for retrieving a card's effects that were registered with "register flags". This returns the actual effects directly, instead of the flag effects that have them as label object (which is what `GetCardEffect` returns).
Made the card use `GetEffectsWithRegisterFlag` instead of `GetCardEffect`.
old REGISTER_FLAG constants will still work but are deprecated
@that-hatter that-hatter merged commit c3e3b8a into master Jun 29, 2025
1 check passed
@pyrQ pyrQ deleted the register-flag branch July 6, 2025 11:03
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