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

Project1

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

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

[复制链接]

Lv2.观梦者

梦石
0
星屑
536
在线时间
69 小时
注册时间
2016-5-5
帖子
31
跳转到指定楼层
1
发表于 2018-1-31 23:31:42 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

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

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




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

脚本
RUBY 代码复制
  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.  
  69. module YM_CURSOR_P
  70.  
  71. #調整敵人指標水平位置(左移:負數,右移:正數)
  72. CURSOR_PX = 0
  73.  
  74. #調整敵人指標垂直位置(上移:負數,下移:正數)
  75. CURSOR_PY = 190
  76.  
  77. #調整敵人指標小箭頭RGB顏色
  78. CURSOR_COLOR = Color.new(0,255,255)
  79.  
  80. #調整我方指標箭頭RGB顏色
  81. CURSOR_COLOR2 = Color.new(255,255,255)
  82.  
  83. end
  84.  
  85. module YM_BATTLE_OPTION
  86.  
  87. #最大參戰人數,建議不要超過六人
  88. MAXBM = 6
  89.  
  90. #設定計量表(HP、MP、TP)文字的字體大小。
  91. GAUGE_TEXTSIZE = 20
  92.  
  93. #設定計量表(HP、MP、TP)文字是否使用粗體。
  94. GAUGE_TEXTBOLD = true
  95.  
  96. #是否使用圖標取代傳統HP、MP、TP文字
  97. GAUGE_ICON_USE =  false
  98. #HP圖標編號(GAUGE_ICON_USE =  true才有效)
  99. GAUGE_ICON_HP =  187
  100. #MP圖標編號(GAUGE_ICON_USE =  true才有效)
  101. GAUGE_ICON_MP =  188
  102. #TP圖標編號(GAUGE_ICON_USE =  true才有效)
  103. GAUGE_ICON_TP =  189
  104.  
  105. #是否使用隨血量改變表情功能
  106. BFC = false
  107.  
  108. #是否使用簡易版角色指令列,簡易版不支援指令選項加上圖標腳本
  109. SMALL_ACMD = false
  110.  
  111. #指標資訊顯示敵人名稱或血量百分比(true=敵人名稱,false=血量百分比)
  112. ENEMY_NAMEORPERCENT = true
  113.  
  114. #是否導入姨媽自訂計量條顏色腳本的設定
  115. GAUGE_COLOR_HAVE = false
  116.  
  117. #遊戲畫面大小是否為640*480?若是請用true,沒改過請保持false
  118. GW640GH480 = false
  119.  
  120. end
  121.  
  122.  
  123. #==============================================================================
  124. # ■ Game_System
  125. #==============================================================================
  126. class Game_System
  127.   attr_accessor :ba_x
  128.   attr_accessor :ba_y
  129.   attr_accessor :al_x
  130.   attr_accessor :al_y
  131.   attr_accessor :wd_hide
  132.   attr_accessor :face_item_width
  133.   alias yima_bv2_initialize initialize
  134.   def initialize
  135.     yima_bv2_initialize
  136.     @ba_x = 0
  137.     @ba_y = 0
  138.     @al_x = 0
  139.     @al_y = 0
  140.     @wd_hide = 0
  141.     @face_item_width = 0
  142.   end
  143. end
  144.  
  145. #==============================================================================
  146. # ■ Scene_Battle
  147. #==============================================================================
  148. class Scene_Battle < Scene_Base
  149. include YM_CURSOR_P
  150.   if YM_BATTLE_OPTION::GW640GH480 == false
  151.     GW=12
  152.   else
  153.     GW=4
  154.   end
  155.   #-------------------------------------------------------------------------
  156.   # ● 資訊載入
  157.   #-------------------------------------------------------------------------
  158.   def update_info_viewport
  159.     if YM_BATTLE_OPTION::GW640GH480 == false
  160.       move_info_viewport(560)   if @party_command_window.active
  161.       move_info_viewport(560) if @actor_command_window.active
  162.       move_info_viewport(560)  if BattleManager.in_turn?
  163.     else
  164.       move_info_viewport(656)   if @party_command_window.active
  165.       move_info_viewport(656) if @actor_command_window.active
  166.       move_info_viewport(656)  if BattleManager.in_turn?
  167.     end
  168.     @enemy_window.x =  $game_system.ba_x+YM_CURSOR_P::CURSOR_PX
  169.     @enemy_window.y =  $game_system.ba_y+YM_CURSOR_P::CURSOR_PY
  170.     @enemy_cursor_window.x =  $game_system.ba_x+YM_CURSOR_P::CURSOR_PX
  171.     @enemy_cursor_window.y =  $game_system.ba_y+28+YM_CURSOR_P::CURSOR_PY
  172.     if $game_party.battle_members.size==4
  173.         @actor_window.x = $game_system.al_x*@actor_window.index-GW
  174.     elsif $game_party.battle_members.size==3
  175.         @actor_window.x = $game_system.al_x*@actor_window.index-GW+$game_system.face_item_width
  176.     elsif $game_party.battle_members.size==2
  177.         @actor_window.x = $game_system.al_x*@actor_window.index-GW+$game_system.face_item_width*2
  178.     elsif $game_party.battle_members.size==1
  179.         @actor_window.x = $game_system.al_x*@actor_window.index-GW+$game_system.face_item_width*3
  180.     elsif $game_party.battle_members.size==5
  181.         @actor_window.x = $game_system.al_x*@actor_window.index-GW-$game_system.face_item_width/3
  182.     elsif $game_party.battle_members.size>=6
  183.         @actor_window.x = $game_system.al_x*@actor_window.index-GW-$game_system.face_item_width/2
  184.     end
  185.     @actor_window.y = Graphics.height/4*3-56
  186.   end
  187.   #--------------------------------------------------------------------------
  188.   # ● 調整主狀態欄位置
  189.   #--------------------------------------------------------------------------
  190.   def move_info_viewport(ox)
  191.     current_ox = @info_viewport.ox
  192.      if YM_BATTLE_OPTION::GW640GH480 == false
  193.     @info_viewport.ox = [ox, current_ox + 28].min if current_ox < ox
  194.     @info_viewport.ox = [ox, current_ox - 28].max if current_ox > ox
  195.     else
  196.     @info_viewport.ox = [ox, current_ox + 36].min if current_ox < ox
  197.     @info_viewport.ox = [ox, current_ox - 36].max if current_ox > ox
  198.     end
  199.   end
  200.   #--------------------------------------------------------------------------
  201.   # ● 主狀態欄
  202.   #--------------------------------------------------------------------------
  203.   def create_status_window
  204.     @status_window = Window_BattleStatus.new
  205.     if YM_BATTLE_OPTION::GW640GH480 == false
  206.         if $game_party.battle_members.size>=4
  207.           @status_window.x = 560
  208.         elsif $game_party.battle_members.size==3
  209.           @status_window.x = 560 + $game_system.face_item_width
  210.         elsif $game_party.battle_members.size==2
  211.           @status_window.x = 560 + $game_system.face_item_width*2
  212.         elsif $game_party.battle_members.size==1
  213.           @status_window.x = 560 + $game_system.face_item_width*3
  214.         end
  215.       else
  216.         if $game_party.battle_members.size>=4
  217.           @status_window.x = 656
  218.         elsif $game_party.battle_members.size==3
  219.           @status_window.x = 656 + $game_system.face_item_width
  220.         elsif $game_party.battle_members.size==2
  221.           @status_window.x = 656 + $game_system.face_item_width*2
  222.         elsif $game_party.battle_members.size==1
  223.           @status_window.x = 656 + $game_system.face_item_width*3
  224.         end
  225.       end
  226.     end
  227.   #--------------------------------------------------------------------------
  228.   # ● 角色命令欄
  229.   #--------------------------------------------------------------------------
  230.   def create_actor_command_window
  231.     if YM_BATTLE_OPTION::SMALL_ACMD==true
  232.       @actor_command_window = Window_ActorCommandSmall.new
  233.     else
  234.       @actor_command_window = Window_ActorCommand.new
  235.     end
  236.     @actor_command_window.set_handler(:attack, method(:command_attack))
  237.     @actor_command_window.set_handler(:skill,  method(:command_skill))
  238.     @actor_command_window.set_handler(:guard,  method(:command_guard))
  239.     @actor_command_window.set_handler(:item,   method(:command_item))
  240.     @actor_command_window.set_handler(:cancel, method(:prior_command))
  241.   end
  242.  
  243.   #--------------------------------------------------------------------------
  244.   # ● 小隊命令列
  245.   #--------------------------------------------------------------------------
  246.   def create_party_command_window
  247.     @party_command_window = Window_PartyCommand.new
  248.     @party_command_window.set_handler(:fight,  method(:command_fight))
  249.     @party_command_window.set_handler(:escape, method(:command_escape))
  250.     @party_command_window.unselect
  251.   end
  252.   #--------------------------------------------------------------------------
  253.   # ● 選擇我方目標的視窗
  254.   #--------------------------------------------------------------------------
  255.   def create_actor_window
  256.     @actor_window = Window_BattleActor_Neo.new(@info_viewport)
  257.     @actor_window.set_handler(:ok,     method(:on_actor_ok))
  258.     @actor_window.set_handler(:cancel, method(:on_actor_cancel))
  259.     if $game_party.battle_members.size==4
  260.         @actor_window.x = $game_system.al_x*@actor_window.index-GW
  261.     elsif $game_party.battle_members.size==3
  262.         @actor_window.x = $game_system.al_x*@actor_window.index-GW+$game_system.face_item_width
  263.     elsif $game_party.battle_members.size==2
  264.         @actor_window.x = $game_system.al_x*@actor_window.index-GW+$game_system.face_item_width*2
  265.     elsif $game_party.battle_members.size==1
  266.         @actor_window.x = $game_system.al_x*@actor_window.index-GW+$game_system.face_item_width*3
  267.     elsif $game_party.battle_members.size==5
  268.         @actor_window.x = $game_system.al_x*@actor_window.index-GW-$game_system.face_item_width/3
  269.     elsif $game_party.battle_members.size>=6
  270.         @actor_window.x = $game_system.al_x*@actor_window.index-GW-$game_system.face_item_width/2
  271.     end
  272.     @actor_window.y = Graphics.height/4*3-56
  273.   end
  274.   #--------------------------------------------------------------------------
  275.   # ● 選擇敵方目標的視窗
  276.   #--------------------------------------------------------------------------
  277.   def create_enemy_window
  278.     @enemy_window = Window_BattleEnemy.new(@info_viewport)
  279.     @enemy_cursor_window = Window_EnemyCursor.new(@info_viewport)
  280.     @enemy_window.set_handler(:ok,     method(:on_enemy_ok))
  281.     @enemy_window.set_handler(:cancel, method(:on_enemy_cancel))
  282.     @enemy_window.x =  $game_system.ba_x+YM_CURSOR_P::CURSOR_PX
  283.     @enemy_window.y =  $game_system.ba_y+YM_CURSOR_P::CURSOR_PY
  284.     @enemy_cursor_window.x =  $game_system.ba_x+YM_CURSOR_P::CURSOR_PX
  285.     @enemy_cursor_window.y =  $game_system.ba_y+20+YM_CURSOR_P::CURSOR_PY
  286.   end
  287.   #--------------------------------------------------------------------------
  288.   # ● 下一個隊友
  289.   #--------------------------------------------------------------------------
  290.   def next_command
  291.     if BattleManager.next_command
  292.       start_actor_command_selection
  293.       @actor_command_window.show
  294.     else
  295.       turn_start
  296.     end
  297.   end
  298.   #--------------------------------------------------------------------------
  299.   # ● 選擇隊友時
  300.   #--------------------------------------------------------------------------
  301.   alias yima_bv2_select_actor_selection select_actor_selection
  302.   def select_actor_selection
  303.     yima_bv2_select_actor_selection
  304.     @actor_command_window.hide
  305.   end
  306.   #--------------------------------------------------------------------------
  307.   # ● 取消選擇隊友
  308.   #--------------------------------------------------------------------------
  309.   alias yima_bv2_on_actor_cancel on_actor_cancel
  310.   def on_actor_cancel
  311.     yima_bv2_on_actor_cancel
  312.     if $game_system.wd_hide==1
  313.     @actor_command_window.show
  314.     else
  315.     @actor_command_window.hide
  316.     end
  317.   end
  318.   #--------------------------------------------------------------------------
  319.   # ● 選擇敵人
  320.   #--------------------------------------------------------------------------
  321.   alias yima_bv2_select_enemy_selection select_enemy_selection
  322.   def select_enemy_selection
  323.     yima_bv2_select_enemy_selection
  324.     @enemy_cursor_window.refresh
  325.     @enemy_cursor_window.show.activate
  326.     @skill_window.hide
  327.     @item_window.hide
  328.     @actor_command_window.hide
  329.   end
  330.   #--------------------------------------------------------------------------
  331.   # ● 敵人決定
  332.   #--------------------------------------------------------------------------
  333.   def on_enemy_ok
  334.     BattleManager.actor.input.target_index = @enemy_window.enemy.index
  335.     @enemy_window.hide
  336.     @enemy_cursor_window.hide
  337.     @skill_window.hide
  338.     @item_window.hide
  339.     next_command
  340.   end
  341.   #--------------------------------------------------------------------------
  342.   # ●  取消選擇敵人
  343.   #--------------------------------------------------------------------------
  344.   def on_enemy_cancel
  345.     @enemy_window.hide
  346.     @enemy_cursor_window.hide   
  347.     case @actor_command_window.current_symbol
  348.     when :attack
  349.       @actor_command_window.activate
  350.     when :skill
  351.       @skill_window.activate.show
  352.     when :item
  353.       @item_window.activate.show
  354.     end
  355.     if $game_system.wd_hide==1
  356.     @actor_command_window.show
  357.     else
  358.     @actor_command_window.hide
  359.     end
  360.   end
  361.  
  362.   alias yima_bv2_command_skill  command_skill
  363.   def command_skill
  364.     yima_bv2_command_skill
  365.     if $game_system.wd_hide==1
  366.     @actor_command_window.show.activate
  367.     else
  368.     @actor_command_window.hide
  369.     end
  370.   end
  371.  
  372.   alias yima_bv2_command_item command_item
  373.   def command_item
  374.     yima_bv2_command_item
  375.     if $game_system.wd_hide==1
  376.     @actor_command_window.show.activate
  377.     else
  378.     @actor_command_window.hide
  379.     end
  380.   end
  381.  
  382.   def on_skill_cancel
  383.     @skill_window.hide
  384.     if $game_system.wd_hide==1
  385.     @actor_command_window.show.activate
  386.     else
  387.     @actor_command_window.hide
  388.     end
  389.   end
  390.  
  391.   def on_item_cancel
  392.     @item_window.hide
  393.     if $game_system.wd_hide==1
  394.     @actor_command_window.show.activate
  395.     else
  396.     @actor_command_window.hide
  397.     end
  398.   end
  399.  
  400. end
  401.  
  402. #==============================================================================
  403. # ■ Window_Base
  404. #==============================================================================
  405. class Window_Base < Window
  406.   include YM_BATTLE_OPTION
  407.   #--------------------------------------------------------------------------
  408.   # ● 臉圖重切,預設96*96太大張會壓在血條下面不好看
  409.   #--------------------------------------------------------------------------
  410.   def draw_actor_face_yima(actor, x, y, enabled = true)
  411.     draw_face_m(actor.face_name, actor.face_index, x, y, enabled)
  412.     contents.font.name="VL Gothic"
  413.     contents.font.bold = YM_BATTLE_OPTION::GAUGE_TEXTBOLD
  414.   end
  415.   def draw_actor_face_yima2(actor, x, y, enabled = true)
  416.     draw_face_m2(actor.face_name, actor.face_index, x, y, enabled)
  417.   end
  418.   def draw_actor_face_yima3(actor, x, y, enabled = true)
  419.     draw_face_m3(actor.face_name, actor.face_index, x, y, enabled)
  420.   end
  421.   def draw_actor_face_yima4(actor, x, y, enabled = true)
  422.     draw_face_m4(actor.face_name, actor.face_index, x, y, enabled)
  423.   end
  424.   def draw_face_m(face_name, face_index, x, y, enabled = true)
  425.     bitmap = Cache.face(face_name)
  426.     rect = Rect.new(face_index % 4 * 96,  face_index>=4 ? (face_index+16) / 4 * 24 : (face_index+4) / 4 * 24, 96, 48)
  427.     contents.blt(x, y, bitmap, rect, enabled ? 255 : translucent_alpha)
  428.     bitmap.dispose
  429.   end
  430.   def draw_face_m2(face_name, face_index, x, y, enabled = true)
  431.     bitmap = Cache.face(face_name)
  432.     rect = Rect.new((face_index+1) % 4 * 96,  face_index>=4 ? (face_index+16) / 4 * 24 : (face_index+4) / 4 * 24, 96, 48)
  433.     contents.blt(x, y, bitmap, rect, enabled ? 255 : translucent_alpha)
  434.     bitmap.dispose
  435.   end
  436.   def draw_face_m3(face_name, face_index, x, y, enabled = true)
  437.     bitmap = Cache.face(face_name)
  438.     rect = Rect.new((face_index+2) % 4 * 96,  face_index>=4 ? (face_index+16) / 4 * 24 : (face_index+4) / 4 * 24, 96, 48)
  439.     contents.blt(x, y, bitmap, rect, enabled ? 255 : translucent_alpha)
  440.     bitmap.dispose
  441.   end
  442.   def draw_face_m4(face_name, face_index, x, y, enabled = true)
  443.     bitmap = Cache.face(face_name)
  444.     rect = Rect.new((face_index+3) % 4 * 96,  face_index>=4 ? (face_index+16) / 4 * 24 : (face_index+4) / 4 * 24, 96, 48)
  445.     contents.blt(x, y, bitmap, rect, enabled ? 255 : translucent_alpha)
  446.     bitmap.dispose
  447.   end
  448.   #--------------------------------------------------------------------------
  449.   # ● HP 繪製微調
  450.   #--------------------------------------------------------------------------
  451.   def draw_actor_hp_ym(actor, x, y, width = 124)
  452.     if YM_BATTLE_OPTION::GAUGE_ICON_USE ==  true
  453.         if YM_BATTLE_OPTION::GAUGE_COLOR_HAVE == true
  454.           draw_gauge(x+14, y, width-14, actor.hp_rate, YM_GAUGE_COLOR::HP_COLOR1, YM_GAUGE_COLOR::HP_COLOR2)
  455.         else
  456.           draw_gauge(x+14, y, width-14, actor.hp_rate, hp_gauge_color1, hp_gauge_color2)
  457.         end
  458.     else
  459.       if YM_BATTLE_OPTION::GAUGE_COLOR_HAVE == true
  460.         draw_gauge(x, y, width, actor.hp_rate, YM_GAUGE_COLOR::HP_COLOR1, YM_GAUGE_COLOR::HP_COLOR2)
  461.       else
  462.         draw_gauge(x, y, width, actor.hp_rate, hp_gauge_color1, hp_gauge_color2)
  463.       end
  464.     end
  465.     change_color(system_color)
  466.     contents.font.size=YM_BATTLE_OPTION::GAUGE_TEXTSIZE
  467.     if YM_BATTLE_OPTION::GAUGE_ICON_USE == true
  468.       draw_icon(YM_BATTLE_OPTION::GAUGE_ICON_HP, x-4, y+2)
  469.     else
  470.       draw_text(x, y+4, 30, line_height, Vocab::hp_a)
  471.     end
  472.     if $game_party.battle_members.size>=5
  473.     draw_current_values_ym(x, y+4, width, actor.hp, actor.mhp,hp_color(actor), normal_color)
  474.     else
  475.     draw_current_and_max_values(x, y+4, width, actor.hp, actor.mhp,hp_color(actor), normal_color)
  476.     end
  477.   end
  478.   #--------------------------------------------------------------------------
  479.   # ● MP 繪製微調
  480.   #--------------------------------------------------------------------------
  481.   def draw_actor_mp_ym(actor, x, y, width = 124)
  482.     if YM_BATTLE_OPTION::GAUGE_ICON_USE ==  true
  483.       if YM_BATTLE_OPTION::GAUGE_COLOR_HAVE == true
  484.         draw_gauge(x+14, y, width-14, actor.mp_rate, YM_GAUGE_COLOR::MP_COLOR1, YM_GAUGE_COLOR::MP_COLOR2)
  485.       else
  486.         draw_gauge(x+14, y, width-14, actor.mp_rate, mp_gauge_color1, mp_gauge_color2)
  487.       end
  488.     else
  489.       if YM_BATTLE_OPTION::GAUGE_COLOR_HAVE == true
  490.         draw_gauge(x, y, width, actor.mp_rate, YM_GAUGE_COLOR::MP_COLOR1, YM_GAUGE_COLOR::MP_COLOR2)
  491.       else
  492.         draw_gauge(x, y, width, actor.mp_rate, mp_gauge_color1, mp_gauge_color2)
  493.       end
  494.     end
  495.     change_color(system_color)
  496.     contents.font.size=YM_BATTLE_OPTION::GAUGE_TEXTSIZE
  497.     if YM_BATTLE_OPTION::GAUGE_ICON_USE == true
  498.       draw_icon(YM_BATTLE_OPTION::GAUGE_ICON_MP, x-4, y+2)
  499.     else
  500.       draw_text(x, y+4, 30, line_height, Vocab::mp_a)
  501.     end
  502.     if $game_party.battle_members.size>=5
  503.     draw_current_values_ym(x, y+4, width, actor.mp, actor.mmp,mp_color(actor), normal_color)
  504.     else
  505.     draw_current_and_max_values(x, y+4, width, actor.mp, actor.mmp,mp_color(actor), normal_color)
  506.     end
  507.   end
  508.   #--------------------------------------------------------------------------
  509.   # ● TP 繪製微調
  510.   #--------------------------------------------------------------------------
  511.   def draw_actor_tp_ym(actor, x, y, width = 124)
  512.     if YM_BATTLE_OPTION::GAUGE_ICON_USE ==  true
  513.       if YM_BATTLE_OPTION::GAUGE_COLOR_HAVE == true
  514.         draw_gauge(x+14, y, width-14, actor.tp_rate, YM_GAUGE_COLOR::TP_COLOR1, YM_GAUGE_COLOR::TP_COLOR2)
  515.       else
  516.         draw_gauge(x+14, y, width-14, actor.tp_rate, tp_gauge_color1, tp_gauge_color2)
  517.       end
  518.     else
  519.       if YM_BATTLE_OPTION::GAUGE_COLOR_HAVE == true
  520.         draw_gauge(x, y, width, actor.tp_rate, YM_GAUGE_COLOR::TP_COLOR1, YM_GAUGE_COLOR::TP_COLOR2)
  521.       else
  522.         draw_gauge(x, y, width, actor.tp_rate, tp_gauge_color1, tp_gauge_color2)
  523.       end
  524.     end
  525.     change_color(system_color)
  526.     contents.font.size=YM_BATTLE_OPTION::GAUGE_TEXTSIZE
  527.     if YM_BATTLE_OPTION::GAUGE_ICON_USE == true
  528.       draw_icon(YM_BATTLE_OPTION::GAUGE_ICON_TP, x-4, y+2)
  529.     else
  530.       draw_text(x, y+4, 30, line_height, Vocab::tp_a)
  531.     end
  532.     change_color(tp_color(actor))
  533.     draw_text(x + width - 42, y+4, 42, line_height, actor.tp.to_i, 2)
  534.   end
  535.  
  536.   #--------------------------------------------------------------------------
  537.   # ● 不顯示最大值時
  538.   #--------------------------------------------------------------------------
  539.   def draw_current_values_ym(x, y, width, current, max, color1, color2)
  540.     change_color(color1)
  541.     xr = x + width
  542.     draw_text(xr - 42, y, 42, line_height, current, 2)
  543.   end
  544.  
  545. end
  546.  
  547. #==============================================================================
  548. # ■ Window_BattleEnemy 指標上方資訊
  549. #==============================================================================
  550. class Window_BattleEnemy < Window_Selectable
  551.  
  552.   #--------------------------------------------------------------------------
  553.   # ●初始化
  554.   #--------------------------------------------------------------------------
  555.   def initialize(info_viewport)
  556.     super(0,0, window_width, fitting_height(1)+8)
  557.     refresh
  558.     self.visible = false
  559.     self.arrows_visible = false
  560.   end
  561.   #--------------------------------------------------------------------------
  562.   # ●行數
  563.   #--------------------------------------------------------------------------
  564.   def col_max
  565.     return 1
  566.   end
  567.   #--------------------------------------------------------------------------
  568.   # ●寬度
  569.   #--------------------------------------------------------------------------
  570.   def window_width
  571.     return 200
  572.     end
  573.   #--------------------------------------------------------------------------
  574.   # ●每格高度
  575.   #--------------------------------------------------------------------------
  576.   def item_height
  577.     return  32
  578.   end
  579.   #--------------------------------------------------------------------------
  580.   # ●視窗顯示
  581.   #--------------------------------------------------------------------------
  582.   def show
  583.       width_remain = Graphics.width - width
  584.       select(0)
  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.     super
  591.   end
  592.   #--------------------------------------------------------------------------
  593.   # ●移動處理
  594.   #--------------------------------------------------------------------------
  595.   def process_cursor_move
  596.     return unless cursor_movable?
  597.     last_index = @index
  598.     cursor_down (Input.trigger?(:DOWN))  if Input.repeat?(:DOWN)
  599.     cursor_up   (Input.trigger?(:UP))    if Input.repeat?(:UP)
  600.     cursor_down(Input.trigger?(:RIGHT)) if Input.repeat?(:RIGHT)
  601.     cursor_up (Input.trigger?(:LEFT))  if Input.repeat?(:LEFT)
  602.     cursor_pagedown   if !handle?(:pagedown) && Input.trigger?(:R)
  603.     cursor_pageup     if !handle?(:pageup)   && Input.trigger?(:L)
  604.     Sound.play_cursor if @index != last_index
  605.   end
  606.  
  607.   def cursor_down(wrap = false)
  608.     if index < item_max - col_max || (wrap && col_max == 1)
  609.       select((index + col_max) % item_max)
  610.       $game_system.ba_x=$game_troop.alive_members[index].screen_x-width/2
  611.       $game_system.ba_y=$game_troop.alive_members[index].screen_y-battler_graphic.height-70
  612.       if $game_troop.alive_members[index].enemy.note.include?("指標調整")
  613.       $game_system.ba_y=$game_troop.alive_members[index].screen_y-battler_graphic.height
  614.       end
  615.     end
  616.   end
  617.  
  618.   def cursor_up(wrap = false)
  619.     if index >= col_max || (wrap && col_max == 1)
  620.       select((index - col_max + item_max) % item_max)
  621.       $game_system.ba_x=$game_troop.alive_members[index].screen_x-width/2
  622.       $game_system.ba_y=$game_troop.alive_members[index].screen_y-battler_graphic.height-70
  623.       if $game_troop.alive_members[index].enemy.note.include?("指標調整")
  624.       $game_system.ba_y=$game_troop.alive_members[index].screen_y-battler_graphic.height
  625.       end
  626.     end
  627.   end
  628.  
  629.   def update_cursor
  630.     if @cursor_all
  631.       cursor_rect.set(0, 0, contents.width, row_max * item_height)
  632.     self.top_row = 0
  633.     elsif @index < 0
  634.       cursor_rect.empty
  635.     else
  636.       ensure_cursor_visible
  637.     end
  638.   end
  639.  
  640.   def battler_graphic
  641.     Cache.battler(enemy.battler_name, enemy.battler_hue)
  642.   end
  643.  
  644.   #--------------------------------------------------------------------------
  645.   # ● 項目繪製
  646.   #--------------------------------------------------------------------------
  647.   def draw_item(index)
  648.     change_color(normal_color)
  649.     name = $game_troop.alive_members[index].name
  650.     draw_text(item_rect_for_text_1(index), name,1) if YM_BATTLE_OPTION::ENEMY_NAMEORPERCENT == true
  651.     draw_hp(index)
  652.  
  653.   end
  654.  
  655.   #--------------------------------------------------------------------------
  656.   # ● 微調位置
  657.   #--------------------------------------------------------------------------
  658.   def item_rect_for_text_1(index)
  659.     rect = item_rect(index)
  660.     rect.x += 4
  661.     rect.y -= 6
  662.     rect.width -= 8
  663.     rect
  664.   end
  665.  
  666.   #--------------------------------------------------------------------------
  667.   # ● 敵HP繪製
  668.   #--------------------------------------------------------------------------
  669.   def draw_hp(index)
  670.     rect = item_rect_for_text(index)
  671.     w = rect.width
  672.     x =  0
  673.     hp = $game_troop.alive_members[index].hp_rate
  674.      if YM_BATTLE_OPTION::GAUGE_COLOR_HAVE == true
  675.       draw_gauge(x+3, rect.y+5, w, hp, YM_GAUGE_COLOR::HP_COLOR1,YM_GAUGE_COLOR::HP_COLOR2)
  676.     else
  677.       draw_gauge(x+3, rect.y+5, w, hp, hp_gauge_color1, hp_gauge_color2)
  678.     end
  679.     if YM_BATTLE_OPTION::ENEMY_NAMEORPERCENT == false
  680.     contents.font.name="VL Gothic"
  681.     contents.font.bold = YM_BATTLE_OPTION::GAUGE_TEXTBOLD
  682.     contents.font.size=YM_BATTLE_OPTION::GAUGE_TEXTSIZE
  683.     change_color(system_color)
  684.     draw_text(x+3, rect.y-2, 100, line_height, Vocab::hp_a)
  685.     eee = $game_troop.alive_members[index]
  686.     change_color(normal_color)
  687.     draw_en_hp_values(x+3, rect.y, width, eee.hp, eee.mhp, normal_color, normal_color)
  688.     contents.font.name=Font.default_name
  689.     else
  690.     end
  691.   end
  692.  
  693.   def draw_en_hp_values(x, y, width, current, max, color1, color2)
  694.     change_color(color1)
  695.     xr = x + width
  696.     draw_text(xr-84 , y-2, 42, line_height, current*100/max,2)
  697.     draw_text(xr-72, y-2, 42, line_height, "%", 2)
  698.   end
  699.  
  700. end
  701.  
  702. #==============================================================================
  703. # ■ Window_BattleActor_Neo  我方指標製作
  704. #==============================================================================
  705. class Window_BattleActor_Neo < Window_Selectable
  706.  
  707.   def initialize(info_viewport)
  708.     super(0, info_viewport.rect.y, window_width, fitting_height(4))
  709.     refresh
  710.     self.openness = 255
  711.     self.visible = false
  712.     self.arrows_visible = false
  713.     select(0)
  714.     contents.font.name="VL Gothic"
  715.     self.opacity = 0
  716.   end
  717.  
  718.   def window_width
  719.    184
  720.   end
  721.  
  722.   def window_height
  723.     fitting_height(line_number)
  724.   end
  725.  
  726.   def visible_line_number
  727.     return 4
  728.   end
  729.  
  730.   def item_height
  731.    60
  732.   end
  733.  
  734.   def item_max
  735.    $game_party.battle_members.size
  736. end
  737.  
  738.   def update_cursor
  739.     if @cursor_all
  740.       cursor_rect.set(0, 0, contents.width, row_max * item_height)
  741.       self.top_row = 0
  742.     elsif @index < 0
  743.       cursor_rect.empty
  744.     else
  745.       ensure_cursor_visible
  746.     end
  747.   end
  748.  
  749.   def refresh
  750.     contents.clear
  751.     draw_all_items
  752.   end
  753.  
  754.   def draw_item(index)
  755.     change_color(normal_color)
  756.     contents.font.size = 50
  757.     contents.font.color.set(YM_CURSOR_P::CURSOR_COLOR2)
  758.     draw_text(item_rect_for_text(index), "▼",1)
  759.   end
  760.  
  761.   def basic_area_rect(index)
  762.     rect = item_rect_for_text(index)
  763.     rect.width -= gauge_area_width + 10
  764.     rect
  765.   end
  766.  
  767.   def gauge_area_rect(index)
  768.     rect = item_rect_for_text(index)
  769.     rect.x += rect.width - gauge_area_width
  770.     rect.width = gauge_area_width
  771.     rect
  772.   end
  773.  
  774.   def gauge_area_width
  775.     return 220
  776.   end
  777.  
  778.   def pos_x
  779.     if $game_party.battle_members.size>=4
  780.       (Graphics.width-24) / $game_party.battle_members.size
  781.     elsif $game_party.battle_members.size==3
  782.       (Graphics.width-22-$game_system.face_item_width*2) / $game_party.battle_members.size
  783.     elsif $game_party.battle_members.size==2
  784.       (Graphics.width-20-$game_system.face_item_width*4) / $game_party.battle_members.size
  785.     elsif $game_party.battle_members.size==1
  786.       (Graphics.width-18-$game_system.face_item_width*6) / $game_party.battle_members.size
  787.     end
  788.   end
  789.  
  790.   def pos_y
  791.     Graphics.height
  792.   end
  793.  
  794.   #--------------------------------------------------------------------------
  795.   # ●移動處理
  796.   #--------------------------------------------------------------------------
  797.   def process_cursor_move
  798.     return unless cursor_movable?
  799.     last_index = @index
  800.     cursor_down(Input.trigger?(:RIGHT)) if Input.repeat?(:RIGHT)
  801.     cursor_up (Input.trigger?(:LEFT))  if Input.repeat?(:LEFT)
  802.     cursor_pagedown   if !handle?(:pagedown) && Input.trigger?(:R)
  803.     cursor_pageup     if !handle?(:pageup)   && Input.trigger?(:L)
  804.     Sound.play_cursor if @index != last_index
  805.   end
  806.  
  807.   def cursor_down(wrap = false)
  808.     if index < item_max - col_max || (wrap && col_max == 1)
  809.       select((index + col_max) % item_max)
  810.     end
  811.   end
  812.  
  813.  
  814.   def cursor_up(wrap = false)
  815.     if index >= col_max || (wrap && col_max == 1)
  816.       select((index - col_max + item_max) % item_max)
  817.     end
  818.   end
  819.  
  820.  
  821.   def show
  822.     $game_system.al_x=pos_x
  823.     $game_system.al_y=pos_y
  824.     if @info_viewport
  825.       width_remain = Graphics.width - width
  826.       self.x = width_remain
  827.       @info_viewport.rect.width = width_remain
  828.       select(0)
  829.     end
  830.     super
  831.   end
  832.  
  833.   def hide
  834.     @info_viewport.rect.width = Graphics.width if @info_viewport
  835.     super
  836.   end
  837. end
  838.  
  839. #==============================================================================
  840. # ■ Window_PartyCommand 小隊命令
  841. #==============================================================================
  842. class Window_PartyCommand < Window_Command
  843.   def initialize
  844.     super(Graphics.width/2-window_width/2, 108)
  845.     self.openness = 0
  846.     deactivate
  847.   end
  848.   def alignment
  849.     return 1
  850.   end
  851.   def window_width
  852.     return 108
  853.   end
  854.   def window_height
  855.     return 72
  856.   end
  857. end
  858.  
  859. #==============================================================================
  860. # ■ Window_EnemyCursor 指標製作
  861. #==============================================================================
  862. class Window_EnemyCursor < Window_Selectable
  863.  
  864.   def initialize(info_viewport)
  865.     super(0, 0, window_width, fitting_height(2))
  866.     refresh
  867.     self.visible = false
  868.     self.opacity = 0
  869.   end
  870.  
  871.   def window_width
  872.     200
  873.   end
  874.  
  875.   def col_max
  876.     return 1
  877.   end
  878.  
  879.   def item_height
  880.    48
  881.   end
  882.  
  883.   def item_max
  884.     1
  885.   end
  886.  
  887.   def draw_item(index)
  888.     change_color(normal_color)
  889.     contents.font.size = 35
  890.     contents.font.name="Arial"
  891.     contents.font.color.set(YM_CURSOR_P::CURSOR_COLOR)
  892.     draw_text(item_rect_for_text(index), "▲",1)#▼",1)
  893.   end
  894.  
  895.   def update_cursor
  896.     if @cursor_all
  897.       cursor_rect.set(0, 0, contents.width, row_max * item_height)
  898.       self.top_row = 0
  899.     elsif @index < 0
  900.       cursor_rect.empty
  901.     else
  902.       ensure_cursor_visible
  903.     end
  904.   end
  905.  
  906.   def show
  907.       width_remain = Graphics.width - width
  908.       self.x = width_remain
  909.       select(0)
  910.     super
  911.   end
  912.  
  913.   def hide
  914.     super
  915.   end
  916. end
  917.  
  918. #==============================================================================
  919. # ■ Window_BattleSkill 視窗資訊暫存
  920. #==============================================================================
  921. class Window_BattleSkill < Window_SkillList
  922.  
  923.   alias yima_bv2_show show
  924.   def show
  925.       $game_system.wd_hide=0
  926.       yima_bv2_show
  927.   end
  928.  
  929.   alias yima_bv2_hide hide
  930.   def hide
  931.       $game_system.wd_hide=1
  932.       yima_bv2_hide
  933.   end
  934.  
  935. end
  936.  
  937. #==============================================================================
  938. # ■ Window_BattleItem 視窗資訊暫存
  939. #==============================================================================
  940. class Window_BattleItem < Window_ItemList
  941.  
  942.   alias yima_bv2_show show
  943.   def show
  944.       $game_system.wd_hide=0
  945.       yima_bv2_show
  946.   end
  947.  
  948.   alias yima_bv2_hide hide
  949.   def hide
  950.       $game_system.wd_hide=1
  951.       yima_bv2_hide
  952.   end
  953.  
  954. end
  955.  
  956. #==============================================================================
  957. # ■ Window_ActorCommand 角色指令
  958. #==============================================================================
  959. class Window_ActorCommand < Window_Command
  960.   alias yima_bacmd_initialize initialize
  961.   def initialize
  962.     yima_bacmd_initialize
  963.     self.arrows_visible = false
  964.   end
  965.   #--------------------------------------------------------------------------
  966.   # ●寬
  967.   #--------------------------------------------------------------------------
  968.   def window_width
  969.     return  $game_party.battle_members.size>=6 ? 110 : 128
  970.   end
  971.   #--------------------------------------------------------------------------
  972.   # ●設定位置
  973.   #--------------------------------------------------------------------------
  974.   def setup(actor)
  975.     acmd_arrange = $game_system.face_item_width
  976.     @actor = actor
  977.     if $game_party.battle_members.size==4
  978.         self.x = actor.pos_x*@actor.index+acmd_arrange - item_width/2
  979.     elsif $game_party.battle_members.size==3
  980.         self.x = actor.pos_x*@actor.index+acmd_arrange - item_width/2+acmd_arrange
  981.     elsif $game_party.battle_members.size==2
  982.         self.x = actor.pos_x*@actor.index+acmd_arrange - item_width/2+acmd_arrange*2
  983.     elsif $game_party.battle_members.size==1
  984.         self.x = actor.pos_x*@actor.index+acmd_arrange - item_width/2+acmd_arrange*3
  985.     elsif $game_party.battle_members.size>=5
  986.         self.x = actor.pos_x*@actor.index+acmd_arrange - item_width/2
  987.     end
  988.     self.y = actor.pos_y - self.height-100
  989.     clear_command_list
  990.     make_command_list
  991.     refresh
  992.     self.height = fitting_height(@list.size)
  993.     self.y = actor.pos_y - self.height-100
  994.     select(0)
  995.     activate
  996.     open
  997.   end
  998. end
  999.  
  1000. #==============================================================================
  1001. # ■  Game_Actor 設定位置
  1002. #==============================================================================
  1003. class Game_Actor < Game_Battler
  1004.   def pos_x
  1005.     if $game_party.battle_members.size>=4
  1006.       (Graphics.width-24) / $game_party.battle_members.size
  1007.     elsif $game_party.battle_members.size==3
  1008.       (Graphics.width-22-$game_system.face_item_width*2) / $game_party.battle_members.size
  1009.     elsif $game_party.battle_members.size==2
  1010.       (Graphics.width-20-$game_system.face_item_width*4) / $game_party.battle_members.size
  1011.     elsif $game_party.battle_members.size==1
  1012.       (Graphics.width-18-$game_system.face_item_width*6) / $game_party.battle_members.size
  1013.     end
  1014.   end
  1015.   def pos_y
  1016.     Graphics.height
  1017.   end
  1018. end
  1019. #==============================================================================
  1020. # ■  Game_Party 參戰人數
  1021. #==============================================================================
  1022. class Game_Party < Game_Unit
  1023.   def max_battle_members
  1024.     return YM_BATTLE_OPTION::MAXBM
  1025.   end
  1026. end
  1027.  
  1028. #==============================================================================
  1029. # ■ Window_ActorCommandSmall 簡易命令列製作
  1030. #==============================================================================
  1031. class Window_ActorCommandSmall < Window_HorzCommand
  1032.   #--------------------------------------------------------------------------
  1033.   # ●初始化
  1034.   #--------------------------------------------------------------------------
  1035.   def initialize
  1036.     super(0, 0)
  1037.     self.openness = 0
  1038.     deactivate
  1039.     @actor = nil
  1040.     self.arrows_visible = false
  1041.   end
  1042.   #--------------------------------------------------------------------------
  1043.   # ●移動處理
  1044.   #--------------------------------------------------------------------------
  1045.   def window_width
  1046.     return  $game_party.battle_members.size>=6 ? 110 : 128
  1047.   end
  1048.  
  1049.   def window_height
  1050.     return 48
  1051.   end
  1052.  
  1053.   def item_width
  1054.     (width - standard_padding * 2 + spacing) /1  - spacing
  1055.   end
  1056.  
  1057.   def col_max
  1058.     return @list.size+1
  1059.   end
  1060.  
  1061.   def row_max
  1062.     1
  1063.   end
  1064.  
  1065.   def page_col_max
  1066.     1
  1067.   end
  1068.  
  1069.   def col
  1070.     index / row_max
  1071.   end
  1072.  
  1073.   def top_col
  1074.     ox / (item_width + spacing)
  1075.   end
  1076.  
  1077.   def bottom_col
  1078.     top_col + page_col_max - 1
  1079.   end
  1080.  
  1081.   def bottom_col=(col)
  1082.     self.top_col = col - (page_col_max - 1)
  1083.   end
  1084.  
  1085.   def ensure_cursor_visible
  1086.     self.top_col = col if col < top_col
  1087.     self.bottom_col = col if col > bottom_col
  1088.   end
  1089.  
  1090.   def visible_line_number
  1091.     return 4
  1092.   end
  1093.   #--------------------------------------------------------------------------
  1094.   # ●箭頭繪製
  1095.   #--------------------------------------------------------------------------
  1096.   def draw_item(index)
  1097.     change_color(normal_color, command_enabled?(index))
  1098.     draw_text(item_rect_for_text(index), command_name(index), alignment)
  1099.     change_color(normal_color)
  1100.     contents.font.size = 16
  1101.     contents.font.name="Arial"
  1102.     if $game_party.battle_members.size>=6
  1103.     draw_text(item_rect_for_text(index), "◄       ►",alignment)
  1104.     else
  1105.     draw_text(item_rect_for_text(index), "◄        ►",alignment)
  1106.     end
  1107.     contents.font.name=Font.default_name
  1108.     contents.font.size = Font.default_size
  1109.     change_color(normal_color, command_enabled?(index))
  1110.   end
  1111.   #--------------------------------------------------------------------------
  1112.   # ●建立指令列
  1113.   #--------------------------------------------------------------------------
  1114.   def make_command_list
  1115.     return unless @actor
  1116.     add_attack_command
  1117.     add_skill_commands
  1118.     add_guard_command
  1119.     add_item_command
  1120.   end
  1121.   #--------------------------------------------------------------------------
  1122.   # ●增加攻擊指令
  1123.   #--------------------------------------------------------------------------
  1124.   def add_attack_command
  1125.     add_command(Vocab::attack, :attack, @actor.attack_usable?)
  1126.   end
  1127.   #--------------------------------------------------------------------------
  1128.   # ●增加技能指令
  1129.   #--------------------------------------------------------------------------
  1130.   def add_skill_commands
  1131.     @actor.added_skill_types.sort.each do |stype_id|
  1132.       name = $data_system.skill_types[stype_id]
  1133.       add_command(name, :skill, true, stype_id)
  1134.     end
  1135.   end
  1136.   #--------------------------------------------------------------------------
  1137.   # ●增加防禦指令
  1138.   #--------------------------------------------------------------------------
  1139.   def add_guard_command
  1140.     add_command(Vocab::guard, :guard, @actor.guard_usable?)
  1141.   end
  1142.   #--------------------------------------------------------------------------
  1143.   # ●增加物品指令
  1144.   #--------------------------------------------------------------------------
  1145.   def add_item_command
  1146.     add_command(Vocab::item, :item)
  1147.   end
  1148.   #--------------------------------------------------------------------------
  1149.   # ●建立
  1150.   #--------------------------------------------------------------------------
  1151.   def setup(actor)
  1152.     acmd_arrange = $game_system.face_item_width
  1153.     @actor = actor
  1154.     if $game_party.battle_members.size==4
  1155.         self.x = actor.pos_x*@actor.index+acmd_arrange - item_width/2
  1156.     elsif $game_party.battle_members.size==3
  1157.         self.x = actor.pos_x*@actor.index+acmd_arrange - item_width/2+acmd_arrange
  1158.     elsif $game_party.battle_members.size==2
  1159.         self.x = actor.pos_x*@actor.index+acmd_arrange - item_width/2+acmd_arrange*2
  1160.     elsif $game_party.battle_members.size==1
  1161.         self.x = actor.pos_x*@actor.index+acmd_arrange - item_width/2+acmd_arrange*3
  1162.     elsif $game_party.battle_members.size>=5
  1163.         self.x = actor.pos_x*@actor.index+acmd_arrange - item_width/2
  1164.     end
  1165.     self.y = actor.pos_y - self.height-100
  1166.     clear_command_list
  1167.     make_command_list
  1168.     refresh
  1169.     select(0)
  1170.     activate
  1171.     open
  1172.   end
  1173. end
  1174.  
  1175.  
  1176. #==============================================================================
  1177. # ■ Window_BattleStatus
  1178. #==============================================================================
  1179. class Window_BattleStatus < Window_Selectable
  1180.   #--------------------------------------------------------------------------
  1181.   # ● 初始化
  1182.   #--------------------------------------------------------------------------
  1183.   def initialize
  1184.     super(0, 8, Graphics.width, window_height)
  1185.     self.opacity = 0
  1186.     refresh
  1187.     self.openness = 0
  1188.   end
  1189.   #--------------------------------------------------------------------------
  1190.   # ● 高
  1191.   #--------------------------------------------------------------------------
  1192.   def window_height
  1193.     fitting_height(visible_line_number)
  1194.   end
  1195.   #--------------------------------------------------------------------------
  1196.   # ● 三條計量表行高
  1197.   #--------------------------------------------------------------------------
  1198.   def gauge_line_height
  1199.     return 16
  1200.   end
  1201.   #--------------------------------------------------------------------------
  1202.   # ● 行數
  1203.   #--------------------------------------------------------------------------
  1204.   def col_max
  1205.     return [item_max, 4].max
  1206.   end
  1207.   #--------------------------------------------------------------------------
  1208.   # ● 項目間隔
  1209.   #--------------------------------------------------------------------------
  1210.   def spacing
  1211.     return 0
  1212.   end
  1213.   #--------------------------------------------------------------------------
  1214.   # ● 項目繪製區
  1215.   #--------------------------------------------------------------------------
  1216.   def item_rect(index)
  1217.     rect = Rect.new
  1218.     rect.width = item_width
  1219.     rect.height = contents_height
  1220.     rect.x = index % col_max * (item_width + spacing)
  1221.     rect.y = index / col_max * contents_height
  1222.     rect
  1223.   end
  1224.   #--------------------------------------------------------------------------
  1225.   # ● 基本繪製區域
  1226.   #--------------------------------------------------------------------------
  1227.   def basic_area_rect(index)
  1228.     rect = item_rect_for_text(index)
  1229.     rect.height -= gauge_area_height
  1230.     rect
  1231.   end
  1232.   #--------------------------------------------------------------------------
  1233.   # ● 棒條繪製區域
  1234.   #--------------------------------------------------------------------------
  1235.   def gauge_area_rect(index)
  1236.     rect = item_rect_for_text(index)
  1237.     rect.y += contents_height - gauge_area_height - 8
  1238.     rect.height = gauge_area_height
  1239.     rect
  1240.   end
  1241.   #--------------------------------------------------------------------------
  1242.   # ● 棒條繪製區域高
  1243.   #--------------------------------------------------------------------------
  1244.   def gauge_area_height
  1245.     return (gauge_line_height * ($data_system.opt_display_tp ? 3 : 2))
  1246.   end
  1247.   #--------------------------------------------------------------------------
  1248.   # ● 內容繪製
  1249.   #--------------------------------------------------------------------------
  1250.   def draw_basic_area(rect, actor)
  1251.     $game_system.face_item_width=item_width/2
  1252.     bms=$game_party.battle_members.size
  1253.     if $data_system.opt_display_tp
  1254.       notpy=0
  1255.     else
  1256.       notpy=8
  1257.     end
  1258.     if YM_BATTLE_OPTION::BFC==true
  1259.       if actor.hp < actor.mhp / 2 && actor.hp > actor.mhp / 4
  1260.         draw_actor_face_yima2(actor, rect.x+item_width/2-52, rect.y+2, !actor.dead?)
  1261.       elsif actor.hp < actor.mhp / 4 && actor.hp > 0
  1262.         draw_actor_face_yima3(actor, rect.x+item_width/2-52, rect.y+2, !actor.dead?)
  1263.       elsif actor.hp == 0
  1264.         draw_actor_face_yima4(actor, rect.x+item_width/2-52, rect.y+2, !actor.dead?)
  1265.       else
  1266.         draw_actor_face_yima(actor, rect.x+item_width/2-52, rect.y+2, !actor.dead?)
  1267.       end
  1268.     else
  1269.       draw_actor_face_yima(actor, rect.x+item_width/2-52, rect.y+2, !actor.dead?)
  1270.     end
  1271.     draw_actor_icons(actor, rect.x, rect.y, rect.width+8)
  1272.   end
  1273.   #--------------------------------------------------------------------------
  1274.   # ● 計量表繪製
  1275.   #--------------------------------------------------------------------------
  1276.   def draw_gauge_area_with_tp(rect, actor)
  1277.     draw_actor_hp_ym(actor, rect.x, rect.y + gauge_line_height * 0, rect.width)
  1278.     draw_actor_mp_ym(actor, rect.x, rect.y + gauge_line_height * 1, rect.width)
  1279.     draw_actor_tp_ym(actor, rect.x, rect.y + gauge_line_height * 2, rect.width)
  1280.   end
  1281.   #--------------------------------------------------------------------------
  1282.   # ● 計量表繪製(無TP)
  1283.   #--------------------------------------------------------------------------
  1284.   def draw_gauge_area_without_tp(rect, actor)
  1285.     draw_actor_hp_ym(actor, rect.x, rect.y + gauge_line_height * 0-8, rect.width)
  1286.     draw_actor_mp_ym(actor, rect.x, rect.y + gauge_line_height * 1-8, rect.width)
  1287.   end
  1288. end

Lv3.寻梦者

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

点评

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

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
9280
在线时间
2504 小时
注册时间
2011-5-20
帖子
15389

开拓者

3
发表于 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
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
536
在线时间
69 小时
注册时间
2016-5-5
帖子
31
4
 楼主| 发表于 2018-2-2 22:07:15 | 只看该作者
求高手帮助
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-11-17 09:40

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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