class Scene_Battle alias cld99_on_enemy_ok on_enemy_ok def on_enemy_ok p_input ## cld99_on_enemy_ok end alias cld99_on_actor_ok on_actor_ok def on_actor_ok p_input ## cld99_on_actor_ok end def command_guard BattleManager.actor.input.set_guard p_input #### next_command end def on_skill_ok @skill = @skill_window.item BattleManager.actor.input.set_skill(@skill.id) BattleManager.actor.last_skill.object = @skill if [email protected]_selection? p_input(@skill.id) #### @skill_window.hide next_command elsif @skill.for_opponent? select_enemy_selection else select_actor_selection end end def on_item_ok @item = @item_window.item BattleManager.actor.input.set_item(@item.id) if [email protected]_selection? p_input(@item.id) #### @item_window.hide next_command elsif @item.for_opponent? select_enemy_selection else select_actor_selection end $game_party.last_item.object = @item end def p_input(id = nil) actor = BattleManager.actor input = actor.input id ||= input.data_id puts "#{actor.name}使用了#{id}号#{input.type}'#{input.item.name}'" end end class Game_Action attr_reader :type, :data_id alias :cld99_set_skill :set_skill def set_skill(id) @type = "技能" @data_id = id cld99_set_skill(id) end alias :cld99_set_item :set_item def set_item(id) @type = "物品" @data_id = id cld99_set_item(id) end end