build(combat): numbers foundation — formulas→Lua hot-reload + CombatSim + a CI band #217
No reviewers
Labels
No labels
alpha:wave-0
alpha:wave-1
alpha:wave-2
alpha:wave-3
area:assets
area:combat
area:ecology
area:infra
area:render
area:scripting
area:ui
area:world
enhancement
epic
migration
post-alpha
roadmap
tech-debt
type:bug
type:chore
type:design
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
marco/IsoMmo!217
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/combat-numbers"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Phase 1 of the combat rework (design #214): the demonstrable-numbers foundation, proven on the existing
HitChance— server-only, no combat-behaviour change (identical numbers, verified by a parity test). It stands up the loop the owner asked for: edit a Lua formula → hot-reload → CombatSim → CI band, on the real shared code.content/scripts/combat/formulas.lua— a pure-function Lua module (constants inline, hot-reloadable) withhitChanceidentical to the old static formula. The combat pipeline stays C#; only the tunable curves are Lua content.FunctionModuleHost/LuaFunctionModule(Scripting) — compile-once + cache + hot-reload swap (keeps the last-good module on a bad edit); a genuinely new host capability (function module, not content registration).LuaCombatFormulasbehind anICombatFormulasseam — sanitises the Lua return (NaN/±∞/out-of-range collapse to a safe guaranteed-miss, never reaching the tick), isolates a runtime error online; a fatal startup probe pre-online.CombatSystem/World/Programwire it;/reloadscriptsreloads it.tools/IsoMmo.CombatSimoverIsoMmo.CombatSim.Core— a seeded Monte-Carlo duel harness on the SHARED Lua curve; prints a matchup table and writes a visible self-contained HTML report (win-rate + TTK).just combatsim.Screenshots / recording
N/A — dev tooling, no game surface. Evidence:
just combatsimreads the real Lua and reportsHow it was tested
just lint0 warnings;just testgreen (GameServer 284, CombatSim.Core 4 = the bands, Scripting 39 incl. 7 function-module tests, + others);just check-docs+just lua-lintclean; whole solution builds (client + tools). New tests:FunctionModuleHostTests(load/compile/invoke/NaN/reload-swap/last-good),LuaCombatFormulasTests(parity grid + clamp/NaN/∞ guard + online error isolation),DuelHarnessBandTests(the seeded bands + exact reproducibility). Ranjust combatsim(output above).Checklist
just lintpasses (zero warnings)just testis greenCloses #216. Refs #214.