package plugin

// Raw Open5e SRD stat blocks — the balance-baseline staging table.
//
// Unlike dndBestiary (hand-tuned named monsters) and srdProfiles (hand-tuned
// turn-based multiattack), this table is the *unmodified* SRD: HP, AC, ability
// scores, and per-attack damage dice straight from the 5e SRD dump. Raw SRD
// damage is calibrated for a 4-PC party and one-shots gogobee's single player
// (see bestiary_srd.go's balance-basis note), so this is NOT a drop-in roster —
// nothing here feeds the combat engine directly.
//
// What it IS: the reference the tuning pass reads against. When authoring or
// rebalancing a dndBestiary entry, srdStagingBestiary[id] gives the canonical
// SRD numbers to scale down from, so tuning is a deliberate derivation rather
// than a guess. Generated by cmd/open5e-import — see bestiary_srd_data.go.
//
// File is intentionally NOT dnd_-prefixed (see memory: no new dnd_* identifiers).

// SRDStatAttack is one weapon attack from a creature's SRD action list: the
// d20 to-hit bonus plus the raw damage dice (e.g. "2d6") and flat bonus, with
// AvgDamage precomputed as dice average + bonus for quick comparison.
type SRDStatAttack struct {
	Name        string
	AttackBonus int
	DamageDice  string
	DamageBonus int
	AvgDamage   int
	DamageType  string
}

// SRDStatBlock is a raw SRD creature stat block. CR/XP/HP/AC and the ability
// scores are verbatim SRD; Attacks holds each non-Multiattack weapon action;
// Multiattack carries the multiattack action's text so the tuning pass knows
// how many strikes a turn the creature makes. Traits lists the creature's
// special-ability names (Pack Tactics, Regeneration, …) — names only, since
// their mechanics live in the hand-authored MonsterAbility profiles.
type SRDStatBlock struct {
	Slug        string
	Name        string
	Size        string
	Type        string
	CR          float64
	XP          int
	HP          int
	AC          int
	SpeedWalk   int // feet; falls back to fastest other mode for flyers/swimmers
	STR, DEX    int
	CON, INT    int
	WIS, CHA    int
	Multiattack string
	Attacks     []SRDStatAttack
	Traits      []string
	Legendary   bool
}

// srdStagingBestiary is the full raw SRD bestiary, keyed by slug (hyphens → underscores).
var srdStagingBestiary = buildSRDStagingBestiary()
