Merge branch 'dev' into ai

This commit is contained in:
Maruno17
2023-04-20 18:05:58 +01:00
35 changed files with 173 additions and 160 deletions

View File

@@ -338,11 +338,11 @@ module Translator
end end
msg_window.textspeed = MessageConfig.pbSettingToTextSpeed($PokemonSystem.textspeed) msg_window.textspeed = MessageConfig.pbSettingToTextSpeed($PokemonSystem.textspeed)
if core_text if core_text
pbMessageDisplay(msg_window, _INTL("All core text was extracted to files in the folder \"{1}\".\1", dir_name)) pbMessageDisplay(msg_window, _INTL("All core text was extracted to files in the folder \"{1}\".", dir_name) + "\1")
else else
pbMessageDisplay(msg_window, _INTL("All game text was extracted to files in the folder \"{1}\".\1", dir_name)) pbMessageDisplay(msg_window, _INTL("All game text was extracted to files in the folder \"{1}\".", dir_name) + "\1")
end end
pbMessageDisplay(msg_window, _INTL("To localize this text, translate every second line in those files.\1")) pbMessageDisplay(msg_window, _INTL("To localize this text, translate every second line in those files.") + "\1")
pbMessageDisplay(msg_window, _INTL("After translating, choose \"Compile Translated Text\" in the Debug menu.")) pbMessageDisplay(msg_window, _INTL("After translating, choose \"Compile Translated Text\" in the Debug menu."))
pbDisposeMessageWindow(msg_window) pbDisposeMessageWindow(msg_window)
end end

View File

@@ -18,6 +18,7 @@ module GameData
attr_reader :bridge attr_reader :bridge
attr_reader :shows_reflections attr_reader :shows_reflections
attr_reader :must_walk attr_reader :must_walk
attr_reader :must_walk_or_run
attr_reader :ignore_passability attr_reader :ignore_passability
DATA = {} DATA = {}

View File

@@ -173,8 +173,7 @@ class Battle
newLevel = growth_rate.level_from_exp(expFinal) newLevel = growth_rate.level_from_exp(expFinal)
if newLevel < curLevel if newLevel < curLevel
debugInfo = "Levels: #{curLevel}->#{newLevel} | Exp: #{pkmn.exp}->#{expFinal} | gain: #{expGained}" debugInfo = "Levels: #{curLevel}->#{newLevel} | Exp: #{pkmn.exp}->#{expFinal} | gain: #{expGained}"
raise _INTL("{1}'s new level is less than its\r\ncurrent level, which shouldn't happen.\r\n[Debug: {2}]", raise _INTL("{1}'s new level is less than its current level, which shouldn't happen.", pkmn.name) + "\r\n[#{debugInfo}]"
pkmn.name, debugInfo)
end end
# Give Exp # Give Exp
if pkmn.shadowPokemon? if pkmn.shadowPokemon?

View File

@@ -553,7 +553,7 @@ class Battle::Battler
end end
def takesShadowSkyDamage? def takesShadowSkyDamage?
return false if fainted? return false if !takesIndirectDamage?
return false if shadowPokemon? return false if shadowPokemon?
return true return true
end end

View File

@@ -13,7 +13,7 @@ class Battle::Battler
@fainted = true @fainted = true
# Check for end of Neutralizing Gas/Unnerve # Check for end of Neutralizing Gas/Unnerve
pbAbilitiesOnNeutralizingGasEnding if hasActiveAbility?(:NEUTRALIZINGGAS, true) pbAbilitiesOnNeutralizingGasEnding if hasActiveAbility?(:NEUTRALIZINGGAS, true)
pbItemsOnUnnerveEnding if hasActiveAbility?(:UNNERVE, true) pbItemsOnUnnerveEnding if hasActiveAbility?([:UNNERVE, :ASONECHILLINGNEIGH, :ASONEGRIMNEIGH], true)
# Check for end of primordial weather # Check for end of primordial weather
@battle.pbEndPrimordialWeather @battle.pbEndPrimordialWeather
end end
@@ -29,7 +29,7 @@ class Battle::Battler
Battle::AbilityEffects.triggerOnBattlerFainting(b.ability, b, self, @battle) Battle::AbilityEffects.triggerOnBattlerFainting(b.ability, b, self, @battle)
end end
pbAbilitiesOnNeutralizingGasEnding if hasActiveAbility?(:NEUTRALIZINGGAS, true) pbAbilitiesOnNeutralizingGasEnding if hasActiveAbility?(:NEUTRALIZINGGAS, true)
pbItemsOnUnnerveEnding if hasActiveAbility?(:UNNERVE, true) pbItemsOnUnnerveEnding if hasActiveAbility?([:UNNERVE, :ASONECHILLINGNEIGH, :ASONEGRIMNEIGH], true)
end end
# Used for Emergency Exit/Wimp Out. Returns whether self has switched out. # Used for Emergency Exit/Wimp Out. Returns whether self has switched out.
@@ -162,7 +162,8 @@ class Battle::Battler
def pbOnLosingAbility(oldAbil, suppressed = false) def pbOnLosingAbility(oldAbil, suppressed = false)
if oldAbil == :NEUTRALIZINGGAS && (suppressed || !@effects[PBEffects::GastroAcid]) if oldAbil == :NEUTRALIZINGGAS && (suppressed || !@effects[PBEffects::GastroAcid])
pbAbilitiesOnNeutralizingGasEnding pbAbilitiesOnNeutralizingGasEnding
elsif oldAbil == :UNNERVE && (suppressed || !@effects[PBEffects::GastroAcid]) elsif [:UNNERVE, :ASONECHILLINGNEIGH, :ASONEGRIMNEIGH].include?(oldAbil) &&
(suppressed || !@effects[PBEffects::GastroAcid])
pbItemsOnUnnerveEnding pbItemsOnUnnerveEnding
elsif oldAbil == :ILLUSION && @effects[PBEffects::Illusion] elsif oldAbil == :ILLUSION && @effects[PBEffects::Illusion]
@effects[PBEffects::Illusion] = nil @effects[PBEffects::Illusion] = nil
@@ -200,7 +201,7 @@ class Battle::Battler
# Held item consuming/removing # Held item consuming/removing
#============================================================================= #=============================================================================
def canConsumeBerry? def canConsumeBerry?
return false if @battle.pbCheckOpposingAbility(:UNNERVE, @index) return false if @battle.pbCheckOpposingAbility([:UNNERVE, :ASONECHILLINGNEIGH, :ASONEGRIMNEIGH], @index)
return true return true
end end

View File

@@ -383,7 +383,7 @@ class Battle::Battler
end end
target.damageState.protected = true target.damageState.protected = true
@battle.successStates[user.index].protected = true @battle.successStates[user.index].protected = true
if move.pbContactMove?(user) && user.affectedByContactEffect? if move.pbContactMove?(user) && user.affectedByContactEffect? && user.takesIndirectDamage?
@battle.scene.pbDamageAnimation(user) @battle.scene.pbDamageAnimation(user)
user.pbReduceHP(user.totalhp / 8, false) user.pbReduceHP(user.totalhp / 8, false)
@battle.pbDisplay(_INTL("{1} was hurt!", user.pbThis)) @battle.pbDisplay(_INTL("{1} was hurt!", user.pbThis))

View File

@@ -26,7 +26,7 @@ class Battle::Battler
when 1 # Gulping Form when 1 # Gulping Form
user.pbLowerStatStageByAbility(:DEFENSE, 1, target, false) user.pbLowerStatStageByAbility(:DEFENSE, 1, target, false)
when 2 # Gorging Form when 2 # Gorging Form
target.pbParalyze(user) if target.pbCanParalyze?(user, false) user.pbParalyze(target) if user.pbCanParalyze?(target, false)
end end
@battle.pbHideAbilitySplash(target) @battle.pbHideAbilitySplash(target)
user.pbItemHPHealCheck if user.hp < oldHP user.pbItemHPHealCheck if user.hp < oldHP

View File

@@ -234,7 +234,7 @@ class Battle::Scene
pbWaitMessage pbWaitMessage
pbShowWindow(MESSAGE_BOX) pbShowWindow(MESSAGE_BOX)
cw = @sprites["messageWindow"] cw = @sprites["messageWindow"]
cw.text = _INTL("{1}\1", msg) cw.text = msg + "\1"
PBDebug.log_message(msg) PBDebug.log_message(msg)
yielded = false yielded = false
timer = 0.0 timer = 0.0

View File

@@ -2251,12 +2251,14 @@ Battle::AbilityEffects::EndOfRoundWeather.add(:DRYSKIN,
proc { |ability, weather, battler, battle| proc { |ability, weather, battler, battle|
case weather case weather
when :Sun, :HarshSun when :Sun, :HarshSun
battle.pbShowAbilitySplash(battler) if battler.takesIndirectDamage?
battle.scene.pbDamageAnimation(battler) battle.pbShowAbilitySplash(battler)
battler.pbReduceHP(battler.totalhp / 8, false) battle.scene.pbDamageAnimation(battler)
battle.pbDisplay(_INTL("{1} was hurt by the sunlight!", battler.pbThis)) battler.pbReduceHP(battler.totalhp / 8, false)
battle.pbHideAbilitySplash(battler) battle.pbDisplay(_INTL("{1} was hurt by the sunlight!", battler.pbThis))
battler.pbItemHPHealCheck battle.pbHideAbilitySplash(battler)
battler.pbItemHPHealCheck
end
when :Rain, :HeavyRain when :Rain, :HeavyRain
next if !battler.canHeal? next if !battler.canHeal?
battle.pbShowAbilitySplash(battler) battle.pbShowAbilitySplash(battler)
@@ -2301,7 +2303,7 @@ Battle::AbilityEffects::EndOfRoundWeather.add(:ICEFACE,
Battle::AbilityEffects::EndOfRoundWeather.add(:RAINDISH, Battle::AbilityEffects::EndOfRoundWeather.add(:RAINDISH,
proc { |ability, weather, battler, battle| proc { |ability, weather, battler, battle|
next unless [:Rain, :HeavyRain].include?(weather) next if ![:Rain, :HeavyRain].include?(weather)
next if !battler.canHeal? next if !battler.canHeal?
battle.pbShowAbilitySplash(battler) battle.pbShowAbilitySplash(battler)
battler.pbRecoverHP(battler.totalhp / 16) battler.pbRecoverHP(battler.totalhp / 16)
@@ -2316,7 +2318,8 @@ Battle::AbilityEffects::EndOfRoundWeather.add(:RAINDISH,
Battle::AbilityEffects::EndOfRoundWeather.add(:SOLARPOWER, Battle::AbilityEffects::EndOfRoundWeather.add(:SOLARPOWER,
proc { |ability, weather, battler, battle| proc { |ability, weather, battler, battle|
next unless [:Sun, :HarshSun].include?(weather) next if ![:Sun, :HarshSun].include?(weather)
next if !battler.takesIndirectDamage?
battle.pbShowAbilitySplash(battler) battle.pbShowAbilitySplash(battler)
battle.scene.pbDamageAnimation(battler) battle.scene.pbDamageAnimation(battler)
battler.pbReduceHP(battler.totalhp / 8, false) battler.pbReduceHP(battler.totalhp / 8, false)
@@ -2332,7 +2335,7 @@ Battle::AbilityEffects::EndOfRoundWeather.add(:SOLARPOWER,
Battle::AbilityEffects::EndOfRoundHealing.add(:HEALER, Battle::AbilityEffects::EndOfRoundHealing.add(:HEALER,
proc { |ability, battler, battle| proc { |ability, battler, battle|
next unless battle.pbRandom(100) < 30 next if battle.pbRandom(100) >= 30
battler.allAllies.each do |b| battler.allAllies.each do |b|
next if b.status == :NONE next if b.status == :NONE
battle.pbShowAbilitySplash(battler) battle.pbShowAbilitySplash(battler)
@@ -2920,9 +2923,9 @@ Battle::AbilityEffects::OnSwitchIn.add(:NEUTRALIZINGGAS,
end end
# Trigger items upon Unnerve being negated # Trigger items upon Unnerve being negated
battler.ability_id = nil # Allows checking if Unnerve was active before battler.ability_id = nil # Allows checking if Unnerve was active before
had_unnerve = battle.pbCheckGlobalAbility(:UNNERVE) had_unnerve = battle.pbCheckGlobalAbility([:UNNERVE, :ASONECHILLINGNEIGH, :ASONEGRIMNEIGH])
battler.ability_id = :NEUTRALIZINGGAS battler.ability_id = :NEUTRALIZINGGAS
if had_unnerve && !battle.pbCheckGlobalAbility(:UNNERVE) if had_unnerve && !battle.pbCheckGlobalAbility([:UNNERVE, :ASONECHILLINGNEIGH, :ASONEGRIMNEIGH])
battle.allBattlers.each { |b| b.pbItemsOnUnnerveEnding } battle.allBattlers.each { |b| b.pbItemsOnUnnerveEnding }
end end
} }

View File

@@ -59,7 +59,7 @@ class BugContestBattle < Battle
if pbBugContestState.lastPokemon if pbBugContestState.lastPokemon
lastPokemon = pbBugContestState.lastPokemon lastPokemon = pbBugContestState.lastPokemon
pbDisplayPaused(_INTL("You already caught a {1}.", lastPokemon.name)) pbDisplayPaused(_INTL("You already caught a {1}.", lastPokemon.name))
helptext = _INTL("STOCK POKéMON:\n {1} Lv.{2} MaxHP: {3}\nTHIS POKéMON:\n {4} Lv.{5} MaxHP: {6}", helptext = _INTL("Stock Pokémon:\n{1} Lv.{2} Max HP: {3}\nThis Pokémon:\n{4} Lv.{5} Max HP: {6}",
lastPokemon.name, lastPokemon.level, lastPokemon.totalhp, lastPokemon.name, lastPokemon.level, lastPokemon.totalhp,
pkmn.name, pkmn.level, pkmn.totalhp) pkmn.name, pkmn.level, pkmn.totalhp)
@scene.pbShowHelp(helptext) @scene.pbShowHelp(helptext)

View File

@@ -177,7 +177,7 @@ class BattleArenaBattle < Battle
ratings2.each { |val| points[1] += val } ratings2.each { |val| points[1] += val }
# Make judgment # Make judgment
if points[0] == points[1] if points[0] == points[1]
pbDisplay(_INTL("{1} tied the opponent\n{2} in a referee's decision!", pbDisplay(_INTL("{1} tied the opponent {2} in a referee's decision!",
@battlers[0].name, @battlers[1].name)) @battlers[0].name, @battlers[1].name))
# NOTE: Pokémon doesn't really lose HP, but the effect is mostly the # NOTE: Pokémon doesn't really lose HP, but the effect is mostly the
# same. # same.
@@ -186,12 +186,12 @@ class BattleArenaBattle < Battle
@battlers[1].hp = 0 @battlers[1].hp = 0
@battlers[1].pbFaint(false) @battlers[1].pbFaint(false)
elsif points[0] > points[1] elsif points[0] > points[1]
pbDisplay(_INTL("{1} defeated the opponent\n{2} in a referee's decision!", pbDisplay(_INTL("{1} defeated the opponent {2} in a referee's decision!",
@battlers[0].name, @battlers[1].name)) @battlers[0].name, @battlers[1].name))
@battlers[1].hp = 0 @battlers[1].hp = 0
@battlers[1].pbFaint(false) @battlers[1].pbFaint(false)
else else
pbDisplay(_INTL("{1} lost to the opponent\n{2} in a referee's decision!", pbDisplay(_INTL("{1} lost to the opponent {2} in a referee's decision!",
@battlers[0].name, @battlers[1].name)) @battlers[0].name, @battlers[1].name))
@battlers[0].hp = 0 @battlers[0].hp = 0
@battlers[0].pbFaint(false) @battlers[0].pbFaint(false)
@@ -259,8 +259,8 @@ class Battle::Scene
end end
def pbBattleArenaBattlers(battler1, battler2) def pbBattleArenaBattlers(battler1, battler2)
pbMessage(_INTL("REFEREE: {1} VS {2}!\nCommence battling!\\wtnp[20]", pbMessage(_INTL("REFEREE: {1} VS {2}!\nCommence battling!",
battler1.name, battler2.name)) { pbBattleArenaUpdate } battler1.name, battler2.name) + "\\wtnp[20]") { pbBattleArenaUpdate }
end end
def pbBattleArenaJudgment(battler1, battler2, ratings1, ratings2) def pbBattleArenaJudgment(battler1, battler2, ratings1, ratings2)
@@ -271,7 +271,7 @@ class Battle::Scene
msgwindow = pbCreateMessageWindow msgwindow = pbCreateMessageWindow
dimmingvp = Viewport.new(0, 0, Graphics.width, Graphics.height - msgwindow.height) dimmingvp = Viewport.new(0, 0, Graphics.width, Graphics.height - msgwindow.height)
pbMessageDisplay(msgwindow, pbMessageDisplay(msgwindow,
_INTL("REFEREE: That's it! We will now go to judging to determine the winner!\\wtnp[20]")) do _INTL("REFEREE: That's it! We will now go to judging to determine the winner!") + "\\wtnp[20]") do
pbBattleArenaUpdate pbBattleArenaUpdate
dimmingvp.update dimmingvp.update
end end
@@ -299,21 +299,21 @@ class Battle::Scene
end end
updateJudgment(infowindow, 1, battler1, battler2, ratings1, ratings2) updateJudgment(infowindow, 1, battler1, battler2, ratings1, ratings2)
pbMessageDisplay(msgwindow, pbMessageDisplay(msgwindow,
_INTL("REFEREE: Judging category 1, Mind!\nThe Pokémon showing the most guts!\\wtnp[40]")) do _INTL("REFEREE: Judging category 1, Mind!\nThe Pokémon showing the most guts!") + "\\wtnp[40]") do
pbBattleArenaUpdate pbBattleArenaUpdate
dimmingvp.update dimmingvp.update
infowindow.update infowindow.update
end end
updateJudgment(infowindow, 2, battler1, battler2, ratings1, ratings2) updateJudgment(infowindow, 2, battler1, battler2, ratings1, ratings2)
pbMessageDisplay(msgwindow, pbMessageDisplay(msgwindow,
_INTL("REFEREE: Judging category 2, Skill!\nThe Pokémon using moves the best!\\wtnp[40]")) do _INTL("REFEREE: Judging category 2, Skill!\nThe Pokémon using moves the best!") + "\\wtnp[40]") do
pbBattleArenaUpdate pbBattleArenaUpdate
dimmingvp.update dimmingvp.update
infowindow.update infowindow.update
end end
updateJudgment(infowindow, 3, battler1, battler2, ratings1, ratings2) updateJudgment(infowindow, 3, battler1, battler2, ratings1, ratings2)
pbMessageDisplay(msgwindow, pbMessageDisplay(msgwindow,
_INTL("REFEREE: Judging category 3, Body!\nThe Pokémon with the most vitality!\\wtnp[40]")) do _INTL("REFEREE: Judging category 3, Body!\nThe Pokémon with the most vitality!") + "\\wtnp[40]") do
pbBattleArenaUpdate pbBattleArenaUpdate
dimmingvp.update dimmingvp.update
infowindow.update infowindow.update
@@ -326,23 +326,23 @@ class Battle::Scene
end end
if total1 == total2 if total1 == total2
pbMessageDisplay(msgwindow, pbMessageDisplay(msgwindow,
_INTL("REFEREE: Judgment: {1} to {2}!\nWe have a draw!\\wtnp[40]", total1, total2)) do _INTL("REFEREE: Judgment: {1} to {2}!\nWe have a draw!", total1, total2) + "\\wtnp[40]") do
pbBattleArenaUpdate pbBattleArenaUpdate
dimmingvp.update dimmingvp.update
infowindow.update infowindow.update
end end
elsif total1 > total2 elsif total1 > total2
pbMessageDisplay(msgwindow, pbMessageDisplay(msgwindow,
_INTL("REFEREE: Judgment: {1} to {2}!\nThe winner is {3}'s {4}!\\wtnp[40]", _INTL("REFEREE: Judgment: {1} to {2}!\nThe winner is {3}'s {4}!",
total1, total2, @battle.pbGetOwnerName(battler1.index), battler1.name)) do total1, total2, @battle.pbGetOwnerName(battler1.index), battler1.name) + "\\wtnp[40]") do
pbBattleArenaUpdate pbBattleArenaUpdate
dimmingvp.update dimmingvp.update
infowindow.update infowindow.update
end end
else else
pbMessageDisplay(msgwindow, pbMessageDisplay(msgwindow,
_INTL("REFEREE: Judgment: {1} to {2}!\nThe winner is {3}!\\wtnp[40]", _INTL("REFEREE: Judgment: {1} to {2}!\nThe winner is {3}!",
total1, total2, battler2.name)) do total1, total2, battler2.name) + "\\wtnp[40]") do
pbBattleArenaUpdate pbBattleArenaUpdate
dimmingvp.update dimmingvp.update
infowindow.update infowindow.update

View File

@@ -97,7 +97,7 @@ EventHandlers.add(:on_player_step_taken_can_transfer, :poison_party,
pkmn.hp -= 1 if pkmn.hp > 1 || Settings::POISON_FAINT_IN_FIELD pkmn.hp -= 1 if pkmn.hp > 1 || Settings::POISON_FAINT_IN_FIELD
if pkmn.hp == 1 && !Settings::POISON_FAINT_IN_FIELD if pkmn.hp == 1 && !Settings::POISON_FAINT_IN_FIELD
pkmn.status = :NONE pkmn.status = :NONE
pbMessage(_INTL("{1} survived the poisoning.\\nThe poison faded away!\1", pkmn.name)) pbMessage(_INTL("{1} survived the poisoning.\\nThe poison faded away!", pkmn.name))
next next
elsif pkmn.hp == 0 elsif pkmn.hp == 0
pkmn.changeHappiness("faint") pkmn.changeHappiness("faint")
@@ -114,7 +114,7 @@ EventHandlers.add(:on_player_step_taken_can_transfer, :poison_party,
def pbCheckAllFainted def pbCheckAllFainted
if $player.able_pokemon_count == 0 if $player.able_pokemon_count == 0
pbMessage(_INTL("You have no more Pokémon that can fight!\1")) pbMessage(_INTL("You have no more Pokémon that can fight!") + "\1")
pbMessage(_INTL("You blacked out!")) pbMessage(_INTL("You blacked out!"))
pbBGMFade(1.0) pbBGMFade(1.0)
pbBGSFade(1.0) pbBGSFade(1.0)
@@ -450,7 +450,7 @@ end
module PBMoveRoute module PBMoveRoute
DOWN = 1 DOWN = 1
LEFT = 2 LEFT = 2
RRIGHT = 3 RIGHT = 3
UP = 4 UP = 4
LOWER_LEFT = 5 LOWER_LEFT = 5
LOWER_RIGHT = 6 LOWER_RIGHT = 6
@@ -667,15 +667,21 @@ def pbItemBall(item, quantity = 1)
if $bag.add(item, quantity) # If item can be picked up if $bag.add(item, quantity) # If item can be picked up
meName = (item.is_key_item?) ? "Key item get" : "Item get" meName = (item.is_key_item?) ? "Key item get" : "Item get"
if item == :DNASPLICERS if item == :DNASPLICERS
pbMessage(_INTL("\\me[{1}]You found \\c[1]{2}\\c[0]!\\wtnp[30]", meName, itemname)) pbMessage("\\me[#{meName}]" + _INTL("You found \\c[1]{1}\\c[0]!", itemname) + "\\wtnp[30]")
elsif item.is_machine? # TM or HM elsif item.is_machine? # TM or HM
pbMessage(_INTL("\\me[{1}]You found \\c[1]{2} {3}\\c[0]!\\wtnp[30]", meName, itemname, GameData::Move.get(move).name)) if quantity > 1
pbMessage("\\me[#{meName}]" + _INTL("You found {1} \\c[1]{2} {3}\\c[0]!",
quantity, itemname, GameData::Move.get(move).name) + "\\wtnp[30]")
else
pbMessage("\\me[#{meName}]" + _INTL("You found \\c[1]{1} {2}\\c[0]!",
itemname, GameData::Move.get(move).name) + "\\wtnp[30]")
end
elsif quantity > 1 elsif quantity > 1
pbMessage(_INTL("\\me[{1}]You found {2} \\c[1]{3}\\c[0]!\\wtnp[30]", meName, quantity, itemname)) pbMessage("\\me[#{meName}]" + _INTL("You found {1} \\c[1]{2}\\c[0]!", quantity, itemname) + "\\wtnp[30]")
elsif itemname.starts_with_vowel? elsif itemname.starts_with_vowel?
pbMessage(_INTL("\\me[{1}]You found an \\c[1]{2}\\c[0]!\\wtnp[30]", meName, itemname)) pbMessage("\\me[#{meName}]" + _INTL("You found an \\c[1]{1}\\c[0]!", itemname) + "\\wtnp[30]")
else else
pbMessage(_INTL("\\me[{1}]You found a \\c[1]{2}\\c[0]!\\wtnp[30]", meName, itemname)) pbMessage("\\me[#{meName}]" + _INTL("You found a \\c[1]{1}\\c[0]!", itemname) + "\\wtnp[30]")
end end
pbMessage(_INTL("You put the {1} in\\nyour Bag's <icon=bagPocket{2}>\\c[1]{3}\\c[0] pocket.", pbMessage(_INTL("You put the {1} in\\nyour Bag's <icon=bagPocket{2}>\\c[1]{3}\\c[0] pocket.",
itemname, pocket, PokemonBag.pocket_names[pocket - 1])) itemname, pocket, PokemonBag.pocket_names[pocket - 1]))
@@ -683,13 +689,17 @@ def pbItemBall(item, quantity = 1)
end end
# Can't add the item # Can't add the item
if item.is_machine? # TM or HM if item.is_machine? # TM or HM
pbMessage(_INTL("You found \\c[1]{1} {2}\\c[0]!\\wtnp[30]", itemname, GameData::Move.get(move).name)) if quantity > 1
pbMessage(_INTL("You found {1} \\c[1]{2} {3}\\c[0]!", quantity, itemname, GameData::Move.get(move).name) + "\\wtnp[30]")
else
pbMessage(_INTL("You found \\c[1]{1} {2}\\c[0]!", itemname, GameData::Move.get(move).name) + "\\wtnp[30]")
end
elsif quantity > 1 elsif quantity > 1
pbMessage(_INTL("You found {1} \\c[1]{2}\\c[0]!\\wtnp[30]", quantity, itemname)) pbMessage(_INTL("You found {1} \\c[1]{2}\\c[0]!", quantity, itemname) + "\\wtnp[30]")
elsif itemname.starts_with_vowel? elsif itemname.starts_with_vowel?
pbMessage(_INTL("You found an \\c[1]{1}\\c[0]!\\wtnp[30]", itemname)) pbMessage(_INTL("You found an \\c[1]{1}\\c[0]!", itemname) + "\\wtnp[30]")
else else
pbMessage(_INTL("You found a \\c[1]{1}\\c[0]!\\wtnp[30]", itemname)) pbMessage(_INTL("You found a \\c[1]{1}\\c[0]!", itemname) + "\\wtnp[30]")
end end
pbMessage(_INTL("But your Bag is full...")) pbMessage(_INTL("But your Bag is full..."))
return false return false
@@ -706,15 +716,21 @@ def pbReceiveItem(item, quantity = 1)
move = item.move move = item.move
meName = (item.is_key_item?) ? "Key item get" : "Item get" meName = (item.is_key_item?) ? "Key item get" : "Item get"
if item == :DNASPLICERS if item == :DNASPLICERS
pbMessage(_INTL("\\me[{1}]You obtained \\c[1]{2}\\c[0]!\\wtnp[30]", meName, itemname)) pbMessage("\\me[#{meName}]" + _INTL("You obtained \\c[1]{1}\\c[0]!", itemname) + "\\wtnp[30]")
elsif item.is_machine? # TM or HM elsif item.is_machine? # TM or HM
pbMessage(_INTL("\\me[{1}]You obtained \\c[1]{2} {3}\\c[0]!\\wtnp[30]", meName, itemname, GameData::Move.get(move).name)) if quantity > 1
pbMessage("\\me[#{meName}]" + _INTL("You obtained {1} \\c[1]{2} {3}\\c[0]!",
quantity, itemname, GameData::Move.get(move).name) + "\\wtnp[30]")
else
pbMessage("\\me[#{meName}]" + _INTL("You obtained \\c[1]{1} {2}\\c[0]!",
itemname, GameData::Move.get(move).name) + "\\wtnp[30]")
end
elsif quantity > 1 elsif quantity > 1
pbMessage(_INTL("\\me[{1}]You obtained {2} \\c[1]{3}\\c[0]!\\wtnp[30]", meName, quantity, itemname)) pbMessage("\\me[#{meName}]" + _INTL("You obtained {1} \\c[1]{2}\\c[0]!", quantity, itemname) + "\\wtnp[30]")
elsif itemname.starts_with_vowel? elsif itemname.starts_with_vowel?
pbMessage(_INTL("\\me[{1}]You obtained an \\c[1]{2}\\c[0]!\\wtnp[30]", meName, itemname)) pbMessage("\\me[#{meName}]" + _INTL("You obtained an \\c[1]{1}\\c[0]!", itemname) + "\\wtnp[30]")
else else
pbMessage(_INTL("\\me[{1}]You obtained a \\c[1]{2}\\c[0]!\\wtnp[30]", meName, itemname)) pbMessage("\\me[#{meName}]" + _INTL("You obtained a \\c[1]{1}\\c[0]!", itemname) + "\\wtnp[30]")
end end
if $bag.add(item, quantity) # If item can be added if $bag.add(item, quantity) # If item can be added
pbMessage(_INTL("You put the {1} in\\nyour Bag's <icon=bagPocket{2}>\\c[1]{3}\\c[0] pocket.", pbMessage(_INTL("You put the {1} in\\nyour Bag's <icon=bagPocket{2}>\\c[1]{3}\\c[0] pocket.",
@@ -733,7 +749,7 @@ def pbBuyPrize(item, quantity = 1)
item_name = (quantity > 1) ? item.portion_name_plural : item.portion_name item_name = (quantity > 1) ? item.portion_name_plural : item.portion_name
pocket = item.pocket pocket = item.pocket
return false if !$bag.add(item, quantity) return false if !$bag.add(item, quantity)
pbMessage(_INTL("\\CNYou put the {1} in\\nyour Bag's <icon=bagPocket{2}>\\c[1]{3}\\c[0] pocket.", pbMessage("\\CN" + _INTL("You put the {1} in\\nyour Bag's <icon=bagPocket{2}>\\c[1]{3}\\c[0] pocket.",
item_name, pocket, PokemonBag.pocket_names[pocket - 1])) item_name, pocket, PokemonBag.pocket_names[pocket - 1]))
return true return true
end end

View File

@@ -658,7 +658,7 @@ def pbStrength
pbMessage(_INTL("It's a big boulder, but a Pokémon may be able to push it aside.")) pbMessage(_INTL("It's a big boulder, but a Pokémon may be able to push it aside."))
return false return false
end end
pbMessage(_INTL("It's a big boulder, but you may be able to push it aside with a hidden move.\1")) pbMessage(_INTL("It's a big boulder, but you may be able to push it aside with a hidden move.") + "\1")
if pbConfirmMessage(_INTL("Would you like to use Strength?")) if pbConfirmMessage(_INTL("Would you like to use Strength?"))
speciesname = (movefinder) ? movefinder.name : $player.name speciesname = (movefinder) ? movefinder.name : $player.name
pbMessage(_INTL("{1} used {2}!", speciesname, GameData::Move.get(move).name)) pbMessage(_INTL("{1} used {2}!", speciesname, GameData::Move.get(move).name))
@@ -688,7 +688,7 @@ HiddenMoveHandlers::CanUseMove.add(:STRENGTH, proc { |move, pkmn, showmsg|
HiddenMoveHandlers::UseMove.add(:STRENGTH, proc { |move, pokemon| HiddenMoveHandlers::UseMove.add(:STRENGTH, proc { |move, pokemon|
if !pbHiddenMoveAnimation(pokemon) if !pbHiddenMoveAnimation(pokemon)
pbMessage(_INTL("{1} used {2}!\1", pokemon.name, GameData::Move.get(move).name)) pbMessage(_INTL("{1} used {2}!", pokemon.name, GameData::Move.get(move).name) + "\1")
end end
pbMessage(_INTL("Strength made it possible to move boulders around!")) pbMessage(_INTL("Strength made it possible to move boulders around!"))
$PokemonMap.strengthUsed = true $PokemonMap.strengthUsed = true

View File

@@ -360,7 +360,7 @@ def pbBerryPlant
break if !pbConfirmMessage(_INTL("Want to sprinkle some water with the {1}?", break if !pbConfirmMessage(_INTL("Want to sprinkle some water with the {1}?",
GameData::Item.get(item).name)) GameData::Item.get(item).name))
berry_plant.water berry_plant.water
pbMessage(_INTL("{1} watered the plant.\\wtnp[40]", $player.name)) pbMessage(_INTL("{1} watered the plant.", $player.name) + "\\wtnp[40]")
if Settings::NEW_BERRY_PLANTS if Settings::NEW_BERRY_PLANTS
pbMessage(_INTL("There! All happy!")) pbMessage(_INTL("There! All happy!"))
else else
@@ -375,7 +375,7 @@ def pbBerryPlant
if Settings::NEW_BERRY_PLANTS if Settings::NEW_BERRY_PLANTS
# New mechanics # New mechanics
if berry_plant.mulch_id if berry_plant.mulch_id
pbMessage(_INTL("{1} has been laid down.\1", GameData::Item.get(berry_plant.mulch_id).name)) pbMessage(_INTL("{1} has been laid down.", GameData::Item.get(berry_plant.mulch_id).name))
else else
case pbMessage(_INTL("It's soft, earthy soil."), case pbMessage(_INTL("It's soft, earthy soil."),
[_INTL("Fertilize"), _INTL("Plant Berry"), _INTL("Exit")], -1) [_INTL("Fertilize"), _INTL("Plant Berry"), _INTL("Exit")], -1)
@@ -391,7 +391,7 @@ def pbBerryPlant
if mulch_data.is_mulch? if mulch_data.is_mulch?
berry_plant.mulch_id = mulch berry_plant.mulch_id = mulch
$bag.remove(mulch) $bag.remove(mulch)
pbMessage(_INTL("The {1} was scattered on the soil.\1", mulch_data.name)) pbMessage(_INTL("The {1} was scattered on the soil.", mulch_data.name))
else else
pbMessage(_INTL("That won't fertilize the soil!")) pbMessage(_INTL("That won't fertilize the soil!"))
return return
@@ -404,7 +404,7 @@ def pbBerryPlant
end end
else else
# Old mechanics # Old mechanics
return if !pbConfirmMessage(_INTL("It's soft, loamy soil.\nPlant a berry?")) return if !pbConfirmMessage(_INTL("It's soft, loamy soil. Want to plant a berry?"))
ask_to_plant = false ask_to_plant = false
end end
if !ask_to_plant || pbConfirmMessage(_INTL("Want to plant a Berry?")) if !ask_to_plant || pbConfirmMessage(_INTL("Want to plant a Berry?"))
@@ -453,13 +453,13 @@ def pbPickBerry(berry, qty = 1)
end end
$bag.add(berry, qty) $bag.add(berry, qty)
if qty > 1 if qty > 1
pbMessage(_INTL("\\me[Berry get]You picked the {1} \\c[1]{2}\\c[0].\\wtnp[30]", qty, berry_name)) pbMessage("\\me[Berry get]" + _INTL("You picked the {1} \\c[1]{2}\\c[0].", qty, berry_name) + "\\wtnp[30]")
else else
pbMessage(_INTL("\\me[Berry get]You picked the \\c[1]{1}\\c[0].\\wtnp[30]", berry_name)) pbMessage("\\me[Berry get]" + _INTL("You picked the \\c[1]{1}\\c[0].", berry_name) + "\\wtnp[30]")
end end
pocket = berry.pocket 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", pbMessage(_INTL("You put the {1} in\\nyour Bag's <icon=bagPocket{2}>\\c[1]{3}\\c[0] pocket.",
$player.name, berry_name, pocket, PokemonBag.pocket_names[pocket - 1])) berry_name, pocket, PokemonBag.pocket_names[pocket - 1]) + "\1")
if Settings::NEW_BERRY_PLANTS if Settings::NEW_BERRY_PLANTS
pbMessage(_INTL("The soil returned to its soft and earthy state.")) pbMessage(_INTL("The soil returned to its soft and earthy state."))
else else

View File

@@ -591,11 +591,11 @@ def pbLearnMove(pkmn, move, ignore_if_known = false, by_machine = false, &block)
return false return false
elsif pkmn.numMoves < Pokemon::MAX_MOVES elsif pkmn.numMoves < Pokemon::MAX_MOVES
pkmn.learn_move(move) pkmn.learn_move(move)
pbMessage("\\se[]" + _INTL("{1} learned {2}!\\se[Pkmn move learnt]", pkmn_name, move_name), &block) pbMessage("\\se[]" + _INTL("{1} learned {2}!", pkmn_name, move_name) + "\\se[Pkmn move learnt]", &block)
return true return true
end end
pbMessage(_INTL("{1} wants to learn {2}, but it already knows {3} moves.\1", pbMessage(_INTL("{1} wants to learn {2}, but it already knows {3} moves.",
pkmn_name, move_name, pkmn.numMoves.to_word), &block) pkmn_name, move_name, pkmn.numMoves.to_word) + "\1", &block)
if pbConfirmMessage(_INTL("Should {1} forget a move to learn {2}?", pkmn_name, move_name), &block) if pbConfirmMessage(_INTL("Should {1} forget a move to learn {2}?", pkmn_name, move_name), &block)
loop do loop do
move_index = pbForgetMove(pkmn, move) move_index = pbForgetMove(pkmn, move)
@@ -606,9 +606,9 @@ def pbLearnMove(pkmn, move, ignore_if_known = false, by_machine = false, &block)
if by_machine && Settings::TAUGHT_MACHINES_KEEP_OLD_PP if by_machine && Settings::TAUGHT_MACHINES_KEEP_OLD_PP
pkmn.moves[move_index].pp = [oldmovepp, pkmn.moves[move_index].total_pp].min pkmn.moves[move_index].pp = [oldmovepp, pkmn.moves[move_index].total_pp].min
end end
pbMessage(_INTL("1, 2, and...\\wt[16] ...\\wt[16] ...\\wt[16] Ta-da!\\se[Battle ball drop]\1"), &block) pbMessage(_INTL("1, 2, and...\\wt[16] ...\\wt[16] ...\\wt[16] Ta-da!") + "\\se[Battle ball drop]\1", &block)
pbMessage(_INTL("{1} forgot how to use {2}.\\nAnd...\1", pkmn_name, old_move_name), &block) pbMessage(_INTL("{1} forgot how to use {2}.\\nAnd..." + "\1", pkmn_name, old_move_name), &block)
pbMessage("\\se[]" + _INTL("{1} learned {2}!\\se[Pkmn move learnt]", pkmn_name, move_name), &block) pbMessage("\\se[]" + _INTL("{1} learned {2}!", pkmn_name, move_name) + "\\se[Pkmn move learnt]", &block)
pkmn.changeHappiness("machine") if by_machine pkmn.changeHappiness("machine") if by_machine
return true return true
elsif pbConfirmMessage(_INTL("Give up on learning {1}?", move_name), &block) elsif pbConfirmMessage(_INTL("Give up on learning {1}?", move_name), &block)
@@ -714,7 +714,7 @@ def pbUseItemOnPokemon(item, pkmn, scene)
elsif !pkmn.compatible_with_move?(machine) elsif !pkmn.compatible_with_move?(machine)
pbMessage(_INTL("{1} can't learn {2}.", pkmn.name, movename)) { scene.pbUpdate } pbMessage(_INTL("{1} can't learn {2}.", pkmn.name, movename)) { scene.pbUpdate }
else else
pbMessage(_INTL("\\se[PC access]You booted up the {1}.\1", itm.portion_name)) { scene.pbUpdate } pbMessage("\\se[PC access]" + _INTL("You booted up the {1}.", itm.portion_name) + "\1") { scene.pbUpdate }
if pbConfirmMessage(_INTL("Do you want to teach {1} to {2}?", movename, pkmn.name)) { scene.pbUpdate } if pbConfirmMessage(_INTL("Do you want to teach {1} to {2}?", movename, pkmn.name)) { scene.pbUpdate }
if pbLearnMove(pkmn, machine, false, true) { scene.pbUpdate } if pbLearnMove(pkmn, machine, false, true) { scene.pbUpdate }
$bag.remove(item) if itm.consumed_after_use? $bag.remove(item) if itm.consumed_after_use?
@@ -785,9 +785,9 @@ def pbGiveItemToPokemon(item, pkmn, scene, pkmnid = 0)
if pkmn.hasItem? if pkmn.hasItem?
olditemname = pkmn.item.portion_name olditemname = pkmn.item.portion_name
if newitemname.starts_with_vowel? if newitemname.starts_with_vowel?
scene.pbDisplay(_INTL("{1} is already holding an {2}.\1", pkmn.name, olditemname)) scene.pbDisplay(_INTL("{1} is already holding an {2}.", pkmn.name, olditemname) + "\1")
else else
scene.pbDisplay(_INTL("{1} is already holding a {2}.\1", pkmn.name, olditemname)) scene.pbDisplay(_INTL("{1} is already holding a {2}.", pkmn.name, olditemname) + "\1")
end end
if scene.pbConfirm(_INTL("Would you like to switch the two items?")) if scene.pbConfirm(_INTL("Would you like to switch the two items?"))
$bag.remove(item) $bag.remove(item)

View File

@@ -74,7 +74,7 @@ ItemHandlers::UseFromBag.addIf(:move_machines,
item_data = GameData::Item.get(item) item_data = GameData::Item.get(item)
move = item_data.move move = item_data.move
next 0 if !move next 0 if !move
pbMessage(_INTL("\\se[PC access]You booted up {1}.\1", item_data.name)) pbMessage("\\se[PC access]" + _INTL("You booted up the {1}.", item_data.name) + "\1")
next 0 if !pbConfirmMessage(_INTL("Do you want to teach {1} to a Pokémon?", next 0 if !pbConfirmMessage(_INTL("Do you want to teach {1} to a Pokémon?",
GameData::Move.get(move).name)) GameData::Move.get(move).name))
next 1 if pbMoveTutorChoose(move, nil, true, item_data.is_TR?) next 1 if pbMoveTutorChoose(move, nil, true, item_data.is_TR?)
@@ -320,11 +320,11 @@ ItemHandlers::UseInField.add(:ITEMFINDER, proc { |item|
when 8 then $game_player.turn_up when 8 then $game_player.turn_up
end end
pbWait(Graphics.frame_rate * 3 / 10) pbWait(Graphics.frame_rate * 3 / 10)
pbMessage(_INTL("Huh? The {1}'s responding!\1", GameData::Item.get(item).name)) pbMessage(_INTL("Huh? The {1}'s responding!", GameData::Item.get(item).name) + "\1")
pbMessage(_INTL("There's an item buried around here!")) pbMessage(_INTL("There's an item buried around here!"))
end end
else else
pbMessage(_INTL("... \\wt[10]... \\wt[10]... \\wt[10]...\\wt[10]Nope! There's no response.")) pbMessage(_INTL("... \\wt[10]... \\wt[10]... \\wt[10]... \\wt[10]Nope! There's no response."))
end end
next true next true
}) })

View File

@@ -430,7 +430,7 @@ class Phone
end end
def start_message(contact = nil) def start_message(contact = nil)
pbMessage(_INTL("......\\wt[5] ......\\1")) pbMessage(_INTL("......\\wt[5] ......") + "\1")
end end
def play(dialogue, contact) def play(dialogue, contact)
@@ -454,14 +454,14 @@ class Phone
message.gsub!(/\\TP/, contact_pokemon_species) message.gsub!(/\\TP/, contact_pokemon_species)
message.gsub!(/\\TE/, random_encounter_species) message.gsub!(/\\TE/, random_encounter_species)
message.gsub!(/\\TM/, contact_map_name) message.gsub!(/\\TM/, contact_map_name)
message += "\\1" if i < messages.length - 1 message += "\1" if i < messages.length - 1
pbMessage(gender_colour_text + message) pbMessage(gender_colour_text + message)
end end
end_message(contact) end_message(contact)
end end
def end_message(contact = nil) def end_message(contact = nil)
pbMessage(_INTL("Click!\\wt[10]\n......\\wt[5] ......\\1")) pbMessage(_INTL("Click!\\wt[10]\n......\\wt[5] ......") + "\1")
end end
#=========================================================================== #===========================================================================

View File

@@ -254,8 +254,8 @@ MultipleForms.register(:ROTOM, {
# Replace the old move with the new move (keeps the same index) # Replace the old move with the new move (keeps the same index)
pkmn.moves[old_move_index].id = new_move_id pkmn.moves[old_move_index].id = new_move_id
new_move_name = pkmn.moves[old_move_index].name new_move_name = pkmn.moves[old_move_index].name
pbMessage(_INTL("{1} forgot {2}...\1", pkmn.name, old_move_name)) pbMessage(_INTL("{1} forgot {2}...", pkmn.name, old_move_name) + "\1")
pbMessage("\\se[]" + _INTL("{1} learned {2}!\\se[Pkmn move learnt]\1", pkmn.name, new_move_name)) pbMessage("\\se[]" + _INTL("{1} learned {2}!", pkmn.name, new_move_name) + "\\se[Pkmn move learnt]")
end end
elsif !new_move_id.nil? elsif !new_move_id.nil?
# Just learn the new move # Just learn the new move

View File

@@ -99,7 +99,7 @@ class PokemonEggHatch_Scene
pbBGMStop pbBGMStop
pbMEPlay("Evolution success") pbMEPlay("Evolution success")
@pokemon.name = nil @pokemon.name = nil
pbMessage("\\se[]" + _INTL("{1} hatched from the Egg!\\wt[80]", @pokemon.name)) { update } pbMessage("\\se[]" + _INTL("{1} hatched from the Egg!", @pokemon.name) + "\\wt[80]") { update }
# Record the Pokémon's species as owned in the Pokédex # Record the Pokémon's species as owned in the Pokédex
was_owned = $player.owned?(@pokemon.species) was_owned = $player.owned?(@pokemon.species)
$player.pokedex.register(@pokemon) $player.pokedex.register(@pokemon)
@@ -194,7 +194,7 @@ end
# #
#=============================================================================== #===============================================================================
def pbHatchAnimation(pokemon) def pbHatchAnimation(pokemon)
pbMessage(_INTL("Huh?\1")) pbMessage(_INTL("Huh?") + "\1")
pbFadeOutInWithMusic do pbFadeOutInWithMusic do
scene = PokemonEggHatch_Scene.new scene = PokemonEggHatch_Scene.new
screen = PokemonEggHatchScreen.new(scene) screen = PokemonEggHatchScreen.new(scene)
@@ -214,9 +214,9 @@ def pbHatch(pokemon)
pokemon.hatched_map = $game_map.map_id pokemon.hatched_map = $game_map.map_id
pokemon.record_first_moves pokemon.record_first_moves
if !pbHatchAnimation(pokemon) if !pbHatchAnimation(pokemon)
pbMessage(_INTL("Huh?\1")) pbMessage(_INTL("Huh?") + "\1")
pbMessage(_INTL("...\1")) pbMessage(_INTL("...") + "\1")
pbMessage(_INTL("... .... .....\1")) pbMessage(_INTL("... .... .....") + "\1")
pbMessage(_INTL("{1} hatched from the Egg!", speciesname)) pbMessage(_INTL("{1} hatched from the Egg!", speciesname))
was_owned = $player.owned?(pokemon.species) was_owned = $player.owned?(pokemon.species)
$player.pokedex.register(pokemon) $player.pokedex.register(pokemon)

View File

@@ -535,7 +535,7 @@ class PokemonEvolutionScene
metaplayer1.play metaplayer1.play
metaplayer2.play metaplayer2.play
pbBGMStop pbBGMStop
pbMessageDisplay(@sprites["msgwindow"], "\\se[]" + _INTL("What?") + "\\1") { pbUpdate } pbMessageDisplay(@sprites["msgwindow"], "\\se[]" + _INTL("What?") + "\1") { pbUpdate }
pbPlayDecisionSE pbPlayDecisionSE
@pokemon.play_cry @pokemon.play_cry
@sprites["msgwindow"].text = _INTL("{1} is evolving!", @pokemon.name) @sprites["msgwindow"].text = _INTL("{1} is evolving!", @pokemon.name)
@@ -591,8 +591,8 @@ class PokemonEvolutionScene
pbMEPlay("Evolution success") pbMEPlay("Evolution success")
newspeciesname = GameData::Species.get(@newspecies).name newspeciesname = GameData::Species.get(@newspecies).name
pbMessageDisplay(@sprites["msgwindow"], pbMessageDisplay(@sprites["msgwindow"],
"\\se[]" + _INTL("Congratulations! Your {1} evolved into {2}!\\wt[80]", "\\se[]" + _INTL("Congratulations! Your {1} evolved into {2}!",
@pokemon.name, newspeciesname)) { pbUpdate } @pokemon.name, newspeciesname) + "\\wt[80]") { pbUpdate }
@sprites["msgwindow"].text = "" @sprites["msgwindow"].text = ""
# Check for consumed item and check if Pokémon should be duplicated # Check for consumed item and check if Pokémon should be duplicated
pbEvolutionMethodAfterEvolution pbEvolutionMethodAfterEvolution

View File

@@ -175,19 +175,19 @@ class PokemonTrade_Scene
speciesname1 = GameData::Species.get(@pokemon.species).name speciesname1 = GameData::Species.get(@pokemon.species).name
speciesname2 = GameData::Species.get(@pokemon2.species).name speciesname2 = GameData::Species.get(@pokemon2.species).name
pbMessageDisplay(@sprites["msgwindow"], pbMessageDisplay(@sprites["msgwindow"],
_ISPRINTF("{1:s}\r\nID: {2:05d} OT: {3:s}\\wtnp[0]", _ISPRINTF("{1:s}\r\nID: {2:05d} OT: {3:s}",
@pokemon.name, @pokemon.owner.public_id, @pokemon.owner.name)) { pbUpdate } @pokemon.name, @pokemon.owner.public_id, @pokemon.owner.name) + "\\wtnp[0]") { pbUpdate }
pbMessageWaitForInput(@sprites["msgwindow"], 50, true) { pbUpdate } pbMessageWaitForInput(@sprites["msgwindow"], 50, true) { pbUpdate }
pbPlayDecisionSE pbPlayDecisionSE
pbScene1 pbScene1
pbMessageDisplay(@sprites["msgwindow"], pbMessageDisplay(@sprites["msgwindow"],
_INTL("For {1}'s {2},\r\n{3} sends {4}.\1", @trader1, speciesname1, @trader2, speciesname2)) { pbUpdate } _INTL("For {1}'s {2},\r\n{3} sends {4}.", @trader1, speciesname1, @trader2, speciesname2) + "\1") { pbUpdate }
pbMessageDisplay(@sprites["msgwindow"], pbMessageDisplay(@sprites["msgwindow"],
_INTL("{1} bids farewell to {2}.", @trader2, speciesname2)) { pbUpdate } _INTL("{1} bids farewell to {2}.", @trader2, speciesname2)) { pbUpdate }
pbScene2 pbScene2
pbMessageDisplay(@sprites["msgwindow"], pbMessageDisplay(@sprites["msgwindow"],
_ISPRINTF("{1:s}\r\nID: {2:05d} OT: {3:s}\1", _ISPRINTF("{1:s}\r\nID: {2:05d} OT: {3:s}",
@pokemon2.name, @pokemon2.owner.public_id, @pokemon2.owner.name)) { pbUpdate } @pokemon2.name, @pokemon2.owner.public_id, @pokemon2.owner.name) + "\1") { pbUpdate }
pbMessageDisplay(@sprites["msgwindow"], pbMessageDisplay(@sprites["msgwindow"],
_INTL("Take good care of {1}.", speciesname2)) { pbUpdate } _INTL("Take good care of {1}.", speciesname2)) { pbUpdate }
# Show Pokédex entry for new species if it hasn't been owned before # Show Pokédex entry for new species if it hasn't been owned before

View File

@@ -283,21 +283,21 @@ class HallOfFame_Scene
hour = totalsec / 60 / 60 hour = totalsec / 60 / 60
min = totalsec / 60 % 60 min = totalsec / 60 % 60
pubid = sprintf("%05d", $player.public_ID) pubid = sprintf("%05d", $player.public_ID)
lefttext = _INTL("Name<r>{1}<br>", $player.name) lefttext = _INTL("Name<r>{1}", $player.name) + "<br>"
lefttext += _INTL("ID No.<r>{1}<br>", pubid) lefttext += _INTL("ID No.<r>{1}", pubid) + "<br>"
if hour > 0 if hour > 0
lefttext += _INTL("Time<r>{1}h {2}m<br>", hour, min) lefttext += _INTL("Time<r>{1}h {2}m", hour, min) + "<br>"
else else
lefttext += _INTL("Time<r>{1}m<br>", min) lefttext += _INTL("Time<r>{1}m", min) + "<br>"
end end
lefttext += _INTL("Pokédex<r>{1}/{2}<br>", lefttext += _INTL("Pokédex<r>{1}/{2}",
$player.pokedex.owned_count, $player.pokedex.seen_count) $player.pokedex.owned_count, $player.pokedex.seen_count) + "<br>"
@sprites["messagebox"] = Window_AdvancedTextPokemon.new(lefttext) @sprites["messagebox"] = Window_AdvancedTextPokemon.new(lefttext)
@sprites["messagebox"].viewport = @viewport @sprites["messagebox"].viewport = @viewport
@sprites["messagebox"].width = 192 if @sprites["messagebox"].width < 192 @sprites["messagebox"].width = 192 if @sprites["messagebox"].width < 192
@sprites["msgwindow"] = pbCreateMessageWindow(@viewport) @sprites["msgwindow"] = pbCreateMessageWindow(@viewport)
pbMessageDisplay(@sprites["msgwindow"], pbMessageDisplay(@sprites["msgwindow"],
_INTL("League champion!\nCongratulations!\\^")) _INTL("League champion!\nCongratulations!") + "\\^")
end end
def writePokemonData(pokemon, hallNumber = -1) def writePokemonData(pokemon, hallNumber = -1)

View File

@@ -1454,16 +1454,16 @@ MenuHandlers.add(:party_menu_item, :move, {
newitem = newpkmn.item newitem = newpkmn.item
newitemname = newitem.portion_name newitemname = newitem.portion_name
if newitemname.starts_with_vowel? if newitemname.starts_with_vowel?
screen.pbDisplay(_INTL("{1} is already holding an {2}.\1", newpkmn.name, newitemname)) screen.pbDisplay(_INTL("{1} is already holding an {2}.", newpkmn.name, newitemname) + "\1")
else else
screen.pbDisplay(_INTL("{1} is already holding a {2}.\1", newpkmn.name, newitemname)) screen.pbDisplay(_INTL("{1} is already holding a {2}.", newpkmn.name, newitemname) + "\1")
end end
next if !screen.pbConfirm(_INTL("Would you like to switch the two items?")) next if !screen.pbConfirm(_INTL("Would you like to switch the two items?"))
newpkmn.item = item newpkmn.item = item
pkmn.item = newitem pkmn.item = newitem
screen.scene.pbClearSwitching screen.scene.pbClearSwitching
screen.pbRefresh screen.pbRefresh
screen.pbDisplay(_INTL("{1} was given the {2} to hold.", newpkmn.name, portionitemname)) screen.pbDisplay(_INTL("{1} was given the {2} to hold.", newpkmn.name, portionitemname) + "\1")
screen.pbDisplay(_INTL("{1} was given the {2} to hold.", pkmn.name, newitemname)) screen.pbDisplay(_INTL("{1} was given the {2} to hold.", pkmn.name, newitemname))
moved = true moved = true
break break

View File

@@ -240,7 +240,7 @@ class PokemonLoadScreen
# Called if all save data is invalid. # Called if all save data is invalid.
# Prompts the player to delete the save files. # Prompts the player to delete the save files.
def prompt_save_deletion def prompt_save_deletion
pbMessage(_INTL("The save file is corrupt, or is incompatible with this game.")) pbMessage(_INTL("The save file is corrupt, or is incompatible with this game.") + "\1")
exit unless pbConfirmMessageSerious( exit unless pbConfirmMessageSerious(
_INTL("Do you want to delete the save file and start anew?") _INTL("Do you want to delete the save file and start anew?")
) )
@@ -254,9 +254,9 @@ class PokemonLoadScreen
@scene.pbStartScene2 @scene.pbStartScene2
if SaveData.exists? if SaveData.exists?
if pbConfirmMessageSerious(_INTL("Delete all saved data?")) if pbConfirmMessageSerious(_INTL("Delete all saved data?"))
pbMessage(_INTL("Once data has been deleted, there is no way to recover it.\1")) pbMessage(_INTL("Once data has been deleted, there is no way to recover it.") + "\1")
if pbConfirmMessageSerious(_INTL("Delete the saved data anyway?")) if pbConfirmMessageSerious(_INTL("Delete the saved data anyway?"))
pbMessage(_INTL("Deleting all data. Don't turn off the power.\\wtnp[0]")) pbMessage(_INTL("Deleting all data. Don't turn off the power.") + "\\wtnp[0]")
self.delete_save_data self.delete_save_data
end end
end end

View File

@@ -15,8 +15,8 @@ def pbEmergencySave
end end
end end
if Game.save if Game.save
pbMessage("\\se[]" + pbMessage("\\se[]" + _INTL("The game was saved.") + "\\me[GUI save game]\\wtnp[30]")
_INTL("The game was saved.\\me[GUI save game] The previous save file has been backed up.\\wtnp[30]")) pbMessage("\\se[]" + _INTL("The previous save file has been backed up.") + "\\wtnp[30]")
else else
pbMessage("\\se[]" + _INTL("Save failed.\\wtnp[30]")) pbMessage("\\se[]" + _INTL("Save failed.\\wtnp[30]"))
end end
@@ -102,9 +102,9 @@ class PokemonSaveScreen
@scene.pbStartScreen @scene.pbStartScreen
if pbConfirmMessage(_INTL("Would you like to save the game?")) if pbConfirmMessage(_INTL("Would you like to save the game?"))
if SaveData.exists? && $game_temp.begun_new_game if SaveData.exists? && $game_temp.begun_new_game
pbMessage(_INTL("WARNING!")) pbMessage(_INTL("WARNING!") + "\1")
pbMessage(_INTL("There is a different game file that is already saved.")) pbMessage(_INTL("There is a different game file that is already saved.") + "\1")
pbMessage(_INTL("If you save now, the other file's adventure, including items and Pokémon, will be entirely lost.")) pbMessage(_INTL("If you save now, the other file's adventure, including items and Pokémon, will be entirely lost.") + "\1")
if !pbConfirmMessageSerious(_INTL("Are you sure you want to save now and overwrite the other save file?")) if !pbConfirmMessageSerious(_INTL("Are you sure you want to save now and overwrite the other save file?"))
pbSEPlay("GUI save choice") pbSEPlay("GUI save choice")
@scene.pbEndScreen @scene.pbEndScreen
@@ -114,10 +114,10 @@ class PokemonSaveScreen
$game_temp.begun_new_game = false $game_temp.begun_new_game = false
pbSEPlay("GUI save choice") pbSEPlay("GUI save choice")
if Game.save if Game.save
pbMessage("\\se[]" + _INTL("{1} saved the game.\\me[GUI save game]\\wtnp[30]", $player.name)) pbMessage("\\se[]" + _INTL("{1} saved the game.", $player.name) + "\\me[GUI save game]\\wtnp[30]")
ret = true ret = true
else else
pbMessage("\\se[]" + _INTL("Save failed.\\wtnp[30]")) pbMessage("\\se[]" + _INTL("Save failed.") + "\\wtnp[30]")
ret = false ret = false
end end
else else

View File

@@ -108,7 +108,7 @@ end
# #
#=============================================================================== #===============================================================================
def pbTrainerPC def pbTrainerPC
pbMessage(_INTL("\\se[PC open]{1} booted up the PC.", $player.name)) pbMessage("\\se[PC open]" + _INTL("{1} booted up the PC.", $player.name))
pbTrainerPCMenu pbTrainerPCMenu
pbSEPlay("PC close") pbSEPlay("PC close")
end end
@@ -132,7 +132,7 @@ end
# #
#=============================================================================== #===============================================================================
def pbPokeCenterPC def pbPokeCenterPC
pbMessage(_INTL("\\se[PC open]{1} booted up the PC.", $player.name)) pbMessage("\\se[PC open]" + _INTL("{1} booted up the PC.", $player.name))
# Get all commands # Get all commands
command_list = [] command_list = []
commands = [] commands = []
@@ -166,7 +166,7 @@ MenuHandlers.add(:pc_menu, :pokemon_storage, {
}, },
"order" => 10, "order" => 10,
"effect" => proc { |menu| "effect" => proc { |menu|
pbMessage(_INTL("\\se[PC access]The Pokémon Storage System was opened.")) pbMessage("\\se[PC access]" + _INTL("The Pokémon Storage System was opened."))
command = 0 command = 0
loop do loop do
command = pbShowCommandsWithHelp(nil, command = pbShowCommandsWithHelp(nil,
@@ -222,7 +222,7 @@ MenuHandlers.add(:pc_menu, :player_pc, {
"name" => proc { next _INTL("{1}'s PC", $player.name) }, "name" => proc { next _INTL("{1}'s PC", $player.name) },
"order" => 20, "order" => 20,
"effect" => proc { |menu| "effect" => proc { |menu|
pbMessage(_INTL("\\se[PC access]Accessed {1}'s PC.", $player.name)) pbMessage("\\se[PC access]" + _INTL("Accessed {1}'s PC.", $player.name))
pbTrainerPCMenu pbTrainerPCMenu
next false next false
} }

View File

@@ -531,7 +531,7 @@ class PurifyChamberScreen
end end
end end
if pbCheckPurify if pbCheckPurify
@scene.pbDisplay(_INTL("There is a Pokémon that is ready to open its heart!\1")) @scene.pbDisplay(_INTL("There is a Pokémon that is ready to open its heart!") + "\1")
@scene.pbCloseSetDetail @scene.pbCloseSetDetail
pbDoPurify pbDoPurify
return false return false
@@ -579,7 +579,7 @@ class PurifyChamberScreen
pbStorePokemon(@chamber[set].shadow) pbStorePokemon(@chamber[set].shadow)
@chamber.setShadow(set, nil) # Remove shadow Pokemon from set @chamber.setShadow(set, nil) # Remove shadow Pokemon from set
if (i + 1) != purifiables.length if (i + 1) != purifiables.length
@scene.pbDisplay(_INTL("There is another Pokémon that is ready to open its heart!")) @scene.pbDisplay(_INTL("There is another Pokémon that is ready to open its heart!") + "\1")
if !@scene.pbConfirm(_INTL("Would you like to switch sets?")) if !@scene.pbConfirm(_INTL("Would you like to switch sets?"))
@scene.pbCloseSet @scene.pbCloseSet
break break

View File

@@ -245,7 +245,7 @@ def pbDownloadMysteryGift(trainer)
addBackgroundPlane(sprites, "background", "mysterygift_bg", viewport) addBackgroundPlane(sprites, "background", "mysterygift_bg", viewport)
pbFadeInAndShow(sprites) pbFadeInAndShow(sprites)
sprites["msgwindow"] = pbCreateMessageWindow sprites["msgwindow"] = pbCreateMessageWindow
pbMessageDisplay(sprites["msgwindow"], _INTL("Searching for a gift.\nPlease wait...\\wtnp[0]")) pbMessageDisplay(sprites["msgwindow"], _INTL("Searching for a gift.\nPlease wait...") + "\\wtnp[0]")
string = pbDownloadToString(MysteryGift::URL) string = pbDownloadToString(MysteryGift::URL)
if nil_or_empty?(string) if nil_or_empty?(string)
pbMessageDisplay(sprites["msgwindow"], _INTL("No new gifts are available.")) pbMessageDisplay(sprites["msgwindow"], _INTL("No new gifts are available."))
@@ -268,7 +268,7 @@ def pbDownloadMysteryGift(trainer)
commands.push(gift[3]) commands.push(gift[3])
end end
commands.push(_INTL("Cancel")) commands.push(_INTL("Cancel"))
pbMessageDisplay(sprites["msgwindow"], _INTL("Choose the gift you want to receive.\\wtnp[0]")) pbMessageDisplay(sprites["msgwindow"], _INTL("Choose the gift you want to receive.") + "\\wtnp[0]")
command = pbShowCommands(sprites["msgwindow"], commands, -1) command = pbShowCommands(sprites["msgwindow"], commands, -1)
if command == -1 || command == commands.length - 1 if command == -1 || command == commands.length - 1
break break
@@ -302,7 +302,7 @@ def pbDownloadMysteryGift(trainer)
pbUpdateSceneMap pbUpdateSceneMap
end end
sprites["msgwindow"].visible = true sprites["msgwindow"].visible = true
pbMessageDisplay(sprites["msgwindow"], _INTL("The gift has been received!")) { sprite.update } pbMessageDisplay(sprites["msgwindow"], _INTL("The gift has been received!") + "\1") { sprite.update }
pbMessageDisplay(sprites["msgwindow"], _INTL("Please pick up your gift from the deliveryman in any Poké Mart.")) { sprite.update } pbMessageDisplay(sprites["msgwindow"], _INTL("Please pick up your gift from the deliveryman in any Poké Mart.")) { sprite.update }
trainer.mystery_gifts.push(gift) trainer.mystery_gifts.push(gift)
pending.delete_at(command) pending.delete_at(command)
@@ -408,14 +408,14 @@ def pbReceiveMysteryGift(id)
itm = GameData::Item.get(item) itm = GameData::Item.get(item)
itemname = (qty > 1) ? itm.portion_name_plural : itm.portion_name itemname = (qty > 1) ? itm.portion_name_plural : itm.portion_name
if itm.is_machine? # TM or HM if itm.is_machine? # TM or HM
pbMessage(_INTL("\\me[Item get]You obtained \\c[1]{1} {2}\\c[0]!\\wtnp[30]", itemname, pbMessage("\\me[Item get]" + _INTL("You obtained \\c[1]{1} {2}\\c[0]!", itemname,
GameData::Move.get(itm.move).name)) GameData::Move.get(itm.move).name) + "\\wtnp[30]")
elsif qty > 1 elsif qty > 1
pbMessage(_INTL("\\me[Item get]You obtained {1} \\c[1]{2}\\c[0]!\\wtnp[30]", qty, itemname)) pbMessage("\\me[Item get]" + _INTL("You obtained {1} \\c[1]{2}\\c[0]!", qty, itemname) + "\\wtnp[30]")
elsif itemname.starts_with_vowel? elsif itemname.starts_with_vowel?
pbMessage(_INTL("\\me[Item get]You obtained an \\c[1]{1}\\c[0]!\\wtnp[30]", itemname)) pbMessage("\\me[Item get]" + _INTL("You obtained an \\c[1]{1}\\c[0]!", itemname) + "\\wtnp[30]")
else else
pbMessage(_INTL("\\me[Item get]You obtained a \\c[1]{1}\\c[0]!\\wtnp[30]", itemname)) pbMessage("\\me[Item get]" + _INTL("You obtained a \\c[1]{1}\\c[0]!", itemname) + "\\wtnp[30]")
end end
$player.mystery_gifts[index] = [id] $player.mystery_gifts[index] = [id]
return true return true

View File

@@ -1126,7 +1126,7 @@ def pbBuyTriads
$PokemonGlobal.triads.add(item, quantity) $PokemonGlobal.triads.add(item, quantity)
$player.money -= price $player.money -= price
goldwindow.text = _INTL("Money:\r\n{1}", pbGetGoldString) goldwindow.text = _INTL("Money:\r\n{1}", pbGetGoldString)
pbMessage(_INTL("Here you are! Thank you!\\se[Mart buy item]")) pbMessage(_INTL("Here you are! Thank you!") + "\\se[Mart buy item]")
end end
end end
cmdwindow.dispose cmdwindow.dispose
@@ -1220,7 +1220,7 @@ def pbSellTriads
$player.money += price $player.money += price
goldwindow.text = _INTL("Money:\r\n{1}", pbGetGoldString) goldwindow.text = _INTL("Money:\r\n{1}", pbGetGoldString)
$PokemonGlobal.triads.remove(item, quantity) $PokemonGlobal.triads.remove(item, quantity)
pbMessage(_INTL("Turned over the {1} card and received ${2}.\\se[Mart buy item]", itemname, price.to_s_formatted)) pbMessage(_INTL("Turned over the {1} card and received ${2}.", itemname, price.to_s_formatted) + "\\se[Mart buy item]")
commands = [] commands = []
$PokemonGlobal.triads.length.times do |i| $PokemonGlobal.triads.length.times do |i|
item = $PokemonGlobal.triads[i] item = $PokemonGlobal.triads[i]

View File

@@ -111,8 +111,8 @@ class VoltorbFlip
pbMessage(_INTL("You've gathered {1} Coins. You cannot gather any more.", Settings::MAX_COINS.to_s_formatted)) pbMessage(_INTL("You've gathered {1} Coins. You cannot gather any more.", Settings::MAX_COINS.to_s_formatted))
$player.coins = Settings::MAX_COINS # As a precaution $player.coins = Settings::MAX_COINS # As a precaution
@quit = true @quit = true
# elsif !pbConfirmMessage(_INTL("Play Voltorb Flip Lv. {1}?",@level)) && $player.coins<Settings::MAX_COINS # elsif !pbConfirmMessage(_INTL("Play Voltorb Flip Lv. {1}?", @level)) && $player.coins < Settings::MAX_COINS
# @quit=true # @quit = true
else else
@sprites["curtain"].opacity = 0 @sprites["curtain"].opacity = 0
# Erase 0s to prepare to replace with values # Erase 0s to prepare to replace with values

View File

@@ -93,7 +93,7 @@ EventHandlers.add(:on_player_step_taken_can_transfer, :safari_game_counter,
next if Settings::SAFARI_STEPS == 0 || !pbInSafari? || pbSafariState.decision != 0 next if Settings::SAFARI_STEPS == 0 || !pbInSafari? || pbSafariState.decision != 0
pbSafariState.steps -= 1 pbSafariState.steps -= 1
next if pbSafariState.steps > 0 next if pbSafariState.steps > 0
pbMessage(_INTL("PA: Ding-dong!\1")) pbMessage(_INTL("PA: Ding-dong!") + "\1")
pbMessage(_INTL("PA: Your safari game is over!")) pbMessage(_INTL("PA: Your safari game is over!"))
pbSafariState.decision = 1 pbSafariState.decision = 1
pbSafariState.pbGoToStart pbSafariState.pbGoToStart

View File

@@ -16,7 +16,7 @@ end
def pbStorePokemon(pkmn) def pbStorePokemon(pkmn)
if pbBoxesFull? if pbBoxesFull?
pbMessage(_INTL("There's no more room for Pokémon!\1")) pbMessage(_INTL("There's no more room for Pokémon!") + "\1")
pbMessage(_INTL("The Pokémon Boxes are full and can't accept any more!")) pbMessage(_INTL("The Pokémon Boxes are full and can't accept any more!"))
return return
end end
@@ -32,7 +32,7 @@ end
def pbNicknameAndStore(pkmn) def pbNicknameAndStore(pkmn)
if pbBoxesFull? if pbBoxesFull?
pbMessage(_INTL("There's no more room for Pokémon!\1")) pbMessage(_INTL("There's no more room for Pokémon!") + "\1")
pbMessage(_INTL("The Pokémon Boxes are full and can't accept any more!")) pbMessage(_INTL("The Pokémon Boxes are full and can't accept any more!"))
return return
end end
@@ -48,13 +48,13 @@ end
def pbAddPokemon(pkmn, level = 1, see_form = true) def pbAddPokemon(pkmn, level = 1, see_form = true)
return false if !pkmn return false if !pkmn
if pbBoxesFull? if pbBoxesFull?
pbMessage(_INTL("There's no more room for Pokémon!\1")) pbMessage(_INTL("There's no more room for Pokémon!") + "\1")
pbMessage(_INTL("The Pokémon Boxes are full and can't accept any more!")) pbMessage(_INTL("The Pokémon Boxes are full and can't accept any more!"))
return false return false
end end
pkmn = Pokemon.new(pkmn, level) if !pkmn.is_a?(Pokemon) pkmn = Pokemon.new(pkmn, level) if !pkmn.is_a?(Pokemon)
species_name = pkmn.speciesName species_name = pkmn.speciesName
pbMessage(_INTL("{1} obtained {2}!\\me[Pkmn get]\\wtnp[80]\1", $player.name, species_name)) pbMessage(_INTL("{1} obtained {2}!", $player.name, species_name) + "\\me[Pkmn get]\\wtnp[80]")
was_owned = $player.owned?(pkmn.species) was_owned = $player.owned?(pkmn.species)
$player.pokedex.set_seen(pkmn.species) $player.pokedex.set_seen(pkmn.species)
$player.pokedex.set_owned(pkmn.species) $player.pokedex.set_owned(pkmn.species)
@@ -96,7 +96,7 @@ def pbAddToParty(pkmn, level = 1, see_form = true)
return false if !pkmn || $player.party_full? return false if !pkmn || $player.party_full?
pkmn = Pokemon.new(pkmn, level) if !pkmn.is_a?(Pokemon) pkmn = Pokemon.new(pkmn, level) if !pkmn.is_a?(Pokemon)
species_name = pkmn.speciesName species_name = pkmn.speciesName
pbMessage(_INTL("{1} obtained {2}!\\me[Pkmn get]\\wtnp[80]\1", $player.name, species_name)) pbMessage(_INTL("{1} obtained {2}!", $player.name, species_name) + "\\me[Pkmn get]\\wtnp[80]")
was_owned = $player.owned?(pkmn.species) was_owned = $player.owned?(pkmn.species)
$player.pokedex.set_seen(pkmn.species) $player.pokedex.set_seen(pkmn.species)
$player.pokedex.set_owned(pkmn.species) $player.pokedex.set_owned(pkmn.species)
@@ -133,9 +133,9 @@ def pbAddForeignPokemon(pkmn, level = 1, owner_name = nil, nickname = nil, owner
pkmn.name = nickname[0, Pokemon::MAX_NAME_SIZE] if !nil_or_empty?(nickname) pkmn.name = nickname[0, Pokemon::MAX_NAME_SIZE] if !nil_or_empty?(nickname)
pkmn.calc_stats pkmn.calc_stats
if owner_name if owner_name
pbMessage(_INTL("\\me[Pkmn get]{1} received a Pokémon from {2}.\1", $player.name, owner_name)) pbMessage(_INTL("{1} received a Pokémon from {2}.", $player.name, owner_name) + "\\me[Pkmn get]\\wtnp[80]")
else else
pbMessage(_INTL("\\me[Pkmn get]{1} received a Pokémon.\1", $player.name)) pbMessage(_INTL("{1} received a Pokémon.", $player.name) + "\\me[Pkmn get]\\wtnp[80]")
end end
was_owned = $player.owned?(pkmn.species) was_owned = $player.owned?(pkmn.species)
$player.pokedex.set_seen(pkmn.species) $player.pokedex.set_seen(pkmn.species)

View File

@@ -1180,18 +1180,6 @@ MenuHandlers.add(:debug_menu, :rename_files, {
} }
}) })
MenuHandlers.add(:debug_menu, :collate_script_and_event_text, {
"name" => _INTL("Collate Script/Event Texts For Translation"),
"parent" => :files_menu,
"description" => _INTL("Find translatable text in scripts/map events. Do this before extracting text."),
"effect" => proc {
Translator.gather_script_and_event_texts
MessageTypes.save_default_messages
MessageTypes.load_default_messages if safeExists?("Data/messages_core.dat")
pbMessage(_INTL("Translatable text gathered from scripts and map events and saved in data files."))
}
})
MenuHandlers.add(:debug_menu, :extract_text, { MenuHandlers.add(:debug_menu, :extract_text, {
"name" => _INTL("Extract Text For Translation"), "name" => _INTL("Extract Text For Translation"),
"parent" => :files_menu, "parent" => :files_menu,

View File

@@ -467,14 +467,14 @@ MenuHandlers.add(:battle_debug_menu, :position_effects, {
if battler && !battler.fainted? if battler && !battler.fainted?
text = "[#{i}] #{battler.name}" text = "[#{i}] #{battler.name}"
else else
text = _INTL("[#{i}] (empty)", i) text = "[#{i}] " + _INTL("(empty)")
end end
if battler.pbOwnedByPlayer? if battler.pbOwnedByPlayer?
text += " (yours)" text += " " + _INTL("(yours)")
elsif battle.opposes?(i) elsif battle.opposes?(i)
text += " (opposing)" text += " " + _INTL("(opposing)")
else else
text += " (ally's)" text += " " + _INTL("(ally's)")
end end
cmds.push(text) cmds.push(text)
end end

View File

@@ -1015,6 +1015,11 @@ module Compiler
compile_pbs_files compile_pbs_files
compile_animations compile_animations
compile_trainer_events(mustCompile) compile_trainer_events(mustCompile)
Console.echo_li(_INTL("Saving messages..."))
Translator.gather_script_and_event_texts
MessageTypes.save_default_messages
MessageTypes.load_default_messages if safeExists?("Data/messages_core.dat")
Console.echo_done(true)
Console.echoln_li_done(_INTL("Successfully compiled all game data")) Console.echoln_li_done(_INTL("Successfully compiled all game data"))
end end