Added more sound effects

This commit is contained in:
Maruno17
2023-07-29 20:08:31 +01:00
parent 1c860a5544
commit 9a42b533f1
21 changed files with 149 additions and 103 deletions

View File

@@ -381,7 +381,7 @@ class Interpreter
end end
# Used in boulder events. Allows an event to be pushed. # Used in boulder events. Allows an event to be pushed.
def pbPushThisEvent def pbPushThisEvent(strength = false)
event = get_self event = get_self
old_x = event.x old_x = event.x
old_y = event.y old_y = event.y
@@ -397,6 +397,7 @@ class Interpreter
end end
$PokemonMap&.addMovedEvent(@event_id) $PokemonMap&.addMovedEvent(@event_id)
if old_x != event.x || old_y != event.y if old_x != event.x || old_y != event.y
pbSEPlay("Strength push") if strength
$game_player.lock $game_player.lock
loop do loop do
Graphics.update Graphics.update
@@ -409,7 +410,7 @@ class Interpreter
end end
def pbPushThisBoulder def pbPushThisBoulder
pbPushThisEvent if $PokemonMap.strengthUsed pbPushThisEvent(true) if $PokemonMap.strengthUsed
return true return true
end end

View File

@@ -601,7 +601,8 @@ def pbMountBike
$stats.cycle_count += 1 $stats.cycle_count += 1
pbUpdateVehicle pbUpdateVehicle
bike_bgm = GameData::Metadata.get.bicycle_BGM bike_bgm = GameData::Metadata.get.bicycle_BGM
pbCueBGM(bike_bgm, 0.5) if bike_bgm pbCueBGM(bike_bgm, 0.4) if bike_bgm
pbSEPlay("Bicycle")
pbPokeRadarCancel pbPokeRadarCancel
end end

View File

@@ -214,7 +214,7 @@ class Battle
pkmn.calc_stats pkmn.calc_stats
battler&.pbUpdate(false) battler&.pbUpdate(false)
@scene.pbRefreshOne(battler.index) if battler @scene.pbRefreshOne(battler.index) if battler
pbDisplayPaused(_INTL("{1} grew to Lv. {2}!", pkmn.name, curLevel)) pbDisplayPaused(_INTL("{1} grew to Lv. {2}!", pkmn.name, curLevel)) { pbSEPlay("Pkmn level up") }
@scene.pbLevelUp(pkmn, battler, oldTotalHP, oldAttack, oldDefense, @scene.pbLevelUp(pkmn, battler, oldTotalHP, oldAttack, oldDefense,
oldSpAtk, oldSpDef, oldSpeed) oldSpAtk, oldSpDef, oldSpeed)
# Learn all moves learned at this level # Learn all moves learned at this level

View File

@@ -227,6 +227,7 @@ class Battle::Scene::Animation::AbilitySplashAppear < Battle::Scene::Animation
return if !@sprites["abilityBar_#{@side}"] return if !@sprites["abilityBar_#{@side}"]
bar = addSprite(@sprites["abilityBar_#{@side}"]) bar = addSprite(@sprites["abilityBar_#{@side}"])
bar.setVisible(0, true) bar.setVisible(0, true)
bar.setSE(0, "Battle ability")
dir = (@side == 0) ? 1 : -1 dir = (@side == 0) ? 1 : -1
bar.moveDelta(0, 8, dir * Graphics.width / 2, 0) bar.moveDelta(0, 8, dir * Graphics.width / 2, 0)
end end
@@ -700,7 +701,11 @@ class Battle::Scene::Animation::PokeballThrowCapture < Battle::Scene::Animation
end end
delay = ball.totalDuration # 0 or 7 delay = ball.totalDuration # 0 or 7
# Poké Ball arc animation # Poké Ball arc animation
ball.setSE(delay, "Battle throw") if @critCapture
ball.setSE(delay, "Battle critical catch throw")
else
ball.setSE(delay, "Battle throw")
end
createBallTrajectory(ball, delay, 16, createBallTrajectory(ball, delay, 16,
ballStartX, ballStartY, ballMidX, ballMidY, ballEndX, ballEndY) ballStartX, ballStartY, ballMidX, ballMidY, ballEndX, ballEndY)
ball.setZ(9, batSprite.z + 1) ball.setZ(9, batSprite.z + 1)

View File

@@ -472,6 +472,7 @@ class SafariBattle
# End of round # End of round
if @decision == 0 if @decision == 0
if @ballCount <= 0 if @ballCount <= 0
pbSEPlay("Safari Zone end")
pbDisplay(_INTL("PA: You have no Safari Balls left! Game over!")) pbDisplay(_INTL("PA: You have no Safari Balls left! Game over!"))
@decision = 2 @decision = 2
elsif pbRandom(100) < 5 * escapeFactor elsif pbRandom(100) < 5 * escapeFactor

View File

@@ -90,6 +90,7 @@ EventHandlers.add(:on_player_step_taken_can_transfer, :poison_party,
$player.able_party.each do |pkmn| $player.able_party.each do |pkmn|
next if pkmn.status != :POISON || pkmn.hasAbility?(:IMMUNITY) next if pkmn.status != :POISON || pkmn.hasAbility?(:IMMUNITY)
if !flashed if !flashed
pbSEPlay("Poison step")
pbFlash(Color.new(255, 0, 0, 128), 8) pbFlash(Color.new(255, 0, 0, 128), 8)
flashed = true flashed = true
end end
@@ -673,21 +674,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("\\me[#{meName}]" + _INTL("You found \\c[1]{1}\\c[0]!", itemname) + "\\wtnp[30]") pbMessage("\\me[#{meName}]" + _INTL("You found \\c[1]{1}\\c[0]!", itemname) + "\\wtnp[40]")
elsif item.is_machine? # TM or HM elsif item.is_machine? # TM or HM
if quantity > 1 if quantity > 1
pbMessage("\\me[#{meName}]" + _INTL("You found {1} \\c[1]{2} {3}\\c[0]!", pbMessage("\\me[Machine get]" + _INTL("You found {1} \\c[1]{2} {3}\\c[0]!",
quantity, itemname, GameData::Move.get(move).name) + "\\wtnp[30]") quantity, itemname, GameData::Move.get(move).name) + "\\wtnp[70]")
else else
pbMessage("\\me[#{meName}]" + _INTL("You found \\c[1]{1} {2}\\c[0]!", pbMessage("\\me[Machine get]" + _INTL("You found \\c[1]{1} {2}\\c[0]!",
itemname, GameData::Move.get(move).name) + "\\wtnp[30]") itemname, GameData::Move.get(move).name) + "\\wtnp[70]")
end end
elsif quantity > 1 elsif quantity > 1
pbMessage("\\me[#{meName}]" + _INTL("You found {1} \\c[1]{2}\\c[0]!", quantity, itemname) + "\\wtnp[30]") pbMessage("\\me[#{meName}]" + _INTL("You found {1} \\c[1]{2}\\c[0]!", quantity, itemname) + "\\wtnp[40]")
elsif itemname.starts_with_vowel? elsif itemname.starts_with_vowel?
pbMessage("\\me[#{meName}]" + _INTL("You found an \\c[1]{1}\\c[0]!", itemname) + "\\wtnp[30]") pbMessage("\\me[#{meName}]" + _INTL("You found an \\c[1]{1}\\c[0]!", itemname) + "\\wtnp[40]")
else else
pbMessage("\\me[#{meName}]" + _INTL("You found a \\c[1]{1}\\c[0]!", itemname) + "\\wtnp[30]") pbMessage("\\me[#{meName}]" + _INTL("You found a \\c[1]{1}\\c[0]!", itemname) + "\\wtnp[40]")
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]))
@@ -696,16 +697,16 @@ def pbItemBall(item, quantity = 1)
# Can't add the item # Can't add the item
if item.is_machine? # TM or HM if item.is_machine? # TM or HM
if quantity > 1 if quantity > 1
pbMessage(_INTL("You found {1} \\c[1]{2} {3}\\c[0]!", quantity, itemname, GameData::Move.get(move).name) + "\\wtnp[30]") pbMessage(_INTL("You found {1} \\c[1]{2} {3}\\c[0]!", quantity, itemname, GameData::Move.get(move).name))
else else
pbMessage(_INTL("You found \\c[1]{1} {2}\\c[0]!", itemname, GameData::Move.get(move).name) + "\\wtnp[30]") pbMessage(_INTL("You found \\c[1]{1} {2}\\c[0]!", itemname, GameData::Move.get(move).name))
end end
elsif quantity > 1 elsif quantity > 1
pbMessage(_INTL("You found {1} \\c[1]{2}\\c[0]!", quantity, itemname) + "\\wtnp[30]") pbMessage(_INTL("You found {1} \\c[1]{2}\\c[0]!", quantity, itemname))
elsif itemname.starts_with_vowel? elsif itemname.starts_with_vowel?
pbMessage(_INTL("You found an \\c[1]{1}\\c[0]!", itemname) + "\\wtnp[30]") pbMessage(_INTL("You found an \\c[1]{1}\\c[0]!", itemname))
else else
pbMessage(_INTL("You found a \\c[1]{1}\\c[0]!", itemname) + "\\wtnp[30]") pbMessage(_INTL("You found a \\c[1]{1}\\c[0]!", itemname))
end end
pbMessage(_INTL("But your Bag is full...")) pbMessage(_INTL("But your Bag is full..."))
return false return false
@@ -722,21 +723,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("\\me[#{meName}]" + _INTL("You obtained \\c[1]{1}\\c[0]!", itemname) + "\\wtnp[30]") pbMessage("\\me[#{meName}]" + _INTL("You obtained \\c[1]{1}\\c[0]!", itemname) + "\\wtnp[40]")
elsif item.is_machine? # TM or HM elsif item.is_machine? # TM or HM
if quantity > 1 if quantity > 1
pbMessage("\\me[#{meName}]" + _INTL("You obtained {1} \\c[1]{2} {3}\\c[0]!", pbMessage("\\me[Machine get]" + _INTL("You obtained {1} \\c[1]{2} {3}\\c[0]!",
quantity, itemname, GameData::Move.get(move).name) + "\\wtnp[30]") quantity, itemname, GameData::Move.get(move).name) + "\\wtnp[70]")
else else
pbMessage("\\me[#{meName}]" + _INTL("You obtained \\c[1]{1} {2}\\c[0]!", pbMessage("\\me[Machine get]" + _INTL("You obtained \\c[1]{1} {2}\\c[0]!",
itemname, GameData::Move.get(move).name) + "\\wtnp[30]") itemname, GameData::Move.get(move).name) + "\\wtnp[70]")
end end
elsif quantity > 1 elsif quantity > 1
pbMessage("\\me[#{meName}]" + _INTL("You obtained {1} \\c[1]{2}\\c[0]!", quantity, itemname) + "\\wtnp[30]") pbMessage("\\me[#{meName}]" + _INTL("You obtained {1} \\c[1]{2}\\c[0]!", quantity, itemname) + "\\wtnp[40]")
elsif itemname.starts_with_vowel? elsif itemname.starts_with_vowel?
pbMessage("\\me[#{meName}]" + _INTL("You obtained an \\c[1]{1}\\c[0]!", itemname) + "\\wtnp[30]") pbMessage("\\me[#{meName}]" + _INTL("You obtained an \\c[1]{1}\\c[0]!", itemname) + "\\wtnp[40]")
else else
pbMessage("\\me[#{meName}]" + _INTL("You obtained a \\c[1]{1}\\c[0]!", itemname) + "\\wtnp[30]") pbMessage("\\me[#{meName}]" + _INTL("You obtained a \\c[1]{1}\\c[0]!", itemname) + "\\wtnp[40]")
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.",

View File

@@ -213,9 +213,9 @@ HiddenMoveHandlers::UseMove.add(:CUT, proc { |move, pokemon|
def pbSmashEvent(event) def pbSmashEvent(event)
return if !event return if !event
if event.name[/cuttree/i] if event.name[/cuttree/i]
pbSEPlay("Cut", 80) pbSEPlay("Cut")
elsif event.name[/smashrock/i] elsif event.name[/smashrock/i]
pbSEPlay("Rock Smash", 80) pbSEPlay("Rock Smash")
end end
pbMoveRoute(event, [PBMoveRoute::WAIT, 2, pbMoveRoute(event, [PBMoveRoute::WAIT, 2,
PBMoveRoute::TURN_LEFT, PBMoveRoute::WAIT, 2, PBMoveRoute::TURN_LEFT, PBMoveRoute::WAIT, 2,
@@ -516,6 +516,8 @@ HiddenMoveHandlers::UseMove.add(:FLY, proc { |move, pkmn|
# Headbutt # Headbutt
#=============================================================================== #===============================================================================
def pbHeadbuttEffect(event = nil) def pbHeadbuttEffect(event = nil)
pbSEPlay("Headbutt")
pbWait(1.0)
event = $game_player.pbFacingEvent(true) if !event event = $game_player.pbFacingEvent(true) if !event
a = (event.x + (event.x / 24).floor + 1) * (event.y + (event.y / 24).floor + 1) a = (event.x + (event.x / 24).floor + 1) * (event.y + (event.y / 24).floor + 1)
a = (a * 2 / 5) % 10 # Even 2x as likely as odd, 0 is 1.5x as likely as odd a = (a * 2 / 5) % 10 # Even 2x as likely as odd, 0 is 1.5x as likely as odd
@@ -797,8 +799,9 @@ def pbSweetScent
viewport.color.green = 32 viewport.color.green = 32
viewport.color.blue = 32 viewport.color.blue = 32
viewport.color.alpha -= 10 viewport.color.alpha -= 10
pbSEPlay("Sweet Scent")
start_alpha = viewport.color.alpha start_alpha = viewport.color.alpha
duration = 1.1 duration = 2.0
fade_time = 0.4 fade_time = 0.4
pbWait(duration) do |delta_t| pbWait(duration) do |delta_t|
if delta_t < duration / 2 if delta_t < duration / 2
@@ -808,6 +811,7 @@ def pbSweetScent
end end
end end
viewport.dispose viewport.dispose
pbSEStop(0.5)
enctype = $PokemonEncounters.encounter_type enctype = $PokemonEncounters.encounter_type
if !enctype || !$PokemonEncounters.encounter_possible_here? || if !enctype || !$PokemonEncounters.encounter_possible_here? ||
!pbEncounter(enctype, false) !pbEncounter(enctype, false)

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.", $player.name) + "\\wtnp[40]") pbMessage("\\se[Water berry plant]" + _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

View File

@@ -317,6 +317,7 @@ def pbGainExpFromExpCandy(pkmn, base_amt, qty, scene)
scene.pbDisplay(_INTL("It won't have any effect.")) scene.pbDisplay(_INTL("It won't have any effect."))
return false return false
end end
pbSEPlay("Pkmn level up")
scene.scene.pbSetHelpText("") if scene.is_a?(PokemonPartyScreen) scene.scene.pbSetHelpText("") if scene.is_a?(PokemonPartyScreen)
if qty > 1 if qty > 1
(qty - 1).times { pkmn.changeHappiness("vitamin") } (qty - 1).times { pkmn.changeHappiness("vitamin") }
@@ -342,6 +343,7 @@ def pbHPItem(pkmn, restoreHP, scene)
scene.pbDisplay(_INTL("It won't have any effect.")) scene.pbDisplay(_INTL("It won't have any effect."))
return false return false
end end
pbSEPlay("Use item in party")
hpGain = pbItemRestoreHP(pkmn, restoreHP) hpGain = pbItemRestoreHP(pkmn, restoreHP)
scene.pbRefresh scene.pbRefresh
scene.pbDisplay(_INTL("{1}'s HP was restored by {2} points.", pkmn.name, hpGain)) scene.pbDisplay(_INTL("{1}'s HP was restored by {2} points.", pkmn.name, hpGain))
@@ -434,6 +436,7 @@ def pbUseEVRaisingItem(stat, amt_per_use, qty, pkmn, happiness_type, scene, no_e
scene.pbDisplay(_INTL("It won't have any effect.")) scene.pbDisplay(_INTL("It won't have any effect."))
return false return false
end end
pbSEPlay("Use item in party")
scene.pbRefresh scene.pbRefresh
scene.pbDisplay(_INTL("{1}'s {2} increased.", pkmn.name, GameData::Stat.get(stat).name)) scene.pbDisplay(_INTL("{1}'s {2} increased.", pkmn.name, GameData::Stat.get(stat).name))
return true return true

View File

@@ -125,6 +125,7 @@ def pbRepel(item, steps)
pbMessage(_INTL("But a repellent's effect still lingers from earlier.")) pbMessage(_INTL("But a repellent's effect still lingers from earlier."))
return false return false
end end
pbSEPlay("Repel")
$stats.repel_count += 1 $stats.repel_count += 1
pbUseItemMessage(item) pbUseItemMessage(item)
$PokemonGlobal.repel = steps $PokemonGlobal.repel = steps
@@ -244,6 +245,7 @@ ItemHandlers::UseInField.add(:SACREDASH, proc { |item|
scene = PokemonParty_Scene.new scene = PokemonParty_Scene.new
screen = PokemonPartyScreen.new(scene, $player.party) screen = PokemonPartyScreen.new(scene, $player.party)
screen.pbStartScene(_INTL("Using item..."), false) screen.pbStartScene(_INTL("Using item..."), false)
pbSEPlay("Use item in party")
$player.party.each_with_index do |pkmn, i| $player.party.each_with_index do |pkmn, i|
next if !pkmn.fainted? next if !pkmn.fainted?
revived += 1 revived += 1
@@ -315,36 +317,37 @@ ItemHandlers::UseInField.add(:SUPERROD, proc { |item|
ItemHandlers::UseInField.add(:ITEMFINDER, proc { |item| ItemHandlers::UseInField.add(:ITEMFINDER, proc { |item|
$stats.itemfinder_count += 1 $stats.itemfinder_count += 1
pbSEPlay("Itemfinder")
event = pbClosestHiddenItem event = pbClosestHiddenItem
if event if !event
offsetX = event.x - $game_player.x
offsetY = event.y - $game_player.y
if offsetX == 0 && offsetY == 0 # Standing on the item, spin around
4.times do
pbWait(0.2)
$game_player.turn_right_90
end
pbWait(0.3)
pbMessage(_INTL("The {1}'s indicating something right underfoot!", GameData::Item.get(item).name))
else # Item is nearby, face towards it
direction = $game_player.direction
if offsetX.abs > offsetY.abs
direction = (offsetX < 0) ? 4 : 6
else
direction = (offsetY < 0) ? 8 : 2
end
case direction
when 2 then $game_player.turn_down
when 4 then $game_player.turn_left
when 6 then $game_player.turn_right
when 8 then $game_player.turn_up
end
pbWait(0.3)
pbMessage(_INTL("Huh? The {1}'s responding!", GameData::Item.get(item).name) + "\1")
pbMessage(_INTL("There's an item buried around here!"))
end
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."))
next true
end
offsetX = event.x - $game_player.x
offsetY = event.y - $game_player.y
if offsetX == 0 && offsetY == 0 # Standing on the item, spin around
4.times do
pbWait(0.2)
$game_player.turn_right_90
end
pbWait(0.3)
pbMessage(_INTL("The {1}'s indicating something right underfoot!", GameData::Item.get(item).name))
else # Item is nearby, face towards it
direction = $game_player.direction
if offsetX.abs > offsetY.abs
direction = (offsetX < 0) ? 4 : 6
else
direction = (offsetY < 0) ? 8 : 2
end
case direction
when 2 then $game_player.turn_down
when 4 then $game_player.turn_left
when 6 then $game_player.turn_right
when 8 then $game_player.turn_up
end
pbWait(0.3)
pbMessage(_INTL("Huh? The {1}'s responding!", GameData::Item.get(item).name) + "\1")
pbMessage(_INTL("There's an item buried around here!"))
end end
next true next true
}) })
@@ -454,6 +457,7 @@ ItemHandlers::UseOnPokemon.add(:AWAKENING, proc { |item, qty, pkmn, scene|
scene.pbDisplay(_INTL("It won't have any effect.")) scene.pbDisplay(_INTL("It won't have any effect."))
next false next false
end end
pbSEPlay("Use item in party")
pkmn.heal_status pkmn.heal_status
scene.pbRefresh scene.pbRefresh
scene.pbDisplay(_INTL("{1} woke up.", pkmn.name)) scene.pbDisplay(_INTL("{1} woke up.", pkmn.name))
@@ -467,6 +471,7 @@ ItemHandlers::UseOnPokemon.add(:ANTIDOTE, proc { |item, qty, pkmn, scene|
scene.pbDisplay(_INTL("It won't have any effect.")) scene.pbDisplay(_INTL("It won't have any effect."))
next false next false
end end
pbSEPlay("Use item in party")
pkmn.heal_status pkmn.heal_status
scene.pbRefresh scene.pbRefresh
scene.pbDisplay(_INTL("{1} was cured of its poisoning.", pkmn.name)) scene.pbDisplay(_INTL("{1} was cured of its poisoning.", pkmn.name))
@@ -480,6 +485,7 @@ ItemHandlers::UseOnPokemon.add(:BURNHEAL, proc { |item, qty, pkmn, scene|
scene.pbDisplay(_INTL("It won't have any effect.")) scene.pbDisplay(_INTL("It won't have any effect."))
next false next false
end end
pbSEPlay("Use item in party")
pkmn.heal_status pkmn.heal_status
scene.pbRefresh scene.pbRefresh
scene.pbDisplay(_INTL("{1}'s burn was healed.", pkmn.name)) scene.pbDisplay(_INTL("{1}'s burn was healed.", pkmn.name))
@@ -493,6 +499,7 @@ ItemHandlers::UseOnPokemon.add(:PARALYZEHEAL, proc { |item, qty, pkmn, scene|
scene.pbDisplay(_INTL("It won't have any effect.")) scene.pbDisplay(_INTL("It won't have any effect."))
next false next false
end end
pbSEPlay("Use item in party")
pkmn.heal_status pkmn.heal_status
scene.pbRefresh scene.pbRefresh
scene.pbDisplay(_INTL("{1} was cured of paralysis.", pkmn.name)) scene.pbDisplay(_INTL("{1} was cured of paralysis.", pkmn.name))
@@ -506,6 +513,7 @@ ItemHandlers::UseOnPokemon.add(:ICEHEAL, proc { |item, qty, pkmn, scene|
scene.pbDisplay(_INTL("It won't have any effect.")) scene.pbDisplay(_INTL("It won't have any effect."))
next false next false
end end
pbSEPlay("Use item in party")
pkmn.heal_status pkmn.heal_status
scene.pbRefresh scene.pbRefresh
scene.pbDisplay(_INTL("{1} was thawed out.", pkmn.name)) scene.pbDisplay(_INTL("{1} was thawed out.", pkmn.name))
@@ -519,6 +527,7 @@ ItemHandlers::UseOnPokemon.add(:FULLHEAL, proc { |item, qty, pkmn, scene|
scene.pbDisplay(_INTL("It won't have any effect.")) scene.pbDisplay(_INTL("It won't have any effect."))
next false next false
end end
pbSEPlay("Use item in party")
pkmn.heal_status pkmn.heal_status
scene.pbRefresh scene.pbRefresh
scene.pbDisplay(_INTL("{1} became healthy.", pkmn.name)) scene.pbDisplay(_INTL("{1} became healthy.", pkmn.name))
@@ -536,6 +545,7 @@ ItemHandlers::UseOnPokemon.add(:FULLRESTORE, proc { |item, qty, pkmn, scene|
scene.pbDisplay(_INTL("It won't have any effect.")) scene.pbDisplay(_INTL("It won't have any effect."))
next false next false
end end
pbSEPlay("Use item in party")
hpgain = pbItemRestoreHP(pkmn, pkmn.totalhp - pkmn.hp) hpgain = pbItemRestoreHP(pkmn, pkmn.totalhp - pkmn.hp)
pkmn.heal_status pkmn.heal_status
scene.pbRefresh scene.pbRefresh
@@ -552,6 +562,7 @@ ItemHandlers::UseOnPokemon.add(:REVIVE, proc { |item, qty, pkmn, scene|
scene.pbDisplay(_INTL("It won't have any effect.")) scene.pbDisplay(_INTL("It won't have any effect."))
next false next false
end end
pbSEPlay("Use item in party")
pkmn.hp = (pkmn.totalhp / 2).floor pkmn.hp = (pkmn.totalhp / 2).floor
pkmn.hp = 1 if pkmn.hp <= 0 pkmn.hp = 1 if pkmn.hp <= 0
pkmn.heal_status pkmn.heal_status
@@ -565,6 +576,7 @@ ItemHandlers::UseOnPokemon.add(:MAXREVIVE, proc { |item, qty, pkmn, scene|
scene.pbDisplay(_INTL("It won't have any effect.")) scene.pbDisplay(_INTL("It won't have any effect."))
next false next false
end end
pbSEPlay("Use item in party")
pkmn.heal_HP pkmn.heal_HP
pkmn.heal_status pkmn.heal_status
scene.pbRefresh scene.pbRefresh
@@ -595,6 +607,7 @@ ItemHandlers::UseOnPokemon.add(:HEALPOWDER, proc { |item, qty, pkmn, scene|
scene.pbDisplay(_INTL("It won't have any effect.")) scene.pbDisplay(_INTL("It won't have any effect."))
next false next false
end end
pbSEPlay("Use item in party")
pkmn.heal_status pkmn.heal_status
pkmn.changeHappiness("powder") pkmn.changeHappiness("powder")
scene.pbRefresh scene.pbRefresh
@@ -607,6 +620,7 @@ ItemHandlers::UseOnPokemon.add(:REVIVALHERB, proc { |item, qty, pkmn, scene|
scene.pbDisplay(_INTL("It won't have any effect.")) scene.pbDisplay(_INTL("It won't have any effect."))
next false next false
end end
pbSEPlay("Use item in party")
pkmn.heal_HP pkmn.heal_HP
pkmn.heal_status pkmn.heal_status
pkmn.changeHappiness("revivalherb") pkmn.changeHappiness("revivalherb")
@@ -622,6 +636,7 @@ ItemHandlers::UseOnPokemon.add(:ETHER, proc { |item, qty, pkmn, scene|
scene.pbDisplay(_INTL("It won't have any effect.")) scene.pbDisplay(_INTL("It won't have any effect."))
next false next false
end end
pbSEPlay("Use item in party")
scene.pbDisplay(_INTL("PP was restored.")) scene.pbDisplay(_INTL("PP was restored."))
next true next true
}) })
@@ -635,6 +650,7 @@ ItemHandlers::UseOnPokemon.add(:MAXETHER, proc { |item, qty, pkmn, scene|
scene.pbDisplay(_INTL("It won't have any effect.")) scene.pbDisplay(_INTL("It won't have any effect."))
next false next false
end end
pbSEPlay("Use item in party")
scene.pbDisplay(_INTL("PP was restored.")) scene.pbDisplay(_INTL("PP was restored."))
next true next true
}) })
@@ -648,6 +664,7 @@ ItemHandlers::UseOnPokemon.add(:ELIXIR, proc { |item, qty, pkmn, scene|
scene.pbDisplay(_INTL("It won't have any effect.")) scene.pbDisplay(_INTL("It won't have any effect."))
next false next false
end end
pbSEPlay("Use item in party")
scene.pbDisplay(_INTL("PP was restored.")) scene.pbDisplay(_INTL("PP was restored."))
next true next true
}) })
@@ -661,38 +678,37 @@ ItemHandlers::UseOnPokemon.add(:MAXELIXIR, proc { |item, qty, pkmn, scene|
scene.pbDisplay(_INTL("It won't have any effect.")) scene.pbDisplay(_INTL("It won't have any effect."))
next false next false
end end
pbSEPlay("Use item in party")
scene.pbDisplay(_INTL("PP was restored.")) scene.pbDisplay(_INTL("PP was restored."))
next true next true
}) })
ItemHandlers::UseOnPokemon.add(:PPUP, proc { |item, qty, pkmn, scene| ItemHandlers::UseOnPokemon.add(:PPUP, proc { |item, qty, pkmn, scene|
move = scene.pbChooseMove(pkmn, _INTL("Boost PP of which move?")) move = scene.pbChooseMove(pkmn, _INTL("Boost PP of which move?"))
if move >= 0 next false if move < 0
if pkmn.moves[move].total_pp <= 1 || pkmn.moves[move].ppup >= 3 if pkmn.moves[move].total_pp <= 1 || pkmn.moves[move].ppup >= 3
scene.pbDisplay(_INTL("It won't have any effect.")) scene.pbDisplay(_INTL("It won't have any effect."))
next false next false
end
pkmn.moves[move].ppup += 1
movename = pkmn.moves[move].name
scene.pbDisplay(_INTL("{1}'s PP increased.", movename))
next true
end end
next false pbSEPlay("Use item in party")
pkmn.moves[move].ppup += 1
movename = pkmn.moves[move].name
scene.pbDisplay(_INTL("{1}'s PP increased.", movename))
next true
}) })
ItemHandlers::UseOnPokemon.add(:PPMAX, proc { |item, qty, pkmn, scene| ItemHandlers::UseOnPokemon.add(:PPMAX, proc { |item, qty, pkmn, scene|
move = scene.pbChooseMove(pkmn, _INTL("Boost PP of which move?")) move = scene.pbChooseMove(pkmn, _INTL("Boost PP of which move?"))
if move >= 0 next false if move < 0
if pkmn.moves[move].total_pp <= 1 || pkmn.moves[move].ppup >= 3 if pkmn.moves[move].total_pp <= 1 || pkmn.moves[move].ppup >= 3
scene.pbDisplay(_INTL("It won't have any effect.")) scene.pbDisplay(_INTL("It won't have any effect."))
next false next false
end
pkmn.moves[move].ppup = 3
movename = pkmn.moves[move].name
scene.pbDisplay(_INTL("{1}'s PP increased.", movename))
next true
end end
next false pbSEPlay("Use item in party")
pkmn.moves[move].ppup = 3
movename = pkmn.moves[move].name
scene.pbDisplay(_INTL("{1}'s PP increased.", movename))
next true
}) })
ItemHandlers::UseOnPokemonMaximum.add(:HPUP, proc { |item, pkmn| ItemHandlers::UseOnPokemonMaximum.add(:HPUP, proc { |item, pkmn|
@@ -925,6 +941,7 @@ ItemHandlers::UseOnPokemon.add(:RARECANDY, proc { |item, qty, pkmn, scene|
next true next true
end end
# Level up # Level up
pbSEPlay("Pkmn level up")
pbChangeLevel(pkmn, pkmn.level + qty, scene) pbChangeLevel(pkmn, pkmn.level + qty, scene)
scene.pbHardRefresh scene.pbHardRefresh
next true next true

View File

@@ -501,6 +501,7 @@ ItemHandlers::BattleUseOnPokemon.add(:REVIVALHERB, proc { |item, pokemon, battle
ItemHandlers::BattleUseOnPokemon.add(:ETHER, proc { |item, pokemon, battler, choices, scene| ItemHandlers::BattleUseOnPokemon.add(:ETHER, proc { |item, pokemon, battler, choices, scene|
idxMove = choices[3] idxMove = choices[3]
pbBattleRestorePP(pokemon, battler, idxMove, 10) pbBattleRestorePP(pokemon, battler, idxMove, 10)
pbSEPlay("Use item in party")
scene.pbDisplay(_INTL("PP was restored.")) scene.pbDisplay(_INTL("PP was restored."))
}) })
@@ -509,6 +510,7 @@ ItemHandlers::BattleUseOnPokemon.copy(:ETHER, :LEPPABERRY)
ItemHandlers::BattleUseOnPokemon.add(:MAXETHER, proc { |item, pokemon, battler, choices, scene| ItemHandlers::BattleUseOnPokemon.add(:MAXETHER, proc { |item, pokemon, battler, choices, scene|
idxMove = choices[3] idxMove = choices[3]
pbBattleRestorePP(pokemon, battler, idxMove, pokemon.moves[idxMove].total_pp) pbBattleRestorePP(pokemon, battler, idxMove, pokemon.moves[idxMove].total_pp)
pbSEPlay("Use item in party")
scene.pbDisplay(_INTL("PP was restored.")) scene.pbDisplay(_INTL("PP was restored."))
}) })
@@ -516,6 +518,7 @@ ItemHandlers::BattleUseOnPokemon.add(:ELIXIR, proc { |item, pokemon, battler, ch
pokemon.moves.length.times do |i| pokemon.moves.length.times do |i|
pbBattleRestorePP(pokemon, battler, i, 10) pbBattleRestorePP(pokemon, battler, i, 10)
end end
pbSEPlay("Use item in party")
scene.pbDisplay(_INTL("PP was restored.")) scene.pbDisplay(_INTL("PP was restored."))
}) })
@@ -523,6 +526,7 @@ ItemHandlers::BattleUseOnPokemon.add(:MAXELIXIR, proc { |item, pokemon, battler,
pokemon.moves.length.times do |i| pokemon.moves.length.times do |i|
pbBattleRestorePP(pokemon, battler, i, pokemon.moves[i].total_pp) pbBattleRestorePP(pokemon, battler, i, pokemon.moves[i].total_pp)
end end
pbSEPlay("Use item in party")
scene.pbDisplay(_INTL("PP was restored.")) scene.pbDisplay(_INTL("PP was restored."))
}) })

View File

@@ -179,7 +179,7 @@ class Phone
else else
contact = $PokemonGlobal.phone.get(false, args[1]) contact = $PokemonGlobal.phone.get(false, args[1])
end end
pbMessage(_INTL("\\me[Register phone]Registered {1} in the Pokégear!", contact.display_name)) pbMessage(_INTL("\\me[Register phone]Registered {1} in the Pokégear!", contact.display_name) + "\\wtnp[60]")
end end
return ret return ret
end end

View File

@@ -144,6 +144,8 @@ class PokemonTrade_Scene
picturePoke.moveColor(delay, 5, Color.new(248, 176, 240, 0)) picturePoke.moveColor(delay, 5, Color.new(248, 176, 240, 0))
cry = GameData::Species.cry_filename_from_pokemon(@pokemon2) cry = GameData::Species.cry_filename_from_pokemon(@pokemon2)
picturePoke.setSE(delay, cry) if cry picturePoke.setSE(delay, cry) if cry
cry_length = (GameData::Species.cry_length(@pokemon2) * 20).ceil
picturePoke.setVisible(delay + cry_length + 4, true) # Time for the cry to play
# Play animation # Play animation
pbRunPictures( pbRunPictures(
[picturePoke, pictureBall], [picturePoke, pictureBall],
@@ -179,12 +181,15 @@ class PokemonTrade_Scene
@pokemon.name, @pokemon.owner.public_id, @pokemon.owner.name) + "\\wtnp[0]") { 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
pbBGMPlay("Evolution")
pbScene1 pbScene1
pbMessageDisplay(@sprites["msgwindow"], pbMessageDisplay(@sprites["msgwindow"],
_INTL("For {1}'s {2},\n{3} sends {4}.", @trader1, speciesname1, @trader2, speciesname2) + "\1") { pbUpdate } _INTL("For {1}'s {2},\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
pbBGMStop
pbMEPlay("Battle capture success")
pbMessageDisplay(@sprites["msgwindow"], pbMessageDisplay(@sprites["msgwindow"],
_ISPRINTF("{1:s}\nID: {2:05d} OT: {3:s}", _ISPRINTF("{1:s}\nID: {2:05d} OT: {3:s}",
@pokemon2.name, @pokemon2.owner.public_id, @pokemon2.owner.name) + "\1") { pbUpdate } @pokemon2.name, @pokemon2.owner.public_id, @pokemon2.owner.name) + "\1") { pbUpdate }

View File

@@ -74,7 +74,7 @@ class PokemonPokedexMenu_Scene
break break
elsif Input.trigger?(Input::USE) elsif Input.trigger?(Input::USE)
ret = @sprites["commands"].index ret = @sprites["commands"].index
(ret == @commands.length - 1) ? pbPlayCloseMenuSE : pbPlayDecisionSE (ret == @commands.length - 1) ? pbPlayCloseMenuSE : pbSEPlay("GUI pokedex open")
break break
end end
end end

View File

@@ -1054,7 +1054,7 @@ class PokemonPokedex_Scene
break break
elsif Input.trigger?(Input::USE) elsif Input.trigger?(Input::USE)
if index == -2 # OK if index == -2 # OK
pbPlayDecisionSE pbSEPlay("GUI pokedex open")
ret = selindex ret = selindex
break break
elsif index == -3 # Cancel elsif index == -3 # Cancel
@@ -1177,7 +1177,7 @@ class PokemonPokedex_Scene
pbPlayCloseMenuSE pbPlayCloseMenuSE
break break
elsif Input.trigger?(Input::USE) elsif Input.trigger?(Input::USE)
pbPlayDecisionSE if index != 9 pbSEPlay("GUI pokedex open") if index != 9
case index case index
when 0 # Choose sort order when 0 # Choose sort order
newparam = pbDexSearchCommands(0, [params[0]], index) newparam = pbDexSearchCommands(0, [params[0]], index)
@@ -1264,21 +1264,20 @@ class PokemonPokedex_Scene
pbRefresh pbRefresh
end end
if Input.trigger?(Input::ACTION) if Input.trigger?(Input::ACTION)
pbPlayDecisionSE pbSEPlay("GUI pokedex open")
@sprites["pokedex"].active = false @sprites["pokedex"].active = false
pbDexSearch pbDexSearch
@sprites["pokedex"].active = true @sprites["pokedex"].active = true
elsif Input.trigger?(Input::BACK) elsif Input.trigger?(Input::BACK)
pbPlayCloseMenuSE
if @searchResults if @searchResults
pbPlayCancelSE
pbCloseSearch pbCloseSearch
else else
pbPlayCloseMenuSE
break break
end end
elsif Input.trigger?(Input::USE) elsif Input.trigger?(Input::USE)
if $player.seen?(@sprites["pokedex"].species) if $player.seen?(@sprites["pokedex"].species)
pbPlayDecisionSE pbSEPlay("GUI pokedex open")
pbDexEntry(@sprites["pokedex"].index) pbDexEntry(@sprites["pokedex"].index)
end end
end end

View File

@@ -498,6 +498,7 @@ class PokemonPokedexInfo_Scene
elsif Input.trigger?(Input::USE) elsif Input.trigger?(Input::USE)
case @page case @page
when 1 # Info when 1 # Info
pbPlayDecisionSE
@show_battled_count = !@show_battled_count @show_battled_count = !@show_battled_count
dorefresh = true dorefresh = true
when 2 # Area when 2 # Area
@@ -562,12 +563,9 @@ class PokemonPokedexInfo_Scene
if Input.trigger?(Input::ACTION) if Input.trigger?(Input::ACTION)
pbSEStop pbSEStop
Pokemon.play_cry(@species, @form) Pokemon.play_cry(@species, @form)
elsif Input.trigger?(Input::BACK) elsif Input.trigger?(Input::BACK) || Input.trigger?(Input::USE)
pbPlayCloseMenuSE pbPlayCloseMenuSE
break break
elsif Input.trigger?(Input::USE)
pbPlayDecisionSE
break
end end
end end
end end

View File

@@ -15,8 +15,8 @@ def pbEmergencySave
end end
end end
if Game.save if Game.save
pbMessage("\\se[]" + _INTL("The game was saved.") + "\\me[GUI save game]\\wtnp[30]") pbMessage("\\se[]" + _INTL("The game was saved.") + "\\me[GUI save game]\\wtnp[20]")
pbMessage("\\se[]" + _INTL("The previous save file has been backed up.") + "\\wtnp[30]") pbMessage("\\se[]" + _INTL("The previous save file has been backed up.") + "\\wtnp[20]")
else else
pbMessage("\\se[]" + _INTL("Save failed.") + "\\wtnp[30]") pbMessage("\\se[]" + _INTL("Save failed.") + "\\wtnp[30]")
end end
@@ -114,7 +114,7 @@ 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.", $player.name) + "\\me[GUI save game]\\wtnp[30]") pbMessage("\\se[]" + _INTL("{1} saved the game.", $player.name) + "\\me[GUI save game]\\wtnp[20]")
ret = true ret = true
else else
pbMessage("\\se[]" + _INTL("Save failed.") + "\\wtnp[30]") pbMessage("\\se[]" + _INTL("Save failed.") + "\\wtnp[30]")

View File

@@ -27,7 +27,7 @@ class PokemonSystem
@screensize = (Settings::SCREEN_SCALE * 2).floor - 1 # 0=half size, 1=full size, 2=full-and-a-half size, 3=double size @screensize = (Settings::SCREEN_SCALE * 2).floor - 1 # 0=half size, 1=full size, 2=full-and-a-half size, 3=double size
@language = 0 # Language (see also Settings::LANGUAGES in script PokemonSystem) @language = 0 # Language (see also Settings::LANGUAGES in script PokemonSystem)
@runstyle = 0 # Default movement speed (0=walk, 1=run) @runstyle = 0 # Default movement speed (0=walk, 1=run)
@bgmvolume = 100 # Volume of background music and ME @bgmvolume = 80 # Volume of background music and ME
@sevolume = 100 # Volume of sound effects @sevolume = 100 # Volume of sound effects
@textinput = 0 # Text input mode (0=cursor, 1=keyboard) @textinput = 0 # Text input mode (0=cursor, 1=keyboard)
end end

View File

@@ -381,7 +381,7 @@ def pbReceiveMysteryGift(id)
gift[2].obtain_map = $game_map&.map_id || 0 gift[2].obtain_map = $game_map&.map_id || 0
was_owned = $player.owned?(gift[2].species) was_owned = $player.owned?(gift[2].species)
if pbAddPokemonSilent(gift[2]) if pbAddPokemonSilent(gift[2])
pbMessage("\\me[Pkmn get]" + _INTL("{1} received {2}!", $player.name, gift[2].name)) pbMessage(_INTL("{1} received {2}!", $player.name, gift[2].name) + "\\me[Pkmn get]\\wtnp[80]")
$player.mystery_gifts[index] = [id] $player.mystery_gifts[index] = [id]
# 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
if Settings::SHOW_NEW_SPECIES_POKEDEX_ENTRY_MORE_OFTEN && !was_owned && if Settings::SHOW_NEW_SPECIES_POKEDEX_ENTRY_MORE_OFTEN && !was_owned &&
@@ -403,15 +403,22 @@ def pbReceiveMysteryGift(id)
$bag.add(item, qty) $bag.add(item, qty)
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 item == :DNASPLICERS
pbMessage("\\me[Item get]" + _INTL("You obtained \\c[1]{1} {2}\\c[0]!", itemname, pbMessage("\\me[Item get]" + _INTL("You obtained \\c[1]{1}\\c[0]!", itemname) + "\\wtnp[40]")
GameData::Move.get(itm.move).name) + "\\wtnp[30]") elsif itm.is_machine? # TM or HM
if qty > 1
pbMessage("\\me[Machine get]" + _INTL("You obtained {1} \\c[1]{2} {3}\\c[0]!",
qty, itemname, GameData::Move.get(itm.move).name) + "\\wtnp[70]")
else
pbMessage("\\me[Machine get]" + _INTL("You obtained \\c[1]{1} {2}\\c[0]!", itemname,
GameData::Move.get(itm.move).name) + "\\wtnp[70]")
end
elsif qty > 1 elsif qty > 1
pbMessage("\\me[Item get]" + _INTL("You obtained {1} \\c[1]{2}\\c[0]!", qty, itemname) + "\\wtnp[30]") pbMessage("\\me[Item get]" + _INTL("You obtained {1} \\c[1]{2}\\c[0]!", qty, itemname) + "\\wtnp[40]")
elsif itemname.starts_with_vowel? elsif itemname.starts_with_vowel?
pbMessage("\\me[Item get]" + _INTL("You obtained an \\c[1]{1}\\c[0]!", itemname) + "\\wtnp[30]") pbMessage("\\me[Item get]" + _INTL("You obtained an \\c[1]{1}\\c[0]!", itemname) + "\\wtnp[40]")
else else
pbMessage("\\me[Item get]" + _INTL("You obtained a \\c[1]{1}\\c[0]!", itemname) + "\\wtnp[30]") pbMessage("\\me[Item get]" + _INTL("You obtained a \\c[1]{1}\\c[0]!", itemname) + "\\wtnp[40]")
end end
$player.mystery_gifts[index] = [id] $player.mystery_gifts[index] = [id]
return true return true

View File

@@ -297,7 +297,7 @@ class VoltorbFlip
@sprites["animation"].bitmap.clear @sprites["animation"].bitmap.clear
end end
# Unskippable text block, parameter 2 = wait time (corresponds to ME length) # Unskippable text block, parameter 2 = wait time (corresponds to ME length)
pbMessage("\\me[Voltorb Flip game over]" + _INTL("Oh no! You get 0 Coins!") + "\\wtnp[50]") pbMessage("\\me[Voltorb Flip game over]" + _INTL("Oh no! You get 0 Coins!") + "\\wtnp[80]")
pbShowAndDispose pbShowAndDispose
@sprites["mark"].bitmap.clear @sprites["mark"].bitmap.clear
if @level > 1 if @level > 1

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("\\se[Safari Zone end]" + _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