module RPG
class Skill
attr_accessor :frame
def frame
return @frame == nil ? 0 : @frame
end
end
end
class Scene_Battle
alias make_skill_action_result__old make_skill_action_result
def make_skill_action_result
# --------------------------
# 设置
# --------------------------
技能冷却帧 = {} # 初始化
技能冷却帧[57] = 100 # 57号特技(默认十字斩)有100帧的冷却时间!
@skill = $data_skills[@active_battler.current_action.skill_id]
if @skill.frame != nil and @skill.frame > 0
return
end
make_skill_action_result__old
@skill.frame = 技能冷却帧[@skill.id]
end
alias update__old update
def update
for i in $game_party.actors
for s in i.skills
skill = $data_skills
skill.frame -= 1 if skill.frame != nil and skill.frame > 0
end
end
update__old
end
end
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |