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

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

View File

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

View File

@@ -360,7 +360,7 @@ def pbBerryPlant
break if !pbConfirmMessage(_INTL("Want to sprinkle some water with the {1}?",
GameData::Item.get(item).name))
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
pbMessage(_INTL("There! All happy!"))
else