Super strategic mode - Developer documentation
1) Scope
This document describes Super Strategic mode implementation.
Super Strategic is built on top of Strategic mode and adds:
per-round event phase (
event_time_start/event_time_end)one-shot bonus cards per player
event action resolution before card comparison scoring
For base Strategic architecture, see Doc/strategic_mode_for_developers.md.
2) Main components
Backend
apiserver/apiserver/routers/super_strategic_game.pyapiserver/apiserver/controllers/super_strategic_game_controller.pyapiserver/apiserver/services/super_strategic_game_service.pyapiserver/apiserver/models/super_strategic_room.pyapiserver/apiserver/models/super_strategic_player.pyinherited base logic:
apiserver/apiserver/services/strategic_game_service.py
Frontend
frontend/engines/SuperStrategicEngine.tsfrontend/class/SuperStrategicGame.tsfrontend/types/StrategicGame.tsfrontend/composables/useGameWebSocket.tsfrontend/pages/super-strategic-game-board.vue
3) Transport and endpoints
REST
POST /super_strategic/create_roombody:
mode,max_players,deck_id
Mode constraints:
tutorial / solo / random match force
max_players=2otherwise
max_playersmust be in{2,3,4}
WebSocket
GET WS /super_strategic/ws/{room_id}/{pseudo}GET WS /super_strategic/ws/{room_id}/{pseudo}/{token}
Core events:
server to client:
game_context,player_join,game_start,round_start,event_time_start,event_card_played,event_time_skipped,event_time_end,indicator_changed,reveal_indicator,hand_updated,block,steal,round_result,game_finish,player_leave,errorclient to server:
selected_card,event_card,event_skip
4) Room state extensions
SuperStrategicRoom extends StrategicRoom with event-phase state:
event_time_secondsevent_phase_active,event_phase_deadline_ms,event_phase_taskevent_cards_catalog,player_event_cardspending_event_actionsand sequence orderinground modifiers:
double_down_players,streak_bonus_players,still_targetsindicator mutation support:
pending_indicator_change
5) Event phase lifecycle
At round start:
Choose current indicator and round indicators.
Send
round_startwith each player’s hand.If at least one active non-bot player has event cards, open event phase and send
event_time_start.Players either play an event card (
event_card) or skip (event_skip).Event phase ends on timeout or early-complete condition.
Backend applies event actions (with priority), sends resolution events, then transitions to normal card selection.
Important behavior:
if no active player has event cards, event phase is skipped entirely
in this case only
round_startis emitted for that round
6) Event actions and priority
Actions are normalized and resolved by priority:
block>change>steal>swap>trade>reveal>double_down>streak
Key effects:
block: cancels targeted or wildcard actionchange: changes current indicator before play resolutionsteal: redirects target player’s adjusted pointsswap/trade: mutate player handsreveal: reveals selected card value for current indicatordouble_down: 2x points multiplierstreak: streak-based multiplier
7) Round scoring
Base scoring comes from Strategic resolve logic. Super Strategic then applies event modifiers:
double_downmultiplies round points by 2streakmultiplies by(current_streak + 1)when eligiblestealtransfers adjusted points from target to source
After resolution:
streak counters are updated
temporary event modifiers are cleared
8) Persistence and leaderboard
game record is created at start and updated to finish at end
leaderboard writes use
game_type=SUPER_STRATEGICtutorial mode does not write leaderboard entries
9) Frontend runtime behavior
SuperStrategicEngine maintains explicit flow phases:
round_startevent_timeevent-resolution subphase
game_timeround_resultfinished
The engine consumes event-resolution messages (indicator_changed, hand_updated, reveal_indicator, block, steal) before opening/continuing card play UI.
10) Operational notes
Event phase timeout is configurable through
SUPER_STRATEGIC_EVENT_TIME_SECONDS.If only one active player remains, room auto-finishes.
Pseudo toxicity and room-join validations are inherited from strategic base services.