Code:
#----- Credits an Xiderowg -----#
class Game_System
attr_accessor :move_speed
alias xas_system_initialize initialize
def initialize
xas_system_initialize
@move_speed = 4
end
end
#===============================================================================
# Game_Player
#===============================================================================
class Game_Player < Game_Character
def hero_dash_graphic?(actor)
if (Input.press?(Input::RIGHT) or Input.press?(Input::LEFT) or
Input.press?(Input::UP) or Input.press?(Input::DOWN))
RPG::Cache.character(actor.character_name.to_s + "_dash", actor.character_hue) rescue return false
end
end
def hero_dash_quarter_graphic?(actor)
if (Input.press?(Input::RIGHT) or Input.press?(Input::LEFT) or
Input.press?(Input::UP) or Input.press?(Input::DOWN))
RPG::Cache.character(actor.character_name.to_s + "_dash_quarter", actor.character_hue) rescue return false
end
end
def hero_quarter_graphic?(actor)
RPG::Cache.character(actor.character_name.to_s + "_quarter", actor.character_hue) rescue return false
end
def update
@actor = $game_party.actors[0]
if @actor != nil
actor = $game_party.actors[0]
if actor.hp <= 0
if XAS_BA::AUTOGAMEOVER == true
$scene = Scene_Gameover.new rescue nil if self.collapse_done
else
$game_switches[XAS_BA::GAMEOVER_SWITCH_ID] = true
$game_map.refresh
end
end
end
last_moving = moving?
unless moving? or $game_system.map_interpreter.running? or
@move_route_forcing or $game_temp.message_window_showing #or
# $game_temp.dodge_time_real > 0
case Input.dir8
when 1
move_left
move_down
when 2
move_down
when 3
move_down
move_right
when 4
move_left
when 6
move_right
when 7
move_up
move_left
when 8
move_up
when 9
move_right
move_up
end
case Input.dir8
when 1
quarter = true
when 2
quarter = false
when 3
quarter = true
when 4
quarter = false
when 6
quarter = false
when 7
quarter = true
when 8
quarter = false
when 9
quarter = true
end
actor = $game_party.actors[0]
@move_speed = $game_system.move_speed
if (quarter != nil and quarter == true) and
hero_quarter_graphic?(actor) #and self.action == nil
@character_name = actor.character_name + "_quarter"
else
@character_name = actor.character_name
end
end
last_real_x = @real_x
last_real_y = @real_y
super
if @real_y > last_real_y and @real_y - $game_map.display_y > CENTER_Y
$game_map.scroll_down(@real_y - last_real_y)
end
if @real_x < last_real_x and @real_x - $game_map.display_x < CENTER_X
$game_map.scroll_left(last_real_x - @real_x)
end
if @real_x > last_real_x and @real_x - $game_map.display_x > CENTER_X
$game_map.scroll_right(@real_x - last_real_x)
end
if @real_y < last_real_y and @real_y - $game_map.display_y < CENTER_Y
$game_map.scroll_up(last_real_y - @real_y)
end
unless moving?
if last_moving
result = check_event_trigger_here([1,2])
if result == false
unless $DEBUG and Input.press?(Input::CTRL)
if @encounter_count > 0
@encounter_count -= 1
end
end
end
end
if Input.trigger?(Input::C)
check_event_trigger_here([0])
check_event_trigger_there([0,1,2])
end
end
end
end