检查控制台是否打开
# @taroxd metadata 1.0
# @display 检查控制台是否打开
# @id check_console
if $TEST && Win32API.new('Kernel32.dll', 'GetConsoleWindow', '', 'L').call == 0
  msgbox "Warning: Console window is not displayed"
end
位图功能扩展
# @taroxd metadata 1.0
# @display 位图功能扩展
# @id bitmap_ext
# @help 需要将 rgssdll.dll 放入 System 文件夹下。
module Taroxd
  module BitmapExt
    DLL_FILE = 'System/rgssdll'
    XOR = Win32API.new(DLL_FILE, 'bitmap_xor', 'LL', 'L')
    OR  = Win32API.new(DLL_FILE, 'bitmap_or',  'LL', 'L')
    AND = Win32API.new(DLL_FILE, 'bitmap_and', 'LL', 'L')
  end
end

class Bitmap

  include Taroxd::BitmapExt

  # 对位图的每个像素做 xor 运算。
  # color: 0xaarrggbb
  def xor!(color)
    XOR.call(__id__, color)
  end

  # 对位图的每个像素做 or 运算。
  # color: 0xaarrggbb
  def or!(color)
    OR.call(__id__, color)
  end

  # 对位图的每个像素做 and 运算。
  # color: 0xaarrggbb
  def and!(color)
    AND.call(__id__, color)
  end
end
战斗指令优化
# @taroxd metadata 1.0
# @require taroxd_core
# @display 战斗指令优化
# @id battle_command_ext
# @help 
#     攻击指令无需选择目标时,跳过目标选择。
#     防御指令需要选择目标时,添加目标选择。
#     攻击、防御的指令名变为对应的技能名。(“用语”中的设置将会无效)

Taroxd::BattleCommandExt = true

class Scene_Battle < Scene_Base

  # 普通攻击无需选择目标的情况
  def_chain :command_attack do |old|
    skill = $data_skills[BattleManager.actor.attack_skill_id]
    if !skill.need_selection?
      BattleManager.actor.input.set_attack
      next_command
    elsif skill.for_opponent?
      old.call
    else
      BattleManager.actor.input.set_attack
      select_actor_selection
    end
  end

  # 防御需要选择目标的情况
  def_chain :command_guard do |old|
    skill = $data_skills[BattleManager.actor.guard_skill_id]
    if skill.need_selection?
      BattleManager.actor.input.set_guard
      skill.for_opponent? ? select_enemy_selection : select_actor_selection
    else
      old.call
    end
  end
end

class Window_ActorCommand < Window_Command

  # 更改攻击指令名称
  def add_attack_command
    name = $data_skills[@actor.attack_skill_id].name
    add_command(name, :attack, @actor.attack_usable?)
  end

  # 更改防御指令名称
  def add_guard_command
    name = $data_skills[@actor.guard_skill_id].name
    add_command(name, :guard, @actor.guard_usable?)
  end
end