• The forums will be undergoing maintenance for a few hours starting Saturday 10AM UTC!
  • The Judge Spotlights of Game Jam #6 are out! Now it's time for you to cast 3 votes for your favorite games for Community Spotlight!
    Be sure to vote at https://reliccastle.com/game-jam-6/results/!

Help Form Specific Mega Stones

Morningdew

Novice
Member
Joined
Jul 8, 2017
Posts
26
Likes
1
#1
Okay, say I have 4 forms of Ninetales defined.
038 - Ninetales
038_1 - Mega Ninetales
038_2 - Alolan Ninetales
038_3 - Mega Alolan Ninetales
So I have the regular and its mega defined, with the Alolan form and its mega defined. Now, in terms of Mega Stones, 2 separate are defined.
"NinetalesStone" and "AlolaNinetalesStone".
Now my question is, how would I go about making each 'base form' (038 and 038_2) only allowed to use their specific Stone?
For example, 038 (Ninetales) can still hold an "AlolanNinetalesStone" and change into form 038_3.
 

ArchyArc

Lead Developer of Pokemon Sacred Johto
Member
Joined
May 10, 2017
Posts
37
Likes
12
#2
So might be late but might help you still/others.

So firstly you want different stones

So lets say Ninetalite and Alolanite for this example, do note; megas act weirdly with forms so depending on how there setup; they'll break. (can only have a getform or getmegaform check as they overwrite eachother in a way) minus that;
Code:
MultipleForms.register(:NINETALES,{
"getMegaForm"=>proc{|pokemon|
   next 2 if isConst?(pokemon.item,PBItems,:NINETALITE) && pokemon.form==0
   next 3 if isConst?(pokemon.item,PBItems,:ALOLANITE) && pokemon.form==1
   next
},
This is the main part and the rest is the usual, BST and ability etc. but you'll need to check for when it unmegas so;
Code:
"getUnmegaForm"=>proc{|pokemon|
   next 0 if pokemon.form==2
   next 1 if pokemon.form==3
   next
},
This is basically checking "is it Normal or alolan ninetales" in its mega form and changes it into the right form; otherwise when unmega'd it'll become regular ninetales.

I do realise that form stuff changed in v17 but not to what extent but this is how it works for v16, if it doesn't i can help if i see what the form stuff is like for v17 (believe it became a .txt but might be wrong)
 
Top