本帖最后由 gqxastg 于 2019-11-2 08:35 编辑
举个例子 敌我通用 单独插入一页
class Game_BattlerBase #-------------------------------------------------------------------------- # ● 检查技能的使用条件 #-------------------------------------------------------------------------- alias old_hp_limit_skill_conditions_met? skill_conditions_met? def skill_conditions_met?(skill) old_hp_limit_skill_conditions_met?(skill) && (skill.id == 10000 ? hp_rate <= 0.15 : true) end end
class Game_BattlerBase
#--------------------------------------------------------------------------
# ● 检查技能的使用条件
#--------------------------------------------------------------------------
alias old_hp_limit_skill_conditions_met? skill_conditions_met?
def skill_conditions_met?(skill)
old_hp_limit_skill_conditions_met?(skill) &&
(skill.id == 10000 ? hp_rate <= 0.15 : true)
end
end
|