• 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.

[Scripting Question] Alolan Abilities and new ones

  • 13
    Posts
    6
    Years
    • Seen Dec 25, 2019
    Anyone can help me? I need help with a special attack version of intimidate (A random name can be Brain Freeze) I only make this part (sorry for my english , i'm talk spanish)

    In PokeBattle_Battler under Intimidate code

    # BrainFreeze
    if self.hasWorkingAbility(:BRAINFREEZE) && onactive
    PBDebug.log("[Ability triggered] #{pbThis}'s BrainFreeze")
    for i in 0...4
    if pbIsOpposing?(i) && [email protected].isFainted?
    @battle.battlers.pbReducespecialattackStatBrainFreeze(self)
    end
    end
    end

    And this is the part that I don't understand , In PokeBattle_BattlerEffects , you have to find this part "def pbReduceAttackStatIntimidate(opponent)" and all of this you have to put this code under it

    def pbReducespecialattackStatBrainFreeze(opponent)
    return false if isFainted?
    if effects[PBEffects::Substitute]>0
    @battle.pbDisplay(_INTL("{1}'s substitute protected it from {2}'s {3}!",
    pbThis,opponent.pbThis(true),PBAbilities.getName(opponent.ability)))
    return false
    end
    if !opponent.hasWorkingAbility(:CONTRARY)
    if pbOwnSide.effects[PBEffects::Mist]>0
    @battle.pbDisplay(_INTL("{1} is protected from {2}'s {3} by Mist!",
    pbThis,opponent.pbThis(true),PBAbilities.getName(opponent.ability)))
    return false
    end
    if hasWorkingAbility(:CLEARBODY) || hasWorkingAbility(:WHITESMOKE) ||
    hasWorkingAbility(:HYPERCUTTER) || hasWorkingAbility(:FULLMETALBODY) ||
    (hasWorkingAbility(:FLOWERVEIL) && pbHasType?(:GRASS))
    abilityname=PBAbilities.getName(self.ability)
    oppabilityname=PBAbilities.getName(opponent.ability)
    @battle.pbDisplay(_INTL("{1}'s {2} prevented {3}'s {4} from working!",
    pbThis,abilityname,opponent.pbThis(true),oppabilityname))
    return false
    end
    if pbPartner.hasWorkingAbility(:FLOWERVEIL) && pbHasType?(:GRASS)
    abilityname=PBAbilities.getName(pbPartner.ability)
    oppabilityname=PBAbilities.getName(opponent.ability)
    @battle.pbDisplay(_INTL("{1}'s {2} prevented {3}'s {4} from working!",
    pbPartner.pbThis,abilityname,opponent.pbThis(true),oppabilityname))
    return false
    end
    end
    return pbReduceStatWithCause(PBStats::SPATK,1,opponent,PBAbilities.getName(opponent.ability))
    end
    end



    And yeah I need help with some abilities and moves of gen 7

    Any help is very appreciated and I will credit anyone that can help me :)
     
    Last edited by a moderator:
    Back
    Top