Release 6.9.0

This commit is contained in:
chardub
2026-11-02 11:34:46 -05:00
parent 060726298d
commit ae6e2ebc64
5697 changed files with 131795 additions and 17423 deletions
@@ -6,7 +6,11 @@ MOVE_TYPE_AWAY_PLAYER = 4
MOVE_TYPE_CURIOUS = 5
MOVE_TYPE_SHY = 6
class Game_Character
MOVE_TYPE_TOWARDS_TARGET = 7
MOVE_TYPE_AWAY_FROM_TARGET = 8
MOVE_TYPE_SHY_FROM_TARGET = 9
class OverworldPokemonEvent
attr_accessor :notice_icon
# @stop_count : nb frames since last movement
#wait until next frequency frame
@@ -31,30 +35,99 @@ class Game_Character
end
end
# def move_type_shy(next_movement_ready = false)
# if next_movement_ready
# move_type_away_from_player
# turn_toward_player
# end
# end
def move_type_toward_target(target_event, next_movement_ready = true)
return unless next_movement_ready
unless target_event
move_type_random
return
end
dx = (target_event.x - self.x).abs
dy = (target_event.y - self.y).abs
distance = dx + dy
# def move_type_bounce_random(frames_since_last_movement, next_movement_ready = false)
# echoln @stop_count
# if next_movement_ready
# case rand(6)
# when 0..3 then
# turn_random
# jump_forward(1)
# when 4 then
# jump_forward(1)
# when 5 then
# wait
# end
# else
# if @stop_count % 15 == 0
# jump(0, 0, false)
# end
# end
# end
if distance > 1
if rand(10) == 0
move_random
#turnEventTowardsEvent(self,target_event)
else
moveEventTowardsEvent(self, target_event)
end
return
end
if @noticed_pokemon_behavior == :curious
roll = rand(10)
if roll <= 3
turn_random
elsif roll <= 6
turnEventTowardsEvent(self, target_event)
else
wait
end
else
turnEventTowardsEvent(self, target_event)
end
end
def move_type_away_from_target(target_event)
unless target_event
move_type_random
return
end
moveEventAwayFromEvent(self, target_event)
end
def move_type_random
if Settings::EXPERIMENTAL_FEATURES && @idle_animation_sprite && rand(6)==0
play_idle_animation
else
super
end
end
def play_idle_animation
return if @playing_idle_animation
@playing_idle_animation = true
@old_character_name = @character_name
@character_name = @idle_animation_sprite
@stop_count = 0
nb_times = rand(1..3)
echoln nb_times
play_step_animation(nb_times)
end
def update_idle_animation
return unless @playing_idle_animation
total_frames = @step_animation_nb_times * 4
if @playing_idle_animation && @step_anime_once_frame_count >= total_frames
@character_name = @old_character_name
@playing_idle_animation = false
end
end
def update_notice_icon
if @current_state == :NOTICED_PLAYER && @opacity > 0 && !@notice_icon_hidden
if !@notice_icon || @notice_icon.disposed?
@notice_icon = OverworldNoticeIcon.new(self, @behavior_noticed)
end
@notice_icon.update
else
dispose_notice_icon
end
end
def hide_notice_icon
@notice_icon_hidden = true
dispose_notice_icon
end
def show_notice_icon
@notice_icon_hidden = false
end
def dispose_notice_icon
@notice_icon.dispose if @notice_icon && !@notice_icon.disposed?
@notice_icon = nil
end
end