Create a macro-level gameplay loop and balance simulation diagram for a 2-player turn-based board game based on "Orlog" with a custom 60-card deck mechanism ("Divan-e Rajaz").
### 1. PLAYER STATES
- Set up Player 1 and Player 2.
- Each player has an "HP_Pool" initialized at 15. If either pool reaches 0, the execution stops (End Game condition).
- Each player has a "Gem_Pool" (God Tokens) initialized at 0.
### 2. TURN & PHASE STRUCTURE (Sequential Execution)
Implement a state machine tracking Turn Order:
- Alternating Starter: Create a "Turn_Counter". If odd, Player 1 is the Active Player. If even, Player 2 is the Active Player.
- Active Player Roll Phase: The Active Player rolls 6 dice, executes up to 2 rerolls (simulate this using a delay or value multiplier), and locks their final dice pool.
- Inactive Player Roll Phase: Once the Active Player finishes, the Inactive Player performs their entire rolling/rerolling phase.
- Resolution Phase: Compare combat dice (Axes vs. Shields, Arrows vs. Helmets). Allocate damage to HP_Pools and collect Gems from "Border" dice faces and "Hand" (steal) mechanics.
### 3. BATTLE CARD MECHANIC ("Divan-e Rajaz")
After the resolution phase, both players draw 1 random card from a 60-card virtual deck. Use a Random Gate (1-60 distribution) or group them into 4 distinct functional Converters/Drains based on their mechanical behaviors:
Category A: HP Modifiers (Direct Damage / Healing)
- Map cards that instantly heal or deal flat damage directly to HP_Pools.
- Include extreme logic for Legendary Cards: Card 59 (Deal 8 unblockable damage, permanent +1 attack buff) and Card 60 (Lose 50% current HP, double all future Gem costs).
- Cards in this group: 1, 8, 17, 20, 25, 38, 49, 52, 56, 59, 60.
Category B: Gem Economy Modifiers (Income / Tax / Steal)
- Map cards that manipulate the Gem_Pools.
- Include conditions where players steal gems from each other or trade HP for Gems.
- Cards in this group: 2, 9, 11, 15, 16, 19, 23, 26, 29, 31, 40, 41, 43, 44, 46, 47, 51, 54.
Category C: Combat Modifier Buffs/Debuffs (Dice Manipulation)
- Use Registers to apply multipliers or flat additions to combat dice calculations for the current round (e.g., ignoring ranged damage, doubling arrow damage, disabling shields).
- Cards in this group: 3, 4, 5, 6, 7, 10, 12, 13, 18, 21, 22, 24, 27, 28, 30, 33, 34, 35, 36, 39, 48, 50, 57, 58.
Category D: Deck & Utility Logic (Card Draw / Manipulation)
- For macro-simulation purposes, treat these as a simple "Reroll Card Effect" or "Draw Extra Card" trigger to simulate tactical choice.
- Cards in this group: 14, 32, 37, 45, 53, 55.
### 4. SIMULATION OBJECTIVE
Ensure all resource paths use Interactive or Automated runs so I can execute Monte Carlo simulations. The goal is to track if Player 1 has an unfair statistical advantage over Player 2 due to the alternating turn order, and to see if extreme cards like Card 59 break the end-game progression curve too rapidly.