• 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] Disguise Ability

13
Posts
6
Years
    • Seen Dec 25, 2019
    Hello There, I want some help with fixing the ability disguise for essentials v16.2, the problem is that Disguise works again after the disguise is busted once

    Put this in PBEffects Disguise = 1xx (it depends the number)


    This goes after @effects[PBEffects::HyperBeam] = 0 in PokeBattle_Battler

    @effects[PBEffects::Disguise] = false
    if isConst?(self.ability,PBAbilities,:DISGUISE)
    @effects[PBEffects::GastroAcid] = false
    end

    This goes in PbCkeckform

    # Mimikyu
    if self.hasWorkingAbility(:DISGUISE) &&
    isConst?(self.species,PBSpecies,:MIMIKYU) && !self.isFainted?
    if self.form==0
    transformed=true
    end
    end

    this goes below the # Weather abilities

    if self.hasWorkingAbility(:AIRLOCK) ||
    self.hasWorkingAbility(:CLOUDNINE)
    @battle.pbDisplay(_INTL("{1} has {2}!",pbThis,PBAbilities.getName(self.ability)))
    @battle.pbDisplay(_INTL("The effects of the weather disappeared."))
    end
    end
    @battle.pbPrimordialWeather
    end
    # Mimikyu
    if self.hasWorkingAbility(:DISGUISE) && onactive && self.form==0
    @effects[PBEffects::Disguise]=true
    end


    Finally this part

    opponent.damagestate.substitute=false
    if opponent.effects[PBEffects::Disguise] && !attacker.hasMoldBreaker
    @battle.scene.pbDamageAnimation(opponent,0)
    @battle.pbDisplay(_INTL("¡Su disfraz se usó como escudo!"))
    opponent.effects[PBEffects::Disguise]=false
    opponent.form=1
    opponent.pbCheckForm
    @battle.pbDisplay(_INTL("¡El disfraz de #{opponent.pbThis} se desarmó!"))
    damage=0
    end


    This script is from here https://www.pokecommunity.com/showthread.php?t=393760

    I hope that anyone can help me :)
     
    Last edited:

    Poq

    144
    Posts
    6
    Years
    • Seen Aug 28, 2021
    Hey ItaloCTA99, that's actually the expected behavior for the script in that thread - it has nothing to do with v16. It even says as much. But that thread also had a link to my new version (where we've also been chatting) which does work correctly. But as I explain in that new version, the two of them are not compatible. So you have to back out the old one to make the new one work.
     
    Back
    Top