Minor new additions for v20 (#147)

* Moved TMs/ TRs and HMs into their own handlers
* Improved Plugin Error Message
* Added sound effect when picking berries
* Allow player to always see quantity when buying items
* Trainers now require a Mega Ring item in their items (in trainers.txt) to Mega Evolve
This commit is contained in:
Golisopod-User
2021-12-30 00:06:26 +05:30
committed by GitHub
parent fb29f19a28
commit 13cc9790ce
11 changed files with 81 additions and 46 deletions

View File

@@ -406,6 +406,7 @@ def pbTrainerBattleCore(*args)
end
# Calculate who the player trainer(s) and their party are
playerTrainers = [$player]
allyItems = []
playerParty = $player.party
playerPartyStarts = [0]
room_for_partner = (foeParty.length > 1)
@@ -417,6 +418,7 @@ def pbTrainerBattleCore(*args)
ally = NPCTrainer.new($PokemonGlobal.partner[1], $PokemonGlobal.partner[0])
ally.id = $PokemonGlobal.partner[2]
ally.party = $PokemonGlobal.partner[3]
allyItems[1] = ally.items.clone
playerTrainers.push(ally)
playerParty = []
$player.party.each { |pkmn| playerParty.push(pkmn) }
@@ -431,6 +433,7 @@ def pbTrainerBattleCore(*args)
battle.party1starts = playerPartyStarts
battle.party2starts = foePartyStarts
battle.items = foeItems
battle.ally_items = allyItems
battle.endSpeeches = foeEndSpeeches
# Set various other properties in the battle class
pbPrepareBattle(battle)

View File

@@ -445,9 +445,9 @@ def pbPickBerry(berry, qty = 1)
end
$bag.add(berry, qty)
if qty > 1
pbMessage(_INTL("You picked the {1} \\c[1]{2}\\c[0].\\wtnp[30]", qty, berry_name))
pbMessage(_INTL("\\me[Berry get]You picked the {1} \\c[1]{2}\\c[0].\\wtnp[30]", qty, berry_name))
else
pbMessage(_INTL("You picked the \\c[1]{1}\\c[0].\\wtnp[30]", berry_name))
pbMessage(_INTL("\\me[Berry get]You picked the \\c[1]{1}\\c[0].\\wtnp[30]", berry_name))
end
pocket = berry.pocket
pbMessage(_INTL("{1} put the \\c[1]{2}\\c[0] in the <icon=bagPocket{3}>\\c[1]{4}\\c[0] Pocket.\1",