• 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] Thunder Armor Ability

HeroesFightingFear

"The Champion of Alon"
99
Posts
4
Years
  • I also had an idea inspired by the anime.
    The Thunder Armor ability is made for Swellow, and works best in tandem with items that weaken Electric moves.
    Code:
    165,THUNDERARMOR,Thunder Armor,"When hit by an Electric-type move, this Pokémon's form changes."
    I need help figuring out how to program this.
     
    1,403
    Posts
    10
    Years
    • Seen Apr 29, 2024
    So, an ability like Justified is probably a good place to start, it triggers when hit by a move of a particular type. Then you'll need to work out how to change the form. Perhaps looking for how Castform or Zen Mode works is a start there, since they are form changes that happen in-battle.
     
    16
    Posts
    7
    Years
  • It was pretty simple to do.
    Just copy this code and paste above this line: if target.hasWorkingAbility(:JUSTIFIED) && isConst?(movetype,PBTypes,:DARK)
    Code:
            if target.hasWorkingAbility(:THUNDERARMOR) && isConst?(movetype,PBTypes,:ELECTRIC) && target.form == 0
              target.form = 1
              target.pbUpdate(true)
              @battle.scene.pbChangePokemon(target,target.pokemon)
              @battle.pbDisplay(_INTL("¡{1} change its form!", target.pbThis,PBAbilities.getName(target.ability)))
            end

    This should work perfectly ^^
     

    HeroesFightingFear

    "The Champion of Alon"
    99
    Posts
    4
    Years
  • It was pretty simple to do.
    Just copy this code and paste above this line: if target.hasWorkingAbility(:JUSTIFIED) && isConst?(movetype,PBTypes,:DARK)
    Code:
            if target.hasWorkingAbility(:THUNDERARMOR) && isConst?(movetype,PBTypes,:ELECTRIC) && target.form == 0
              target.form = 1
              target.pbUpdate(true)
              @battle.scene.pbChangePokemon(target,target.pokemon)
              @battle.pbDisplay(_INTL("¡{1} change its form!", target.pbThis,PBAbilities.getName(target.ability)))
            end

    This should work perfectly ^^

    Indeed it does. One thing I didn't think of is that Swellow can get paralyzed, and it becomes Electric/Flying after changing its form. It does work though, even has the set stat changes and set sprites.
     
    Back
    Top