$imported = {} if $imported.nil?
$imported["YEA-TargetManager"] = true
#==============================================================================
# ▼ Updates
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# 2012.01.13 - Bug Fixed: AoE removing targets.
# 2012.01.04 - Compatibility Update: Area of Effect
# 2012.01.02 - Started Script and Finished.
# - Compatibility Update: Lunatic Targets
#
#==============================================================================
# ▼ Introduction
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This script provides the ability to expand the targeting scope for skills and
# items. This script provides the ability to up the number of maximum hits
# past 9, expand the targeting range to target different types of groups, and
# give more control over random targeting.
#
#==============================================================================
# ▼ Instructions
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
#
# -----------------------------------------------------------------------------
# Skill Notetags - These notetags go in the skills notebox in the database.
# -----------------------------------------------------------------------------
# <total hits: x>
# Sets the total hits performed to x. This value can exceed 9, the limit RPG
# Maker VX Ace imposes.
# 设置为x执行的总命中。此值可超过9,极限RPG
# <targets: everybody>
# Sets the targeting scope to hit all alive actors and all alive enemies.
# 设定目标范围,达到所有活着的演员和所有活着的敌人。
# <targets: target all foes>
# Sets the targeting scope to hit the selected target foe first and then the
# remaining foes.
# 设定目标范围,然后再命中选定目标敌人,剩下的敌人。
# <targets: target x random foes>
# Sets the targeting scope to hit the selected target foe first and then hit
# x random foes.
# 设定目标范围先打选择目标敌人,然后打x的随机敌人。
# <targets: x random foes>
# Sets the targeting scope to random. This will hit x random foes.
# 设定目标范围随机的。这会按x随机敌人。
# <targets: all but user>
# Targets all allies except for the user.
# 目标除了用户的所有盟友。
# <targets: target all allies>
# Sets the targeting scope to hit the selected target ally first and then the
# remaining allies.
# 设定目标范围,然后再命中选定目标盟友剩下的盟友。
# <targets: target x random allies>
# Sets the targeting scope to hit the selected target ally first and then hit
# x random allies.
# 设定目标范围先打选定的目标盟军,然后打x的随机盟友。
# <targets: x random allies>
# Sets the targeting scope to random. This will hit x random allies.
# 设定目标范围随机的。这会按x随机盟友。
# -----------------------------------------------------------------------------
# Item Notetags - These notetags go in the items notebox in the database.
# -----------------------------------------------------------------------------
# <total hits: x>
# Sets the total hits performed to x. This value can exceed 9, the limit RPG
# Maker VX Ace imposes.
#
# <targets: everybody>
# Sets the targeting scope to hit all alive actors and all alive enemies.
#
# <targets: target all foes>
# Sets the targeting scope to hit the selected target foe first and then the
# remaining foes.
#
# <targets: target x random foes>
# Sets the targeting scope to hit the selected target foe first and then hit
# x random foes.
#
# <targets: x random foes>
# Sets the targeting scope to random. This will hit x random foes.
#
# <targets: all but user>
# Targets all allies except for the user.
#
# <targets: target all allies>
# Sets the targeting scope to hit the selected target ally first and then the
# remaining allies.
#
# <targets: target x random allies>
# Sets the targeting scope to hit the selected target ally first and then hit
# x random allies.
#
# <targets: x random allies>
# Sets the targeting scope to random. This will hit x random allies.
#
#==============================================================================
# ▼ Compatibility
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
# it will run with RPG Maker VX without adjusting.
#
# This script is compatible with Yanfly Engine Ace - Ace Battle Engine v1.12+.
# Place this script under Ace Battle Engine in the script listing. Also, for
# maximum compatibility with Yanfly Engine Ace - Lunatic Targets, place this
# script under Yanfly Engine Ace - Lunatic Targets as well.
#
#==============================================================================
module YEA
module TARGET
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# - General Targeting Settings -
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# These settings adjust how targeting operates in your game. Here, you can
# choose to have random targeting redirect to a different target if the
# selected target is dead, change the default settings used for area of
# effects, and more.
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# This setting, if true, will redirect the target of a random attack to an
# alive target if the current target is dead. If there are no alive targets
# then nothing happens.
RANDOM_REDIRECT = true
end # TARGET
end # YEA
#==============================================================================
# ▼ Editting anything past this point may potentially result in causing
# computer damage, incontinence, explosion of user's head, coma, death, and/or
# halitosis so edit at your own risk.
#==============================================================================
#--------------------------------------------------------------------------
# alias method: load_database
#--------------------------------------------------------------------------
class <<self; alias load_database_target load_database; end
def self.load_database
load_database_target
load_notetags_target
end
#--------------------------------------------------------------------------
# new method: load_notetags_target
#--------------------------------------------------------------------------
def self.load_notetags_target
groups = [$data_skills, $data_items]
for group in groups
for obj in group
next if obj.nil?
obj.load_notetags_target
end
end
end
#--------------------------------------------------------------------------
# alias method: for_opponent?
#--------------------------------------------------------------------------
alias rpg_usableitem_for_opponent_target for_opponent?
def for_opponent?
return true if @scope == :target_all_foes
return true if @scope == :target_random_foes
return rpg_usableitem_for_opponent_target
end
#--------------------------------------------------------------------------
# alias method: for_friend?
#--------------------------------------------------------------------------
alias rpg_usableitem_for_friend_target for_friend?
def for_friend?
return true if @scope == :all_but_user
return true if @scope == :target_all_allies
return true if @scope == :target_random_allies
return true if @scope == :random_allies
return rpg_usableitem_for_friend_target
end
#--------------------------------------------------------------------------
# alias method: for_all?
#--------------------------------------------------------------------------
alias rpg_usableitem_for_all_target for_all?
def for_all?
return true if @scope == :all_but_user
return rpg_usableitem_for_all_target
end
#--------------------------------------------------------------------------
# alias method: need_selection?
#--------------------------------------------------------------------------
alias rpg_usableitem_need_selection_target need_selection?
def need_selection?
return true if @scope == :target_all_foes
return true if @scope == :target_random_foes
return true if @scope == :target_all_allies
return true if @scope == :target_random_allies
return rpg_usableitem_need_selection_target
end
#--------------------------------------------------------------------------
# new method: for_custom?
#--------------------------------------------------------------------------
def for_custom?
return [email protected]_a?(Integer)
end
#--------------------------------------------------------------------------
# new method: for_everybody?
#--------------------------------------------------------------------------
def for_everybody?
return @scope == :everybody
end
#--------------------------------------------------------------------------
# new method: for_target_all_foes?
#--------------------------------------------------------------------------
def for_target_all_foes?
return @scope == :target_all_foes
end
#--------------------------------------------------------------------------
# new method: for_target_random_foes?
#--------------------------------------------------------------------------
def for_target_random_foes?
return @scope == :target_random_foes
end
#--------------------------------------------------------------------------
# new method: for_all_but_user?
#--------------------------------------------------------------------------
def for_all_but_user?
return @scope == :all_but_user
end
#--------------------------------------------------------------------------
# new method: for_target_all_allies?
#--------------------------------------------------------------------------
def for_target_all_allies?
return @scope == :target_all_allies
end
#--------------------------------------------------------------------------
# new method: for_target_random_allies?
#--------------------------------------------------------------------------
def for_target_random_allies?
return @scope == :target_random_allies
end
#--------------------------------------------------------------------------
# new method: for_random_allies?
#--------------------------------------------------------------------------
def for_random_allies?
return @scope == :random_allies
end