kirby-combat
Pure-Python combat engine for the HERO System 6th Edition, designed as the authoritative back-end for Kirby — the HERO System VTT in the Kirby product line.
Zero runtime dependencies (stdlib only). Strict TDD. RAW-aligned against the official 6E2 / 6E1 books, with per-rule citations on every behavioral commit.
Status
- Phase 1 (v0.1.0): Attack pipeline (to-hit / damage / defense / knockback / status). 107 tests.
- Phase 2 Plan 1 (v0.2.0): Engine foundation. CombatSession + event
log + rewind, reactive defenses, tactical modifiers, movement, AoE,
Scene data model, falling, cover, line-of-sight, hazards, recovery,
adjustments, entangle, flash, martial arts, triggers, held actions.
450 tests passing. 96% coverage on
session/,scene/,resolution/. - Phase 2 Plan 2 (v0.3.0): Engine advanced. Mental combat pipeline (Mind Control / Telepathy / Mental Illusion / Mental Blast / Mental Entangle), vehicles (HDC-shaped Combatant subtype with passengers, ramming, driving rolls), mass combat (Unit aggregation + morale cycling), breakables (objects + structure cascade), Presence attacks, GM tooling engine layer (Tier 1/2/3 overrides, GM-on-behalf-of attacks, spawn/despawn), serialization (to_dict / from_dict with round-trip parity). 569 tests, 96% coverage.
engine-advanced subsystems
| Module | Purpose |
|---|---|
kirby_combat/mental/ |
OMCV/DMCV pipeline + the five mental powers |
kirby_combat/vehicles/ |
Vehicle (Combatant subtype), passengers, ramming, controls |
kirby_combat/masscombat/ |
Unit (pack-of-N) and aggregate resolution |
kirby_combat/breakables/ |
ObjectCombatant + structure integrity cascade |
kirby_combat/pre_attacks/ |
Presence attacks with effects ladder |
kirby_combat/gm/ |
Tier 1/2/3 GMOverride helpers + GM attack + spawn/despawn |
kirby_combat/serialization/ |
to_dict / from_dict for full session round-trip |
Usage
from kirby_combat.session import CombatSession
from kirby_combat.template import CombatTemplate
from kirby_combat.dice import RandomRoller
session = CombatSession.create(
id="encounter-1",
combatants=[hero, villain],
scene=warehouse_scene,
template=CombatTemplate.default_6e_superheroic(),
dice_roller=RandomRoller(),
).start()
See examples/ for runnable demos.
RAW alignment
Every game-mechanical commit cites a specific page or section in 6E1 / 6E2
(or in Dorman's MIT-licensed dmdorman/hero6e-foundryvtt reference port,
where Dorman's behavior is the source of truth). The Codex retrieval system
backs this — values are verified against the corpus rather than memory.
Tests
.venv/bin/pytest tests/ -q
.venv/bin/pytest tests/ --cov=kirby_combat --cov-report=term-missing
License
MIT. The combat-mechanics derivation is independent NDA-clean work — no
proprietary HERO Designer source enters this repo. See LICENSE.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kirby_combat-0.3.28.tar.gz.
File metadata
- Download URL: kirby_combat-0.3.28.tar.gz
- Upload date:
- Size: 214.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f08f7295a89b79defb9c4523e8c85d5b81a3624374c21e7bd57c5ab08d5cb4aa
|
|
| MD5 |
36f64577335b4bf515f9a7f61c09c01d
|
|
| BLAKE2b-256 |
c95b5d4eeb9e6788decfd30985f1c3484978695991bd6319775b2b1b84e0d4ba
|
File details
Details for the file kirby_combat-0.3.28-py3-none-any.whl.
File metadata
- Download URL: kirby_combat-0.3.28-py3-none-any.whl
- Upload date:
- Size: 181.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7fdbf1f96190ae8e57b488e34fad082ce7929eb48d701b4f72e1438f32bf2d0c
|
|
| MD5 |
e0b67aa1ef6b23a2fe424f398404d933
|
|
| BLAKE2b-256 |
34dccdb65dd598f407fbf32384f549609b3b088e6ef23c3417ed5577ea07e248
|