mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
DNA splicers
This commit is contained in:
@@ -936,58 +936,6 @@ ItemHandlers::UseOnPokemon.add(:PRISONBOTTLE,proc { |item,pkmn,scene|
|
||||
next true
|
||||
})
|
||||
|
||||
ItemHandlers::UseOnPokemon.add(:DNASPLICERS,proc { |item,pkmn,scene|
|
||||
if !pkmn.isSpecies?(:KYUREM)
|
||||
scene.pbDisplay(_INTL("It had no effect."))
|
||||
next false
|
||||
end
|
||||
if pkmn.fainted?
|
||||
scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon."))
|
||||
next false
|
||||
end
|
||||
# Fusing
|
||||
if pkmn.fused.nil?
|
||||
chosen = scene.pbChoosePokemon(_INTL("Fuse with which Pokémon?"))
|
||||
next false if chosen<0
|
||||
poke2 = $Trainer.party[chosen]
|
||||
if pkmn==poke2
|
||||
scene.pbDisplay(_INTL("It cannot be fused with itself."))
|
||||
next false
|
||||
elsif poke2.egg?
|
||||
scene.pbDisplay(_INTL("It cannot be fused with an Egg."))
|
||||
next false
|
||||
elsif poke2.fainted?
|
||||
scene.pbDisplay(_INTL("It cannot be fused with that fainted Pokémon."))
|
||||
next false
|
||||
elsif !poke2.isSpecies?(:RESHIRAM) &&
|
||||
!poke2.isSpecies?(:ZEKROM)
|
||||
scene.pbDisplay(_INTL("It cannot be fused with that Pokémon."))
|
||||
next false
|
||||
end
|
||||
newForm = 0
|
||||
newForm = 1 if poke2.isSpecies?(:RESHIRAM)
|
||||
newForm = 2 if poke2.isSpecies?(:ZEKROM)
|
||||
pkmn.setForm(newForm) {
|
||||
pkmn.fused = poke2
|
||||
$Trainer.remove_pokemon_at_index(chosen)
|
||||
scene.pbHardRefresh
|
||||
scene.pbDisplay(_INTL("{1} changed Forme!",pkmn.name))
|
||||
}
|
||||
next true
|
||||
end
|
||||
# Unfusing
|
||||
if $Trainer.party_full?
|
||||
scene.pbDisplay(_INTL("You have no room to separate the Pokémon."))
|
||||
next false
|
||||
end
|
||||
pkmn.setForm(0) {
|
||||
$Trainer.party[$Trainer.party.length] = pkmn.fused
|
||||
pkmn.fused = nil
|
||||
scene.pbHardRefresh
|
||||
scene.pbDisplay(_INTL("{1} changed Forme!",pkmn.name))
|
||||
}
|
||||
next true
|
||||
})
|
||||
|
||||
ItemHandlers::UseOnPokemon.add(:NSOLARIZER,proc { |item,pkmn,scene|
|
||||
if !pkmn.isSpecies?(:NECROZMA) || pkmn.form == 2
|
||||
|
||||
Reference in New Issue
Block a user