Added method $Trainer.party_full?

This commit is contained in:
Maruno17
2021-01-11 23:41:35 +00:00
parent f72ce06654
commit 2ab552ad3c
11 changed files with 40 additions and 28 deletions

View File

@@ -985,7 +985,7 @@ ItemHandlers::UseOnPokemon.add(:DNASPLICERS,proc { |item,pkmn,scene|
next true
end
# Unfusing
if $Trainer.party.length >= MAX_PARTY_SIZE
if $Trainer.party_full?
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 >= MAX_PARTY_SIZE
if $Trainer.party_full?
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 >= MAX_PARTY_SIZE
if $Trainer.party_full?
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 >= MAX_PARTY_SIZE && $PokemonStorage.full?
if battle.pbPlayer.party_full? && $PokemonStorage.full?
scene.pbDisplay(_INTL("There is no room left in the PC!")) if showMessages
next false
end