Added Pokémon properties cannot_store, cannot_release and cannot_trade. Allowed Offspring species property to be edited.

This commit is contained in:
Maruno17
2021-11-08 23:21:20 +00:00
parent 15babcf835
commit 12fd500dbc
9 changed files with 179 additions and 21 deletions

View File

@@ -1030,6 +1030,36 @@ PokemonDebugMenuCommands.register("ownership", {
}
})
#===============================================================================
# Can store/release/trade
#===============================================================================
PokemonDebugMenuCommands.register("setdiscardable", {
"parent" => "main",
"name" => _INTL("Set discardable"),
"always_show" => true,
"effect" => proc { |pkmn, pkmnid, heldpoke, settingUpBattle, screen|
cmd = 0
loop do
msg = _INTL("Click option to toggle.")
cmds = []
cmds.push((pkmn.cannot_store) ? _INTL("Cannot store") : _INTL("Can store"))
cmds.push((pkmn.cannot_release) ? _INTL("Cannot release") : _INTL("Can release"))
cmds.push((pkmn.cannot_trade) ? _INTL("Cannot trade") : _INTL("Can trade"))
cmd = screen.pbShowCommands(msg, cmds, cmd)
break if cmd < 0
case cmd
when 0 # Toggle storing
pkmn.cannot_store = !pkmn.cannot_store
when 1 # Toggle releasing
pkmn.cannot_release = !pkmn.cannot_release
when 2 # Toggle trading
pkmn.cannot_trade = !pkmn.cannot_trade
end
end
next false
}
})
#===============================================================================
# Other options
#===============================================================================