Here in Game_Actor we have:
#-------------------------------------------------------------------------- # * Get Array of Currently Usable Skills #-------------------------------------------------------------------------- def usable_skills skills.select {|skill| usable?(skill) } endAnd over in Window_SkillList we have:
#-------------------------------------------------------------------------- # * Display Skill in Active State? #-------------------------------------------------------------------------- def enable?(item) @actor && @actor.usable?(item) endAnd for enemies in Game_Enemy we have:
#-------------------------------------------------------------------------- # * Determine if Action Is Valid in Current State # action : RPG::Enemy::Action #-------------------------------------------------------------------------- def action_valid?(action) conditions_met?(action) && usable?($data_skills[action.skill_id]) endOver in Game_BattlerBase we have these two:
Code:
#-------------------------------------------------------------------------- # * Check Usability Conditions for Skill #-------------------------------------------------------------------------- def skill_conditions_met?(skill) usable_item_conditions_met?(skill) && skill_wtype_ok?(skill) && skill_cost_payable?(skill) && !skill_sealed?(skill.id) && !skill_type_sealed?(skill.stype_id) end
Code:
#-------------------------------------------------------------------------- # * Determine Skill/Item Usability #-------------------------------------------------------------------------- def usable?(item) return skill_conditions_met?(item) if item.is_a?(RPG::Skill) return item_conditions_met?(item) if item.is_a?(RPG::Item) return false end