赞 | 0 |
VIP | 157 |
好人卡 | 6 |
积分 | 1 |
经验 | 113829 |
最后登录 | 2014-1-16 |
在线时间 | 26 小时 |
Lv1.梦旅人 B
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 26 小时
- 注册时间
- 2007-8-26
- 帖子
- 3693
|
本帖最后由 ONEWateR 于 2009-7-6 16:04 编辑
貌似有点问题 = =
应该是
def update
…………
…………
if Input.trigger?(Input::C)
attack
end
end
def attack
# 风属性武器的伤害累加
if $game_party.actors[0].weapon_id != 0 and $data_weapons[$game_party.actors[0].weapon_id].element_set.include?(6)
wf = 10
else
wf = 0
end
# 镶嵌所添加的风属性
if $game_party.actors[0].weapon_id != 0 and $data_weapons[$game_party.actors[0].weapon_id].element_set.include?(91)
wfk1 = 2
elsif $game_party.actors[0].weapon_id != 0 and $data_weapons[$game_party.actors[0].weapon_id].element_set.include?(92)
wfk1 = 4
elsif $game_party.actors[0].weapon_id != 0 and $data_weapons[$game_party.actors[0].weapon_id].element_set.include?(93)
wfk1 = 6
elsif $game_party.actors[0].weapon_id != 0 and $data_weapons[$game_party.actors[0].weapon_id].element_set.include?(94)
wfk1 = 8
else
wfk1 = 0
end
for i in 1..20
if $game_variables[5] == i and $game_map.events.name.include?("f")
$game_variables[36] = (wf.to_i+wfk1.to_i+wfk2.to_i+wfk3.to_i)/2
break
elsif $game_variables[5] == i and $game_map.events.name.include?("h")
$game_variables[36] = 0
break
elsif $game_variables[5] == i and $game_map.events.name.include?("t")
$game_variables[36] = (wf.to_i+wfk1.to_i+wfk2.to_i+wfk3.to_i)*2
break
else
$game_variables[36] = wf.to_i+wfk1.to_i
end
end
end
其实这样跟公共事件原理差不多~
attack 就相当于 呼出 attack内容的公共事件
而if Input.trigger?(Input::C) ………… 就相当于并行处理 |
|