Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.
Is there a way to make an ability kind of like Drizzle, Drought, etc. but instead of weather, it brings in Trick Room, Magic Room, Gravity or Wonder Room?
In the PokeBattle_Battler script in def pbAbilitiesOnSwitchIn(onactive), add this code to induce the Trick Room effect for 5 turns (for this example, we can call the ability Reverse Order):
if self.hasWorkingAbility(:REVERSEORDER) && onactive && @battle.effects[PBEffects::TrickRoom]==0
@battle.effects[PBEffects::TrickRoom]=5
# Ability and/or effect animations
# In-battle effect text end
I was wondering about this also. On which line specifically in the section that you referenced does the new script go? Here is what my section in the editor looks like:
################################################################################
# Ability effects
################################################################################
def pbAbilitiesOnSwitchIn(onactive)
return if self.isFainted?
if onactive
@battle.pbPrimalReversion(self.index)
end
# Weather
if onactive
if self.hasWorkingAbility(:PRIMORDIALSEA) && @battle.weather!=PBWeather::HEAVYRAIN
@battle.weather=PBWeather::HEAVYRAIN
@battle.weatherduration=-1
@battle.pbCommonAnimation("HeavyRain",nil,nil)
@battle.pbDisplay(_INTL("{1}'s {2} made a heavy rain begin to fall!",pbThis,PBAbilities.getName(self.ability)))
PBDebug.log("[Ability triggered] #{pbThis}'s Primordial Sea made it rain heavily")