diff --git a/Data/Scripts/012_Battle/006_Other battle types/002_PokeBattle_SafariZone.rb b/Data/Scripts/012_Battle/006_Other battle types/002_PokeBattle_SafariZone.rb index 6ab9c6cf9..fecf29ea7 100644 --- a/Data/Scripts/012_Battle/006_Other battle types/002_PokeBattle_SafariZone.rb +++ b/Data/Scripts/012_Battle/006_Other battle types/002_PokeBattle_SafariZone.rb @@ -25,8 +25,8 @@ class PokeBattle_FakeBattler def shiny?; return @pokemon.shiny?; end alias isShiny? shiny? - def isSpecies?(checK_species) - return @pokemon && @pokemon.isSpecies?(checK_species) + def isSpecies?(check_species) + return @pokemon && @pokemon.isSpecies?(check_species) end def fainted?; return false; end diff --git a/Data/Scripts/013_Overworld/006_PField_Battles.rb b/Data/Scripts/013_Overworld/006_PField_Battles.rb index c8204bba6..424da21ac 100644 --- a/Data/Scripts/013_Overworld/006_PField_Battles.rb +++ b/Data/Scripts/013_Overworld/006_PField_Battles.rb @@ -251,7 +251,12 @@ def pbWildBattleCore(*args) playerTrainers = [$Trainer] playerParty = $Trainer.party playerPartyStarts = [0] - if $PokemonGlobal.partner && !$PokemonTemp.battleRules["noPartner"] && foeParty.length>1 + room_for_partner = (foeParty.length > 1) + if !room_for_partner && $PokemonTemp.battleRules["size"] && + !["single", "1v1", "1v2", "1v3"].include?($PokemonTemp.battleRules["size"]) + room_for_partner = true + end + if $PokemonGlobal.partner && !$PokemonTemp.battleRules["noPartner"] && room_for_partner ally = PokeBattle_Trainer.new($PokemonGlobal.partner[1],$PokemonGlobal.partner[0]) ally.id = $PokemonGlobal.partner[2] ally.party = $PokemonGlobal.partner[3] @@ -391,7 +396,12 @@ def pbTrainerBattleCore(*args) playerTrainers = [$Trainer] playerParty = $Trainer.party playerPartyStarts = [0] - if $PokemonGlobal.partner && !$PokemonTemp.battleRules["noPartner"] && foeParty.length>1 + room_for_partner = (foeParty.length > 1) + if !room_for_partner && $PokemonTemp.battleRules["size"] && + !["single", "1v1", "1v2", "1v3"].include?($PokemonTemp.battleRules["size"]) + room_for_partner = true + end + if $PokemonGlobal.partner && !$PokemonTemp.battleRules["noPartner"] && room_for_partner ally = PokeBattle_Trainer.new($PokemonGlobal.partner[1],$PokemonGlobal.partner[0]) ally.id = $PokemonGlobal.partner[2] ally.party = $PokemonGlobal.partner[3]