8000 GitHub - dzannotti/anvil
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

dzannotti/anvil

Repository files navigation

Anvil

A modular D&D 2024 rules engine with clean architecture and comprehensive system integration.

Overview

Anvil (formerly Spellbinder) is a sophisticated rules engine implementing D&D 2024 mechanics through a series of interconnected systems. The architecture emphasizes clean interfaces, complete audit trails, and extensible design patterns.

Core Systems

  • Tags System - Hierarchical identification and categorization
  • Expression System - Calculation engine with complete audit trails
  • Event Bus - Hierarchical event communication system
  • Effect System - Rule resolution callbacks for D&D mechanics
  • Action System - Game actions with resource management and targeting
  • AI System - Decision making for NPCs (in development)

Architecture Principles

  • Clean Architecture - No circular dependencies between systems
  • Event-Driven - All interactions flow through well-defined events
  • Modular - Each component is self-contained and testable
  • Audit Trail - Every calculation and action is fully traceable

Documentation

Comprehensive system documentation is available in .ai/01_PROJECT_DOCS/:

Start with the Overview for architecture principles and system interactions.

Development Commands

Command Description
make build Build both CLI and GUI binaries
make cli Build CLI binary only
make gui Build GUI binary only
make test Run all tests
make tdd Run tests in watch mode with concise output
make test-coverage Run tests with coverage report
make fmt Format all Go code
make fmt-check Check if code is formatted (CI)
make lint Run linter on all code
make lint-fix Run linter and auto-fix issues
make clean Remove build artifacts
make clean-cache Clean Go cache and module cache
make deps Install development tools
make hooks Install pre-commit hooks
make ci Run full CI pipeline locally
make help Show this help message

Project Structure

├── cmd/
│   ├── cli/          # CLI application
│   └── gui/          # GUI application
├── internal/         # Internal packages
├── bin/              # Built binaries
└── Makefile          # Build automation

Getting Started

One-time setup after cloning:

make setup

This installs all tools and sets up git hooks automatically.

Daily development:

make tdd    # Test-driven development mode
make ci     # Run full CI pipeline locally

TODO Tracker

  • make actions definition based like items
  • make creatures definition based like items and actions
  • leverage registry to replace demo package
  • rewrite ai
  • finesse
  • unarmed strike
  • fire bolt
  • prone
  • instant death (overkill)
  • resistance/vulnerability
  • consider/poc using ids instead of references
  • something with temp hit points
  • lucky?
  • action that gives poison
  • action that uses start/end turn
  • web
  • dash
  • dodge
  • help
  • vulnerability
  • resistances
  • up casting
  • bark skin
  • bane
  • hex
  • aid
  • armor of agathys
  • blade ward
  • bless
  • chill touch
  • power word stun
  • hold person
  • hold monster
  • hunter's mark
  • prismatic spray
  • tasha's laughter
  • thunder wave
  • phantasmal killer
  • invisibility
  • Elementals (can move thru other people)
  • ability check

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  
0