mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Fixed Pokémon-fusing items causing a fusion despite saying they
This commit is contained in:
@@ -955,6 +955,7 @@ ItemHandlers::UseOnPokemon.add(:DNASPLICERS,proc { |item,pkmn,scene|
|
||||
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
|
||||
@@ -963,13 +964,17 @@ ItemHandlers::UseOnPokemon.add(:DNASPLICERS,proc { |item,pkmn,scene|
|
||||
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)
|
||||
@@ -997,12 +1002,13 @@ ItemHandlers::UseOnPokemon.add(:DNASPLICERS,proc { |item,pkmn,scene|
|
||||
})
|
||||
|
||||
ItemHandlers::UseOnPokemon.add(:NSOLARIZER,proc { |item,pkmn,scene|
|
||||
if !pkmn.isSpecies?(:NECROZMA) || pkmn.form==0
|
||||
if !pkmn.isSpecies?(:NECROZMA) || pkmn.form == 2
|
||||
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
|
||||
@@ -1011,12 +1017,16 @@ ItemHandlers::UseOnPokemon.add(:NSOLARIZER,proc { |item,pkmn,scene|
|
||||
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?(:SOLGALEO)
|
||||
scene.pbDisplay(_INTL("It cannot be fused with that Pokémon."))
|
||||
next false
|
||||
end
|
||||
pkmn.setForm(1) {
|
||||
pkmn.fused = poke2
|
||||
@@ -1041,12 +1051,13 @@ ItemHandlers::UseOnPokemon.add(:NSOLARIZER,proc { |item,pkmn,scene|
|
||||
})
|
||||
|
||||
ItemHandlers::UseOnPokemon.add(:NLUNARIZER,proc { |item,pkmn,scene|
|
||||
if !pkmn.isSpecies?(:NECROZMA) || pkmn.form==1
|
||||
if !pkmn.isSpecies?(:NECROZMA) || pkmn.form == 1
|
||||
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
|
||||
@@ -1055,12 +1066,16 @@ ItemHandlers::UseOnPokemon.add(:NLUNARIZER,proc { |item,pkmn,scene|
|
||||
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?(:LUNALA)
|
||||
scene.pbDisplay(_INTL("It cannot be fused with that Pokémon."))
|
||||
next false
|
||||
end
|
||||
pkmn.setForm(2) {
|
||||
pkmn.fused = poke2
|
||||
|
||||
@@ -368,7 +368,7 @@ def pbDebugMenuActions(cmd="",sprites=nil,viewport=nil)
|
||||
battle = pbListScreen(_INTL("SINGLE TRAINER"),TrainerBattleLister.new(0,false))
|
||||
if battle
|
||||
trainerdata = battle[1]
|
||||
pbTrainerBattle(trainerdata[0],trainerdata[1],"...",false,trainerdata[4],true)
|
||||
pbTrainerBattle(trainerdata[0],trainerdata[1],nil,false,trainerdata[4],true)
|
||||
end
|
||||
when "testtrainerbattleadvanced"
|
||||
trainers = []
|
||||
|
||||
Reference in New Issue
Block a user