Additional #isSpecies? and #hasItem? refactoring

This commit is contained in:
jonisavo
2020-09-06 20:58:13 +03:00
parent 6252407160
commit 0b1bab3b5c
8 changed files with 13 additions and 17 deletions

View File

@@ -1715,7 +1715,7 @@ class PokemonStorageScreen
if heldpoke || selected[0]==-1
p = (heldpoke) ? heldpoke : @storage[-1,index]
p.formTime = nil if p.respond_to?("formTime")
p.form = 0 if isConst?(p.species,PBSpecies,:SHAYMIN)
p.form = 0 if p.isSpecies?(:SHAYMIN)
p.heal
end
@scene.pbStore(selected,heldpoke,destbox,firstfree)

View File

@@ -587,7 +587,7 @@ class PokemonEvolutionScene
# Modify Pokémon to make it evolved
@pokemon.species = @newspecies
@pokemon.name = newspeciesname if @pokemon.name==oldspeciesname
@pokemon.form = 0 if isConst?(@pokemon.species,PBSpecies,:MOTHIM)
@pokemon.form = 0 if @pokemon.isSpecies?(:MOTHIM)
@pokemon.calcStats
# See and own evolved species
$Trainer.seen[@newspecies] = true

View File

@@ -182,7 +182,7 @@ class PurifyChamber # German: der Kryptorbis
return false if !shadow
return false if shadow.heartgauge!=0
# Define an exception for Lugia
if isConst?(shadow.species,PBSpecies,:LUGIA)
if shadow.isSpecies?(:LUGIA)
maxtempo=PurifyChamber.maximumTempo()
for i in 0...NUMSETS
return false if @sets[i].tempo!=maxtempo