作为插件脚本使用,装备武器不会增加攻击力,会把攻击力增加到对应角色id的变量里
class Game_Actor < Game_Battler def initialize(actor_id) super() setup(actor_id) @last_skill = Game_BaseItem.new $game_variables[self.id] = equips[0].params[2] end def param(param_id) if param_id == 2 value = param_base(param_id) $game_variables[self.id] = param_plus(2) else value = param_base(param_id) + param_plus(param_id) end value *= param_rate(param_id) * param_buff_rate(param_id) [[value, param_max(param_id)].min, param_min(param_id)].max.to_i end end
class Game_Actor < Game_Battler
def initialize(actor_id)
super()
setup(actor_id)
@last_skill = Game_BaseItem.new
$game_variables[self.id] = equips[0].params[2]
end
def param(param_id)
if param_id == 2
value = param_base(param_id)
$game_variables[self.id] = param_plus(2)
else
value = param_base(param_id) + param_plus(param_id)
end
value *= param_rate(param_id) * param_buff_rate(param_id)
[[value, param_max(param_id)].min, param_min(param_id)].max.to_i
end
end
|