赞 | 668 |
VIP | 62 |
好人卡 | 144 |
积分 | 334 |
经验 | 110435 |
最后登录 | 2024-11-1 |
在线时间 | 5108 小时 |
Lv5.捕梦者
- 梦石
- 0
- 星屑
- 33435
- 在线时间
- 5108 小时
- 注册时间
- 2012-11-19
- 帖子
- 4878
|
稍微改了一下,也避免了随机时某个敌人挨几下的情况,比如随机3次,某个敌人就挨两次甚至三次全挨的情况。
- #==============================================================================
- class Game_Action
- #--------------------------------------------------------------------------
- alias xr_old_targets_for_opponents targets_for_opponents
- def targets_for_opponents
- if item.for_random?
- max_num = [item.number_of_targets, opponents_unit.alive_members.size].min
- data = []
- while data.size < max_num
- target = opponents_unit.random_target
- data << target unless data.include?(target)
- end
- return data
- end
- xr_old_targets_for_opponents
- end
- end
- #==============================================================================
复制代码 |
|