Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #============================================================================
- # BlizzABS::Controller
- #----------------------------------------------------------------------------
- # This class is a special controller that controls the party leader. Some
- # input is processed instantly, while some is converted into commands to be
- # given to the player character.
- #============================================================================
- # PLACE BELOW BLIZZ ABS
- if $BlizzABS
- class BlizzABS::Controller
- include BlizzABS
- #--------------------------------------------------------------------------
- # update_control
- #--------------------------------------------------------------------------
- def update_control
- pix = $BlizzABS.pixel
- player.move_speed = player.normal_speed
- player.character_name = player.character_name_org
- unless $game_system.map_interpreter.running? ||
- player.move_route_forcing || $game_temp.message_window_showing
- if $game_system.running_button && Input.press?(Input::Run)
- player.move_speed = Config::RUN_SPEED
- elsif $game_system.sneaking_button && Input.press?(Input::Sneak) ||
- Config::SNEAK_SPEED > 0 && Config::SNEAK_ON_CHARGE && player.charging?
- player.move_speed = Config::SNEAK_SPEED
- end
- end
- if player.battler != nil && ($game_system.select_button &&
- Input.trigger?(Input::Select) || player.battler.dead?)
- switch_leader
- end
- player.sprite_animation_setup
- player.update_action
- #--------------------------------------------------------------------
- if $game_system.blizzabs_can_move? # Drago edit
- #--------------------------------------------------------------------
- input = (player.restriction == 3 ? 10 - Input.dir4 : Input.dir4)
- case input
- when 2 then player.turn_down
- when 4 then player.turn_left
- when 6 then player.turn_right
- when 8 then player.turn_up
- end
- player.update_attacked
- return nil
- end
- player.update_attacked
- if player.in_action > 0
- player.in_action -= 1 if player.in_action > 0
- return [player.moving?, player.real_x, player.real_y]
- end
- #--------------------------------------------------------------------
- unless $game_system.blizzabs_can_move?(1) # Drago edit
- #--------------------------------------------------------------------
- if $game_system.jumping_button && Input.trigger?(Input::Jump) &&
- !player.jumping? && player.restriction < 4
- @memory_jump = true
- end
- unless player.moving?
- range = Config::JUMPING
- if range > 0 && !player.jumping? && @memory_jump
- if Config::RUN_SPEED > 0 || Config::SNEAK_SPEED > 0
- dplus = player.move_speed - player.normal_speed
- else
- dplus = 0
- end
- direction = $game_system._8_way ? Input.dir8 : Input.dir4
- x, y = Cache::DirOffsets[direction]
- player.jump(x*range + x*dplus, y*range + y*dplus, direction)
- elsif !player.jumping?
- move($game_system._8_way ? Input.dir8 : Input.dir4)
- player.idle_allowed = !player.moving?
- end
- @memory_jump = false
- end
- end
- return [player.moving?, player.real_x, player.real_y]
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement