- 79
- Posts
- 9
- Years
- Seen Jan 12, 2024
Hello, I'm trying to script an ability for an evolution of Dugtrio. How it would work, is that when it's first sent out into battle it has the name, sprite and stats of Dugtrio, and once it's hit by a damaging move it would change form to have its actual name, sprite, and stats. I originally tried basing the script off of Mimikyu's ability, with form 0 having dugtrio's info and form 1 having its actual info, but this would make its sprite and stats dugtrio's outside of battle, which I don't want. Instead, I have form 1 having Dugtrio's information, so it shows the correct sprite and stats outside of battle. So my question is, how do I make it so that when it's first sent out into battle it's form 1?
Here's what I did for form 1 in Pokemonforms.txt:
#------------------------------
[DUGTREMOR-1]
Name=Dugtrio
BaseStats=35,100,50,120,50,70
Weight=33.3
BattlerPlayerY=5
BattlerEnemyY=10
BattlerAltitude=0
And Mimikyu's ability script for reference:
underneath def pbReduceHPDamage:
Here's what I did for form 1 in Pokemonforms.txt:
#------------------------------
[DUGTREMOR-1]
Name=Dugtrio
BaseStats=35,100,50,120,50,70
Weight=33.3
BattlerPlayerY=5
BattlerEnemyY=10
BattlerAltitude=0
And Mimikyu's ability script for reference:
underneath def pbReduceHPDamage:
Code:
elsif isConst?(opponent.species,PBSpecies,:MIMIKYU) && opponent.hasWorkingAbility(:DISGUISE) &&
opponent.form!=1
@battle.scene.pbDamageAnimation(opponent,0)
@battle.pbDisplay(_INTL("Its disguise served it as a decoy!"))
opponent.form=1; opponent.pbUpdate(true)
@battle.scene.pbChangePokemon(opponent,opponent.pokemon)
@battle.pbDisplay(_INTL("{1}'s disguise was busted!",opponent.name))
PBDebug.log("[Form changed] #{opponent.pbThis} changed to form #{opponent.form}")
opponent.pbReduceHP((opponent.totalhp/8).floor)