Skip to content

Chance instead of deckCount per cards - #174

Merged
KonH merged 6 commits into
mainfrom
feature/card-deck-chance-display
Sep 2, 2026
Merged

KonH merged 6 commits into
mainfrom
feature/card-deck-chance-display

Conversation

@KonH

@KonH KonH commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Closes #173

Adds a spec for showing draw chance (weight) instead of/alongside deckCount for cards. The request has genuine scope ambiguity (see spec's Ambiguities section and the issue comment) — no code changes yet, spec-only per /specify.

Owner asked to see draw chance (weight) instead of deckCount for
cards, but the request is ambiguous about scope (debug view text
change vs. a new player-facing surface) and about several other
details (precision, localization, weight-adjustment parity). Capture
that as clarification questions before planning.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
KonH and others added 5 commits September 1, 2026 18:13
Owner answered the /specify clarification questions: scope stays
debug-only (no player-facing surface), the debug view's x{count} is
replaced (not supplemented) with the chance percentage, and the
stop_rivalry/declare_war draw-weight multipliers currently hardcoded
in DrawCardSystem.AdjustWeight move into action_config.json as an
optional per-action field so the debug view's percentages can share
the same weighting the real draw system uses. Spec's Ambiguities
section is replaced with Resolved Decisions capturing each answer.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Owner confirmed the finalized spec and asked to proceed to /plan.
This plan (reviewed and amended per plan-review's four findings)
covers renaming ActionDefinition.DeckCopies (int) to Chance (double)
across both action_config.json copies and every production/test
call site, plus moving the stop_rivalry/declare_war draw-weight
multipliers out of hardcoded DrawCardSystem branches into an
optional config field, and updating the debug deck view to show
chance percentages instead of raw copy counts.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Developer-facing card weighting used an integer "deck copies" count that
only maps to draw probability indirectly, and two of the weight
adjustments (stop_rivalry, declare_war) were hardcoded by action id
instead of living in config alongside every other action property. This
made the debug availability view's displayed percentage diverge from
what the draw system actually used, and made adding a new weighted
special case require a code change.

ActionDefinition.DeckCopies (int) is renamed to Chance (double), and a
new optional DrawWeightMultiplier field replaces the two hardcoded
branches in DrawCardSystem.AdjustWeight (declare_war keeps only its
runtime control-check gate; the multiplier magnitude itself is now
config data). The debug view now renders each card's chance as a
percentage instead of "x{count}", computed from the same weight the
live draw system uses.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…nce-display

# Conflicts:
#	Assets/Configs/game_settings.json
#	Assets/Plugins/Core/Core.Configs.dll
#	Assets/Plugins/Core/Core.Map.dll
#	Assets/Plugins/Core/ECS.Core.Extensions.dll
#	Assets/Plugins/Core/ECS.Core.dll
#	Assets/Plugins/Core/ECS.Viewer.dll
#	Assets/Plugins/Core/Game.Bots.dll
#	Assets/Plugins/Core/Game.Commands.dll
#	Assets/Plugins/Core/Game.Common.dll
#	Assets/Plugins/Core/Game.Components.dll
#	Assets/Plugins/Core/Game.Configs.dll
#	Assets/Plugins/Core/Game.Main.dll
#	Assets/Plugins/Core/Game.Systems.dll
#	ProjectSettings/ProjectSettings.asset
#	src/Game.Tests/VisualStateConverterDebugOrgCardAvailabilityTests.cs
@KonH
KonH merged commit 9ea9f71 into main Sep 2, 2026
3 checks passed
@KonH
KonH deleted the feature/card-deck-chance-display branch September 8, 2026 16:04
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.

Chance instead of deckCount per cards

1 participant