本帖最后由 RyanBern 于 2015-6-6 09:54 编辑 脚本如下: RUBY 代码复制#-------------------------------------------------------------------------- # ● 设置物品或特 ...
芯☆淡茹水 发表于 2015-6-6 10:11
查看全部评分
class Game_Party def random_target_actor(hp0 = false) # 初始化轮流 roulette = [] # 循环 for actor in @actors # 符合条件的场合 #↓增加判断条件 if (actor.index < 4) && (not hp0 and actor.exist?) or (hp0 and actor.hp0?) # 获取角色职业的位置 [位置] position = $data_classes[actor.class_id].position # 前卫的话 n = 4、中卫的话 n = 3、后卫的话 n = 2 n = 4 - position # 添加角色的轮流 n 回 n.times do roulette.push(actor) end end end # 轮流大小为 0 的情况 if roulette.size == 0 return nil end # 转轮盘赌,决定角色 return roulette[rand(roulette.size)] endend
class Game_Party def random_target_actor(hp0 = false) # 初始化轮流 roulette = [] # 循环 for actor in @actors # 符合条件的场合 #↓增加判断条件 if (actor.index < 4) && (not hp0 and actor.exist?) or (hp0 and actor.hp0?) # 获取角色职业的位置 [位置] position = $data_classes[actor.class_id].position # 前卫的话 n = 4、中卫的话 n = 3、后卫的话 n = 2 n = 4 - position # 添加角色的轮流 n 回 n.times do roulette.push(actor) end end end # 轮流大小为 0 的情况 if roulette.size == 0 return nil end # 转轮盘赌,决定角色 return roulette[rand(roulette.size)] end end
折叠内容标题(非必须)
折叠内容
站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作
GMT+8, 2025-2-17 01:32
Powered by Discuz! X3.1
© 2001-2013 Comsenz Inc.