mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 21:24:59 +00:00
Added method $Trainer.party_full?
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user