• 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] Where to add "confused?" method?

18
Posts
3
Years
  • EDIT: I've solved this issue on my own, I think.







    I'm trying to make a custom move that works like venoshock, but instead of poison it doubles power if confused.

    Code:
    [Pokémon Essentials version 20.1]
    
    Exception: NoMethodError
    Message: undefined method `confused?' for #<Battle::Battler>
    
    Backtrace:
    179:MoveEffects_MoveAttributes:1658:in `pbBaseDamage'
    174:Move_UsageCalculations:262:in `pbCalcDamage'
    166:Battler_UseMove:633:in `block in pbProcessMoveHit'
    166:Battler_UseMove:625:in `each'
    166:Battler_UseMove:625:in `pbProcessMoveHit'
    166:Battler_UseMove:407:in `block in pbUseMove'
    166:Battler_UseMove:405:in `times'
    166:Battler_UseMove:405:in `pbUseMove'
    166:Battler_UseMove:52:in `block in pbProcessTurn'
    012:PBDebug:6:in `logonerr'

    I can't seem to find the area in the scripts to add a confused method, does anyone know where the target methods are located (example: target.poisoned?).
     
    Last edited:
    Back
    Top