| 
 
| 赞 | 1 |  
| VIP | 7 |  
| 好人卡 | 9 |  
| 积分 | 1 |  
| 经验 | 7021 |  
| 最后登录 | 2014-11-30 |  
| 在线时间 | 140 小时 |  
 Lv1.梦旅人 小黑 
	梦石0 星屑50 在线时间140 小时注册时间2011-8-23帖子536 | 
| 不想伸手就一次一次改,弹出错误的地方打开脚本他就会自己告诉你错在哪个地方。 复制代码$LBL_actor_attack=[]
#==============================================================================
# ■ Window_ActorCommand
#------------------------------------------------------------------------------
#  选择角色命令(如「攻击」或「技能」)的窗口。
#==============================================================================
class Window_ActorCommand < Window_Command
  attr_reader   :LBL_ #用于控制是否为不能攻击开关
#--------------------------------------------------------------------------
# ● 设置
#     actor : 角色
#--------------------------------------------------------------------------
  def setup(actor)
    p actor.class_id
    if $LBL_actor_attack[actor.class_id]==false
    s1 = Vocab::attack
    s2 = Vocab::skill
    s3 = Vocab::guard
    s4 = Vocab::item
    @LBL_=true
    else
    s1 = Vocab::skill
    s2 = Vocab::guard
    s3 = Vocab::item
    @LBL_=false
    end
    if actor.class.skill_name_valid     # 是否指定职业技能文字
      s2 = actor.class.skill_name       # 替换「技能」命令文字
    end
    @commands = [s1, s2, s3, s4]
    @item_max = 4
    refresh
    self.index = 0
  end
end
###################################################################
class Scene_Battle < Scene_Base
def update_actor_command_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      prior_actor
    elsif Input.trigger?(Input::C)
      if @actor_command_window.LBL_==false
      case @actor_command_window.index
      when 0   # 技能
        Sound.play_decision
        start_skill_selection
      when 1  # 防御
        Sound.play_decision
        @active_battler.action.set_guard
      when 2  # 物品
        Sound.play_decision
        start_item_selection
      end
      else
      case @actor_command_window.index
      when 0  # 攻击
        Sound.play_decision
        @active_battler.action.set_attack
        start_target_enemy_selection
      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
  end
end
 | 
 |