|
RUBY 代码
[code]#==============================================================================
# $SDrop$
# 伪·光环效果 By猫易箱
#------------------------------------------------------------------------------
# 在 角色、职业、技能、武器、护甲、敌人、状态 备注添加使用:
#
# 条件 # 给全体队友附加状态
# 条件 # 给全体敌人附加状态
#
# 条件表达式中的 属性和方法 默认代表 持有者
# 如:hp_rate, mp_rate, states.include?(id) 等…
# 条件为 true 或 空 时默认触发
#
# 示例:
# hp_rate < 0.3
# rand(100) < 50
# mp_rate > 0.5 && states.include?(3)
#==============================================================================
$imported = {}if$imported.nil?
$imported["SDrop_AuraStates"] = true
#==============================================================================
# ■ Game_BattlerBase
#------------------------------------------------------------------------------
# 添加光环解析和缓存的基础方法
#==============================================================================
class Game_BattlerBase
#--------------------------------------------------------------------------
# ● 别名初始化
#--------------------------------------------------------------------------
alias_method :aura_initialize, :initialize
def initialize
aura_initialize
@aura_buffs = [] # 给队友的光环
@aura_debuffs = [] # 给敌人的光环
end
#--------------------------------------------------------------------------
# ● 解析备注中的光环
#--------------------------------------------------------------------------
def setup_auras(note)
# 解析 条件
note.scan(/(.*?)/m)do |state_id, condition|
@aura_buffs |