From 9344ef8d04fd17584bcdfdb1edf94503e0872808 Mon Sep 17 00:00:00 2001 From: Maruno17 Date: Mon, 21 Jun 2021 23:28:51 +0100 Subject: [PATCH] =?UTF-8?q?Added=20setting=20that=20determines=20if=20Pok?= =?UTF-8?q?=C3=A9mon=20put=20into=20storage=20are=20healed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Data/Scripts/001_Settings.rb | 3 ++ .../004_Interpreter_Commands.rb | 8 ++- .../001_Pokemon-related/004_PokemonStorage.rb | 6 +-- Data/Scripts/016_UI/017_UI_PokemonStorage.rb | 6 +-- Data/Scripts/Gen 8 notes.txt | 50 ++++++++++++------- 5 files changed, 47 insertions(+), 26 deletions(-) diff --git a/Data/Scripts/001_Settings.rb b/Data/Scripts/001_Settings.rb index f0e8566ae..9adfa4f0a 100644 --- a/Data/Scripts/001_Settings.rb +++ b/Data/Scripts/001_Settings.rb @@ -157,6 +157,9 @@ module Settings end # The number of boxes in Pokémon storage. NUM_STORAGE_BOXES = 30 + # Whether putting a Pokémon into Pokémon storage will heal it. IF false, they + # are healed by the Recover All: Entire Party event command (at Poké Centers). + HEAL_STORED_POKEMON = (MECHANICS_GENERATION < 8) #============================================================================= diff --git a/Data/Scripts/003_Game processing/004_Interpreter_Commands.rb b/Data/Scripts/003_Game processing/004_Interpreter_Commands.rb index 710fbc8c6..f9b06952f 100644 --- a/Data/Scripts/003_Game processing/004_Interpreter_Commands.rb +++ b/Data/Scripts/003_Game processing/004_Interpreter_Commands.rb @@ -955,7 +955,13 @@ class Interpreter # * Recover All #----------------------------------------------------------------------------- def command_314 - $Trainer.heal_party if @parameters[0] == 0 + if @parameters[0] == 0 + if Settings::HEAL_STORED_POKEMON # No need to heal stored Pokémon + $Trainer.heal_party + else + pbEachPokemon { |pkmn, box| pkmn.heal } # Includes party Pokémon + end + end return true end diff --git a/Data/Scripts/014_Pokemon/001_Pokemon-related/004_PokemonStorage.rb b/Data/Scripts/014_Pokemon/001_Pokemon-related/004_PokemonStorage.rb index d9ed7e4f7..342f352f2 100644 --- a/Data/Scripts/014_Pokemon/001_Pokemon-related/004_PokemonStorage.rb +++ b/Data/Scripts/014_Pokemon/001_Pokemon-related/004_PokemonStorage.rb @@ -191,7 +191,7 @@ class PokemonStorage raise "Trying to copy nil to storage" if !pkmn pkmn.time_form_set = nil pkmn.form = 0 if pkmn.isSpecies?(:SHAYMIN) - pkmn.heal + pkmn.heal if Settings::HEAL_STORED_POKEMON self[boxDst,indexDst] = pkmn end return true @@ -214,7 +214,7 @@ class PokemonStorage if box>=0 pkmn.time_form_set = nil if pkmn.time_form_set pkmn.form = 0 if pkmn.isSpecies?(:SHAYMIN) - pkmn.heal + pkmn.heal if Settings::HEAL_STORED_POKEMON end self[box,i] = pkmn return true @@ -227,7 +227,7 @@ class PokemonStorage if @currentBox>=0 pkmn.time_form_set = nil pkmn.form = 0 if pkmn.isSpecies?(:SHAYMIN) - pkmn.heal + pkmn.heal if Settings::HEAL_STORED_POKEMON end for i in 0...maxPokemon(@currentBox) if self[@currentBox,i]==nil diff --git a/Data/Scripts/016_UI/017_UI_PokemonStorage.rb b/Data/Scripts/016_UI/017_UI_PokemonStorage.rb index 919c4e012..a3617e779 100644 --- a/Data/Scripts/016_UI/017_UI_PokemonStorage.rb +++ b/Data/Scripts/016_UI/017_UI_PokemonStorage.rb @@ -1722,7 +1722,7 @@ class PokemonStorageScreen p = (heldpoke) ? heldpoke : @storage[-1,index] p.time_form_set = nil p.form = 0 if p.isSpecies?(:SHAYMIN) - p.heal + p.heal if Settings::HEAL_STORED_POKEMON end @scene.pbStore(selected,heldpoke,destbox,firstfree) if heldpoke @@ -1769,7 +1769,7 @@ class PokemonStorageScreen if box>=0 @heldpkmn.time_form_set = nil @heldpkmn.form = 0 if @heldpkmn.isSpecies?(:SHAYMIN) - @heldpkmn.heal + @heldpkmn.heal if Settings::HEAL_STORED_POKEMON end @scene.pbPlace(selected,@heldpkmn) @storage[box,index] = @heldpkmn @@ -1798,7 +1798,7 @@ class PokemonStorageScreen if box>=0 @heldpkmn.time_form_set = nil @heldpkmn.form = 0 if @heldpkmn.isSpecies?(:SHAYMIN) - @heldpkmn.heal + @heldpkmn.heal if Settings::HEAL_STORED_POKEMON end @scene.pbSwap(selected,@heldpkmn) tmp = @storage[box,index] diff --git a/Data/Scripts/Gen 8 notes.txt b/Data/Scripts/Gen 8 notes.txt index 5149f28dc..a8fb90970 100644 --- a/Data/Scripts/Gen 8 notes.txt +++ b/Data/Scripts/Gen 8 notes.txt @@ -3,27 +3,22 @@ Marks, which are symbols randomly given to wild Pokémon which append a title to its name when sent out in battle. A Pokémon can only have 0 or 1 marks. The title can be toggled. Ribbons also provide a title, and can similarly be -toggled. +toggled. (Probably don't bother implementing.) -Super shininess (only difference is an alternate shiny common animation with +Super shininess. Only difference is an alternate shiny common animation with square sparkles; a mon is super shiny if the calculated number that is compared -to SHINY_POKEMON_CHANCE is exactly 0) +to Settings::SHINY_POKEMON_CHANCE is exactly 0. -Look at methods of increasing shiny chance. +The game records, for each species, how many have been caught or defeated +(counts both wild and trainer battles), and the shiny chance increases for that +species because of this. This value is also shown in the Pokédex entry screen. -Form differences. +"Pokémon no longer lose access to moves by evolving." I'm not sure what this +means. Maybe evolving causes the first_moves to be cleared (in the GF games; it +isn't cleared in Essentials)? In Gen 8+, a taught TR should be added to the +first_moves array. -Changes to evolutions due to removal of moss rock/ice rock/magnetic field. - -Some (12) existing species changed egg groups. - -Aegislash's stats changed. - -2 existing Pokémon gained new abilities. - -Pokémon no longer lose access to moves by evolving. - -Move moves have changed properties/effects. Vice Grip becomes Vise Grip. +Some moves have changed properties/effects. Can now give a Rare Candy to a max level Pokémon, which will trigger its evolution (presumably the item isn't consumed if it can't at least try to evolve @@ -31,9 +26,26 @@ it). Bicycle that can work on water. -Town Map added to the pause menu. Can use Fly from within the Town Map if -possible. +Town Map added to the pause menu (don't bother adding). Can use Fly from within +the Town Map if possible (good QoL, add if possible). -Remote access to storage boxes, and Pokémon sent to storage aren't healed. +Remote access to storage boxes. Add an option to the pause screen for this +unless Settings::HEAL_STORED_POKEMON? + +# PBS file data: +# - Form differences. +# - Moveset changes. +# - Changes to evolutions due to removal of moss rock/ice rock/magnetic field. +# - Some (12) existing species changed egg groups. +# - Aegislash's stats changed. +# - 2 existing Pokémon gained new abilities. +# - Vice Grip becomes Vise Grip. +# - Some items change names (Stick -> Leek, etc.). + +#=============================================================================== +# Implemented +#=============================================================================== + +Pokémon sent to storage aren't healed - see Settings::HEAL_STORED_POKEMON. =end