Metadata-Version: 2.4
Name: iron-and-rust
Version: 0.1.0
Summary: A Wild West terminal RPG built with Python — graph-based world, honor-driven branching, and Dead Eye combat.
Author: Nilay Bhotmange
License-Expression: MIT
Keywords: game,rpg,terminal,cli,western,text-adventure,roguelike
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: Topic :: Games/Entertainment :: Role-Playing
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: rich>=13.7
Requires-Dist: InquirerPy>=0.3.4
Dynamic: license-file

# Iron & Rust

A text-based Western RPG for the terminal. You are a member of an outlaw crew
betrayed on a payroll-train job — shot, robbed, and left for dead in the dust.
You wake in a stranger's wagon with no gold, no gang, and one thing left: a debt,
and the long road it will take to collect it. Ride the frontier, build a reputation
(for better or worse), gather a gang, and settle the score with the man who betrayed
you — Rourke. How you get there decides how your story ends.

## Install

Requires **Python 3.11+**.

```bash
pip install iron-and-rust
```

Or, from a clone of this repository (editable/dev install):

```bash
pip install -e .
```

## Play

```bash
iron-rust
```

(Equivalently: `python -m iron_rust`.)

The game autosaves after every journey; relaunch and choose **Continue** to pick
up where you left off. `Ctrl+C` at any prompt bows out gracefully.

New to it? See [HOW_TO_PLAY.md](HOW_TO_PLAY.md) for a full guide to the systems
and how to reach each ending.

## Features

- **Graph-based world** — towns are nodes and roads are weighted edges. Travel
  uses **Dijkstra's shortest path**, and the same graph powers an **active
  bounty-hunter pursuit** that closes on your position one step at a time when
  your wanted level gets too high.
- **Honor-driven branching** — choices move **honor** and **wanted**, but the
  world remembers more than two numbers: named **flags**, independent
  **faction** standing (Law, Gang) and **per-NPC relationships**, and per-town
  reputation that shifts shop prices.
- **Dead Eye combat** — a turn-based duel system (turn order in a `deque`,
  threat ranking via `heapq`) with a chargeable **Dead Eye** meter for **called
  shots** (head/arm/leg) and status effects (bleed, stun). Stats matter: luck
  crits, intelligence charges Dead Eye faster, stealth powers fleeing.
- **A gang camp** — recruit members with unique combat specials, fund the camp
  to raise morale, buy upgrades, and complete **companion arcs** for permanent
  bonuses. Neglect morale and members desert.
- **Six endings** — Redemption, Legend, Hunted Down, Gang Leader, the secret
  Outlaw King, and Died With Your Boots On — decided by your final honor, wanted,
  gang, and one last moral choice over the betrayer.
- **Persistence** — full JSON save/load of hero, gang, world memory, and quest
  journal.

## Where saves live

Saves are stored per-user, outside the installed package:

| OS      | Location |
|---------|----------|
| Windows | `%LOCALAPPDATA%\IronAndRust\saves` |
| macOS   | `~/Library/Application Support/IronAndRust/saves` |
| Linux   | `$XDG_DATA_HOME/iron-and-rust/saves` (default `~/.local/share/iron-and-rust/saves`) |

## Project layout

```
pyproject.toml            package metadata + the `iron-rust` entry point
src/iron_rust/
  __main__.py             entry point (iron-rust / python -m iron_rust)
  core/                   game loop, combat, camp, shop, pursuit, status, save_manager
  entities/               Hero, Enemy, NPC, Gang, Person
  data/                   towns, weapons, items, enemies, recruits, archetypes, roles
  quests/                 quest engine, main story, side quests, Act 2, endings, companions
  world/                  world_map, routes, pathfinding (Dijkstra/BFS), travel
  ui/                     dialogue, intro
  utils/                  ascii art loader
  assets/ascii/           per-town ASCII art (shipped as package data)
tests/                    seven headless suites + run_all.py
```

## Development

```bash
pip install -e .          # editable install
python tests/run_all.py   # run all seven headless test suites
```

Each suite runs in its own subprocess (they stub the UI to run without a
terminal). You can also run one directly, e.g. `python tests/test_combat.py`.

## Building & publishing

```bash
pip install build
python -m build           # -> dist/iron_and_rust-0.1.0-py3-none-any.whl (+ .tar.gz)
```

To publish to PyPI:

```bash
pip install twine
twine upload dist/*
```
