Added effects of Mimicry/Room Service/Catching Charm, tweaked Sinistea's form chances, fixed bug in Fling about TRs.

This commit is contained in:
Maruno17
2021-08-14 19:07:57 +01:00
parent 153aa69bb8
commit 2112cdba37
15 changed files with 120 additions and 37 deletions

View File

@@ -61,6 +61,17 @@ class PokeBattle_Battler
return ret # Whether self has switched out
end
def pbAbilityOnTerrainChange(ability_changed = false)
return if !abilityActive?
BattleHandlers.triggerAbilityOnTerrainChange(self.ability, self, @battle, ability_changed)
end
# Used for Rattled's Gen 8 effect. Called when Intimidate is triggered.
def pbAbilitiesOnIntimidated
return if !abilityActive?
BattleHandlers.triggerAbilityOnIntimidated(self.ability, self, @battle)
end
# Called when a Pokémon (self) enters battle, at the end of each move used,
# and at the end of each round.
def pbContinualAbilityChecks(onSwitchIn=false)
@@ -91,12 +102,6 @@ class PokeBattle_Battler
end
end
# Used for Rattled's Gen 8 effect. Called when Intimidate is triggered.
def pbAbilitiesOnIntimidated
return if !abilityActive?
BattleHandlers.triggerAbilityOnIntimidated(self.ability, self, @battle)
end
#=============================================================================
# Ability curing
#=============================================================================
@@ -123,6 +128,8 @@ class PokeBattle_Battler
@effects[PBEffects::SlowStart] = 0 if self.ability != :SLOWSTART
# Revert form if Flower Gift/Forecast was lost
pbCheckFormOnWeatherChange(true)
# Abilities that trigger when the terrain changes
pbAbilityOnTerrainChange(true)
# Check for end of primordial weather
@battle.pbEndPrimordialWeather
end