Updated Message (#143)

This commit is contained in:
Nathan-mv
2021-12-14 20:24:45 -03:00
committed by GitHub
parent 15b86429a2
commit 8a77c2d9e1
2 changed files with 9 additions and 44 deletions

View File

@@ -11,32 +11,15 @@ module Battle::CatchAndStoreMixin
end end
end end
# Store the Pokémon # Store the Pokémon
currentBox = @peer.pbCurrentBox stored_box = @peer.pbStorePokemon(pbPlayer, pkmn)
storedBox = @peer.pbStorePokemon(pbPlayer,pkmn) if stored_box.negative?
if storedBox<0 pbDisplayPaused(_INTL("{1} has been added to your party.", pkmn.name))
pbDisplayPaused(_INTL("{1} has been added to your party.",pkmn.name)) @initialItems[0][pbPlayer.party.length - 1] = pkmn.item_id if @initialItems
@initialItems[0][pbPlayer.party.length-1] = pkmn.item_id if @initialItems
return return
end end
# Messages saying the Pokémon was stored in a PC box # Messages saying the Pokémon was stored in a PC box
creator = @peer.pbGetStorageCreatorName box_name = @peer.pbBoxName(stored_box)
curBoxName = @peer.pbBoxName(currentBox) pbDisplayPaused(_INTL("{1} has been sent to Box \"{2}\"!", pkmn.name, box_name))
boxName = @peer.pbBoxName(storedBox)
if storedBox!=currentBox
if creator
pbDisplayPaused(_INTL("Box \"{1}\" on {2}'s PC was full.",curBoxName,creator))
else
pbDisplayPaused(_INTL("Box \"{1}\" on someone's PC was full.",curBoxName))
end
pbDisplayPaused(_INTL("{1} was transferred to box \"{2}\".",pkmn.name,boxName))
else
if creator
pbDisplayPaused(_INTL("{1} was transferred to {2}'s PC.",pkmn.name,creator))
else
pbDisplayPaused(_INTL("{1} was transferred to someone's PC.",pkmn.name))
end
pbDisplayPaused(_INTL("It was stored in box \"{1}\".",boxName))
end
end end
# Register all caught Pokémon in the Pokédex, and store them. # Register all caught Pokémon in the Pokédex, and store them.

View File

@@ -21,27 +21,9 @@ def pbStorePokemon(pkmn)
end end
pkmn.record_first_moves pkmn.record_first_moves
if $player.party_full? if $player.party_full?
oldcurbox = $PokemonStorage.currentBox stored_box = $PokemonStorage.pbStoreCaught(pkmn)
storedbox = $PokemonStorage.pbStoreCaught(pkmn) box_name = $PokemonStorage[stored_box].name
curboxname = $PokemonStorage[oldcurbox].name pbMessage(_INTL("{1} has been sent to Box \"{2}\"!", pkmn.name, box_name))
boxname = $PokemonStorage[storedbox].name
creator = nil
creator = pbGetStorageCreator if $player.seen_storage_creator
if storedbox != oldcurbox
if creator
pbMessage(_INTL("Box \"{1}\" on {2}'s PC was full.\1", curboxname, creator))
else
pbMessage(_INTL("Box \"{1}\" on someone's PC was full.\1", curboxname))
end
pbMessage(_INTL("{1} was transferred to box \"{2}.\"", pkmn.name, boxname))
else
if creator
pbMessage(_INTL("{1} was transferred to {2}'s PC.\1", pkmn.name, creator))
else
pbMessage(_INTL("{1} was transferred to someone's PC.\1", pkmn.name))
end
pbMessage(_INTL("It was stored in box \"{1}.\"", boxname))
end
else else
$player.party[$player.party.length] = pkmn $player.party[$player.party.length] = pkmn
end end