- 7
- Posts
- 5
- Years
- Seen Nov 17, 2019
I am trying to create a ability that causes pokémon to change form according to the type of move it uses, how can I do that?
next 1 if pokemon.hasMove?(:MIMIMI) && isConst?(pokemon.ability,PBAbilties,:MAMMAMIA)
next
From vanilla version v17.2, inside _Form script, when KELDEO has move SECRETSWORD, will change its form. Copy that. Also the code will be something like this:
Code:next 1 if pokemon.hasMove?(:MIMIMI) && isConst?(pokemon.ability,PBAbilties,:MAMMAMIA) next
Maybe AEGISLASH would be better for what you want.
#Eevee
if hasWorkingAbility(:EVO) && isConst?(self.species,PBSpecies,:EEVEE) && isConst?(thismove.id,PBMoves,:QUICKATTACK) && self.form!=0
!@effects[PBEffects::Transform]
self.form=0; transformed=true
pbUpdate(true)
@battle.scene.pbChangePokemon(self,@pokemon)
@battle.pbDisplay(_INTL("{1} changed to Normal Forme!",pbThis))
PBDebug.log("[Form changed] #{pbThis} changed to Normal Forme")
elsif isConst?(thismove.id,PBMoves,:WATERGUN) && self.form!=1
!@effects[PBEffects::Transform]
self.form=1; transformed=true
pbUpdate(true)
@battle.scene.pbChangePokemon(self,@pokemon)
@battle.pbDisplay(_INTL("{1} changed to Water Forme!",pbThis))
PBDebug.log("[Form changed] #{pbThis} changed to Water Forme")
elsif isConst?(thismove.id,PBMoves,:THUNDERSHOCK) && self.form!=2
!@effects[PBEffects::Transform]
self.form=2; transformed=true
pbUpdate(true)
@battle.scene.pbChangePokemon(self,@pokemon)
@battle.pbDisplay(_INTL("{1} changed to Electric Forme!",pbThis))
PBDebug.log("[Form changed] #{pbThis} changed to Electric Forme")
elsif isConst?(thismove.id,PBMoves,:EMBER) && self.form!=3
!@effects[PBEffects::Transform]
self.form=3; transformed=true
pbUpdate(true)
@battle.scene.pbChangePokemon(self,@pokemon)
@battle.pbDisplay(_INTL("{1} changed to Fire Forme!",pbThis))
PBDebug.log("[Form changed] #{pbThis} changed to Fire Forme")
end
MultipleForms.register(:EEVEE,{
"getBaseStats"=>proc{|pokemon|
next if pokemon.form==0 # Normal Form
next [130,65,60,65,110,95] if pokemon.form==1 # Water Form
next [65,65,60,130,110,95] if pokemon.form==2 # Thunder Form
next [65,130,60,65,95,110] if pokemon.form==3 # Fire Form
},
"onSetForm"=>proc{|pokemon,form|
pbSeenForm(pokemon)
}
})