Added more Gen 8 code

This commit is contained in:
Maruno17
2021-07-13 20:52:26 +01:00
parent 8b7a532e29
commit 78f5530cbe
25 changed files with 199 additions and 97 deletions

View File

@@ -163,7 +163,7 @@ class PokeBattle_Battler
end
end
def pbCheckFormOnWeatherChange
def pbCheckFormOnWeatherChange(ability_changed = false)
return if fainted? || @effects[PBEffects::Transform]
# Castform - Forecast
if isSpecies?(:CASTFORM)
@@ -197,6 +197,11 @@ class PokeBattle_Battler
pbChangeForm(0,_INTL("{1} transformed!",pbThis))
end
end
# Eiscue - Ice Face
if !ability_changed && isSpecies?(:EISCUE) && self.ability = :ICEFACE &&
@form == 1 && @battle.pbWeather == :Hail
@canRestoreIceFace = true # Changed form at end of round
end
end
# Checks the Pokémon's form and updates it if necessary. Used for when a
@@ -261,6 +266,12 @@ class PokeBattle_Battler
pbChangeForm(newForm,_INTL("{1} transformed into its Complete Forme!",pbThis))
end
end
# Morpeko - Hunger Switch
if isSpecies?(:MORPEKO) && hasActiveAbility?(:HUNGERSWITCH) && endOfRound
# Intentionally doesn't show the ability splash or a message
newForm = (@form + 1) % 2
pbChangeForm(newForm, nil)
end
end
def pbTransform(target)