范例下载...
Project1.rar
(237.84 KB, 下载次数: 63)
技能设定图例...
找到这个定义并修改...
#-------------------------------------------------------------------------- # ● 生成技能或物品目标 # obj : 技能或物品 #-------------------------------------------------------------------------- def make_obj_targets(obj) targets = [] if obj.for_opponent? if obj.for_random? if obj.for_one? # 敌随机单体 number_of_targets = 1 elsif obj.for_two? # 敌随机二体 number_of_targets = 2 else # 敌随机三体 number_of_targets = 3 end number_of_targets.times do targets.push(opponents_unit.random_target) end elsif obj.dual? # 敌单体连续 targets.push(opponents_unit.smooth_target(@target_index)) targets += targets elsif obj.for_one? # 敌单体 targets.push(opponents_unit.smooth_target(@target_index)) else # 敌全体 targets += opponents_unit.existing_members end elsif obj.for_user? # 使用者 targets.push(battler) elsif obj.for_dead_friend? if obj.for_one? # 我方单体(无法行动) targets.push(friends_unit.smooth_dead_target(@target_index)) else # 我方全体(无法行动) targets += friends_unit.dead_members end elsif obj.for_friend? if obj.for_one? # 我方单体 targets.push(friends_unit.smooth_target(@target_index)) else # 我方全体 targets += friends_unit.existing_members end end targets.push(battler) if obj.note.include?("敌我状态") # 加这里 return targets.compact end
#--------------------------------------------------------------------------
# ● 生成技能或物品目标
# obj : 技能或物品
#--------------------------------------------------------------------------
def make_obj_targets(obj)
targets = []
if obj.for_opponent?
if obj.for_random?
if obj.for_one? # 敌随机单体
number_of_targets = 1
elsif obj.for_two? # 敌随机二体
number_of_targets = 2
else # 敌随机三体
number_of_targets = 3
end
number_of_targets.times do
targets.push(opponents_unit.random_target)
end
elsif obj.dual? # 敌单体连续
targets.push(opponents_unit.smooth_target(@target_index))
targets += targets
elsif obj.for_one? # 敌单体
targets.push(opponents_unit.smooth_target(@target_index))
else # 敌全体
targets += opponents_unit.existing_members
end
elsif obj.for_user? # 使用者
targets.push(battler)
elsif obj.for_dead_friend?
if obj.for_one? # 我方单体(无法行动)
targets.push(friends_unit.smooth_dead_target(@target_index))
else # 我方全体(无法行动)
targets += friends_unit.dead_members
end
elsif obj.for_friend?
if obj.for_one? # 我方单体
targets.push(friends_unit.smooth_target(@target_index))
else # 我方全体
targets += friends_unit.existing_members
end
end
targets.push(battler) if obj.note.include?("敌我状态") # 加这里
return targets.compact
end
|