提供一下思路
1.禁用防御
关闭1号开关时禁用防御
def guard_usable? usable?($data_skills[guard_skill_id]) and $game_switches[1] end
def guard_usable?
usable?($data_skills[guard_skill_id]) and $game_switches[1]
end
2.禁用道具
关闭2号开关时禁用道具
def add_item_command add_command(Vocab::item, :item , @actor.item_usable?) end
def add_item_command
add_command(Vocab::item, :item , @actor.item_usable?)
end
def item_usable? $game_switches[2] end
def item_usable?
$game_switches[2]
end
3.禁用回复技能
我觉得的话其实禁用回复技能差不多等于目标不为我方(总不可能对敌方进行回复吧?)
所以在skill_conditions_met?(skill)方法里加个u_s?(skill)
然后定义一下u_s?(skill)
def u_s?(item) if $game_switches[3] if item.for_friend? return false else return true end end return true end
def u_s?(item)
if $game_switches[3]
if item.for_friend?
return false
else
return true
end
end
return true
end
正常情况下直接返回true,当打开3号开关的时候才会进行判断:目标为我方的技能禁用
以上只是提供思路给楼主作为参考用 |