查看: 1936|回复: 7

[已经过期] 姨妈战斗脚本的问题

[复制链接]
梦石
0
星屑
536
在线时间
69 小时
注册时间
2016-5-5
回帖
16
发表于 2018-1-31 23:31:42 | 显示全部楼层 |阅读模式

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

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

×
本帖最后由 D-Jack 于 2018-1-31 23:50 编辑

这问题困扰我有一段时间了 就上来问问
右边是我设为中途出现的敌人
不过现身后却没有名字和血条 该如何解决?

0.jpg


另外 有办法做到无法指定攻击某个敌人吗?

脚本
  1. #==============================================================================
  2. # ■ 姨媽功能型戰鬥介面          by姨媽
  3. #-----------------------------------------------------------------------------------------------------------------------------
  4. # ・為遏止多數Ace繁體橫向戰鬥RPG介面隨便又簡陋的歪風,姨媽設計了這款戰鬥介面。
  5. # ・雖然是針對橫向戰鬥設計,但傳統第一人稱戰鬥也可用。
  6. # ・不需額外放任何圖檔到遊戲資料夾內,插入此腳本即可使用。
  7. # ・支援544*416跟640*480的畫面大小。
  8. # ・請注意,有更改戰鬥背景放大率時敵人指標會跑位,這時不管怎麼調整都會有誤差。
  9. # ・歡迎轉載但請保留綠字註解。
  10. #
  11. # ・2013/11/15:
  12. #  微調敵人名稱位置,使之較不會遮住血條。
  13. # ・2013/11/18:
  14. #  可以調整敵人指標小箭頭RGB顏色。
  15. # ・2013/11/23:
  16. #  可調整計量表(HP、MP、TP)文字的字體大小。
  17. #  可用圖標取代傳統HP、MP、TP文字。
  18. # ・2013/11/24:
  19. #  對齊調整。
  20. # ・2013/11/26:
  21. #  我方指標追加。
  22. #  會自動判斷選項數而改變指令列選單的長度。
  23. # ・2013/12/2:
  24. #  指標資訊可設定顯示敵人名稱或血量百分比。
  25. # ・2013/12/15:
  26. #  可導入姨媽自訂計量條顏色腳本的設定。
  27. # ・2013/12/26:
  28. #  再次對齊調整。
  29. #  優化戰鬥不顯示TP時的頭像位置。
  30. # ・2014/01/01:
  31. #  優化敵人指標上方的資訊。
  32. # ・2014/01/02:
  33. #  可設定計量表(HP、MP、TP)文字是否使用粗體。
  34. # ・2014/01/05:
  35. #  構造內容整理。
  36. #  支援640*480畫面。
  37. #==============================================================================
  38. #==============================================================================
  39. #●特殊功能:
  40. #
  41. #・敵人圖像過大而指標跑出螢幕外,請在該敵人備註欄裡寫上"指標調整"來避免此問題。
  42. #・MAXBM可以設定參戰人數,如果隊伍人數多於參戰人數設定,多出的隊友不會參戰。
  43. #・欲使用簡易版角色命令列請將SMALL_ACMD設為true。
  44. #
  45. #・表情改變功能首先要為每個參戰角色各準備一張專屬的八格表情圖檔(如下表)
  46. #
  47. #
  48. #############################
  49. #            #            #            #            #
  50. #     1     #     2     #     3     #     4     #
  51. #            #            #            #            #
  52. #############################
  53. #            #            #            #            #
  54. #     x     #     x     #     x     #     x     #
  55. #            #            #            #            #
  56. #############################
  57. #
  58. #
  59. #1為通常表情(資料庫裡該角色頭像必須設定為此)
  60. #2為低於50%血量的表情
  61. #3為低於25%血量的表情
  62. #4為陣亡時的表情
  63. # x 為腳本不會使用到的部分可任意安排
  64. #
  65. # 要使用隨血量改變表情的功能,請先將下面BFC = false改為BFC = true
  66. #==============================================================================
  67. #==============================================================================

  68. module YM_CURSOR_P
  69.   
  70. #調整敵人指標水平位置(左移:負數,右移:正數)
  71. CURSOR_PX = 0

  72. #調整敵人指標垂直位置(上移:負數,下移:正數)
  73. CURSOR_PY = 190

  74. #調整敵人指標小箭頭RGB顏色
  75. CURSOR_COLOR = Color.new(0,255,255)

  76. #調整我方指標箭頭RGB顏色
  77. CURSOR_COLOR2 = Color.new(255,255,255)

  78. end

  79. module YM_BATTLE_OPTION
  80.   
  81. #最大參戰人數,建議不要超過六人
  82. MAXBM = 6

  83. #設定計量表(HP、MP、TP)文字的字體大小。
  84. GAUGE_TEXTSIZE = 20

  85. #設定計量表(HP、MP、TP)文字是否使用粗體。
  86. GAUGE_TEXTBOLD = true

  87. #是否使用圖標取代傳統HP、MP、TP文字
  88. GAUGE_ICON_USE =  false
  89. #HP圖標編號(GAUGE_ICON_USE =  true才有效)
  90. GAUGE_ICON_HP =  187
  91. #MP圖標編號(GAUGE_ICON_USE =  true才有效)
  92. GAUGE_ICON_MP =  188
  93. #TP圖標編號(GAUGE_ICON_USE =  true才有效)
  94. GAUGE_ICON_TP =  189

  95. #是否使用隨血量改變表情功能
  96. BFC = false

  97. #是否使用簡易版角色指令列,簡易版不支援指令選項加上圖標腳本
  98. SMALL_ACMD = false

  99. #指標資訊顯示敵人名稱或血量百分比(true=敵人名稱,false=血量百分比)
  100. ENEMY_NAMEORPERCENT = true

  101. #是否導入姨媽自訂計量條顏色腳本的設定
  102. GAUGE_COLOR_HAVE = false

  103. #遊戲畫面大小是否為640*480?若是請用true,沒改過請保持false
  104. GW640GH480 = false

  105. end


  106. #==============================================================================
  107. # ■ Game_System
  108. #==============================================================================
  109. class Game_System
  110.   attr_accessor :ba_x
  111.   attr_accessor :ba_y
  112.   attr_accessor :al_x
  113.   attr_accessor :al_y
  114.   attr_accessor :wd_hide
  115.   attr_accessor :face_item_width
  116.   alias yima_bv2_initialize initialize
  117.   def initialize
  118.     yima_bv2_initialize
  119.     @ba_x = 0
  120.     @ba_y = 0
  121.     @al_x = 0
  122.     @al_y = 0
  123.     @wd_hide = 0
  124.     @face_item_width = 0
  125.   end
  126. end

  127. #==============================================================================
  128. # ■ Scene_Battle
  129. #==============================================================================
  130. class Scene_Battle < Scene_Base
  131. include YM_CURSOR_P
  132.   if YM_BATTLE_OPTION::GW640GH480 == false
  133.     GW=12
  134.   else
  135.     GW=4
  136.   end
  137.   #-------------------------------------------------------------------------
  138.   # ● 資訊載入
  139.   #-------------------------------------------------------------------------
  140.   def update_info_viewport
  141.     if YM_BATTLE_OPTION::GW640GH480 == false
  142.       move_info_viewport(560)   if @party_command_window.active
  143.       move_info_viewport(560) if @actor_command_window.active
  144.       move_info_viewport(560)  if BattleManager.in_turn?
  145.     else
  146.       move_info_viewport(656)   if @party_command_window.active
  147.       move_info_viewport(656) if @actor_command_window.active
  148.       move_info_viewport(656)  if BattleManager.in_turn?
  149.     end
  150.     @enemy_window.x =  $game_system.ba_x+YM_CURSOR_P::CURSOR_PX
  151.     @enemy_window.y =  $game_system.ba_y+YM_CURSOR_P::CURSOR_PY
  152.     @enemy_cursor_window.x =  $game_system.ba_x+YM_CURSOR_P::CURSOR_PX
  153.     @enemy_cursor_window.y =  $game_system.ba_y+28+YM_CURSOR_P::CURSOR_PY
  154.     if $game_party.battle_members.size==4
  155.         @actor_window.x = $game_system.al_x*@actor_window.index-GW
  156.     elsif $game_party.battle_members.size==3
  157.         @actor_window.x = $game_system.al_x*@actor_window.index-GW+$game_system.face_item_width
  158.     elsif $game_party.battle_members.size==2
  159.         @actor_window.x = $game_system.al_x*@actor_window.index-GW+$game_system.face_item_width*2
  160.     elsif $game_party.battle_members.size==1
  161.         @actor_window.x = $game_system.al_x*@actor_window.index-GW+$game_system.face_item_width*3
  162.     elsif $game_party.battle_members.size==5
  163.         @actor_window.x = $game_system.al_x*@actor_window.index-GW-$game_system.face_item_width/3
  164.     elsif $game_party.battle_members.size>=6
  165.         @actor_window.x = $game_system.al_x*@actor_window.index-GW-$game_system.face_item_width/2
  166.     end
  167.     @actor_window.y = Graphics.height/4*3-56
  168.   end
  169.   #--------------------------------------------------------------------------
  170.   # ● 調整主狀態欄位置
  171.   #--------------------------------------------------------------------------
  172.   def move_info_viewport(ox)
  173.     current_ox = @info_viewport.ox
  174.      if YM_BATTLE_OPTION::GW640GH480 == false
  175.     @info_viewport.ox = [ox, current_ox + 28].min if current_ox < ox
  176.     @info_viewport.ox = [ox, current_ox - 28].max if current_ox > ox
  177.     else
  178.     @info_viewport.ox = [ox, current_ox + 36].min if current_ox < ox
  179.     @info_viewport.ox = [ox, current_ox - 36].max if current_ox > ox
  180.     end
  181.   end
  182.   #--------------------------------------------------------------------------
  183.   # ● 主狀態欄
  184.   #--------------------------------------------------------------------------
  185.   def create_status_window
  186.     @status_window = Window_BattleStatus.new
  187.     if YM_BATTLE_OPTION::GW640GH480 == false
  188.         if $game_party.battle_members.size>=4
  189.           @status_window.x = 560
  190.         elsif $game_party.battle_members.size==3
  191.           @status_window.x = 560 + $game_system.face_item_width
  192.         elsif $game_party.battle_members.size==2
  193.           @status_window.x = 560 + $game_system.face_item_width*2
  194.         elsif $game_party.battle_members.size==1
  195.           @status_window.x = 560 + $game_system.face_item_width*3
  196.         end
  197.       else
  198.         if $game_party.battle_members.size>=4
  199.           @status_window.x = 656
  200.         elsif $game_party.battle_members.size==3
  201.           @status_window.x = 656 + $game_system.face_item_width
  202.         elsif $game_party.battle_members.size==2
  203.           @status_window.x = 656 + $game_system.face_item_width*2
  204.         elsif $game_party.battle_members.size==1
  205.           @status_window.x = 656 + $game_system.face_item_width*3
  206.         end
  207.       end
  208.     end
  209.   #--------------------------------------------------------------------------
  210.   # ● 角色命令欄
  211.   #--------------------------------------------------------------------------
  212.   def create_actor_command_window
  213.     if YM_BATTLE_OPTION::SMALL_ACMD==true
  214.       @actor_command_window = Window_ActorCommandSmall.new
  215.     else
  216.       @actor_command_window = Window_ActorCommand.new
  217.     end
  218.     @actor_command_window.set_handler(:attack, method(:command_attack))
  219.     @actor_command_window.set_handler(:skill,  method(:command_skill))
  220.     @actor_command_window.set_handler(:guard,  method(:command_guard))
  221.     @actor_command_window.set_handler(:item,   method(:command_item))
  222.     @actor_command_window.set_handler(:cancel, method(:prior_command))
  223.   end
  224.    
  225.   #--------------------------------------------------------------------------
  226.   # ● 小隊命令列
  227.   #--------------------------------------------------------------------------
  228.   def create_party_command_window
  229.     @party_command_window = Window_PartyCommand.new
  230.     @party_command_window.set_handler(:fight,  method(:command_fight))
  231.     @party_command_window.set_handler(:escape, method(:command_escape))
  232.     @party_command_window.unselect
  233.   end
  234.   #--------------------------------------------------------------------------
  235.   # ● 選擇我方目標的視窗
  236.   #--------------------------------------------------------------------------
  237.   def create_actor_window
  238.     @actor_window = Window_BattleActor_Neo.new(@info_viewport)
  239.     @actor_window.set_handler(:ok,     method(:on_actor_ok))
  240.     @actor_window.set_handler(:cancel, method(:on_actor_cancel))
  241.     if $game_party.battle_members.size==4
  242.         @actor_window.x = $game_system.al_x*@actor_window.index-GW
  243.     elsif $game_party.battle_members.size==3
  244.         @actor_window.x = $game_system.al_x*@actor_window.index-GW+$game_system.face_item_width
  245.     elsif $game_party.battle_members.size==2
  246.         @actor_window.x = $game_system.al_x*@actor_window.index-GW+$game_system.face_item_width*2
  247.     elsif $game_party.battle_members.size==1
  248.         @actor_window.x = $game_system.al_x*@actor_window.index-GW+$game_system.face_item_width*3
  249.     elsif $game_party.battle_members.size==5
  250.         @actor_window.x = $game_system.al_x*@actor_window.index-GW-$game_system.face_item_width/3
  251.     elsif $game_party.battle_members.size>=6
  252.         @actor_window.x = $game_system.al_x*@actor_window.index-GW-$game_system.face_item_width/2
  253.     end
  254.     @actor_window.y = Graphics.height/4*3-56
  255.   end
  256.   #--------------------------------------------------------------------------
  257.   # ● 選擇敵方目標的視窗
  258.   #--------------------------------------------------------------------------
  259.   def create_enemy_window
  260.     @enemy_window = Window_BattleEnemy.new(@info_viewport)
  261.     @enemy_cursor_window = Window_EnemyCursor.new(@info_viewport)
  262.     @enemy_window.set_handler(:ok,     method(:on_enemy_ok))
  263.     @enemy_window.set_handler(:cancel, method(:on_enemy_cancel))
  264.     @enemy_window.x =  $game_system.ba_x+YM_CURSOR_P::CURSOR_PX
  265.     @enemy_window.y =  $game_system.ba_y+YM_CURSOR_P::CURSOR_PY
  266.     @enemy_cursor_window.x =  $game_system.ba_x+YM_CURSOR_P::CURSOR_PX
  267.     @enemy_cursor_window.y =  $game_system.ba_y+20+YM_CURSOR_P::CURSOR_PY
  268.   end
  269.   #--------------------------------------------------------------------------
  270.   # ● 下一個隊友
  271.   #--------------------------------------------------------------------------
  272.   def next_command
  273.     if BattleManager.next_command
  274.       start_actor_command_selection
  275.       @actor_command_window.show
  276.     else
  277.       turn_start
  278.     end
  279.   end
  280.   #--------------------------------------------------------------------------
  281.   # ● 選擇隊友時
  282.   #--------------------------------------------------------------------------
  283.   alias yima_bv2_select_actor_selection select_actor_selection
  284.   def select_actor_selection
  285.     yima_bv2_select_actor_selection
  286.     @actor_command_window.hide
  287.   end
  288.   #--------------------------------------------------------------------------
  289.   # ● 取消選擇隊友
  290.   #--------------------------------------------------------------------------
  291.   alias yima_bv2_on_actor_cancel on_actor_cancel
  292.   def on_actor_cancel
  293.     yima_bv2_on_actor_cancel
  294.     if $game_system.wd_hide==1
  295.     @actor_command_window.show
  296.     else
  297.     @actor_command_window.hide
  298.     end
  299.   end
  300.   #--------------------------------------------------------------------------
  301.   # ● 選擇敵人
  302.   #--------------------------------------------------------------------------
  303.   alias yima_bv2_select_enemy_selection select_enemy_selection
  304.   def select_enemy_selection
  305.     yima_bv2_select_enemy_selection
  306.     @enemy_cursor_window.refresh
  307.     @enemy_cursor_window.show.activate
  308.     @skill_window.hide
  309.     @item_window.hide
  310.     @actor_command_window.hide
  311.   end
  312.   #--------------------------------------------------------------------------
  313.   # ● 敵人決定
  314.   #--------------------------------------------------------------------------
  315.   def on_enemy_ok
  316.     BattleManager.actor.input.target_index = @enemy_window.enemy.index
  317.     @enemy_window.hide
  318.     @enemy_cursor_window.hide
  319.     @skill_window.hide
  320.     @item_window.hide
  321.     next_command
  322.   end
  323.   #--------------------------------------------------------------------------
  324.   # ●  取消選擇敵人
  325.   #--------------------------------------------------------------------------
  326.   def on_enemy_cancel
  327.     @enemy_window.hide
  328.     @enemy_cursor_window.hide   
  329.     case @actor_command_window.current_symbol
  330.     when :attack
  331.       @actor_command_window.activate
  332.     when :skill
  333.       @skill_window.activate.show
  334.     when :item
  335.       @item_window.activate.show
  336.     end
  337.     if $game_system.wd_hide==1
  338.     @actor_command_window.show
  339.     else
  340.     @actor_command_window.hide
  341.     end
  342.   end

  343.   alias yima_bv2_command_skill  command_skill
  344.   def command_skill
  345.     yima_bv2_command_skill
  346.     if $game_system.wd_hide==1
  347.     @actor_command_window.show.activate
  348.     else
  349.     @actor_command_window.hide
  350.     end
  351.   end

  352.   alias yima_bv2_command_item command_item
  353.   def command_item
  354.     yima_bv2_command_item
  355.     if $game_system.wd_hide==1
  356.     @actor_command_window.show.activate
  357.     else
  358.     @actor_command_window.hide
  359.     end
  360.   end

  361.   def on_skill_cancel
  362.     @skill_window.hide
  363.     if $game_system.wd_hide==1
  364.     @actor_command_window.show.activate
  365.     else
  366.     @actor_command_window.hide
  367.     end
  368.   end

  369.   def on_item_cancel
  370.     @item_window.hide
  371.     if $game_system.wd_hide==1
  372.     @actor_command_window.show.activate
  373.     else
  374.     @actor_command_window.hide
  375.     end
  376.   end
  377.   
  378. end

  379. #==============================================================================
  380. # ■ Window_Base
  381. #==============================================================================
  382. class Window_Base < Window
  383.   include YM_BATTLE_OPTION
  384.   #--------------------------------------------------------------------------
  385.   # ● 臉圖重切,預設96*96太大張會壓在血條下面不好看
  386.   #--------------------------------------------------------------------------
  387.   def draw_actor_face_yima(actor, x, y, enabled = true)
  388.     draw_face_m(actor.face_name, actor.face_index, x, y, enabled)
  389.     contents.font.name="VL Gothic"
  390.     contents.font.bold = YM_BATTLE_OPTION::GAUGE_TEXTBOLD
  391.   end
  392.   def draw_actor_face_yima2(actor, x, y, enabled = true)
  393.     draw_face_m2(actor.face_name, actor.face_index, x, y, enabled)
  394.   end
  395.   def draw_actor_face_yima3(actor, x, y, enabled = true)
  396.     draw_face_m3(actor.face_name, actor.face_index, x, y, enabled)
  397.   end
  398.   def draw_actor_face_yima4(actor, x, y, enabled = true)
  399.     draw_face_m4(actor.face_name, actor.face_index, x, y, enabled)
  400.   end
  401.   def draw_face_m(face_name, face_index, x, y, enabled = true)
  402.     bitmap = Cache.face(face_name)
  403.     rect = Rect.new(face_index % 4 * 96,  face_index>=4 ? (face_index+16) / 4 * 24 : (face_index+4) / 4 * 24, 96, 48)
  404.     contents.blt(x, y, bitmap, rect, enabled ? 255 : translucent_alpha)
  405.     bitmap.dispose
  406.   end
  407.   def draw_face_m2(face_name, face_index, x, y, enabled = true)
  408.     bitmap = Cache.face(face_name)
  409.     rect = Rect.new((face_index+1) % 4 * 96,  face_index>=4 ? (face_index+16) / 4 * 24 : (face_index+4) / 4 * 24, 96, 48)
  410.     contents.blt(x, y, bitmap, rect, enabled ? 255 : translucent_alpha)
  411.     bitmap.dispose
  412.   end
  413.   def draw_face_m3(face_name, face_index, x, y, enabled = true)
  414.     bitmap = Cache.face(face_name)
  415.     rect = Rect.new((face_index+2) % 4 * 96,  face_index>=4 ? (face_index+16) / 4 * 24 : (face_index+4) / 4 * 24, 96, 48)
  416.     contents.blt(x, y, bitmap, rect, enabled ? 255 : translucent_alpha)
  417.     bitmap.dispose
  418.   end
  419.   def draw_face_m4(face_name, face_index, x, y, enabled = true)
  420.     bitmap = Cache.face(face_name)
  421.     rect = Rect.new((face_index+3) % 4 * 96,  face_index>=4 ? (face_index+16) / 4 * 24 : (face_index+4) / 4 * 24, 96, 48)
  422.     contents.blt(x, y, bitmap, rect, enabled ? 255 : translucent_alpha)
  423.     bitmap.dispose
  424.   end
  425.   #--------------------------------------------------------------------------
  426.   # ● HP 繪製微調
  427.   #--------------------------------------------------------------------------
  428.   def draw_actor_hp_ym(actor, x, y, width = 124)
  429.     if YM_BATTLE_OPTION::GAUGE_ICON_USE ==  true
  430.         if YM_BATTLE_OPTION::GAUGE_COLOR_HAVE == true
  431.           draw_gauge(x+14, y, width-14, actor.hp_rate, YM_GAUGE_COLOR::HP_COLOR1, YM_GAUGE_COLOR::HP_COLOR2)
  432.         else
  433.           draw_gauge(x+14, y, width-14, actor.hp_rate, hp_gauge_color1, hp_gauge_color2)
  434.         end
  435.     else
  436.       if YM_BATTLE_OPTION::GAUGE_COLOR_HAVE == true
  437.         draw_gauge(x, y, width, actor.hp_rate, YM_GAUGE_COLOR::HP_COLOR1, YM_GAUGE_COLOR::HP_COLOR2)
  438.       else
  439.         draw_gauge(x, y, width, actor.hp_rate, hp_gauge_color1, hp_gauge_color2)
  440.       end
  441.     end
  442.     change_color(system_color)
  443.     contents.font.size=YM_BATTLE_OPTION::GAUGE_TEXTSIZE
  444.     if YM_BATTLE_OPTION::GAUGE_ICON_USE == true
  445.       draw_icon(YM_BATTLE_OPTION::GAUGE_ICON_HP, x-4, y+2)
  446.     else
  447.       draw_text(x, y+4, 30, line_height, Vocab::hp_a)
  448.     end
  449.     if $game_party.battle_members.size>=5
  450.     draw_current_values_ym(x, y+4, width, actor.hp, actor.mhp,hp_color(actor), normal_color)
  451.     else
  452.     draw_current_and_max_values(x, y+4, width, actor.hp, actor.mhp,hp_color(actor), normal_color)
  453.     end
  454.   end
  455.   #--------------------------------------------------------------------------
  456.   # ● MP 繪製微調
  457.   #--------------------------------------------------------------------------
  458.   def draw_actor_mp_ym(actor, x, y, width = 124)
  459.     if YM_BATTLE_OPTION::GAUGE_ICON_USE ==  true
  460.       if YM_BATTLE_OPTION::GAUGE_COLOR_HAVE == true
  461.         draw_gauge(x+14, y, width-14, actor.mp_rate, YM_GAUGE_COLOR::MP_COLOR1, YM_GAUGE_COLOR::MP_COLOR2)
  462.       else
  463.         draw_gauge(x+14, y, width-14, actor.mp_rate, mp_gauge_color1, mp_gauge_color2)
  464.       end
  465.     else
  466.       if YM_BATTLE_OPTION::GAUGE_COLOR_HAVE == true
  467.         draw_gauge(x, y, width, actor.mp_rate, YM_GAUGE_COLOR::MP_COLOR1, YM_GAUGE_COLOR::MP_COLOR2)
  468.       else
  469.         draw_gauge(x, y, width, actor.mp_rate, mp_gauge_color1, mp_gauge_color2)
  470.       end
  471.     end
  472.     change_color(system_color)
  473.     contents.font.size=YM_BATTLE_OPTION::GAUGE_TEXTSIZE
  474.     if YM_BATTLE_OPTION::GAUGE_ICON_USE == true
  475.       draw_icon(YM_BATTLE_OPTION::GAUGE_ICON_MP, x-4, y+2)
  476.     else
  477.       draw_text(x, y+4, 30, line_height, Vocab::mp_a)
  478.     end
  479.     if $game_party.battle_members.size>=5
  480.     draw_current_values_ym(x, y+4, width, actor.mp, actor.mmp,mp_color(actor), normal_color)
  481.     else
  482.     draw_current_and_max_values(x, y+4, width, actor.mp, actor.mmp,mp_color(actor), normal_color)
  483.     end
  484.   end
  485.   #--------------------------------------------------------------------------
  486.   # ● TP 繪製微調
  487.   #--------------------------------------------------------------------------
  488.   def draw_actor_tp_ym(actor, x, y, width = 124)
  489.     if YM_BATTLE_OPTION::GAUGE_ICON_USE ==  true
  490.       if YM_BATTLE_OPTION::GAUGE_COLOR_HAVE == true
  491.         draw_gauge(x+14, y, width-14, actor.tp_rate, YM_GAUGE_COLOR::TP_COLOR1, YM_GAUGE_COLOR::TP_COLOR2)
  492.       else
  493.         draw_gauge(x+14, y, width-14, actor.tp_rate, tp_gauge_color1, tp_gauge_color2)
  494.       end
  495.     else
  496.       if YM_BATTLE_OPTION::GAUGE_COLOR_HAVE == true
  497.         draw_gauge(x, y, width, actor.tp_rate, YM_GAUGE_COLOR::TP_COLOR1, YM_GAUGE_COLOR::TP_COLOR2)
  498.       else
  499.         draw_gauge(x, y, width, actor.tp_rate, tp_gauge_color1, tp_gauge_color2)
  500.       end
  501.     end
  502.     change_color(system_color)
  503.     contents.font.size=YM_BATTLE_OPTION::GAUGE_TEXTSIZE
  504.     if YM_BATTLE_OPTION::GAUGE_ICON_USE == true
  505.       draw_icon(YM_BATTLE_OPTION::GAUGE_ICON_TP, x-4, y+2)
  506.     else
  507.       draw_text(x, y+4, 30, line_height, Vocab::tp_a)
  508.     end
  509.     change_color(tp_color(actor))
  510.     draw_text(x + width - 42, y+4, 42, line_height, actor.tp.to_i, 2)
  511.   end
  512.   
  513.   #--------------------------------------------------------------------------
  514.   # ● 不顯示最大值時
  515.   #--------------------------------------------------------------------------
  516.   def draw_current_values_ym(x, y, width, current, max, color1, color2)
  517.     change_color(color1)
  518.     xr = x + width
  519.     draw_text(xr - 42, y, 42, line_height, current, 2)
  520.   end
  521.   
  522. end

  523. #==============================================================================
  524. # ■ Window_BattleEnemy 指標上方資訊
  525. #==============================================================================
  526. class Window_BattleEnemy < Window_Selectable
  527.   
  528.   #--------------------------------------------------------------------------
  529.   # ●初始化
  530.   #--------------------------------------------------------------------------
  531.   def initialize(info_viewport)
  532.     super(0,0, window_width, fitting_height(1)+8)
  533.     refresh
  534.     self.visible = false
  535.     self.arrows_visible = false
  536.   end
  537.   #--------------------------------------------------------------------------
  538.   # ●行數
  539.   #--------------------------------------------------------------------------
  540.   def col_max
  541.     return 1
  542.   end
  543.   #--------------------------------------------------------------------------
  544.   # ●寬度
  545.   #--------------------------------------------------------------------------
  546.   def window_width
  547.     return 200
  548.     end
  549.   #--------------------------------------------------------------------------
  550.   # ●每格高度
  551.   #--------------------------------------------------------------------------
  552.   def item_height
  553.     return  32
  554.   end
  555.   #--------------------------------------------------------------------------
  556.   # ●視窗顯示
  557.   #--------------------------------------------------------------------------
  558.   def show
  559.       width_remain = Graphics.width - width
  560.       select(0)
  561.       $game_system.ba_x=$game_troop.alive_members[index].screen_x-width/2
  562.       $game_system.ba_y=$game_troop.alive_members[index].screen_y-battler_graphic.height-70
  563.       if $game_troop.alive_members[index].enemy.note.include?("指標調整")
  564.       $game_system.ba_y=$game_troop.alive_members[index].screen_y-battler_graphic.height
  565.       end
  566.     super
  567.   end
  568.   #--------------------------------------------------------------------------
  569.   # ●移動處理
  570.   #--------------------------------------------------------------------------
  571.   def process_cursor_move
  572.     return unless cursor_movable?
  573.     last_index = @index
  574.     cursor_down (Input.trigger?(:DOWN))  if Input.repeat?(:DOWN)
  575.     cursor_up   (Input.trigger?(:UP))    if Input.repeat?(:UP)
  576.     cursor_down(Input.trigger?(:RIGHT)) if Input.repeat?(:RIGHT)
  577.     cursor_up (Input.trigger?(:LEFT))  if Input.repeat?(:LEFT)
  578.     cursor_pagedown   if !handle?(:pagedown) && Input.trigger?(:R)
  579.     cursor_pageup     if !handle?(:pageup)   && Input.trigger?(:L)
  580.     Sound.play_cursor if @index != last_index
  581.   end

  582.   def cursor_down(wrap = false)
  583.     if index < item_max - col_max || (wrap && col_max == 1)
  584.       select((index + col_max) % item_max)
  585.       $game_system.ba_x=$game_troop.alive_members[index].screen_x-width/2
  586.       $game_system.ba_y=$game_troop.alive_members[index].screen_y-battler_graphic.height-70
  587.       if $game_troop.alive_members[index].enemy.note.include?("指標調整")
  588.       $game_system.ba_y=$game_troop.alive_members[index].screen_y-battler_graphic.height
  589.       end
  590.     end
  591.   end

  592.   def cursor_up(wrap = false)
  593.     if index >= col_max || (wrap && col_max == 1)
  594.       select((index - col_max + item_max) % item_max)
  595.       $game_system.ba_x=$game_troop.alive_members[index].screen_x-width/2
  596.       $game_system.ba_y=$game_troop.alive_members[index].screen_y-battler_graphic.height-70
  597.       if $game_troop.alive_members[index].enemy.note.include?("指標調整")
  598.       $game_system.ba_y=$game_troop.alive_members[index].screen_y-battler_graphic.height
  599.       end
  600.     end
  601.   end
  602.   
  603.   def update_cursor
  604.     if @cursor_all
  605.       cursor_rect.set(0, 0, contents.width, row_max * item_height)
  606.     self.top_row = 0
  607.     elsif @index < 0
  608.       cursor_rect.empty
  609.     else
  610.       ensure_cursor_visible
  611.     end
  612.   end
  613.   
  614.   def battler_graphic
  615.     Cache.battler(enemy.battler_name, enemy.battler_hue)
  616.   end
  617.   
  618.   #--------------------------------------------------------------------------
  619.   # ● 項目繪製
  620.   #--------------------------------------------------------------------------
  621.   def draw_item(index)
  622.     change_color(normal_color)
  623.     name = $game_troop.alive_members[index].name
  624.     draw_text(item_rect_for_text_1(index), name,1) if YM_BATTLE_OPTION::ENEMY_NAMEORPERCENT == true
  625.     draw_hp(index)

  626.   end
  627.   
  628.   #--------------------------------------------------------------------------
  629.   # ● 微調位置
  630.   #--------------------------------------------------------------------------
  631.   def item_rect_for_text_1(index)
  632.     rect = item_rect(index)
  633.     rect.x += 4
  634.     rect.y -= 6
  635.     rect.width -= 8
  636.     rect
  637.   end

  638.   #--------------------------------------------------------------------------
  639.   # ● 敵HP繪製
  640.   #--------------------------------------------------------------------------
  641.   def draw_hp(index)
  642.     rect = item_rect_for_text(index)
  643.     w = rect.width
  644.     x =  0
  645.     hp = $game_troop.alive_members[index].hp_rate
  646.      if YM_BATTLE_OPTION::GAUGE_COLOR_HAVE == true
  647.       draw_gauge(x+3, rect.y+5, w, hp, YM_GAUGE_COLOR::HP_COLOR1,YM_GAUGE_COLOR::HP_COLOR2)
  648.     else
  649.       draw_gauge(x+3, rect.y+5, w, hp, hp_gauge_color1, hp_gauge_color2)
  650.     end
  651.     if YM_BATTLE_OPTION::ENEMY_NAMEORPERCENT == false
  652.     contents.font.name="VL Gothic"
  653.     contents.font.bold = YM_BATTLE_OPTION::GAUGE_TEXTBOLD
  654.     contents.font.size=YM_BATTLE_OPTION::GAUGE_TEXTSIZE
  655.     change_color(system_color)
  656.     draw_text(x+3, rect.y-2, 100, line_height, Vocab::hp_a)
  657.     eee = $game_troop.alive_members[index]
  658.     change_color(normal_color)
  659.     draw_en_hp_values(x+3, rect.y, width, eee.hp, eee.mhp, normal_color, normal_color)
  660.     contents.font.name=Font.default_name
  661.     else
  662.     end
  663.   end
  664.   
  665.   def draw_en_hp_values(x, y, width, current, max, color1, color2)
  666.     change_color(color1)
  667.     xr = x + width
  668.     draw_text(xr-84 , y-2, 42, line_height, current*100/max,2)
  669.     draw_text(xr-72, y-2, 42, line_height, "%", 2)
  670.   end

  671. end

  672. #==============================================================================
  673. # ■ Window_BattleActor_Neo  我方指標製作
  674. #==============================================================================
  675. class Window_BattleActor_Neo < Window_Selectable

  676.   def initialize(info_viewport)
  677.     super(0, info_viewport.rect.y, window_width, fitting_height(4))
  678.     refresh
  679.     self.openness = 255
  680.     self.visible = false
  681.     self.arrows_visible = false
  682.     select(0)
  683.     contents.font.name="VL Gothic"
  684.     self.opacity = 0
  685.   end

  686.   def window_width
  687.    184
  688.   end

  689.   def window_height
  690.     fitting_height(line_number)
  691.   end

  692.   def visible_line_number
  693.     return 4
  694.   end
  695.   
  696.   def item_height
  697.    60
  698.   end
  699.   
  700.   def item_max
  701.    $game_party.battle_members.size
  702. end
  703.   
  704.   def update_cursor
  705.     if @cursor_all
  706.       cursor_rect.set(0, 0, contents.width, row_max * item_height)
  707.       self.top_row = 0
  708.     elsif @index < 0
  709.       cursor_rect.empty
  710.     else
  711.       ensure_cursor_visible
  712.     end
  713.   end
  714.   
  715.   def refresh
  716.     contents.clear
  717.     draw_all_items
  718.   end

  719.   def draw_item(index)
  720.     change_color(normal_color)
  721.     contents.font.size = 50
  722.     contents.font.color.set(YM_CURSOR_P::CURSOR_COLOR2)
  723.     draw_text(item_rect_for_text(index), "▼",1)
  724.   end

  725.   def basic_area_rect(index)
  726.     rect = item_rect_for_text(index)
  727.     rect.width -= gauge_area_width + 10
  728.     rect
  729.   end

  730.   def gauge_area_rect(index)
  731.     rect = item_rect_for_text(index)
  732.     rect.x += rect.width - gauge_area_width
  733.     rect.width = gauge_area_width
  734.     rect
  735.   end

  736.   def gauge_area_width
  737.     return 220
  738.   end
  739.   
  740.   def pos_x
  741.     if $game_party.battle_members.size>=4
  742.       (Graphics.width-24) / $game_party.battle_members.size
  743.     elsif $game_party.battle_members.size==3
  744.       (Graphics.width-22-$game_system.face_item_width*2) / $game_party.battle_members.size
  745.     elsif $game_party.battle_members.size==2
  746.       (Graphics.width-20-$game_system.face_item_width*4) / $game_party.battle_members.size
  747.     elsif $game_party.battle_members.size==1
  748.       (Graphics.width-18-$game_system.face_item_width*6) / $game_party.battle_members.size
  749.     end
  750.   end

  751.   def pos_y
  752.     Graphics.height
  753.   end
  754.   
  755.   #--------------------------------------------------------------------------
  756.   # ●移動處理
  757.   #--------------------------------------------------------------------------
  758.   def process_cursor_move
  759.     return unless cursor_movable?
  760.     last_index = @index
  761.     cursor_down(Input.trigger?(:RIGHT)) if Input.repeat?(:RIGHT)
  762.     cursor_up (Input.trigger?(:LEFT))  if Input.repeat?(:LEFT)
  763.     cursor_pagedown   if !handle?(:pagedown) && Input.trigger?(:R)
  764.     cursor_pageup     if !handle?(:pageup)   && Input.trigger?(:L)
  765.     Sound.play_cursor if @index != last_index
  766.   end

  767.   def cursor_down(wrap = false)
  768.     if index < item_max - col_max || (wrap && col_max == 1)
  769.       select((index + col_max) % item_max)
  770.     end
  771.   end

  772.   
  773.   def cursor_up(wrap = false)
  774.     if index >= col_max || (wrap && col_max == 1)
  775.       select((index - col_max + item_max) % item_max)
  776.     end
  777.   end
  778.   
  779.   
  780.   def show
  781.     $game_system.al_x=pos_x
  782.     $game_system.al_y=pos_y
  783.     if @info_viewport
  784.       width_remain = Graphics.width - width
  785.       self.x = width_remain
  786.       @info_viewport.rect.width = width_remain
  787.       select(0)
  788.     end
  789.     super
  790.   end

  791.   def hide
  792.     @info_viewport.rect.width = Graphics.width if @info_viewport
  793.     super
  794.   end
  795. end

  796. #==============================================================================
  797. # ■ Window_PartyCommand 小隊命令
  798. #==============================================================================
  799. class Window_PartyCommand < Window_Command
  800.   def initialize
  801.     super(Graphics.width/2-window_width/2, 108)
  802.     self.openness = 0
  803.     deactivate
  804.   end
  805.   def alignment
  806.     return 1
  807.   end
  808.   def window_width
  809.     return 108
  810.   end
  811.   def window_height
  812.     return 72
  813.   end
  814. end

  815. #==============================================================================
  816. # ■ Window_EnemyCursor 指標製作
  817. #==============================================================================
  818. class Window_EnemyCursor < Window_Selectable

  819.   def initialize(info_viewport)
  820.     super(0, 0, window_width, fitting_height(2))
  821.     refresh
  822.     self.visible = false
  823.     self.opacity = 0
  824.   end

  825.   def window_width
  826.     200
  827.   end

  828.   def col_max
  829.     return 1
  830.   end

  831.   def item_height
  832.    48
  833.   end

  834.   def item_max
  835.     1
  836.   end

  837.   def draw_item(index)
  838.     change_color(normal_color)
  839.     contents.font.size = 35
  840.     contents.font.name="Arial"
  841.     contents.font.color.set(YM_CURSOR_P::CURSOR_COLOR)
  842.     draw_text(item_rect_for_text(index), "▲",1)#▼",1)
  843.   end

  844.   def update_cursor
  845.     if @cursor_all
  846.       cursor_rect.set(0, 0, contents.width, row_max * item_height)
  847.       self.top_row = 0
  848.     elsif @index < 0
  849.       cursor_rect.empty
  850.     else
  851.       ensure_cursor_visible
  852.     end
  853.   end

  854.   def show
  855.       width_remain = Graphics.width - width
  856.       self.x = width_remain
  857.       select(0)
  858.     super
  859.   end

  860.   def hide
  861.     super
  862.   end
  863. end

  864. #==============================================================================
  865. # ■ Window_BattleSkill 視窗資訊暫存
  866. #==============================================================================
  867. class Window_BattleSkill < Window_SkillList

  868.   alias yima_bv2_show show
  869.   def show
  870.       $game_system.wd_hide=0
  871.       yima_bv2_show
  872.   end

  873.   alias yima_bv2_hide hide
  874.   def hide
  875.       $game_system.wd_hide=1
  876.       yima_bv2_hide
  877.   end
  878.   
  879. end

  880. #==============================================================================
  881. # ■ Window_BattleItem 視窗資訊暫存
  882. #==============================================================================
  883. class Window_BattleItem < Window_ItemList

  884.   alias yima_bv2_show show
  885.   def show
  886.       $game_system.wd_hide=0
  887.       yima_bv2_show
  888.   end

  889.   alias yima_bv2_hide hide
  890.   def hide
  891.       $game_system.wd_hide=1
  892.       yima_bv2_hide
  893.   end
  894.   
  895. end

  896. #==============================================================================
  897. # ■ Window_ActorCommand 角色指令
  898. #==============================================================================
  899. class Window_ActorCommand < Window_Command
  900.   alias yima_bacmd_initialize initialize
  901.   def initialize
  902.     yima_bacmd_initialize
  903.     self.arrows_visible = false
  904.   end
  905.   #--------------------------------------------------------------------------
  906.   # ●寬
  907.   #--------------------------------------------------------------------------
  908.   def window_width
  909.     return  $game_party.battle_members.size>=6 ? 110 : 128
  910.   end
  911.   #--------------------------------------------------------------------------
  912.   # ●設定位置
  913.   #--------------------------------------------------------------------------
  914.   def setup(actor)
  915.     acmd_arrange = $game_system.face_item_width
  916.     @actor = actor
  917.     if $game_party.battle_members.size==4
  918.         self.x = actor.pos_x*@actor.index+acmd_arrange - item_width/2
  919.     elsif $game_party.battle_members.size==3
  920.         self.x = actor.pos_x*@actor.index+acmd_arrange - item_width/2+acmd_arrange
  921.     elsif $game_party.battle_members.size==2
  922.         self.x = actor.pos_x*@actor.index+acmd_arrange - item_width/2+acmd_arrange*2
  923.     elsif $game_party.battle_members.size==1
  924.         self.x = actor.pos_x*@actor.index+acmd_arrange - item_width/2+acmd_arrange*3
  925.     elsif $game_party.battle_members.size>=5
  926.         self.x = actor.pos_x*@actor.index+acmd_arrange - item_width/2
  927.     end
  928.     self.y = actor.pos_y - self.height-100
  929.     clear_command_list
  930.     make_command_list
  931.     refresh
  932.     self.height = fitting_height(@list.size)
  933.     self.y = actor.pos_y - self.height-100
  934.     select(0)
  935.     activate
  936.     open
  937.   end
  938. end

  939. #==============================================================================
  940. # ■  Game_Actor 設定位置
  941. #==============================================================================
  942. class Game_Actor < Game_Battler
  943.   def pos_x
  944.     if $game_party.battle_members.size>=4
  945.       (Graphics.width-24) / $game_party.battle_members.size
  946.     elsif $game_party.battle_members.size==3
  947.       (Graphics.width-22-$game_system.face_item_width*2) / $game_party.battle_members.size
  948.     elsif $game_party.battle_members.size==2
  949.       (Graphics.width-20-$game_system.face_item_width*4) / $game_party.battle_members.size
  950.     elsif $game_party.battle_members.size==1
  951.       (Graphics.width-18-$game_system.face_item_width*6) / $game_party.battle_members.size
  952.     end
  953.   end
  954.   def pos_y
  955.     Graphics.height
  956.   end
  957. end
  958. #==============================================================================
  959. # ■  Game_Party 參戰人數
  960. #==============================================================================
  961. class Game_Party < Game_Unit
  962.   def max_battle_members
  963.     return YM_BATTLE_OPTION::MAXBM
  964.   end
  965. end

  966. #==============================================================================
  967. # ■ Window_ActorCommandSmall 簡易命令列製作
  968. #==============================================================================
  969. class Window_ActorCommandSmall < Window_HorzCommand
  970.   #--------------------------------------------------------------------------
  971.   # ●初始化
  972.   #--------------------------------------------------------------------------
  973.   def initialize
  974.     super(0, 0)
  975.     self.openness = 0
  976.     deactivate
  977.     @actor = nil
  978.     self.arrows_visible = false
  979.   end
  980.   #--------------------------------------------------------------------------
  981.   # ●移動處理
  982.   #--------------------------------------------------------------------------
  983.   def window_width
  984.     return  $game_party.battle_members.size>=6 ? 110 : 128
  985.   end
  986.   
  987.   def window_height
  988.     return 48
  989.   end
  990.   
  991.   def item_width
  992.     (width - standard_padding * 2 + spacing) /1  - spacing
  993.   end
  994.   
  995.   def col_max
  996.     return @list.size+1
  997.   end
  998.   
  999.   def row_max
  1000.     1
  1001.   end
  1002.   
  1003.   def page_col_max
  1004.     1
  1005.   end
  1006.   
  1007.   def col
  1008.     index / row_max
  1009.   end
  1010.   
  1011.   def top_col
  1012.     ox / (item_width + spacing)
  1013.   end
  1014.   
  1015.   def bottom_col
  1016.     top_col + page_col_max - 1
  1017.   end

  1018.   def bottom_col=(col)
  1019.     self.top_col = col - (page_col_max - 1)
  1020.   end

  1021.   def ensure_cursor_visible
  1022.     self.top_col = col if col < top_col
  1023.     self.bottom_col = col if col > bottom_col
  1024.   end
  1025.   
  1026.   def visible_line_number
  1027.     return 4
  1028.   end
  1029.   #--------------------------------------------------------------------------
  1030.   # ●箭頭繪製
  1031.   #--------------------------------------------------------------------------
  1032.   def draw_item(index)
  1033.     change_color(normal_color, command_enabled?(index))
  1034.     draw_text(item_rect_for_text(index), command_name(index), alignment)
  1035.     change_color(normal_color)
  1036.     contents.font.size = 16
  1037.     contents.font.name="Arial"
  1038.     if $game_party.battle_members.size>=6
  1039.     draw_text(item_rect_for_text(index), "◄       ►",alignment)
  1040.     else
  1041.     draw_text(item_rect_for_text(index), "◄        ►",alignment)
  1042.     end
  1043.     contents.font.name=Font.default_name
  1044.     contents.font.size = Font.default_size
  1045.     change_color(normal_color, command_enabled?(index))
  1046.   end
  1047.   #--------------------------------------------------------------------------
  1048.   # ●建立指令列
  1049.   #--------------------------------------------------------------------------
  1050.   def make_command_list
  1051.     return unless @actor
  1052.     add_attack_command
  1053.     add_skill_commands
  1054.     add_guard_command
  1055.     add_item_command
  1056.   end
  1057.   #--------------------------------------------------------------------------
  1058.   # ●增加攻擊指令
  1059.   #--------------------------------------------------------------------------
  1060.   def add_attack_command
  1061.     add_command(Vocab::attack, :attack, @actor.attack_usable?)
  1062.   end
  1063.   #--------------------------------------------------------------------------
  1064.   # ●增加技能指令
  1065.   #--------------------------------------------------------------------------
  1066.   def add_skill_commands
  1067.     @actor.added_skill_types.sort.each do |stype_id|
  1068.       name = $data_system.skill_types[stype_id]
  1069.       add_command(name, :skill, true, stype_id)
  1070.     end
  1071.   end
  1072.   #--------------------------------------------------------------------------
  1073.   # ●增加防禦指令
  1074.   #--------------------------------------------------------------------------
  1075.   def add_guard_command
  1076.     add_command(Vocab::guard, :guard, @actor.guard_usable?)
  1077.   end
  1078.   #--------------------------------------------------------------------------
  1079.   # ●增加物品指令
  1080.   #--------------------------------------------------------------------------
  1081.   def add_item_command
  1082.     add_command(Vocab::item, :item)
  1083.   end
  1084.   #--------------------------------------------------------------------------
  1085.   # ●建立
  1086.   #--------------------------------------------------------------------------
  1087.   def setup(actor)
  1088.     acmd_arrange = $game_system.face_item_width
  1089.     @actor = actor
  1090.     if $game_party.battle_members.size==4
  1091.         self.x = actor.pos_x*@actor.index+acmd_arrange - item_width/2
  1092.     elsif $game_party.battle_members.size==3
  1093.         self.x = actor.pos_x*@actor.index+acmd_arrange - item_width/2+acmd_arrange
  1094.     elsif $game_party.battle_members.size==2
  1095.         self.x = actor.pos_x*@actor.index+acmd_arrange - item_width/2+acmd_arrange*2
  1096.     elsif $game_party.battle_members.size==1
  1097.         self.x = actor.pos_x*@actor.index+acmd_arrange - item_width/2+acmd_arrange*3
  1098.     elsif $game_party.battle_members.size>=5
  1099.         self.x = actor.pos_x*@actor.index+acmd_arrange - item_width/2
  1100.     end
  1101.     self.y = actor.pos_y - self.height-100
  1102.     clear_command_list
  1103.     make_command_list
  1104.     refresh
  1105.     select(0)
  1106.     activate
  1107.     open
  1108.   end
  1109. end


  1110. #==============================================================================
  1111. # ■ Window_BattleStatus
  1112. #==============================================================================
  1113. class Window_BattleStatus < Window_Selectable
  1114.   #--------------------------------------------------------------------------
  1115.   # ● 初始化
  1116.   #--------------------------------------------------------------------------
  1117.   def initialize
  1118.     super(0, 8, Graphics.width, window_height)
  1119.     self.opacity = 0
  1120.     refresh
  1121.     self.openness = 0
  1122.   end
  1123.   #--------------------------------------------------------------------------
  1124.   # ● 高
  1125.   #--------------------------------------------------------------------------
  1126.   def window_height
  1127.     fitting_height(visible_line_number)
  1128.   end
  1129.   #--------------------------------------------------------------------------
  1130.   # ● 三條計量表行高
  1131.   #--------------------------------------------------------------------------
  1132.   def gauge_line_height
  1133.     return 16
  1134.   end
  1135.   #--------------------------------------------------------------------------
  1136.   # ● 行數
  1137.   #--------------------------------------------------------------------------
  1138.   def col_max
  1139.     return [item_max, 4].max
  1140.   end
  1141.   #--------------------------------------------------------------------------
  1142.   # ● 項目間隔
  1143.   #--------------------------------------------------------------------------
  1144.   def spacing
  1145.     return 0
  1146.   end
  1147.   #--------------------------------------------------------------------------
  1148.   # ● 項目繪製區
  1149.   #--------------------------------------------------------------------------
  1150.   def item_rect(index)
  1151.     rect = Rect.new
  1152.     rect.width = item_width
  1153.     rect.height = contents_height
  1154.     rect.x = index % col_max * (item_width + spacing)
  1155.     rect.y = index / col_max * contents_height
  1156.     rect
  1157.   end
  1158.   #--------------------------------------------------------------------------
  1159.   # ● 基本繪製區域
  1160.   #--------------------------------------------------------------------------
  1161.   def basic_area_rect(index)
  1162.     rect = item_rect_for_text(index)
  1163.     rect.height -= gauge_area_height
  1164.     rect
  1165.   end
  1166.   #--------------------------------------------------------------------------
  1167.   # ● 棒條繪製區域
  1168.   #--------------------------------------------------------------------------
  1169.   def gauge_area_rect(index)
  1170.     rect = item_rect_for_text(index)
  1171.     rect.y += contents_height - gauge_area_height - 8
  1172.     rect.height = gauge_area_height
  1173.     rect
  1174.   end
  1175.   #--------------------------------------------------------------------------
  1176.   # ● 棒條繪製區域高
  1177.   #--------------------------------------------------------------------------
  1178.   def gauge_area_height
  1179.     return (gauge_line_height * ($data_system.opt_display_tp ? 3 : 2))
  1180.   end
  1181.   #--------------------------------------------------------------------------
  1182.   # ● 內容繪製
  1183.   #--------------------------------------------------------------------------
  1184.   def draw_basic_area(rect, actor)
  1185.     $game_system.face_item_width=item_width/2
  1186.     bms=$game_party.battle_members.size
  1187.     if $data_system.opt_display_tp
  1188.       notpy=0
  1189.     else
  1190.       notpy=8
  1191.     end
  1192.     if YM_BATTLE_OPTION::BFC==true
  1193.       if actor.hp < actor.mhp / 2 && actor.hp > actor.mhp / 4
  1194.         draw_actor_face_yima2(actor, rect.x+item_width/2-52, rect.y+2, !actor.dead?)
  1195.       elsif actor.hp < actor.mhp / 4 && actor.hp > 0
  1196.         draw_actor_face_yima3(actor, rect.x+item_width/2-52, rect.y+2, !actor.dead?)
  1197.       elsif actor.hp == 0
  1198.         draw_actor_face_yima4(actor, rect.x+item_width/2-52, rect.y+2, !actor.dead?)
  1199.       else
  1200.         draw_actor_face_yima(actor, rect.x+item_width/2-52, rect.y+2, !actor.dead?)
  1201.       end
  1202.     else
  1203.       draw_actor_face_yima(actor, rect.x+item_width/2-52, rect.y+2, !actor.dead?)
  1204.     end
  1205.     draw_actor_icons(actor, rect.x, rect.y, rect.width+8)
  1206.   end
  1207.   #--------------------------------------------------------------------------
  1208.   # ● 計量表繪製
  1209.   #--------------------------------------------------------------------------
  1210.   def draw_gauge_area_with_tp(rect, actor)
  1211.     draw_actor_hp_ym(actor, rect.x, rect.y + gauge_line_height * 0, rect.width)
  1212.     draw_actor_mp_ym(actor, rect.x, rect.y + gauge_line_height * 1, rect.width)
  1213.     draw_actor_tp_ym(actor, rect.x, rect.y + gauge_line_height * 2, rect.width)
  1214.   end
  1215.   #--------------------------------------------------------------------------
  1216.   # ● 計量表繪製(無TP)
  1217.   #--------------------------------------------------------------------------
  1218.   def draw_gauge_area_without_tp(rect, actor)
  1219.     draw_actor_hp_ym(actor, rect.x, rect.y + gauge_line_height * 0-8, rect.width)
  1220.     draw_actor_mp_ym(actor, rect.x, rect.y + gauge_line_height * 1-8, rect.width)
  1221.   end
  1222. end

复制代码
梦石
0
星屑
2724
在线时间
227 小时
注册时间
2016-3-27
回帖
557
发表于 2018-2-1 10:02:55 | 显示全部楼层
无法攻击那个...我现在没有电脑,能想到的似乎只有闪避max这个设定了?
另外,图中两个敌人不都是没有血条的吗

点评

在指定敌人时才会看到  发表于 2018-2-1 21:06
左边是正常的 有血条 只是没放上  发表于 2018-2-1 20:52
现在还能改名吗qwq
回复

使用道具 举报

梦石
0
星屑
9292
在线时间
2504 小时
注册时间
2011-5-20
回帖
14521

开拓者

发表于 2018-2-1 10:09:47 | 显示全部楼层
另外 有办法做到无法指定攻击某个敌人吗?
给那个敌人加一个状态,然后在目标生成时就把带有某个状态的单位排除掉

点评

当然是动脚本···  发表于 2018-2-1 21:14
实际的做法呢? 需要用到脚本?  发表于 2018-2-1 21:05
[img]http://service.t.sina.com.cn/widget/qmd/5339802982/c02e16bd/7.png
回复

使用道具 举报

梦石
0
星屑
536
在线时间
69 小时
注册时间
2016-5-5
回帖
16
 楼主| 发表于 2018-2-2 22:07:15 | 显示全部楼层
求高手帮助
回复

使用道具 举报

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

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部