Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- # Configuration
- #==============================================================================
- module Kadafi
- #--------------------------------------------------------------------------
- # * Custom Accessories IDs to be Checked
- #--------------------------------------------------------------------------
- BackStep_CustomAccessoriesIDs = [] # [id, id, id, ... ]
- ForwardStep_CustomAccessoriesIDs = [] # [id, id, id, ... ]
- DashBackSuffix = "[bds]"
- DashForwardSuffix = "[bds]"
- end
- #==============================================================================
- # Don't edit below this line unless you know what to do.
- #==============================================================================
- class Game_Player < Game_Character
- def update_action_command
- update_check_battler_equipment if can_check_battler_equipment?
- update_backdash_button
- update_dash_button
- update_auto_target_shoot
- update_combo_time
- update_action_1_button
- update_action_2_button
- update_skill_button
- update_item_button
- update_change_leader_button
- update_charge_button
- end
- def update_backdash_button
- backdash_distance = 2
- if @backdash_cooldown
- @backdash_cooldown -= 1
- return if @backdash_cooldown > 0
- end
- if Input.trigger?(:L) && backstep_accessories_equipped?
- @backdash_cooldown = 27
- # YIN
- pose_suffix = Kadafi::DashBackSuffix
- make_pose(pose_suffix, @backdash_cooldown - 12)
- image_only_on_dash(true)
- Audio.se_play('Audio/ME/dash', 80, 150)
- d = 10 - direction
- a = 0
- if @diagonal_direction != 0
- backdash_distance = (backdash_distance * OrangeMovement::Tile_Sections/Math.sqrt(2)).to_i/OrangeMovement::Tile_Sections
- end
- backdash_distance.times do
- OrangeMovement::Tile_Sections.times do
- if @diagonal_direction != 0
- case @diagonal_direction
- when 1
- if (diagonal_passable?(@x+a, @y-a, 6, 8) && diagonal_passable?(@x+(a*2), @y-(a*2), 6, 8))
- a += (my_step_size * 2)
- elsif diagonal_passable?(@x+a, @y-a, 6, 8)
- a += my_step_size
- end
- when 3
- if (diagonal_passable?(@x-a, @y-a, 4, 8) && diagonal_passable?(@x-(a*2), @y-(a*2), 4, 8))
- a += (my_step_size * 2)
- elsif diagonal_passable?(@x-a, @y-a, 4, 8)
- a += my_step_size
- end
- when 7
- if (diagonal_passable?(@x+a, @y+a, 6, 2) && diagonal_passable?(@x+(a*2), @y+(a*2), 6, 2))
- a += (my_step_size * 2)
- elsif diagonal_passable?(@x+a, @y+a, 6, 2)
- a += my_step_size
- end
- when 9
- if (diagonal_passable?(@x-a, @y+a, 4, 2) && diagonal_passable?(@x-(a*2), @y+(a*2), 4, 2))
- a += (my_step_size * 2)
- elsif diagonal_passable?(@x-a, @y+a, 4, 2)
- a += my_step_size
- end
- end
- else
- case @direction
- when 2; a += my_step_size if passable?(@x, @y-a, d)
- when 4; a += my_step_size if passable?(@x+a, @y, d)
- when 6; a += my_step_size if passable?(@x-a, @y, d)
- when 8; a += my_step_size if passable?(@x, @y+a, d)
- end
- end
- end
- end
- if @diagonal_direction != 0
- case @diagonal_direction
- when 1
- @x += a
- @y -= a
- when 3
- @x -= a
- @y -= a
- when 7
- @x += a
- @y += a
- when 9
- @x -= a
- @y += a
- end
- else
- case @direction
- when 2
- @x += 0
- @y -= a
- when 8
- @x += 0
- @y += a
- when 4
- @x += a
- @y += 0
- when 6
- @x -= a
- @y += 0
- end
- end
- @jump_peak = 3 + a.abs - @move_speed
- #~ p @jump_peak
- @jump_count = @jump_peak * 3.9
- @stop_count = 0
- straighten
- end
- end
- #--------------------------------------------------------------------------
- # * Determine if Custom Accessories Is Equipped
- #--------------------------------------------------------------------------
- def backstep_accessories_equipped?
- item = self.battler.equips[4]
- if item
- return Kadafi::BackStep_CustomAccessoriesIDs.include?(item.id)
- else
- return false
- end
- end
- def forwardstep_accessories_equipped?
- item = self.battler.equips[4]
- if item
- return Kadafi::ForwardStep_CustomAccessoriesIDs.include?(item.id)
- else
- return false
- end
- end
- def update_jump
- @jump_count -= 1
- @real_x = (@real_x * @jump_count + @x) / (@jump_count + 1.0)
- @real_y = (@real_y * @jump_count + @y) / (@jump_count + 1.0)
- update_bush_depth
- if @jump_count == 0
- @real_x = @x = $game_map.round_x(@x)
- @real_y = @y = $game_map.round_y(@y)
- image_only_on_dash(true)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement