e
This commit is contained in:
parent
f657b6a4a4
commit
d163ceb291
76 changed files with 1385 additions and 524 deletions
|
|
@ -6,10 +6,13 @@ const combat = fs.readFileSync("js/world_combat_effects.js", "utf8");
|
|||
const all = fs.readdirSync("js").filter(x => x.endsWith(".js")).map(x => fs.readFileSync(`js/${x}`, "utf8")).join("\n");
|
||||
ok(!/\.map\([\s\S]{0,300}\.sort\(/.test(sim), "effect pressure compaction no longer map/sorts all effects");
|
||||
ok(sim.includes("for (let priority = 1; priority <= 3"), "effect pressure drops by priority tiers");
|
||||
ok(combat.includes('new Set(["ring", "fight", "flame", "fall"])'), "effect pool is limited to simple high-frequency types");
|
||||
ok(combat.includes('"bleed", "bubble", "eat", "explosion", "heart", "shoot_impact", "zunchi_miasma", "electric_shock", "wind"'), "all transient effect variants use the reusable pool path");
|
||||
ok(combat.includes("offscreenCulled"), "low-importance offscreen spawns are tracked and culled");
|
||||
ok(combat.includes('visualLevel?.("effects", "high") === "off"'), "effect creation is gated by the visual-effects setting");
|
||||
ok(sim.includes('visualLevel?.("effects", "high") === "off"') && sim.includes("clearDisabledEffects"), "disabled effects are released instead of updated");
|
||||
ok(sim.includes('if (effect.type === "ring")') && sim.includes("lightweight"), "rings bypass the budgeted physics update path");
|
||||
ok(!sim.includes("const budgeted = []"), "effect updates do not allocate a temporary active-effect array each frame");
|
||||
ok(sim.includes("spawnRequested") && sim.includes("poolEligible") && sim.includes("pooled"), "effect runtime diagnostics expose spawn and pool counters");
|
||||
const direct = [...all.matchAll(/effects\.push\(new Effect\(/g)].length;
|
||||
ok(direct === 0, "normal Effect construction is routed through spawnEffect");
|
||||
const direct = [...all.matchAll(/(?:effects(?:\?\.)?\.push|effects\.push)\(new\s+(?:global\.)?(?:TarinaiEffect|EffectCtor|Effect)\(/g)].length;
|
||||
ok(direct === 0, "normal Effect construction is routed through queueEffect");
|
||||
console.log("[OK] effect runtime regression audit passed");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue