设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1571|回复: 1
打印 上一主题 下一主题

[已经解决] 这个脚本在哪里改选项

[复制链接]

Lv1.梦旅人

梦石
0
星屑
92
在线时间
468 小时
注册时间
2011-9-1
帖子
404
跳转到指定楼层
1
发表于 2015-9-8 14:17:24 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
这个脚本是战斗时的战士和法师的选项,我想请问下,脚本最后的部分,怎么让战士也能使用源术之类的。



RUBY 代码复制
  1. # ★ バトルレイアウト変更 (ヘルプウィンドウ通常版、少しだけ互換性が高い)
  2. #   バトルのレイアウトを変更します
  3. #   素材『ステートアイコンのアニメーション表示』の使用をお奨めします
  4. #     ▲ 入れるフォルダは Graphics/System へ
  5.  
  6. #==============================================================================
  7. # ■ Ziifee
  8. #==============================================================================
  9.  
  10. module Zii
  11.   # ▼ アイコンのナンバーです (縦 × 16 + 横 - 1)
  12.   FIGHT = 132                               # 戦う
  13.   ESCAPE = 143                              # 逃げる
  14.   ATTACK = 116                                # 攻撃 (基本)
  15.   GUARD = 139                                # 防御
  16.   SKILL = 115                               # 战技
  17.   SKILL2 = 14                              # 体术
  18.   SKILL3 = 119                              # 魔法
  19.   SKILL4 = 143                              # 源术
  20.   ITEM = 260                                # アイテム
  21.   ESCAPE = 121
  22.  
  23.   # ▼ 回転方向 ( "正" か "逆" を入れる )
  24.   TURN = "正"
  25.  
  26.   # ▼ 顔グラフィック (使う場合 "使用" / 使わない場合は "")
  27.   STATUS_FACE = "使用"
  28.  
  29.   # ▼ 表示の設定 ( "名前" を "" にすると 名前を非表示)
  30.   STATUS_LINE = "名前"
  31.  
  32.   # ▼ △の大きさ ( VX 標準サイズ は 20)
  33.   LINE_SIZE = 14
  34.  
  35.   #--------------------------------------------------------------------------
  36.   # ● 通常回転 の判定
  37.   #--------------------------------------------------------------------------
  38.   def self.turn_normal?
  39.     return false if TURN == "逆"
  40.     return true  if TURN == "正"
  41.     return true
  42.   end
  43.   #--------------------------------------------------------------------------
  44.   # ● バトルオプション [顔グラフィック] の判定
  45.   #--------------------------------------------------------------------------
  46.   def self.battle_face?
  47.     return true if STATUS_FACE == "使用"
  48.     return false
  49.   end
  50.   #--------------------------------------------------------------------------
  51.   # ● バトルステートオプション [名前] の判定
  52.   #--------------------------------------------------------------------------
  53.   def self.line_name?
  54.     return true if STATUS_LINE == "名前"
  55.     return false
  56.   end
  57. end
  58.  
  59. #==============================================================================
  60. # ■ Window_SpinCommand
  61. #------------------------------------------------------------------------------
  62. #  回転用コマンド選択を行うウィンドウです。
  63. #==============================================================================
  64.  
  65. class Window_SpinCommand < Window_Command
  66.   #--------------------------------------------------------------------------
  67.   # ● 公開インスタンス変数
  68.   #--------------------------------------------------------------------------
  69.   attr_reader   :index                    # カーソル位置
  70.   attr_reader   :help_window              # ヘルプウィンドウ
  71.   #--------------------------------------------------------------------------
  72.   # ● オブジェクト初期化
  73.   #     cx / cy  : 中心の X座標 / Y座標
  74.   #     commands : コマンド配列 (内容 は [name, kind, pull, enabled?])
  75.   #     setting  : 設定ハッシュ ("R"=>半径 "S"=>速さ "G"=>背景 "L"=>文字)
  76.   #--------------------------------------------------------------------------
  77.   def initialize(cx, cy, commands, setting = {})
  78.     @radius    = 40#setting.has_key?("R") ? setting["R"] : 40  # 描画半径
  79.     @speed     = setting.has_key?("S") ? setting["S"] : 36  # 回転速さ
  80.     @spin_back = setting.has_key?("G") ? setting["G"] : ""  # 背景画像
  81.     @spin_line = setting.has_key?("L") ? setting["L"] : nil # 文字位置
  82.     x = cx - @radius - 28
  83.     y = cy - @radius - 28
  84.     width = height = @radius * 2 + 56 + 120
  85. #    super(x, y, width, height)
  86.     super(x, y)
  87.     self.opacity = 0
  88.     @index = 0
  89.     @commands = commands                                    # コマンド
  90.     @spin_right = true
  91.     @spin_count = 0
  92.     update_cursor
  93.   end
  94.  
  95.   def window_height
  96.     fitting_height(visible_line_number) + 120
  97.   end
  98.   def window_width
  99.     return 196
  100.   end
  101.   #--------------------------------------------------------------------------
  102.   # ▽ スピン画像を描画する (描画内容 強化用)
  103.   #     i  : インデックス
  104.   #     cx : 表示 中心位置 X座標
  105.   #     cy : 表示 中心位置 Y座標
  106.   #--------------------------------------------------------------------------
  107.   def draw_spin_graphic(i, cx, cy)
  108.     case command_kind(i)
  109.     when "icon"
  110.       draw_icon(command_pull(i), cx - 17, cy - 52, command_enabled?(i))
  111.     end
  112.   end
  113.   #--------------------------------------------------------------------------
  114.   # ★ リフレッシュ バグ回避用
  115.   #--------------------------------------------------------------------------
  116.   def refresh
  117.     set_spin
  118.   end
  119.   def refresh2(cx, cy, commands, setting = {})
  120.     @radius    = 44#setting.has_key?("R") ? setting["R"] : 40  # 描画半径
  121.     @speed     = setting.has_key?("S") ? setting["S"] : 36  # 回転速さ
  122.     @spin_back = setting.has_key?("G") ? setting["G"] : ""  # 背景画像
  123.     @spin_line = setting.has_key?("L") ? setting["L"] : nil # 文字位置
  124.     x = cx - @radius - 12
  125.     y = cy - @radius - 28
  126.     width = height = @radius * 2 + 56
  127.     #super(x, y)
  128.     self.opacity = 0
  129.     @index = 0
  130.     @commands = commands                                    # コマンド
  131.     @spin_right = true
  132.     @spin_count = 0
  133.     update_cursor
  134.   end
  135.   #--------------------------------------------------------------------------
  136.   # ★ 項目の描画 バグ回避用
  137.   #--------------------------------------------------------------------------
  138.   def draw_item(index, enabled = true)
  139.     @commands[index][3] = enabled
  140.     set_spin
  141.   end
  142.   #--------------------------------------------------------------------------
  143.   # ● 現在のコマンド名を取得する
  144.   #--------------------------------------------------------------------------
  145.   def command_name(index = @index)
  146.     return "" if index < 0
  147.     if @commands != nil
  148.     name = @commands[index][0]
  149.     end
  150.     return name != nil ? name : ""
  151.   end
  152.   #--------------------------------------------------------------------------
  153.   # ● コマンドの種類を取得
  154.   #--------------------------------------------------------------------------
  155.   def command_kind(index)
  156.     if @commands != nil
  157.     result = @commands[index][1]
  158.     end
  159.     return result != nil ? result : ""
  160.   end
  161.   #--------------------------------------------------------------------------
  162.   # ● コマンドの引数 を取得
  163.   #--------------------------------------------------------------------------
  164.   def command_pull(index)
  165.     if @commands != nil
  166.     result = @commands[index][2]
  167.     end
  168.     return result != nil ? result : ""
  169.   end
  170.   #--------------------------------------------------------------------------
  171.   # ● コマンドの有効フラグを取得
  172.   #--------------------------------------------------------------------------
  173.   def command_enabled?(index)
  174.     if @commands != nil
  175.     result = @commands[index][3]
  176.     end
  177.     return result != nil ? result : true
  178.   end
  179.   #--------------------------------------------------------------------------
  180.   # ● 名前の位置に index を設定する
  181.   #--------------------------------------------------------------------------
  182.   def set_index(name)
  183.     n = -1
  184.     for i in [email]0...@commands.size[/email]
  185.       n = i if @commands[i][0] == name
  186.     end
  187.     @index = n if n >= 0
  188.     update_cursor
  189.     call_update_help
  190.     set_spin
  191.   end
  192.   #--------------------------------------------------------------------------
  193.   # ● カーソル位置の設定
  194.   #     index : 新しいカーソル位置
  195.   #--------------------------------------------------------------------------
  196.   def index=(index)
  197.     @index = index
  198.     update_cursor
  199.     call_update_help
  200.     set_spin
  201.   end
  202.   #--------------------------------------------------------------------------
  203.   # ● 中心のX座標を取得
  204.   #--------------------------------------------------------------------------
  205.   def center_x
  206.     return contents.width / 2
  207.   end
  208.   #--------------------------------------------------------------------------
  209.   # ● 中心のY座標を取得
  210.   #--------------------------------------------------------------------------
  211.   def center_y
  212.     return contents.height / 2
  213.   end
  214.   #--------------------------------------------------------------------------
  215.   # ● 項目数の取得
  216.   #--------------------------------------------------------------------------
  217.   def item_max
  218.     if @commands != nil
  219.     return @commands.size
  220.   else
  221.     return 1
  222.     end
  223.   end
  224.   #--------------------------------------------------------------------------
  225.   # ● 背景の設定 (再定義 向き)
  226.   #--------------------------------------------------------------------------
  227.   def set_background
  228.     return if @spin_back == ""
  229.     bitmap = Cache.system(@spin_back)
  230.     rect = Rect.new(0, 0, bitmap.width, bitmap.height)
  231.     self.contents.blt(12 + 16 - 25, 12 + 8 -16, bitmap, rect)
  232.   end
  233.   #--------------------------------------------------------------------------
  234.   # ● 文章の設定 (再定義 向き)
  235.   #--------------------------------------------------------------------------
  236.   def set_text
  237.     return if @spin_line == nil
  238.     y = center_y - WLH / 2 + @spin_line
  239.     self.contents.draw_text(center_x - 56, y - 26 , 96, WLH, command_name, 1)
  240.   end
  241.   #--------------------------------------------------------------------------
  242.   # ● スピンアイコンの角度の差を取得する
  243.   #--------------------------------------------------------------------------
  244.   def angle_size
  245.     return (Math::PI * 2 / item_max) ###SR
  246.   end
  247.   #--------------------------------------------------------------------------
  248.   # ● スピンアイコン回転時のカウント を設定する
  249.   #--------------------------------------------------------------------------
  250.   def set_spin_count
  251.     @spin_count = angle_size * 360 / @speed
  252.     set_spin(true)
  253.   end
  254.   #--------------------------------------------------------------------------
  255.   # ● スピン設定 の実行
  256.   #     spin : 回転フラグ (true の時回転中)
  257.   #--------------------------------------------------------------------------
  258.   def set_spin(spin = false)
  259.     self.contents.clear
  260.     set_background
  261.     angle = spin ? @speed * @spin_count / 360 : 0
  262.     angle = @spin_right ? angle : -angle
  263.     for i in 0...item_max
  264.       n = (i - @index) * angle_size + angle ###SR OFFSET
  265.       cx = - @radius * Math.cos(n-44.67) + center_x#@radius * Math.sin(n) + center_x
  266.       cy = - @radius * Math.sin(n-44.67) + center_y#- @radius * Math.cos(n) + center_y
  267.       draw_spin_graphic(i, cx, cy)
  268.     end
  269.     set_text
  270.   end
  271.   #--------------------------------------------------------------------------
  272.   # ● フレーム更新
  273.   #--------------------------------------------------------------------------
  274.   def update
  275.     super
  276.     update_cursor
  277.     if @spin_count > 0
  278.       @spin_count -= 1
  279.       set_spin(@spin_count >= 1)
  280.       return
  281.     end
  282.     update_command
  283.   end
  284.   #--------------------------------------------------------------------------
  285.   # ● コマンドの移動可能判定
  286.   #--------------------------------------------------------------------------
  287.   def command_movable?
  288.     return false if @spin_count > 0
  289.     return false if (not visible or not active)
  290.     return false if (index < 0 or index > item_max or item_max == 0)
  291.     return false if (@opening or @closing)
  292.     return true
  293.   end
  294.   #--------------------------------------------------------------------------
  295.   # ● コマンドを右に移動
  296.   #--------------------------------------------------------------------------
  297.   def command_right
  298.     @index = (@index ) % item_max#(@index + 1) % item_max
  299.     @spin_right = true
  300.     set_spin_count
  301.   end
  302.   #--------------------------------------------------------------------------
  303.   # ● コマンドを左に移動
  304.   #--------------------------------------------------------------------------
  305.   def command_left
  306.     @index = (@index + item_max) % item_max#(@index - 1 + item_max) % item_max
  307.     @spin_right = false
  308.     set_spin_count
  309.   end
  310.   #--------------------------------------------------------------------------
  311.   # ● コマンド選択の更新
  312.   #--------------------------------------------------------------------------
  313.   def update_command
  314.     if command_movable?
  315.       if Input.press?(Input::UP)
  316.         Sound.play_cursor
  317.         Zii.turn_normal? ? command_left : command_right
  318.       end
  319.       if Input.press?(Input::DOWN)
  320.         Sound.play_cursor
  321.         Zii.turn_normal? ? command_right : command_left
  322.       end
  323.       # SR 1.04: 左右键切换菜单
  324.       if Input.press?(Input::LEFT)
  325.         @index -= 1
  326.         @index = 5 if @index == - 1
  327.         Sound.play_cursor
  328.         Zii.turn_normal? ? command_left : command_right
  329.       end
  330.       if Input.press?(Input::RIGHT)
  331.         @index += 1
  332.         @index = 0 if @index == 6
  333.         Sound.play_cursor
  334.         Zii.turn_normal? ? command_right : command_left
  335.       end
  336.       ###################
  337.     end
  338.     call_update_help
  339.   end
  340.   #--------------------------------------------------------------------------
  341.   # ● カーソルの更新
  342.   #--------------------------------------------------------------------------
  343.   def update_cursor
  344.     #if @index < 0
  345.     #  self.cursor_rect.empty
  346.     #else
  347.     #  rect = Rect.new(0, 0, 24, 24)
  348.     #  rect.x = center_x - rect.width / 2
  349.     #  rect.y = center_y - rect.height / 2 - @radius
  350.     #  self.cursor_rect = rect
  351.     #end
  352.   end
  353.   #--------------------------------------------------------------------------
  354.   # ● ヘルプウィンドウの設定
  355.   #     help_window : 新しいヘルプウィンドウ
  356.   #--------------------------------------------------------------------------
  357.   def help_window=(help_window)
  358.     @help_window = help_window
  359.     call_update_help
  360.   end
  361.   #--------------------------------------------------------------------------
  362.   # ● ヘルプウィンドウ更新メソッドの呼び出し
  363.   #--------------------------------------------------------------------------
  364.   def call_update_help
  365.     if self.active and @help_window != nil
  366.        update_help
  367.     end
  368.   end
  369.   #--------------------------------------------------------------------------
  370.   # ● ヘルプウィンドウの更新 (内容は継承先で定義する)
  371.   #--------------------------------------------------------------------------
  372.   def update_help
  373.   end
  374. end
  375.  
  376. #==============================================================================
  377. # ■ Window_LineHelp
  378. #------------------------------------------------------------------------------
  379. #  スキルやアイテムの説明、アクターのステータスなどを表示するウィンドウです。
  380. #==============================================================================
  381.  
  382. class Window_LineHelp < Window_Base
  383.   #--------------------------------------------------------------------------
  384.   # ● オブジェクト初期化
  385.   #--------------------------------------------------------------------------
  386.   def initialize
  387.     super(-16, 0, 576, WLH + 32)
  388.     self.opacity = 0
  389.   end
  390.   #--------------------------------------------------------------------------
  391.   # ● テキスト設定
  392.   #     text  : ウィンドウに表示する文字列
  393.   #     align : アラインメント (0..左揃え、1..中央揃え、2..右揃え)
  394.   #--------------------------------------------------------------------------
  395.   def set_text(text, align = 0)
  396.     if text != @text or align != @align
  397.       self.contents.clear
  398.       back_color = Color.new(0, 0, 0, 80)
  399.       self.contents.fill_rect(0, y = 12, contents.width, WLH - y, back_color)
  400.       self.contents.font.color = normal_color
  401.       self.contents.draw_text(20, 0, self.width - 72, WLH, text, align)
  402.       @text = text
  403.       @align = align
  404.     end
  405.   end
  406. end
  407.  
  408. #==============================================================================
  409. # ■ Window_PartyCommand
  410. #==============================================================================
  411.  
  412. class Window_PartyCommand2 < Window_SpinCommand
  413.   #--------------------------------------------------------------------------
  414.   # ● オブジェクト初期化
  415.   #--------------------------------------------------------------------------
  416.   def initialize
  417.     s1 = [Vocab::fight,  "icon", Zii::FIGHT,  true]
  418.     s2 = [Vocab::escape, "icon", Zii::ESCAPE, $game_troop.can_escape]
  419.     setting = {"R"=>40, "S"=>52, "G"=>"Spin40", "L"=>-12}
  420.     super(72, 356, [s1, s2], setting)
  421.     self.active = false
  422.     set_spin
  423.   end
  424. end
  425.  
  426. #==============================================================================
  427. # ■ Window_ActorCommand
  428. #==============================================================================
  429.  
  430. class Window_ActorCommand2 < Window_SpinCommand
  431.   #--------------------------------------------------------------------------
  432.   # ● オブジェクト初期化
  433.   #--------------------------------------------------------------------------
  434.   def initialize
  435.     s1 = [Vocab::attack, "icon", Zii::ATTACK, true]
  436.     s2 = [Vocab::skill,  "icon", Zii::SKILL,  true]
  437.     s3 = [Vocab::guard,  "icon", Zii::GUARD,  true]
  438.     s4 = [Vocab::item,   "icon", Zii::ITEM,   true]
  439.     s5 = [Vocab::escape,   "icon", Zii::ESCAPE,   true]
  440.     setting = {"R"=>40, "S"=>52, "G"=>"Spin40", "L"=>-12}
  441.     super(72 , 356, [s1, s2, s3, s4, s5], setting)
  442.     self.active = false
  443.     set_spin
  444.   end
  445.  
  446.   def refresh2
  447.     case @actor.id
  448.     when 1
  449.      s1 = [Vocab::attack, "icon", Zii::ATTACK, true]
  450.      s2 = ["战技",  "icon", Zii::SKILL,  true]
  451.      s3 = ["体术",  "icon", Zii::SKILL2,  true]
  452.      s4 = [Vocab::guard,  "icon", Zii::GUARD,  true]
  453.      s5 = [Vocab::item,   "icon", Zii::ITEM,   true]
  454.      s6 = [Vocab::escape,   "icon", Zii::ESCAPE,   true]
  455.      setting = {"R"=>40, "S"=>52, "G"=>"Spin40", "L"=>-12}
  456.      super(72, 356, [s1, s2, s3, s4, s5, s6], setting)
  457.      self.active = false
  458.      set_spin
  459.     when 2
  460.      s1 = [Vocab::attack, "icon", Zii::ATTACK, true]
  461.      s2 = ["战技",  "icon", Zii::SKILL,  true]
  462.      s3 = ["魔法",  "icon", Zii::SKILL3,  true]
  463.      s4 = [Vocab::guard,  "icon", Zii::GUARD,  true]
  464.      s5 = [Vocab::item,   "icon", Zii::ITEM,   true]
  465.      s6 = [Vocab::escape,   "icon", Zii::ESCAPE,   true]
  466.      setting = {"R"=>40, "S"=>52, "G"=>"Spin40", "L"=>-12}
  467.      super(72, 356, [s1, s2, s3, s4, s5, s6], setting)
  468.      self.active = false
  469.      set_spin
  470.     when 3
  471.      s1 = [Vocab::attack, "icon", Zii::ATTACK, true]
  472.      s2 = ["战技",  "icon", Zii::SKILL,  true]
  473.      s3 = ["体术",  "icon", Zii::SKILL2,  true]
  474.      s4 = [Vocab::guard,  "icon", Zii::GUARD,  true]
  475.      s5 = [Vocab::item,   "icon", Zii::ITEM,   true]
  476.      s6 = [Vocab::escape,   "icon", Zii::ESCAPE,   true]
  477.      setting = {"R"=>40, "S"=>52, "G"=>"Spin40", "L"=>-12}
  478.      super(72, 356, [s1, s2, s3, s4, s5, s6], setting)
  479.      self.active = false
  480.      set_spin
  481.     when 4
  482.      s1 = [Vocab::attack, "icon", Zii::ATTACK, true]
  483.      s2 = ["魔法",  "icon", Zii::SKILL3,  true]
  484.      s3 = ["源术",  "icon", Zii::SKILL4,  true]
  485.      s4 = [Vocab::guard,  "icon", Zii::GUARD,  true]
  486.      s5 = [Vocab::item,   "icon", Zii::ITEM,   true]
  487.      s6 = [Vocab::escape,   "icon", Zii::ESCAPE,   true]
  488.      setting = {"R"=>40, "S"=>52, "G"=>"Spin40", "L"=>-12}
  489.      super(72, 356, [s1, s2, s3, s4, s5, s6], setting)
  490.      self.active = false
  491.      set_spin
  492.     else
  493.      s1 = [Vocab::attack, "icon", Zii::ATTACK, true]
  494.      s2 = ["魔法",  "icon", Zii::SKILL3,  true]
  495.      s3 = ["源术",  "icon", Zii::SKILL4,  true]
  496.      s4 = [Vocab::guard,  "icon", Zii::GUARD,  true]
  497.      s5 = [Vocab::item,   "icon", Zii::ITEM,   true]
  498.      s6 = [Vocab::escape,   "icon", Zii::ESCAPE,   true]
  499.      setting = {"R"=>40, "S"=>52, "G"=>"Spin40", "L"=>-12}
  500.      super(72, 356, [s1, s2, s3, s4, s5, s6], setting)
  501.      self.active = false
  502.      set_spin
  503.     end
  504.   end
  505.  
  506.   #--------------------------------------------------------------------------
  507.   # ● 按下取消键时的处理
  508.   #--------------------------------------------------------------------------
  509.   def process_cancel
  510.     #Sound.play_cancel
  511.     #Input.update
  512.     #deactivate
  513.     #call_cancel_handler
  514.   end
  515.   #--------------------------------------------------------------------------
  516.   # ● 调用“取消”的处理方法
  517.   #--------------------------------------------------------------------------
  518.   def call_cancel_handler
  519.     #call_handler(:cancel)
  520.   end
  521.  
  522.   def clear_command_list
  523.     @list = []
  524.   end
  525.   def add_command(name, symbol, enabled = true, ext = nil)
  526.     @list.push({:name=>name, :symbol=>symbol, :enabled=>enabled, :ext=>ext})
  527.   end
  528.   #--------------------------------------------------------------------------
  529.   # ● 获取显示行数
  530.   #--------------------------------------------------------------------------
  531.   def visible_line_number
  532.     return 5#4
  533.   end
  534.   #--------------------------------------------------------------------------
  535.   # ● 生成指令列表
  536.   #--------------------------------------------------------------------------
  537.   def make_command_list
  538.     return unless @actor
  539.     add_attack_command
  540.     add_skill_commands
  541.     add_guard_command
  542.     add_item_command
  543.     add_escape_command
  544.   end
  545.   #--------------------------------------------------------------------------
  546.   # ☆ 添加逃跑指令
  547.   #--------------------------------------------------------------------------
  548.   def add_escape_command
  549.     add_command(Vocab::escape, :escape, BattleManager.can_escape?)
  550.   end
  551.   #--------------------------------------------------------------------------
  552.   # ● 添加攻击指令
  553.   #--------------------------------------------------------------------------
  554.   def add_attack_command
  555.     add_command(Zii::ATTACK, :attack, @actor.attack_usable?)
  556.   end
  557.   #--------------------------------------------------------------------------
  558.   # ● 添加技能指令
  559.   #--------------------------------------------------------------------------
  560.   def add_skill_commands
  561.     @actor.added_skill_types.sort.each do |stype_id|
  562.       name = $data_system.skill_types[stype_id]
  563.       add_command(name, :skill, true, stype_id)
  564.       refresh2
  565.     end
  566.   end
  567.   #--------------------------------------------------------------------------
  568.   # ● 添加防御指令
  569.   #--------------------------------------------------------------------------
  570.   def add_guard_command
  571.     add_command(Vocab::guard, :guard, @actor.guard_usable?)
  572.   end
  573.   #--------------------------------------------------------------------------
  574.   # ● 添加物品指令
  575.   #--------------------------------------------------------------------------
  576.   def add_item_command
  577.     add_command(Vocab::item, :item)
  578.   end
  579.   #--------------------------------------------------------------------------
  580.   # ● 设置
  581.   #--------------------------------------------------------------------------
  582.   def setup(actor)
  583.     @actor = actor
  584.     clear_command_list
  585.     make_command_list
  586.     refresh
  587.     #select(0)
  588.     activate
  589.     open
  590.     self.index = 0
  591.     set_spin
  592.   end
  593.   #--------------------------------------------------------------------------
  594.   # ● セットアップ
  595.   #     actor : アクター
  596.   #--------------------------------------------------------------------------
  597.   #def setup(actor)
  598.   #  @commands[0][2] = Zii::ATTACK
  599.   #  @commands[1][0] = Vocab::skill
  600.   #  if actor.weapons[0] != nil
  601.   #    n = actor.weapons[0].icon_index
  602.   #    @commands[0][2] = n if n > 0
  603.   #  end
  604.   #  #@commands[1][0] = actor.class.skill_name if actor.class.skill_name_valid
  605.   #  add_skill_commands
  606.   #  self.index = 0
  607.   #  set_spin
  608.   #end
  609. end
男人不懂永远月经的痛,就像女人永远不懂蛋疼的痛

Lv6.析梦学徒

老鹰

梦石
40
星屑
33422
在线时间
6553 小时
注册时间
2012-5-26
帖子
3178

极短24评委极短23参与极短22参与极短21评委老司机慢点开短篇十吟唱者组别冠军开拓者剧作品鉴家

2
发表于 2015-9-8 18:36:33 | 只看该作者
本帖最后由 百里_飞柳 于 2015-9-24 10:11 编辑

感觉那个框只能描绘这么多图标额……
然后在446行开始,是依据角色在数据库的id来分别描绘他所用的技能栏的

例如在492行的else前面添加

  1. when 5
  2.      s1 = [Vocab::attack, "icon", Zii::ATTACK, true]
  3.      s2 = ["战技",  "icon", Zii::SKILL,  true]
  4.      s3 = ["源术",  "icon", Zii::SKILL4,  true]
  5.      s4 = [Vocab::guard,  "icon", Zii::GUARD,  true]
  6.      s5 = [Vocab::item,   "icon", Zii::ITEM,   true]
  7.      s6 = [Vocab::escape,   "icon", Zii::ESCAPE,   true]
  8.      setting = {"R"=>40, "S"=>52, "G"=>"Spin40", "L"=>-12}
  9.      super(72, 356, [s1, s2, s3, s4, s5, s6], setting)
  10.      self.active = false
  11.      set_spin
复制代码
就能让5号角色使用战技和源术。

然后又回到最初的问题,它默认只能描绘6个选项……

点评

还在路上,不知道你说的对不对,我回去看了告诉你  发表于 2015-9-9 10:43

评分

参与人数 1梦石 +1 收起 理由
taroxd + 1 认可答案

查看全部评分

回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-5-4 04:55

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表