Scripting Question Thunder Armor Ability

Started by HeroesFightingFear 2 Weeks Ago 7:37 AM
  • 175 views
  • 3 replies

HeroesFightingFear

"The Champion of Alon"

Age 22
Male
Orange, TX
Seen 2 Days Ago
Posted 2 Weeks Ago
49 posts
119 Days
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.
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.
Female
Spain
Seen 4 Days Ago
Posted 2 Weeks Ago
5 posts
3.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)
        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"

Age 22
Male
Orange, TX
Seen 2 Days Ago
Posted 2 Weeks Ago
49 posts
119 Days
It was pretty simple to do.
Just copy this code and paste above this line: if target.hasWorkingAbility(:JUSTIFIED) && isConst?(movetype,PBTypes,:DARK)
        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.