class RPG::Skill
def item_cost
/<COST_ITEM\s*(\d+)>/ =~ note ? $1.to_i : 0
end
end
class Game_Battler
alias sp_skill_can_use? skill_can_use?
def skill_can_use?(skill)
item = $data_items[skill.item_cost]
sp_skill_can_use?(skill) && (!item || $game_party.has_item?(item))
end
end
class Scene_Battle < Scene_Base
alias sp_execute_action_skill execute_action_skill
def execute_action_skill
sp_execute_action_skill
# item = $data_items[skill.item_cost]
# $game_party.lose_item(item, 1) if item
end
end
class RPG::Skill
def item_cost
/<COST_ITEM\s*(\d+)>/ =~ note ? $1.to_i : 0
end
end
class Game_Battler
alias sp_skill_can_use? skill_can_use?
def skill_can_use?(skill)
item = $data_items[skill.item_cost]
sp_skill_can_use?(skill) && (!item || $game_party.has_item?(item))
end
end
class Scene_Battle < Scene_Base
alias sp_execute_action_skill execute_action_skill
def execute_action_skill
sp_execute_action_skill
# item = $data_items[skill.item_cost]
# $game_party.lose_item(item, 1) if item
end
end