ItemHandlers::UseOnPokemon.add(:DNASPLICERS,proc{|item,pokemon,scene|
if isConst?(pokemon.species,PBSpecies,:KYUREM) && pokemon.hp>=0
if pokemon.fused!=nil
if $Trainer.party.length>=6
scene.pbDisplay(_INTL("Your party is full! You can't unfuse {1}.",pokemon.name))
next false
else
$Trainer.party[$Trainer.party.length]=pokemon.fused
pokemon.fused=nil
pokemon.form=0
scene.pbHardRefresh
scene.pbDisplay(_INTL("{1} changed Forme!",pokemon.name))
next true
end
else
chosen=scene.pbChoosePokemon(_INTL("Fuse with which Pokémon?"))
if chosen>=0
poke2=$Trainer.party[chosen]
if (isConst?(poke2.species,PBSpecies,:RESHIRAM) ||
isConst?(poke2.species,PBSpecies,:ZEKROM)) && poke2.hp>=0
pokemon.form=1 if isConst?(poke2.species,PBSpecies,:RESHIRAM)
pokemon.form=2 if isConst?(poke2.species,PBSpecies,:ZEKROM)
pokemon.fused=poke2
pbRemovePokemonAt(chosen)
scene.pbHardRefresh
scene.pbDisplay(_INTL("{1} changed Forme!",pokemon.name))
next true
elsif pokemon==poke2
scene.pbDisplay(_INTL("{1} can't be fused with itself!",pokemon.name))
else
scene.pbDisplay(_INTL("{1} can't be fused with {2}.",poke2.name,pokemon.name))
end
else
next false
end
end
else
scene.pbDisplay(_INTL("It had no effect."))
next false
end
ItemHandlers::UseOnPokemon.add(:DNASPLICERS,proc{|item,pokemon,scene|
if isConst?(pokemon.species,PBSpecies,:KYUREM) && pokemon.hp>=0
if pokemon.fused!=nil
if $Trainer.party.length>=6
scene.pbDisplay(_INTL("Your party is full! You can't unfuse {1}.",pokemon.name))
next false
else
$Trainer.party[$Trainer.party.length]=pokemon.fused
pokemon.fused=nil
pokemon.form=0
scene.pbHardRefresh
scene.pbDisplay(_INTL("{1} changed Forme!",pokemon.name))
next true
end
else
chosen=scene.pbChoosePokemon(_INTL("Fuse with which Pokémon?"))
if chosen>=0
poke2=$Trainer.party[chosen]
if (isConst?(poke2.species,PBSpecies,:RESHIRAM) ||
isConst?(poke2.species,PBSpecies,:ZEKROM)) && poke2.hp>=0
pokemon.form=1 if isConst?(poke2.species,PBSpecies,:RESHIRAM)
pokemon.form=2 if isConst?(poke2.species,PBSpecies,:ZEKROM)
pokemon.fused=poke2
pbRemovePokemonAt(chosen)
scene.pbHardRefresh
scene.pbDisplay(_INTL("{1} changed Forme!",pokemon.name))
next true
elsif pokemon==poke2
scene.pbDisplay(_INTL("{1} can't be fused with itself!",pokemon.name))
else
scene.pbDisplay(_INTL("{1} can't be fused with {2}.",poke2.name,pokemon.name))
end
else
next false
end
end
[COLOR="Red"]elsif isConst?(pokemon.species,PBSpecies,:PIKACHU) && pokemon.hp>=0 [COLOR="Blue"]#checks to see if this pokemon is Pikachu?[/COLOR]
if pokemon.fused!=nil [COLOR="Blue"]#checks to see if this pokemon has already been fused[/COLOR]
if $Trainer.party.length>=6 [COLOR="blue"]#if it has, this checks to see if you have 6 pokemon in your party[/COLOR]
scene.pbDisplay(_INTL("Your party is full! You can't unfuse {1}.",pokemon.name)) [COLOR="blue"]#you can't have more than 6, so you can't unfuse them[/COLOR]
next false
else [COLOR="blue"]#if you have less that 6 pokemon[/COLOR]
$Trainer.party[$Trainer.party.length]=pokemon.fused [COLOR="blue"]#finds the next open slot in your party and puts unfused pokemon there[/COLOR]
pokemon.fused=nil [COLOR="blue"]#sets this equal to indicate it is not fused[/COLOR]
pokemon.form=0 [COLOR="blue"]#sets form equal to 0[/COLOR]
scene.pbHardRefresh [COLOR="blue"]#refreshes the scene, to show the changes to your party immediately[/COLOR]
scene.pbDisplay(_INTL("{1} changed Forme!",pokemon.name))
next true
end
else [COLOR="blue"]#if the pokemon hasn't been fused[/COLOR]
chosen=scene.pbChoosePokemon(_INTL("Fuse with which Pokémon?")) [COLOR="blue"]#returns a chosen party index[/COLOR]
if chosen>=0 [COLOR="blue"]#the party index will be -1 if the player selects cancel, this checks that[/COLOR]
poke2=$Trainer.party[chosen] [COLOR="blue"]#the pokemon you chose to fuse it with[/COLOR]
if (isConst?(poke2.species,PBSpecies,:MANKEY) ||
isConst?(poke2.species,PBSpecies,:CHARIZARD)) && poke2.hp>=0 [COLOR="blue"]#is it one of these pokemon, and is it's hp greater than or equal to 0(Idk what exactly this intends to prevent, hopefully someone can explain that to me?)[/COLOR]
pokemon.form=1 if isConst?(poke2.species,PBSpecies,:MANKEY) [COLOR="blue"]#if the pokemon you chose is Mankey, it will set Pikachu's form equal to 1[/COLOR]
pokemon.form=2 if isConst?(poke2.species,PBSpecies,:CHARIZARD) [COLOR="blue"]#if the pokemon you chose is Charizard, it will set Pikachu's form equal to 2[/COLOR]
pokemon.fused=poke2 [COLOR="blue"]#sets the fused value equal to the pokemon you chose, so that it will return when/if you unfuse your Pikachu[/COLOR]
pbRemovePokemonAt(chosen) [COLOR="blue"]#removes the pokemon you chose[/COLOR]
scene.pbHardRefresh [COLOR="blue"]#refreshes the scene to show changes immediately[/COLOR]
scene.pbDisplay(_INTL("{1} changed Forme!",pokemon.name))
next true
elsif pokemon==poke2 [COLOR="blue"] #doesn't let you fuse your pikachu with itself[/COLOR]
scene.pbDisplay(_INTL("{1} can't be fused with itself!",pokemon.name))
else [COLOR="blue"]#if it wasn't either of the aforementioned pokemon (Mankey and Charizard), it will tell you it can't fuse the pokemon you selected[/COLOR]
scene.pbDisplay(_INTL("{1} can't be fused with {2}.",poke2.name,pokemon.name))
end
else
next false
end
end[/COLOR]
else
scene.pbDisplay(_INTL("It had no effect."))
next false
end
})
Thanks for the help! :D Also wondering, how do I determine the base stats once fused? and is there a way to make the fused pokemon learn a move exclusively?
MultipleForms.register(:KYUREM,{
"getBaseStats"=>proc{|pokemon|
case pokemon.form #Stats in order: Attack, Defense, Speed, Sp. Atk, Sp. Def
when 1; next [125,120, 90,95,170,100] # White Kyurem
when 2; next [125,170,100,95,120, 90] # Black Kyurem
else; next # Kyurem
end
},
"ability"=>proc{|pokemon| #Ability
case pokemon.form
when 1; next getID(PBAbilities,:TURBOBLAZE) # White Kyurem
when 2; next getID(PBAbilities,:TERAVOLT) # Black Kyurem
else; next # Kyurem
end
},
"evYield"=>proc{|pokemon| #EVs
case pokemon.form
when 1; next [0,0,0,0,3,0] # White Kyurem
when 2; next [0,3,0,0,0,0] # Black Kyurem
else; next # Kyurem
end
},
"getMoveList"=>proc{|pokemon|
next if pokemon.form==0
movelist=[]
case pokemon.form #moves
when 1; movelist=[[1,:ICYWIND],[1,:DRAGONRAGE],[8,:IMPRISON],
[15,:ANCIENTPOWER],[22,:ICEBEAM],[29,:DRAGONBREATH],
[36,:SLASH],[43,:FUSIONFLARE],[50,:ICEBURN],
[57,:DRAGONPULSE],[64,:IMPRISON],[71,:ENDEAVOR],
[78,:BLIZZARD],[85,:OUTRAGE],[92,:HYPERVOICE]]
when 2; movelist=[[1,:ICYWIND],[1,:DRAGONRAGE],[8,:IMPRISON],
[15,:ANCIENTPOWER],[22,:ICEBEAM],[29,:DRAGONBREATH],
[36,:SLASH],[43,:FUSIONBOLT],[50,:FREEZESHOCK],
[57,:DRAGONPULSE],[64,:IMPRISON],[71,:ENDEAVOR],
[78,:BLIZZARD],[85,:OUTRAGE],[92,:HYPERVOICE]]
end
for i in movelist
i[1]=getConst(PBMoves,i[1])
end
next movelist
},
"onSetForm"=>proc{|pokemon,form|
pbSeenForm(pokemon)
}
})