Files
gen1recomp/mods/examples/portable_api/main.lua
T
Shane McGovern 6e8e29fbd5 feat(mods): add work-in-progress cross-generation API 3
Add shared content, record, world, battle, callback and script boundaries
using Gen 1 conventions while retaining legacy API paths. Include native
adapters, regression fixtures, a portable example and draft documentation.

This is an incomplete implementation with known battle integration and
fixture failures; it is not ready to merge.
2026-10-19 13:00:51 +01:00

22 lines
603 B
Lua

return function(mod)
local mew = mod.content.pokemon:get("MEW")
if mew then
mod.content.pokemon:patch("MEW", {
baseStats = { attack = math.min(255, mew.baseStats.attack + 10) },
})
end
if mod.content.moves:get("TACKLE") then
mod.content.moves:patch("TACKLE", { power = 45 })
end
if mod.content.items:get("POTION") then
mod.content.items:patch("POTION", { price = 100 })
end
local world = mod.world
mod.events:once("world.stepped", function()
local ok, reason = world:setFlag("mod:visited", true)
if not ok then mod.log:warn("%s", reason) end
end)
end