CLOSES #1928, CLOSES #1929, CLOSES #1930, CLOSES #1931, CLOSES #1933, CLOSES #1934, CLOSES #1935, CLOSES #1936

This commit is contained in:
bryanthaboi
2026-08-29 09:00:17 -04:00
parent 36ad59bdbb
commit cba47b04e8
43 changed files with 2049 additions and 91 deletions
+6 -2
View File
@@ -1382,9 +1382,13 @@ H.GiveShuckle = function(vm)
end
mon.ot = Specials.MANIA_OT
mon.otId = Specials.MANIA_OT_ID
list[#list + 1] = mon
-- TryAddMonToParty's .registerpokedex (engine/pokemon/move_mon.asm:188-196) #1719
local record = save(vm)
list[#list + 1] = mon
-- ../pokecrystal/engine/events/shuckle.asm:18-19
if Mon.hasCaughtData(record and record.version) then
Mon.setGiftCaughtData(mon, "unknown")
end
-- TryAddMonToParty's .registerpokedex (engine/pokemon/move_mon.asm:188-196) #1719
if record then
record.pokedex = record.pokedex or { seen = {}, caught = {} }
record.pokedex.seen[mon.species] = true
+4 -1
View File
@@ -1948,6 +1948,7 @@ function Vm.new(scripts, text, events, hooks)
playMusicFn = hooks.playMusic,
specialSoundFn = hooks.specialSound,
waitSfxFn = hooks.waitSfx,
waitSfxCapFn = hooks.waitSfxCap,
-- StartAutoInput, by script pointer (`autoinput`) and by stream name
-- (CatchTutorial), plus StopAutoInput. See src/core/gen2/AutoInput.lua.
autoInputFn = hooks.autoInput,
@@ -2681,8 +2682,10 @@ function Vm:resume(resumeValue)
self:resume()
end)
elseif req and req.kind == "waitsfx" then
-- home/audio.asm:225
self.waitSfx = true
self.waitSfxLeft = 180 -- safety cap (~3s) if a source never ends
local cap = self.waitSfxCapFn and self.waitSfxCapFn()
self.waitSfxLeft = math.max(cap or 180, 1)
elseif req and req.kind == "battle" then
if self.startBattleFn then
self.startBattleFn(req.trainer, req.wild, function(outcome)