Food was never removed. The drop was never delivered. - #229
Merged
Conversation
OWNER: *"Lootingan food ko skrg kaya gaada ya?? ini serius perlu di bahas
kenapa di hilangkan sebelum2nya entah olehmu atau agent2 sebelumnya."*
Nobody removed it. applyLoot() in game.js handled hp, xp, relic, goldkey, paper
and gshard — and had no `item` branch at all. Nine breakable props roll `item`:
crate, crystal, tablet, statue, oak_barrel, barrel_stack, hay_pile,
plaque_sword, cot. Every one of those rolls fell through every branch, played
the pickup sound, and logged "— loot!" because the roll was not 'none'. The
player got nothing.
His own screenshot is the proof: *"Straw Bedding shattered — loot!"* over an
inventory that never changed.
Food is the edible ~16% of the same 1244-icon library (NS_MARKET.FOOD_RANGES,
ids 321-515), so a broken item path took food down with it. Interactive
containers were unaffected — those hand items over through the container window,
which is why chests always felt fine and everything else felt empty.
FIRST, the delivery. applyLoot gains an `item`/`food` branch that rolls at the
tier the loot table asked for (['item',2,30] means a tier-2 roll — that is how a
chest yields better icons than a barrel), adds it to the stash, and says what it
was. A stack already at its cap now says so out loud rather than repeating the
silent loss this branch exists to fix.
THEN the rate, which is what the owner actually asked for. Even working, food
arrived as a sixth of an item roll, and the props a player smashes most had no
item roll at all — vase, pot, bones, rubble were flat zeros. So the props that
hold PROVISIONS drop food directly now, as its own loot kind:
Stocked Shelf 28.6% Straw Bedding 27.4% Supply Crate 27.0%
Barrel Stack 26.3% Water Pail 26.0% Oak Barrel 25.4%
Herb Pot 22.1% Wash Basin 20.3% Rotten Cot 20.0%
Wooden Pail 19.8% Wooden Table 19.8%
Treasure containers keep their old ~5% — a strongbox holds treasure, not lunch.
Weight came out of `none` first and `xp` second, so the hp/relic/gshard
economies are untouched: this adds food, it does not quietly make every prop
richer.
rollFoodDrop() draws from the edible range with no rarity re-roll. rollItemDrop
biases toward better rarity for richer containers; food heals 3-5% of max HP by
rarity, a spread too narrow to be worth the bias, and a legendary apple reads as
a joke.
scripts/test-prop-loot.js drives the real engine — mounts a run, spawns props,
smashes them through the same smashDecor() a weapon swing calls, and asserts on
the STASH rather than the log line, because the log line was never what broke.
With the new branch disabled it fails five assertions with 0 items from 400
smashes. It also checks a Glazed Vase still drops nothing, which is what would
fail if the fix had been "make every prop richer".
Verified: 9/9 test:proploot, test-floor-traversable unchanged (0 sealed floors,
1.9 openable containers per floor), audit and check:market clean.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017A764RdnwpyWnG7uCNhMiQ
|
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.
|
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.
The owner asked why food loot had been taken out. Nobody took it out.
applyLoot()ingame.jshandledhp,xp,relic,goldkey,paperandgshard— and had noitembranch at all. Nine breakable props rollitem: crate, crystal, tablet, statue, oak_barrel, barrel_stack, hay_pile, plaque_sword, cot. Every one of those rolls fell through every branch, played the pickup sound, and logged "— loot!" because the roll was not'none'. The player got nothing.His own screenshot is the proof: "Straw Bedding shattered — loot!" over an inventory that never changed.
Food is the edible ~16% of the same 1,244-icon library (
NS_MARKET.FOOD_RANGES, ids 321–515), so a broken item path took food down with it. Interactive containers were unaffected — those hand items over through the container window, which is exactly why chests always felt fine and everything else felt empty.First, the delivery
applyLootgains anitem/foodbranch that rolls at the tier the loot table asked for (['item',2,30]means a tier-2 roll — that is how a chest yields better icons than a barrel), adds it to the stash, and names what it was. A stack already at its cap now says so out loud, rather than repeating the silent loss this branch exists to fix.Then the rate, which is what was actually asked for
Even working, food arrived as a sixth of an item roll — and the props a player smashes most had no item roll at all (
vase,pot,bones,rubblewere flat zeros). So props that hold provisions now drop food directly, as its own loot kind:Treasure containers keep their old ~5% — a strongbox holds treasure, not lunch. Weight came out of
nonefirst andxpsecond, so the hp/relic/gshard economies are untouched: this adds food, it does not quietly make every prop richer.rollFoodDrop()draws from the edible range with no rarity re-roll.rollItemDropbiases toward better rarity for richer containers; food heals 3–5% of max HP by rarity, a spread too narrow to be worth the bias, and a legendary apple reads as a joke.Testing
scripts/test-prop-loot.jsdrives the real engine — mounts a run, spawns props, smashes them through the samesmashDecor()a weapon swing calls, and asserts on the stash, not the log line, because the log line was never what broke.With the new branch disabled it fails five assertions:
It also asserts a Glazed Vase still drops nothing — which is what would fail if the fix had been "make every prop richer".
Separately: the two objects in the doorway
Measured, could not reproduce. Across 60 generated floors and 644 doors: zero opening onto rock, zero with rock on one side, zero reachable-but-not-passable with every prop in place. The circled objects in the screenshot are the doors themselves, and they are all connected and walkable. Left unchanged rather than guessing at placement rules that measure clean.
Generated by Claude Code