CLOSES #223, CLOSES #233, CLOSES #236, CLOSES #240, CLOSES #241, CLOSES #249, CLOSES #252, CLOSES #255, CLOSES #257, CLOSES #258, CLOSES #263, CLOSES #265, CLOSES #274, CLOSES #275, CLOSES #276, CLOSES #279, CLOSES #280, CLOSES #282, CLOSES #283, CLOSES #287, CLOSES #291, CLOSES #292, CLOSES #293, CLOSES #301, CLOSES #304, CLOSES #315, CLOSES #316, CLOSES #317, CLOSES #321, CLOSES #322, CLOSES #330

This commit is contained in:
bryanthaboi
2026-07-28 10:29:05 -04:00
parent 3b1032cc63
commit f9f38d161f
103 changed files with 11157 additions and 838 deletions
+9
View File
@@ -7,6 +7,7 @@ local Font = require("src.render.Font")
local ListMenu = require("src.ui.ListMenu")
local Menu = require("src.ui.Menu")
local Party = require("src.pokemon.Party")
local Stats = require("src.pokemon.Stats")
local TextBox = require("src.render.TextBox")
local Strings = require("src.core.Strings")
@@ -73,6 +74,14 @@ local function withdraw(game)
list.footer = "The party is full!"
return
end
-- add_mon.asm _MoveMon's tail ("returning mon to party, compute
-- level and stats"): a box mon carries no stat block, because
-- box_struct stops before MON_LEVEL/MON_STATS, so the party copy
-- runs CalcStats. Without it a mon decoded out of an imported .sav
-- reaches the party menu with mon.stats nil and the HP bar draw
-- nil-indexes it (#304, same family as #233). Already-shaped mons
-- (everything the engine itself put in a box) pass through.
Stats.ensure(game.data.pokemon[mon.species], mon)
table.remove(box, item.value)
table.insert(game.save.party, mon)
local name = monName(game, mon)