cut/rock smash animations + sprite resize in summary

This commit is contained in:
infinitefusion
2021-10-11 14:54:08 -04:00
parent cd2e3cd04c
commit ce8ce1f934
40 changed files with 16 additions and 2 deletions

View File

@@ -348,6 +348,9 @@ module Settings
# is on the map (for new plant growth mechanics only).
PLANT_SPARKLE_ANIMATION_ID = 7
CUT_TREE_ANIMATION_ID =19
ROCK_SMASH_ANIMATION_ID =20
#=============================================================================
# An array of available languages in the game, and their corresponding message

View File

@@ -294,7 +294,10 @@ class Interpreter
# it can stay erased when the game is saved then loaded again.
def pbEraseThisEvent
if $game_map.events[@event_id]
$game_map.events[@event_id].erase
if $game_map.events[@event_id].name[/cuttree/i]
pbSmashThisEvent()
end
$game_map.events[@event_id].erase
$PokemonMap.addErasedEvent(@event_id) if $PokemonMap
end
@index += 1

View File

@@ -122,7 +122,9 @@ class Game_Player < Game_Character
# Check the tile in front of the player for events
new_x = @x + (@direction == 6 ? 1 : @direction == 4 ? -1 : 0)
new_y = @y + (@direction == 2 ? 1 : @direction == 8 ? -1 : 0)
return nil if !$game_map.valid?(new_x, new_y)
for event in $game_map.events.values
next if !event.at_coordinate?(new_x, new_y)
next if event.jumping? || event.over_trigger?

View File

@@ -230,8 +230,10 @@ def pbSmashEvent(event)
return if !event
if event.name[/cuttree/i]
pbSEPlay("Cut", 80)
$scene.spriteset.addUserAnimation(Settings::CUT_TREE_ANIMATION_ID,event.x,event.y,false,1)
elsif event.name[/smashrock/i]
pbSEPlay("Rock Smash", 80)
$scene.spriteset.addUserAnimation(Settings::ROCK_SMASH_ANIMATION_ID,event.x,event.y,false,1)
end
pbMoveRoute(event, [
PBMoveRoute::Wait, 2,
@@ -620,6 +622,8 @@ def pbRockSmash
speciesname = (movefinder) ? movefinder.name : $Trainer.name
pbMessage(_INTL("{1} used {2}!", speciesname, GameData::Move.get(move).name))
pbHiddenMoveAnimation(movefinder)
facingEvent = $game_player.pbFacingEvent(true)
$scene.spriteset.addUserAnimation(Settings::ROCK_SMASH_ANIMATION_ID,facingEvent.x,facingEvent.y,false)
return true
end
return false

View File

@@ -122,6 +122,8 @@ class PokemonSummary_Scene
@sprites["pokemon"].setOffset(PictureOrigin::Center)
@sprites["pokemon"].x = 104
@sprites["pokemon"].y = 206
@sprites["pokemon"].zoom_x = Settings::FRONTSPRITE_SCALE
@sprites["pokemon"].zoom_y = Settings::FRONTSPRITE_SCALE
@sprites["pokemon"].setPokemonBitmap(@pokemon)
@sprites["pokeicon"] = PokemonIconSprite.new(@pokemon,@viewport)
@sprites["pokeicon"].setOffset(PictureOrigin::Center)