#4 boss size/weapon · #5 flicker · point-swap for basic weapons#42
Merged
Conversation
Two owner-reported issues (#5, #4). #5 — Screen/map "berkedip" (flicker) on certain weapons' autoattack Root cause: applyHitToEnemy() runs once PER enemy, but aoe/cleave weapons (e.g. Verdant Reaper) hit many enemies in a SINGLE swing. It added screen-shake per enemy, so G.shake was re-pinned at its max every swing — the camera then jittered continuously (the shake target re-randomises each frame) and the whole screen/map read as flickering. It also spawned 100+ premium impact particles + a ring per enemy, dropping the frame rate (which in turn made the fps-gated light-rim layer blink). onEnemyKilled() stacked death-shake the same way when an aoe killed a crowd. Fix: gate all SCREEN-LEVEL fx to once per swing — • melee hit shake + hit sound + the premium glow ring/shower now fire once per ~0.08s window (bosses always shake/sound); • death shake gated to once per ~0.1s window (boss kills always shake); • the premium ring list is capped at 10, and the global particle pool at 420, so a crowd-hit can't pile up an additive brightness spike or tank the frame rate. Per-enemy feedback (damage numbers, knockback, basic hit burst) is unchanged. #4 — Boss too big + wielding the player's glowing PREMIUM weapon Bosses shared the premium marketplace weapon overlays (argent_waraxe / void_katana / frost_spear / verdant_reaper), so they appeared to wield the exact bright, glowing gear the player buys. _lpcMon() now takes an optional weaponTint; each boss washes its weapon in a dark "corrupted" tint (and never passes weaponGlow), so the blade reads as the boss's own menacing weapon rather than a shiny premium one. Boss scales pulled in from 1.6–1.7 to 1.4–1.5 so they loom without swallowing the room. Enemy.draw forwards the new weaponTint. THE SUTURED ONE stays weaponless as before. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Da8T111jTHKF4hJxJB9YuN
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Owner finding: NullState Point earned from burning items should be swappable for BASIC weapons (not premium), lowest 5000 / highest 12000 Point, with the swap option under Buy and auto-opening once the player has enough Point. - Basic weapons now carry a tokenPrice: Emberwood Maul 5000, Ironbolt Crossbow 8000, Argent Waraxe 12000 (marketplace.ts + mirrored marketplace-items.js). Premium fxTier-3 weapons keep NO tokenPrice — real currency only. - MarketplaceScreen: the "Swap ⇄ Point" button stays directly under Buy and the confirm panel now AUTO-EXPANDS the moment the wallet's Point balance covers the price, so an affordable swap is one tap. - BUGFIX in /api/marketplace/swap: the point deduction used a `.transaction()` that returned `current` (unchanged) when the balance was short. Returning a value COMMITS in RTDB (only `undefined` aborts), so the "not enough Point" branch was dead code and an under-funded swap GRANTED the item for free (it also hit the same cold-cache null-run hazard as the craft route). Replaced with a read-then-write: read the real balance, reject if short, else deduct. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Da8T111jTHKF4hJxJB9YuN
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three fixes. #4 & #5 were pushed to the branch after PR #41 was merged, so they never reached
main— this PR lands them, plus the new point-swap request.#5 — Screen/map "berkedip" (flicker) on certain weapons' autoattack
applyHitToEnemy()runs once per enemy, but aoe/cleave weapons (Verdant Reaper etc.) hit many in a single swing. Adding screen-shake per enemy re-pinnedG.shakeat max every swing → the camera jittered nonstop and the whole screen/map read as flickering. It also spawned 100+ premium particles + a ring per enemy, dropping the frame rate (which made the fps-gated light-rim layer blink);onEnemyKilled()stacked death-shake the same way on aoe crowd-kills.Fix: gate all screen-level fx to once per swing — hit shake + sound + premium ring/shower once per ~0.08s (bosses always shake); death shake once per ~0.1s (boss kills always shake); ring list capped at 10 and the global particle pool at 420. Per-enemy feedback (damage numbers, knockback, basic burst) unchanged.
#4 — Boss too big + wielding the player's glowing PREMIUM weapon
Bosses shared the premium weapon overlays (
argent_waraxe/void_katana/frost_spear/verdant_reaper)._lpcMon()now takes an optionalweaponTint; each boss washes its weapon in a dark "corrupted" tint (and never passesweaponGlow), so it reads as the boss's own menacing weapon, not shiny premium gear. Boss scales pulled in 1.6–1.7 → 1.4–1.5.Enemy.drawforwards the tint; THE SUTURED ONE stays weaponless.Point-swap for basic weapons (new owner finding)
NullState Point (earned from burning items) can now be swapped for basic weapons only, 5000–12000 Point:
marketplace.ts+ mirroredmarketplace-items.js). Premium fxTier-3 weapons keep notokenPrice— real currency only./api/marketplace/swap: the deduction used a.transaction()that returnedcurrent(unchanged) when short — which COMMITS in RTDB (onlyundefinedaborts), so the "not enough Point" branch was dead code and an under-funded swap granted the item for free. Replaced with a read-then-write (read balance, reject if short, else deduct).Verification
node --checkongame.js/entities.js/assets.js/marketplace-items.js; node-load asserts basic weapons carry tokenPrice 5000–12000 and premium weapons carry none.Still to come (own PRs): default weapon + default skin + demo/guest play (#6), season pass (#7).
🤖 Generated with Claude Code