Bugsquashingjuly26 (#264)

* big bug squash

* ok
This commit is contained in:
bryanthaboi
2026-07-26 14:11:07 -04:00
committed by GitHub
parent f7695308b7
commit 043f6b2426
9 changed files with 296 additions and 113 deletions
+7
View File
@@ -2781,6 +2781,13 @@ function BattleState:enemyMonFainted()
local levels, gained = Experience.apply(self.data, mon, self.enemy.def,
self.enemy.mon.level, self.kind == "trainer",
split, mon.traded)
-- Track level-ups for EvolveAfterBattle (OverworldState:afterBattle ->
-- Evolution.checkParty). B-cancel leaves the mon at/above threshold;
-- without this gate it re-triggers after every later fight (#213).
if #levels > 0 then
self.leveledUp = self.leveledUp or {}
self.leveledUp[mon] = true
end
Runtime.emit("battle.exp_gained", {
battle = self, mon = mon, gained = gained, levels = levels,
})