1 minute read

Based on the “Draft 0.4 RPG Rule Set” by Pitt Murmann (1993-1998), this Rust library provides a reusable combat system for tabletop role-playing games.

Features

Core Systems Implemented

  • 9 Attributes System: Physical (STR, DEX, CON), Mental (REA, INT, WIL), and Interactive (CHA, PER, EMP)
  • Skill-Based Combat: Attack, parry, and dodge mechanics using d10 rolls
  • Weapon System: Impact-based damage with various weapon types (daggers, swords, etc.)
  • Armor System: Protection values with movement penalties
  • Wound Tracking: Light, Severe, and Critical wounds with stacking mechanics
  • Combat Rounds: Turn-based combat resolution

Combat Mechanics

The combat system follows the Draft RPG rules:

  1. Attack Roll = Weapon Skill + d10 + Modifiers
  2. Defense Roll = Weapon Skill (parry) or Dodge Skill + d10 + Modifiers
  3. Damage = Attack Roll - Defense Roll + Strength Bonus + Weapon Damage - Armor Protection

Wound Levels (based on damage vs Constitution):

  • Light: damage ≤ CON/2 (penalty: -1 per wound)
  • Severe: damage ≤ CON (penalty: -2 per wound)
  • Critical: damage ≤ 2×CON (penalty: -4 per wound)
  • Death: damage > 2×CON or 2+ Critical wounds

Wound Stacking:

  • 4 Light wounds → 1 Severe wound
  • 3 Severe wounds → 1 Critical wound
  • 2 Critical wounds → Death

Installation

Add steelkilt to your Cargo.toml:

[dependencies]
steelkilt = "0.1.0"

# With serde support for JSON serialization
steelkilt = { version = "0.1.0", features = ["serde"] }

Or build from source:

cargo build --release

Usage

As a Library

use steelkilt::*;

// Create attributes (STR, DEX, CON, REA, INT, WIL, CHA, PER, EMP)
let attrs = Attributes::new(8, 6, 7, 5, 6, 5, 5, 7, 4);

// Create a character
let mut fighter = Character::new(
    "Aldric",
    attrs,
    7,  // weapon skill
    5,  // dodge skill
    Weapon::long_sword(),
    Armor::chain_mail(),
);

// Create an opponent
let mut opponent = Character::new(
    "Grimwald",
    Attributes::new(9, 5, 8, 4, 5, 6, 4, 6, 3),
    6,  // weapon skill
    4,  // dodge skill
    Weapon::two_handed_sword(),
    Armor::leather(),
);

// Execute combat round
let result = combat_round(&mut fighter, &mut opponent, DefenseAction::Parry);

if result.hit {
    println!("{} hit {} for {} damage!", result.attacker, result.defender, result.damage);
}

Interactive Combat Simulation

Run the interactive combat simulator:

cargo run --bin combat-sim

GitHub

GitHub CI