Advertiser Content

Scripting Question How to edit "Call"

Started by sableye64 May 23rd, 2019 4:20 PM
  • 1 replies
Seen May 23rd, 2019
Posted May 23rd, 2019
1 posts
94 Days

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!


Seen 5 Hours Ago
Posted 2 Days Ago
896 posts
4 Years
So by default, call only appears if it's both a trainer battle and you have shadow type defined in your PBS.
def pbCommandMenu(index)
    shadowTrainer=(hasConst?(PBTypes,:SHADOW) && @battle.opponent)
       _INTL("What will\n{1} do?",@battle.battlers[index].name),
       shadowTrainer ? _INTL("Call") : _INTL("Run")
    ],(shadowTrainer ? 1 : 0))
    ret=4 if ret==3 && shadowTrainer   # Convert "Run" to "Call"
    return ret
The bit that does the checking is this line here.
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.

Advertiser Content