| 赞 | 4 |
| VIP | |
| 好人卡 | |
| 积分 | 1 |
| 经验 | |
| 最后登录 | 2020-10-7 |
| 在线时间 | 1028 小时 |
巫女会长
- 梦石
- 0
- 星屑
- 60
- 在线时间
- 1028 小时
- 注册时间
- 2009-10-24
- 回帖
- 3425

|
发表于 2013-11-21 01:17:54
|
显示全部楼层
看来number_of_targets只能调用不能赋值,你把这段脚本插入到main前试试
[pre lang="ruby" line="1"]=begin
===============================================================================
使用:在SET_SKILL数组中添加需要设置目标数的技能id,在SET中添加对应的目标数。
例如:
SET_SKILL = [5, 6, 7]
SET_TARGET = [1, 2, 3]
设置5号技能目标数1, 6号技能目标数2, 7号技能目标数3。
===============================================================================
=end
SET_SKILL = [5, 6, 7]
SET_TARGET = [2, 2, 3]
class Game_Action
#--------------------------------------------------------------------------
# ● 目标为敌人
#--------------------------------------------------------------------------
def targets_for_opponents
if item.for_random?
SET_SKILL.size.times do |i|
if item.id == SET_SKILL
@n_target = SET_TARGET
end
end
Array.new(@n_target ? @n_target : item.number_of_targets) { opponents_unit.random_target }
elsif item.for_one?
num = 1 + (attack? ? subject.atk_times_add.to_i : 0)
if @target_index < 0
[opponents_unit.random_target] * num
else
[opponents_unit.smooth_target(@target_index)] * num
end
else
opponents_unit.alive_members
end
end
end[/pre] |
评分
-
查看全部评分
|