def skill_can_use?(skill)
super
if skill.element_set.include?(5)
for item in $game_party.items
return true if item.element_set.include?(5)
end
return false
end
end
def attackable?
for weapon in self.weapons
if weapon.element_set.include?(5)
for item in $game_party.items
return true if item.element_set.include?(5)
end
return false
end
end
return true
end
end
class Scene_Battle
def update_actor_command_selection
if Input.trigger?(Input::B)
Sound.play_cancel
prior_actor
elsif Input.trigger?(Input::C)
case @actor_command_window.index
when 0 # 攻击
if @active_battler.attackable?
Sound.play_decision
@active_battler.action.set_attack
start_target_enemy_selection
else
Sound.play_buzzer
end
when 1 # 特技
Sound.play_decision
start_skill_selection
when 2 # 防御
Sound.play_decision
@active_battler.action.set_guard
next_actor
when 3 # 物品
Sound.play_decision
start_item_selection
end
end
end