# * Skill/Item Notetags: |
# 1. <unison actors: ids> |
# - Sets the list of id of actors needed for the skill/item as ids. |
# For example: |
# <unison actors: 1> means actor with id 1 is required to use it |
# <unison actors: 4, 2> means actors with id 4 and 2 are needed |
# - All actors in list ids needs to be in the battle, inputable, able to |
# use it and pay its cost. They'll all pay the cost after using it. |
# Only actors in list x can select it. |
# 2. <unison def rule: rule |
# - Sets the rule of setting user's def in the skill/item's damage |
# formula as rule, whose symbol is one of those in UNISON_RULES. |
# - The symbol of def must be included in UNISON_DEFS |
# - This notetag needs to be written below <unison item: ids> to work. |
# 3. <unison def actors: ids> |
# - Sets user's method def in the skill/item's damage formula to use its |
# unison rule to combine those of actors with id includedin the list |
# ids. def needs to be able to take no arguments and return a Numeric |
# to work. |
# For example: |
# <unison atk actors: 1> means the user's atk in its damage formula |
# uses thatof actor with id 1 |
# <unison mat actors: 4, 2> means the user's mat in its damage formula |
# uses mat of actors with id 4 and 2 under the skill/item's unison rule|
# - The symbol of def must be included in UNISON_DEFS |
# - This notetag needs to be written below <unison item: ids> to work. |
# Sets if the battlelog will show all actors involved in the unison skills
# or items instead of only the one invoking them
# If SHOW_UNISON_ACTOR_SWITCH_ID is a natural number, the state of switch
# with id SHOW_UNISON_ACTOR_SWITCH_ID will be used instead
SHOW_UNISON_ACTOR = true
SHOW_UNISON_ACTOR_SWITCH_ID = 0
# Sets the symbol of the rule used for setting the user's methods in the
# damage formula by using those of the included unison actors
# or items instead of only the one invoking them
# It must return a symbol included in UNISON_RULES
# If UNISON_DEF_RULE_VAR_ID is a natural number, the value of variable
# with id UNISON_DEF_RULE_VAR_ID will be used instead
UNISON_DEF_RULE = :avg
UNISON_DEF_RULE_VAR_ID = 0
# Implements the unison method rules
# The unison method value of all unison battlers can be referneced by vals
# The unison method rule symbol can be referenced by rule
# It's a method under Game_BattlerBase
# It must return a real number
UNISON_RULES = %Q(
def unison_rules(vals, rule) # This line shalln't be changed
if rule == :min
vals.min
elsif rule == :avg
vals.inject(:+) / vals.size
elsif rule == :max
vals.max
else
0
end
end
)
# Sets the battler methods to use the unison method rules
# Its keys must be the battler method name symbols
# Methods with name method_name will be aliased to method_name_unison
UNISON_DEFS = {
# General Form:
# [:method_class, :super_class] => [
# :method_name
# ]
[:Game_BattlerBase] => [
:hp,
:mp,
:tp,
:mhp,
:mmp,
:atk,
:def,
:mat,
:mdf,
:agi
# Adds new methods here
],
[:Game_Actor, :Game_Battler] => [
:level
# Adds new methods here
]
# Adds new classes here
}
# v1.00c(GMT 0000 25-2-2016): |
# 1. Fixed nil actor in unison_item_usable? due to missing code bug |
# 2. Fixed not restroing the unison usable lock for the currently selected |
# unison skill/item right before processing the prior command |
# 3. Fixed not clearing the unison usable lock for the currently selected |
# unison skill/item right after processing the next command |
# 4. Fixed not clearing unison inputable/usable locks upon clearing unison |
# action slot |
# v1.00b(GMT 1100 26-7-2015): |
# 1. Fixed reserving nonempty action slots and selecting reserved ones bug |
# v1.00a(GMT 1200 22-7-2015): |
# 1. 1st version of this script finished |