Advertiser Content
Seen 3 Weeks Ago
Posted 3 Weeks Ago
1 posts
62 Days
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!

Vendily

Female
Seen 15 Hours Ago
Posted 1 Day Ago
887 posts
3.9 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)
    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.
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