| 
 
| 赞 | 0 |  
| VIP | 4 |  
| 好人卡 | 43 |  
| 积分 | 94 |  
| 经验 | 75226 |  
| 最后登录 | 2019-3-3 |  
| 在线时间 | 1131 小时 |  
 Lv4.逐梦者 
	梦石3 星屑6420 在线时间1131 小时注册时间2007-12-26帖子2402 | 
| 本帖最后由 幻耶 于 2011-10-15 21:34 编辑 
 不被攻击的状态号是17号,大概在在Game_Party的314行添加
 
 #--------------------------------------------------------------------------
 # ● 对像角色的随机确定
 #     hp0 : 限制为 HP 0 的角色
 #--------------------------------------------------------------------------
 def random_target_actor(hp0 = false)
 # 初始化轮流
 roulette = []
 # 循环
 for actor in @actors
 next if actor.state?(17)
 
 
 或者,如果希望打开1号开关,1号角色不受攻击的话:
 #--------------------------------------------------------------------------
 # ● 对像角色的随机确定
 #     hp0 : 限制为 HP 0 的角色
 #--------------------------------------------------------------------------
 def random_target_actor(hp0 = false)
 # 初始化轮流
 roulette = []
 # 循环
 for actor in @actors
 if $game_switches[1] == true
 next if actor.id == 1
 end
 # 符合条件的场合
 | 
 |