| 赞 | 4 |
| VIP | |
| 好人卡 | |
| 积分 | 1 |
| 经验 | |
| 最后登录 | 2017-9-1 |
| 在线时间 | 2276 小时 |
路人党员
- 梦石
- 0
- 星屑
- 52
- 在线时间
- 2276 小时
- 注册时间
- 2010-12-30
- 回帖
- 3011
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有账号?注册会员
×
↓就是这样↓
[pre lang="ruby"]#===============================================================================
# ● 【简易坑爹系列】常用技能排序
#===============================================================================
unless $SKILLSORT_ORIG_ACTOR
$SKILLSORT_ORIG_ACTOR = Game_Actor.clone
$SKILLSORT_ORIG_BATTLE = Scene_Battle.clone
end
class Game_Actor < $SKILLSORT_ORIG_ACTOR
attr_reader :queue
def initialize(id)
@queue = []
super(id)
end
def skills
temp = {}
@queue.each do |id|
temp[id] ||= 0
temp[id] += 1
end
return super.sort do |id1, id2|
(($data_skills.size * (temp[id2]||0)) - id2) -
(($data_skills.size * (temp[id1]||0)) - id1)
end
end
end
class Scene_Battle < $SKILLSORT_ORIG_BATTLE
def start_phase4
$game_party.actors.each do |a|
if a.current_action.kind == 1
a.queue.push a.current_action.skill_id
a.queue.shift while a.queue.size > 20
end
end
super
end
end[/pre] |
|