Created setting MAX_PARTY_SIZE, fixed some bugs

This commit is contained in:
Maruno17
2021-01-11 22:44:01 +00:00
parent 53c3f23146
commit f72ce06654
17 changed files with 176 additions and 153 deletions

View File

@@ -5,7 +5,7 @@ module PokeBattle_SceneConstants
MESSAGE_SHADOW_COLOR = Color.new(160, 160, 168)
# The number of party balls to show in each side's lineup.
NUM_BALLS = 6
NUM_BALLS = MAX_PARTY_SIZE
# Centre bottom of the player's side base graphic
PLAYER_BASE_X = 128

View File

@@ -7,7 +7,7 @@ class PokeBattle_NullBattlePeer
def pbOnLeavingBattle(battle,pkmn,usedInBattle,endBattle=false); end
def pbStorePokemon(player,pkmn)
player.party[player.party.length] = pkmn if player.party.length<6
player.party[player.party.length] = pkmn if player.party.length < MAX_PARTY_SIZE
return -1
end
@@ -23,7 +23,7 @@ end
#===============================================================================
class PokeBattle_RealBattlePeer
def pbStorePokemon(player,pkmn)
if player.party.length<6
if player.party.length < MAX_PARTY_SIZE
player.party[player.party.length] = pkmn
return -1
end