比如像十字斩,摇摆斧之类的技能名字很明显是通过武器施展的,然而把武器摘下来后照用不误 如何让这种技能在摘下武器(既空手)后便无法使用?
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] }endclass 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 endend
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
查看全部评分
折叠内容标题(非必须)
折叠内容
站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作
GMT+8, 2024-11-14 17:59
Powered by Discuz! X3.1
© 2001-2013 Comsenz Inc.