本帖最后由 taroxd 于 2014-6-2 09:51 编辑
未测试# 技能上备注 <state 50> 表明只有在50号状态时才能使用 class RPG::Skill def needed_state return @needed_state unless @needed_state.nil? @needed_state = @note =~ /<state\s*(\d+)>/ ? $1.to_i : false end end class Game_BattlerBase alias no_state_skill_conditions_met? skill_conditions_met? def skill_conditions_met?(skill) no_state_skill_conditions_met?(skill) && (!skill.needed_state || state?(skill.needed_state)) end end
# 技能上备注 <state 50> 表明只有在50号状态时才能使用
class RPG::Skill
def needed_state
return @needed_state unless @needed_state.nil?
@needed_state = @note =~ /<state\s*(\d+)>/ ? $1.to_i : false
end
end
class Game_BattlerBase
alias no_state_skill_conditions_met? skill_conditions_met?
def skill_conditions_met?(skill)
no_state_skill_conditions_met?(skill) &&
(!skill.needed_state || state?(skill.needed_state))
end
end
@Sion 结贴 |