mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-18 19:54: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:
@@ -63,6 +63,7 @@ local Chrome = require("src.ui.gen2.Chrome")
|
||||
local Font = require("src.render.Font")
|
||||
local GbcPalette = require("src.render.GbcPalette")
|
||||
local HpBar = require("src.battle.gen2.HpBar")
|
||||
local ItemEffects = require("src.core.gen2.ItemEffects")
|
||||
local Mon = require("src.battle.gen2.Mon")
|
||||
local Palettes = require("src.world.gen2.Palettes")
|
||||
local Pokerus = require("src.core.gen2.Pokerus")
|
||||
@@ -109,15 +110,6 @@ local TYPE_NAMES = {
|
||||
CURSE_TYPE = "???",
|
||||
}
|
||||
|
||||
-- PlaceStatusString (engine/pokemon/mon_stats.asm): three letters, and a mon
|
||||
-- with no HP reads FNT whatever its status byte says. Same table the party
|
||||
-- list uses; both screens call the same routine on the cart.
|
||||
local STATUS_STRING = {
|
||||
slp = "SLP", psn = "PSN", brn = "BRN", frz = "FRZ", par = "PAR",
|
||||
poison = "PSN", burn = "BRN", freeze = "FRZ", paralysis = "PAR",
|
||||
sleep = "SLP", toxic = "PSN",
|
||||
}
|
||||
|
||||
-- Gen 2 pics are 5x5, 6x6 or 7x7 and PadFrontpic centres the small ones in
|
||||
-- the 7x7 block PrepMonFrontpic lays at hlcoord 0, 0. Same table the dex
|
||||
-- uses, for the same reason.
|
||||
@@ -208,11 +200,15 @@ local function levelText(level)
|
||||
return "<LV>" .. tostring(level)
|
||||
end
|
||||
|
||||
-- PlaceStatusString (engine/pokemon/mon_stats.asm): three letters, and a mon
|
||||
-- with no HP reads FNT whatever its status byte says. Same lookup the party
|
||||
-- list makes; both screens call the same routine on the cart.
|
||||
local function statusText(mon)
|
||||
if (mon.hp or 0) <= 0 then return "FNT" end
|
||||
local status = mon.status
|
||||
if not status then return nil end
|
||||
return STATUS_STRING[tostring(status):lower()]
|
||||
local class = ItemEffects.STATUS_CLASS[tostring(status):lower()]
|
||||
return class and class:upper()
|
||||
end
|
||||
|
||||
-- wTempMonPokerusStatus is one byte: the low nibble counts the days left and
|
||||
|
||||
Reference in New Issue
Block a user