{"@self_hash":"sha256:ea7897416ab139243866fc8cc79846deb20f47380869208883fd8e22e9c4206e","@encoding":"cambridge-tcg/universal/v1","@kind":"play_game_state_schema","@content_hash":"sha256:0e4860a05b66268b40313a55eab68ddd05d73be227848f1742aaacad3ab7c2ca","@retrieved_at":{"iso8601":"2026-05-13T20:44:36.507Z","unix_epoch_seconds":1778705076},"_note_opaque":["zones[].display_label","zones[].initial_content","phases[].display_label","phases[].first_turn_modifier","combat_steps[].display_label","combat_steps[].description","win_conditions[].rule"],"_links":{"canonical":"/api/v1/play/game-state-schema","methodology":"/methodology/play-module","connections":["docs/connections/the-play-substrate.md","docs/connections/the-play-interconnect.md","docs/research/optcg-mechanics-and-engine-design.md","docs/research/play-engine-l3-design.md"],"manifest":"/api/v1/manifest","see_also":{"play_index":"/api/v1/play/index.json","tutorial":"/api/v1/play/tutorial","glossary":"/api/v1/play/glossary","archetypes":"/api/v1/play/archetypes","effect_grammar":"/api/v1/play/effect-grammar","deck_validate":"/api/v1/play/deck/validate","example_match":"/api/v1/play/example-match"},"tutorial":"/api/v1/play/tutorial","glossary":"/api/v1/play/glossary","effect_grammar":"/api/v1/play/effect-grammar","deck_validate":"/api/v1/play/deck/validate","spec_page":"/play/spec","openapi":"/api/openapi.json#/paths/~1api~1v1~1play~1game-state-schema/get"},"version":"1.0.0","game":"optcg","perspective_note":"This schema describes the canonical match state the future engine will conform to. The state is two players × zones + shared turn state. Card-state granularity differs by zone (e.g., character_area tracks summoning_sickness; hand does not). Visibility is intrinsic to the zone, not a per-game choice.","zone_count":9,"zones":[{"id":"leader_area","display_label":"Leader Area","visibility":"public","ordering":"unordered","cap":1,"initial_content":"1 Leader card chosen by player","card_state_granularity":["active_rested","attached_don","attached_items","turn_effect_modifiers"]},{"id":"character_area","display_label":"Character Area","visibility":"public","ordering":"unordered","cap":5,"initial_content":"empty","card_state_granularity":["active_rested","attached_don","summoning_sickness","once_per_turn_used_flags","permanent_effect_modifiers"]},{"id":"stage_area","display_label":"Stage Area","visibility":"public","ordering":"unordered","cap":1,"initial_content":"empty","card_state_granularity":["active_rested"]},{"id":"hand","display_label":"Hand","visibility":"private_to_owner","ordering":"unordered","cap":null,"initial_content":"5 cards drawn (one mulligan allowed)","card_state_granularity":[]},{"id":"deck","display_label":"Deck","visibility":"private_to_owner","ordering":"top_matters","cap":null,"initial_content":"50 - 5 (life) - 5 (hand) = 40 cards after setup","card_state_granularity":[]},{"id":"life_pile","display_label":"Life Pile","visibility":"private_face_down","ordering":"top_matters","cap":null,"initial_content":"cards from top of deck equal to Leader's Life value (typically 4-5)","card_state_granularity":[]},{"id":"trash","display_label":"Trash","visibility":"public","ordering":"ordered","cap":null,"initial_content":"empty","card_state_granularity":[]},{"id":"don_deck","display_label":"DON!! Deck","visibility":"private_to_owner","ordering":"unordered","cap":10,"initial_content":"10 identical DON!! cards","card_state_granularity":[]},{"id":"cost_area","display_label":"Cost Area (Active DON pool)","visibility":"public","ordering":"unordered","cap":10,"initial_content":"empty (DON enters from DON Deck during DON Phase)","card_state_granularity":["active_rested","attached_to_unit"]}],"shared_turn_state":{"active_player_id":"the player whose turn it is","turn_number":"starts at 1, increments at end-of-turn","current_phase":"one of: refresh / draw / don / main / end","attack_state":"null when no attack in progress; otherwise: {attacker_unit, target_unit, current_step, counter_stack, base_attacker_power, base_target_power}","effect_resolution_queue":"FIFO queue of auto-effects waiting to resolve"},"phase_count":5,"phases":[{"id":"refresh","display_label":"Refresh Phase","position":1,"actions":["all_rested_cards_become_active","attached_don_returns_active_to_cost_area","start_of_turn_effects_resolve"],"first_turn_modifier":null},{"id":"draw","display_label":"Draw Phase","position":2,"actions":["draw_1_from_deck","if_deck_empty_immediate_loss"],"first_turn_modifier":"first_player_skips_draw_on_turn_1"},{"id":"don","display_label":"DON!! Phase","position":3,"actions":["add_2_don_from_don_deck_to_cost_area_active","max_cap_10"],"first_turn_modifier":"first_player_adds_1_don_only_on_turn_1"},{"id":"main","display_label":"Main Phase","position":4,"actions":["play_character_pay_cost","play_event_pay_cost_resolve_send_trash","play_stage_pay_cost_replace_existing","attach_don_to_leader_or_character","activate_main_ability","declare_attack","may_repeat_in_any_order_until_end"],"first_turn_modifier":"no_attacks_on_turn_1_by_either_player"},{"id":"end","display_label":"End Phase","position":5,"actions":["end_of_turn_effects_resolve","attached_don_returns_to_cost_area_rested","temporary_power_buffs_expire","turn_passes_to_opponent"],"first_turn_modifier":null}],"combat_step_count":4,"combat_steps":[{"id":"step_1_declaration","display_label":"Attack Declaration","position":1,"who_acts":"attacker","description":"Attacker rests an active Leader or Character; chooses target (opponent's Leader always legal OR one of opponent's rested Characters; active Characters cannot be targeted).","effects_window":"when_attacking_effects_on_attacker_fire_here"},{"id":"step_2_block","display_label":"Block Step","position":2,"who_acts":"defender","description":"Defender may rest one of their active Blockers to redirect the attack onto itself. Optional. Only one Blocker per attack.","effects_window":"blocker_keyword_check"},{"id":"step_3_counter","display_label":"Counter Step","position":3,"who_acts":"defender","description":"Defender may discard Counter cards from hand (+1000 or +2000 per card) and play Counter Events from hand (pay DON cost). Counters stack additively. Both players pass to end the step. The only step with priority/timing back-and-forth.","effects_window":"counter_keyword_window"},{"id":"step_4_damage","display_label":"Damage Step","position":4,"who_acts":"shared","description":"Compare powers. Defender survives iff defender_power > attacker_power STRICTLY (ties favor attacker). Character target: K.O.'d (Trash, On K.O. fires). Leader target: top of Life Pile flips face-up; optional Trigger resolves free; card enters Hand. Double Attack causes 2 Life flips on Leader hit. Banish sends Life card to Trash instead of Hand.","effects_window":"on_ko_effects_resolve_here_in_order"}],"damage_resolution_rule":"defender_survives_iff_defender_power_GREATER_THAN_attacker_power_strict_ties_favor_attacker","win_conditions":[{"id":"knockout","primary":true,"rule":"When defender's Life Pile is at zero AND a successful attack hits the defender's Leader, the defender loses. (Hitting a Leader when Life=0 with no successful damage doesn't end the game; the Counter step still matters at 0 Life.)"},{"id":"deck_out","primary":true,"rule":"When a player must draw but their deck is empty, they immediately lose."},{"id":"special_leader_condition","primary":false,"rule":"Some Leaders have alternative win conditions printed on them (e.g., Nami Blue from OP02 wins by emptying her own deck through specific effects). Per-leader override."}],"deck_rules":{"leader_cards":1,"main_deck_count":50,"don_deck_count":10,"total_cards_before_life":61,"max_copies_per_card_id":4,"alt_arts_share_card_id_for_copy_count":true,"color_rule":"every card in main deck must share at least one color with the Leader","format_block_rotation_effective":"2026-04-01: OP01-OP04 rotated out of Standard format","legal_formats":["Standard","Legacy","Limited Sealed"]},"don_states":["active_in_cost_area","rested_in_cost_area","attached_to_unit"],"don_attach_effect":"attached_don_grants_+1000_power_per_card_for_owner_turn_only","don_end_of_turn":"attached_don_returns_to_cost_area_rested_then_active_at_next_refresh"}