Look for 'Pokemon_Forms' script and add a new def called 'pbOnEndingBattle(battle,pokemon)' after 'def pbOnEnteringBattle(battle,pokemon)' code:
class PokeBattle_RealBattlePeer
def pbOnEnteringBattle(battle,pokemon)
f=MultipleForms.call("getFormOnEnteringBattle",pokemon)
if f
pokemon.form=f
end
end
def pbOnEndingBattle(battle,pokemon)
f=MultipleForms.call("getFormOnEndingBattle",pokemon)
if f
pokemon.form=f
end
end
endNow replace their codes for:
MultipleForms.register(:BURMY,{
"getFormOnEndingBattle"=>proc{|pokemon|
env=pbGetEnvironment()
if !pbGetMetadata($game_map.map_id,MetadataOutdoor)
next 2 # Trash Cloak
elsif env==PBEnvironment::Sand || env==PBEnvironment::Rock || env==PBEnvironment::Cave
next 1 # Sandy Cloak
else
next 0 # Plant Cloak
end
}
})
MultipleForms.register(:WORMADAM,{
"getMoveCompatibility"=>proc{|pokemon|
next if pokemon.form==0
movelist=[]
case pokemon.form
when 1; movelist=[# TMs
:TOXIC,:VENOSHOCK,:HIDDENPOWER,:SUNNYDAY,:HYPERBEAM,
:PROTECT,:RAINDANCE,:SAFEGUARD,:FRUSTRATION,:EARTHQUAKE,
:RETURN,:DIG,:PSYCHIC,:SHADOWBALL,:DOUBLETEAM,
:SANDSTORM,:ROCKTOMB,:FACADE,:REST,:ATTRACT,
:THIEF,:ROUND,:GIGAIMPACT,:FLASH,:STRUGGLEBUG,
:PSYCHUP,:BULLDOZE,:DREAMEATER,:SWAGGER,:SUBSTITUTE,
# Move Tutors
:BUGBITE,:EARTHPOWER,:ELECTROWEB,:ENDEAVOR,:MUDSLAP,
:SIGNALBEAM,:SKILLSWAP,:SLEEPTALK,:SNORE,:STEALTHROCK,
:STRINGSHOT,:SUCKERPUNCH,:UPROAR]
when 2; movelist=[# TMs
:TOXIC,:VENOSHOCK,:HIDDENPOWER,:SUNNYDAY,:HYPERBEAM,
:PROTECT,:RAINDANCE,:SAFEGUARD,:FRUSTRATION,:RETURN,
:PSYCHIC,:SHADOWBALL,:DOUBLETEAM,:FACADE,:REST,
:ATTRACT,:THIEF,:ROUND,:GIGAIMPACT,:FLASH,
:GYROBALL,:STRUGGLEBUG,:PSYCHUP,:DREAMEATER,:SWAGGER,
:SUBSTITUTE,:FLASHCANNON,
# Move Tutors
:BUGBITE,:ELECTROWEB,:ENDEAVOR,:GUNKSHOT,:IRONDEFENSE,
:IRONHEAD,:MAGNETRISE,:SIGNALBEAM,:SKILLSWAP,:SLEEPTALK,
:SNORE,:STEALTHROCK,:STRINGSHOT,:SUCKERPUNCH,:UPROAR]
end
for i in 0...movelist.length
movelist[i]=getConst(PBMoves,movelist[i])
end
next movelist
}
})Now in 'PokeBattle_BattlePeer' script, after 'def pbOnEnteringBattle(battle,pokemon)' code, paste the def for 'pbOnEndingBattle(battle,pokemon)':
def pbOnEndingBattle(battle,pokemon)
end
def pbStorePokemon(player,pokemon)
Finally, go to 'PokeBattle_Battle' script, then inside 'def pbEndOfBattle(canlose=false)' below 'for i in $Trainer.party', paste '@peer.pbOnEndingBattle(self,i)', like:
for i in $Trainer.party
@peer.pbOnEndingBattle(self,i)
i.setItem(i.itemInitial)
i.itemInitial=i.itemRecycle=0
i.belch=false
end