• 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] How to edit "Call"

1
Posts
5
Years
    • Seen Jan 2, 2021
    Hello!​

    Is it possible to make the shadow trainer call activate without needing the shadow type? I would like to switch the mechanic a bit and rename it to something like "morale".


    You know how in the pokemon anime trainers can tell their pokemon to dodge an attack? I want to make it so a pokemon's evasion increases until the end of the turn. However this lowers defense and sp. defense until the end of the turn aswell. If possible I would like to know which code I can edit and which I cannot.

    Thank you in advance!
     
    1,682
    Posts
    8
    Years
    • Seen today
    So by default, call only appears if it's both a trainer battle and you have shadow type defined in your PBS.
    Code:
    def pbCommandMenu(index)
        shadowTrainer=(hasConst?(PBTypes,:SHADOW) && @battle.opponent)
        ret=pbCommandMenuEx(index,[
           _INTL("What will\n{1} do?",@battle.battlers[index].name),
           _INTL("Fight"),
           _INTL("Bag"),
           _INTL("Pokémon"),
           shadowTrainer ? _INTL("Call") : _INTL("Run")
        ],(shadowTrainer ? 1 : 0))
        ret=4 if ret==3 && shadowTrainer   # Convert "Run" to "Call"
        return ret
      end
    The bit that does the checking is this line here.
    Code:
    shadowTrainer=(hasConst?(PBTypes,:SHADOW) && @battle.opponent)
    If we remove the hasConst?(PBTypes,:SHADOW), as well as the &&, because we no longer have two conditions to check, then it will allow call in regular trainer battles.
     
    Back
    Top