Fixed Sweet Scent not working

This commit is contained in:
Maruno17
2021-08-29 23:49:43 +01:00
parent 6db668b449
commit a9426b0802
2 changed files with 3 additions and 3 deletions

View File

@@ -834,7 +834,7 @@ def pbSweetScent
end
viewport.dispose
enctype = $PokemonEncounters.encounter_type
if enctype || !$PokemonEncounters.encounter_possible_here? ||
if !enctype || !$PokemonEncounters.encounter_possible_here? ||
!pbEncounter(enctype)
pbMessage(_INTL("There appears to be nothing here..."))
end

View File

@@ -152,7 +152,7 @@ class Pokemon
@ability = nil
MultipleForms.call("onSetForm", self, value, oldForm)
calc_stats
$Trainer.pokedex.register(self)
$Trainer.pokedex.register(self) if $Trainer
end
# The same as def form=, but yields to a given block in the middle so that a
@@ -165,7 +165,7 @@ class Pokemon
yield if block_given?
MultipleForms.call("onSetForm", self, value, oldForm)
calc_stats
$Trainer.pokedex.register(self)
$Trainer.pokedex.register(self) if $Trainer
end
def form_simple=(value)