- 38
- Posts
- 10
- Years
- Seen Oct 25, 2024
Hi, I made a Pokemon that changes forms depending on a certain weather like Castform. I want to make it change its moveset when the form is changed mid battle and then revert back to the moveset it had previously when it's back to the original form.
So far here's what I have done:
Changes the form when the weather is changed in PokeBatlle_Battler
Revert back to the original form
Changing forms works perfectly so far. My issue is with the moveset, I need the Pokemon to reset its moveset when it changes forms like it was caught in the wild. The only thing I was able to do is this.
In Pokemon_Forms
This made the moveset reset but only in the summary screen, the battle menu is still showing the old moves. So I'm missing a line that updates the moves menu in real time this is my first problem.
My second problem is I don't know how to make a temporary array that stores the old moves before the form changes and then give it back to the Pokemon when it returns to its original form.
I hope someone can help me.
So far here's what I have done:
Changes the form when the weather is changed in PokeBatlle_Battler
Spoiler:
Code:
if isConst?(self.species,PBSpecies,:FAKEMON)
if @battle.pbWeather==PBWeather::SUNNYDAY && self.form!=1
self.form=1; transformed=true
elsif @battle.pbWeather!=PBWeather::SUNNYDAY && self.form!=0
self.form=0; transformed=true
end
end
Spoiler:
Code:
def pbResetForm
if !@effects[PBEffects::Transform]
if isConst?(self.species,PBSpecies,:CASTFORM) ||
isConst?(self.species,PBSpecies,:CHERRIM) ||
isConst?(self.species,PBSpecies,:DARMANITAN) ||
isConst?(self.species,PBSpecies,:MELOETTA) ||
isConst?(self.species,PBSpecies,:AEGISLASH) ||
isConst?(self.species,PBSpecies,:XERNEAS) ||
isConst?(self.species,PBSpecies,:FAKEMON)
self.form=0
end
end
pbUpdate(true)
end
In Pokemon_Forms
Code:
MultipleForms.register(:FAKEMON,{
"onSetForm"=>proc{|pokemon,form|
if form>0
pokemon.resetMoves
end
}
})
My second problem is I don't know how to make a temporary array that stores the old moves before the form changes and then give it back to the Pokemon when it returns to its original form.
I hope someone can help me.