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

@@ -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)