mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-20 12:40:21 +02:00
CLOSES #1396, CLOSES #1398, CLOSES #1400, CLOSES #1401, CLOSES #1406, CLOSES #1407, CLOSES #1411, CLOSES #1413, CLOSES #1415, CLOSES #1416, CLOSES #1417, CLOSES #1419, CLOSES #1421, CLOSES #1422, CLOSES #1423, CLOSES #1424, CLOSES #1425, CLOSES #1427, CLOSES #1428, CLOSES #1429, CLOSES #1431, CLOSES #1432, CLOSES #1433, CLOSES #1435, CLOSES #1437, CLOSES #1440, CLOSES #1441, CLOSES #1442, CLOSES #1443, CLOSES #1447, CLOSES #1449, CLOSES #1456, CLOSES #1464, CLOSES #1465, CLOSES #1468, CLOSES #1469, CLOSES #1470
This commit is contained in:
@@ -313,6 +313,9 @@ function PartyMenu.new(game, opts)
|
||||
-- TM/HM display (ABLE / NOT ABLE per mon instead of the HP bar, and the
|
||||
-- "Use TM on which POKeMON?" prompt). Set by BagMenu.pickTargetAndUse. #210
|
||||
self.tmhm = opts.tmhm
|
||||
-- Evolution stones: opts.evoStone = item id gives Gen 1's
|
||||
-- EVO_STONE_PARTY_MENU ABLE / NOT ABLE display (party_menu.asm:114). #1411
|
||||
self.evoStone = opts.evoStone
|
||||
self.forceSwitch = opts.forceSwitch
|
||||
self.battle = opts.battle
|
||||
self.party = party -- link/scoped battles pass their local party view
|
||||
@@ -800,6 +803,20 @@ function PartyMenu:draw()
|
||||
else
|
||||
Font.draw(Strings("NOT ABLE"), 88, y + 8)
|
||||
end
|
||||
elseif self.evoStone then
|
||||
-- party_menu.asm:114 .evolutionStoneMenu: an EVOLVE_ITEM row matching
|
||||
-- wEvoStoneItemID, printed in the TM/HM strings' row+1 column+9 slot
|
||||
local can = false
|
||||
for _, evo in ipairs(def.evolutions or {}) do
|
||||
if evo.method == "ITEM" and evo.item == self.evoStone then
|
||||
can = true break
|
||||
end
|
||||
end
|
||||
if can then
|
||||
Font.draw(Strings("ABLE"), 120, y + 8)
|
||||
else
|
||||
Font.draw(Strings("NOT ABLE"), 88, y + 8)
|
||||
end
|
||||
else
|
||||
if mon.hp <= 0 then
|
||||
Font.draw(Strings("FNT"), 136, y)
|
||||
|
||||
Reference in New Issue
Block a user