Files
healer-man/docs/CHARACTER_STAT_RULESETS_2026-10-03.md
2026-10-04 13:13:35 -04:00

61 lines
12 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Character stat rulesets
Character origin and character stat rules are independent. RoM characters can select Native RoM or WoW compatibility from the main menu. WoW characters retain WoW rules.
## Saved profiles
- Existing saved profiles without a valid `statRuleset` normalize to `"wow"`. This preserves the pre-existing RoM compatibility calculations, including their hybrid base-stat behavior.
- Newly created RoM profiles explicitly select `"rom"`; newly created WoW profiles select `"wow"`.
- The selector updates only the selected character. Inventory, equipment, progression, class pairing, learned skills, bindings, loadouts, and dungeon checkpoints remain attached to that profile.
- Switching is restricted to the main menu and blocked while a character remains active, a live enemy is engaged, or an online group activity is live. The combat check uses the installed dungeon runtime bridge so the main menu does not eagerly import combat catalogs. A failed storage write reports failure and retains the saved choice. A failed migration write still leaves the existing roster readable and retries on a subsequent read.
- Cloud saves retain the profile field because the client and server persist complete profile objects.
`src/game/characterStatRuleset.ts` owns normalization. `src/app/accountRepository.ts` owns profile migration and persistence; `src/app/shellStore.ts` owns the switch action; `src/ui/MainMenuScreen.tsx` owns the selector and controller actions.
## Native calculation and shared combat
Native inputs must retain their source meaning. Wisdom is RoM MND. Physical and magical attack, defense, damage, and combat points are distinct source channels. Native hit/critical/dodge points must never enter WoW rating-to-percent conversions.
Native derived calculations are sourced from the local RuneWaker `RoleAttr.cpp` and player vocation/race/sex/fixed-argument database records. Secondary-class activation at level 10 and treating the secondary level as the main level remain simulator policies.
`src/game/romNativeStats.ts` owns derivation and source-unit modifier re-derivation. `romNativeStatsTypes.ts` keeps native points and multiplicative rates separate. `scripts/runewaker-pipeline/export-rom-native-stat-rules.mjs` owns `src/game/generated/romNativeStatRules.generated.json` and the compact `romNativeGearCurves.generated.json`; runtime code does not import the full reference item catalog. The existing `romStats.ts`/base-growth path remains available for legacy compatibility.
Equipped native items carry `ItemStats.romNative`. Their common WoW projection is not counted again. Foreign items without that payload bridge only direct Strength, Stamina, Intellect, Agility, and flat health/mana under an explicit simulator policy. Spirit does not become Wisdom; WoW armor, attack/spell power, weapons, and ratings do not become native channels. The five existing source-reference heirloom classes supply native gear curves; other classes retain the direct-stat fallback until native gear profiles are sourced. Reference item selection and intermediate-level interpolation remain synthetic simulator policies.
The RoM automatic fallback is displayed as Training gear, not an authentic heirloom system. Player and NPC training gear scales through level 79; character base growth continues through level 80. See `docs/ROM_FIVE_NATIVE_SCALING_2026-10-03.md` for the five-class follow-up, owner parity, enemy health policy, and validation. This does not introduce loot progression.
The follow-up's exact-dist check supersedes the browser artifacts at the shared `playtest-artifacts/stat-rulesets` path. Its final chunks and eleven screenshots are recorded in that follow-up; the validation totals below describe the original stat-ruleset implementation.
The dungeon combat system selects native source resolution for supported canonical RoM builds against exact imported RuneWaker NPCs, in either direction. Unsupported source inputs and WoW-mode actors retain the shared compatibility resolver. Adapting a native stat into a common field alone is not evidence of native formula parity. The latest [native resolution follow-up](ROM_NATIVE_COMBAT_RESOLUTION_PASS_2026-10-03.md) records supported channels and remaining source boundaries.
The common fallback adapter uses native ATK as attack/ranged attack power, MDMG as spell power and DEF as armor, with shared WoW mitigation only on that fallback. The supported native resolver directly consumes source ATK/DEF or MATK/MDEF and native hit/critical/dodge/parry/block points without converting them into common percentages. Existing primary resources and regeneration policy remain part of the shared simulation; native MP also supplies supported secondary mana pools. The Equipment panel labels native points explicitly and shows active native aura effects for its selected owner. DEF displays its source value without presenting a WoW armor percentage as native mitigation. Shared HUD counters display whole HP/MP values while runtime pools retain precision.
Player FIX record 303001 sets `DmgAtkArg` and `MDmgMAtkArg` to zero, so this source version derives DMG/MDMG from flat gear channels rather than ATK/MATK. Its `Dmg_HealArg` is **0.5**. Wisdom/MND, MDMG, MPow, HealPowerRate, HealPoint, and target heal-modifier inputs now have explicit source channels. Per-spell OrgPower, rank/skill-level evaluation, timing, flags, and the complete native healing consumer remain separate work. These local RuneWaker records do not certify current-CoA formulas or balance.
The character, party member, and combat actor retain their own ruleset. No global party or dungeon setting chooses every participant's stat system. This provides a foundation for future mixed parties; matchmaking and cross-game balance certification are outside this change.
## Compatibility evidence
`src/game/generated/characterStatRulesetCompatibility.json` freezes 18 pre-change stat outputs across WoW characters and legacy RoM builds, including gear, modifiers, race, level, and secondary-class cases. `src/game/characterStatRulesetCompatibility.test.ts` checks both omitted rulesets and explicit WoW compatibility against those outputs. This fixture is a simulator regression baseline, not native RoM source data.
## Validation
- 219 focused tests passed across 22 files, with four existing IndexedDB skips: the final 21-file selection passed 211 tests, and the independent native runtime suite passed eight. The source/gear worker's 30-test selection overlaps these totals.
- The runtime suite covers per-owner mode, primary and secondary Mana mirrors, level-10 secondary activation, Wisdom/Holy Blessing and GM-buff cap removal, periodic/channel source amounts, native party autoattacks, and exclusion of foreign WoW attack/critical/hit/haste ratings.
- Ready-five passed seven Vitest and twenty Python checks. Avatar validation passed 47 tests across ten files.
- The final full 8 GB TypeScript/Vite production build passed, including prebuild asset audits, compression, and release-bundle verification. A subsequent TypeScript project check also passed after the final test edits.
- Exact-final-dist Edge QA passed through `scripts/playtest-stat-rulesets.cjs`, using an isolated temporary offline account. New-profile defaults, synthetic legacy migration, independent saved choices, build/checkpoint preservation, both dungeon modes, switching locks, native panel tabs, and desktop/390-pixel layouts passed. Roster and both dungeon screenshots show character bodies and held starter staffs. There were no page errors or application-resource response errors; the optional favicon returned 404.
- Browser evidence: `playtest-artifacts/stat-rulesets/results.json` and its ten referenced screenshots. The checked chunks were `index-CGkT8hBz.js`, `combatStore-CVXgxk1Z.js`, and `PartyFrames-BeW5_TCA.js`. Synthetic engaged-mob and online-activity fixtures verify the menu guards, not a real multiplayer session.
- Final `npm run release:check` passed for 157 changed paths, including untracked files and concurrent unrelated work. Final documentation and owned vault notes satisfy text-file hygiene.
- No full repository suite, all-class balance sweep, RoM readiness promotion, matchmaking, or deployment was performed.
## Native combat amount follow-up (2026-10-03)
This section records the original amount-only pass. Its open native hit/defense/periodic and target-context boundaries are superseded by [the native resolution and damage-type follow-up](ROM_NATIVE_COMBAT_RESOLUTION_PASS_2026-10-03.md), which also records the newest pacing and browser evidence.
`romAbilityCatalog.ts` now carries explicit `romNativeSource` skill/component identities into bound effect amounts. `romNativeCombatAmount.ts` dispatches supported native direct damage, direct HolyHeal, and periodic HolyHeal snapshots from `equipmentAdjustedCombatAmount`; an unsupported source binding or required gear profile leaves the existing shared HealerMan amount fallback in place. Native `MagicProc.MagicLv` currently uses character level clamped to 1–80 as a simulator rule. Active five-build companion casts use the player-build source branch even when the owner is a party NPC.
Direct HolyHeal now uses the source OrgPower/MND/MDMG/MPow/HealPowerRate/HealPoint path with mean variance. Recipient HealAbsorbRate and flat HealAbsorb are applied once at the actual target, then existing generic combat-result stages resolve criticals and overheal. Periodic HolyHeal uses its separate source DotMagic rank correction and snapshots the integer tick amount when applied; player and NPC targets reuse that fixed tick snapshot. Source auto profiles cover player Knight main-hand attacks and NPC Knight/Rogue melee plus Scout Bow attacks, with NPC Rogue offhand. Player Rogue offhand handling requires an explicitly present equipped inventory item. Player Scout Shot uses the native direct-damage route for its actual bound Shoot hit, not a continuous native bow-auto profile. Caster ambient basic attacks retain generic timing and MDMG policy. Player melee haste explicitly reads the existing common aura because native stat re-derivation does not populate common haste fields. Element-specific MPow/BodyRate, unsupported source components, native hit/avoidance point consumption, complete native defense/variance resolution, and full source combat parity remain open. The damage consumer declines share-damage and target-ordinal decrease branches until runtime supplies exact target-count context. Custom/unverified gear cannot enter the source direct-damage training-weapon route and keeps the shared fallback.
The five exact-pair rotation and final full-player diagnostic are tracked in [`ROM_NATIVE_COMBAT_PASS_2026-10-03.md`](ROM_NATIVE_COMBAT_PASS_2026-10-03.md). The post-haste-retention report covers 80 fixed pulls at levels 1/10/30/60/65/66/79/80: all cleared with zero player/NPC deaths and zero invalid casts; trash took 4.5–9 seconds and Anglo 39–53.4 seconds. The scoped health factor applies only to native-stat RoM and leaves legacy WoW-stat RoM, WoW/CoA-origin health, enemy damage, and the level-80 cap unchanged. Source-damage follow-up passed 13 cases: seven helper cases, two player/companion amount-parity and Reflected Shot fail-closed cases, and four actual auto/source-action cases for player Knight main hand, NPC Scout bow, NPC Rogue offhand, and player Scout Shot. Player Rogue offhand handling requires an explicitly equipped inventory item. Player Scout Shot uses the native direct-damage route for its bound Shoot hit. Caster ambient basics keep generic timing/MDMG policy. Final production build and TypeScript project check passed with asset audits, compression, and bundle verification. Exact-dist browser QA passed with 11 screenshots captured and four representative roster, dungeon, NPC-stat, and mobile screenshots visually reviewed. Current chunks were `index-D_h9IRuA.js` and `combatStore-BiA9BOQG.js`; there were no page/server errors and the network response-errors list was empty, with only the optional existing favicon 404 in the console. A release check passed on 249 paths; the final docs update requires the final hygiene/release check. The earlier 60-sample, six-level report is retained as a historical baseline. The ordinary randomized companion pool is now restricted to the active five identities while the configured factory is broader; no pool/readiness promotion is included. No loot wiring, level-cap increase, or legacy/global enemy-HP retune is included.