Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #===============================================================================
- # RAFAEL_SOL_MAKER's BETTER MOVE SPEED ACE(ALPHA)
- #_______________________________________________________________________________
- # Description | Uses a custom formula for moving speed and dash.
- # | Still far from ready, and wasn't thoughtfully tested.
- # | Use at your own risk!
- #________________|______________________________________________________________
- #===============================================================================
- class Game_Player < Game_Character
- # Some useful configurations
- DEFAULT_MOVE_SPEED = 4
- DASH_INCREMENT = 4
- SPEED_FACTOR = 0.0185
- #--------------------------------------------------------------------------
- # * OVERWRITE: In order to avoid overkill
- #--------------------------------------------------------------------------
- def real_move_speed
- @move_speed + (dash? ? DASH_INCREMENT : 0)
- end
- #--------------------------------------------------------------------------
- # * OVERWRITE: Will provide us the real numbers.
- #--------------------------------------------------------------------------
- def distance_per_frame
- dist = real_move_speed.to_f * SPEED_FACTOR
- dist += (@move_speed > 3) ? (0.025 * (@move_speed.to_f - 3)) : 0.0
- end
- #--------------------------------------------------------------------------
- # * OVERWRITE: Fix the animations for us
- #--------------------------------------------------------------------------
- def update_anime_count
- if @step_anime||(moving? && @walk_anime)
- if @locked_animations.include?(@direction)
- @anime_count = 0
- @pattern = @original_pattern
- return
- end
- if (@walk_anime && @locked_stopped_anims.include?(@direction))
- @anime_count = 0
- @pattern = @original_pattern
- return
- end
- @anime_count += dash? ? 1.5 : 1
- else
- @pattern = @original_pattern
- @anime_count = 0
- end
- end
- #--------------------------------------------------------------------------
- # * OVERWRITE: Fix the animations for us
- #--------------------------------------------------------------------------
- def update_animation
- update_anime_count
- move_speed = @move_speed
- move_speed += dash? ? 1 : 0
- if @anime_count > 18 - move_speed * 2
- update_anime_pattern
- @anime_count = 0
- end
- end
- end
- # That's all, folks!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement