API Reference

This section provides detailed documentation for the Rummage game engine API, including core types, components, systems, and their relationships.

Overview

The Rummage API is built around Bevy's Entity Component System (ECS) architecture, organizing game elements through components, resources, and systems. This documentation helps developers understand how these pieces fit together to implement MTG Commander gameplay.

Core Modules

The API is organized into the following core modules:

  • Game Engine - Core game logic, rules implementation, and state management
  • Card Systems - Card representation, effects, and interactions
  • Player - Player state, resources, and interactions
  • UI - Game interface and visual elements
  • Networking - Multiplayer functionality and state synchronization

Game Engine APIs

The game engine implements the core MTG rules through several interconnected modules:

  • Actions - Game actions and their resolution
  • State - Game state tracking and transitions
  • Zones - Game zones (library, hand, battlefield, etc.)
  • Stack - The MTG stack and priority system
  • Turns & Phases - Turn structure and phase progression
  • Combat - Combat mechanics and damage resolution
  • Commander - Commander-specific rules implementation

How to Use This Documentation

  • Core Types - Fundamental types like GameState, Phase, etc.
  • Component Reference - Documentation for all ECS components
  • System Reference - Documentation for all ECS systems and their functions
  • Resource Reference - Documentation for game resources and global state

For implementation details, see the corresponding sections in the MTG Core Rules and Commander Format documentation.