# TutorialParty Switcher for 17.2 (Based on Reborn's Code)

#### Michael

##### That One Guy
Member
Michael submitted a new resource:

Party Switcher for 17.2 (Based on Reborn's Code) - Efficiently swap out Pokemon if you have a full party

I've gone ahead and edited another resource to allow compatibility within 17.2. This script allows for a Pokemon to be chosen to swap out if your party is full.

First, replace the entirety of Pokebattle_BattlePeer with this script!

Next, search for this line in the script editor:
Ruby:
def pbStorePokemon(pokemon)
You should find the script in PSystem_PokemonUtilities. Replace the entire section with...

#### Jonas930

##### Is anyonre there?
Member
Isn't there a script which do same thing as this one there already?

#### Michael

##### That One Guy
Member
Isn't there a script which do same thing as this one there already?
The script is broken - it deletes the pokemon if the response in the menu is deselected.

#### Jonas930

##### Is anyonre there?
Member
The script is broken - it deletes the pokemon if the response in the menu is deselected.

#### Mashirosakura

##### There is only one of many.
Member
nope, can attest to the fact it deletes still.

Member

#### Michael

##### That One Guy
Member
Which one are you talking about? I'm talking this one.
Yes. That one is broken. It deletes pokemon. Maybe test your code more fully next time.

#### Jonas930

##### Is anyonre there?
Member
Yes. That one is broken. It deletes pokemon. Maybe test your code more fully next time.
Werid. I just tested it but everything works right.

Member

#### Richard PT

##### Novice
Member
The script works fine, but i detected a bug. If i go to a water current directly to a small island, which in the first pic is to the left, and then used surf against the water current, the player can surf where it shouldn't surf, for ex: a small island. Under the water currents tiles, which is layer 2, is the surf tiles, which is layer 1. The grey area is to be normal walking, like emerald tiles. See the pics:

#### Michael

##### That One Guy
Member
The script works fine, but i detected a bug. If i go to a water current directly to a small island, which in the first pic is to the left, and then used surf against the water current, the player can surf where it shouldn't surf, for ex: a small island. Under the water currents tiles, which is layer 2, is the surf tiles, which is layer 1. The grey area is to be normal walking, like emerald tiles. See the pics:
Uhh, this is the wrong script - although from what I've seen, I'm pretty sure that's an essentials bug with water in general - I'll look into it when I have the time.

#### Richard PT

##### Novice
Member
Uhh, this is the wrong script - although from what I've seen, I'm pretty sure that's an essentials bug with water in general - I'll look into it when I have the time.

I don't know that, sorry. XD

#### WolfPP

##### Discord Wolf#1235
Member
Lol yep, wrong thread. Anyway,you need to edit the terrain nor create a new one. Check inside 'PBTerrain':

Code:
  def PBTerrain.isSurfable?(tag)
return PBTerrain.isWater?(tag)
end

def PBTerrain.isWater?(tag)
return tag==PBTerrain::Water ||
tag==PBTerrain::StillWater ||
tag==PBTerrain::DeepWater ||
tag==PBTerrain::WaterfallCrest ||
tag==PBTerrain::Waterfall
end

def PBTerrain.isPassableWater?(tag)
return tag==PBTerrain::Water ||
tag==PBTerrain::StillWater ||
tag==PBTerrain::DeepWater ||
tag==PBTerrain::WaterfallCrest
end

def PBTerrain.isJustWater?(tag)
return tag==PBTerrain::Water ||
tag==PBTerrain::StillWater ||
tag==PBTerrain::DeepWater
end

def PBTerrain.isDeepWater?(tag)
return tag==PBTerrain::DeepWater
end

def PBTerrain.isWaterfall?(tag)
return tag==PBTerrain::WaterfallCrest ||
tag==PBTerrain::Waterfall
end