alias use_item_bubs_mix use_item
def use_item(item)
p "1"
use_item_bubs_mix(item) # alias
end
end
中間的腳本
class Game_Battler < Game_BattlerBase
alias use_item_all_ve_toggle_target use_item
def use_item(item)
p "2"
use_item_all_ve_toggle_target(item)
end
end
最上面的腳本
class Game_Battler < Game_BattlerBase
def use_item(item)
p "3"
pay_skill_cost(item) if item.is_a?(RPG::Skill)
consume_item(item) if item.is_a?(RPG::Item)
item.effects.each {|effect| item_global_effect_apply(effect) }
end