1. Spark of Life icon is 'fallenshield.png' not 'spark_of_life' - fixed BUFF_PRIORITY key so buff detection works correctly 2. Mana/spirit items moved to AFTER buffs in all 3 tiers - was drinking mana potions on turn 2 before buffs were cast 3. Priority order: Health items -> Cure -> Buffs -> Mana items -> Skills -> Spirit Stance -> Damage spells -> Channeling -> Attack |
||
|---|---|---|
| .. | ||
| configs | ||
| results | ||
| src | ||
| package.json | ||
| README.md | ||
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
- Creates a simulated player at a given level with specified stats/gear
- Spawns monsters based on difficulty and battle type
- Runs the same strategy logic as the userscript (ported to Node.js)
- Tracks every action, proc, damage event
- Outputs summary stats + per-round logs