From e290d1dd451bfcc03ad58bcc8befc26aaeebb23e Mon Sep 17 00:00:00 2001 From: Maruno17 Date: Wed, 28 Oct 2020 18:33:13 +0000 Subject: [PATCH] =?UTF-8?q?Fixed=20Pok=C3=A9mon-fusing=20items=20causing?= =?UTF-8?q?=20a=20fusion=20despite=20saying=20they=20=0Dcan't?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../015_Items/002_PItem_ItemEffects.rb | 19 +++++++++++++++++-- Data/Scripts/021_Debug/001_Debug_Menu.rb | 2 +- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/Data/Scripts/015_Items/002_PItem_ItemEffects.rb b/Data/Scripts/015_Items/002_PItem_ItemEffects.rb index 214071145..8ac98f5cb 100644 --- a/Data/Scripts/015_Items/002_PItem_ItemEffects.rb +++ b/Data/Scripts/015_Items/002_PItem_ItemEffects.rb @@ -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 diff --git a/Data/Scripts/021_Debug/001_Debug_Menu.rb b/Data/Scripts/021_Debug/001_Debug_Menu.rb index e0b683471..0010519cf 100644 --- a/Data/Scripts/021_Debug/001_Debug_Menu.rb +++ b/Data/Scripts/021_Debug/001_Debug_Menu.rb @@ -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 = []