module RB
# 设置区域,设置的格式为:技能ID => [所需武器ID数组]
# 例如限制37号技能只有装备了1~4号武器才能发动,就写37 => [1, 2, 3, 4]
# 不同的设置项之间用','隔开,具体写法参照Hash写法
Skill_Weapon = {
57 => [1, 2, 3, 4],
58 => [5, 6, 7 ,8]
}
end
class Game_Battler
unless method_defined? :rb_skill_can_use_20150407
alias rb_skill_can_use_20150407 skill_can_use?
def skill_can_use?(skill_id)
if self.is_a?(Game_Actor) && RB::Skill_Weapon[skill_id] != nil && !RB::Skill_Weapon[skill_id].include?(self.weapon_id)
return false
end
return rb_skill_can_use_20150407(skill_id)
end
end
end
module RB
# 设置区域,设置的格式为:技能ID => [所需武器ID数组]
# 例如限制37号技能只有装备了1~4号武器才能发动,就写37 => [1, 2, 3, 4]
# 不同的设置项之间用','隔开,具体写法参照Hash写法
Skill_Weapon = {
57 => [1, 2, 3, 4],
58 => [5, 6, 7 ,8]
}
end
class Game_Battler
unless method_defined? :rb_skill_can_use_20150407
alias rb_skill_can_use_20150407 skill_can_use?
def skill_can_use?(skill_id)
if self.is_a?(Game_Actor) && RB::Skill_Weapon[skill_id] != nil && !RB::Skill_Weapon[skill_id].include?(self.weapon_id)
return false
end
return rb_skill_can_use_20150407(skill_id)
end
end
end