- Monster stats: STR/DEX/AGI/END/INT/WIS scaled per wiki formula - HP = (100 + L*10 + END*5) * level_mod * difficulty_mod * class_mod - Base damage from log formula, crit from (1 - 3750/(3750+DEX+STR/2)) - Phys/mag mit, evade, parry all from wiki - Difficulty multipliers from wiki table (exp, credit, hp, dmg) - Player stats tuned to match real Lv52 character (1804 HP, 93 MP) - Added health items to default loadout |
||
|---|---|---|
| .. | ||
| 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