- Introduction
- MTG Core Rules
- 1. Core Rules Overview
❱
- 1.1. Turn Structure
❱
- 1.1.1. Priority System
- 1.1.2. Phases
- 1.2. Zones
- 1.3. Stack
❱
- 1.3.1. Stack Resolution
- 1.4. State-Based Actions
- 1.5. Combat
❱
- 1.5.1. Combat Phases
- 1.5.2. First Strike and Double Strike
- 1.5.3. Combat Damage Calculation
- 1.6. Abilities
- 1.7. Casting Spells
- 1.8. ECS Implementation
- Game Formats
- 2. Commander Format
❱
- 2.1. Overview
❱
- 2.1.1. Format History
- 2.1.2. Key Principles
- 2.1.3. Format Rules
- 2.1.4. Implementation Approach
- 2.1.5. Architecture
- 2.2. Game Mechanics
❱
- 2.2.1. Testing Guide
- 2.2.2. State-Based Actions
- 2.2.3. Triggered Abilities
- 2.2.4. Random Elements
- 2.2.5. Game State
- 2.2.6. Random Mechanics
- 2.3. Player Mechanics
❱
- 2.3.1. Life Total Management
- 2.3.2. Commander Tax
- 2.3.3. Color Identity
- 2.4. Game Zones
❱
- 2.4.1. Command Zone
- 2.4.2. Exile Zone
- 2.4.3. Zone Transitions
- 2.4.4. Zone Management
- 2.4.5. Tests
❱
- 2.4.5.1. Command Zone Tests
- 2.5. Turns and Phases
❱
- 2.5.1. Turn Structure
- 2.5.2. Priority System
- 2.5.3. Multiplayer Turns
- 2.5.4. Extra Turns
- 2.5.5. Phase Management
- 2.5.6. Multiplayer Turn Handling
- 2.5.7. Tests
❱
- 2.5.7.1. Multiplayer Turn Structure
- 2.6. Stack and Priority
❱
- 2.6.1. Stack Implementation
- 2.6.2. Priority Passing
- 2.6.3. Special Timing Rules
- 2.6.4. Tests
❱
- 2.6.4.1. Stack Resolution Tests
- 2.7. Combat
❱
- 2.7.1. Combat Phases
- 2.7.2. Commander Damage
- 2.7.3. Multiplayer Combat
- 2.7.4. Combat System
- 2.7.5. Combat Verification
- 2.7.6. Beginning of Combat
- 2.7.7. Declare Attackers
- 2.7.8. Declare Blockers
- 2.7.9. First Strike Damage
- 2.7.10. Combat Damage
- 2.7.11. End of Combat
- 2.7.12. Combat Abilities
- 2.7.13. Tests
❱
- 2.7.13.1. Edge Cases
❱
- 2.7.13.1.1. Commander-Specific Interactions
- 2.7.13.1.2. Complex Interactions
- 2.7.13.2. Phasing
❱
- 2.7.13.2.1. Phasing During Combat
- 2.7.13.3. Pump Spells
❱
- 2.7.13.3.1. Combat Pumps
- 2.8. Special Rules
❱
- 2.8.1. Multiplayer Politics
- 2.8.2. Politics Testing
- 2.8.3. Partner Commanders
- 2.8.4. Commander Ninjutsu
- 2.8.5. Commander Death Triggers
- 2.8.6. Commander-Specific Cards
- 2.8.7. Politics Tests
❱
- 2.8.7.1. Deal Testing
- 2.8.7.2. Monarch Testing
- 2.8.7.3. Voting Testing
- 2.8.8. Tests
❱
- 2.8.8.1. Commander-Specific Rules Tests
- 2.9. Integration with Core Rules
- Card Systems
- 3. Card Systems
❱
- 3.1. Card Database
❱
- 3.1.1. Data Structure
- 3.1.2. Card Attributes
- 3.2. Deck Database
❱
- 3.2.1. Deck Structure
- 3.2.2. Deck Builder
- 3.2.3. Deck Registry
- 3.2.4. Format Validation
- 3.2.5. Persistent Storage
- 3.3. Card Effects
❱
- 3.3.1. Effect Resolution
- 3.3.2. Targeting
- 3.3.3. Complex Interactions
- 3.3.4. Special Card Implementations
- 3.4. Card Rendering
❱
- 3.4.1. Art Assets
- 3.4.2. Card Layout
- 3.5. Testing Cards
❱
- 3.5.1. Effect Verification
- 3.5.2. Interaction Testing
- 3.5.3. Card Interaction Testing
- 3.6. UI Integration
- Game UI
- 4. Game UI System
❱
- 4.1. Overview
- 4.2. Layout Components
❱
- 4.2.1. Layout System
- 4.2.2. Responsive Design
- 4.2.3. Zone Visualization
- 4.3. Card Visualization
❱
- 4.3.1. Card Rendering
- 4.3.2. Card States
- 4.3.3. Card Animations
- 4.4. Interaction Systems
❱
- 4.4.1. Card Selection
- 4.4.2. Drag and Drop
- 4.4.3. Targeting System
- 4.5. Table View
❱
- 4.5.1. Battlefield Layout
- 4.5.2. Card Stacking
- 4.6. Playmat Design
❱
- 4.6.1. Zone Design
- 4.6.2. Visual Themes
- 4.7. Chat System
❱
- 4.7.1. Message Display
- 4.7.2. Emote System
- 4.7.3. Chat API
- 4.7.4. Network Protocol
- 4.7.5. Text Chat
- 4.7.6. Voice Chat
- 4.8. Avatar System
❱
- 4.8.1. Avatar Selection
- 4.8.2. Custom Avatars
- 4.9. Accessibility
❱
- 4.9.1. Screen Reader Support
- 4.9.2. Color Contrast
- 4.9.3. Control Options
- 4.10. Testing
❱
- 4.10.1. UI Component Testing
- 4.10.2. Visual Regression
- 4.11. Card Systems Integration
- 4.12. Network Integration
- Networking
- 5. Networking
❱
- 5.1. Core Networking
❱
- 5.1.1. Connection Management
- 5.1.2. Data Synchronization
- 5.1.3. Error Handling
- 5.1.4. Implementation Details
- 5.1.5. Multiplayer Overview
- 5.1.6. Protocol Specification
- 5.1.7. Replicon Integration
- 5.2. Lobby System
❱
- 5.2.1. Matchmaking
- 5.2.2. Friend System
- 5.2.3. Backend
❱
- 5.2.3.1. Implementation
- 5.2.3.2. Networking
- 5.2.4. Chat
❱
- 5.2.4.1. UI
- 5.2.5. Deck
❱
- 5.2.5.1. Viewer
- 5.2.6. UI
❱
- 5.2.6.1. Detail View
- 5.2.6.2. Overview
- 5.3. Gameplay Networking
❱
- 5.3.1. State Management
❱
- 5.3.1.1. Rollback System
- 5.3.1.2. Deterministic Logic
- 5.3.1.3. Replicon Rollback
- 5.3.2. Action Broadcasting
- 5.3.3. Latency Compensation
- 5.3.4. Departure
❱
- 5.3.4.1. Handling
- 5.3.5. Synchronization
❱
- 5.3.5.1. RNG Rollback
- 5.4. Testing
❱
- 5.4.1. Overview
- 5.4.2. RNG Synchronization Tests
- 5.4.3. Advanced Testing Techniques
- 5.4.4. Simulated Network Conditions
- 5.4.5. Replicon RNG Tests
- 5.4.6. Integration
❱
- 5.4.6.1. Strategy
- 5.4.7. Security
❱
- 5.4.7.1. Strategy
- 5.5. Security
❱
- 5.5.1. Anti-Cheat Measures
- 5.5.2. Data Validation
- 5.5.3. Encryption
- 5.5.4. Authentication
- 5.5.5. Hidden Information
- 5.6. UI Integration
- Technical Implementation
- 6. Game Engine
❱
- 6.1. State Management
❱
- 6.1.1. Subgames and Game Restarting
- 6.2. Event System
- Core Systems
- 7. Snapshot System
❱
- 7.1. Overview
- 7.2. Implementation
- 7.3. Integration with Networking
- 7.4. Persistent Storage
- 7.5. Testing
- 7.6. API Reference
- Testing
- 8. Testing Overview
❱
- 8.1. Testing Strategies
- 8.2. Unit Tests
- 8.3. Integration Tests
- 8.4. Visual Testing
- 8.5. Test Fixtures
- 8.6. Snapshot Testing
- 8.7. CI/CD Pipeline
- 8.8. Development Integration
- Development
- 9. Development Guide
❱
- 9.1. Getting Started
- 9.2. Architecture Overview
- 9.3. Code Style
- 9.4. Working with Bevy
❱
- 9.4.1. Entity Component System
- 9.4.2. Plugin Architecture
- 9.4.3. Rendering
- 9.4.4. Camera Management
- 9.4.5. Random Number Generation
- 9.4.6. Deprecated APIs
- 9.4.7. Persistent Storage
- 9.5. Testing Integration
- Reference
- 10. API Reference
❱
- 10.1. Core Types
- 10.2. Component Reference
- 10.3. System Reference
- 11. MTG Rules Reference
❱
- 11.1. Comprehensive Rules Overview
- 11.2. Commander-Specific Rules
- 11.3. Turn Structure
- 11.4. Stack
- 11.5. Zones
- 11.6. Combat
- 11.7. State-Based Actions
- 11.8. Targeting
- 11.9. Card States
- 11.10. Mana Costs
- 11.11. Triggered Abilities
- 11.12. Replacement Effects
- 11.13. Subgames and Game Restarting
- 11.14. Priority
- 11.15. Layer System
- 12. Contribution Guidelines
- 13. Documentation Guide
- 14. Git Workflow Guidelines
- 15. Glossary
- 16. WSL2 Guide
- Save/Load System
- 17. Save/Load System
❱
- 17.1. Overview
- 17.2. Implementation
- 17.3. Integration with Networking
- 17.4. Persistent Storage
- 17.5. WebAssembly Local Storage
- 17.6. Testing
- 17.7. API Reference