Code:
# ?ÃÂ¥?ã?ÃÂ¥ XRXS50. Action-Maps XC. ?ÃÂ¥?ã?ÃÂ¥ built 033010
# by ?÷â°Ã« ?ÃÂây
#==============================================================================
# ? ÆJÆXÆ^Æ}ÆCÆYÆ|ÆCÆâÆg
#==============================================================================
class XRXS50
#
# Action-Maps âðâ°ÃââîâóâùâéÆ}ÆbÆvIDâÃÅâzâñ
#
ENABLE_FULL_ACTY_MAPS = [1, 4, 2]
#
# ?uŽÃŽâß?~â°Ãº?v
#
ENABLE_SLIDE_DESCENT = true
#
# ÅüâëÆWÆÆÆâÆv(true : ÅüâââÃââââéâ¢Ã»ÅüâÃâÆWÆÆÆâÆv?B
# false : ÆL?[âêâ°Å¸âóâêâÃââââéâ¢Ã»ÅüâÃâÆWÆÆÆâÆv?B)
#
JUMP_AS_KEY = true
end
#==============================================================================
# ?á Game_Player
#==============================================================================
class Game_Player < Game_Character
#--------------------------------------------------------------------------
# ?⺠ÅöŠJÆCÆâÆXÆ^ÆâÆXâ¢ÃÂ?â
#--------------------------------------------------------------------------
# Šùâö
attr_writer :direction_fix
attr_accessor :walk_anime
# ?Vâ¹K
attr_accessor :now_jumps
attr_writer :xrxs50_direction_sidefix
#--------------------------------------------------------------------------
# ?⺠?Ãâ¦âÃÂ¥ÆWÆÆÆâÆvâ°Ã±?â
#--------------------------------------------------------------------------
def max_jumps
return 5
end
#--------------------------------------------------------------------------
# ?Å ?öâðÅüâ*
#--------------------------------------------------------------------------
alias xrxs50_turn_left turn_left
def turn_left
if @xrxs50_direction_sidefix
@direction = 4
else
xrxs50_turn_left
end
end
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
alias xrxs50_turn_up turn_up
def turn_up
if @xrxs50_direction_sidefix
@direction = 8
else
xrxs50_turn_up
end
end
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
alias xrxs50_turn_down turn_down
def turn_down
if @xrxs50_direction_sidefix
@direction = 2
else
xrxs50_turn_down
end
end
#--------------------------------------------------------------------------
# ?Å â°EâðÅüâ*
#--------------------------------------------------------------------------
alias xrxs50_turn_right turn_right
def turn_right
if @xrxs50_direction_sidefix
@direction = 6
else
xrxs50_turn_right
end
end
end
#==============================================================================
# ?á Scene_Map
#==============================================================================
class Scene_Map
#--------------------------------------------------------------------------
# ?Å Æ?ÆCÆâ?Ëâ?
#--------------------------------------------------------------------------
alias xrxs50_main main
def main
# Æ`ÆFÆbÆN
xrxs50_enable_check
# ÅÃââÃââßâ÷
xrxs50_main
end
#--------------------------------------------------------------------------
# ?Å ÆtÆÅ?[Æâ¬?X?V
#--------------------------------------------------------------------------
alias xrxs50_update update
def update
# ÅÃââÃââßâ÷
xrxs50_update
# ÆtÆÅ?[Æâ¬?X?V (?Ãâ¬â¢WÅn?X?V)
if @xrxs50_enable
update_coordinates
end
end
#--------------------------------------------------------------------------
# ?⺠ÆtÆÅ?[Æâ¬?X?V (?Ãâ¬â¢WÅn?X?V)
#--------------------------------------------------------------------------
def update_coordinates
if $game_player.passable?($game_player.x,$game_player.y,2)
unless $game_player.moving?
if XRXS50::ENABLE_SLIDE_DESCENT and
Input.press?(Input::RIGHT) and
$game_player.passable?($game_player.x,$game_player.y+1,6)
$game_player.move_lower_right
elsif XRXS50::ENABLE_SLIDE_DESCENT and
Input.press?(Input::LEFT) and
$game_player.passable?($game_player.x,$game_player.y+1,4)
$game_player.move_lower_left
else
$game_player.move_down
end
end
else
$game_player.walk_anime = true unless $game_player.walk_anime
$game_player.now_jumps = 0
if Input.trigger?(Input::UP) and
$game_player.now_jumps < $game_player.max_jumps
if XRXS50::JUMP_AS_KEY
direction = $game_player.direction == 4 ? -1 : 1
else
if Input.press?(Input::RIGHT)
direction = 6
elsif Input.press?(Input::LEFT)
direction = 4
else
direction = 8
end
end
$game_player.jump(direction, -3)
$game_player.now_jumps += 1
$game_player.walk_anime = false
end
end
end
#--------------------------------------------------------------------------
# ?Å ÆvÆÅÆCÆâ?[âÃÅ?ê?Å ËÃÅ¡âî
#--------------------------------------------------------------------------
alias xrxs50_transfer_player transfer_player
def transfer_player
# ÅÃââÃââßâ÷
xrxs50_transfer_player
# Æ`ÆFÆbÆN
xrxs50_enable_check
end
#--------------------------------------------------------------------------
# ?⺠XRXS50 âêâ°Ãââîâ÷âéâéâûâè
#--------------------------------------------------------------------------
def xrxs50_enable_check
if XRXS50::ENABLE_FULL_ACTY_MAPS.include?($game_map.map_id)
$game_player.now_jumps = 0 if $game_player.now_jumps.nil?
@xrxs50_enable = true
$game_player.direction_fix = true
$game_player.xrxs50_direction_sidefix = true
else
@xrxs50_enable = false
$game_player.direction_fix = false
$game_player.xrxs50_direction_sidefix = false
end
end
end