How holynova/mafa-survivor works
Mafa Survivor is a browser-based, single-player survivor game. Players choose a class and chapter, fight through waves using skills, equipment, and summons, then develop their build and persistent progress. The graph shows the React/Phaser entry and presentation layers, the game simulation and its domain systems, and the progression/save and test-mode branches. Relationships are limited to calls or module references visible in excerpts, the SOURCE INDEX, or the README; unsampled internals may have additional connections.
Main entry points: game.ts Game State · App.tsx Game UI · test-mode.ts Test Mode · spells.ts Skills and Spells
Components 23
Player Interface
- Game UI
src/App.tsx - Audio Settings
src/AudioSettings.tsx - Save Manager
src/SaveManager.tsx - Skill Guide
src/SkillGuide.tsx - Test Tools UI
src/TestTools.tsx
Game Runtime
- Browser Entry
src/main.tsx - Phaser Renderer
src/renderer.ts - Simulation Adapter
src/simulation.ts - Game State
src/game.ts - Game Audio
src/sound.ts
Combat and Content
- World Navigation
src/world.ts - Game Content
src/content.ts - Class Definitions
src/classes.ts - Skills and Spells
src/spells.ts - Skill Growth
src/skill-growth.ts - Combat Rules
src/rules.ts - Taoist Systems
src/taoist.ts - Equipment
src/equipment.ts
Progress and Tools
- Test Mode
src/test-mode.ts - Save and Progress
src/save.ts - Run Checkpoints
src/checkpoint.ts - Talent System
src/talents.ts
Other components
- Player
Connections 34
- Player → Game UI: plays through
- Browser Entry → Game UI: mounts
src/main.tsx - Browser Entry → Phaser Renderer: loads
src/main.tsx - Browser Entry → Game State: loads
src/main.tsx - Game UI → Game State: controls
src/App.tsx - Game UI → Phaser Renderer: loads assets
src/App.tsx - Game UI → Audio Settings: renders
src/App.tsx - Game UI → Save Manager: renders
src/App.tsx - Game UI → Skill Guide: renders
src/App.tsx - Game UI → Test Tools UI: renders
src/App.tsx - Phaser Renderer → Game State: reads state
src/renderer.ts - Phaser Renderer → Simulation Adapter: uses adapter
src/renderer.ts - Game State → Game Content: reads definitions
src/game.ts - Game State → World Navigation: checks movement
src/game.ts - Game State → Combat Rules: uses calculations
src/game.ts - Game State → Skills and Spells: uses skills
src/game.ts - Game State → Skill Growth: uses progression
src/game.ts - Game State → Taoist Systems: uses class systems
src/game.ts - Game State → Game Audio: triggers sounds
src/game.ts - Game Content → Skills and Spells: re-exports skills
src/content.ts - Skills and Spells → Class Definitions: uses class IDs
src/spells.ts - Skills and Spells → Combat Rules: scales cooldown
src/spells.ts - Skill Growth → Skills and Spells: reads skill data
src/skill-growth.ts - Save Manager → Save and Progress: exports and restores
src/SaveManager.tsx - Game UI → Save and Progress: writes progress
src/App.tsx - Save and Progress → Run Checkpoints: uses checkpoints
src/save.ts - Save and Progress → Talent System: uses talents
src/save.ts - Test Tools UI → Test Mode: runs diagnostics
src/TestTools.tsx - Test Mode → Game State: drives scenarios
src/test-mode.ts - Test Mode → Game Content: reads definitions
src/test-mode.ts - Test Mode → World Navigation: checks safe positions
src/test-mode.ts - Test Mode → Skills and Spells: reads skills
src/test-mode.ts - Test Mode → Taoist Systems: clears skill state
src/test-mode.ts - Game State → Equipment: uses equipment
src/game.ts