big bug squash (#261)

This commit is contained in:
bryanthaboi
2026-07-26 13:38:52 -04:00
committed by GitHub
parent a8936e79d6
commit f7695308b7
72 changed files with 7375 additions and 372 deletions
+5 -2
View File
@@ -106,8 +106,11 @@ local function sell(game)
onChoose = function(item)
local def = game.data.items[item.value]
-- only key items and HMs are unsellable (pokemart.asm IsKeyItem /
-- IsItemHM); zero-price items like ETHER sell for ¥0
if (def and def.keyItem) or item.value:find("^HM_") then
-- IsItemHM); zero-price items like ETHER sell for ¥0. An unknown id
-- (nil def) has no price, so treat it as unsellable too rather than
-- indexing nil below -- guards saves that already picked up a bogus
-- ITEM_NONE "0" from Blue's House before that pickup was fixed (#11).
if not def or def.keyItem or item.value:find("^HM_") then
list.footer = txt(game, "_PokemartUnsellableItemText",
"I can't put a\nprice on that.")
return