# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# Soul Engine Ace - Dashing Armors
# Author: Soulpour777
# Version 1.0
# Script Category: Character / Actor Add-On
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# Description:
# There are armors on the default database named "Winged Boots" however, it
# seems to be losing a very good element in the game. If it is a winged boots,
# then it should also affect the movement of the character on the map such
# as speed and dashing. This script does that function.
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# Terms of Use:
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# For Non-Commercial Use:
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# You are free to use the script on any non-commercial projects.
# You are free to adapt the script. Any modifications are allowed as long as
# it is provided as a note on the script.
# Credits to SoulPour777 for the script.
# Preserve the Script Header.
# Claiming the script as your own is prohibited.
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

#==============================================================================
# ** Dash_Equipment
#------------------------------------------------------------------------------
# This module holds the Dashing Check and Variables that allows Dash Armors.
#==============================================================================
module Dash_Equipment
Dash_Speed_R = 10 # Running Speed When Dash Armors are equipped.
Dash_Speed_W = 6 # Walking Speed When Dash Armors are Equipped.
Char_Standard_Speed = 4 # Standard Speed
Dash_Armors = # Armor Ids of Dash Armors
def self.check_equipments
$game_party.members.each do |actor_equips|
if actor_equips.armor_equipped?(*Dash_Armors)
$game_system.run_is_activated = true
else
$game_system.run_is_activated = false
end
end
end
end

#==============================================================================
# ** Game_System
#------------------------------------------------------------------------------
# This class handles system data. It saves the disable state of saving and
# menus. Instances of this class are referenced by $game_system.
#==============================================================================
class Game_System

#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :run_is_activated
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias dash_equipment_soul_initialize initialize
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
dash_equipment_soul_initialize
@run_is_activated = false
end

end

#==============================================================================
# ** Game_Player
#------------------------------------------------------------------------------
# This class handles the player. It includes event starting determinants and
# map scrolling functions. The instance of this class is referenced by
# $game_player.
#==============================================================================

class Game_Player < Game_Character
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :move_speed # move_speed

#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias player_speed_initialize initialize

#--------------------------------------------------------------------------
# * Object Initialization (Aliased)
#--------------------------------------------------------------------------
def initialize
player_speed_initialize
@move_speed = 4
end

end

#==============================================================================
# ** Scene_Map
#------------------------------------------------------------------------------
# This class performs the map screen processing.
#==============================================================================
class Scene_Map < Scene_Base

#--------------------------------------------------------------------------
# Alias Listings
#--------------------------------------------------------------------------
alias equipment_update update

#--------------------------------------------------------------------------
# * Update (Aliased)
#--------------------------------------------------------------------------
def update
Dash_Equipment.check_equipments
if $game_system.run_is_activated
if Input.press?(Input::SHIFT)
$game_player.move_speed = Dash_Equipment::Dash_Speed_R
else
$game_player.move_speed = Dash_Equipment::Dash_Speed_W
end
else
$game_player.move_speed = Dash_Equipment::Char_Standard_Speed
end
equipment_update
end
end

#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
# This class handles actors. It is used within the Game_Actors class
# ($game_actors) and is also referenced from the Game_Party class ($game_party).
#==============================================================================

class Game_Actor < Game_Battler

#--------------------------------------------------------------------------
# * Is the armor really equipped?
#--------------------------------------------------------------------------
def armor_equipped?(*armor_soul)
armor_soul.any? { |armor_id| armors.include?($data_armors) }
end

end