- Simulator: headless HV battle engine in Node.js - Player/Entity models with stats, gear, spells - Monster definitions and spawning - Strategy engine ported from userscript - Grindfest simulation with turn-by-turn logging - Forgejo remote: git@git.gaboggamer.online:gabogg/hv-unified.git - 3 config presets: default, aggressive, conservative - Outputs summary stats (kills, damage, survival) per run
52 lines
1.4 KiB
Markdown
52 lines
1.4 KiB
Markdown
# 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
|
|
|
|
```bash
|
|
node src/runner.js --rounds 1000 --config configs/aggressive.json
|
|
```
|
|
|
|
## Strategy Config Format
|
|
|
|
```json
|
|
{
|
|
"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
|