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
# Store the Pokémon
currentBox = @peer.pbCurrentBox
storedBox = @peer.pbStorePokemon(pbPlayer,pkmn)
if storedBox<0
pbDisplayPaused(_INTL("{1} has been added to your party.",pkmn.name))
@initialItems[0][pbPlayer.party.length-1] = pkmn.item_id if @initialItems
stored_box = @peer.pbStorePokemon(pbPlayer, pkmn)
if stored_box.negative?
pbDisplayPaused(_INTL("{1} has been added to your party.", pkmn.name))
@initialItems[0][pbPlayer.party.length - 1] = pkmn.item_id if @initialItems
return
end
# Messages saying the Pokémon was stored in a PC box
creator = @peer.pbGetStorageCreatorName
curBoxName = @peer.pbBoxName(currentBox)
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
box_name = @peer.pbBoxName(stored_box)
pbDisplayPaused(_INTL("{1} has been sent to Box \"{2}\"!", pkmn.name, box_name))
end
# Register all caught Pokémon in the Pokédex, and store them.

View File

@@ -21,27 +21,9 @@ def pbStorePokemon(pkmn)
end
pkmn.record_first_moves
if $player.party_full?
oldcurbox = $PokemonStorage.currentBox
storedbox = $PokemonStorage.pbStoreCaught(pkmn)
curboxname = $PokemonStorage[oldcurbox].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
stored_box = $PokemonStorage.pbStoreCaught(pkmn)
box_name = $PokemonStorage[stored_box].name
pbMessage(_INTL("{1} has been sent to Box \"{2}\"!", pkmn.name, box_name))
else
$player.party[$player.party.length] = pkmn
end