No description
  • Python 67.4%
  • Lua 32.6%
Find a file
McNieps e22b284fb5 Review rulings (2026-10-13) + Pavois, the tank weapon
Rulings on the rune-rework pass: Spark's own keen is its scaling source
(numbers.md section 4); Siphon kept as a matchup card; Focus pays no charge
(focus is the whole price); Thorn's armor master stays cut.

Pavois, the sixth weapon (five-weapon cap lifted): Guild, rate 1200, strike
1 % of team max HP. The bar also fills from damage taken (1 charge per 4,
remainder on `strain`), an exception to the fixed supply. Lens Bulwark: a
quarter of starting HP as max HP + HP per rune on it, at battle start.
3 slots / no edges -> 4 -> fan-in at journeyman. Open ends: TODO #43
(no anti-tank card yet).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 09:48:26 +02:00
.claude Grant WebSearch and three doc-host WebFetch permissions 2026-08-18 14:39:46 +02:00
battle Review rulings (2026-10-13) + Pavois, the tank weapon 2026-10-13 09:48:26 +02:00
docs Review rulings (2026-10-13) + Pavois, the tank weapon 2026-10-13 09:48:26 +02:00
scripts Battle clock: dial, weapon clocks, loop rule 3, 144-tick battle, overtime (TODO #40) 2026-10-02 16:27:10 +02:00
world Pricing pass (ruled 2026-10-02) + invisible overtime writes 2026-10-02 18:01:45 +02:00
.gitignore chore: layout graph positions, faction Lua helper, doc link fixes, sprite generator 2026-06-12 01:11:35 +02:00
CLAUDE.md Pricing pass (ruled 2026-10-02) + invisible overtime writes 2026-10-02 18:01:45 +02:00
off-index-rune-weapon-synthesis.md Migrate plugins onto unified attributes; drop the effectiveness effect types 2026-08-08 20:16:17 +02:00
pyproject.toml Fix uv run pytest, and guard the roundtrip fixture (TODO #4, gaps §1) 2026-08-09 13:19:27 +02:00
README.md Implement bound constraints, genericize charge-gain/ready hooks, unify attributes 2026-07-26 18:59:58 +02:00
TODO.md Review rulings (2026-10-13) + Pavois, the tank weapon 2026-10-13 09:48:26 +02:00
uv.lock Fix uv run pytest, and guard the roundtrip fixture (TODO #4, gaps §1) 2026-08-09 13:19:27 +02:00

Data

Game content definitions. Pure data, no engine logic. Changes here affect balance and content without touching battle_engine, server, or world_generation.

Format

Python files instantiating models from battle/models/. One file per concept (rune name, weapon name), named by concept ID. Content files import exclusively from battle.models — never from battle_engine or battle/plugins/ directly.

A file may contain multiple tier variants as separate entry variables, listed in __all__ in ascending tier order:

# runes/the_bell.py
from battle.models import entries, Clause, triggers, effects, value_sources, query
from battle.models import Tier

the_bell_novice = entries.RuneEntry(
    id="the_bell_novice",
    tier=Tier.NOVICE,
    name="Bell",
    index_status="listed",
    clauses=[
        Clause(
            trigger=triggers.OnAttackTrigger(),
            effect=effects.DamageEffect(targets=query.ENEMY_TEAM, amount=value_sources.Flat(2)),
        ),
    ],
)

the_bell_journeyman = entries.RuneEntry(
    id="the_bell_journeyman",
    tier=Tier.JOURNEYMAN,
    previous_tier=the_bell_novice,
    clauses=[...],  # delta only — novice clause accumulated automatically via collect_clauses()
)

the_bell_novice.next_tier = the_bell_journeyman

__all__ = ["the_bell_novice", "the_bell_journeyman"]

Clause.effect is a single required effect — a leaf effect or one of five composite nodes (Sequence, Pipeline, Gated, Repeat, Spend) that express costs, ordering, and repetition. See CLAUDE.md's Clause authoring section for the common "pay a cost, then do N things" shape (effects.ChargeGatedEffects).

Full IDE autocompletion. Pydantic validates on construction. No JSON schemas to maintain.

Structure

data/
  docs/              # Writing guide and content authoring references
  plugins/           # Engine extension plugins — Lua runtime only (layout, faction, status)
  models/            # Author-facing model library — the only import source for content files
    entries/         # RuneEntry, WeaponEntry, TeamEntry, WorldEntry, SlotEntry, SlotEdge, SlotGraph, Tier
  runes/             # RuneEntry definitions (one file per rune, all tiers)
  weapons/           # WeaponEntry definitions
  world/
    encounters/      # Events that happen on the map
    geography/       # Terrain types, biomes, movement costs
    topography/      # Layers, zones, landmarks
  scripts/           # Utility scripts (not definitions)

Entry Types

The battle/models/entries/ package provides entry types that wrap the engine's game-agnostic models:

Entry type Represents Key method
RuneEntry A rune at a specific tier to_engine_instance(faction)
WeaponEntry A weapon with rune slots to_engine_instance(faction)
TeamEntry A team with weapon slots to_engine_instance()
WorldEntry The battle root (two teams) to_engine_instance()

A battle is run as:

log = run_battle(world.to_engine_instance(), config)

Schema Ownership

Entry types in battle/models/ are the data layer's own models — changes to them are data changes only. Changes to the underlying engine models (EntityDefinition, Clause, triggers, effects) require an engine change first.

Asset Mapping

Sprites live in client/assets/. The id field is the contract:

  • runes/the_bell.py (id: the_bell_novice) → client/assets/runes/the_bell.png

See Also

  • CLAUDE.md — full authoring reference: models, target constants, HP model, scope boundaries, plugin system.
  • runes/README.md — rune system design, naming conventions, tier model.
  • docs/charge_system.md — source of truth for charge, attributes, production/toll, and loop-safety rules.
  • docs/rune_design_rationale.md — single source of truth for rune design: design axes, tier model, and the morphological design grid.
  • docs/writing_guide.md — description format and style rules for player-facing text.
  • battle_engine/docs/keywords.md — canonical token→display-text mappings.