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

@@ -985,7 +985,7 @@ ItemHandlers::UseOnPokemon.add(:DNASPLICERS,proc { |item,pkmn,scene|
next true
end
# Unfusing
if $Trainer.party.length>=6
if $Trainer.party.length >= MAX_PARTY_SIZE
scene.pbDisplay(_INTL("You have no room to separate the Pokémon."))
next false
end
@@ -1034,7 +1034,7 @@ ItemHandlers::UseOnPokemon.add(:NSOLARIZER,proc { |item,pkmn,scene|
next true
end
# Unfusing
if $Trainer.party.length>=6
if $Trainer.party.length >= MAX_PARTY_SIZE
scene.pbDisplay(_INTL("You have no room to separate the Pokémon."))
next false
end
@@ -1083,7 +1083,7 @@ ItemHandlers::UseOnPokemon.add(:NLUNARIZER,proc { |item,pkmn,scene|
next true
end
# Unfusing
if $Trainer.party.length>=6
if $Trainer.party.length >= MAX_PARTY_SIZE
scene.pbDisplay(_INTL("You have no room to separate the Pokémon."))
next false
end

View File

@@ -23,7 +23,7 @@ ItemHandlers::CanUseInBattle.copy(:POKEDOLL,:FLUFFYTAIL,:POKETOY)
ItemHandlers::CanUseInBattle.addIf(proc { |item| GameData::Item.get(item).is_poke_ball? }, # Poké Balls
proc { |item,pokemon,battler,move,firstAction,battle,scene,showMessages|
if battle.pbPlayer.party.length>=6 && $PokemonStorage.full?
if battle.pbPlayer.party.length >= MAX_PARTY_SIZE && $PokemonStorage.full?
scene.pbDisplay(_INTL("There is no room left in the PC!")) if showMessages
next false
end