hv-unified/simulator
GaboGG f060bd31a8 Benchmark v3: 17 configs, chan-mp-focused wins (149 rounds)
Channeling experiments (Lv90, Nightmare, 5 runs each):
1. chan-mp-focused: 149.0 rounds (WINNER)
   - Mana gems at 70%, potions at 50% = stay MP-rich
   - Attack spells on for channeling kickstart
   - Buff refresh at < 15 turns
   - Spirit stance at OC 80, skills at OC 75
2. chan-no-buff-refresh: 143.0 (good, skip buff refresh chan)
3. chan-aggressive-buff: 142.4 (refresh buffs at < 20 turns)
4. chan-buff-only: 140.6 (no attack spells, buff refresh only)
5. conservative-items: 139.8 (old winner)

New defaults set to chan-mp-focused values.
2026-07-21 14:12:54 -04:00
..
configs Add battle simulator and Forgejo repo setup 2026-07-20 19:36:55 -04:00
results Benchmark v3: 17 configs, chan-mp-focused wins (149 rounds) 2026-07-21 14:12:54 -04:00
src Benchmark v3: 17 configs, chan-mp-focused wins (149 rounds) 2026-07-21 14:12:54 -04:00
package.json Add battle simulator and Forgejo repo setup 2026-07-20 19:36:55 -04:00
README.md Add battle simulator and Forgejo repo setup 2026-07-20 19:36:55 -04:00

HV Unified Simulator

A headless battle simulator for HentaiVerse. Tests strategy configurations against simulated battles to find optimal settings.

Structure

simulator/
├── src/
│   ├── engine.js        # Battle engine (turns, damage, procs)
│   ├── entities.js      # Player, Monster classes
│   ├── formulas.js      # All wiki-known formulas
│   ├── strategy.js      # Port of the userscript strategy logic
│   ├── grindfest.js     # Grindfest simulation
│   ├── arena.js         # Arena simulation
│   └── runner.js        # Run configs, collect stats
├── configs/
│   └── default.json     # Default strategy config
├── results/             # Simulation output
├── package.json
└── README.md

Usage

node src/runner.js --rounds 1000 --config configs/aggressive.json

Strategy Config Format

{
  "name": "aggressive-items",
  "cureHP": 0.35,
  "cureItemHP": 0.65,
  "manaGemMP": 0.60,
  "spiritPotionSP": 0.40,
  "spiritStanceOC": 60,
  "useAttackSpells": false,
  "skillRendingAt": 5,
  "skillGreatCleaveOnlyBosses": true
}

How It Works

  1. Creates a simulated player at a given level with specified stats/gear
  2. Spawns monsters based on difficulty and battle type
  3. Runs the same strategy logic as the userscript (ported to Node.js)
  4. Tracks every action, proc, damage event
  5. Outputs summary stats + per-round logs