- 224
- Posts
- 9
- Years
- Seen Feb 20, 2025
I am trying to define several movesets for species based on a criteria of differentiation (for example, between a shiny and a non-shiny).
Is there a way to make something like this work:
When I give the player 2 Sandshrews, one of them being shiny and not the other:
... BOTH Sandshrews always acquire the same moveset!
I've tried small variations such as this one:
I always got the same results. Either the 2 Sandshrews, the shiny and the non-shiny one, learn this moveset, or they don't.
This part of code is used in various Delta/Alolan custom scripts and seem to never work properly.
Does someone know a way to make this work (other than updating to v17?)
Is there a way to make something like this work:
Code:
MultipleForms.register(:SANDSHREW,{"getMoveList"=>proc{|pokemon|
movelist=[[1,:DRAGONHAMMER],[1,:SEEDBOMB],[1,:BARRAGE],[1,:HYPNOSIS],
[1,:CONFUSION],[17,:PSYSHOCK],[27,:EGGBOMB],[37,:WOODHAMMER],
[47,:LEAFSTORM]]
for i in movelist
i[1]=getConst(PBMoves,i[1])
end
next movelist [COLOR="Red"]if pokemon.isShiny?[/COLOR]
}
When I give the player 2 Sandshrews, one of them being shiny and not the other:
Code:
$Trainer.party=[]
pkmn=PokeBattle_Pokemon.new(:SANDSHREW,46)
pkmn.makeShiny
$Trainer.party.push(pkmn)
pkmn2=PokeBattle_Pokemon.new(:SANDSHREW,46)
$Trainer.party.push(pkmn2)
... BOTH Sandshrews always acquire the same moveset!
I've tried small variations such as this one:
Code:
"getMoveList"=>proc{|pokemon|
[COLOR="Red"]next if !pokemon.isShiny?[/COLOR]
movelist=[[1,:DRAGONHAMMER],[1,:SEEDBOMB],[1,:BARRAGE],[1,:HYPNOSIS],
[1,:CONFUSION],[17,:PSYSHOCK],[27,:EGGBOMB],[37,:WOODHAMMER],
[47,:LEAFSTORM]]
for i in movelist
i[1]=getConst(PBMoves,i[1])
end
next movelist
movelist=[]
},
I always got the same results. Either the 2 Sandshrews, the shiny and the non-shiny one, learn this moveset, or they don't.
This part of code is used in various Delta/Alolan custom scripts and seem to never work properly.
Does someone know a way to make this work (other than updating to v17?)