魔力转攻击力[pre lang="ruby"]class Game_Battler
$stateszid=17 #设置标志魔力转攻击这个状态的ID
alias initialize1 initialize
def initialize
initialize1
@states1=[]
end
#--------------------------------------------------------------------------
# ● 获取魔力
#--------------------------------------------------------------------------
def int
n = [[base_int + @int_plus, 1].max, 999].min
for i in @states
n *= $data_states.int_rate / 100.0
end
n = [[Integer(n), 1].max, 999].min
n = 0 if @states1.include?($stateszid)==true
return n
end
#--------------------------------------------------------------------------
# ● 获取力量
#--------------------------------------------------------------------------
def str
n = [[base_str + @str_plus, 1].max, 999].min
n = [[base_str + @str_plus+base_int, 1].max, 999].min if @states1.include?($stateszid)==true
for i in @states
n *= $data_states.str_rate / 100.0
end
n = [[Integer(n), 1].max, 999].min
return n
end
#--------------------------------------------------------------------------
# ● 检查状态
# state_id : 状态 ID
#--------------------------------------------------------------------------
def state?(state_id)
if state_id==$stateszid
str;int
@states1=[$stateszid]
else
@states1=[]
end
# 如果符合被附加的状态的条件就返回 ture
return @states.include?(state_id)
end
#--------------------------------------------------------------------------
# ● 解除状态
# state_id : 状态 ID
# force : 强制解除标志 (处理自动状态时使用)
#--------------------------------------------------------------------------
alias remove_state1 remove_state
def remove_state(state_id, force = false)
remove_state1(state_id, force = false)
@states1=[] if state_id==$stateszid
end
end[/pre]