To do this, you'll need to change two sections in the script.I want to add a new pokemon with disguise ability.
The disguise form is form 2 and the busted form is form 3.
Can anyone please tell me how to deal with it?
# Disguise will take the damage
[B]if [email protected] && isConst?(target.ability,PBAbilities,:DISGUISE) &&
((isConst?(target.species,PBSpecies,:MIMIKYU) && target.form==0) || (isConst?(target.species,PBSpecies,:NAMEOFYOURSPECIES) && target.form==2))[/B]
target.damageState.disguise = true
return
end
if target.damageState.disguise
@battle.pbShowAbilitySplash(target)
@battle.pbDisplay(_INTL("Its disguise served it as a decoy!"))
@battle.pbHideAbilitySplash(target)
[B]isConst?(target.species,PBSpecies,:MIMIKYU) ? form = 1 : form = 3
target.pbChangeForm(form,_INTL("{1}'s disguise was busted!",target.pbThis))[/B]
Changing the form back is simple, just add this piece of code into "Pokemon_Forms":Thanks.The problem is that,after a battle,my pokemon won't change back.
MultipleForms.register(:NAMEOFYOURPOKEMON,{
"getFormOnLeavingBattle" => proc { |pkmn,battle,usedInBattle,endBattle|
next 2 if isConst?(pkmn.ability,PBAbilities,:DISGUISE) && (pkmn.fainted? || endBattle)
}
})