Fixed Database animations' position not moving the animation for exclamations

This commit is contained in:
Maruno17
2024-01-18 23:47:33 +00:00
parent 97a66020ca
commit c78e32db09
7 changed files with 41 additions and 29 deletions

View File

@@ -46,7 +46,9 @@ def pbFishing(hasEncounter, rodType = 1)
break
end
if hasEncounter && rand(100) < biteChance
$scene.spriteset.addUserAnimation(Settings::EXCLAMATION_ANIMATION_ID, $game_player.x, $game_player.y, true, 3)
$game_player.animation_id = Settings::EXCLAMATION_ANIMATION_ID
$game_player.animation_height = 3
$game_player.animation_regular_tone = true
duration = rand(5..10) / 10.0 # 0.5-1 seconds
if !pbWaitForInput(msgWindow, message + "\n" + _INTL("Oh! A bite!"), duration)
pbFishingEnd { pbMessageDisplay(msgWindow, _INTL("The Pokémon got away...")) }

View File

@@ -268,9 +268,9 @@ class BerryPlantSprite
end
if berry_plant.new_mechanics && @old_stage != berry_plant.growth_stage &&
@old_stage > 0 && berry_plant.growth_stage <= GameData::BerryPlant::NUMBER_OF_GROWTH_STAGES + 1
spriteset = $scene.spriteset(@map.map_id)
spriteset&.addUserAnimation(Settings::PLANT_SPARKLE_ANIMATION_ID,
@event.x, @event.y, false, 1)
@event.animation_id = Settings::PLANT_SPARKLE_ANIMATION_ID
@event.animation_height = 1
@event.animation_regular_tone = true
end
end
@old_stage = berry_plant.growth_stage