Generated from reading chaos-rpg/ source on 2026-03-24.
This document defines everything proof-engine must support to replace the bracket-lib graphical frontend.
CharacterClass— 12 classes (Mage, Berserker, Ranger, Thief, Necromancer, Alchemist, Paladin, VoidWalker, Warlord, Trickster, Runesmith, Chronomancer)StatBlock— vitality, force, mana, cunning, precision, entropy, luck (7 stats)Character— full player state: class, stats, hp, max_hp, level, xp, gold, inventory, spells, boons, passive tree allocations, status effects, misery stateBackground,Boon,Difficulty
Enemy— name, tier, hp, max_hp, base_damage, attack_modifier, chaos_level, ascii_sprite, special_ability, floor_abilityEnemyTier— Minion, Elite, Champion, Boss, AbominationFloorAbility— None, StatMirror, EngineTheft, NullifyAura
CombatAction— Attack, HeavyAttack, Defend, UseSpell(usize), UseItem(usize), Flee, TauntCombatOutcome— PlayerWon, PlayerDied, PlayerFled, OngoingCombatState— round, defending, last_action, status_effects on both sidesCombatEvent— all 11 variants (PlayerAttack, EnemyAttack, SpellCast, EnemyDied, etc.)
ChaosRollResult— final_value (f64), chain (Vec), game_value (i64)ChainStep— engine_name, input, output, seed_used- Methods:
is_critical(),is_catastrophe(),is_success(),combat_trace_lines()
Floor— rooms: Vec, current_room_index, floor_number, env_effectRoom— room_type, seed, visited, indexRoomType— Combat, Treasure, Shop, Shrine, Trap, Boss, Portal, Empty, ChaosRift, CraftingBenchEnvEffect— ManaBoost, DamageAura, SpeedBoost, ChaosAmplify, StatDebuff, VisionBlur, GoldMultiplier
PowerTier— 40+ tiers from TheVoid through OMEGATierEffect— Normal, Rainbow, RainbowFast, Pulse, Flash, Glitch, Inverted, Static, Freeze, Fading, PureBlack, FullFlash, GoldFlash, BoldWhiteFlash, DarkRainbow
Item— name, base_type, rarity, stat_modifiers, is_weapon, durability, max_durabilityRarity— Normal, Magic, Rare, Unique, Artifact, CursedStatModifier— stat name + value
Spell— name, school, damage, mana_cost, description, level, cooldownSpellSchool— Fire, Ice, Lightning, Arcane, Nature, Shadow, Chaos
- Boss IDs 1–12: Mirror, Accountant, Fibonacci Hydra, Eigenstate, Taxman, Null, Ouroboros, Collatz Titan, Committee, Recursion, Paradox, Algorithm Reborn
boss_name(id),boss_pool_for_floor(floor),random_unique_boss(floor, seed)BossOutcome— PlayerWon, PlayerDied, Escaped
NemesisRecord— name, floor_defeated, abilities, promoted_times
MiseryMilestone— 11 milestones from ItGetsWorse (100) through NegativeGod (1_000_000)MiserySource— all damage/failure event sources
AchievementStore— list of unlocked achievementsRunSummary,CombatSnapshot
RunHistory,RunRecord, narrative events
ScoreEntry— name, score, floor, class, kills, etc.
LocalDailyStore,DailyEntry,LeaderboardRow
ChaosConfig— all configurable parameters (audio, visual, gameplay toggles)
AudioEvent— 30+ variants covering all game eventsMusicVibe,MusicState
// Combat
resolve_action(state, action, player, enemy, seed) -> (CombatOutcome, Vec<CombatEvent>)
chaos_roll_verbose(input, seed) -> ChaosRollResult
destiny_roll(seed) -> ChaosRollResult
// World
generate_floor(floor_num, seed) -> Floor
room_enemy(room: &Room, floor_num) -> Enemy
// Character
Character::apply_level_up(...)
Character::total_stats() -> i64 // for power tier calc
Character::power_tier() -> PowerTier
// Items
Item::generate(floor, seed) -> Item
Item::rarity_color() -> (u8,u8,u8)
// Enemies
generate_enemy(floor, seed) -> Enemy
// Bosses
boss_pool_for_floor(floor) -> Vec<u8>
random_unique_boss(floor, seed) -> Option<u8>
run_boss_fight(id, player, seed, config) -> BossOutcome // unique boss dispatch
// Nemesis
load_nemesis() -> Option<NemesisRecord>
save_nemesis(record)
clear_nemesis()
// Persistence
AchievementStore::load() / save()
RunHistory::load() / append(record)
ChaosConfig::load()
load_scores() / save_score(entry)
LocalDailyStore::load() / save()
// Daily
submit_score(entry) -> Result<()>
fetch_scores(seed) -> Result<Vec<LeaderboardRow>>
// Skill checks
perform_skill_check(skill_type, difficulty, player) -> SkillCheckResult| Screen | Key Content |
|---|---|
Title |
Logo assembly animation, 5 theme options, menu items, save-continue option |
Tutorial |
Multi-slide tutorial with navigation (15 slides) |
ModeSelect |
Story / Infinite / Daily mode selection |
CharacterCreation |
Class select (12), background (4), difficulty (3), name input |
BoonSelect |
3 random boons shown, select one |
FloorNav |
Floor map grid, room icons, current room cursor, floor stats |
RoomView |
Room event text, choices, pending item/spell display |
Combat |
Player panel, enemy panel, action menu, combat log, chaos trace, particles, boss overlays |
Shop |
NPC text, item list with prices, heal option |
Crafting |
Item list, operation select (8 ops: Reforge, Corrupt, Shatter, Imbue, Salvage, Upgrade, Mirror, Socket) |
CharacterSheet |
5 tabs: Stats, Inventory, Effects, Lore, Log |
BodyChart |
Body parts visualization, injury/buff markers |
PassiveTree |
820+ node tree with scroll, allocation, keystone display |
GameOver |
Death recap, stats, shareable text, Hall of Misery entry |
Victory |
Story completion, final stats, score submission |
Scoreboard |
Local high scores list |
Achievements |
Achievement list with filter (All/Unlocked/Locked), scroll |
RunHistory |
Per-run records with narrative events, scroll |
DailyLeaderboard |
Daily seed rank table, fetch/submit UI |
Bestiary |
Enemy gallery with selected entry detail |
Codex |
Lore entries with selected entry detail |
Settings |
Config toggles, theme select, audio, visual timing |
T— cycle color themeEscape— back / quit confirm
- Arrow keys /
j/k— menu cursor Enter— selectC— continue saveT— next theme
A— AttackH— Heavy AttackD— Defend1–5— Use spell (by index)I— open item menu (then 1–9 to use)F— FleeT— TauntC— Character sheet overlayV— Chaos viz overlay toggleL— collapse/expand combat log.— Auto-play toggle
- Arrow keys /
hjkl— move cursor Enter— enter roomC— character sheetM— map zoom
1–5— tab select (Stats, Inventory, Effects, Lore, Log)- Arrow keys — scroll within tab
Escape— back
- Arrow keys — item cursor
B— buy selectedH— buy healingEscape— leave shop
- Arrow keys — cursor
Enter/Space— confirm selectionEscape— back / cancel- Text input when
item_filter_active
- Arrow keys — scroll
Space/Enter— allocate nodeEscape— back
- Arrow keys — scroll / select entry
Escape— back1/2/3— filter tabs (Achievements)
F— fetch scoresS— submit scoreEscape— back
- Arrow keys — option cursor
Enter/Space— toggle option+/-— numeric adjustments
emit_death_explosion— 40 burst particles, radial explosionemit_level_up_fountain— 30 upward star/gold particlesemit_crit_burst— 16 spark particles in circleemit_hit_sparks— N spark particles at impactemit_loot_sparkle— 12 orbiting sparkle particles (slow orbit)emit_status_ambient— Per-status effect ambient particles: Burn (orange sparks), Freeze (blue flakes), Poison (green bubbles), Bleed (red drips), Regen (green plus signs)emit_stun_orbit— Two stars orbiting the stunned entityemit_room_ambient— Per-room-type background particles (combat=red haze, treasure=gold sparkles, shrine=blue upward, chaos_rift=glitching random, boss=pulsing purple/red)emit_boss_entrance_burst— Per-boss-ID entrance animations (Mirror=symmetric split, Hydra=golden spiral, Committee=5 converging clusters, Algorithm=ring explosion)
player_flash— Red border flash on player panel (on taking damage)enemy_flash— Colored border flash on enemy panel (on taking damage, color varies by damage type)hit_shake— Outer border shake on heavy crits / catastrophesspell_beam— Beam animation across screen during spell cast
ghost_player_hp/ghost_enemy_hp— Ghost HP bar showing previous HP level, lingers forghost_timerframesdisplay_player_hp/display_enemy_hp/display_mp— Smooth lerped display fractions (not snappping)
floor_transition_timer— Floor number transition overlay (shows "FLOOR N" text)boss_entrance_timer/boss_entrance_name— Boss name entrance cinematictitle_logo_timer— Title screen logo particle assembly (90 frames)room_entry_timer— Room entry flash animation by room typekill_linger— Hold on combat screen for N frames after enemy death
ChaosField— Living mathematical background (2000 characters driven by math engines)ColorGrade— Screen-wide color grade (tint, saturation, contrast)TileEffects— Per-tile visual effects (floor staining, shimmer, corruption)Weather— Dynamic weather overlay (rain, snow, fog, corruption haze)DeathSeq— Full death cinematic sequence (tiles fall, screen shatters)CombatAnim— Weapon swing arcs, spell beam paths, hit staggerNemesisReveal— Nemesis encounter cinematicAchievementBanner/RichBanner— Multi-rarity achievement pop-up bannersAnimConfig— All timing constants (FAST_MODE halves all durations)
- Rainbow, RainbowFast, Pulse, Flash, Glitch, Inverted, Static, Freeze, Fading, PureBlack, FullFlash, GoldFlash, BoldWhiteFlash, DarkRainbow
- Boss visual overlays per boss ID (1–12) — each boss has unique rendering logic in
draw_boss_visual_overlay - Chaos pipeline viz overlay (
chaos_viz_open) — shows the engine chain with colored step display - Combat log collapse/expand
- Auto-play mode indicator
- All game logic
- All math engines
- All type definitions
- Save/load utilities
graphical/src/main.rsState struct →graphical-proof/src/main.rsChaosRpgGame struct- All
draw_*functions →render_*methods using proof-engine Frame API - All bracket-lib rendering calls → proof-engine GlyphCommand pushes
- Manual Particle struct → proof-engine MathParticle / ParticlePool
- Manual ChaosField → proof-engine chaos field simulation
- Manual screen shake → proof-engine camera trauma system
- Manual color grade → proof-engine post-processing pipeline
- Manual lerp functions → proof-engine SpringDamper / MathFunction
| bracket-lib | proof-engine |
|---|---|
ctx.set(x, y, fg, bg, ch) |
frame.push_glyph(GlyphCommand { character: ch, position: vec3(x, y, 0), color: fg, .. }) |
ctx.print_color(x, y, fg, bg, str) |
Loop: push GlyphCommand per char |
ctx.draw_box(x, y, w, h, fg, bg) |
Push border GlyphCommands with box-drawing chars |
ctx.draw_bar_horizontal(...) |
Push block GlyphCommands (█ ░) |
hit_shake |
engine.camera.add_trauma(intensity) |
particles.push(Particle::burst(...)) |
frame.particles.push(ParticleCommand { behavior: MathFunction::..., .. }) |
color_grade.tint = red |
frame.color_grade = ColorGrade { tint: red, .. } |
THEMES[theme_idx] |
Engine-side theme system with same 5 themes |