本帖最后由 taroxd 于 2014-5-30 19:30 编辑
喵呜喵5 发表于 2014-5-28 19:04
我要提升的是角色所有技能的攻击力不是一个技能的攻击力......
测试代码:
$count = 0 class Game_Actor alias m5_20140525_param_plus param_plus def param_plus(param_id) a_par = m5_20140525_param_plus(param_id) return a_par unless @actor_id == 1 $count += 1 data = {1=>[1,2,3,4,5,6,7,8]} if $count >= 5 puts caller Graphics.update until Input.trigger?(:C) end $game_party.all_members.each do |actor| class_id = actor.class_id a_par += data[class_id][param_id] if data.has_key?(class_id) end $count -= 1 a_par end end
$count = 0
class Game_Actor
alias m5_20140525_param_plus param_plus
def param_plus(param_id)
a_par = m5_20140525_param_plus(param_id)
return a_par unless @actor_id == 1
$count += 1
data = {1=>[1,2,3,4,5,6,7,8]}
if $count >= 5
puts caller
Graphics.update until Input.trigger?(:C)
end
$game_party.all_members.each do |actor|
class_id = actor.class_id
a_par += data[class_id][param_id] if data.has_key?(class_id)
end
$count -= 1
a_par
end
end
测试结果的一部分(发生问题的原因):
都是初始化的时候refresh惹的祸!!!
解决办法不用我说了吧~ 你想怎么解决就怎么解决啦!
At Last,求糖! |