From 7a88d47b4b219434688657dbd7db843a251eac41 Mon Sep 17 00:00:00 2001 From: Maruno17 Date: Fri, 6 May 2022 19:04:13 +0100 Subject: [PATCH] =?UTF-8?q?Minor=20fixes=20to=20Pok=C3=A9rus=20code,=20fix?= =?UTF-8?q?ed=20some=20incorrect=20apostrophes=20in=20PBS=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Data/Scripts/014_Pokemon/001_Pokemon.rb | 13 +++++++++---- PBS/Gen 6/pokemon.txt | 4 ++-- PBS/Gen 7/pokemon.txt | 4 ++-- PBS/Gen 8/pokemon.txt | 4 ++-- PBS/pokemon.txt | 4 ++-- 5 files changed, 17 insertions(+), 12 deletions(-) diff --git a/Data/Scripts/014_Pokemon/001_Pokemon.rb b/Data/Scripts/014_Pokemon/001_Pokemon.rb index b57450709..08b9a2da5 100644 --- a/Data/Scripts/014_Pokemon/001_Pokemon.rb +++ b/Data/Scripts/014_Pokemon/001_Pokemon.rb @@ -789,7 +789,7 @@ class Pokemon end # Returns the Pokérus infection stage for this Pokémon. The possible stages are - # 0 (not infected), 1 (infected) and 2 (cured) + # 0 (not infected), 1 (infected) and 2 (cured). # @return [0, 1, 2] current Pokérus infection stage def pokerusStage return 0 if @pokerus == 0 @@ -797,11 +797,11 @@ class Pokemon end # Gives this Pokémon Pokérus (either the specified strain or a random one). - # @param strain [Integer] Pokérus strain to give + # @param strain [Integer] Pokérus strain to give (1-15 inclusive, or 0 for random) def givePokerus(strain = 0) return if self.pokerusStage == 2 # Can't re-infect a cured Pokémon $stats.pokerus_infections += 1 - strain = rand(1..16) if strain <= 0 || strain >= 16 + strain = rand(1...16) if strain <= 0 || strain >= 16 time = 1 + (strain % 4) @pokerus = time @pokerus |= strain << 4 @@ -810,7 +810,7 @@ class Pokemon # Resets the infection time for this Pokémon's Pokérus (even if cured). def resetPokerusTime return if @pokerus == 0 - strain = @pokerus % 16 + strain = @pokerus / 16 time = 1 + (strain % 4) @pokerus = time @pokerus |= strain << 4 @@ -822,6 +822,11 @@ class Pokemon @pokerus -= 1 end + # Cures this Pokémon's Pokérus (if infected). + def curePokerus + @pokerus -= @pokerus % 16 + end + #============================================================================= # Ownership, obtained information #============================================================================= diff --git a/PBS/Gen 6/pokemon.txt b/PBS/Gen 6/pokemon.txt index 62fa73292..b2c7e8aa9 100644 --- a/PBS/Gen 6/pokemon.txt +++ b/PBS/Gen 6/pokemon.txt @@ -16990,7 +16990,7 @@ Weight = 40.0 Color = Blue Shape = Bipedal Category = Ninja -Pokedex = It appears and vanishes with a ninja’s grace. It toys with its enemies using swift movements, while slicing them with throwing stars of sharpest water. +Pokedex = It appears and vanishes with a ninja's grace. It toys with its enemies using swift movements, while slicing them with throwing stars of sharpest water. Generation = 6 #------------------------------- [BUNNELBY] @@ -17241,7 +17241,7 @@ Weight = 81.5 Color = Brown Shape = Quadruped Category = Royal -Pokedex = With fiery breath of more than 6,000 degrees Celsius, they viciously threaten any challenger. The females protect the pride’s cubs. +Pokedex = With fiery breath of more than 6,000 degrees Celsius, they viciously threaten any challenger. The females protect the pride's cubs. Generation = 6 #------------------------------- [FLABEBE] diff --git a/PBS/Gen 7/pokemon.txt b/PBS/Gen 7/pokemon.txt index 0efab8148..025abb2b7 100644 --- a/PBS/Gen 7/pokemon.txt +++ b/PBS/Gen 7/pokemon.txt @@ -16997,7 +16997,7 @@ Weight = 40.0 Color = Blue Shape = Bipedal Category = Ninja -Pokedex = It appears and vanishes with a ninja’s grace. It toys with its enemies using swift movements, while slicing them with throwing stars of sharpest water. +Pokedex = It appears and vanishes with a ninja's grace. It toys with its enemies using swift movements, while slicing them with throwing stars of sharpest water. Generation = 6 #------------------------------- [BUNNELBY] @@ -17248,7 +17248,7 @@ Weight = 81.5 Color = Brown Shape = Quadruped Category = Royal -Pokedex = With fiery breath of more than 6,000 degrees Celsius, they viciously threaten any challenger. The females protect the pride’s cubs. +Pokedex = With fiery breath of more than 6,000 degrees Celsius, they viciously threaten any challenger. The females protect the pride's cubs. Generation = 6 #------------------------------- [FLABEBE] diff --git a/PBS/Gen 8/pokemon.txt b/PBS/Gen 8/pokemon.txt index 445873bf1..28c1ab2b5 100644 --- a/PBS/Gen 8/pokemon.txt +++ b/PBS/Gen 8/pokemon.txt @@ -17003,7 +17003,7 @@ Weight = 40.0 Color = Blue Shape = Bipedal Category = Ninja -Pokedex = It appears and vanishes with a ninja’s grace. It toys with its enemies using swift movements, while slicing them with throwing stars of sharpest water. +Pokedex = It appears and vanishes with a ninja's grace. It toys with its enemies using swift movements, while slicing them with throwing stars of sharpest water. Generation = 6 #------------------------------- [BUNNELBY] @@ -17254,7 +17254,7 @@ Weight = 81.5 Color = Brown Shape = Quadruped Category = Royal -Pokedex = With fiery breath of more than 6,000 degrees Celsius, they viciously threaten any challenger. The females protect the pride’s cubs. +Pokedex = With fiery breath of more than 6,000 degrees Celsius, they viciously threaten any challenger. The females protect the pride's cubs. Generation = 6 #------------------------------- [FLABEBE] diff --git a/PBS/pokemon.txt b/PBS/pokemon.txt index 445873bf1..28c1ab2b5 100644 --- a/PBS/pokemon.txt +++ b/PBS/pokemon.txt @@ -17003,7 +17003,7 @@ Weight = 40.0 Color = Blue Shape = Bipedal Category = Ninja -Pokedex = It appears and vanishes with a ninja’s grace. It toys with its enemies using swift movements, while slicing them with throwing stars of sharpest water. +Pokedex = It appears and vanishes with a ninja's grace. It toys with its enemies using swift movements, while slicing them with throwing stars of sharpest water. Generation = 6 #------------------------------- [BUNNELBY] @@ -17254,7 +17254,7 @@ Weight = 81.5 Color = Brown Shape = Quadruped Category = Royal -Pokedex = With fiery breath of more than 6,000 degrees Celsius, they viciously threaten any challenger. The females protect the pride’s cubs. +Pokedex = With fiery breath of more than 6,000 degrees Celsius, they viciously threaten any challenger. The females protect the pride's cubs. Generation = 6 #------------------------------- [FLABEBE]