Simulate a battle
simulate_battleRuns many simulated battles between a party and a troop to report win rate, turn counts, remaining HP, and damage or deaths using the project's real stats and formulas.
Instructions
Run many simulated battles of a troop against a party and report win rate, turns, how much HP the party keeps and who does the damage or dies. Uses the project's real stats (class curves, equipment, traits), damage formulas, variance, critical hits, hit/evasion rates, agility turn order, target weighting (TGR) and enemy action ratings. Party members use skillIds in order (first affordable one, healing only when an ally is below 60% HP), falling back to the Attack skill. Not modelled: states, buffs, items, guarding, TP, enemy conditions on states/switches (treated as false). Seeded, so results are reproducible. Default party: the starting party at their initial level.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| runs | No | ||
| seed | No | ||
| level | No | Set every party member to this level | |
| party | No | ||
| troopId | Yes | ||
| maxTurns | No |