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

Project1

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

[有事请教] 【物品颜色描绘】在背包栏中无颜色。

[复制链接]

Lv1.梦旅人

梦石
0
星屑
112
在线时间
68 小时
注册时间
2024-1-8
帖子
18
跳转到指定楼层
1
发表于 昨天 18:05 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
50星屑
经过初步排查。

先附带物品颜色脚本
  1. #==========================================================================
  2. #  ■ 物品颜色描绘 Ver.1.3  - By 柍若
  3. #     ItemLevelDrawer
  4. #------------------------------------------------------------------------------
  5. #    Item类窗口中给图标描绘彩色边框以表示品质等级,同时改变名称颜色。
  6. #     物品、技能、装备等适用。
  7. #==============================================================================
  8. #
  9. #    - 2014.02.05 By 柍若
  10. #      * [ BUG修正 ]重定义品质判定算法,兼容性更良。   
  11. #      * [    优化 ]简化写法(基本是重写了)。              
  12. #      * [    补充 ]无限扩张品级数目。支持自定义。    
  13. #      * [    补充 ]添加背景块,支持不透明度设定。    
  14. #      * [  新功能 ]美化品质框,可选圆角或方角形状。   
  15. #      * [    优化 ]修正名称文字显示位置。          
  16. #      * [  新功能 ]定义全局自动/ 手动描绘两种模式可切换。
  17. #      * [  新功能 ]物品名称可用控制符。
  18. #
  19. #------------------------------------------------------------------------------
  20. #      基于以下脚本
  21. #      改写已取得两位作者同意
  22. #==============================================================================
  23. #    - 2012.01.03 By 仲秋启明
  24. #      * 修改为VA定义
  25. #    - 2011.12.27 By 仲秋启明
  26. #      * 移植至RGSS3,遵循PS0协议;
  27. #      * 优化数据库备注中设定方法
  28. #    - 2011.08.22 By 冰舞蝶恋
  29. #      * 蓝本(实用·极简 -- 按品质,给物品描绘色彩边框)
  30. #    - 2010.08.06 By 仲秋启明
  31. #      * 蓝本(物品颜色描绘脚本(完整无冲突版))
  32. #------------------------------------------------------------------------------
  33. # [使用说明]
  34. #    - 替换原Window_Base中的draw_item_name定义或复制到Main之前
  35. #------------------------------------------------------------------------------
  36. # [使用方法]
  37. #    - 在备注栏内填写"<品质 n>",其中n表示品质等级。
  38. #==============================================================================
  39. module ItemLevelDrawer
  40. #==============================================================================
  41.                  
  42.     # true: 默认全局描绘    / false: 手动设置描绘
  43.    
  44.     WhenZero = false   # 开启则当品质为0(即不填)时,默认描绘品质1颜色
  45. #------------------------------------------------------------------------------

  46.     # true: 圆角    / false: 方角
  47.    
  48.     CornerShape = true
  49. #------------------------------------------------------------------------------

  50.     # 背景块不透明度
  51.    
  52.     BackOpacity = 0
  53. #------------------------------------------------------------------------------
  54.    
  55.     # 各品质颜色设置,预设7种,可自行添加新品级
  56.     # 数据库设定的品质大于下列品质的最大值时,将不描绘品质
  57.    
  58.     ColorSet = [[255, 255, 255],   # 备注 <品质 1> 或不填    [ 白 ]
  59.    
  60.                 [128, 255, 128],   # 备注 <品质 2>        [ 绿 ]
  61.                  
  62.                 [128, 128, 255],   # 备注 <品质 3>        [ 蓝 ]
  63.                  
  64.                 [255,   0, 255],   # 备注 <品质 4>        [ 紫 ]
  65.                  
  66.                 [255, 128, 128],   # 备注 <品质 5>        [ 红 ]
  67.                  
  68.                 [255, 128,   0],   # 备注 <品质 6>        [ 橙 ]
  69.                  
  70.                 [255, 255, 128],   # 备注 <品质 7>        [ 黄 ]
  71.                  
  72.                 ]
  73. #==============================================================================
  74. end
  75. #==============================================================================
  76. # ■ Window_Base
  77. #==============================================================================
  78. class Window_Base < Window
  79.   alias din2 draw_item_name
  80.   def draw_item_name(item, x, y, enabled = true, width = 172)
  81.     return unless item
  82.     n = $1.to_i if /<品质 (\d+?)>/i =~ item.note
  83.     x += 2
  84.     return din2(item, x, y, enabled, width) unless n or ItemLevelDrawer::WhenZero and n.to_i <= ItemLevelDrawer::ColorSet.size
  85.     n -= 1 if n and n >= 1
  86.     n = 0 unless n
  87.     n = ItemLevelDrawer::ColorSet[n.to_i]
  88.     self.contents.fill_rect(x+1, y+2, 22, 20, Color.new(n[0], n[1], n[2], ItemLevelDrawer::BackOpacity))
  89.     s = 1 if ItemLevelDrawer::CornerShape
  90.     self.contents.fill_rect(x+s.to_i, y+1, 24-s.to_i*2, 1, Color.new(n[0], n[1], n[2]))
  91.     self.contents.fill_rect(x, y+s.to_i+1, 1, 22-s.to_i*2, Color.new(n[0], n[1], n[2]))
  92.     self.contents.fill_rect(x+s.to_i, y+22, 24-s.to_i*2, 1, Color.new(n[0], n[1], n[2]))
  93.     self.contents.fill_rect(x+23, y+s.to_i+1, 1, 22-s.to_i*2, Color.new(n[0], n[1], n[2]))
  94.     draw_icon(item.icon_index, x, y, enabled)
  95.     change_color(Color.new(n[0], n[1], n[2]), enabled)
  96.     draw_text_ex(x + 30, y, item.name, Color.new(n[0], n[1], n[2]))
  97.   end
  98.   def draw_text_ex(x, y, text, initial_color = normal_color)
  99.     reset_font_settings(initial_color)
  100.     text = convert_escape_characters(text)
  101.     pos = {:x => x, :y => y, :new_x => x, :height => calc_line_height(text)}
  102.     process_character(text.slice!(0, 1), text, pos) until text.empty?
  103.   end
  104.   def reset_font_settings(initial_color = normal_color)
  105.     change_color(initial_color)
  106.     contents.font.size = Font.default_size
  107.     contents.font.bold = Font.default_bold
  108.     contents.font.italic = Font.default_italic
  109.   end
  110. end
  111. #==============================================================================
  112. # End of Script
  113. #==============================================================================
复制代码


该脚本可以给物品(装备)在装备栏中和背包栏中附上颜色。

但不知道为什么,和以下mog——战斗hugex脚本同时应用下。
物品的颜色在背包中处于无效状态,必须装备上才有用。
求助大佬们

  1. #==============================================================================
  2. # +++ MOG - 战斗 Hud EX (v6.6) +++
  3. #==============================================================================
  4. # By Moghunter
  5. # https://atelierrgss.wordpress.com/
  6. #==============================================================================
  7. # 可以在战斗画面中显示各种自定义HUD图片。
  8. # 全部图片放在文件夹:
  9. #
  10. # Graphics/Huds/Battle/
  11. #==============================================================================
  12. # 显示或隐藏战斗Hud的脚本
  13. #
  14. # battle_hud_visible(false)
  15. #
  16. # 或
  17. #
  18. # battle_hud_visible(true)
  19. #
  20. #==============================================================================
  21. # 改变脸图的脚本
  22. #==============================================================================
  23. #
  24. # battler_face_name( 角色ID, 脸图文件名 )
  25. #
  26. #==============================================================================

  27. #==============================================================================
  28. # Atualizações desta versão.
  29. #==============================================================================
  30. # (ver 6.6)
  31. #      - Correção do Crash caso optar por desativar o layout das janelas.
  32. # (ver 6.5)
  33. #      - Melhoria no cálculo da posição Z.
  34. #      - Correção de travar o menu.
  35. # (ver 6.4)
  36. #      - Correção do glitch de aparecer um pedaço da Windowskin quando se
  37. #        usa mais de 4 battlers na batalha.
  38. # (ver 6.3)
  39. #      - Compatibilidade com o MOG Battle Camera.
  40. # (ver 6.2)
  41. #     - Refresh da hud ao trocar a posição dos personagens.
  42. # (ver 6.0)
  43. #     - Adição da camada da tela.
  44. #     - Adição do efeito Slide.
  45. #     - Adição de novas opções referente a fonte.
  46. #==============================================================================

  47. $imported = {} if $imported.nil?
  48. $imported[:mog_battle_hud_ex] = true

  49. module MOG_BATTLE_HUD_EX
  50.   
  51.   #============================================================================
  52.   #============================================================================
  53.   # * HUD 精灵 (通用)
  54.   #============================================================================
  55.   # 最大战斗角色数.
  56.   #---------------------------------------------------------------------------
  57.   MAX_BATTLE_MEMBERS = 4
  58.   #---------------------------------------------------------------------------
  59.   # hud的Z坐标.
  60.   #---------------------------------------------------------------------------
  61.   HUD_Z = 0
  62.   #---------------------------------------------------------------------------
  63.   # hud的位置.
  64.   #---------------------------------------------------------------------------
  65.   HUD_POSITION = [0,323]
  66.   #---------------------------------------------------------------------------
  67.   # 调整数字间距
  68.   #---------------------------------------------------------------------------
  69.   MEMBERS_SPACE = [0,0]
  70.   #---------------------------------------------------------------------------
  71.   # 修改指定HUD的位置
  72.   #
  73.   # FIXED_POSITION[索引ID] = [X,Y]
  74.   #
  75.   #---------------------------------------------------------------------------
  76.   FIXED_HUD_POSITION = []
  77.   # FIXED_HUD_POSITION[0] = [10,10]
  78.   # FIXED_HUD_POSITION[1] = [410,10]
  79.   # FIXED_HUD_POSITION[2] = [10,320]
  80.   # FIXED_HUD_POSITION[3] = [410,320]
  81.   #---------------------------------------------------------------------------
  82.   # 修改指定指令窗口的位置
  83.   #---------------------------------------------------------------------------
  84.   FIXED_COMMAND_POSITION = []
  85.   #FIXED_COMMAND_POSITION[0] = [130,10]
  86.   # FIXED_COMMAND_POSITION[1] = [300,10]
  87.   # FIXED_COMMAND_POSITION[2] = [130,290]
  88.   # FIXED_COMMAND_POSITION[3] = [300,290]
  89.   #---------------------------------------------------------------------------
  90.   # 是否在显示文章时隐藏HUD.
  91.   #---------------------------------------------------------------------------
  92.   MESSAGE_WINDOW_FADE_HUD = true
  93.   #---------------------------------------------------------------------------
  94.   # 设置视为低数值的百分比,这会影响HP、MP、TP的颜色。有快消耗完时改变值槽颜色的
  95.   # 效果
  96.   #---------------------------------------------------------------------------
  97.   LOW_PARAMETER_PERCENTAGE = 30
  98.   #============================================================================
  99.   #============================================================================
  100.   
  101.   
  102.   #============================================================================
  103.   #============================================================================
  104.   # * 名字
  105.   #============================================================================
  106.   # 是否显示名字的精灵
  107.   #---------------------------------------------------------------------------
  108.   NAME_VISIBLE = true
  109.   #---------------------------------------------------------------------------
  110.   # 名字精灵的Z坐标
  111.   #---------------------------------------------------------------------------  
  112.   NAME_Z = 1
  113.   #---------------------------------------------------------------------------
  114.   # 名字位置. [X,Y]
  115.   #---------------------------------------------------------------------------
  116.   NAME_POSITION = [0,40]
  117.   #---------------------------------------------------------------------------
  118.   # 设定对齐方式.
  119.   #
  120.   # 0 - 左
  121.   # 1 - 中
  122.   # 2 - 右
  123.   #---------------------------------------------------------------------------  
  124.   NAME_ALIGN_TYPE = 0
  125.   #---------------------------------------------------------------------------
  126.   # 字体
  127.   #---------------------------------------------------------------------------
  128.   NAME_FONT_NAME = "黑体"
  129.   #---------------------------------------------------------------------------
  130.   # 字体大小
  131.   #---------------------------------------------------------------------------   
  132.   NAME_FONT_SIZE = 16
  133.   #---------------------------------------------------------------------------
  134.   # 是否加粗
  135.   #---------------------------------------------------------------------------   
  136.   NAME_FONT_BOLD = true
  137.   #---------------------------------------------------------------------------
  138.   # 是否斜体
  139.   #---------------------------------------------------------------------------   
  140.   NAME_FONT_ITALIC = true
  141.   #---------------------------------------------------------------------------
  142.   # 字体颜色
  143.   #---------------------------------------------------------------------------     
  144.   NAME_FONT_COLOR = Color.new(255,255,255,255)
  145.   #---------------------------------------------------------------------------
  146.   # 是否显示字体阴影
  147.   #---------------------------------------------------------------------------  
  148.   NAME_FONT_SHADOW = false
  149.   #---------------------------------------------------------------------------
  150.   # 字体阴影的颜色
  151.   #---------------------------------------------------------------------------   
  152.   NAME_FONT_SHADOW_COLOR = Color.new(0,0,0,255)
  153.   #---------------------------------------------------------------------------
  154.   # 字体阴影的位置
  155.   #---------------------------------------------------------------------------   
  156.   NAME_FONT_SHADOW_POSITION = [2,2]  
  157.   #============================================================================
  158.   #============================================================================
  159.    
  160.   
  161.   #============================================================================
  162.   #============================================================================
  163.   # * 脸图
  164.   #============================================================================
  165.   # 是否显示脸图.
  166.   # 需要图片:
  167.   #
  168.   # 角色名 + _Face.png
  169.   #
  170.   # Eric_Face.png
  171.   #
  172.   #---------------------------------------------------------------------------
  173.   FACE_VISIBLE = true
  174.   # 是否将角色的脸图作为其战斗图
  175.   # 如果脚本出现问题请设定为"false".
  176.   FACE_BATTLER = true
  177.   #---------------------------------------------------------------------------
  178.   # 脸图的Z坐标.
  179.   #---------------------------------------------------------------------------  
  180.   FACE_Z = 0
  181.   #---------------------------------------------------------------------------
  182.   # 脸图的位置. [X,Y]
  183.   #---------------------------------------------------------------------------
  184.   FACE_POSITION = [40,-5]
  185.   #---------------------------------------------------------------------------
  186.   # 是否显示脸图动画.
  187.   # 你需要一张可以分成五分的图片.
  188.   #
  189.   # FACE1/FACE2/FACE3/FACE4
  190.   #
  191.   #---------------------------------------------------------------------------  
  192.   FACE_ANIMATION = false
  193.   #---------------------------------------------------------------------------
  194.   # 是否显示脸图的缩放动画
  195.   #---------------------------------------------------------------------------
  196.   FACE_ZOOM_ANIMATION = false
  197.   #---------------------------------------------------------------------------
  198.   # 是否显示脸图镜像效果.
  199.   #---------------------------------------------------------------------------
  200.   FACE_ZOOM_MIRROR_EFFECT = false
  201.   #---------------------------------------------------------------------------
  202.   # 脸图动画的时间.
  203.   #---------------------------------------------------------------------------  
  204.   FACE_ANIMATION_DURATION = 40
  205.   #---------------------------------------------------------------------------
  206.   # 是否显示脸图震动效果.
  207.   #---------------------------------------------------------------------------  
  208.   FACE_SHAKE_EFFECT = true
  209.   #============================================================================
  210.   #============================================================================
  211.   
  212.   
  213.   #============================================================================
  214.   #============================================================================
  215.   # * 回合数 (实时数值)
  216.   #============================================================================
  217.   # 是否显示回合数的图片
  218.   # 需要图片
  219.   #
  220.   # Turn.png
  221.   #
  222.   #---------------------------------------------------------------------------
  223.   TURN_SPRITE_VISIBLE = true
  224.   #---------------------------------------------------------------------------
  225.   # 回合数图片精灵Z坐标.
  226.   #---------------------------------------------------------------------------   
  227.   TURN_SPRITE_Z = 0
  228.   #---------------------------------------------------------------------------
  229.   # 回合数图片位置
  230.   #---------------------------------------------------------------------------  
  231.   TURN_SPRITE_POSITION = [-8,-30]
  232.   #---------------------------------------------------------------------------  
  233.   # 是否显示闪烁效果
  234.   #---------------------------------------------------------------------------  
  235.   TURN_BLINK_EFFECT = true
  236.   #---------------------------------------------------------------------------  
  237.    
  238.   
  239.   #============================================================================
  240.   #============================================================================
  241.   # * HP
  242.   #============================================================================
  243.   # 是否显示HP数字图片
  244.   # 需要图片
  245.   #
  246.   # HP_Number.png
  247.   #
  248.   #---------------------------------------------------------------------------
  249.   HP_NUMBER_VISIBLE = true
  250.   #---------------------------------------------------------------------------
  251.   # Hp数字的Z坐标
  252.   #---------------------------------------------------------------------------   
  253.   HP_NUMBER_Z = 1
  254.   #---------------------------------------------------------------------------
  255.   # HP数字的位置. [X,Y]
  256.   #---------------------------------------------------------------------------  
  257.   HP_NUMBER_POSITION = [147,9]
  258.   #---------------------------------------------------------------------------  
  259.   # 是否显示HP总量数字的图片.
  260.   # 需要图片:
  261.   #
  262.   # HP_Number_Max.png
  263.   #
  264.   #---------------------------------------------------------------------------
  265.   HP_NUMBER_MAX_VISIBLE = false
  266.   #---------------------------------------------------------------------------
  267.   # HP总量数字的位置. [X,Y]
  268.   #---------------------------------------------------------------------------  
  269.   HP_NUMBER_MAX_POSITION = [163,30]
  270.   #---------------------------------------------------------------------------
  271.   # 设定数字对齐方式.
  272.   #
  273.   # 0 - 左
  274.   # 1 - 中
  275.   # 2 - 右
  276.   #---------------------------------------------------------------------------  
  277.   HP_NUMBER_ALIGN_TYPE = 2
  278.   #---------------------------------------------------------------------------
  279.   # 是否显示数字波浪形对齐方式.
  280.   #---------------------------------------------------------------------------
  281.   HP_NUMBER_WAVE_ALIGN_EFFECT = false
  282.   #---------------------------------------------------------------------------
  283.   # 是否以百分比显示数字
  284.   #---------------------------------------------------------------------------   
  285.   HP_NUMBER_PERCENTAGE = false
  286.   #---------------------------------------------------------------------------
  287.   # 是否显示数字动画效果 ("滚动").
  288.   #---------------------------------------------------------------------------  
  289.   HP_NUMBER_ANIMATION = true
  290.   #---------------------------------------------------------------------------
  291.   # 是否在HP低下时显示另一张颜色的图片作为HP数字.
  292.   # 需要一张被分成两帧高的图片
  293.   #
  294.   # 普通颜色
  295.   # 低下时颜色
  296.   #
  297.   # 如果你设定为false则图片会被分成一帧高.
  298.   #---------------------------------------------------------------------------  
  299.   HP_NUMBER_LOW_COLOR = false
  300.   #---------------------------------------------------------------------------
  301.   # 是否使用 HP 条图片.
  302.   # 需要图片.
  303.   #
  304.   # HP_Meter.png
  305.   #  
  306.   #---------------------------------------------------------------------------  
  307.   HP_METER_VISIBLE = true
  308.   #---------------------------------------------------------------------------
  309.   # 设定HP条的Z坐标.
  310.   #---------------------------------------------------------------------------   
  311.   HP_METER_Z = 1
  312.   #---------------------------------------------------------------------------
  313.   # 设定HP条的位置. [X,Y]
  314.   #---------------------------------------------------------------------------  
  315.   HP_METER_POSITION = [88,23]
  316.   #---------------------------------------------------------------------------
  317.   # 设定HP条的倾角.
  318.   #---------------------------------------------------------------------------  
  319.   HP_METER_ANGLE = 0
  320.   #---------------------------------------------------------------------------
  321.   # 是否显示HP条的镜像效果
  322.   #---------------------------------------------------------------------------  
  323.   HP_METER_MIRROR_EFFECT = false
  324.   #---------------------------------------------------------------------------
  325.   # 是否使用HP条在角色受到伤害时显示不同的颜色的效果
  326.   # 需要一张被分成两帧高的图片
  327.   #
  328.   # 普通颜色
  329.   # 受伤颜色
  330.   #
  331.   # 设定为false则显示普通效果.
  332.   #---------------------------------------------------------------------------  
  333.   HP_METER_REDUCTION_ANIMATION = true
  334.   #---------------------------------------------------------------------------
  335.   #是否使用HP条的动画流动效果,需要一张宽度为正常大小三倍的图片,图片需要有颜色
  336.   #梯度变化来表现"流动"的效果。
  337.   #设定为false则显示普通效果.
  338.   #---------------------------------------------------------------------------  
  339.   HP_METER_GRADIENT_ANIMATION = true
  340.   #---------------------------------------------------------------------------
  341.   # 是否显示HP图标图片.
  342.   # 需要图片:
  343.   #
  344.   # HP_Icon.png
  345.   #
  346.   #---------------------------------------------------------------------------
  347.   HP_ICON_VISIBLE = false
  348.   #---------------------------------------------------------------------------
  349.   # HP图标的Z坐标
  350.   #---------------------------------------------------------------------------   
  351.   HP_ICON_Z = 1
  352.   #---------------------------------------------------------------------------
  353.   # HP图标的位置.
  354.   #---------------------------------------------------------------------------  
  355.   HP_ICON_POSITION = [200,0]
  356.   #---------------------------------------------------------------------------
  357.   # 是否使用HP图标EX ,其作为HP图标的最后一个图标
  358.   # 需要图片:
  359.   #
  360.   # HP_Icon_EX.png
  361.   #
  362.   #---------------------------------------------------------------------------
  363.   HP_ICON_EX_VISIBLE = false
  364.   #---------------------------------------------------------------------------
  365.   # HP图标EX的位置.
  366.   #---------------------------------------------------------------------------  
  367.   HP_ICON_EX_POSITION = [0,0]
  368.   #---------------------------------------------------------------------------
  369.   # 是否显示HP图标EX的缩放效果.
  370.   #---------------------------------------------------------------------------
  371.   HP_ICON_EX_ZOOM_EFFECT = true
  372.   #---------------------------------------------------------------------------
  373.   # HP图标EX的间隔.
  374.   #---------------------------------------------------------------------------   
  375.   HP_ICON_SPACE = [-10,-10]
  376.   #---------------------------------------------------------------------------
  377.   # 设置水平上图标的最大数量
  378.   #---------------------------------------------------------------------------  
  379.   HP_ICON_COL_MAX = 10
  380.   #---------------------------------------------------------------------------
  381.   # 设置竖直上图标的最大数量
  382.   #---------------------------------------------------------------------------   
  383.   HP_ICON_ROW_MAX = 2
  384.   #---------------------------------------------------------------------------
  385.   # 是否显示HP图标图片
  386.   # 需要图片
  387.   #
  388.   # HP_Icon_Number.png
  389.   #
  390.   #---------------------------------------------------------------------------
  391.   HP_ICON_NUMBER_VISIBLE = false
  392.   #---------------------------------------------------------------------------
  393.   # Hp图标的Z坐标
  394.   #---------------------------------------------------------------------------
  395.   HP_ICON_NUMBER_Z = 4
  396.   #---------------------------------------------------------------------------
  397.   # Posição do número do ícone
  398.   #---------------------------------------------------------------------------  
  399.   HP_ICON_NUMBER_POSITION = [0,0]
  400.   #---------------------------------------------------------------------------
  401.   # 设定图标数字对齐方式.
  402.   #
  403.   # 0 - 左
  404.   # 1 - 中
  405.   # 2 - 右
  406.   #---------------------------------------------------------------------------  
  407.   HP_ICON_NUMBER_ALIGN_TYPE = 0   
  408.   #============================================================================
  409.   #============================================================================
  410.   
  411.   
  412.   
  413.   #============================================================================
  414.   #============================================================================
  415.   # * MP
  416.   #============================================================================
  417.   # 是否显示MP数字图片
  418.   # 需要图片
  419.   #
  420.   # MP_Number.png
  421.   #  
  422.   #---------------------------------------------------------------------------  
  423.   MP_NUMBER_VISIBLE = true
  424.   #---------------------------------------------------------------------------
  425.   # Mp数字的Z坐标
  426.   #---------------------------------------------------------------------------   
  427.   MP_NUMBER_Z = 1
  428.   #---------------------------------------------------------------------------
  429.   # MP数字的位置
  430.   #---------------------------------------------------------------------------  
  431.   MP_NUMBER_POSITION = [147,35]
  432.   #---------------------------------------------------------------------------  
  433.   # 是否显示MP总量数字的图片.
  434.   # 需要图片:
  435.   #
  436.   # MP_Number_Max.png
  437.   #
  438.   #---------------------------------------------------------------------------
  439.   MP_NUMBER_MAX_VISIBLE = false
  440.   #---------------------------------------------------------------------------
  441.   # MP总量数字的位置. [X,Y]
  442.   #---------------------------------------------------------------------------  
  443.   MP_NUMBER_MAX_POSITION = [128,53]
  444.   #---------------------------------------------------------------------------
  445.   # 设定数字对齐方式.
  446.   #
  447.   # 0 - 左
  448.   # 1 - 中
  449.   # 2 - 右
  450.   #---------------------------------------------------------------------------  
  451.   MP_NUMBER_ALIGN_TYPE = 2
  452.   #---------------------------------------------------------------------------
  453.   #是否显示数字波浪形对齐方式.
  454.   #---------------------------------------------------------------------------
  455.   MP_NUMBER_WAVE_ALIGN_EFFECT = false   
  456.   #---------------------------------------------------------------------------
  457.   # 是否以百分比显示数字
  458.   #---------------------------------------------------------------------------   
  459.   MP_NUMBER_PERCENTAGE = false
  460.   #---------------------------------------------------------------------------
  461.   # 是否显示数字动画效果 ("滚动").
  462.   #---------------------------------------------------------------------------  
  463.   MP_NUMBER_ANIMATION = true
  464.   #---------------------------------------------------------------------------
  465.   # 是否在HP低下时显示另一张颜色的图片作为MP数字.
  466.   # 需要一张被分成两帧高的图片
  467.   #
  468.   # 普通颜色
  469.   # 低下时颜色
  470.   #
  471.   # 如果你设定为false则图片会被分成一帧高.
  472.   #---------------------------------------------------------------------------  
  473.   MP_NUMBER_LOW_COLOR = false
  474.   #---------------------------------------------------------------------------
  475.   # 是否使用 MP 条图片.
  476.   # 需要图片.
  477.   #
  478.   # MP_Meter.png
  479.   #   
  480.   #---------------------------------------------------------------------------  
  481.   MP_METER_VISIBLE = true
  482.   #---------------------------------------------------------------------------
  483.   # 设定MP条的Z坐标.
  484.   #---------------------------------------------------------------------------   
  485.   MP_METER_Z = 1
  486.   #---------------------------------------------------------------------------
  487.   # 设定MP条的位置. [X,Y]
  488.   #---------------------------------------------------------------------------  
  489.   MP_METER_POSITION = [88,49]
  490.   #---------------------------------------------------------------------------
  491.   # 设定MP条的倾角.
  492.   #---------------------------------------------------------------------------  
  493.   MP_METER_ANGLE = 0
  494.   #---------------------------------------------------------------------------
  495.   # 是否显示MP条的镜像效果
  496.   #---------------------------------------------------------------------------  
  497.   MP_METER_MIRROR_EFFECT = false
  498.   #---------------------------------------------------------------------------
  499.   # 是否使用MP条在角色受到伤害时显示不同的颜色的效果
  500.   # 需要一张被分成两帧高的图片
  501.   #
  502.   # 普通颜色
  503.   # 受伤颜色
  504.   #
  505.   # 设定为false则显示普通效果.
  506.   #---------------------------------------------------------------------------  
  507.   MP_METER_REDUCTION_ANIMATION = true
  508.   #---------------------------------------------------------------------------
  509.   #是否使用MP条的动画流动效果,需要一张宽度为正常大小三倍的图片,图片需要有颜色
  510.   #梯度变化来表现"流动"的效果。
  511.   #设定为false则显示普通效果.
  512.   #---------------------------------------------------------------------------  
  513.   MP_METER_GRADIENT_ANIMATION = true
  514.   #---------------------------------------------------------------------------
  515.   # 是否显示MP图标图片.
  516.   # 需要图片:
  517.   #
  518.   # MP_Icon.png
  519.   #
  520.   #---------------------------------------------------------------------------
  521.   MP_ICON_VISIBLE = false
  522.   #---------------------------------------------------------------------------
  523.   # MP图标的Z坐标
  524.   #---------------------------------------------------------------------------   
  525.   MP_ICON_Z = 1  
  526.   #---------------------------------------------------------------------------
  527.   # MP图标的位置.
  528.   #---------------------------------------------------------------------------  
  529.   MP_ICON_POSITION = [200,64]
  530.   #---------------------------------------------------------------------------
  531.   # 是否使用MP图标EX ,其作为MP图标的最后一个图标
  532.   # 需要图片:
  533.   #
  534.   # MP_Icon_EX.png
  535.   #
  536.   #---------------------------------------------------------------------------
  537.   MP_ICON_EX_VISIBLE = false
  538.   #---------------------------------------------------------------------------
  539.   # MP图标EX的位置.
  540.   #---------------------------------------------------------------------------  
  541.   MP_ICON_EX_POSITION = [0,0]
  542.   #---------------------------------------------------------------------------
  543.   # 是否显示MP图标EX的缩放效果.
  544.   #---------------------------------------------------------------------------
  545.   MP_ICON_EX_ZOOM_EFFECT = true
  546.   #---------------------------------------------------------------------------
  547.   # MP图标EX的间隔.
  548.   #---------------------------------------------------------------------------   
  549.   MP_ICON_SPACE = [-10,-10]
  550.   #---------------------------------------------------------------------------
  551.   # 设置水平上图标的最大数量
  552.   #---------------------------------------------------------------------------  
  553.   MP_ICON_COL_MAX = 10
  554.   #---------------------------------------------------------------------------
  555.   # 设置竖直上图标的最大数量
  556.   #---------------------------------------------------------------------------   
  557.   MP_ICON_ROW_MAX = 2
  558.   #---------------------------------------------------------------------------
  559.   # 是否显示MP图标图片
  560.   # 需要图片
  561.   #
  562.   # MP_Icon_Number.png
  563.   #
  564.   #---------------------------------------------------------------------------
  565.   MP_ICON_NUMBER_VISIBLE = false
  566.   #---------------------------------------------------------------------------
  567.   # Mp图标的Z坐标
  568.   #---------------------------------------------------------------------------
  569.   MP_ICON_NUMBER_Z = 4
  570.   #---------------------------------------------------------------------------
  571.   # MP图标的位置
  572.   #---------------------------------------------------------------------------  
  573.   MP_ICON_NUMBER_POSITION = [0,64]
  574.   #---------------------------------------------------------------------------
  575.   # 设定图标数字对齐方式.
  576.   #
  577.   # 0 - 左
  578.   # 1 - 中
  579.   # 2 - 右
  580.   #---------------------------------------------------------------------------  
  581.   MP_ICON_NUMBER_ALIGN_TYPE = 0   
  582.   #============================================================================
  583.   #============================================================================
  584.   
  585.   
  586.   #============================================================================
  587.   #============================================================================
  588.   # * TP
  589.   #============================================================================
  590.   # 是否显示TP数字图片
  591.   # 需要图片
  592.   #
  593.   # TP_Number.png
  594.   #   
  595.   #---------------------------------------------------------------------------
  596.   TP_NUMBER_VISIBLE = false
  597.   #---------------------------------------------------------------------------
  598.   # Tp数字的Z坐标
  599.   #---------------------------------------------------------------------------
  600.   TP_NUMBER_Z = 5  
  601.   #---------------------------------------------------------------------------
  602.   # TP数字的位置. [X,Y]
  603.   #---------------------------------------------------------------------------  
  604.   TP_NUMBER_POSITION = [19,23]
  605.   #---------------------------------------------------------------------------  
  606.   # 是否显示TP总量数字的图片.
  607.   # 需要图片:
  608.   #
  609.   # TP_Number_Max.png
  610.   #
  611.   #---------------------------------------------------------------------------
  612.   TP_NUMBER_MAX_VISIBLE = false
  613.   #---------------------------------------------------------------------------
  614.   # TP总量数字的位置. [X,Y]
  615.   #---------------------------------------------------------------------------  
  616.   TP_NUMBER_MAX_POSITION = [165,73]
  617.   #---------------------------------------------------------------------------
  618.   # 设定数字对齐方式.
  619.   #
  620.   # 0 - 左
  621.   # 1 - 中
  622.   # 2 - 右
  623.   #---------------------------------------------------------------------------  
  624.   TP_NUMBER_ALIGN_TYPE = 1
  625.   #---------------------------------------------------------------------------
  626.   # 是否显示数字波浪形对齐方式.
  627.   #---------------------------------------------------------------------------
  628.   TP_NUMBER_WAVE_ALIGN_EFFECT = false   
  629.   #---------------------------------------------------------------------------
  630.   # 是否以百分比显示数字
  631.   #---------------------------------------------------------------------------   
  632.   TP_NUMBER_PERCENTAGE = false
  633.   #---------------------------------------------------------------------------
  634.   # 是否显示数字动画效果 ("滚动").
  635.   #---------------------------------------------------------------------------  
  636.   TP_NUMBER_ANIMATION = true
  637.   #---------------------------------------------------------------------------
  638.   # 是否在HP低下时显示另一张颜色的图片作为TP数字.
  639.   # 需要一张被分成两帧高的图片
  640.   #
  641.   # 普通颜色
  642.   # 低下时颜色
  643.   #
  644.   # 如果你设定为false则图片会被分成一帧高.
  645.   #---------------------------------------------------------------------------  
  646.   TP_NUMBER_LOW_COLOR = false
  647.   #---------------------------------------------------------------------------
  648.   # 是否使用 TP 条图片.
  649.   # 需要图片.
  650.   #
  651.   # TP_Meter.png
  652.   #   
  653.   #---------------------------------------------------------------------------  
  654.   TP_METER_VISIBLE = false
  655.   #---------------------------------------------------------------------------
  656.   # 设定TP条的Z坐标.
  657.   #---------------------------------------------------------------------------
  658.   TP_METER_Z = 1  
  659.   #---------------------------------------------------------------------------
  660.   # 设定TP条的位置. [X,Y]
  661.   #---------------------------------------------------------------------------  
  662.   TP_METER_POSITION = [68,74]
  663.   #---------------------------------------------------------------------------
  664.   # 设定TP条的倾角.
  665.   #---------------------------------------------------------------------------  
  666.   TP_METER_ANGLE = 0
  667.   #---------------------------------------------------------------------------
  668.   # 是否显示TP条的镜像效果
  669.   #---------------------------------------------------------------------------  
  670.   TP_METER_MIRROR_EFFECT = false
  671.   #---------------------------------------------------------------------------
  672.   # 是否使用TP条在角色受到伤害时显示不同的颜色的效果
  673.   # 需要一张被分成两帧高的图片
  674.   #
  675.   # 普通颜色
  676.   # 受伤颜色
  677.   #
  678.   # 设定为false则显示普通效果.
  679.   #---------------------------------------------------------------------------  
  680.   TP_METER_REDUCTION_ANIMATION = true
  681.   #---------------------------------------------------------------------------
  682.   #是否使用TP条的动画流动效果,需要一张宽度为正常大小三倍的图片,图片需要有颜色
  683.   #梯度变化来表现"流动"的效果。
  684.   #设定为false则显示普通效果.
  685.   #---------------------------------------------------------------------------  
  686.   TP_METER_GRADIENT_ANIMATION = true
  687.   #---------------------------------------------------------------------------
  688.   # 是否显示TP图标图片.
  689.   # 需要图片:
  690.   #
  691.   # TP_Icon.png
  692.   #
  693.   #---------------------------------------------------------------------------
  694.   TP_ICON_VISIBLE = false
  695.   #---------------------------------------------------------------------------
  696.   # TP图标的Z坐标
  697.   #---------------------------------------------------------------------------
  698.   TP_ICON_Z = 1  
  699.   #---------------------------------------------------------------------------
  700.   # TP图标的位置.
  701.   #---------------------------------------------------------------------------  
  702.   TP_ICON_POSITION = [200,128]
  703.   #---------------------------------------------------------------------------
  704.   # 是否使用TP图标EX ,其作为TP图标的最后一个图标
  705.   # 需要图片:
  706.   #
  707.   # TP_Icon_EX.png
  708.   #
  709.   #---------------------------------------------------------------------------
  710.   TP_ICON_EX_VISIBLE = false
  711.   #---------------------------------------------------------------------------
  712.   # TP图标EX的位置.
  713.   #---------------------------------------------------------------------------  
  714.   TP_ICON_EX_POSITION = [0,0]
  715.   #---------------------------------------------------------------------------
  716.   # 是否显示TP图标EX的缩放效果.
  717.   #---------------------------------------------------------------------------
  718.   TP_ICON_EX_ZOOM_EFFECT = true
  719.   #---------------------------------------------------------------------------
  720.   # TP图标EX的间隔.
  721.   #---------------------------------------------------------------------------   
  722.   TP_ICON_SPACE = [-10,-10]
  723.   #---------------------------------------------------------------------------
  724.   # 设置水平上图标的最大数量
  725.   #---------------------------------------------------------------------------  
  726.   TP_ICON_COL_MAX = 10
  727.   #---------------------------------------------------------------------------
  728.   # 设置竖直上图标的最大数量
  729.   #---------------------------------------------------------------------------   
  730.   TP_ICON_ROW_MAX = 2
  731.   #---------------------------------------------------------------------------
  732.   # 是否显示TP图标图片
  733.   # 需要图片
  734.   #
  735.   # TP_Icon_Number.png
  736.   #
  737.   #---------------------------------------------------------------------------
  738.   TP_ICON_NUMBER_VISIBLE = false
  739.   #---------------------------------------------------------------------------
  740.   # Tp图标的Z坐标
  741.   #---------------------------------------------------------------------------
  742.   TP_ICON_NUMBER_Z = 4
  743.   #---------------------------------------------------------------------------
  744.   # TP图标的位置
  745.   #---------------------------------------------------------------------------  
  746.   TP_ICON_NUMBER_POSITION = [0,128]
  747.   #---------------------------------------------------------------------------
  748.   # 设定图标数字对齐方式.
  749.   #
  750.   # 0 - 左
  751.   # 1 - 中
  752.   # 2 - 右
  753.   #---------------------------------------------------------------------------  
  754.   TP_ICON_NUMBER_ALIGN_TYPE = 0   
  755.   #============================================================================
  756.   #============================================================================
  757.   
  758.   #============================================================================
  759.   #============================================================================
  760.   # * AT
  761.   #============================================================================
  762.   # 是否显示At数字图片
  763.   # 需要图片
  764.   #
  765.   # AT_Number.png
  766.   #
  767.   #---------------------------------------------------------------------------
  768.   AT_NUMBER_VISIBLE = false
  769.   #---------------------------------------------------------------------------
  770.   # AT数字的Z坐标
  771.   #---------------------------------------------------------------------------   
  772.   AT_NUMBER_Z = -180
  773.   #---------------------------------------------------------------------------
  774.   # AT数字的位置. [X,Y]
  775.   #---------------------------------------------------------------------------  
  776.   AT_NUMBER_POSITION = [175,-27]
  777.   #---------------------------------------------------------------------------  
  778.   # 是否显示AT总量数字的图片.
  779.   # 需要图片:
  780.   #
  781.   # AT_Number_Max.png
  782.   #
  783.   #---------------------------------------------------------------------------
  784.   AT_NUMBER_MAX_VISIBLE = false
  785.   #---------------------------------------------------------------------------
  786.   # AT总量数字的位置. [X,Y]
  787.   #---------------------------------------------------------------------------  
  788.   AT_NUMBER_MAX_POSITION = [165,-17]
  789.   #---------------------------------------------------------------------------
  790.   # 设定数字对齐方式.
  791.   #
  792.   # 0 - 左
  793.   # 1 - 中
  794.   # 2 - 右
  795.   #---------------------------------------------------------------------------  
  796.   AT_NUMBER_ALIGN_TYPE = 2
  797.   #---------------------------------------------------------------------------
  798.   # 是否显示数字波浪形对齐方式.
  799.   #---------------------------------------------------------------------------
  800.   AT_NUMBER_WAVE_ALIGN_EFFECT = false
  801.   #---------------------------------------------------------------------------
  802.   # 是否以百分比显示数字
  803.   #---------------------------------------------------------------------------   
  804.   AT_NUMBER_PERCENTAGE = false
  805.   #---------------------------------------------------------------------------
  806.   # 是否显示数字动画效果 ("滚动").
  807.   #---------------------------------------------------------------------------  
  808.   AT_NUMBER_ANIMATION = false
  809.   #---------------------------------------------------------------------------
  810.   # 是否使用 AT 条图片.
  811.   # 需要图片.
  812.   #
  813.   # AT_Meter.png
  814.   #  
  815.   #---------------------------------------------------------------------------  
  816.   AT_METER_VISIBLE = true
  817.   #---------------------------------------------------------------------------
  818.   # 设定AT条的Z坐标.
  819.   #---------------------------------------------------------------------------   
  820.   AT_METER_Z = 1
  821.   #---------------------------------------------------------------------------
  822.   # 设定AT条的位置. [X,Y]
  823.   #---------------------------------------------------------------------------  
  824.   AT_METER_POSITION = [84,76]
  825.   #---------------------------------------------------------------------------
  826.   # AT条的倾角.
  827.   #---------------------------------------------------------------------------  
  828.   AT_METER_ANGLE = 0
  829.   #---------------------------------------------------------------------------
  830.   # 是否显示AT条的镜像效果
  831.   #---------------------------------------------------------------------------  
  832.   AT_METER_MIRROR_EFFECT = false
  833.   #---------------------------------------------------------------------------
  834.   #是否使用AT条的动画流动效果,需要一张宽度为正常大小三倍的图片,图片需要有颜色
  835.   #梯度变化来表现"流动"的效果。
  836.   #设定为false则显示普通效果.
  837.   #---------------------------------------------------------------------------  
  838.   AT_METER_GRADIENT_ANIMATION = true
  839.   #============================================================================
  840.   
  841.   
  842.   #============================================================================
  843.   #============================================================================
  844.   # * LEVEL
  845.   #============================================================================
  846.   # 是否显示等级数字图片
  847.   # 需要图片
  848.   #
  849.   # LV_Number.png
  850.   #   
  851.   #---------------------------------------------------------------------------
  852.   LEVEL_NUMBER_VISIBLE = false
  853.   #---------------------------------------------------------------------------
  854.   # 等级数字的Z坐标
  855.   #---------------------------------------------------------------------------   
  856.   LEVEL_NUMBER_Z = 2
  857.   #---------------------------------------------------------------------------
  858.   # 等级数字的位置. [X,Y]
  859.   #---------------------------------------------------------------------------  
  860.   LEVEL_NUMBER_POSITION = [84,0]
  861.   #---------------------------------------------------------------------------
  862.   # 设定数字对齐方式.
  863.   #
  864.   # 0 - 左
  865.   # 1 - 中
  866.   # 2 - 右
  867.   #---------------------------------------------------------------------------  
  868.   LEVEL_NUMBER_ALIGN_TYPE = 1     
  869.   #============================================================================
  870.   #============================================================================
  871.   
  872.   
  873.   #============================================================================
  874.   #============================================================================
  875.   # * 状态
  876.   #============================================================================
  877.   # 是否显示状态图标
  878.   #---------------------------------------------------------------------------  
  879.   STATES_VISIBLE = true
  880.   #---------------------------------------------------------------------------
  881.   # 状态精灵Z坐标
  882.   #---------------------------------------------------------------------------   
  883.   STATES_Z = 1
  884.   #---------------------------------------------------------------------------
  885.   # 状态位置. [X,Y]
  886.   #---------------------------------------------------------------------------  
  887.   STATES_POSITION = [53,65]
  888.   #---------------------------------------------------------------------------
  889.   # 是否显示状态滚动动画.
  890.   #---------------------------------------------------------------------------  
  891.   STATES_SCROLLING_ANIMATION = false
  892.   #---------------------------------------------------------------------------
  893.   # 状态倾角.
  894.   #---------------------------------------------------------------------------   
  895.   STATE_ANGLE = 0
  896.   #---------------------------------------------------------------------------
  897.   # 不在hud中显示状态图标的状态.
  898.   # 例子 - HIDE_STATES_ID = [9,10,12,14]
  899.   #---------------------------------------------------------------------------   
  900.   HIDE_STATES_ID = []
  901.   #============================================================================
  902.   #============================================================================

  903.   #============================================================================
  904.   #============================================================================
  905.   # * 第二图层 (Overlayer)
  906.   #============================================================================  
  907.   # 是否显示第二图层图片
  908.   # 需要图片
  909.   #
  910.   # Layout_2.png
  911.   #
  912.   #============================================================================  
  913.   SECOND_LAYOUT = false
  914.   #---------------------------------------------------------------------------
  915.   # 第二图层的Z坐标
  916.   #---------------------------------------------------------------------------  
  917.   SECOND_LAYOUT_Z = 4
  918.   #---------------------------------------------------------------------------
  919.   # 第二图层的位置
  920.   #---------------------------------------------------------------------------   
  921.   SECOND_LAYOUT_POSITION = [-5,-10]
  922.   #============================================================================
  923.   #============================================================================
  924.    
  925.   #============================================================================
  926.   #============================================================================
  927.   # * 画面图片
  928.   #============================================================================  
  929.   # 在画面上显示一张图片.
  930.   # 需要图片:
  931.   #
  932.   # Layout_Screen.png
  933.   #
  934.   #============================================================================  
  935.   #是否显示画面图片
  936.   SCREEN_LAYOUT = false
  937.   #---------------------------------------------------------------------------
  938.   #画面图片的位置
  939.   #---------------------------------------------------------------------------
  940.   SCREEN_LAYOUT_POSITION = [-20,330000]
  941.   #---------------------------------------------------------------------------
  942.   #画面图片的Z坐标
  943.   #---------------------------------------------------------------------------
  944.   SCREEN_LAYOUT_Z = -91   
  945.   
  946. end

  947. #============================================================================
  948. #============================================================================
  949. # * 自定义窗口 (通用)
  950. #============================================================================
  951. module MOG_BATTLE_HUD_EX
  952.   
  953. #============================================================================
  954. # * 是否启用自定义窗口
  955. #============================================================================
  956.   ENABLE_CUSTOM_WINDOWS = true
  957. #============================================================================
  958. # * 战斗日志窗口
  959. #============================================================================
  960. # 修改战斗日志窗口的位置
  961.   BATTLE_LOG_POSITION = [0,0]
  962. #============================================================================
  963.   
  964. #============================================================================
  965. # * 字体设定
  966. #============================================================================
  967. #是否启用窗口字体
  968. ENABLE_WINDOW_FONT_SET = false
  969. #窗口字体名
  970. WINDOW_FONT_NAME = nil
  971. #窗口字体大小
  972. WINDOW_FONT_SIZE = 18
  973. #窗口字体是否加粗
  974. WINDOW_FONT_BOLD = true
  975. #窗口字体是否斜体
  976. WINDOW_FONT_ITALIC = false
  977.   
  978. #============================================================================
  979. # * 技能窗口
  980. #============================================================================
  981. #技能窗口大小
  982.   SKILL_WINDOW_SIZE = [640, 120]
  983. #技能窗口位置.
  984.   SKILL_WINDOW_POSITION = [0,0]
  985. #技能窗口不透明度
  986.   SKILL_WINDOW_OPACITY = 255
  987. #是否显示技能窗口的图片. ("Layout_Skill.png")
  988.   SKILL_WINDOW_LAYOUT = false
  989. #技能窗口图片的位置
  990.   SKILL_WINDOW_LAYOUT_POSITION = [0,-7]
  991. #Definição da quantidade colunas máxima.
  992.   SKILL_COL_MAX = 2
  993.   #是否显示技能窗口的滑动效果
  994.   SKILL_WINDOW_SLIDE_EFFECT = false
  995.   #技能窗口的滑动位置
  996.   SKILL_WINDOW_SLIDE_POSITION = [150,150]   
  997. #============================================================================
  998.   
  999. #============================================================================
  1000. # * 物品窗口
  1001. #============================================================================
  1002. #物品窗口大小.  
  1003.   ITEM_WINDOW_SIZE = [640, 120]
  1004. #物品窗口的位置.
  1005.   ITEM_WINDOW_POSITION = [0,0]
  1006. #物品窗口不透明度
  1007.   ITEM_WINDOW_OPACITY = 255
  1008. #是否显示物品窗口的图片. ("Layout_Item.png")   
  1009.   ITEM_WINDOW_LAYOUT = false
  1010. #物品窗口图片的位置.  
  1011.   ITEM_WINDOW_LAYOUT_POSITION = [0,-7]   
  1012. #
  1013.   ITEM_COL_MAX = 2
  1014.   #是否显示物品窗口的滑动效果
  1015.   ITEM_WINDOW_SLIDE_EFFECT = false
  1016.   #物品窗口的滑动位置
  1017.   ITEM_WINDOW_SLIDE_POSITION = [150,150]   
  1018. #============================================================================

  1019. #============================================================================
  1020. # * 角色指令窗口(攻击/防御等)
  1021. #============================================================================
  1022. #是否自动调整指令窗口
  1023.   AUTO_ADJUST_ACTOR_COMMAND = false #指令窗口的位置
  1024.   ACTOR_COMMAND_POSITION = [0,-50]
  1025. #指令窗口不透明度
  1026.   ACTOR_COMMAND_OPACITY = 0
  1027. #是否使用指令窗口的图片. ("Layout_Command.png")   
  1028.   ACTOR_COMMAND_LAYOUT = true
  1029. #指令窗口图片的位置.   
  1030.   ACTOR_COMMAND_LAYOUT_POSITION = [-20,0]
  1031. #============================================================================

  1032. #============================================================================
  1033. # * 帮助窗口
  1034. #============================================================================
  1035. #帮助窗口的大小.   
  1036.   HELP_WINDOW_SIZE = [640, 72]
  1037. #帮助窗口的位置. HELP_WINDOW_POSITION = [Graphics.width / 2, 0]
  1038.   HELP_WINDOW_POSITION = [320, 0]
  1039. #帮助窗口不透明度
  1040.   HELP_WINDOW_OPACITY = 255
  1041. #是否显示帮助窗口的图片. ("Layout_Help.png")   
  1042.   HELP_WINDOW_LAYOUT = false
  1043. #帮助窗口图片的位置.
  1044.   HELP_WINDOW_LAYOUT_POSITION = [0,0]
  1045.   #是否显示帮助窗口的滑动效果
  1046.   HELP_WINDOW_SLIDE_EFFECT = false
  1047.   #帮助窗口的滑动位置
  1048.   HELP_WINDOW_SLIDE_POSITION = [0,-150]   
  1049. #============================================================================

  1050. #============================================================================
  1051. # * 目标角色窗口
  1052. #============================================================================
  1053. #角色窗口的大小.   
  1054.   ACTOR_WINDOW_SIZE = [640, 120]
  1055. #角色窗口的位置.
  1056.   ACTOR_WINDOW_POSITION = [320, Graphics.height]
  1057. #角色窗口不透明度.  
  1058.   ACTOR_WINDOW_OPACITY = 255
  1059. #是否显示角色窗口的图片. ("Layout_Target_Actor.png")
  1060.   ACTOR_WINDOW_LAYOUT = false
  1061. #角色窗口图片的位置.
  1062.   ACTOR_WINDOW_LAYOUT_POSITION = [320,0]
  1063.   #是否显示角色窗口的滑动效果
  1064.   ACTOR_WINDOW_SLIDE_EFFECT = false
  1065.   #角色窗口的滑动位置
  1066.   ACTOR_WINDOW_SLIDE_POSITION = [0,0]  
  1067. #============================================================================

  1068. #============================================================================
  1069. # * 目标敌人窗口
  1070. #============================================================================
  1071. #敌人窗口的大小.
  1072.   ENEMY_WINDOW_SIZE = [640, 120]
  1073. #敌人窗口的位置  
  1074.   ENEMY_WINDOW_POSITION = [320, Graphics.height]
  1075. #敌人窗口不透明度.   
  1076.   ENEMY_WINDOW_OPACITY = 255
  1077. #是否显示敌人窗口的图片. ("Layout_Target_Actor.png")
  1078.   ENEMY_WINDOW_LAYOUT = false
  1079. #敌人窗口图片的位置.
  1080.   ENEMY_WINDOW_LAYOUT_POSITION = [100,0]
  1081.   #是否显示敌人窗口的滑动效果
  1082.   ENEMY_WINDOW_SLIDE_EFFECT = false
  1083.   #敌人窗口的滑动位置
  1084.   ENEMY_WINDOW_SLIDE_POSITION = [0,100]      
  1085. #============================================================================

  1086. #============================================================================
  1087. # * 队伍窗口 (战斗/撤退)
  1088. #============================================================================
  1089. #队伍窗口位置  
  1090.   PARTY_COMMAND_POSITION = [Graphics.width / 2,Graphics.height / 2]
  1091. #队伍窗口不透明度   
  1092.   PARTY_COMMAND_OPACITY = 0
  1093. #是否显示队伍窗口的图片 ("Layout_Party.png")  
  1094.   PARTY_COMMAND_LAYOUT = true
  1095. #队伍窗口图片的位置  
  1096.   PARTY_COMMAND_LAYOUT_POSITION = [0,0]
  1097.   #是否显示队伍窗口的滑动效果
  1098.   PARTY_COMMAND_SLIDE_EFFECT = false
  1099.   #队伍窗口的滑动位置
  1100.   PARTY_COMMAND_SLIDE_POSITION = [0,-150]     
  1101. #============================================================================

  1102. end

  1103. #==============================================================================
  1104. # ** 核心
  1105. #==============================================================================
  1106. module Cache

  1107.   #--------------------------------------------------------------------------
  1108.   # * Hud
  1109.   #--------------------------------------------------------------------------
  1110.   def self.battle_hud(filename)
  1111.       load_bitmap("Graphics/Huds/Battle/", filename)
  1112.   end

  1113. end

  1114. #==============================================================================
  1115. # ** Game Temp
  1116. #==============================================================================
  1117. class Game_Temp
  1118.   
  1119.   attr_accessor :battler_face_pos
  1120.   attr_accessor :hud_pos
  1121.   attr_accessor :hud_pos_real
  1122.   attr_accessor :com_pos
  1123.   attr_accessor :mbhud_force_refresh
  1124.   attr_accessor :mbhud_window
  1125.   attr_accessor :command_visible
  1126.   attr_accessor :refresh_turn_sprite
  1127.   attr_accessor :battle_hud_visible
  1128.   attr_accessor :battle_hud_visible_refresh
  1129.   attr_accessor :battle_end
  1130.   
  1131.   #--------------------------------------------------------------------------
  1132.   # * Initialize
  1133.   #--------------------------------------------------------------------------   
  1134.   alias mog_monogatari_bhud_initialize initialize
  1135.   def initialize
  1136.       @battler_face_pos = []
  1137.       @hud_pos = []
  1138.       @hud_pos_real = []
  1139.       @com_pos = []
  1140.       @mbhud_force_refresh = false
  1141.       @mbhud_window = [false,false,false,false,false,false,false]
  1142.       @command_visible = false
  1143.       @refresh_turn_sprite = false
  1144.       @battle_hud_visible = true
  1145.       @battle_hud_visible_refresh = [false,false]
  1146.       @battle_end = false      
  1147.       mog_monogatari_bhud_initialize
  1148.   end
  1149.   
  1150.   #--------------------------------------------------------------------------
  1151.   # * Check Screen Xyz
  1152.   #--------------------------------------------------------------------------   
  1153.   def check_screen_xyz_nil
  1154.       return if !SceneManager.face_battler?
  1155.       for actor in $game_party.battle_members
  1156.           actor.screen_x = 0 if actor.screen_x == nil
  1157.           actor.screen_y = 0 if actor.screen_y == nil
  1158.           actor.screen_z = 0 if actor.screen_z == nil
  1159.       end
  1160.   end  
  1161.   
  1162.   #--------------------------------------------------------------------------
  1163.   # ● Sprite Visible
  1164.   #--------------------------------------------------------------------------   
  1165.   def sprite_visible
  1166.       return false if $game_message.visible
  1167.       return false if $game_temp.battle_end
  1168.       return true
  1169.   end  
  1170.   
  1171. end

  1172. #==============================================================================
  1173. # ** Game Interpreter
  1174. #==============================================================================
  1175. class Game_Interpreter
  1176.   
  1177. #--------------------------------------------------------------------------
  1178. # * Refresh Battle Hud
  1179. #--------------------------------------------------------------------------
  1180. def refresh_battle_hud
  1181.      $game_temp.check_screen_xyz_nil rescue nil
  1182.      $game_temp.mbhud_force_refresh = true
  1183. end
  1184.   
  1185. #--------------------------------------------------------------------------
  1186. # * Battler Face Name
  1187. #--------------------------------------------------------------------------
  1188. def battler_face_name(actor_id,face_name = "")
  1189.      for actor in $game_party.members
  1190.          actor.battler_face_name = face_name if actor.id == actor_id
  1191.      end
  1192.      refresh_battle_hud
  1193. end  
  1194.    
  1195. #--------------------------------------------------------------------------
  1196. # * Battler Hud Visible
  1197. #--------------------------------------------------------------------------
  1198. def battle_hud_visible(value)
  1199.      $game_temp.battle_hud_visible = value
  1200. end

  1201. #--------------------------------------------------------------------------
  1202. # * Command_129
  1203. #--------------------------------------------------------------------------
  1204. alias mog_monogatari_bhud_command_129 command_129
  1205. def command_129
  1206.      mog_monogatari_bhud_command_129     
  1207.      refresh_battle_hud if SceneManager.scene_is?(Scene_Battle)
  1208. end
  1209.   
  1210. end

  1211. #==============================================================================
  1212. # ** Game Actor
  1213. #==============================================================================
  1214. class Game_Actor < Game_Battler
  1215.   
  1216.   attr_accessor :face_animation
  1217.   attr_accessor :battler_face_name
  1218.   
  1219.   #--------------------------------------------------------------------------
  1220.   # * Setup
  1221.   #--------------------------------------------------------------------------
  1222.   alias mog_monogatari_face_animation setup
  1223.   def setup(actor_id)
  1224.       mog_monogatari_face_animation(actor_id)
  1225.       @face_animation = [0,0,0]
  1226.       @battler_face_name = "Face_" + actor_id.to_s
  1227.   end   
  1228.   
  1229.   #--------------------------------------------------------------------------
  1230.   # ● Real Next Level
  1231.   #--------------------------------------------------------------------------  
  1232.   def real_next_level
  1233.       next_level_exp - exp_for_level(level)
  1234.   end
  1235.   
  1236.   #--------------------------------------------------------------------------
  1237.   # ● Remain Exp
  1238.   #--------------------------------------------------------------------------  
  1239.   def remain_exp
  1240.       exp - exp_for_level(level)
  1241.   end
  1242.   
  1243.   #--------------------------------------------------------------------------
  1244.   # ● Gain Exp Test
  1245.   #--------------------------------------------------------------------------
  1246.   def gain_exp_test
  1247.       exp_r = rand(next_level_exp)
  1248.       change_exp(self.exp + (exp_r * final_exp_rate).to_i, false)
  1249.   end   
  1250.   
  1251.   #--------------------------------------------------------------------------
  1252.   # ● Low HP?
  1253.   #--------------------------------------------------------------------------   
  1254.   def low_hp?
  1255.       hp <= (mhp * MOG_BATTLE_HUD_EX::LOW_PARAMETER_PERCENTAGE) / 100
  1256.   end
  1257.   
  1258.   #--------------------------------------------------------------------------
  1259.   # ● Low MP?
  1260.   #--------------------------------------------------------------------------   
  1261.   def low_mp?
  1262.       mp <= (mmp * MOG_BATTLE_HUD_EX::LOW_PARAMETER_PERCENTAGE) / 100
  1263.   end  
  1264.   
  1265.   #--------------------------------------------------------------------------
  1266.   # ● Low TP?
  1267.   #--------------------------------------------------------------------------   
  1268.   def low_tp?
  1269.       tp <= (max_tp * MOG_BATTLE_HUD_EX::LOW_PARAMETER_PERCENTAGE) / 100
  1270.   end  
  1271.    
  1272. end

  1273. #==============================================================================
  1274. # ** Game Party
  1275. #==============================================================================
  1276. class Game_Party < Game_Unit
  1277.   
  1278.   #--------------------------------------------------------------------------
  1279.   # * Get Maximum Number of Battle Members
  1280.   #--------------------------------------------------------------------------
  1281.   def max_battle_members
  1282.       return MOG_BATTLE_HUD_EX::MAX_BATTLE_MEMBERS
  1283.   end
  1284.    
  1285. #--------------------------------------------------------------------------
  1286. # * Swap Order
  1287. #--------------------------------------------------------------------------
  1288. alias mog_bhex_swap_order swap_order
  1289. def swap_order(index1, index2)
  1290.      mog_bhex_swap_order(index1, index2)
  1291.      if SceneManager.scene_is?(Scene_Battle)  
  1292.      $game_temp.check_screen_xyz_nil rescue nil
  1293.      $game_temp.mbhud_force_refresh = true     
  1294.      end
  1295. end  
  1296.   
  1297. end

  1298. #==============================================================================
  1299. # ** BattleManager
  1300. #==============================================================================
  1301. module BattleManager
  1302.   
  1303. #--------------------------------------------------------------------------
  1304. # * Current Index
  1305. #--------------------------------------------------------------------------   
  1306. def self.current_index
  1307.      if $imported[:mog_atb_system]
  1308.         return actor.index if actor
  1309.      end   
  1310.      return 0 if @actor_index == nil
  1311.      return @actor_index != -1 ? @actor_index : 0
  1312. end
  1313.   
  1314. #--------------------------------------------------------------------------
  1315. # * Current Index Real
  1316. #--------------------------------------------------------------------------   
  1317. def self.current_index_real
  1318.      return -1 if @actor_index == nil
  1319.      return @actor_index
  1320. end

  1321.   #--------------------------------------------------------------------------
  1322.   # * Next Actor Avaliable
  1323.   #--------------------------------------------------------------------------
  1324.   def self.next_actor_avaliable?
  1325.       return false if @actor_index == nil
  1326.       next_index = @actor_index + 1
  1327.       return false if next_index >= $game_party.members.size
  1328.       return true
  1329.   end

  1330.   #--------------------------------------------------------------------------
  1331.   # * To Next Command Input
  1332.   #--------------------------------------------------------------------------
  1333.   def self.next_command_avaliable
  1334.     aindex = @actor_index
  1335.     begin      
  1336.       if !actor || !actor.next_command
  1337.         return false if actor == nil
  1338.         aindex += 1
  1339.         return false if aindex >= $game_party.members.size
  1340.       end
  1341.     end until actor.inputable?
  1342.     return true
  1343.   end  
  1344.   
  1345.   #--------------------------------------------------------------------------
  1346.   # * Can Enable Window?
  1347.   #--------------------------------------------------------------------------
  1348.   def self.can_enable_window?
  1349.       max_members = $game_party.members.size
  1350.       index_real = current_index_real + 1
  1351.       return false if index_real > max_members
  1352.       return false if in_turn?
  1353.       return false if $imported[:mog_battle_cursor]
  1354.       return true
  1355.   end
  1356.   
  1357. end

  1358. #==============================================================================
  1359. # ** SceneManager
  1360. #==============================================================================
  1361. module SceneManager
  1362.   
  1363.   #--------------------------------------------------------------------------
  1364.   # * Face Battler
  1365.   #--------------------------------------------------------------------------
  1366.   def self.face_battler?
  1367.       return false if !MOG_BATTLE_HUD_EX::FACE_BATTLER
  1368.       return false if !MOG_BATTLE_HUD_EX::FACE_VISIBLE
  1369.       return false if $imported[:mog_sprite_actor]
  1370.       return false if $imported[:ve_animated_battle]
  1371.       return false if $imported[:ve_actor_battlers]
  1372.       return false if $imported["YES-BattleSymphony"]
  1373.       return false if $imported["YEA-VisualBattlers"]
  1374.       return false if $imported["Galv_Animated_Battlers"]
  1375.       return false if $imported['KRX-AnimatedBattlers']
  1376.       return false if $imported[:Theo_BasicFuntions]
  1377.       return false if $sv_camera != nil
  1378.       return false if BattleManager.true_surprise != nil rescue nil
  1379.       return false if $imported[:jet][:AnimatedBattlers] rescue nil      
  1380.       return true
  1381.   end
  1382.   
  1383. end

  1384. #==============================================================================
  1385. # ■ Sprite Picture
  1386. #==============================================================================
  1387. class Sprite_Picture < Sprite
  1388.   
  1389.   #--------------------------------------------------------------------------
  1390.   # * Initialize
  1391.   #--------------------------------------------------------------------------
  1392.   alias mog_battle_hud_initialize initialize
  1393.   def initialize(viewport, picture)
  1394.       mog_battle_hud_initialize(viewport, picture)
  1395.       self.viewport = nil if SceneManager.scene_is?(Scene_Battle)
  1396.   
  1397.   end  

  1398.   #--------------------------------------------------------------------------
  1399.   # * Update Position
  1400.   #--------------------------------------------------------------------------
  1401.   alias mog_battle_hud_update_position update_position
  1402.   def update_position
  1403.       mog_battle_hud_update_position
  1404.       self.z = @picture.number + 120 if SceneManager.scene_is?(Scene_Battle)
  1405.   end
  1406.    
  1407. end

  1408. #==============================================================================
  1409. # ■ Sprite Base
  1410. #==============================================================================
  1411. class Sprite_Base < Sprite

  1412.   #--------------------------------------------------------------------------
  1413.   # * Initialize
  1414.   #--------------------------------------------------------------------------
  1415.   alias mog_bhud_ex_initialize initialize
  1416.   def initialize(viewport = nil)
  1417.       @ani_x = SceneManager.face_battler? ? MOG_BATTLE_HUD_EX::HUD_Z + 20 : 100
  1418.       mog_bhud_ex_initialize(viewport)
  1419.   end  
  1420.   
  1421.   #--------------------------------------------------------------------------
  1422.   # * Animation Set Sprite
  1423.   #--------------------------------------------------------------------------
  1424.   alias mog_battle_hud_ex_animation_set_sprites animation_set_sprites
  1425.   def animation_set_sprites(frame)
  1426.       mog_battle_hud_ex_animation_set_sprites(frame)
  1427.       update_sprite_z_animation rescue nil if SceneManager.scene_is?(Scene_Battle)
  1428.   end  
  1429.    
  1430.   #--------------------------------------------------------------------------
  1431.   # * Update Sprite Z Animation
  1432.   #--------------------------------------------------------------------------
  1433.   def update_sprite_z_animation  
  1434.       if $imported[:mog_battle_camera]
  1435.          @ani_sprites.each_with_index do |sprite, i|
  1436. #        sprite.z = @ani_x + i end      
  1437.           sprite.z = 999 end      

  1438.       else
  1439.          @ani_sprites.each_with_index do |sprite, i|
  1440.          #sprite.viewport = nil ; sprite.z = @ani_x + i end
  1441.         sprite.viewport = nil ; sprite.z = 999 end
  1442.       end   
  1443.   end  
  1444.   
  1445. end

  1446. #==============================================================================
  1447. # ** Spriteset Battle
  1448. #==============================================================================
  1449. class Spriteset_Battle  

  1450.   #--------------------------------------------------------------------------
  1451.   # * Create Actors
  1452.   #--------------------------------------------------------------------------
  1453.   alias mog_battle_hud_create_actors create_actors
  1454.   def create_actors
  1455.       if can_create_max_members?
  1456.          @actor_sprites = Array.new($game_party.max_battle_members) { Sprite_Battler.new(@viewport1) }
  1457.          return
  1458.       end
  1459.       mog_battle_hud_create_actors
  1460.   end

  1461.   #--------------------------------------------------------------------------
  1462.   # * Can Create Max Members
  1463.   #--------------------------------------------------------------------------
  1464.   def can_create_max_members?
  1465.       return false if $imported[:ve_animated_battle]
  1466.       return false if $imported[:ve_actor_battlers]
  1467.       return false if $sv_camera != nil
  1468.       return true
  1469.   end
  1470.   
  1471. end

  1472. #==============================================================================
  1473. # ■ Scene Battle
  1474. #==============================================================================
  1475. class Scene_Battle < Scene_Base
  1476.   
  1477. #--------------------------------------------------------------------------
  1478. # ● Clear All Windows
  1479. #--------------------------------------------------------------------------
  1480.   alias mog_battle_hud_ex_start start
  1481.   def start
  1482.       setup_battle_hud_ex
  1483.       mog_battle_hud_ex_start
  1484.   end
  1485.   
  1486. #--------------------------------------------------------------------------
  1487. # ● Setup Battle Hud EX
  1488. #--------------------------------------------------------------------------
  1489. def setup_battle_hud_ex
  1490.      @force_clear_duration = 0
  1491. end
  1492.   
  1493. #--------------------------------------------------------------------------
  1494. # ● Clear All Windows
  1495. #--------------------------------------------------------------------------
  1496. def clear_all_windows
  1497.      if @actor_window != nil
  1498.         @actor_window.visible = false
  1499.         @actor_window.active = false
  1500.      end   
  1501.      if @status_window != nil
  1502.         @status_window.visible = false
  1503.         @status_window.active = false
  1504.      end   
  1505.      if @actor_command_window != nil
  1506.         @actor_command_window.visible = false
  1507.         @actor_command_window.active = false
  1508.      end
  1509.      if @party_command_window != nil
  1510.         @party_command_window.visible = false
  1511.         @party_command_window.active = false
  1512.      end
  1513.      if @help_window != nil
  1514.         @help_window.visible = false
  1515.      end  
  1516. end   
  1517.   
  1518. #--------------------------------------------------------------------------
  1519. # ● Update
  1520. #--------------------------------------------------------------------------
  1521.   alias mog_battle_hud_ex_update_main update
  1522.   def update
  1523.       mog_battle_hud_ex_update_main
  1524.       update_battle_hud_ex
  1525.   end
  1526.   
  1527. #--------------------------------------------------------------------------
  1528. # ● Update Battle Hud_ex
  1529. #--------------------------------------------------------------------------
  1530.   def update_battle_hud_ex
  1531.       @status_window.visible = false
  1532.   end
  1533.   
  1534.   if MOG_BATTLE_HUD_EX::ENABLE_CUSTOM_WINDOWS
  1535.   #--------------------------------------------------------------------------
  1536.   # * On Skill OK
  1537.   #--------------------------------------------------------------------------
  1538.   alias mog_battle_hud_ex_on_skill_ok on_skill_ok
  1539.   def on_skill_ok
  1540.       @skill = @skill_window.item
  1541.       @skill_window.hide if @skill.for_opponent? or @skill.for_friend?
  1542.       mog_battle_hud_ex_on_skill_ok
  1543.   end
  1544.    
  1545.   #--------------------------------------------------------------------------
  1546.   # * On Item OK
  1547.   #--------------------------------------------------------------------------
  1548.   alias mog_battle_hud_on_item_ok on_item_ok
  1549.   def on_item_ok
  1550.       @item = @item_window.item
  1551.       @item_window.hide if @item.for_opponent? or @item.for_friend?
  1552.       mog_battle_hud_on_item_ok
  1553.   end     
  1554.   
  1555.   #--------------------------------------------------------------------------
  1556.   # * On Enemy Cancel
  1557.   #--------------------------------------------------------------------------
  1558.   alias mog_battle_hud_ex_on_enemy_cancel on_enemy_cancel
  1559.   def on_enemy_cancel
  1560.       mog_battle_hud_ex_on_enemy_cancel
  1561.       @skill_window.show if @skill_window.active
  1562.       @item_window.show if @item_window.active      
  1563.   end
  1564.   
  1565.   #--------------------------------------------------------------------------
  1566.   # * On Actor Cancel
  1567.   #--------------------------------------------------------------------------
  1568.   alias mog_battle_hud_ex_on_actor_cancel on_actor_cancel
  1569.   def on_actor_cancel
  1570.       mog_battle_hud_ex_on_actor_cancel
  1571.       @skill_window.show if @skill_window.active
  1572.       @item_window.show if @item_window.active
  1573.       mog_battle_hud_ex_on_actor_cancel
  1574.   end  
  1575.   end

  1576. end

  1577. if SceneManager.face_battler?
  1578. #==============================================================================
  1579. # ■ Game_Actor
  1580. #==============================================================================
  1581. class Game_Actor < Game_Battler
  1582.   
  1583.   attr_accessor :screen_x
  1584.   attr_accessor :screen_y
  1585.   attr_accessor :screen_z

  1586.   
  1587. #--------------------------------------------------------------------------
  1588. # ● Use Sprite?
  1589. #--------------------------------------------------------------------------
  1590.   def use_sprite?
  1591.       return true
  1592.   end
  1593.   
  1594. end

  1595. #==============================================================================
  1596. # ■ Sprite_Battler
  1597. #==============================================================================
  1598. class Sprite_Battler < Sprite_Base
  1599.   include MOG_BATTLE_HUD_EX
  1600.   
  1601.   #--------------------------------------------------------------------------
  1602.   # ● Update Collapse
  1603.   #--------------------------------------------------------------------------                          
  1604.    alias mog_battle_hud_update_collapse update_collapse
  1605.    def update_collapse
  1606.        return if face_can_cancel_method?
  1607.        mog_battle_hud_update_collapse
  1608.    end  
  1609.    
  1610.   #--------------------------------------------------------------------------
  1611.   # ● Update Instant Collapse
  1612.   #--------------------------------------------------------------------------                             
  1613.    alias mog_battle_hud_update_instant_collapse update_instant_collapse
  1614.    def update_instant_collapse
  1615.        return if face_can_cancel_method?
  1616.        mog_battle_hud_update_instant_collapse
  1617.    end  
  1618.    
  1619.   #--------------------------------------------------------------------------
  1620.   # ● Face Can Cancel Method
  1621.   #--------------------------------------------------------------------------                                 
  1622.   def face_can_cancel_method?
  1623.       return false if !SceneManager.face_battler?
  1624.       return false if @battler.is_a?(Game_Enemy)
  1625.       self.opacity = 255 ; self.visible = true
  1626.       return true
  1627.   end  
  1628.    
  1629.   #--------------------------------------------------------------------------
  1630.   # ● Update Bitmap
  1631.   #--------------------------------------------------------------------------                                 
  1632.   alias mog_battle_hud_ex_update_bitmap update_bitmap
  1633.   def update_bitmap
  1634.       return if face_can_cancel_method?
  1635.       mog_battle_hud_ex_update_bitmap
  1636.   end  
  1637.   
  1638.   #--------------------------------------------------------------------------
  1639.   # ● Update Position
  1640.   #--------------------------------------------------------------------------                                 
  1641.   alias mog_battle_hud_ex_update_position update_position
  1642.   def update_position
  1643.       if @battler.is_a?(Game_Actor) and SceneManager.face_battler?
  1644.          if !face_sprite_visible? or $game_temp.battle_end
  1645.              self.y = -1000
  1646.              return
  1647.          end
  1648.       end   
  1649.       mog_battle_hud_ex_update_position
  1650.   end  
  1651.    
  1652.   #--------------------------------------------------------------------------
  1653.   # * Sprite Visible
  1654.   #--------------------------------------------------------------------------
  1655.   def face_sprite_visible?
  1656.       return false if $game_message.visible and MESSAGE_WINDOW_FADE_HUD
  1657.       return false if !$game_temp.battle_hud_visible
  1658.       return true
  1659.   end  
  1660.   
  1661. end

  1662. end

  1663. #==============================================================================
  1664. # ** Window_BattleStatus
  1665. #==============================================================================
  1666. class Window_BattleStatus < Window_Selectable
  1667. include MOG_BATTLE_HUD_EX

  1668.   #--------------------------------------------------------------------------
  1669.   # * Get Window Width
  1670.   #--------------------------------------------------------------------------
  1671.   def window_width
  1672.       ACTOR_WINDOW_SIZE[0]
  1673.   end

  1674. #--------------------------------------------------------------------------
  1675. # * Refresh
  1676. #--------------------------------------------------------------------------   
  1677. alias mog_monogatari_refresh refresh
  1678. def refresh
  1679.      mog_monogatari_refresh
  1680.      self.visible = false
  1681.      self.opacity = 0
  1682.      self.contents_opacity = 0
  1683.      self.y = 1200
  1684. end  

  1685. end  

  1686. #==============================================================================
  1687. # ** Window Actor Command
  1688. #==============================================================================
  1689. class Window_ActorCommand < Window_Command
  1690.   
  1691. #--------------------------------------------------------------------------
  1692. # * Update
  1693. #--------------------------------------------------------------------------   
  1694.   alias mog_hud_battle_hud_ex_turn_sprite_update update
  1695.   def update
  1696.       mog_hud_battle_hud_ex_turn_sprite_update
  1697.       $game_temp.command_visible = self.visible
  1698.   end

  1699. end

  1700. #==============================================================================
  1701. # ** Window_BattleActor
  1702. #==============================================================================
  1703. class Window_BattleActor < Window_BattleStatus
  1704.   
  1705.   #--------------------------------------------------------------------------
  1706.   # * Refresh
  1707.   #--------------------------------------------------------------------------
  1708.   alias mog_battle_hud_ex_actor_w_refresh refresh
  1709.   def refresh
  1710.       mog_battle_hud_ex_actor_w_refresh
  1711.       self.contents_opacity = 255
  1712.       self.opacity = 255 if !MOG_BATTLE_HUD_EX::ENABLE_CUSTOM_WINDOWS
  1713.       self.visible = true
  1714.   end

  1715. end  

  1716. if MOG_BATTLE_HUD_EX::ENABLE_CUSTOM_WINDOWS
  1717.   
  1718. #==============================================================================
  1719. # ** Window BattleLog
  1720. #==============================================================================
  1721. class Window_BattleLog < Window_Selectable
  1722.   
  1723.   include MOG_BATTLE_HUD_EX
  1724.   
  1725. #--------------------------------------------------------------------------
  1726. # * Initialize
  1727. #--------------------------------------------------------------------------   
  1728.   alias mog_battle_hud_ex_log_initialize initialize
  1729.   def initialize
  1730.       mog_battle_hud_ex_log_initialize
  1731.       self.x = BATTLE_LOG_POSITION[0]
  1732.       self.y = BATTLE_LOG_POSITION[1]
  1733.       self.z = MOG_BATTLE_HUD_EX::HUD_Z + 140
  1734.   end
  1735.   
  1736. #--------------------------------------------------------------------------
  1737. # * Create Back Sprite
  1738. #--------------------------------------------------------------------------   
  1739.   alias mog_battle_hud_ex_log_create_back_sprite create_back_sprite
  1740.   def create_back_sprite
  1741.       self.x = BATTLE_LOG_POSITION[0]
  1742.       self.y = BATTLE_LOG_POSITION[1]
  1743.       self.z = MOG_BATTLE_HUD_EX::HUD_Z + 140
  1744.       mog_battle_hud_ex_log_create_back_sprite
  1745.   end
  1746.   
  1747. end  

  1748. #==============================================================================
  1749. # ** Window Actor Command
  1750. #==============================================================================
  1751. class Window_ActorCommand < Window_Command
  1752.   
  1753.   include MOG_BATTLE_HUD_EX
  1754.   
  1755. #--------------------------------------------------------------------------
  1756. # * Initialize
  1757. #--------------------------------------------------------------------------   
  1758. alias mog_monogatari_initialize initialize
  1759. def initialize
  1760.      mog_monogatari_initialize
  1761.      create_layout if $imported[:mog_battle_command_ex] == nil
  1762. end
  1763.   
  1764. #--------------------------------------------------------------------------
  1765. # * Dispose
  1766. #--------------------------------------------------------------------------
  1767. alias mog_monogatari_actor_command_dispose dispose
  1768. def dispose
  1769.      mog_monogatari_actor_command_dispose
  1770.      dispose_layout
  1771. end

  1772. #--------------------------------------------------------------------------
  1773. # * Create Layout
  1774. #--------------------------------------------------------------------------   
  1775. def create_layout
  1776.      return if @layout != nil
  1777.      return if !ACTOR_COMMAND_LAYOUT
  1778.      return if $game_temp.mbhud_window[0]
  1779.      self.z = MOG_BATTLE_HUD_EX::HUD_Z + 150
  1780.      $game_temp.mbhud_window[0] = true
  1781.      @layout = Sprite.new
  1782.      @layout.bitmap = Cache.battle_hud("Layout_Command")
  1783.      @layout.z = self.z - 1
  1784.      @layout.x = self.x + ACTOR_COMMAND_LAYOUT_POSITION[0]
  1785.      @layout.y = self.y + ACTOR_COMMAND_LAYOUT_POSITION[1]
  1786.      @layout.visible = false
  1787. end

  1788. #--------------------------------------------------------------------------
  1789. # * Dispose Layout
  1790. #--------------------------------------------------------------------------
  1791. def dispose_layout
  1792.      return if @layout == nil
  1793.      @layout.dispose
  1794.      @layout = nil
  1795. end

  1796. #--------------------------------------------------------------------------
  1797. # * Refresh Layout
  1798. #--------------------------------------------------------------------------
  1799. def refresh_layout
  1800.      return if @layout == nil
  1801.      @layout.x = self.x + ACTOR_COMMAND_LAYOUT_POSITION[0]
  1802.      @layout.y = self.y + ACTOR_COMMAND_LAYOUT_POSITION[1]
  1803.      @layout.visible = self.visible
  1804.      @layout.z = self.z - 1
  1805. end

  1806. #--------------------------------------------------------------------------
  1807. # * Select
  1808. #--------------------------------------------------------------------------  
  1809. alias mog_monogatari_select_actor_command select
  1810. def select(index)
  1811.      mog_monogatari_select_actor_command(index)
  1812.      set_command_position if $imported[:mog_battle_command_ex] == nil
  1813. end   
  1814.   
  1815. #--------------------------------------------------------------------------
  1816. # * Set Command Position
  1817. #--------------------------------------------------------------------------   
  1818. def set_command_position
  1819.      self.viewport = nil
  1820.      self.opacity = ACTOR_COMMAND_OPACITY
  1821.      battler_index = BattleManager.current_index rescue nil
  1822.      battler_index = 0 if battler_index == nil     
  1823.      if @actor != nil and $game_temp.hud_pos[battler_index] != nil
  1824.         if FIXED_COMMAND_POSITION[battler_index] != nil
  1825.            self.x = FIXED_COMMAND_POSITION[battler_index][0]
  1826.            self.y = FIXED_COMMAND_POSITION[battler_index][1]              
  1827.         else  
  1828.            self.x = ACTOR_COMMAND_POSITION[0] + $game_temp.hud_pos[battler_index][0] - (self.width / 2)
  1829.            self.x = Graphics.width - self.width if self.x + self.width > Graphics.width
  1830.            self.x = 0 if self.x < 0
  1831.            self.y = ACTOR_COMMAND_POSITION[1] + $game_temp.hud_pos[battler_index][1] - self.height
  1832.         end   
  1833.      end      
  1834.      refresh_layout
  1835. end  

  1836. #--------------------------------------------------------------------------
  1837. # * Refresh
  1838. #--------------------------------------------------------------------------   
  1839. alias mog_battle_hud_ex_refresh refresh
  1840. def refresh
  1841.      mog_battle_hud_ex_refresh
  1842.      $game_temp.refresh_turn_sprite = true if $imported[:mog_battle_command_ex] == nil
  1843. end

  1844. #--------------------------------------------------------------------------
  1845. # * Update
  1846. #--------------------------------------------------------------------------  
  1847. alias mog_monogatari_actor_commnand_update update
  1848. def update     
  1849.      mog_monogatari_actor_commnand_update
  1850.      if $imported[:mog_battle_command_ex] == nil
  1851.      self.visible = self.active
  1852.      if [email protected]?
  1853.         refresh_layout if @layout.visible != self.visible
  1854.         @layout.visible = false if !$game_temp.sprite_visible
  1855.      end        
  1856.      self.visible = false if !$game_temp.sprite_visible     
  1857.      end
  1858. end

  1859. end

  1860. #==============================================================================
  1861. # ** Window_PartyCommand
  1862. #==============================================================================
  1863. class Window_PartyCommand < Window_Command

  1864.   include MOG_BATTLE_HUD_EX
  1865.   
  1866. #--------------------------------------------------------------------------
  1867. # * Initialize
  1868. #--------------------------------------------------------------------------   
  1869.   alias mog_monogatari_party_initialize initialize
  1870.   def initialize
  1871.       mog_monogatari_party_initialize
  1872.     #  self.x = @org_position[0] ; self.y = @org_position[1]
  1873.     #  self.opacity = PARTY_COMMAND_OPACITY   
  1874.       create_layout
  1875.   end
  1876.   
  1877. #--------------------------------------------------------------------------
  1878. # * Dispose
  1879. #--------------------------------------------------------------------------
  1880. alias mog_monogatari_party_window_dispose dispose
  1881. def dispose
  1882.      mog_monogatari_party_window_dispose
  1883.      dispose_layout
  1884. end

  1885. #--------------------------------------------------------------------------
  1886. # * Create Layout
  1887. #--------------------------------------------------------------------------   
  1888. def create_layout
  1889.      return if @layout != nil
  1890.      return if !PARTY_COMMAND_LAYOUT
  1891.      return if $game_temp.mbhud_window[1]
  1892.      self.z = MOG_BATTLE_HUD_EX::HUD_Z + 150
  1893.      $game_temp.mbhud_window[1] = true
  1894.      @org_position_2 = [@org_position[0] + PARTY_COMMAND_LAYOUT_POSITION[0],@org_position[1] + PARTY_COMMAND_LAYOUT_POSITION[1]]
  1895.      @layout = Sprite.new
  1896.      @layout.bitmap = Cache.battle_hud("Layout_Party")
  1897.      @layout.z = self.z - 1
  1898.      refresh_layout
  1899.      @layout.visible = false
  1900. end

  1901. #--------------------------------------------------------------------------
  1902. # * Dispose Layout
  1903. #--------------------------------------------------------------------------
  1904. def dispose_layout
  1905.      return if @layout == nil
  1906.      @layout.dispose
  1907.      @layout = nil
  1908. end

  1909. #--------------------------------------------------------------------------
  1910. # * Refresh Layout
  1911. #--------------------------------------------------------------------------
  1912. def refresh_layout
  1913.      return if @layout == nil
  1914.      @layout.x = @org_position_2[0]
  1915.      @layout.y = @org_position_2[1]
  1916.      @layout.x += PARTY_COMMAND_SLIDE_POSITION[0] if PARTY_COMMAND_SLIDE_EFFECT
  1917.      @layout.y += PARTY_COMMAND_SLIDE_POSITION[1] if PARTY_COMMAND_SLIDE_EFFECT
  1918.      @layout.visible = self.visible
  1919. end         

  1920. #--------------------------------------------------------------------------
  1921. # * Select
  1922. #--------------------------------------------------------------------------  
  1923. alias mog_monogatari_refresh_partycommand refresh
  1924. def refresh
  1925.      if @org_position == nil
  1926.       @org_position = [PARTY_COMMAND_POSITION[0] - (self.width / 2),
  1927.                        PARTY_COMMAND_POSITION[1] - (self.height / 2)]  
  1928.      end                  
  1929.      mog_monogatari_refresh_partycommand
  1930.      
  1931.       self.viewport = nil      
  1932.       self.x = @org_position[0] ; self.y = @org_position[1]
  1933.       if PARTY_COMMAND_SLIDE_EFFECT
  1934.          self.x += PARTY_COMMAND_SLIDE_POSITION[0]
  1935.          self.y += PARTY_COMMAND_SLIDE_POSITION[1]

  1936.       end
  1937.       self.opacity = PARTY_COMMAND_OPACITY     
  1938. end   
  1939.   
  1940. def show
  1941.    
  1942. end

  1943. #--------------------------------------------------------------------------
  1944. # * Show
  1945. #--------------------------------------------------------------------------   
  1946.   alias mog_bg_ex_slide_show_party show
  1947.   def show
  1948.       self.viewport = nil
  1949.       self.x = @org_position[0] ; self.y = @org_position[1]
  1950.       if PARTY_COMMAND_SLIDE_EFFECT
  1951.          self.x += PARTY_COMMAND_SLIDE_POSITION[0]
  1952.          self.y += PARTY_COMMAND_SLIDE_POSITION[1]

  1953.       end
  1954.       self.opacity = PARTY_COMMAND_OPACITY
  1955.       mog_bg_ex_slide_show_party
  1956.   end

  1957. #--------------------------------------------------------------------------
  1958. # * Update
  1959. #--------------------------------------------------------------------------  
  1960. alias mog_monogatari_party_window_update update
  1961. def update
  1962.      mog_monogatari_party_window_update  
  1963.      self.visible = self.active
  1964.      if @layout != nil and @layout.visible != self.visible        
  1965.         refresh_layout
  1966.      end
  1967.      execute_slide_effect if self.visible
  1968. end   

  1969. end

  1970. #==============================================================================
  1971. # ** Window_Help
  1972. #==============================================================================
  1973. class Window_Help < Window_Base
  1974.   
  1975.   include MOG_BATTLE_HUD_EX
  1976.   
  1977.   #--------------------------------------------------------------------------
  1978.   # * Object Initialization
  1979.   #--------------------------------------------------------------------------
  1980.   alias mog_monogatari_battle_help_initialize initialize
  1981.   def initialize(line_number = 2)
  1982.       @battle_phase = false
  1983.       mog_monogatari_battle_help_initialize(line_number)
  1984.       @wait_time = 5
  1985.       if SceneManager.scene_is?(Scene_Battle)
  1986.          @battle_phase = true         
  1987.          self.width = HELP_WINDOW_SIZE[0]
  1988.          self.height = HELP_WINDOW_SIZE[1]      
  1989.          @org_position = [HELP_WINDOW_POSITION[0] - (self.width / 2),
  1990.                           HELP_WINDOW_POSITION[1]]         
  1991.          self.x = @org_position[0]
  1992.          self.y = @org_position[1]  
  1993.          self.opacity = HELP_WINDOW_OPACITY
  1994.          self.z = MOG_BATTLE_HUD_EX::HUD_Z + 150
  1995.          create_layout
  1996.       end     
  1997. end

  1998. #--------------------------------------------------------------------------
  1999. # * Dispose
  2000. #--------------------------------------------------------------------------
  2001. alias mog_monogatari_help_window_dispose dispose
  2002. def dispose
  2003.      mog_monogatari_help_window_dispose
  2004.      dispose_layout
  2005. end

  2006. #--------------------------------------------------------------------------
  2007. # * Create Layout
  2008. #--------------------------------------------------------------------------   
  2009. def create_layout
  2010.      return if @layout != nil
  2011.      return if !HELP_WINDOW_LAYOUT
  2012.      return if $game_temp.mbhud_window[2]
  2013.      return if !SceneManager.scene_is?(Scene_Battle)
  2014.      $game_temp.mbhud_window[2] = true
  2015.      @org_position_2 = [self.x + HELP_WINDOW_LAYOUT_POSITION[0],self.y + HELP_WINDOW_LAYOUT_POSITION[1]]
  2016.      @layout = Sprite.new
  2017.      @layout.bitmap = Cache.battle_hud("Layout_Help")
  2018.      @layout.z = self.z - 1
  2019.      refresh_layout
  2020.      @layout.visible = false
  2021. end

  2022. #--------------------------------------------------------------------------
  2023. # * Dispose Layout
  2024. #--------------------------------------------------------------------------
  2025. def dispose_layout
  2026.      return if @layout == nil
  2027.      @layout.dispose
  2028.      @layout = nil
  2029. end

  2030. #--------------------------------------------------------------------------
  2031. # * Refresh Layout
  2032. #--------------------------------------------------------------------------
  2033. def refresh_layout
  2034.      return if @layout == nil
  2035.      @layout.x = @org_position_2[0]
  2036.      @layout.y = @org_position_2[1]
  2037.      @layout.x += HELP_WINDOW_SLIDE_POSITION[0] if HELP_WINDOW_SLIDE_EFFECT
  2038.      @layout.y += HELP_WINDOW_SLIDE_POSITION[1] if HELP_WINDOW_SLIDE_EFFECT
  2039.      @layout.visible = self.visible  
  2040. end   
  2041.   
  2042. #--------------------------------------------------------------------------
  2043. # * Show
  2044. #--------------------------------------------------------------------------   
  2045.   alias mog_bg_ex_slide_show_help show
  2046.   def show
  2047.       if @battle_phase
  2048.       self.viewport = nil
  2049.       self.x = @org_position[0] ; self.y = @org_position[1]
  2050.       if HELP_WINDOW_SLIDE_EFFECT
  2051.          self.x += HELP_WINDOW_SLIDE_POSITION[0]
  2052.          self.y += HELP_WINDOW_SLIDE_POSITION[1]
  2053.       end
  2054.       self.opacity = HELP_WINDOW_OPACITY
  2055.       end
  2056.       mog_bg_ex_slide_show_help
  2057.   end  
  2058.   
  2059. #--------------------------------------------------------------------------
  2060. # * Update
  2061. #--------------------------------------------------------------------------  
  2062. alias mog_monogatari_help_window_update update
  2063. def update
  2064.      if @wait_time > 0
  2065.         @wait_time -= 1
  2066.         return
  2067.      end   
  2068.      mog_monogatari_help_window_update
  2069.      if SceneManager.scene_is?(Scene_Battle)
  2070.         if @layout != nil           
  2071.            refresh_layout if @layout.visible != self.visible
  2072.            @layout.visible = self.visible
  2073.         end
  2074.         self.visible = false if !$game_temp.sprite_visible
  2075.         execute_slide_effect if self.visible        
  2076.      end
  2077. end   
  2078.   
  2079. end

  2080. #==============================================================================
  2081. # ** Window_BattleActor
  2082. #==============================================================================
  2083. class Window_BattleActor < Window_BattleStatus
  2084.   
  2085.   include MOG_BATTLE_HUD_EX
  2086.   
  2087.   #--------------------------------------------------------------------------
  2088.   # * Initialize
  2089.   #--------------------------------------------------------------------------   
  2090.   alias mog_monogatari_battle_actor_initialize initialize
  2091.   def initialize(info_viewport)
  2092.       @force_hide = can_force_hide?
  2093.       mog_monogatari_battle_actor_initialize(info_viewport)
  2094.       self.width = ACTOR_WINDOW_SIZE[0]
  2095.       self.height = ACTOR_WINDOW_SIZE[1]
  2096.       @org_position = [ACTOR_WINDOW_POSITION[0] - (self.width / 2),
  2097.                        ACTOR_WINDOW_POSITION[1] - self.height]
  2098.       @org_position[1] = Graphics.height + 64 if @force_hide
  2099.       self.x = @org_position[0]
  2100.       self.y = @org_position[1]
  2101.       self.opacity = ACTOR_WINDOW_OPACITY
  2102.       self.z = MOG_BATTLE_HUD_EX::HUD_Z + 151
  2103.       self.viewport = nil
  2104.       create_layout
  2105.   end
  2106.   
  2107.   #--------------------------------------------------------------------------
  2108.   # * Can Force Hide?
  2109.   #--------------------------------------------------------------------------   
  2110.   def can_force_hide?
  2111.       return true if $imported[:ve_target_arrow]
  2112.       return true if $imported[:mog_battle_cursor]
  2113.       return false
  2114.   end
  2115.   
  2116. #--------------------------------------------------------------------------
  2117. # * Dispose
  2118. #--------------------------------------------------------------------------
  2119. alias mog_monogatari_actor_window_dispose dispose
  2120. def dispose
  2121.      mog_monogatari_actor_window_dispose
  2122.      dispose_layout
  2123. end

  2124. #--------------------------------------------------------------------------
  2125. # * Create Layout
  2126. #--------------------------------------------------------------------------   
  2127. def create_layout
  2128.      return if @layout != nil
  2129.      return if !ACTOR_WINDOW_LAYOUT
  2130.      return if $game_temp.mbhud_window[3]
  2131.      $game_temp.mbhud_window[3] = true
  2132.      @org_position_2 = [self.x + ACTOR_WINDOW_LAYOUT_POSITION[0],self.y + ACTOR_WINDOW_LAYOUT_POSITION[1]]
  2133.      @layout = Sprite.new
  2134.      @layout.bitmap = Cache.battle_hud("Layout_Target_Actor")
  2135.      @layout.z = self.z - 1
  2136.      refresh_layout
  2137.      @layout.visible = false
  2138. end

  2139. #--------------------------------------------------------------------------
  2140. # * Dispose Layout
  2141. #--------------------------------------------------------------------------
  2142. def dispose_layout
  2143.      return if @layout == nil
  2144.      @layout.dispose
  2145.      @layout = nil
  2146. end

  2147. #--------------------------------------------------------------------------
  2148. # * Refresh Layout
  2149. #--------------------------------------------------------------------------
  2150. def refresh_layout
  2151.      return if @layout == nil
  2152.      @layout.x = @org_position_2[0]
  2153.      @layout.y = @org_position_2[1]
  2154.      @layout.x += ACTOR_WINDOW_SLIDE_POSITION[0] if ACTOR_WINDOW_SLIDE_EFFECT
  2155.      @layout.y += ACTOR_WINDOW_SLIDE_POSITION[1] if ACTOR_WINDOW_SLIDE_EFFECT
  2156.      @layout.visible = self.visible
  2157. end     
  2158.   
  2159.   if $imported[:ve_target_arrow]
  2160.   #--------------------------------------------------------------------------
  2161.   # * New method: show_actor
  2162.   #--------------------------------------------------------------------------
  2163.   alias mog_battle_hud_ex_show_actor show_actor
  2164.   def show_actor
  2165.       return true if SceneManager.face_battler?
  2166.       mog_battle_hud_ex_show_actor
  2167.   end
  2168.   end
  2169.   
  2170. #--------------------------------------------------------------------------
  2171. # * Show
  2172. #--------------------------------------------------------------------------   
  2173.   alias mog_bg_ex_slide_show_actor show
  2174.   def show
  2175.       self.viewport = nil
  2176.       self.x = @org_position[0] ; self.y = @org_position[1]
  2177.       if ACTOR_WINDOW_SLIDE_EFFECT
  2178.          self.x += ACTOR_WINDOW_SLIDE_POSITION[0]
  2179.          self.y += ACTOR_WINDOW_SLIDE_POSITION[1]
  2180.       end
  2181.       self.opacity = ACTOR_WINDOW_OPACITY
  2182.       mog_bg_ex_slide_show_actor
  2183.   end  
  2184.   
  2185. #--------------------------------------------------------------------------
  2186. # * Update
  2187. #--------------------------------------------------------------------------  
  2188. alias mog_monogatari_actor_window_update update
  2189. def update
  2190.      mog_monogatari_actor_window_update   
  2191.      self.visible = self.active
  2192.      self.visible = false if @force_hide
  2193.      if @layout != nil        
  2194.         refresh_layout if @layout.visible != self.visible        
  2195.      end
  2196.      if !$game_temp.sprite_visible   
  2197.         self.visible = false
  2198.         @layout.visible = self.visible if @layout != nil
  2199.      end   
  2200.      execute_slide_effect if self.visible
  2201.   end  

  2202. end

  2203. #==============================================================================
  2204. # ** Window_BattleEnemy
  2205. #==============================================================================
  2206. class Window_BattleEnemy < Window_Selectable
  2207.   
  2208.   include MOG_BATTLE_HUD_EX
  2209.   
  2210.   #--------------------------------------------------------------------------
  2211.   # * Initialize
  2212.   #--------------------------------------------------------------------------   
  2213.   alias mog_monogatari_battle_enemy_initialize initialize
  2214.   def initialize(info_viewport)
  2215.       @force_hide = can_force_hide?
  2216.       mog_monogatari_battle_enemy_initialize(info_viewport)
  2217.       self.width = ENEMY_WINDOW_SIZE[0]
  2218.       self.height = ENEMY_WINDOW_SIZE[1]      
  2219.       @org_position = [ENEMY_WINDOW_POSITION[0] - (self.width / 2),
  2220.                        ENEMY_WINDOW_POSITION[1] - self.height]
  2221.       @org_position[1] = Graphics.height + 64 if @force_hide               
  2222.       self.x = @org_position[0]
  2223.       self.y = @org_position[1]      
  2224.       self.opacity = ENEMY_WINDOW_OPACITY
  2225.       self.z = MOG_BATTLE_HUD_EX::HUD_Z + 151
  2226.       create_layout
  2227.   end  
  2228.   
  2229.   #--------------------------------------------------------------------------
  2230.   # * Can Force Hide?
  2231.   #--------------------------------------------------------------------------   
  2232.   def can_force_hide?
  2233.       return true if $imported[:ve_target_arrow]
  2234.       return true if $imported[:mog_battle_cursor]
  2235.       return false
  2236.   end   
  2237.   
  2238. #--------------------------------------------------------------------------
  2239. # * Dispose
  2240. #--------------------------------------------------------------------------
  2241. alias mog_monogatari_enemy_window_dispose dispose
  2242. def dispose
  2243.      mog_monogatari_enemy_window_dispose
  2244.      dispose_layout
  2245. end

  2246. #--------------------------------------------------------------------------
  2247. # * Create Layout
  2248. #--------------------------------------------------------------------------   
  2249. def create_layout
  2250.      return if @layout != nil
  2251.      return if !ENEMY_WINDOW_LAYOUT
  2252.      return if $game_temp.mbhud_window[4]
  2253.      $game_temp.mbhud_window[4] = true     
  2254.      @org_position_2 = [self.x + ENEMY_WINDOW_LAYOUT_POSITION[0],self.y + ENEMY_WINDOW_LAYOUT_POSITION[1]]
  2255.      @layout = Sprite.new
  2256.      @layout.bitmap = Cache.battle_hud("Layout_Target_Enemy")
  2257.      @layout.z = self.z - 1
  2258.      refresh_layout
  2259.      @layout.visible = false
  2260. end

  2261. #--------------------------------------------------------------------------
  2262. # * Dispose Layout
  2263. #--------------------------------------------------------------------------
  2264. def dispose_layout
  2265.      return if @layout == nil
  2266.      @layout.dispose
  2267.      @layout = nil
  2268. end

  2269. #--------------------------------------------------------------------------
  2270. # * Refresh Layout
  2271. #--------------------------------------------------------------------------
  2272. def refresh_layout
  2273.      return if @layout == nil
  2274.      @layout.x = @org_position_2[0]
  2275.      @layout.y = @org_position_2[1]
  2276.      @layout.x += ENEMY_WINDOW_SLIDE_POSITION[0] if ENEMY_WINDOW_SLIDE_EFFECT
  2277.      @layout.y += ENEMY_WINDOW_SLIDE_POSITION[1] if ENEMY_WINDOW_SLIDE_EFFECT
  2278.      @layout.visible = self.visible
  2279. end      
  2280.   
  2281. #--------------------------------------------------------------------------
  2282. # * Show
  2283. #--------------------------------------------------------------------------   
  2284.   alias mog_bg_ex_slide_show_enemy show
  2285.   def show
  2286.       self.viewport = nil
  2287.       self.x = @org_position[0] ; self.y = @org_position[1]
  2288.       if ENEMY_WINDOW_SLIDE_EFFECT
  2289.          self.x += ENEMY_WINDOW_SLIDE_POSITION[0]
  2290.          self.y += ENEMY_WINDOW_SLIDE_POSITION[1]
  2291.       end
  2292.       self.opacity = ENEMY_WINDOW_OPACITY
  2293.       mog_bg_ex_slide_show_enemy
  2294.   end  
  2295.   
  2296. #--------------------------------------------------------------------------
  2297. # * Update
  2298. #--------------------------------------------------------------------------  
  2299. alias mog_monogatari_enemy_window_update update
  2300. def update
  2301.      mog_monogatari_enemy_window_update
  2302.      self.visible = false if @force_hide
  2303.      if @layout != nil and @layout.visible != self.visible        
  2304.         refresh_layout
  2305.      end
  2306.      if !$game_temp.sprite_visible   
  2307.         self.visible = false
  2308.         @layout.visible = self.visible if @layout != nil
  2309.      end   
  2310.      execute_slide_effect if self.visible
  2311.   end   
  2312.   
  2313.   if $imported["YEA-BattleEngine"]
  2314.   #--------------------------------------------------------------------------
  2315.   # * Draw Item
  2316.   #--------------------------------------------------------------------------
  2317.   def draw_item(index)
  2318.       change_color(normal_color)
  2319.       name = $game_troop.alive_members[index].name
  2320.       draw_text(item_rect_for_text(index), name)
  2321.   end
  2322.   end

  2323.   #--------------------------------------------------------------------------
  2324.   # * Process Cursor Move
  2325.   #--------------------------------------------------------------------------
  2326.   alias mog_atb_wenemy_process_cursor_move process_cursor_move
  2327.   def process_cursor_move
  2328.       return if SceneManager.scene_is?(Scene_Battle) and !$game_temp.sprite_visible
  2329.       mog_atb_wenemy_process_cursor_move
  2330.   end

  2331.   #--------------------------------------------------------------------------
  2332.   # * Process Handling
  2333.   #--------------------------------------------------------------------------
  2334.   alias mog_atb_wenemy_process_handling process_handling
  2335.   def process_handling  
  2336.       return if SceneManager.scene_is?(Scene_Battle) and !$game_temp.sprite_visible
  2337.       mog_atb_wenemy_process_handling
  2338.   end  
  2339.   
  2340. end

  2341. #==============================================================================
  2342. # ** Window_BattleSkill
  2343. #==============================================================================
  2344. class Window_BattleSkill < Window_SkillList
  2345. include MOG_BATTLE_HUD_EX

  2346. #--------------------------------------------------------------------------
  2347. # * Initialize
  2348. #--------------------------------------------------------------------------   
  2349. alias mog_monogatari_battle_skill_initialize initialize
  2350. def initialize(help_window, info_viewport)
  2351.      @force_hide = can_force_hide?
  2352.      @force_hide_active = can_force_hide_active?     
  2353.      mog_monogatari_battle_skill_initialize(help_window, info_viewport)
  2354.      self.width = SKILL_WINDOW_SIZE[0]
  2355.      self.height = SKILL_WINDOW_SIZE[1]   
  2356.      @org_position = [SKILL_WINDOW_POSITION[0],
  2357.           Graphics.height - self.height + SKILL_WINDOW_POSITION[1]]
  2358.      self.x = @org_position[0]
  2359.      self.y = @org_position[1]
  2360.      self.opacity = SKILL_WINDOW_OPACITY
  2361.      self.viewport = nil
  2362.      self.z = MOG_BATTLE_HUD_EX::HUD_Z + 150
  2363.      create_layout
  2364. end
  2365.   
  2366. #--------------------------------------------------------------------------
  2367. # * Col Max
  2368. #--------------------------------------------------------------------------   
  2369.   def col_max
  2370.       return SKILL_COL_MAX
  2371.   end

  2372. #--------------------------------------------------------------------------
  2373. # * Can Force Hide Active?
  2374. #--------------------------------------------------------------------------   
  2375. def can_force_hide_active?
  2376.      return true if $imported[:ve_target_arrow]
  2377.      return true if $imported[:mog_battle_cursor] != nil
  2378.      return false
  2379. end   

  2380.   #--------------------------------------------------------------------------
  2381.   # * Can Force Hide?
  2382.   #--------------------------------------------------------------------------   
  2383.   def can_force_hide?
  2384.       return false
  2385.   end

  2386. #--------------------------------------------------------------------------
  2387. # * Dispose
  2388. #--------------------------------------------------------------------------
  2389. alias mog_monogatari_skill_window_dispose dispose
  2390. def dispose
  2391.      mog_monogatari_skill_window_dispose
  2392.      dispose_layout
  2393. end

  2394. #--------------------------------------------------------------------------
  2395. # * Create Layout
  2396. #--------------------------------------------------------------------------   
  2397. def create_layout
  2398.      return if @layout != nil
  2399.      return if !SKILL_WINDOW_LAYOUT
  2400.      return if $game_temp.mbhud_window[5]
  2401.      $game_temp.mbhud_window[5] = true
  2402.      @org_position_2 = [self.x + SKILL_WINDOW_LAYOUT_POSITION[0],self.y + SKILL_WINDOW_LAYOUT_POSITION[1]]
  2403.      @layout = Sprite.new
  2404.      @layout.bitmap = Cache.battle_hud("Layout_Skill")
  2405.      @layout.z = self.z - 1
  2406.      refresh_layout
  2407.      @layout.visible = false
  2408. end

  2409. #--------------------------------------------------------------------------
  2410. # * Dispose Layout
  2411. #--------------------------------------------------------------------------
  2412. def dispose_layout
  2413.      return if @layout == nil
  2414.      @layout.dispose
  2415.      @layout = nil
  2416. end

  2417. #--------------------------------------------------------------------------
  2418. # * Refresh Layout
  2419. #--------------------------------------------------------------------------
  2420. def refresh_layout
  2421.      return if @layout == nil
  2422.      @layout.x = @org_position_2[0]
  2423.      @layout.y = @org_position_2[1]
  2424.      @layout.x += SKILL_WINDOW_SLIDE_POSITION[0] if SKILL_WINDOW_SLIDE_EFFECT
  2425.      @layout.y += SKILL_WINDOW_SLIDE_POSITION[1] if SKILL_WINDOW_SLIDE_EFFECT
  2426.      @layout.visible = self.visible
  2427. end  
  2428.   
  2429. #--------------------------------------------------------------------------
  2430. # * Show
  2431. #--------------------------------------------------------------------------   
  2432.   alias mog_bg_ex_slide_show_skill show
  2433.   def show
  2434.       self.viewport = nil
  2435.       self.x = @org_position[0] ; self.y = @org_position[1]
  2436.       if SKILL_WINDOW_SLIDE_EFFECT
  2437.          self.x += SKILL_WINDOW_SLIDE_POSITION[0]
  2438.          self.y += SKILL_WINDOW_SLIDE_POSITION[1]
  2439.       end
  2440.       self.opacity = SKILL_WINDOW_OPACITY
  2441.       mog_bg_ex_slide_show_skill
  2442.   end

  2443. #--------------------------------------------------------------------------
  2444. # * Update
  2445. #--------------------------------------------------------------------------  
  2446. alias mog_monogatari_skill_window_update update
  2447. def update
  2448.      mog_monogatari_skill_window_update
  2449.      self.visible = self.active if @force_hide_active
  2450.      self.visible = false if @force_hide
  2451.      if @layout != nil and @layout.visible != self.visible        
  2452.         refresh_layout
  2453.     end
  2454.     self.visible = false if !$game_temp.sprite_visible
  2455.     execute_slide_effect if self.visible
  2456. end
  2457.   
  2458. end

  2459. #==============================================================================
  2460. # ** Window_BattleItem
  2461. #==============================================================================
  2462. class Window_BattleItem < Window_ItemList
  2463.   include MOG_BATTLE_HUD_EX

  2464. #--------------------------------------------------------------------------
  2465. # * Initialize
  2466. #--------------------------------------------------------------------------  
  2467. alias mog_monogatari_battle_item_initialize initialize
  2468. def initialize(help_window, info_viewport)
  2469.      @force_hide = can_force_hide?
  2470.      @force_hide_active = can_force_hide_active?
  2471.      mog_monogatari_battle_item_initialize(help_window, info_viewport)
  2472.      self.width = ITEM_WINDOW_SIZE[0]
  2473.      self.height = ITEM_WINDOW_SIZE[1]
  2474.      @org_position = [ITEM_WINDOW_POSITION[0],
  2475.           Graphics.height - self.height + ITEM_WINDOW_POSITION[1]]
  2476.      self.x = @org_position[0]
  2477.      self.y = @org_position[1]
  2478.      self.viewport = nil
  2479.      self.opacity = ITEM_WINDOW_OPACITY
  2480.      self.z = MOG_BATTLE_HUD_EX::HUD_Z + 150
  2481.      create_layout
  2482. end  

  2483. #--------------------------------------------------------------------------
  2484. # * Col Max
  2485. #--------------------------------------------------------------------------   
  2486.   def col_max
  2487.       return ITEM_COL_MAX
  2488.   end  

  2489. #--------------------------------------------------------------------------
  2490. # * Can Force Hide Active?
  2491. #--------------------------------------------------------------------------   
  2492. def can_force_hide_active?
  2493.      return true if $imported[:ve_target_arrow]
  2494.      return true if $imported[:mog_battle_cursor] != nil
  2495.      return false
  2496. end  

  2497. #--------------------------------------------------------------------------
  2498. # * Can Force Hide?
  2499. #--------------------------------------------------------------------------   
  2500. def can_force_hide?
  2501.      return false
  2502. end

  2503. #--------------------------------------------------------------------------
  2504. # * Dispose
  2505. #--------------------------------------------------------------------------
  2506. alias mog_monogatari_item_window_dispose dispose
  2507. def dispose
  2508.      mog_monogatari_item_window_dispose
  2509.      dispose_layout
  2510. end

  2511. #--------------------------------------------------------------------------
  2512. # * Create Layout
  2513. #--------------------------------------------------------------------------   
  2514. def create_layout
  2515.      return if @layout != nil
  2516.      return if !ITEM_WINDOW_LAYOUT
  2517.      return if $game_temp.mbhud_window[6]
  2518.      $game_temp.mbhud_window[6] = true
  2519.      @org_position_2 = [self.x + ITEM_WINDOW_LAYOUT_POSITION[0],self.y + ITEM_WINDOW_LAYOUT_POSITION[1]]
  2520.      @layout = Sprite.new
  2521.      @layout.bitmap = Cache.battle_hud("Layout_Item")
  2522.      @layout.z = self.z - 1
  2523.      refresh_layout
  2524.      @layout.visible = false
  2525. end

  2526. #--------------------------------------------------------------------------
  2527. # * Dispose Layout
  2528. #--------------------------------------------------------------------------
  2529. def dispose_layout
  2530.      return if @layout == nil
  2531.      @layout.dispose
  2532.      @layout = nil
  2533. end

  2534. #--------------------------------------------------------------------------
  2535. # * Refresh Layout
  2536. #--------------------------------------------------------------------------
  2537. def refresh_layout
  2538.      return if @layout == nil
  2539.      @layout.x = @org_position_2[0]
  2540.      @layout.y = @org_position_2[1]
  2541.      @layout.x += ITEM_WINDOW_SLIDE_POSITION[0] if ITEM_WINDOW_SLIDE_EFFECT
  2542.      @layout.y += ITEM_WINDOW_SLIDE_POSITION[1] if ITEM_WINDOW_SLIDE_EFFECT
  2543.      @layout.visible = self.visible
  2544. end  

  2545. #--------------------------------------------------------------------------
  2546. # * Show
  2547. #--------------------------------------------------------------------------   
  2548.   alias mog_bg_ex_slide_show_item show
  2549.   def show
  2550.       self.viewport = nil
  2551.       self.x = @org_position[0] ; self.y = @org_position[1]
  2552.       if ITEM_WINDOW_SLIDE_EFFECT
  2553.          self.x += ITEM_WINDOW_SLIDE_POSITION[0]
  2554.          self.y += ITEM_WINDOW_SLIDE_POSITION[1]
  2555.       end
  2556.       self.opacity = ITEM_WINDOW_OPACITY
  2557.       mog_bg_ex_slide_show_item      
  2558.   end

  2559. #--------------------------------------------------------------------------
  2560. # * Update
  2561. #--------------------------------------------------------------------------  
  2562. alias mog_monogatari_item_window_update update
  2563. def update
  2564.      mog_monogatari_item_window_update
  2565.      self.visible = self.active if @force_hide_active
  2566.      self.visible = false if @force_hide
  2567.      if @layout != nil
  2568.         refresh_layout if @layout.visible != self.visible
  2569.      end
  2570.      self.visible = false if !$game_temp.sprite_visible
  2571.      execute_slide_effect if self.visible
  2572.   end  

  2573. end

  2574. end

  2575. #--------------------------------------------------------------------------
  2576. #--------------------------------------------------------------------------
  2577. #################################
  2578. if $imported["YEA-BattleEngine"]
  2579. #################################

  2580. #==============================================================================
  2581. # ** Window_BattleStatusAid
  2582. #==============================================================================
  2583. class Window_BattleStatusAid < Window_BattleStatus
  2584.   
  2585. #--------------------------------------------------------------------------
  2586. # * Refresh
  2587. #--------------------------------------------------------------------------   
  2588.   def refresh
  2589.       contents.clear
  2590.       self.visible = false
  2591.   end
  2592.    
  2593. end

  2594. #==============================================================================
  2595. # ** Window_BattleStatus
  2596. #==============================================================================
  2597. class Window_BattleStatus < Window_Selectable

  2598. #--------------------------------------------------------------------------
  2599. # * Update
  2600. #--------------------------------------------------------------------------
  2601. alias mog_monogatari_bhud_yf_update update
  2602. def update
  2603.      mog_monogatari_bhud_yf_update
  2604.      update_visible_yf
  2605. end

  2606. #--------------------------------------------------------------------------
  2607. # * Update Visible Yf
  2608. #--------------------------------------------------------------------------
  2609. def update_visible_yf
  2610.      self.visible = self.active
  2611.      self.visible = false if !$game_temp.sprite_visible
  2612. end

  2613. end  

  2614. #==============================================================================
  2615. # ■ Window ActorCommand
  2616. #==============================================================================
  2617. class Window_ActorCommand < Window_Command
  2618.   
  2619. #--------------------------------------------------------------------------
  2620. # * Show
  2621. #--------------------------------------------------------------------------
  2622.   alias mog_bhud_yf_command_show show
  2623.   def show
  2624.       return if !BattleManager.can_enable_window?
  2625.       mog_bhud_yf_command_show
  2626.   end
  2627.   
  2628. #--------------------------------------------------------------------------
  2629. # * Update
  2630. #--------------------------------------------------------------------------
  2631. alias mog_monogatari_bhud_yf_actorcommand_update update
  2632. def update
  2633.      mog_monogatari_bhud_yf_actorcommand_update
  2634.      update_visible_yf
  2635. end

  2636. #--------------------------------------------------------------------------
  2637. # * Update Visible Yf
  2638. #--------------------------------------------------------------------------
  2639. def update_visible_yf
  2640.      self.visible = self.active
  2641.      self.visible = false if !$game_temp.sprite_visible
  2642. end

  2643. end

  2644. #==============================================================================
  2645. # ** Scene Battle
  2646. #==============================================================================
  2647. class Scene_Battle < Scene_Base
  2648.   
  2649.   include MOG_BATTLE_HUD_EX
  2650.   
  2651.   #--------------------------------------------------------------------------
  2652.   # alias method: create_skill_window
  2653.   #--------------------------------------------------------------------------
  2654.   alias mog_yf_scene_battle_create_skill_window create_skill_window
  2655.   def create_skill_window
  2656.       mog_yf_scene_battle_create_skill_window
  2657.       @skill_window.width = SKILL_WINDOW_SIZE[0]
  2658.       @skill_window.height = SKILL_WINDOW_SIZE[1]
  2659.       @skill_window.x = SKILL_WINDOW_POSITION[0]
  2660.       @skill_window.y = SKILL_WINDOW_POSITION[1]
  2661.   end
  2662.   
  2663.   #--------------------------------------------------------------------------
  2664.   # alias method: create_item_window
  2665.   #--------------------------------------------------------------------------
  2666.   alias mog_yf_scene_battle_create_item_window create_item_window
  2667.   def create_item_window
  2668.       mog_yf_scene_battle_create_item_window
  2669.       @item_window.width = ITEM_WINDOW_SIZE[0]
  2670.       @item_window.height = ITEM_WINDOW_SIZE[1]
  2671.       @item_window.x = ITEM_WINDOW_POSITION[0]
  2672.       @item_window.y = ITEM_WINDOW_POSITION[1]
  2673.   end  
  2674.   
  2675. if !$imported[:mog_atb_system]
  2676. #--------------------------------------------------------------------------
  2677. # * Next Command
  2678. #--------------------------------------------------------------------------
  2679.   def next_command
  2680.     if BattleManager.next_command
  2681.        @status_window.show
  2682.        redraw_current_status
  2683.        @actor_command_window.show
  2684.        @status_aid_window.hide      
  2685.        start_actor_command_selection
  2686.     else
  2687.       turn_start
  2688.     end
  2689.   end
  2690.   end

  2691. #--------------------------------------------------------------------------
  2692. # * STW Can Visible
  2693. #--------------------------------------------------------------------------   
  2694.   def stw_can_visible?
  2695.       return false if !BattleManager.can_enable_window?
  2696.       return false if @item_window.visible
  2697.       return false if @skill_window.visible
  2698.       return true if @actor_window.active
  2699.       return false
  2700.   end

  2701. if $imported["YEA-CommandEquip"]
  2702. #--------------------------------------------------------------------------
  2703. # * Command Equip
  2704. #--------------------------------------------------------------------------   
  2705.   alias mog_yf_command_equip command_equip
  2706.   def command_equip
  2707.       @actor_command_window.visible = false
  2708.       @actor_command_window.update
  2709.       $game_temp.battle_hud_visible_refresh = [true,false]
  2710.       @spriteset.update_battle_hud_ex
  2711.       @spriteset.battler_sprites.each do |s| s.dispose_animation end
  2712.       mog_yf_command_equip
  2713.       $game_temp.battle_hud_visible_refresh = [true,true]
  2714.   end
  2715.   end
  2716.   
  2717. end

  2718. end
  2719. #--------------------------------------------------------------------------


  2720. ######################################
  2721. if $imported["YEA-EnemyTargetInfo"]
  2722. ######################################

  2723. #==============================================================================
  2724. # ■ Window_Comparison
  2725. #==============================================================================
  2726. class Window_Comparison < Window_Base
  2727.   
  2728.   #--------------------------------------------------------------------------
  2729.   # * Refresh
  2730.   #--------------------------------------------------------------------------     
  2731.   alias mog_battle_hud_ex_yf_refresh refresh
  2732.   def refresh
  2733.       mog_battle_hud_ex_yf_refresh
  2734.       self.z = MOG_BATTLE_HUD_EX::HUD_Z + 152
  2735.       self.viewport = nil
  2736.   end
  2737.   
  2738. end

  2739. #==============================================================================
  2740. # ■ Window_ComparisonHelp
  2741. #==============================================================================
  2742. class Window_ComparisonHelp < Window_Base
  2743.   
  2744.   #--------------------------------------------------------------------------
  2745.   # * Refresh
  2746.   #--------------------------------------------------------------------------     
  2747.   alias mog_battle_hud_ex_yf_refresh refresh
  2748.   def refresh
  2749.       mog_battle_hud_ex_yf_refresh
  2750.       self.z = MOG_BATTLE_HUD_EX::HUD_Z + 152
  2751.       self.viewport = nil
  2752.   end
  2753.   
  2754. end
  2755. end
  2756. #--------------------------------------------------------------------------
  2757. #--------------------------------------------------------------------------


  2758. #################################
  2759. if $imported["YEA-EnemyTargetInfo"]
  2760. #################################
  2761. class Window_Comparison < Window_Base
  2762.   
  2763.   #--------------------------------------------------------------------------
  2764.   # initialize
  2765.   #--------------------------------------------------------------------------
  2766.   alias mog_battle_hud_yf_wcomparison_initialize initialize
  2767.   def initialize(type)
  2768.       mog_battle_hud_yf_wcomparison_initialize(type)
  2769.       self.z = 102
  2770.   end  
  2771.   
  2772. end
  2773. end
  2774. #--------------------------------------------------------------------------
  2775. #--------------------------------------------------------------------------

  2776. #--------------------------------------------------------------------------
  2777. #--------------------------------------------------------------------------
  2778. #################################
  2779. if $imported["YSA-CATB"]
  2780. #################################

  2781. #==============================================================================
  2782. # ■ Enemy CATB Gauge Viewport
  2783. #==============================================================================
  2784. class Enemy_CATB_Gauge_Viewport < Viewport
  2785.   
  2786.   #--------------------------------------------------------------------------
  2787.   # initialize
  2788.   #--------------------------------------------------------------------------
  2789.   alias mog_battle_hud_ex_yami_initialize initialize
  2790.   def initialize(battler, sprite, type)
  2791.       mog_battle_hud_ex_yami_initialize(battler, sprite, type)
  2792.       self.z = 90
  2793.   end

  2794. end
  2795.   
  2796. #==============================================================================
  2797. # ■ Game_Battler
  2798. #==============================================================================
  2799. class Game_Battler < Game_BattlerBase
  2800.   
  2801.   attr_accessor :catb_value  
  2802.   attr_accessor :max_atb
  2803.   
  2804.   #--------------------------------------------------------------------------
  2805.   # * Max ATB
  2806.   #--------------------------------------------------------------------------   
  2807.   def max_atb
  2808.       return MAX_CATB_VALUE
  2809.       return 1
  2810.   end
  2811.   
  2812. end

  2813. end
  2814. #--------------------------------------------------------------------------
  2815. #--------------------------------------------------------------------------

  2816. #==============================================================================
  2817. # ** Window Base
  2818. #==============================================================================
  2819. class Window_Base < Window
  2820.   
  2821. #--------------------------------------------------------------------------
  2822. # * Execute Move W
  2823. #--------------------------------------------------------------------------      
  2824. def execute_move_w(sprite,type,cp,np)
  2825.      sp = 6 + ((cp - np).abs / 10)
  2826.      if cp > np ;    cp -= sp ; cp = np if cp < np
  2827.         elsif cp < np ; cp += sp ; cp = np if cp > np
  2828.      end     
  2829.      sprite.x = cp if type == 0 ; sprite.y = cp if type == 1
  2830. end
  2831.    
  2832. #--------------------------------------------------------------------------
  2833. # * Set BH EX Font
  2834. #--------------------------------------------------------------------------   
  2835.   def set_bh_ex_font
  2836.       return if !MOG_BATTLE_HUD_EX::ENABLE_WINDOW_FONT_SET
  2837.       self.contents.font.bold = MOG_BATTLE_HUD_EX::WINDOW_FONT_BOLD
  2838.       self.contents.font.size = MOG_BATTLE_HUD_EX::WINDOW_FONT_SIZE
  2839.       self.contents.font.italic = MOG_BATTLE_HUD_EX::WINDOW_FONT_ITALIC
  2840.       self.contents.font.name = MOG_BATTLE_HUD_EX::WINDOW_FONT_NAME if MOG_BATTLE_HUD_EX::WINDOW_FONT_NAME != nil
  2841.   end
  2842.   
  2843. #--------------------------------------------------------------------------
  2844. # * Execute Slide Effect
  2845. #--------------------------------------------------------------------------   
  2846. def execute_slide_effect
  2847.      return if @org_position == nil
  2848.      execute_move_w(self,0,self.x,@org_position[0])
  2849.      execute_move_w(self,1,self.y,@org_position[1])
  2850.      return if @layout == nil
  2851.      execute_move_w(@layout,0,@layout.x,@org_position_2[0])
  2852.      execute_move_w(@layout,1,@layout.y,@org_position_2[1])     
  2853. end     
  2854.   
  2855. end

  2856. #==============================================================================
  2857. # ** Window Help
  2858. #==============================================================================
  2859. class Window_Help < Window_Base
  2860.   
  2861. #--------------------------------------------------------------------------
  2862. # * Draw Text
  2863. #--------------------------------------------------------------------------   
  2864.   alias mog_bh_ex_draw_text_help draw_text
  2865.   def draw_text(*args)
  2866.       set_bh_ex_font
  2867.       mog_bh_ex_draw_text_help(*args)
  2868.   end
  2869.   
  2870. end

  2871. #==============================================================================
  2872. # ** Window BattleActor
  2873. #==============================================================================
  2874. class Window_BattleActor < Window_BattleStatus

  2875. #--------------------------------------------------------------------------
  2876. # * Draw Item
  2877. #--------------------------------------------------------------------------   
  2878.   alias mog_bbex_draw_item_actor draw_item
  2879.   def draw_item(index)
  2880.       set_bh_ex_font
  2881.       mog_bbex_draw_item_actor(index)
  2882.   end
  2883.   
  2884. end

  2885. #==============================================================================
  2886. # ** Window BattleEnemy
  2887. #==============================================================================
  2888. class Window_BattleEnemy < Window_Selectable
  2889.   
  2890. #--------------------------------------------------------------------------
  2891. # * Draw Item
  2892. #--------------------------------------------------------------------------   
  2893.   alias mog_bbex_draw_item_enemy draw_item
  2894.   def draw_item(index)
  2895.       set_bh_ex_font
  2896.       mog_bbex_draw_item_enemy(index)
  2897.   end
  2898.   
  2899. end

  2900. #==============================================================================
  2901. # ** Window ItemList
  2902. #==============================================================================
  2903. class Window_ItemList < Window_Selectable
  2904.   
  2905. #--------------------------------------------------------------------------
  2906. # * Draw Item Name
  2907. #--------------------------------------------------------------------------   
  2908.    alias mog_bhex_draw_item_name_item draw_item_name
  2909.    def draw_item_name(item, x, y, enabled = true, width = 172)
  2910.        set_bh_ex_font
  2911.        mog_bhex_draw_item_name_item(item, x, y, enabled , width )
  2912.    end  

  2913. end

  2914. #==============================================================================
  2915. # ** Window SkillList
  2916. #==============================================================================
  2917. class Window_SkillList < Window_Selectable  

  2918. #--------------------------------------------------------------------------
  2919. # * Draw Item Name
  2920. #--------------------------------------------------------------------------   
  2921.    alias mog_bhex_draw_item_name_skill draw_item_name
  2922.    def draw_item_name(item, x, y, enabled = true, width = 172)
  2923.        set_bh_ex_font
  2924.        mog_bhex_draw_item_name_skill(item, x, y, enabled , width )
  2925.    end   
  2926.    
  2927. end

  2928. #==============================================================================
  2929. # ** Spriteset_Battle
  2930. #==============================================================================
  2931. class Spriteset_Battle

  2932.   #--------------------------------------------------------------------------
  2933.   # * Initialize
  2934.   #--------------------------------------------------------------------------
  2935.   alias mog_battle_hud_ex_initialize initialize
  2936.   def initialize
  2937.       check_screen_xyz_nil rescue nil
  2938.       mog_battle_hud_ex_initialize
  2939.       create_battle_hud_ex
  2940.   end
  2941.   
  2942.   #--------------------------------------------------------------------------
  2943.   # * Check Screen Xyz
  2944.   #--------------------------------------------------------------------------   
  2945.   def check_screen_xyz_nil
  2946.       return if !SceneManager.face_battler?
  2947.       for actor in $game_party.battle_members
  2948.           actor.screen_x = 0 if actor.screen_x == nil
  2949.           actor.screen_y = 0 if actor.screen_y == nil
  2950.           actor.screen_z = 0 if actor.screen_z == nil
  2951.       end
  2952.   end
  2953.   
  2954.   #--------------------------------------------------------------------------
  2955.   # * Check Screen Xyz after
  2956.   #--------------------------------------------------------------------------     
  2957.   def check_screen_xyz_after
  2958.       return if !SceneManager.face_battler?
  2959.       $game_party.battle_members.each_with_index do |actor, index|
  2960.           actor.screen_x = $game_temp.battler_face_pos[index][0] rescue nil
  2961.           actor.screen_y = $game_temp.battler_face_pos[index][1] rescue nil
  2962.           actor.screen_z = $game_temp.battler_face_pos[index][2] rescue nil
  2963.       end   
  2964.   end
  2965.   
  2966.   #--------------------------------------------------------------------------
  2967.   # * Dispose
  2968.   #--------------------------------------------------------------------------  
  2969.   alias mog_battle_hud_ex_dispose dispose
  2970.   def dispose
  2971.       dispose_battle_hud_ex
  2972.       mog_battle_hud_ex_dispose
  2973.   end
  2974.   
  2975.   #--------------------------------------------------------------------------
  2976.   # * Update
  2977.   #--------------------------------------------------------------------------  
  2978.   alias mog_battle_hud_ex_update update
  2979.   def update
  2980.       mog_battle_hud_ex_update
  2981.       update_battle_hud_ex
  2982.   end
  2983.   
  2984.   #--------------------------------------------------------------------------
  2985.   # * Create Battle Hud EX
  2986.   #--------------------------------------------------------------------------   
  2987.   def create_battle_hud_ex
  2988.       return if @battle_hud_ex != nil
  2989.       $game_temp.battle_hud_visible = true
  2990.       @battle_hud_ex = Monogatari_Bhud.new(nil)
  2991.       check_screen_xyz_after
  2992.   end
  2993.   
  2994.   #--------------------------------------------------------------------------
  2995.   # * Dispose Battle Hud EX
  2996.   #--------------------------------------------------------------------------   
  2997.   def dispose_battle_hud_ex
  2998.       return if @battle_hud_ex == nil
  2999.       @battle_hud_ex.dispose
  3000.       @battle_hud_ex = nil
  3001.       $game_temp.mbhud_window = [false,false,false,false,false,false,false]
  3002.   end
  3003.   
  3004.   #--------------------------------------------------------------------------
  3005.   # * Update Battle Hud EX
  3006.   #--------------------------------------------------------------------------   
  3007.   def update_battle_hud_ex
  3008.       refresh_battle_hud if $game_temp.mbhud_force_refresh
  3009.       return if @battle_hud_ex == nil
  3010.       @battle_hud_ex.update
  3011.   end
  3012.   
  3013.   #--------------------------------------------------------------------------
  3014.   # * Refresh Battle Hud
  3015.   #--------------------------------------------------------------------------   
  3016.   def refresh_battle_hud
  3017.       $game_temp.mbhud_force_refresh = false
  3018.       check_screen_xyz_nil rescue nil
  3019.       dispose_battle_hud_ex
  3020.       create_battle_hud_ex
  3021.   end
  3022.   
  3023. end

  3024. #==============================================================================
  3025. # ** Monogatari Bhud
  3026. #==============================================================================
  3027. class Monogatari_Bhud
  3028.   
  3029.   include MOG_BATTLE_HUD_EX
  3030.   
  3031.   #--------------------------------------------------------------------------
  3032.   # * Initialize
  3033.   #--------------------------------------------------------------------------  
  3034.   def initialize(viewport)
  3035.       @battle_hud = [] ; @sprite_visitle_wait = 0
  3036.       $game_party.battle_members.each_with_index do |actor, index|
  3037.       @battle_hud.push(Battle_Hud_EX.new(actor,index,max_members,nil)) end
  3038.       create_turn_sprite(nil)
  3039.       create_screen_layout(nil)      
  3040.   end
  3041.   
  3042.   #--------------------------------------------------------------------------
  3043.   # * Max members
  3044.   #--------------------------------------------------------------------------   
  3045.   def max_members
  3046.       if $game_party.members.size > $game_party.max_battle_members
  3047.          return $game_party.max_battle_members
  3048.       end   
  3049.       return $game_party.members.size
  3050.   end
  3051.   
  3052.   #--------------------------------------------------------------------------
  3053.   # * Dispose
  3054.   #--------------------------------------------------------------------------   
  3055.   def dispose
  3056.       @battle_hud.each {|sprite| sprite.dispose }
  3057.       dispose_turn_sprite
  3058.       dispose_screen_layout
  3059.   end
  3060.   
  3061.   #--------------------------------------------------------------------------
  3062.   # * Update
  3063.   #--------------------------------------------------------------------------   
  3064.   def update
  3065.       @battle_hud.each {|sprite| sprite.update }
  3066.       update_turn_sprite
  3067.       update_screen_layout
  3068.       refresh_battle_hud_visible if $game_temp.battle_hud_visible_refresh[0]
  3069.   end
  3070.   
  3071.   #--------------------------------------------------------------------------
  3072.   # * Update
  3073.   #--------------------------------------------------------------------------   
  3074.   def refresh_battle_hud_visible
  3075.       $game_temp.battle_hud_visible_refresh[0] = false
  3076.       @turn_sprite.visible = $game_temp.battle_hud_visible_refresh[1] if @turn_sprite != nil
  3077.       @screen_layout.visible = $game_temp.battle_hud_visible_refresh[1] if @screen_layout != nil
  3078.       @skill_name.visible = $game_temp.battle_hud_visible_refresh[1] if @skill_name != nil
  3079.       @battle_hud.each {|sprite| sprite.refresh_visible($game_temp.battle_hud_visible_refresh[1]) }
  3080. end
  3081.   
  3082. end

  3083. #==============================================================================
  3084. # ** Monogatari Bhud
  3085. #==============================================================================
  3086. class Monogatari_Bhud
  3087.   
  3088. #--------------------------------------------------------------------------
  3089. # * Can Update Turn Sprite
  3090. #--------------------------------------------------------------------------
  3091.   def can_refresh_turn_sprite?
  3092.       return true if @turn_sprite.visible != $game_temp.command_visible
  3093.       return true if $game_temp.refresh_turn_sprite
  3094.       return false
  3095.   end
  3096.   
  3097. #--------------------------------------------------------------------------
  3098. # * Create Turn Sprite
  3099. #--------------------------------------------------------------------------
  3100.   def create_turn_sprite(viewport)
  3101.       return if !TURN_SPRITE_VISIBLE
  3102.       return if @turn_sprite != nil
  3103.       @turn_sprite = Sprite.new
  3104.       @turn_sprite.bitmap = Cache.battle_hud("Turn")
  3105.       @turn_sprite.viewport = viewport
  3106.       @turn_sprite.z = HUD_Z + TURN_SPRITE_Z
  3107.       @turn_sprite.visible = false
  3108.       @turn_sprite_update_time = 5
  3109.       @turn_sprite_blink = [0,0]
  3110.   end
  3111.   
  3112. #--------------------------------------------------------------------------
  3113. # * Dispose Turn Sprite
  3114. #--------------------------------------------------------------------------
  3115.   def dispose_turn_sprite
  3116.       return if @turn_sprite == nil
  3117.       @turn_sprite.dispose
  3118.       @turn_sprite = nil
  3119.   end
  3120.   
  3121. #--------------------------------------------------------------------------
  3122. # * Update Turn Sprite
  3123. #--------------------------------------------------------------------------
  3124.   def update_turn_sprite
  3125.       return if @turn_sprite == nil
  3126.       if @turn_sprite_update_time > 0
  3127.          @turn_sprite_update_time -= 1
  3128.          return
  3129.       end  
  3130.       update_turn_visible
  3131.       update_turn_blink
  3132.   end
  3133.   
  3134. #--------------------------------------------------------------------------
  3135. # * Update Turn Visible
  3136. #--------------------------------------------------------------------------   
  3137.   def update_turn_visible   
  3138.       $game_temp.refresh_turn_sprite = false
  3139.       @turn_sprite.visible = can_turn_sprite_visible?
  3140.       return if BattleManager.actor == nil
  3141.       x = $game_temp.hud_pos_real[BattleManager.actor.index][0] + TURN_SPRITE_POSITION[0] rescue nil
  3142.       y = $game_temp.hud_pos_real[BattleManager.actor.index][1] + TURN_SPRITE_POSITION[1] rescue nil
  3143.       x = -1000 if x == nil ; y = -1000 if y == nil
  3144.       @turn_sprite.x = x ; @turn_sprite.y = y      
  3145. end
  3146.   
  3147. #--------------------------------------------------------------------------
  3148. # * Can Turn Sprite Visible?
  3149. #--------------------------------------------------------------------------   
  3150. def can_turn_sprite_visible?
  3151.      return false if BattleManager.actor == nil
  3152.      return false if $game_temp.battle_end
  3153.      return false if $game_message.visible
  3154.      return true
  3155. end
  3156.    
  3157. #--------------------------------------------------------------------------
  3158. # * Update Turn Blink
  3159. #--------------------------------------------------------------------------   
  3160. def update_turn_blink
  3161.      return if !TURN_BLINK_EFFECT
  3162.      return if !@turn_sprite.visible
  3163.      @turn_sprite_blink[0] += 1
  3164.      case @turn_sprite_blink[0]
  3165.        when 0..30
  3166.           @turn_sprite_blink[1] += 3
  3167.        when 31..60
  3168.           @turn_sprite_blink[1] -= 3
  3169.        else
  3170.          @turn_sprite_blink = [0,0]
  3171.      end
  3172.      @turn_sprite.opacity = 150 + @turn_sprite_blink[1]
  3173. end

  3174.   
  3175. end

  3176. #==============================================================================
  3177. # ** Monogatari Bhud
  3178. #==============================================================================
  3179. class Monogatari_Bhud
  3180.   
  3181.   #--------------------------------------------------------------------------
  3182.   # * Create Screen Layout
  3183.   #--------------------------------------------------------------------------   
  3184.   def create_screen_layout(viewport)
  3185.       return if !SCREEN_LAYOUT
  3186.       @screen_layout = Sprite.new
  3187.       @screen_layout.bitmap = Cache.battle_hud("Layout_Screen")
  3188.       @screen_layout.z = HUD_Z + SCREEN_LAYOUT_Z
  3189.       @screen_layout.x = SCREEN_LAYOUT_POSITION[0]
  3190.       @screen_layout.y = SCREEN_LAYOUT_POSITION[1]
  3191.       @screen_layout.opacity = 0
  3192.       @screen_layout.viewport = viewport
  3193.    end     
  3194.   
  3195.   #--------------------------------------------------------------------------
  3196.   # * Dispose Screen Layout
  3197.   #--------------------------------------------------------------------------
  3198.    def dispose_screen_layout
  3199.        return if @screen_layout == nil
  3200.        @screen_layout.dispose ; @screen_layout = nil     
  3201.    end
  3202.    
  3203.   #--------------------------------------------------------------------------
  3204.   # * Update Screen Layout
  3205.   #--------------------------------------------------------------------------
  3206.    def update_screen_layout
  3207.        return if @screen_layout == nil
  3208.        @sprite_visitle_wait -= 1 if @sprite_visitle_wait > 0
  3209.        sprite_visible(@screen_layout)
  3210.    end
  3211.    
  3212.   #--------------------------------------------------------------------------
  3213.   # * Sprite Visible
  3214.   #--------------------------------------------------------------------------
  3215.   def sprite_visible?
  3216.       return false if $game_message.visible and MESSAGE_WINDOW_FADE_HUD
  3217.       return false if !$game_temp.battle_hud_visible
  3218.       return false if !$game_temp.sprite_visible
  3219.       return true
  3220.   end
  3221.   
  3222.   #--------------------------------------------------------------------------
  3223.   # * Sprite Visible
  3224.   #--------------------------------------------------------------------------
  3225.   def sprite_visible(sprite)      
  3226.       if sprite_visible?
  3227.          sprite.opacity += 5 unless @sprite_visitle_wait > 0
  3228.       else
  3229.          sprite.opacity -= 10 ; @sprite_visitle_wait = 5
  3230.       end
  3231.   end   
  3232.    
  3233. end

  3234. #==============================================================================
  3235. #==============================================================================
  3236. # ** Battle Hud EX
  3237. #==============================================================================
  3238. #==============================================================================
  3239. class Battle_Hud_EX
  3240.   include MOG_BATTLE_HUD_EX
  3241.   
  3242.   #--------------------------------------------------------------------------
  3243.   # * Initialize
  3244.   #--------------------------------------------------------------------------  
  3245.   def initialize(actor = nil,index = 0, max_members = 0,viewport = nil)
  3246.       pre_cache
  3247.       setup(actor,index,max_members)
  3248.       create_sprites(viewport)
  3249.   end
  3250.   
  3251.   #--------------------------------------------------------------------------
  3252.   # * Setup
  3253.   #--------------------------------------------------------------------------   
  3254.   def setup(actor,index,max_members)
  3255.       $game_temp.battle_end = false
  3256.       @actor = actor
  3257.       @actor_index = index
  3258.       @max_members = max_members
  3259.       @actor.face_animation = [0,0,0]
  3260.       @hp_icon_max = -1
  3261.       @hp_icon_old = -1
  3262.       @hp_icon_col_max = HP_ICON_COL_MAX
  3263.       @hp_icon_col_max = 1 if @hp_icon_col_max <= 0
  3264.       @hp_icon_row_max = HP_ICON_ROW_MAX
  3265.       @hp_icon_row_max = 1 if @hp_icon_row_max <= 0
  3266.       @hp_icon_real_max = @hp_icon_col_max * @hp_icon_row_max
  3267.       @mp_icon_max = -1
  3268.       @mp_icon_old = -1
  3269.       @mp_icon_col_max = MP_ICON_COL_MAX
  3270.       @mp_icon_col_max = 1 if @mp_icon_col_max <= 0
  3271.       @mp_icon_row_max = MP_ICON_ROW_MAX
  3272.       @mp_icon_row_max = 1 if @mp_icon_row_max <= 0
  3273.       @mp_icon_real_max = @mp_icon_col_max * @mp_icon_row_max
  3274.       @tp_icon_max = -1
  3275.       @tp_icon_old = -1
  3276.       @tp_icon_col_max = TP_ICON_COL_MAX
  3277.       @tp_icon_col_max = 1 if @tp_icon_col_max <= 0
  3278.       @tp_icon_row_max = TP_ICON_ROW_MAX
  3279.       @tp_icon_row_max = 1 if @tp_icon_row_max <= 0
  3280.       @tp_icon_real_max = @tp_icon_col_max * @tp_icon_row_max
  3281.       @sprite_visible = true
  3282.       @sprite_visitle_wait = 0
  3283.       setup_actor
  3284.       setup_position
  3285.   end
  3286.      
  3287.   #--------------------------------------------------------------------------
  3288.   # * Setup Actor
  3289.   #--------------------------------------------------------------------------   
  3290.   def setup_actor
  3291.       return if @actor == nil
  3292.       @hp_number_refresh = true
  3293.       @hp_number2_refresh = true
  3294.       @hp_number_old = @actor.hp
  3295.       @hp_number2_old = @actor.mhp
  3296.       @hp_old_meter = 0      
  3297.       @mp_number_refresh = true
  3298.       @mp_number2_refresh = true
  3299.       @mp_number_old = @actor.mp
  3300.       @mp_number2_old = @actor.mmp
  3301.       @mp_old_meter = 0      
  3302.       @tp_number_refresh = true
  3303.       @tp_number2_refresh = true
  3304.       @tp_number_old = @actor.tp
  3305.       @tp_number2_old = @actor.max_tp  
  3306.       @tp_old_meter = 0
  3307.       @at_number_refresh = true
  3308.       @at_number2_refresh = true
  3309.       @at_number_old = actor_at
  3310.       @at_number2_old = actor_max_at
  3311.       @at_old_meter = 0
  3312.       catb = ATB::MAX_AP rescue nil
  3313.       @ccwinter_atb = true if catb != nil
  3314.   end  
  3315.   
  3316.   #--------------------------------------------------------------------------
  3317.   # * Terminate
  3318.   #--------------------------------------------------------------------------   
  3319.   def terminate
  3320.       @actor.atb = 0 rescue nil if $imported[:ve_active_time_battle]
  3321.   end
  3322.   
  3323.   #--------------------------------------------------------------------------
  3324.   # * AT
  3325.   #--------------------------------------------------------------------------  
  3326.   def actor_at
  3327.       return @actor.atb if $imported[:mog_atb_system]
  3328.       return @actor.atb if $imported[:ve_active_time_battle]
  3329.       return @actor.catb_value if $imported["YSA-CATB"]
  3330.       return @actor.ap if @ccwinter_atb != nil
  3331.       return 0
  3332.   end
  3333.   
  3334.   #--------------------------------------------------------------------------
  3335.   # * Max AT
  3336.   #--------------------------------------------------------------------------  
  3337.   def actor_max_at
  3338.       return @actor.atb_max if $imported[:mog_atb_system]
  3339.       return @actor.max_atb if $imported[:ve_active_time_battle]
  3340.       return @actor.max_atb if $imported["YSA-CATB"]
  3341.       return ATB::MAX_AP if @ccwinter_atb != nil
  3342.       return 1
  3343.   end
  3344.   
  3345.   #--------------------------------------------------------------------------
  3346.   # ● Actor Cast
  3347.   #--------------------------------------------------------------------------            
  3348.   def actor_cast
  3349.       return @actor.atb_cast[1] if $imported[:mog_atb_system]
  3350.       return @actor.atb if $imported[:ve_active_time_battle]
  3351.       return @actor.chant_count rescue 0 if @ccwinter_atb != nil
  3352.       return 0
  3353.   end
  3354.   
  3355.   #--------------------------------------------------------------------------
  3356.   # ● Actor Max Cast
  3357.   #--------------------------------------------------------------------------            
  3358.   def actor_max_cast
  3359.       if $imported[:mog_atb_system]
  3360.          return @actor.atb_cast[2] if @actor.atb_cast[2] != 0
  3361.          return @actor.atb_cast[0].speed.abs
  3362.       end   
  3363.       return @actor.max_atb if $imported[:ve_active_time_battle]
  3364.       return @actor.max_chant_count rescue 1 if @ccwinter_atb != nil
  3365.       return 1
  3366.   end
  3367.   
  3368.   #--------------------------------------------------------------------------
  3369.   # ● Actor Cast?
  3370.   #--------------------------------------------------------------------------            
  3371.   def actor_cast?   
  3372.       if $imported[:mog_atb_system]
  3373.          return true if [email protected]_cast.empty?
  3374.       end   
  3375.       if $imported[:ve_active_time_battle]
  3376.          return true if @actor.cast_action?
  3377.       end      
  3378.       if @ccwinter_atb
  3379.          return true if @actor.chanting?
  3380.       end
  3381.       return false
  3382.   end  
  3383.   
  3384.   #--------------------------------------------------------------------------
  3385.   # * Create Sprites
  3386.   #--------------------------------------------------------------------------   
  3387.   def create_sprites(viewport)
  3388.       dispose
  3389.       return if @actor == nil
  3390.       create_layout(viewport)
  3391.       create_layout_2(viewport)
  3392.       create_name(viewport)
  3393.       create_face(viewport)
  3394.       create_hp_number(viewport)
  3395.       create_hp_number_max(viewport)
  3396.       create_hp_meter(viewport)
  3397.       create_hp_icon(viewport)
  3398.       create_hp_icon_ex(viewport)
  3399.       create_hp_icon_number(viewport)
  3400.       create_mp_number(viewport)
  3401.       create_mp_number_max(viewport)
  3402.       create_mp_meter(viewport)
  3403.       create_mp_icon(viewport)
  3404.       create_mp_icon_ex(viewport)
  3405.       create_mp_icon_number(viewport)
  3406.       create_tp_number(viewport)
  3407.       create_tp_number_max(viewport)
  3408.       create_tp_meter(viewport)
  3409.       create_tp_icon(viewport)
  3410.       create_tp_icon_ex(viewport)
  3411.       create_tp_icon_number(viewport)
  3412.       create_at_number(viewport)
  3413.       create_at_number_max(viewport)
  3414.       create_at_meter(viewport)      
  3415.       create_level_number(viewport)
  3416.       create_states(viewport)
  3417.       update
  3418.   end   
  3419.   
  3420.   #--------------------------------------------------------------------------
  3421.   # * Sprite Visible
  3422.   #--------------------------------------------------------------------------
  3423.   def sprite_visible?
  3424.       return false if $game_message.visible and MESSAGE_WINDOW_FADE_HUD
  3425.       return false if !$game_temp.battle_hud_visible
  3426.       return false if !$game_temp.sprite_visible
  3427.       return true
  3428.   end
  3429.   
  3430.   #--------------------------------------------------------------------------
  3431.   # * Sprite Visible
  3432.   #--------------------------------------------------------------------------
  3433.   def sprite_visible(sprite)
  3434.       if @sprite_visible         
  3435.          sprite.opacity += 5 unless @sprite_visitle_wait > 0
  3436.       else
  3437.          sprite.opacity -= 10 ; @sprite_visitle_wait = 5
  3438.       end
  3439.   end
  3440.   
  3441. end

  3442. #==============================================================================
  3443. #==============================================================================
  3444. # ** Battle Hud EX
  3445. #==============================================================================
  3446. #==============================================================================
  3447. class Battle_Hud_EX
  3448.   
  3449.   #--------------------------------------------------------------------------
  3450.   # * Setup Position
  3451.   #--------------------------------------------------------------------------
  3452.   def setup_position
  3453.       sprite_width = (Graphics.width - 64) / 4
  3454.       sprite_center = sprite_width / 2  
  3455.       if $game_party.battle_members.size > 4
  3456.          members = $game_party.battle_members.size - 4
  3457.          fx = 32 * members
  3458.        else
  3459.          fx = 0
  3460.       end   
  3461.       space_x = MEMBERS_SPACE[0] - fx
  3462.       space_y = MEMBERS_SPACE[1]      
  3463.       center = Graphics.width / 2
  3464.       members_space = (Graphics.width + space_x) / @max_members
  3465.       members_space2 = (members_space * @actor_index)      
  3466.       members_space3 = ((members_space / 2) * (@max_members - 1))
  3467.       members_space_y = space_y * @actor_index
  3468.       x = HUD_POSITION[0] - sprite_center + center + members_space2 - members_space3
  3469.       screen_resize_y = 0
  3470.       screen_resize_y = (Graphics.height - 416) if Graphics.height > 416
  3471.       y = HUD_POSITION[1] + members_space_y + screen_resize_y
  3472.       @hud_position = [x,y]
  3473.       $game_temp.hud_pos_real[@actor_index] = [] if $game_temp.hud_pos_real[@actor_index] == nil
  3474.       $game_temp.hud_pos_real[@actor_index] = [x,y]
  3475.       x2 = x + sprite_center
  3476.       $game_temp.hud_pos[@actor_index] = [] if $game_temp.hud_pos[@actor_index] == nil
  3477.       $game_temp.hud_pos[@actor_index] = [x2,y]
  3478.       if FIXED_HUD_POSITION[@actor_index] != nil     
  3479.          @hud_position = [FIXED_HUD_POSITION[@actor_index][0],FIXED_HUD_POSITION[@actor_index][1]]
  3480.          $game_temp.hud_pos_real[@actor_index] = [@hud_position[0],@hud_position[1]]
  3481.          $game_temp.hud_pos[@actor_index] = [] if $game_temp.hud_pos[@actor_index] == nil
  3482.          $game_temp.hud_pos[@actor_index] = [Graphics.width / 2,(Graphics.height / 2) + 96]   
  3483.       end      
  3484.   end

  3485. end

  3486. #==============================================================================
  3487. # ** Game Temp
  3488. #==============================================================================
  3489. class Game_Temp
  3490.   
  3491.   attr_accessor :cache_bhud_sprites
  3492.   
  3493.   #--------------------------------------------------------------------------
  3494.   # * Cache Battle Hud
  3495.   #--------------------------------------------------------------------------  
  3496.   def cache_battle_hud      
  3497.       execute_cache_bhud_sprites if @cache_bhud_sprites == nil
  3498.   end
  3499.   
  3500.   #--------------------------------------------------------------------------
  3501.   # * Execute Cache Bhud Sprites
  3502.   #--------------------------------------------------------------------------  
  3503.   def execute_cache_bhud_sprites
  3504.       @cache_bhud_sprites = []
  3505.       windows = ["Layout_Command","Layout_Party","Layout_Help",
  3506.       "Layout_Target_Actor","Layout_Target_Enemy","Layout_Skill",
  3507.       "Layout_Item"]
  3508.       for s in windows
  3509.           @cache_bhud_sprites.push(Cache.battle_hud(s)) rescue nil
  3510.       end
  3511.       sprites = ["Layout","Layout_2",
  3512.      "MP_Number","Max_MP_Number","MP_Icon","MP_Icon_EX","MP_Icon_Number",
  3513.      "TP_Number","Max_TP_Number","TP_Icon","TP_Icon_EX","TP_Icon_Number",  
  3514.      "AT_Number","Max_AT_Number","AT_Icon","AT_Icon_EX","AT_Icon_Number",  
  3515.      "LV_Number","Turn","Iconset","Layout_Screen"
  3516.       ]
  3517.       for s in sprites
  3518.           @cache_bhud_sprites.push(Cache.battle_hud(s)) rescue nil
  3519.       end      
  3520.   end
  3521.   
  3522. end

  3523. #==============================================================================
  3524. # ** Spriteset_Map
  3525. #==============================================================================
  3526. class Spriteset_Map

  3527.   #--------------------------------------------------------------------------
  3528.   # * Initialize
  3529.   #--------------------------------------------------------------------------
  3530.   alias mog_monogatari_bhud_initialize initialize
  3531.   def initialize
  3532.       $game_temp.cache_battle_hud
  3533.       mog_monogatari_bhud_initialize
  3534.   end
  3535.   
  3536. end

  3537. #==============================================================================
  3538. #==============================================================================
  3539. # ** Battle Hud EX
  3540. #==============================================================================
  3541. #==============================================================================
  3542. class Battle_Hud_EX

  3543.   #--------------------------------------------------------------------------
  3544.   # * Pre Cache
  3545.   #--------------------------------------------------------------------------
  3546.   def pre_cache
  3547.       $game_temp.cache_battle_hud
  3548.       @force_hide = false
  3549.       @force_hide_time = 0
  3550.       @fade_hud = false
  3551.       @fade_hud_gold = false     
  3552.       @fade_hud_equip = false
  3553.       @layout_image = Cache.battle_hud("Layout")
  3554.       @layout_cw = @layout_image.width
  3555.       @layout_ch = @layout_image.height
  3556.       @layout2_image = Cache.battle_hud("Layout_2") rescue nil
  3557.       @layout2_cw = @layout2_image.width if @layout2_image != nil
  3558.       @layout2_ch = @layout2_image.height if @layout2_image != nil
  3559.       @layout2_cw = 0 if @layout2_cw == nil      
  3560.       #------------------------------------------------
  3561.       # HP
  3562.       #------------------------------------------------
  3563.       if HP_NUMBER_VISIBLE
  3564.          @hp_number_image = Cache.battle_hud("HP_Number")
  3565.          @hp_number_cw = @hp_number_image.width / 10
  3566.          if HP_NUMBER_LOW_COLOR
  3567.             @hp_number_ch = @hp_number_image.height / 2
  3568.          else
  3569.             @hp_number_ch = @hp_number_image.height
  3570.          end   
  3571.          @hp_wave_number = HP_NUMBER_WAVE_ALIGN_EFFECT
  3572.          @hp_number_ch += (@hp_number_ch / 2) if @hp_wave_number      
  3573.       end
  3574.       if HP_NUMBER_MAX_VISIBLE
  3575.          @hp_number2_image = Cache.battle_hud("Max_HP_Number")
  3576.          @hp_number2_cw = @hp_number2_image.width / 10
  3577.          @hp_number2_ch = @hp_number2_image.height
  3578.       end
  3579.       if HP_METER_VISIBLE
  3580.          @hp_meter_image = Cache.battle_hud("HP_Meter")
  3581.          if HP_METER_GRADIENT_ANIMATION
  3582.             @hp_meter_cw = @hp_meter_image.width / 3
  3583.          else   
  3584.             @hp_meter_cw = @hp_meter_image.width
  3585.          end   
  3586.          if HP_METER_REDUCTION_ANIMATION
  3587.             @hp_meter_ch = @hp_meter_image.height / 2
  3588.          else
  3589.             @hp_meter_ch = @hp_meter_image.height
  3590.          end  
  3591.       end
  3592.       if HP_ICON_VISIBLE
  3593.          @hp_icon_image = Cache.battle_hud("HP_Icon")
  3594.          @hp_icon_cw = @hp_icon_image.width / 2
  3595.          @hp_icon_ch = @hp_icon_image.height
  3596.       end
  3597.       if HP_ICON_EX_VISIBLE
  3598.          @hp_icon2_image = Cache.battle_hud("HP_Icon_EX")
  3599.          @hp_icon2_cw = @hp_icon2_image.width
  3600.          @hp_icon2_ch = @hp_icon2_image.height        
  3601.       end      
  3602.       if HP_ICON_NUMBER_VISIBLE
  3603.          @hp_icon_number_image = Cache.battle_hud("HP_Icon_Number")
  3604.          @hp_icon_number_cw = @hp_icon_number_image.width / 10
  3605.          @hp_icon_number_ch = @hp_icon_number_image.height        
  3606.       end
  3607.       #------------------------------------------------
  3608.       # MP
  3609.       #------------------------------------------------
  3610.       if MP_NUMBER_VISIBLE
  3611.          @mp_number_image = Cache.battle_hud("MP_Number")
  3612.          @mp_number_cw = @mp_number_image.width / 10
  3613.          if MP_NUMBER_LOW_COLOR
  3614.             @mp_number_ch = @mp_number_image.height / 2
  3615.          else
  3616.             @mp_number_ch = @mp_number_image.height
  3617.         end
  3618.         @mp_wave_number = MP_NUMBER_WAVE_ALIGN_EFFECT
  3619.         @mp_number_ch += (@mp_number_ch / 2) if @mp_wave_number
  3620.       end
  3621.       if MP_NUMBER_MAX_VISIBLE
  3622.          @mp_number2_image = Cache.battle_hud("Max_MP_Number")
  3623.          @mp_number2_cw = @mp_number2_image.width / 10
  3624.          @mp_number2_ch = @mp_number2_image.height
  3625.       end
  3626.       if MP_METER_VISIBLE
  3627.          @mp_meter_image = Cache.battle_hud("MP_Meter")
  3628.          if MP_METER_GRADIENT_ANIMATION
  3629.             @mp_meter_cw = @mp_meter_image.width / 3
  3630.          else   
  3631.             @mp_meter_cw = @mp_meter_image.width
  3632.          end  
  3633.          if MP_METER_REDUCTION_ANIMATION
  3634.             @mp_meter_ch = @mp_meter_image.height / 2
  3635.          else
  3636.             @mp_meter_ch = @mp_meter_image.height
  3637.          end
  3638.       end
  3639.       if MP_ICON_VISIBLE
  3640.          @mp_icon_image = Cache.battle_hud("MP_Icon")
  3641.          @mp_icon_cw = @mp_icon_image.width / 2
  3642.          @mp_icon_ch = @mp_icon_image.height
  3643.       end
  3644.       if MP_ICON_EX_VISIBLE
  3645.          @mp_icon2_image = Cache.battle_hud("MP_Icon_EX")
  3646.          @mp_icon2_cw = @mp_icon2_image.width
  3647.          @mp_icon2_ch = @mp_icon2_image.height        
  3648.       end      
  3649.       if MP_ICON_NUMBER_VISIBLE
  3650.          @mp_icon_number_image = Cache.battle_hud("MP_Icon_Number")
  3651.          @mp_icon_number_cw = @mp_icon_number_image.width / 10
  3652.          @mp_icon_number_ch = @mp_icon_number_image.height        
  3653.       end
  3654.       #------------------------------------------------
  3655.       # TP
  3656.       #------------------------------------------------
  3657.       if TP_NUMBER_VISIBLE
  3658.          @tp_number_image = Cache.battle_hud("TP_Number")
  3659.          @tp_number_cw = @tp_number_image.width / 10
  3660.          if TP_NUMBER_LOW_COLOR
  3661.             @tp_number_ch = @tp_number_image.height / 2
  3662.          else
  3663.             @tp_number_ch = @tp_number_image.height
  3664.          end  
  3665.         @tp_wave_number = TP_NUMBER_WAVE_ALIGN_EFFECT
  3666.         @tp_number_ch += (@tp_number_ch / 2) if @tp_wave_number      
  3667.       end
  3668.       if TP_NUMBER_MAX_VISIBLE
  3669.          @tp_number2_image = Cache.battle_hud("Max_TP_Number")
  3670.          @tp_number2_cw = @tp_number2_image.width / 10
  3671.          @tp_number2_ch = @tp_number2_image.height
  3672.       end
  3673.       if TP_METER_VISIBLE
  3674.          @tp_meter_image = Cache.battle_hud("TP_Meter")
  3675.          if TP_METER_GRADIENT_ANIMATION
  3676.             @tp_meter_cw = @tp_meter_image.width / 3
  3677.          else   
  3678.             @tp_meter_cw = @tp_meter_image.width
  3679.          end  
  3680.          if TP_METER_REDUCTION_ANIMATION
  3681.             @tp_meter_ch = @tp_meter_image.height / 2      
  3682.          else
  3683.             @tp_meter_ch = @tp_meter_image.height
  3684.          end   
  3685.       end        
  3686.       if TP_ICON_VISIBLE
  3687.          @tp_icon_image = Cache.battle_hud("TP_Icon")
  3688.          @tp_icon_cw = @tp_icon_image.width / 2
  3689.          @tp_icon_ch = @tp_icon_image.height
  3690.       end  
  3691.       if TP_ICON_EX_VISIBLE
  3692.          @tp_icon2_image = Cache.battle_hud("TP_Icon_EX")
  3693.          @tp_icon2_cw = @tp_icon2_image.width
  3694.          @tp_icon2_ch = @tp_icon2_image.height        
  3695.       end      
  3696.       if TP_ICON_NUMBER_VISIBLE
  3697.          @tp_icon_number_image = Cache.battle_hud("TP_Icon_Number")
  3698.          @tp_icon_number_cw = @tp_icon_number_image.width / 10
  3699.          @tp_icon_number_ch = @tp_icon_number_image.height        
  3700.       end
  3701.       #------------------------------------------------
  3702.       # AT
  3703.       #------------------------------------------------
  3704.       if AT_NUMBER_VISIBLE
  3705.          @at_number_image = Cache.battle_hud("AT_Number")
  3706.          @at_number_cw = @at_number_image.width / 10
  3707.          @at_number_ch = @at_number_image.height
  3708.          @at_wave_number = AT_NUMBER_WAVE_ALIGN_EFFECT
  3709.          @at_number_ch += (@at_number_ch / 2) if @at_wave_number      
  3710.       end
  3711.       if AT_NUMBER_MAX_VISIBLE
  3712.          @at_number2_image = Cache.battle_hud("Max_AT_Number")
  3713.          @at_number2_cw = @at_number2_image.width / 10
  3714.          @at_number2_ch = @at_number2_image.height
  3715.       end
  3716.       if AT_METER_VISIBLE
  3717.          @at_meter_image = Cache.battle_hud("AT_Meter")
  3718.          if AT_METER_GRADIENT_ANIMATION
  3719.             @at_meter_cw = @at_meter_image.width / 3
  3720.          else   
  3721.             @at_meter_cw = @at_meter_image.width
  3722.          end   
  3723.          @at_meter_ch = @at_meter_image.height / 3
  3724.       end
  3725.       #------------------------------------------------
  3726.       # LV
  3727.       #------------------------------------------------  
  3728.       if LEVEL_NUMBER_VISIBLE
  3729.          @lv_number_image = Cache.battle_hud("LV_Number")
  3730.          @lv_number_cw = @lv_number_image.width / 10
  3731.          @lv_number_ch = @lv_number_image.height
  3732.       end      
  3733.       #------------------------------------------------
  3734.       # ICON
  3735.       #------------------------------------------------  
  3736.       if STATES_VISIBLE or EQUIPMENT_VISIBLE
  3737.          @icon_image = Cache.system("Iconset")
  3738.       end         
  3739.   end
  3740.   
  3741.   #--------------------------------------------------------------------------
  3742.   # * Check Icon Image
  3743.   #--------------------------------------------------------------------------         
  3744.   def check_icon_image
  3745.       if @icon_image == nil or @icon_image.disposed?
  3746.          @icon_image = Cache.system("Iconset")
  3747.       end   
  3748.   end  
  3749.   
  3750. end

  3751. #==============================================================================
  3752. #==============================================================================
  3753. # ** Battle Hud EX
  3754. #==============================================================================
  3755. #==============================================================================
  3756. class Battle_Hud_EX
  3757.   
  3758.   #--------------------------------------------------------------------------
  3759.   # * Update Number
  3760.   #--------------------------------------------------------------------------   
  3761.   def update_number(type,value)
  3762.       actor_value = @actor.hp if type == 0
  3763.       actor_value = @actor.mp if type == 1
  3764.       actor_value = @actor.tp if type == 2
  3765.       actor_value = @actor.mhp if type == 3
  3766.       actor_value = @actor.mmp if type == 4
  3767.       actor_value = @actor.max_tp if type == 5
  3768.       actor_value = actor_at if type == 6
  3769.       actor_value = actor_max_at if type == 7
  3770.       if value < actor_value
  3771.          value += number_refresh_speed(actor_value,value)
  3772.          value = actor_value if value >= actor_value
  3773.          refresh_sprite_number(type,value)
  3774.      elsif value > actor_value
  3775.          value -= number_refresh_speed(actor_value,value)
  3776.          value = actor_value if value <= actor_value
  3777.          refresh_sprite_number(type,value)
  3778.      end  
  3779.   end
  3780.   
  3781.   #--------------------------------------------------------------------------
  3782.   # * Number Refresh Speed
  3783.   #--------------------------------------------------------------------------      
  3784.   def number_refresh_speed(actor_value,value)
  3785.       n =  1 * (actor_value - value).abs / 10
  3786.       return [[n, 99999999].min,1].max   
  3787.   end
  3788.   
  3789.   #--------------------------------------------------------------------------
  3790.   # * Update Number Fix
  3791.   #--------------------------------------------------------------------------      
  3792.   def update_number_fix(type)
  3793.       if type == 0
  3794.          @hp_number_old =  @actor.hp
  3795.          @hp_number_refresh = true
  3796.       elsif type == 1
  3797.          @mp_number_old =  @actor.mp
  3798.          @mp_number_refresh = true
  3799.       elsif type == 2
  3800.          @tp_number_old =  @actor.tp
  3801.          @tp_number_refresh = true  
  3802.       elsif type == 3
  3803.          @hp_number2_old =  @actor.mhp
  3804.          @hp_number2_refresh = true
  3805.       elsif type == 4
  3806.          @mp_number2_old =  @actor.mmp
  3807.          @mp_number2_refresh = true
  3808.       elsif type == 5
  3809.          @tp_number2_old =  @actor.max_tp
  3810.          @tp_number2_refresh = true  
  3811.       elsif type == 6
  3812.          @at_number_old =  actor_at
  3813.          @at_number_refresh = true         
  3814.       elsif type == 7
  3815.          @at_number2_old = actor_max_at
  3816.          @at_number2_refresh = true            
  3817.       end   
  3818.   end  
  3819.   
  3820.   #--------------------------------------------------------------------------
  3821.   # * Refresh Sprite Number
  3822.   #--------------------------------------------------------------------------   
  3823.   def refresh_sprite_number(type,value)   
  3824.       @hp_number_refresh = true if type == 0
  3825.       @hp_number_old = value if type == 0
  3826.       @mp_number_refresh = true if type == 1
  3827.       @mp_number_old = value if type == 1
  3828.       @tp_number_refresh = true if type == 2
  3829.       @tp_number_old = value if type == 2
  3830.       @hp_number2_refresh = true if type == 3
  3831.       @hp_number2_old = value if type == 3
  3832.       @mp_number2_refresh = true if type == 4
  3833.       @mp_number2_old = value if type == 4
  3834.       @tp_number2_refresh = true if type == 5
  3835.       @tp_number2_old = value if type == 5
  3836.       @at_number_refresh = true if type == 6
  3837.       @at_number_old = value if type == 6
  3838.       @at_number2_refresh = true if type == 7
  3839.       @at_number2_old = value if type == 7
  3840.   end  
  3841.   
  3842.   #--------------------------------------------------------------------------
  3843.   # * Refresh Number
  3844.   #--------------------------------------------------------------------------   
  3845.   def refresh_number(type,value,sprite,image,number_cw,number_ch,wave_number = false)
  3846.       sprite.bitmap.clear
  3847.       clear_number_refresh(type)
  3848.       number_color = low_number_color(type,number_ch)
  3849.       if type == 0 and HP_NUMBER_PERCENTAGE
  3850.          value_max = @actor.mhp
  3851.          value = value.to_f / value_max.to_f * 100
  3852.          value = 1 if (value < 0 and @actor.hp > 0) or @actor.hp == 1
  3853.       elsif type == 1 and MP_NUMBER_PERCENTAGE
  3854.          value_max = @actor.mmp
  3855.          value = value.to_f / value_max.to_f * 100
  3856.       elsif type == 2 and TP_NUMBER_PERCENTAGE
  3857.          value_max = @actor.max_tp
  3858.          value = value.to_f / value_max.to_f * 100  
  3859.       elsif type == 3 and HP_NUMBER_PERCENTAGE
  3860.          value = 100
  3861.       elsif type == 4 and MP_NUMBER_PERCENTAGE
  3862.          value = 100
  3863.       elsif type == 5 and TP_NUMBER_PERCENTAGE
  3864.          value = 100
  3865.       elsif type == 6 and AT_NUMBER_PERCENTAGE
  3866.          value_max = actor_max_at
  3867.          value = value.to_f / value_max.to_f * 100
  3868.       elsif type == 7 and AT_NUMBER_PERCENTAGE
  3869.          value = 100         
  3870.       end
  3871.       value = 9999999 if value > 9999999
  3872.       number_value = value.truncate.abs.to_s.split(//)
  3873.       wave_h = 0
  3874.       wave_h2 = wave_number ? (number_ch / 3) : 0
  3875.       wave_h3 = number_color != 0 ? wave_h2 : 0
  3876.       for r in 0..number_value.size - 1         
  3877.          number_value_abs = number_value[r].to_i
  3878.          wh = wave_h2 * wave_h
  3879.          wh2 = wave_h == 0 ? wave_h2 : 0
  3880.          nsrc_rect = Rect.new(number_cw * number_value_abs, number_color - wave_h3, number_cw, number_ch - wh2)
  3881.          sprite.bitmap.blt(number_cw *  r, wh, image, nsrc_rect)
  3882.          wave_h = wave_h == 0 ? 1 : 0
  3883.       end
  3884.       refresh_number_position(type,number_value.size,number_cw)
  3885.   end
  3886.   
  3887.   #--------------------------------------------------------------------------
  3888.   # * Refresh Number
  3889.   #--------------------------------------------------------------------------     
  3890.   def refresh_number_position(type,number_value,number_cw)
  3891.       cx = number_value * number_cw
  3892.       if type == 0
  3893.          case HP_NUMBER_ALIGN_TYPE
  3894.            when 0; @hp_number.x = @hud_position[0] + HP_NUMBER_POSITION[0]
  3895.            when 1; @hp_number.x = @hud_position[0] + HP_NUMBER_POSITION[0] - (cx / 2)
  3896.            when 2; @hp_number.x = @hud_position[0] + HP_NUMBER_POSITION[0] - cx
  3897.          end            
  3898.       elsif type == 1
  3899.          case MP_NUMBER_ALIGN_TYPE
  3900.            when 0; @mp_number.x = @hud_position[0] + MP_NUMBER_POSITION[0]
  3901.            when 1; @mp_number.x = @hud_position[0] + MP_NUMBER_POSITION[0] - (cx / 2)
  3902.            when 2; @mp_number.x = @hud_position[0] + MP_NUMBER_POSITION[0] - cx
  3903.          end     
  3904.       elsif type == 2  
  3905.          case TP_NUMBER_ALIGN_TYPE
  3906.            when 0; @tp_number.x = @hud_position[0] + TP_NUMBER_POSITION[0]
  3907.            when 1; @tp_number.x = @hud_position[0] + TP_NUMBER_POSITION[0] - (cx / 2)
  3908.            when 2; @tp_number.x = @hud_position[0] + TP_NUMBER_POSITION[0] - cx
  3909.          end           
  3910.       elsif type == 3   
  3911.          case HP_NUMBER_ALIGN_TYPE
  3912.            when 0; @hp_number2.x = @hud_position[0] + HP_NUMBER_MAX_POSITION[0]
  3913.            when 1; @hp_number2.x = @hud_position[0] + HP_NUMBER_MAX_POSITION[0] - (cx / 2)
  3914.            when 2; @hp_number2.x = @hud_position[0] + HP_NUMBER_MAX_POSITION[0] - cx
  3915.          end           
  3916.       elsif type ==  4
  3917.          case MP_NUMBER_ALIGN_TYPE
  3918.            when 0; @mp_number2.x = @hud_position[0] + MP_NUMBER_MAX_POSITION[0]
  3919.            when 1; @mp_number2.x = @hud_position[0] + MP_NUMBER_MAX_POSITION[0] - (cx / 2)
  3920.            when 2; @mp_number2.x = @hud_position[0] + MP_NUMBER_MAX_POSITION[0] - cx
  3921.          end         
  3922.       elsif type ==  5
  3923.          case TP_NUMBER_ALIGN_TYPE
  3924.            when 0; @tp_number2.x = @hud_position[0] + TP_NUMBER_MAX_POSITION[0]
  3925.            when 1; @tp_number2.x = @hud_position[0] + TP_NUMBER_MAX_POSITION[0] - (cx / 2)
  3926.            when 2; @tp_number2.x = @hud_position[0] + TP_NUMBER_MAX_POSITION[0] - cx
  3927.          end
  3928.       elsif type ==  6     
  3929.          case MP_NUMBER_ALIGN_TYPE
  3930.            when 0; @at_number.x = @hud_position[0] + AT_NUMBER_POSITION[0]
  3931.            when 1; @at_number.x = @hud_position[0] + AT_NUMBER_POSITION[0] - (cx / 2)
  3932.            when 2; @at_number.x = @hud_position[0] + AT_NUMBER_POSITION[0] - cx
  3933.          end            
  3934.       elsif type ==  7     
  3935.          case AT_NUMBER_ALIGN_TYPE
  3936.            when 0; @at_number2.x = @hud_position[0] + AT_NUMBER_POSITION[0]
  3937.            when 1; @at_number2.x = @hud_position[0] + AT_NUMBER_POSITION[0] - (cx / 2)
  3938.            when 2; @at_number2.x = @hud_position[0] + AT_NUMBER_POSITION[0] - cx
  3939.          end
  3940.       end  
  3941.   end
  3942.   
  3943.   #--------------------------------------------------------------------------
  3944.   # * Low Number Color
  3945.   #--------------------------------------------------------------------------      
  3946.   def low_number_color(type,number_ch)
  3947.       if type == 0
  3948.          if HP_NUMBER_LOW_COLOR
  3949.             return @actor.low_hp? ? number_ch : 0
  3950.          else
  3951.             return 0
  3952.          end  
  3953.       elsif type == 1
  3954.          if MP_NUMBER_LOW_COLOR   
  3955.             return @actor.low_mp? ? number_ch : 0
  3956.          else
  3957.             return 0
  3958.          end         
  3959.       elsif type == 2
  3960.          if TP_NUMBER_LOW_COLOR
  3961.             return @actor.low_tp? ? number_ch : 0
  3962.          else
  3963.             return 0
  3964.          end
  3965.       else   
  3966.          return 0  
  3967.       end     
  3968.   end
  3969.   
  3970.   #--------------------------------------------------------------------------
  3971.   # * Clear Number Refresh
  3972.   #--------------------------------------------------------------------------      
  3973.   def clear_number_refresh(type)
  3974.       @hp_number_refresh = false if type == 0
  3975.       @mp_number_refresh = false if type == 1
  3976.       @tp_number_refresh = false if type == 2
  3977.       @hp_number2_refresh = false if type == 3
  3978.       @mp_number2_refresh = false if type == 4
  3979.       @tp_number2_refresh = false if type == 5
  3980.       @at_number_refresh = false if type == 6
  3981.       @at_number2_refresh = false if type == 7
  3982.   end  
  3983.   
  3984.   #--------------------------------------------------------------------------
  3985.   # * Icon Limit
  3986.   #--------------------------------------------------------------------------      
  3987.   def icon_limit(value,value_max)
  3988.       n1 = value / value_max
  3989.       n2 = value - (n1 * value_max)
  3990.       n2 = value_max if (n2 == 0 and value > 0)
  3991.       return n2
  3992.   end  
  3993.   
  3994. end

  3995. #==============================================================================
  3996. #==============================================================================
  3997. # ** Battle Hud EX
  3998. #==============================================================================
  3999. #==============================================================================
  4000. class Battle_Hud_EX

  4001.   #--------------------------------------------------------------------------
  4002.   # * Create Layout
  4003.   #--------------------------------------------------------------------------   
  4004.   def create_layout(viewport)
  4005.       @layout = Sprite.new
  4006.       @layout.bitmap = @layout_image
  4007.       @layout.z = HUD_Z
  4008.       @layout.x = @hud_position[0]
  4009.       @layout.y = @hud_position[1]
  4010.       @layout.opacity = 0
  4011.       @layout.viewport = viewport
  4012.   end   
  4013.   
  4014.   #--------------------------------------------------------------------------
  4015.   # * Update Layout
  4016.   #--------------------------------------------------------------------------   
  4017.   def update_layout
  4018.       return if @layout == nil
  4019.       sprite_visible(@layout)
  4020.   end
  4021.   
  4022.   #--------------------------------------------------------------------------
  4023.   # * Create Layout
  4024.   #--------------------------------------------------------------------------   
  4025.   def create_layout_2(viewport)
  4026.       return if !SECOND_LAYOUT
  4027.       @layout2 = Sprite.new
  4028.       @layout2.bitmap = @layout2_image
  4029.       @layout2.z = HUD_Z + SECOND_LAYOUT_Z
  4030.       @layout2.x = @hud_position[0] + SECOND_LAYOUT_POSITION[0]
  4031.       @layout2.y = @hud_position[1] + SECOND_LAYOUT_POSITION[1]
  4032.       @layout2.opacity = 0
  4033.       @layout2.viewport = viewport
  4034.   end   
  4035.   
  4036.   #--------------------------------------------------------------------------
  4037.   # * Update Layout
  4038.   #--------------------------------------------------------------------------   
  4039.   def update_layout_2
  4040.       return if @layout2 == nil
  4041.       sprite_visible(@layout2)
  4042.   end  
  4043.   
  4044. end

  4045. #==============================================================================
  4046. #==============================================================================
  4047. # ** Battle Hud EX
  4048. #==============================================================================
  4049. #==============================================================================
  4050. class Battle_Hud_EX
  4051.   
  4052.   #--------------------------------------------------------------------------
  4053.   # * Create Name
  4054.   #--------------------------------------------------------------------------      
  4055.   def create_name(viewport)
  4056.       return if !NAME_VISIBLE
  4057.       @name = Sprite.new
  4058.       @name.bitmap = Bitmap.new(160,32)
  4059.       @name.bitmap.font.size = NAME_FONT_SIZE
  4060.       @name.bitmap.font.bold = NAME_FONT_BOLD
  4061.       @name.bitmap.font.italic = NAME_FONT_ITALIC
  4062.       @name.bitmap.font.color = NAME_FONT_COLOR
  4063.       @name.z = HUD_Z + NAME_Z
  4064.       @name.x = @hud_position[0] + NAME_POSITION[0]
  4065.       @name.y = @hud_position[1] + NAME_POSITION[1]
  4066.       @name.viewport = viewport
  4067.       @name.opacity = 0
  4068.       refresh_name
  4069.   end

  4070.   #--------------------------------------------------------------------------
  4071.   # * Refresh Name
  4072.   #--------------------------------------------------------------------------      
  4073.   def refresh_name
  4074.       return if @name == nil
  4075.       @name.bitmap.clear
  4076.       if NAME_FONT_SHADOW
  4077.          @name.bitmap.font.color = NAME_FONT_SHADOW_COLOR
  4078.          @name.bitmap.draw_text(NAME_FONT_SHADOW_POSITION[0],NAME_FONT_SHADOW_POSITION[1],160,32,@actor.name,NAME_ALIGN_TYPE)
  4079.          @name.bitmap.font.color = NAME_FONT_COLOR
  4080.       end   
  4081.       @name.bitmap.draw_text(0,0,160,32,@actor.name,NAME_ALIGN_TYPE)
  4082.   end
  4083.   
  4084.   #--------------------------------------------------------------------------
  4085.   # * Update Name
  4086.   #--------------------------------------------------------------------------        
  4087.   def update_name
  4088.       return if @name == nil
  4089.       sprite_visible(@name)
  4090.   end
  4091.   
  4092. end

  4093. #==============================================================================
  4094. #==============================================================================
  4095. # ** Battle Hud EX
  4096. #==============================================================================
  4097. #==============================================================================
  4098. class Battle_Hud_EX
  4099.   
  4100.   #--------------------------------------------------------------------------
  4101.   # * Create HP Number
  4102.   #--------------------------------------------------------------------------  
  4103.   def create_hp_number(viewport)
  4104.       return if !HP_NUMBER_VISIBLE
  4105.       @hp_number = Sprite.new
  4106.       @hp_number.bitmap = Bitmap.new(@hp_number_cw * 6,@hp_number_ch)
  4107.       @hp_number.z = HUD_Z + HP_NUMBER_Z
  4108.       @hp_number.x = @hud_position[0] + HP_NUMBER_POSITION[0]
  4109.       @hp_number.y = @hud_position[1] + HP_NUMBER_POSITION[1]
  4110.       @hp_number.viewport = viewport
  4111.       @hp_number.opacity = 0
  4112.   end
  4113.   
  4114.   #--------------------------------------------------------------------------
  4115.   # * Create HP Number Max
  4116.   #--------------------------------------------------------------------------  
  4117.   def create_hp_number_max(viewport)
  4118.       return if !HP_NUMBER_MAX_VISIBLE
  4119.       @hp_number2 = Sprite.new
  4120.       @hp_number2.bitmap = Bitmap.new(@hp_number2_cw * 6,@hp_number2_ch)
  4121.       @hp_number2.z = HUD_Z + HP_NUMBER_Z
  4122.       @hp_number2.x = @hud_position[0] + HP_NUMBER_MAX_POSITION[0]
  4123.       @hp_number2.y = @hud_position[1] + HP_NUMBER_MAX_POSITION[1]
  4124.       @hp_number2.viewport = viewport
  4125.       @hp_number2.opacity = 0
  4126.   end  
  4127.   
  4128.   #--------------------------------------------------------------------------
  4129.   # * Create HP Meter
  4130.   #--------------------------------------------------------------------------   
  4131.   def create_hp_meter(viewport)
  4132.       return if !HP_METER_VISIBLE
  4133.       @hp_flow_max = @hp_meter_cw * 2
  4134.       @hp_flow = rand(@hp_flow_max)
  4135.       @hp_meter = Sprite.new
  4136.       @hp_meter.bitmap = Bitmap.new(@hp_meter_cw,@hp_meter_ch)
  4137.       @hp_meter.z = HUD_Z + HP_METER_Z
  4138.       @hp_meter.x = @hud_position[0] + HP_METER_POSITION[0]
  4139.       @hp_meter.y = @hud_position[1] + HP_METER_POSITION[1]
  4140.       @hp_meter.angle = HP_METER_ANGLE
  4141.       @hp_meter.mirror = HP_METER_MIRROR_EFFECT
  4142.       @hp_meter.viewport = viewport
  4143.       @hp_meter.opacity = 0
  4144.   end
  4145.   
  4146.   #--------------------------------------------------------------------------
  4147.   # ● Update Flow HP
  4148.   #--------------------------------------------------------------------------            
  4149.   def update_flow_hp
  4150.       @hp_meter.bitmap.clear
  4151.       @hp_flow = 0 if !HP_METER_GRADIENT_ANIMATION
  4152.       meter_width = @hp_meter_cw * @actor.hp / @actor.mhp rescue nil
  4153.       meter_width = 0 if meter_width == nil
  4154.       execute_hp_damage_flow(meter_width)      
  4155.       meter_src_rect = Rect.new(@hp_flow, 0,meter_width, @hp_meter_ch)
  4156.       @hp_meter.bitmap.blt(0,0, @hp_meter_image, meter_src_rect)  
  4157.       @hp_flow += 1
  4158.       @hp_flow = 0 if @hp_flow >= @hp_flow_max
  4159.   end  
  4160.    
  4161.   #--------------------------------------------------------------------------
  4162.   # ● Execute HP Damage Flow
  4163.   #--------------------------------------------------------------------------
  4164.   def execute_hp_damage_flow(meter_width)
  4165.       return if !HP_METER_REDUCTION_ANIMATION
  4166.       return if @hp_old_meter == meter_width
  4167.       n = (@hp_old_meter - meter_width).abs * 3 / 100
  4168.       damage_flow = [[n, 2].min,0.5].max
  4169.       @hp_old_meter -= damage_flow
  4170.       @hp_old_meter = meter_width if @hp_old_meter <= meter_width
  4171.       src_rect_old = Rect.new(0,@hp_meter_ch, @hp_old_meter, @hp_meter_ch)
  4172.       @hp_meter.bitmap.blt(0,0, @hp_meter_image, src_rect_old)      
  4173.   end

  4174.   #--------------------------------------------------------------------------
  4175.   # * Create HP Icon
  4176.   #--------------------------------------------------------------------------  
  4177.   def create_hp_icon(viewport)
  4178.       return if !HP_ICON_VISIBLE
  4179.       @hp_icon = Sprite.new
  4180.       icon_width = @hp_icon_col_max * (@hp_icon_cw + HP_ICON_SPACE[0].abs)
  4181.       icon_height = @hp_icon_row_max * (@hp_icon_ch + HP_ICON_SPACE[1].abs)
  4182.       @hp_icon.bitmap = Bitmap.new(icon_width,icon_height)      
  4183.       @hp_icon.z = HUD_Z + HP_ICON_Z
  4184.       @hp_icon.x = @hud_position[0] + HP_ICON_POSITION[0]
  4185.       @hp_icon.y = @hud_position[1] + HP_ICON_POSITION[1]
  4186.       @hp_icon.viewport = viewport
  4187.       @hp_icon.opacity = 0
  4188.   end
  4189.    
  4190.   #--------------------------------------------------------------------------
  4191.   # * Refresh HP Icon
  4192.   #--------------------------------------------------------------------------   
  4193.   def refresh_hp_icon
  4194.       @hp_icon_old = @actor.hp
  4195.       @hp_icon.bitmap.clear
  4196.       max_value = (@actor.mhp / @hp_icon_real_max) * @hp_icon_real_max
  4197.       if @actor.hp > max_value
  4198.          icon_max = icon_limit(@actor.mhp,@hp_icon_real_max)
  4199.       else   
  4200.          icon_max = @actor.mhp
  4201.       end      
  4202.       for i in 0...icon_max
  4203.           break if (i / @hp_icon_col_max) >= @hp_icon_row_max
  4204.           rx = (i * (@hp_icon_cw + HP_ICON_SPACE[0]) ) - ((i / @hp_icon_col_max) * (@hp_icon_cw + HP_ICON_SPACE[0]) * @hp_icon_col_max)
  4205.           ry = (i / @hp_icon_col_max) * (@hp_icon_ch + HP_ICON_SPACE[1])
  4206.           i_scr = Rect.new(0,0,@hp_icon_cw,@hp_icon_ch)
  4207.           @hp_icon.bitmap.blt(rx,ry,@hp_icon_image ,i_scr )      
  4208.       end      
  4209.       icon_max = icon_limit(@actor.hp,@hp_icon_real_max)
  4210.       rx = 0
  4211.       ry = 0
  4212.       for i in 0...icon_max
  4213.           break if (i / @hp_icon_col_max) >= @hp_icon_row_max
  4214.           rx = (i * (@hp_icon_cw + HP_ICON_SPACE[0]) ) - ((i / @hp_icon_col_max) * (@hp_icon_cw + HP_ICON_SPACE[0]) * @hp_icon_col_max)
  4215.           ry = (i / @hp_icon_col_max) * (@hp_icon_ch + HP_ICON_SPACE[1])
  4216.           i_scr = Rect.new(@hp_icon_cw,0,@hp_icon_cw,@hp_icon_ch)
  4217.           @hp_icon.bitmap.blt(rx,ry,@hp_icon_image ,i_scr )
  4218.       end
  4219.       refresh_hp_icon_ex(rx,ry)      
  4220.   end
  4221.   
  4222.   #--------------------------------------------------------------------------
  4223.   # * Create HP Icon EX
  4224.   #--------------------------------------------------------------------------  
  4225.   def create_hp_icon_ex(viewport)
  4226.       return if !HP_ICON_EX_VISIBLE
  4227.       @hp_icon3_anime_phase = 0
  4228.       @hp_icon3 = Sprite.new
  4229.       @hp_icon3.bitmap = Bitmap.new(@hp_icon2_cw,@hp_icon2_ch)
  4230.       @hp_icon3.ox = @hp_icon3.bitmap.width / 2
  4231.       @hp_icon3.oy = @hp_icon3.bitmap.height / 2
  4232.       @hp_icon3.z = HUD_Z + HP_ICON_Z + 2
  4233.       @hp_icon3_org = [@hud_position[0] + HP_ICON_POSITION[0] + HP_ICON_EX_POSITION[0] + @hp_icon3.ox,
  4234.                        @hud_position[1] + HP_ICON_POSITION[1] + HP_ICON_EX_POSITION[1] + @hp_icon3.oy]
  4235.       @hp_icon3.x = @hp_icon3_org[0]
  4236.       @hp_icon3.y = @hp_icon3_org[1]
  4237.       @hp_icon3.viewport = viewport
  4238.       @hp_icon3.opacity = 0
  4239.   end   
  4240.   
  4241.   #--------------------------------------------------------------------------
  4242.   # * Refresh HP Icon EX
  4243.   #--------------------------------------------------------------------------      
  4244.   def refresh_hp_icon_ex(rx,ry)
  4245.       return if @hp_icon3 == nil
  4246.       @hp_icon3.bitmap.clear
  4247.       return if @actor.hp == 0
  4248.       i_scr = Rect.new(0,0,@hp_icon2_cw,@hp_icon2_ch)
  4249.       @hp_icon3.bitmap.blt(0,0, @hp_icon2_image ,i_scr )
  4250.       @hp_icon3.x = @hp_icon3_org[0] + rx
  4251.       @hp_icon3.y = @hp_icon3_org[1] + ry     
  4252.   end
  4253.   
  4254.   #--------------------------------------------------------------------------
  4255.   # * Update Icon HP EX Anime
  4256.   #--------------------------------------------------------------------------  
  4257.   def update_icon_hp_ex_anime
  4258.       return if !HP_ICON_EX_ZOOM_EFFECT
  4259.       if @hp_icon3_anime_phase == 0
  4260.          @hp_icon3.zoom_x += 0.01
  4261.          if @hp_icon3.zoom_x >= 1.30
  4262.             @hp_icon3.zoom_x = 1.30
  4263.             @hp_icon3_anime_phase = 1
  4264.          end  
  4265.       else
  4266.         @hp_icon3.zoom_x -= 0.01
  4267.         if @hp_icon3.zoom_x <= 1.05
  4268.            @hp_icon3.zoom_x = 1.05
  4269.            @hp_icon3_anime_phase = 0
  4270.         end   
  4271.       end  
  4272.       @hp_icon3.zoom_y = @hp_icon3.zoom_x
  4273.   end
  4274.   
  4275.   #--------------------------------------------------------------------------
  4276.   # * Create HP Icon Nummber
  4277.   #--------------------------------------------------------------------------      
  4278.   def create_hp_icon_number(viewport)
  4279.       return if !HP_ICON_NUMBER_VISIBLE
  4280.       @hp_icon_number_old = [-1,-1]
  4281.       @hp_icon_number = Sprite.new
  4282.       @hp_icon_number.bitmap = Bitmap.new(@hp_icon_number_cw * 4,@hp_icon_number_ch)
  4283.       @hp_icon_number.z = HUD_Z + HP_ICON_NUMBER_Z
  4284.       @hp_icon_number.x = @hud_position[0] + HP_ICON_NUMBER_POSITION[0]
  4285.       @hp_icon_number.y = @hud_position[1] + HP_ICON_NUMBER_POSITION[1]
  4286.       @hp_icon_number.viewport = viewport
  4287.       @hp_icon_number.opacity = 0
  4288.   end
  4289.   
  4290.   #--------------------------------------------------------------------------
  4291.   # * Refresh Icon Number HP
  4292.   #--------------------------------------------------------------------------  
  4293.   def refresh_icon_number_hp
  4294.       @hp_icon_number_old[0] = @actor.hp
  4295.       @hp_icon_number_old[1] = @actor.mhp
  4296.       @hp_icon_number.bitmap.clear
  4297.       value = ((@actor.hp - 1) / @hp_icon_col_max) / @hp_icon_row_max
  4298.       value = 0 if value < 0
  4299.       number_value = value.truncate.abs.to_s.split(//)
  4300.       for r in 0..number_value.size - 1         
  4301.          number_value_abs = number_value[r].to_i
  4302.          nsrc_rect = Rect.new(@hp_icon_number_cw * number_value_abs, 0, @hp_icon_number_cw, @hp_icon_number_ch)
  4303.          @hp_icon_number.bitmap.blt(@hp_icon_number_cw *  r, 0, @hp_icon_number_image, nsrc_rect)
  4304.       end
  4305.       cx = (number_value.size * @hp_icon_number_cw)
  4306.       case HP_ICON_NUMBER_ALIGN_TYPE
  4307.          when 0; @hp_icon_number.x = @hud_position[0] + HP_ICON_NUMBER_POSITION[0]
  4308.          when 1; @hp_icon_number.x = @hud_position[0] + HP_ICON_NUMBER_POSITION[0] - (cx / 2)
  4309.          when 2; @hp_icon_number.x = @hud_position[0] + HP_ICON_NUMBER_POSITION[0] - cx
  4310.       end   
  4311.   end

  4312.   #--------------------------------------------------------------------------
  4313.   # * Can Refresh Icon Number HP
  4314.   #--------------------------------------------------------------------------  
  4315.   def can_refresh_icon_number_hp?
  4316.       return true if @hp_icon_number_old[0] != @actor.hp
  4317.       return true if @hp_icon_number_old[1] != @actor.mhp
  4318.       return false
  4319.   end
  4320.   
  4321.   #--------------------------------------------------------------------------
  4322.   # * Update HP
  4323.   #--------------------------------------------------------------------------   
  4324.   def update_hp
  4325.       if @hp_number != nil
  4326.          if HP_NUMBER_ANIMATION
  4327.             update_number(0,@hp_number_old)
  4328.          else   
  4329.             update_number_fix(0) if @hp_number_old != @actor.hp
  4330.          end
  4331.          sprite_visible(@hp_number)  
  4332.          refresh_number(0,@hp_number_old,@hp_number,@hp_number_image,@hp_number_cw,@hp_number_ch,@hp_wave_number) if @hp_number_refresh
  4333.       end
  4334.       if @hp_number2 != nil
  4335.          if HP_NUMBER_ANIMATION
  4336.             update_number(3,@hp_number2_old)
  4337.          else   
  4338.             update_number_fix(3) if @hp_number2_old != @actor.mhp
  4339.          end  
  4340.          refresh_number(3,@hp_number2_old,@hp_number2,@hp_number2_image,@hp_number2_cw,@hp_number2_ch,@hp_wave_number) if @hp_number2_refresh
  4341.          sprite_visible(@hp_number2)
  4342.       end
  4343.       if @hp_meter != nil
  4344.          sprite_visible(@hp_meter)
  4345.          update_flow_hp
  4346.       end   
  4347.       if @hp_icon != nil
  4348.          sprite_visible(@hp_icon)
  4349.          refresh_hp_icon if @hp_icon_old != @actor.hp
  4350.       end
  4351.       if @hp_icon3 != nil
  4352.          sprite_visible(@hp_icon3)
  4353.          update_icon_hp_ex_anime
  4354.       end      
  4355.       if @hp_icon_number != nil
  4356.          sprite_visible(@hp_icon_number)
  4357.          refresh_icon_number_hp if can_refresh_icon_number_hp?
  4358.       end  
  4359.   end  
  4360.    
  4361. end

  4362. #==============================================================================
  4363. #==============================================================================
  4364. # ** Battle Hud EX
  4365. #==============================================================================
  4366. #==============================================================================
  4367. class Battle_Hud_EX
  4368.   
  4369.   #--------------------------------------------------------------------------
  4370.   # * Create MP Number
  4371.   #--------------------------------------------------------------------------  
  4372.   def create_mp_number(viewport)
  4373.       return if !MP_NUMBER_VISIBLE
  4374.       @mp_number = Sprite.new
  4375.       @mp_number.bitmap = Bitmap.new(@mp_number_cw * 6, @mp_number_ch)
  4376.       @mp_number.z = HUD_Z + MP_NUMBER_Z
  4377.       @mp_number.x = @hud_position[0] + MP_NUMBER_POSITION[0]
  4378.       @mp_number.y = @hud_position[1] + MP_NUMBER_POSITION[1]
  4379.       @mp_number.viewport = viewport
  4380.       @mp_number.opacity = 0
  4381.   end
  4382.   
  4383.   #--------------------------------------------------------------------------
  4384.   # * Create MP Number Max
  4385.   #--------------------------------------------------------------------------  
  4386.   def create_mp_number_max(viewport)
  4387.       return if !MP_NUMBER_MAX_VISIBLE
  4388.       @mp_number2 = Sprite.new
  4389.       @mp_number2.bitmap = Bitmap.new(@mp_number2_cw * 6, @mp_number2_ch)
  4390.       @mp_number2.z = HUD_Z + MP_NUMBER_Z
  4391.       @mp_number2.x = @hud_position[0] + MP_NUMBER_MAX_POSITION[0]
  4392.       @mp_number2.y = @hud_position[1] + MP_NUMBER_MAX_POSITION[1]
  4393.       @mp_number2.viewport = viewport
  4394.       @mp_number2.opacity = 0
  4395.   end  
  4396.   
  4397.   #--------------------------------------------------------------------------
  4398.   # * Create MP Meter
  4399.   #--------------------------------------------------------------------------   
  4400.   def create_mp_meter(viewport)
  4401.       return if !MP_METER_VISIBLE
  4402.       @mp_flow_max = @mp_meter_cw * 2
  4403.       @mp_flow = rand(@mp_flow_max)
  4404.       @mp_meter = Sprite.new
  4405.       @mp_meter.bitmap = Bitmap.new(@mp_meter_cw,@mp_meter_ch)
  4406.       @mp_meter.z = HUD_Z + MP_METER_Z
  4407.       @mp_meter.x = @hud_position[0] + MP_METER_POSITION[0]
  4408.       @mp_meter.y = @hud_position[1] + MP_METER_POSITION[1]
  4409.       @mp_meter.angle = MP_METER_ANGLE
  4410.       @mp_meter.mirror = MP_METER_MIRROR_EFFECT
  4411.       @mp_meter.viewport = viewport
  4412.       @mp_meter.opacity = 0
  4413.   end
  4414.   
  4415.   #--------------------------------------------------------------------------
  4416.   # ● Update Flow MP
  4417.   #--------------------------------------------------------------------------            
  4418.   def update_flow_mp
  4419.       @mp_meter.bitmap.clear
  4420.       @mp_flow = 0 if !MP_METER_GRADIENT_ANIMATION
  4421.       meter_width = @mp_meter_cw * @actor.mp / @actor.mmp rescue nil
  4422.       meter_width = 0 if meter_width == nil
  4423.       execute_mp_damage_flow(meter_width)      
  4424.       meter_src_rect = Rect.new(@mp_flow, 0,meter_width, @mp_meter_ch)
  4425.       @mp_meter.bitmap.blt(0,0, @mp_meter_image, meter_src_rect)  
  4426.       @mp_flow += 1
  4427.       @mp_flow = 0 if @mp_flow >= @mp_flow_max
  4428.   end  
  4429.    
  4430.   #--------------------------------------------------------------------------
  4431.   # ● Execute MP Damage Flow
  4432.   #--------------------------------------------------------------------------
  4433.   def execute_mp_damage_flow(meter_width)
  4434.       return if !MP_METER_REDUCTION_ANIMATION
  4435.       return if @mp_old_meter == meter_width
  4436.       n = (@mp_old_meter - meter_width).abs * 3 / 100
  4437.       damage_flow = [[n, 2].min,0.5].max
  4438.       @mp_old_meter -= damage_flow      
  4439.       @mp_old_meter = meter_width if @mp_old_meter <= meter_width
  4440.       src_rect_old = Rect.new(0,@mp_meter_ch, @mp_old_meter, @mp_meter_ch)
  4441.       @mp_meter.bitmap.blt(0,0, @mp_meter_image, src_rect_old)      
  4442.   end

  4443.   #--------------------------------------------------------------------------
  4444.   # * Create MP Icon
  4445.   #--------------------------------------------------------------------------  
  4446.   def create_mp_icon(viewport)
  4447.       return if !MP_ICON_VISIBLE
  4448.       @mp_icon = Sprite.new
  4449.       icon_width = @mp_icon_col_max * (@mp_icon_cw + MP_ICON_SPACE[0].abs)
  4450.       icon_height = @mp_icon_row_max * (@mp_icon_ch + MP_ICON_SPACE[1].abs)
  4451.       @mp_icon.bitmap = Bitmap.new(icon_width,icon_height)      
  4452.       @mp_icon.z = HUD_Z + MP_ICON_Z
  4453.       @mp_icon.x = @hud_position[0] + MP_ICON_POSITION[0]
  4454.       @mp_icon.y = @hud_position[1] + MP_ICON_POSITION[1]
  4455.       @mp_icon.viewport = viewport
  4456.       @mp_icon.opacity = 0
  4457.   end
  4458.    
  4459.   #--------------------------------------------------------------------------
  4460.   # * Refresh MP Icon
  4461.   #--------------------------------------------------------------------------   
  4462.   def refresh_mp_icon
  4463.       @mp_icon_old = @actor.mp
  4464.       @mp_icon.bitmap.clear
  4465.       max_value = (@actor.mmp / @mp_icon_real_max) * @mp_icon_real_max
  4466.       if @actor.mp > max_value
  4467.          icon_max = icon_limit(@actor.mmp,@mp_icon_real_max)
  4468.       else   
  4469.          icon_max = @actor.mmp
  4470.       end      
  4471.       for i in 0...icon_max
  4472.           break if (i / @mp_icon_col_max) >= @mp_icon_row_max
  4473.           rx = (i * (@mp_icon_cw + MP_ICON_SPACE[0]) ) - ((i / @mp_icon_col_max) * (@mp_icon_cw + MP_ICON_SPACE[0]) * @mp_icon_col_max)
  4474.           ry = (i / @mp_icon_col_max) * (@mp_icon_ch + MP_ICON_SPACE[1])
  4475.           i_scr = Rect.new(0,0,@mp_icon_cw,@mp_icon_ch)
  4476.           @mp_icon.bitmap.blt(rx,ry,@mp_icon_image ,i_scr )      
  4477.       end      
  4478.       icon_max = icon_limit(@actor.mp,@mp_icon_real_max)
  4479.       rx = 0
  4480.       ry = 0
  4481.       for i in 0...icon_max
  4482.           break if (i / @mp_icon_col_max) >= @mp_icon_row_max
  4483.           rx = (i * (@mp_icon_cw + MP_ICON_SPACE[0]) ) - ((i / @mp_icon_col_max) * (@mp_icon_cw + MP_ICON_SPACE[0]) * @mp_icon_col_max)
  4484.           ry = (i / @mp_icon_col_max) * (@mp_icon_ch + MP_ICON_SPACE[1])
  4485.           i_scr = Rect.new(@mp_icon_cw,0,@mp_icon_cw,@mp_icon_ch)
  4486.           @mp_icon.bitmap.blt(rx,ry,@mp_icon_image ,i_scr )
  4487.       end
  4488.       refresh_mp_icon_ex(rx,ry)      
  4489.   end
  4490.   
  4491.   #--------------------------------------------------------------------------
  4492.   # * Create MP Icon EX
  4493.   #--------------------------------------------------------------------------  
  4494.   def create_mp_icon_ex(viewport)
  4495.       return if !MP_ICON_EX_VISIBLE
  4496.       @mp_icon3_anime_phase = 0
  4497.       @mp_icon3 = Sprite.new
  4498.       @mp_icon3.bitmap = Bitmap.new(@mp_icon2_cw,@mp_icon2_ch)
  4499.       @mp_icon3.ox = @mp_icon3.bitmap.width / 2
  4500.       @mp_icon3.oy = @mp_icon3.bitmap.height / 2
  4501.       @mp_icon3.z = HUD_Z + MP_ICON_Z + 2
  4502.       @mp_icon3_org = [@hud_position[0] + MP_ICON_POSITION[0] + MP_ICON_EX_POSITION[0] + @mp_icon3.ox,
  4503.                        @hud_position[1] + MP_ICON_POSITION[1] + MP_ICON_EX_POSITION[1] + @mp_icon3.oy]
  4504.       @mp_icon3.x = @mp_icon3_org[0]
  4505.       @mp_icon3.y = @mp_icon3_org[1]
  4506.       @mp_icon3.viewport = viewport
  4507.       @mp_icon3.opacity = 0
  4508.   end   
  4509.   
  4510.   #--------------------------------------------------------------------------
  4511.   # * Refresh MP Icon EX
  4512.   #--------------------------------------------------------------------------      
  4513.   def refresh_mp_icon_ex(rx,ry)
  4514.       return if @mp_icon3 == nil
  4515.       @mp_icon3.bitmap.clear
  4516.       return if @actor.mp == 0
  4517.       i_scr = Rect.new(0,0,@mp_icon2_cw,@mp_icon2_ch)
  4518.       @mp_icon3.bitmap.blt(0,0, @mp_icon2_image ,i_scr )
  4519.       @mp_icon3.x = @mp_icon3_org[0] + rx
  4520.       @mp_icon3.y = @mp_icon3_org[1] + ry     
  4521.   end
  4522.   
  4523.   #--------------------------------------------------------------------------
  4524.   # * Update Icon MP EX Anime
  4525.   #--------------------------------------------------------------------------  
  4526.   def update_icon_mp_ex_anime
  4527.       return if !MP_ICON_EX_ZOOM_EFFECT
  4528.       if @mp_icon3_anime_phase == 0
  4529.          @mp_icon3.zoom_x += 0.01
  4530.          if @mp_icon3.zoom_x >= 1.30
  4531.             @mp_icon3.zoom_x = 1.30
  4532.             @mp_icon3_anime_phase = 1
  4533.          end  
  4534.       else
  4535.         @mp_icon3.zoom_x -= 0.01
  4536.         if @mp_icon3.zoom_x <= 1.05
  4537.            @mp_icon3.zoom_x = 1.05
  4538.            @mp_icon3_anime_phase = 0
  4539.         end   
  4540.       end  
  4541.       @mp_icon3.zoom_y = @mp_icon3.zoom_x
  4542.   end  
  4543.   
  4544.   #--------------------------------------------------------------------------
  4545.   # * Create MP Icon Number
  4546.   #--------------------------------------------------------------------------      
  4547.   def create_mp_icon_number(viewport)
  4548.       return if !MP_ICON_NUMBER_VISIBLE
  4549.       @mp_icon_number_old = [-1,-1]
  4550.       @mp_icon_number = Sprite.new
  4551.       @mp_icon_number.bitmap = Bitmap.new(@mp_icon_number_cw * 4,@mp_icon_number_ch)
  4552.       @mp_icon_number.z = HUD_Z + MP_ICON_NUMBER_Z
  4553.       @mp_icon_number.x = @hud_position[0] + MP_ICON_NUMBER_POSITION[0]
  4554.       @mp_icon_number.y = @hud_position[1] + MP_ICON_NUMBER_POSITION[1]
  4555.       @mp_icon_number.viewport = viewport
  4556.       @mp_icon_number.opacity = 0
  4557.   end
  4558.   
  4559.   #--------------------------------------------------------------------------
  4560.   # * Refresh Icon Number MP
  4561.   #--------------------------------------------------------------------------  
  4562.   def refresh_icon_number_mp
  4563.       @mp_icon_number_old[0] = @actor.mp
  4564.       @mp_icon_number_old[1] = @actor.mmp
  4565.       @mp_icon_number.bitmap.clear
  4566.       value = ((@actor.mp - 1) / @mp_icon_col_max) / @mp_icon_row_max
  4567.       value = 0 if value < 0
  4568.       number_value = value.truncate.abs.to_s.split(//)
  4569.       for r in 0..number_value.size - 1         
  4570.          number_value_abs = number_value[r].to_i
  4571.          nsrc_rect = Rect.new(@mp_icon_number_cw * number_value_abs, 0, @mp_icon_number_cw, @mp_icon_number_ch)
  4572.          @mp_icon_number.bitmap.blt(@mp_icon_number_cw *  r, 0, @mp_icon_number_image, nsrc_rect)
  4573.       end
  4574.       cx = (number_value.size * @mp_icon_number_cw)
  4575.       case MP_ICON_NUMBER_ALIGN_TYPE
  4576.          when 0; @mp_icon_number.x = @hud_position[0] + MP_ICON_NUMBER_POSITION[0]
  4577.          when 1; @mp_icon_number.x = @hud_position[0] + MP_ICON_NUMBER_POSITION[0] - (cx / 2)
  4578.          when 2; @mp_icon_number.x = @hud_position[0] + MP_ICON_NUMBER_POSITION[0] - cx
  4579.       end        
  4580.   end

  4581.   #--------------------------------------------------------------------------
  4582.   # * Can Refresh Icon Number MP
  4583.   #--------------------------------------------------------------------------  
  4584.   def can_refresh_icon_number_mp?
  4585.       return true if @mp_icon_number_old[0] != @actor.mp
  4586.       return true if @mp_icon_number_old[1] != @actor.mmp
  4587.       return false
  4588.   end   
  4589.   
  4590.   #--------------------------------------------------------------------------
  4591.   # * Update MP
  4592.   #--------------------------------------------------------------------------   
  4593.   def update_mp
  4594.       if @mp_number != nil
  4595.          sprite_visible(@mp_number)
  4596.          if MP_NUMBER_ANIMATION
  4597.             update_number(1,@mp_number_old)
  4598.          else
  4599.             update_number_fix(1) if @mp_number_old != @actor.mp
  4600.          end  
  4601.          refresh_number(1,@mp_number_old,@mp_number,@mp_number_image,@mp_number_cw,@mp_number_ch,@mp_wave_number) if @mp_number_refresh
  4602.       end
  4603.       if @mp_number2 != nil
  4604.          sprite_visible(@mp_number2)
  4605.          if MP_NUMBER_ANIMATION
  4606.             update_number(4,@mp_number2_old)
  4607.          else
  4608.             update_number_fix(4) if @mp_number2_old != @actor.mmp
  4609.          end  
  4610.          refresh_number(4,@mp_number2_old,@mp_number2,@mp_number2_image,@mp_number2_cw,@mp_number2_ch,@mp_wave_number) if @mp_number2_refresh
  4611.       end      
  4612.       if @mp_meter != nil
  4613.          sprite_visible(@mp_meter)
  4614.          update_flow_mp
  4615.       end
  4616.       if @mp_icon != nil
  4617.          sprite_visible(@mp_icon)
  4618.          refresh_mp_icon if @mp_icon_old != @actor.mp
  4619.       end
  4620.       if @mp_icon3 != nil
  4621.          sprite_visible(@mp_icon3)
  4622.          update_icon_mp_ex_anime
  4623.       end         
  4624.       if @mp_icon_number != nil
  4625.          sprite_visible(@mp_icon_number)
  4626.          refresh_icon_number_mp if can_refresh_icon_number_mp?
  4627.       end      
  4628.   end  
  4629.   
  4630. end

  4631. #==============================================================================
  4632. #==============================================================================
  4633. # ** Battle Hud EX
  4634. #==============================================================================
  4635. #==============================================================================
  4636. class Battle_Hud_EX
  4637.   
  4638.   #--------------------------------------------------------------------------
  4639.   # * Create TP Number
  4640.   #--------------------------------------------------------------------------  
  4641.   def create_tp_number(viewport)
  4642.       return if !TP_NUMBER_VISIBLE
  4643.       @tp_number = Sprite.new
  4644.       @tp_number.bitmap = Bitmap.new(@tp_number_cw * 6, @tp_number_ch)
  4645.       @tp_number.z = HUD_Z + TP_NUMBER_Z
  4646.       @tp_number.x = @hud_position[0] + TP_NUMBER_POSITION[0]
  4647.       @tp_number.y = @hud_position[1] + TP_NUMBER_POSITION[1]
  4648.       @tp_number.viewport = viewport
  4649.       @tp_number.opacity = 0
  4650.   end
  4651.   
  4652.   #--------------------------------------------------------------------------
  4653.   # * Create TP Number MAX
  4654.   #--------------------------------------------------------------------------  
  4655.   def create_tp_number_max(viewport)
  4656.       return if !TP_NUMBER_MAX_VISIBLE
  4657.       @tp_number2 = Sprite.new
  4658.       @tp_number2.bitmap = Bitmap.new(@tp_number2_cw * 6, @tp_number2_ch)
  4659.       @tp_number2.z = HUD_Z + TP_NUMBER_Z
  4660.       @tp_number2.x = @hud_position[0] + TP_NUMBER_MAX_POSITION[0]
  4661.       @tp_number2.y = @hud_position[1] + TP_NUMBER_MAX_POSITION[1]
  4662.       @tp_number2.viewport = viewport
  4663.       @tp_number2.opacity = 0
  4664.   end  
  4665.   
  4666.   #--------------------------------------------------------------------------
  4667.   # * Create TP Meter
  4668.   #--------------------------------------------------------------------------   
  4669.   def create_tp_meter(viewport)
  4670.       return if !TP_METER_VISIBLE
  4671.       @tp_flow_max = @tp_meter_cw * 2
  4672.       @tp_flow = rand(@tp_flow_max)
  4673.       @tp_meter = Sprite.new
  4674.       @tp_meter.bitmap = Bitmap.new(@tp_meter_cw,@tp_meter_ch)
  4675.       @tp_meter.z = HUD_Z + TP_METER_Z
  4676.       @tp_meter.x = @hud_position[0] + TP_METER_POSITION[0]
  4677.       @tp_meter.y = @hud_position[1] + TP_METER_POSITION[1]
  4678.       @tp_meter.angle = TP_METER_ANGLE
  4679.       @tp_meter.mirror = TP_METER_MIRROR_EFFECT
  4680.       @tp_meter.viewport = viewport
  4681.       @tp_meter.opacity = 0
  4682.   end
  4683.   
  4684.   #--------------------------------------------------------------------------
  4685.   # ● Update Flow TP
  4686.   #--------------------------------------------------------------------------            
  4687.   def update_flow_tp
  4688.       @tp_meter.bitmap.clear      
  4689.       @tp_flow = 0 if !TP_METER_GRADIENT_ANIMATION
  4690.       meter_width = @tp_meter_cw * @actor.tp / @actor.max_tp rescue nil  
  4691.       meter_width = 0 if meter_width == nil
  4692.       execute_tp_damage_flow(meter_width)      
  4693.       meter_src_rect = Rect.new(@tp_flow, 0,meter_width, @tp_meter_ch)
  4694.       @tp_meter.bitmap.blt(0,0, @tp_meter_image, meter_src_rect)  
  4695.       @tp_flow += 1
  4696.       @tp_flow = 0 if @tp_flow >= @tp_flow_max
  4697.   end  
  4698.    
  4699.   #--------------------------------------------------------------------------
  4700.   # ● Execute TP Damage Flow
  4701.   #--------------------------------------------------------------------------
  4702.   def execute_tp_damage_flow(meter_width)
  4703.       return if !TP_METER_REDUCTION_ANIMATION
  4704.       return if @tp_old_meter == meter_width
  4705.       n = (@tp_old_meter - meter_width).abs * 3 / 100
  4706.       damage_flow = [[n, 2].min,0.5].max
  4707.       @tp_old_meter -= damage_flow
  4708.       @tp_old_meter = meter_width if @tp_old_meter <= meter_width
  4709.       src_rect_old = Rect.new(0,@tp_meter_ch, @tp_old_meter, @tp_meter_ch)
  4710.       @tp_meter.bitmap.blt(0,0, @tp_meter_image, src_rect_old)      
  4711.   end

  4712.   #--------------------------------------------------------------------------
  4713.   # * Create TP Icon
  4714.   #--------------------------------------------------------------------------  
  4715.   def create_tp_icon(viewport)
  4716.       return if !TP_ICON_VISIBLE
  4717.       @tp_icon = Sprite.new
  4718.       icon_width = @tp_icon_col_max * (@tp_icon_cw + TP_ICON_SPACE[0].abs)
  4719.       icon_height = @tp_icon_row_max * (@tp_icon_ch + TP_ICON_SPACE[1].abs)
  4720.       @tp_icon.bitmap = Bitmap.new(icon_width,icon_height)      
  4721.       @tp_icon.z = HUD_Z + TP_ICON_Z
  4722.       @tp_icon.x = @hud_position[0] + TP_ICON_POSITION[0]
  4723.       @tp_icon.y = @hud_position[1] + TP_ICON_POSITION[1]
  4724.       @tp_icon.viewport = viewport
  4725.       @tp_icon.opacity = 0
  4726.   end
  4727.    
  4728.   #--------------------------------------------------------------------------
  4729.   # * Refresh TP Icon
  4730.   #--------------------------------------------------------------------------   
  4731.   def refresh_tp_icon
  4732.       @tp_icon_old = @actor.tp
  4733.       @tp_icon.bitmap.clear
  4734.       max_value = (@actor.max_tp / @tp_icon_real_max) * @tp_icon_real_max
  4735.       if @actor.mp > max_value
  4736.          icon_max = icon_limit(@actor.max_tp,@tp_icon_real_max)
  4737.       else   
  4738.          icon_max = @actor.max_tp
  4739.       end      
  4740.       for i in 0...icon_max
  4741.           break if (i / @tp_icon_col_max) >= @tp_icon_row_max
  4742.           rx = (i * (@tp_icon_cw + TP_ICON_SPACE[0]) ) - ((i / @tp_icon_col_max) * (@tp_icon_cw + TP_ICON_SPACE[0]) * @tp_icon_col_max)
  4743.           ry = (i / @tp_icon_col_max) * (@tp_icon_ch + TP_ICON_SPACE[1])
  4744.           i_scr = Rect.new(0,0,@tp_icon_cw,@tp_icon_ch)
  4745.           @tp_icon.bitmap.blt(rx,ry,@tp_icon_image ,i_scr )      
  4746.       end      
  4747.       icon_max = icon_limit(@actor.tp,@tp_icon_real_max)
  4748.       rx = 0
  4749.       ry = 0
  4750.       for i in 0...icon_max
  4751.           break if (i / @tp_icon_col_max) >= @tp_icon_row_max
  4752.           rx = (i * (@tp_icon_cw + TP_ICON_SPACE[0]) ) - ((i / @tp_icon_col_max) * (@tp_icon_cw + TP_ICON_SPACE[0]) * @tp_icon_col_max)
  4753.           ry = (i / @tp_icon_col_max) * (@tp_icon_ch + TP_ICON_SPACE[1])
  4754.           i_scr = Rect.new(@mp_icon_cw,0,@tp_icon_cw,@tp_icon_ch)
  4755.           @tp_icon.bitmap.blt(rx,ry,@tp_icon_image ,i_scr )
  4756.       end
  4757.       refresh_tp_icon_ex(rx,ry)      
  4758.   end
  4759.   
  4760.   #--------------------------------------------------------------------------
  4761.   # * Create TP Icon EX
  4762.   #--------------------------------------------------------------------------  
  4763.   def create_tp_icon_ex(viewport)
  4764.       return if !TP_ICON_EX_VISIBLE
  4765.       @tp_icon3_anime_phase = 0
  4766.       @tp_icon3 = Sprite.new
  4767.       @tp_icon3.bitmap = Bitmap.new(@tp_icon2_cw,@tp_icon2_ch)
  4768.       @tp_icon3.ox = @tp_icon3.bitmap.width / 2
  4769.       @tp_icon3.oy = @tp_icon3.bitmap.height / 2
  4770.       @tp_icon3.z = HUD_Z + TP_ICON_Z + 2
  4771.       @tp_icon3_org = [@hud_position[0] + TP_ICON_POSITION[0] + TP_ICON_EX_POSITION[0] + @tp_icon3.ox,
  4772.                        @hud_position[1] + TP_ICON_POSITION[1] + TP_ICON_EX_POSITION[1] + @tp_icon3.oy]
  4773.       @tp_icon3.x = @tp_icon3_org[0]
  4774.       @tp_icon3.y = @tp_icon3_org[1]
  4775.       @tp_icon3.viewport = viewport
  4776.       @tp_icon3.opacity = 0
  4777.   end   
  4778.   
  4779.   #--------------------------------------------------------------------------
  4780.   # * Refresh TP Icon EX
  4781.   #--------------------------------------------------------------------------      
  4782.   def refresh_tp_icon_ex(rx,ry)
  4783.       return if @tp_icon3 == nil
  4784.       @tp_icon3.bitmap.clear
  4785.       return if @actor.tp == 0
  4786.       i_scr = Rect.new(0,0,@tp_icon2_cw,@tp_icon2_ch)
  4787.       @tp_icon3.bitmap.blt(0,0, @tp_icon2_image ,i_scr )
  4788.       @tp_icon3.x = @tp_icon3_org[0] + rx
  4789.       @tp_icon3.y = @tp_icon3_org[1] + ry     
  4790.   end
  4791.   
  4792.   #--------------------------------------------------------------------------
  4793.   # * Update Icon TP EX Anime
  4794.   #--------------------------------------------------------------------------  
  4795.   def update_icon_tp_ex_anime
  4796.       return if !MP_ICON_EX_ZOOM_EFFECT
  4797.       if @tp_icon3_anime_phase == 0
  4798.          @tp_icon3.zoom_x += 0.01
  4799.          if @tp_icon3.zoom_x >= 1.30
  4800.             @tp_icon3.zoom_x = 1.30
  4801.             @tp_icon3_anime_phase = 1
  4802.          end  
  4803.       else
  4804.         @tp_icon3.zoom_x -= 0.01
  4805.         if @tp_icon3.zoom_x <= 1.05
  4806.            @tp_icon3.zoom_x = 1.05
  4807.            @tp_icon3_anime_phase = 0
  4808.         end   
  4809.       end  
  4810.       @tp_icon3.zoom_y = @tp_icon3.zoom_x
  4811.   end   
  4812.   
  4813.   #--------------------------------------------------------------------------
  4814.   # * Create HP Icon Number
  4815.   #--------------------------------------------------------------------------      
  4816.   def create_tp_icon_number(viewport)
  4817.       return if !TP_ICON_NUMBER_VISIBLE
  4818.       @tp_icon_number_old = [-1,-1]
  4819.       @tp_icon_number = Sprite.new
  4820.       @tp_icon_number.bitmap = Bitmap.new(@tp_icon_number_cw * 3,@tp_icon_number_ch)
  4821.       @tp_icon_number.z = HUD_Z + TP_ICON_NUMBER_Z
  4822.       @tp_icon_number.x = @hud_position[0] + TP_ICON_NUMBER_POSITION[0]
  4823.       @tp_icon_number.y = @hud_position[1] + TP_ICON_NUMBER_POSITION[1]
  4824.       @tp_icon_number.viewport = viewport
  4825.       @tp_icon_number.opacity = 0
  4826.   end
  4827.   
  4828.   #--------------------------------------------------------------------------
  4829.   # * Refresh Icon Number TP
  4830.   #--------------------------------------------------------------------------  
  4831.   def refresh_icon_number_tp
  4832.       @tp_icon_number_old[0] = @actor.tp
  4833.       @tp_icon_number_old[1] = @actor.max_tp
  4834.       @tp_icon_number.bitmap.clear
  4835.       value = ((@actor.tp - 1) / @tp_icon_col_max) / @tp_icon_row_max
  4836.       value = 0 if value < 0
  4837.       number_value = value.truncate.abs.to_s.split(//)
  4838.       for r in 0..number_value.size - 1         
  4839.          number_value_abs = number_value[r].to_i
  4840.          nsrc_rect = Rect.new(@tp_icon_number_cw * number_value_abs, 0, @tp_icon_number_cw, @tp_icon_number_ch)
  4841.          @tp_icon_number.bitmap.blt(@tp_icon_number_cw *  r, 0, @tp_icon_number_image, nsrc_rect)
  4842.       end
  4843.       cx = (number_value.size * @tp_icon_number_cw)
  4844.       case TP_ICON_NUMBER_ALIGN_TYPE
  4845.          when 0; @tp_icon_number.x = @hud_position[0] + TP_ICON_NUMBER_POSITION[0]
  4846.          when 1; @tp_icon_number.x = @hud_position[0] + TP_ICON_NUMBER_POSITION[0] - (cx / 2)
  4847.          when 2; @tp_icon_number.x = @hud_position[0] + TP_ICON_NUMBER_POSITION[0] - cx
  4848.       end        
  4849.   end

  4850.   #--------------------------------------------------------------------------
  4851.   # * Can Refresh Icon Number TP
  4852.   #--------------------------------------------------------------------------  
  4853.   def can_refresh_icon_number_tp?
  4854.       return true if @tp_icon_number_old[0] != @actor.tp
  4855.       return true if @tp_icon_number_old[1] != @actor.max_tp
  4856.       return false
  4857.   end   
  4858.   
  4859.   #--------------------------------------------------------------------------
  4860.   # * Update TP
  4861.   #--------------------------------------------------------------------------   
  4862.   def update_tp
  4863.       if @tp_number != nil
  4864.          sprite_visible(@tp_number)
  4865.          if MP_NUMBER_ANIMATION
  4866.             update_number(2,@tp_number_old)
  4867.          else
  4868.             update_number_fix(2) if @tp_number_old != @actor.tp
  4869.          end           
  4870.          refresh_number(2,@tp_number_old,@tp_number,@tp_number_image,@tp_number_cw,@tp_number_ch,@tp_wave_number) if @tp_number_refresh         
  4871.       end   
  4872.       if @tp_number2 != nil
  4873.          sprite_visible(@tp_number2)
  4874.          if MP_NUMBER_ANIMATION
  4875.             update_number(5,@tp_number2_old)
  4876.          else
  4877.             update_number_fix(5) if @tp_number2_old != @actor.max_tp
  4878.          end           
  4879.          refresh_number(5,@tp_number2_old,@tp_number2,@tp_number2_image,@tp_number2_cw,@tp_number2_ch,@tp_wave_number) if @tp_number2_refresh
  4880.       end        
  4881.       if @tp_meter != nil
  4882.          sprite_visible(@tp_meter)
  4883.          update_flow_tp
  4884.       end
  4885.       if @tp_icon != nil
  4886.          sprite_visible(@tp_icon)
  4887.          refresh_tp_icon if @tp_icon_old != @actor.tp
  4888.       end
  4889.       if @tp_icon3 != nil
  4890.          sprite_visible(@tp_icon3)
  4891.          update_icon_tp_ex_anime
  4892.       end         
  4893.       if @tp_icon_number != nil
  4894.          sprite_visible(@tp_icon_number)
  4895.          refresh_icon_number_tp if can_refresh_icon_number_tp?
  4896.       end  
  4897.   end  
  4898.   
  4899. end

  4900. #==============================================================================
  4901. #==============================================================================
  4902. # ** Battle Hud EX
  4903. #==============================================================================
  4904. #==============================================================================
  4905. class Battle_Hud_EX
  4906.   
  4907.   #--------------------------------------------------------------------------
  4908.   # * Create AT Number
  4909.   #--------------------------------------------------------------------------  
  4910.   def create_at_number(viewport)
  4911.       return if !AT_NUMBER_VISIBLE
  4912.       @at_number = Sprite.new
  4913.       @at_number.bitmap = Bitmap.new(@at_number_cw * 4,@at_number_ch)
  4914.       @at_number.z = HUD_Z + AT_NUMBER_Z
  4915.       @at_number.x = @hud_position[0] + AT_NUMBER_POSITION[0]
  4916.       @at_number.y = @hud_position[1] + AT_NUMBER_POSITION[1]
  4917.       @at_number.viewport = viewport
  4918.       @at_number.opacity = 0
  4919.   end
  4920.   
  4921.   #--------------------------------------------------------------------------
  4922.   # * Create AT Number Max
  4923.   #--------------------------------------------------------------------------  
  4924.   def create_at_number_max(viewport)
  4925.       return if !AT_NUMBER_MAX_VISIBLE
  4926.       @at_number2 = Sprite.new
  4927.       @at_number2.bitmap = Bitmap.new(@at_number2_cw * 4,@at_number2_ch)
  4928.       @at_number2.z = HUD_Z + AT_NUMBER_Z
  4929.       @at_number2.x = @hud_position[0] + AT_NUMBER_MAX_POSITION[0]
  4930.       @at_number2.y = @hud_position[1] + AT_NUMBER_MAX_POSITION[1]
  4931.       @at_number2.viewport = viewport
  4932.       @at_number2.opacity = 0
  4933.   end  
  4934.   
  4935.   #--------------------------------------------------------------------------
  4936.   # * Create AT Meter
  4937.   #--------------------------------------------------------------------------   
  4938.   def create_at_meter(viewport)
  4939.       return if !AT_METER_VISIBLE
  4940.       @at_flow_max = @at_meter_cw * 2
  4941.       @at_flow = rand(@at_flow_max)
  4942.       @at_meter = Sprite.new
  4943.       @at_meter.bitmap = Bitmap.new(@at_meter_cw,@at_meter_ch)
  4944.       @at_meter.z = HUD_Z + AT_METER_Z
  4945.       @at_meter.x = @hud_position[0] + AT_METER_POSITION[0]
  4946.       @at_meter.y = @hud_position[1] + AT_METER_POSITION[1]
  4947.       @at_meter.angle = AT_METER_ANGLE
  4948.       @at_meter.mirror = AT_METER_MIRROR_EFFECT
  4949.       @at_meter.viewport = viewport
  4950.       @at_meter.opacity = 0
  4951.   end
  4952.   
  4953.   #--------------------------------------------------------------------------
  4954.   # ● Update Flow AT
  4955.   #--------------------------------------------------------------------------            
  4956.   def update_flow_at
  4957.       @at_meter.bitmap.clear
  4958.       @at_flow = 0 if !AT_METER_GRADIENT_ANIMATION
  4959.       if actor_cast?
  4960.          meter_width = @at_meter_cw * actor_cast / actor_max_cast rescue nil
  4961.          meter_width = 0 if meter_width == nil
  4962.          ch = @at_meter_ch * 2
  4963.       else
  4964.          meter_width = @at_meter_cw * actor_at / actor_max_at rescue nil
  4965.          meter_width = 0 if meter_width == nil         
  4966.          ch = actor_at >= actor_max_at ? @at_meter_ch : 0
  4967.       end   
  4968.       meter_src_rect = Rect.new(@at_flow, ch,meter_width, @at_meter_ch)
  4969.       @at_meter.bitmap.blt(0,0, @at_meter_image, meter_src_rect)  
  4970.       @at_flow += 1
  4971.       @at_flow = 0 if @at_flow >= @at_flow_max
  4972.   end  
  4973.   
  4974.   #--------------------------------------------------------------------------
  4975.   # * Update AT
  4976.   #--------------------------------------------------------------------------   
  4977.   def update_at
  4978.       if @at_number != nil
  4979.          sprite_visible(@at_number)
  4980.          if AT_NUMBER_ANIMATION
  4981.             update_number(6,@at_number_old)
  4982.          else   
  4983.             update_number_fix(6) if @at_number_old != actor_at
  4984.          end  
  4985.          refresh_number(6,@at_number_old,@at_number,@at_number_image,@at_number_cw,@at_number_ch,@at_wave_number) if @at_number_refresh
  4986.       end
  4987.       if @at_number2 != nil
  4988.          sprite_visible(@at_number2)
  4989.          if AT_NUMBER_ANIMATION
  4990.             update_number(7,@at_number2_old)
  4991.          else   
  4992.             update_number_fix(7) if @at_number2_old != actor_max_at
  4993.          end  
  4994.          refresh_number(7,@at_number2_old,@at_number2,@at_number2_image,@at_number2_cw,@at_number2_ch,@at_wave_number) if @at_number2_refresh
  4995.       end
  4996.       if @at_meter != nil
  4997.          sprite_visible(@at_meter)
  4998.          update_flow_at
  4999.       end   
  5000.   end  
  5001.    
  5002. end

  5003. #==============================================================================
  5004. #==============================================================================
  5005. # ** Battle Hud EX
  5006. #==============================================================================
  5007. #==============================================================================
  5008. class Battle_Hud_EX
  5009.   
  5010.   #--------------------------------------------------------------------------
  5011.   # * Create Level Number
  5012.   #--------------------------------------------------------------------------   
  5013.   def create_level_number(viewport)
  5014.       return if !LEVEL_NUMBER_VISIBLE
  5015.       @old_level = -1
  5016.       @lv_number = Sprite.new
  5017.       @lv_number.bitmap = Bitmap.new(@lv_number_cw * 2, @lv_number_ch)
  5018.       @lv_number.z = HUD_Z + LEVEL_NUMBER_Z
  5019.       @lv_number.x = @hud_position[0] + LEVEL_NUMBER_POSITION[0]
  5020.       @lv_number.y = @hud_position[1] + LEVEL_NUMBER_POSITION[1]
  5021.       @lv_number.viewport = viewport
  5022.       @lv_number.opacity = 0
  5023.   end
  5024.   
  5025.   #--------------------------------------------------------------------------
  5026.   # * Refresh Level Number
  5027.   #--------------------------------------------------------------------------  
  5028.   def refresh_level_number
  5029.       @lv_number.bitmap.clear
  5030.       @old_level = @actor.level      
  5031.       number_value = @actor.level.abs.to_s.split(//)
  5032.       for r in 0..number_value.size - 1         
  5033.          number_value_abs = number_value[r].to_i
  5034.          nsrc_rect = Rect.new(@lv_number_cw * number_value_abs, 0, @lv_number_cw, @lv_number_ch)
  5035.          @lv_number.bitmap.blt(@lv_number_cw *  r, 0, @lv_number_image, nsrc_rect)
  5036.       end
  5037.       cx = (number_value.size * @lv_number_cw)
  5038.       case LEVEL_NUMBER_ALIGN_TYPE
  5039.            when 0; @lv_number.x = @hud_position[0] + LEVEL_NUMBER_POSITION[0]
  5040.            when 1; @lv_number.x = @hud_position[0] + LEVEL_NUMBER_POSITION[0] - (cx / 2)
  5041.            when 2; @lv_number.x = @hud_position[0] + LEVEL_NUMBER_POSITION[0] - cx
  5042.       end
  5043.   end
  5044.   
  5045.   #--------------------------------------------------------------------------
  5046.   # * Update Level
  5047.   #--------------------------------------------------------------------------  
  5048.   def update_level
  5049.       return if @lv_number == nil
  5050.       sprite_visible(@lv_number)
  5051.       refresh_level_number if @old_level != @actor.level
  5052.   end
  5053.   
  5054. end

  5055. #==============================================================================
  5056. #==============================================================================
  5057. # ** Battle Hud EX
  5058. #==============================================================================
  5059. #==============================================================================
  5060. class Battle_Hud_EX
  5061.   
  5062.   #--------------------------------------------------------------------------
  5063.   # * Create States
  5064.   #--------------------------------------------------------------------------  
  5065.   def create_states(viewport)
  5066.       return if !STATES_VISIBLE
  5067.       @status_old = nil
  5068.       @status_flow = [-24,0]
  5069.       @status_size_real = 0
  5070.       @status = Sprite.new
  5071.       @status.bitmap = Bitmap.new(24,24)
  5072.       @status.x = @hud_position[0] + STATES_POSITION[0]
  5073.       @status.y = @hud_position[1] + STATES_POSITION[1]
  5074.       @status.z = HUD_Z + STATES_Z
  5075.       @status.angle = STATE_ANGLE
  5076.       @status.viewport = viewport
  5077.       @status.opacity = 0
  5078.   end
  5079.   
  5080.   #--------------------------------------------------------------------------
  5081.   # * Refresh States
  5082.   #--------------------------------------------------------------------------        
  5083.   def refresh_states
  5084.       check_icon_image
  5085.       @status_size_real = set_real_states_size
  5086.       @status_old = @actor.states
  5087.       @status_flow = [0,0]
  5088.       @states_size = @status_size_real > 0 ? (26 * @status_size_real) : 24
  5089.       @actor_status.dispose if @actor_status != nil
  5090.       @actor_status = Bitmap.new(@states_size,24)
  5091.       index = 0
  5092.       for i in @actor.states
  5093.          next if HIDE_STATES_ID.include?(i.id)         
  5094.          rect = Rect.new(i.icon_index % 16 * 24, i.icon_index / 16 * 24, 24, 24)
  5095.          @actor_status.blt(26 * index , 0, @icon_image, rect)
  5096.          index += 1
  5097.       end
  5098.   end   
  5099.   
  5100.   #--------------------------------------------------------------------------
  5101.   # * Set Real States Size
  5102.   #--------------------------------------------------------------------------        
  5103.   def set_real_states_size
  5104.       n = 0
  5105.       for i in @actor.states
  5106.           next if HIDE_STATES_ID.include?(i.id)  
  5107.           n += 1
  5108.       end
  5109.       return n
  5110.   end
  5111.   
  5112.   #--------------------------------------------------------------------------
  5113.   # * Flow_Status
  5114.   #--------------------------------------------------------------------------         
  5115.   def flow_states
  5116.       return if @actor_status == nil
  5117.       @status.bitmap.clear
  5118.       return if @actor.states.size == 0
  5119.       st_src_rect = Rect.new(@status_flow[0],0, 24,24)
  5120.       @status.bitmap.blt(0,0, @actor_status, st_src_rect)
  5121.       if STATES_SCROLLING_ANIMATION
  5122.          @status_flow[0] += 1
  5123.          @status_flow[0] = -24 if @status_flow[0] >= @states_size + 2
  5124.       else   
  5125.          @status_flow[1] += 1 unless @actor.states.size <= 1
  5126.          if @status_flow[1] > 30
  5127.             @status_flow[1] = 0
  5128.             @status_flow[0] += 26
  5129.             @status_flow[0] = 0 if @status_flow[0] >= (@states_size - 0)
  5130.          end   
  5131.      end   
  5132.   end      
  5133.   
  5134.   #--------------------------------------------------------------------------
  5135.   # * Update States
  5136.   #--------------------------------------------------------------------------  
  5137.   def update_states
  5138.       return if @status == nil
  5139.       sprite_visible(@status)
  5140.       refresh_states if @status_old != @actor.states
  5141.       flow_states
  5142.   end  
  5143.   
  5144. end

  5145. #==============================================================================
  5146. #==============================================================================
  5147. # ** Battle Hud EX
  5148. #==============================================================================
  5149. #==============================================================================
  5150. class Battle_Hud_EX
  5151.   
  5152.   #--------------------------------------------------------------------------
  5153.   # * Create Face
  5154.   #--------------------------------------------------------------------------   
  5155.   def create_face(viewport)
  5156.       return if !FACE_VISIBLE
  5157.       @face_old_hp = @actor.hp
  5158.       @face_old_mp = @actor.mp
  5159.       @face_old_tp = @actor.tp
  5160.       @face_name = ""
  5161.       @face = Sprite.new
  5162.       @face_org = [@hud_position[0] + FACE_POSITION[0], @hud_position[1] + FACE_POSITION[1]]
  5163.       @face.x = @face_org[0]
  5164.       @face.y = @face_org[1]
  5165.       @face.z = HUD_Z + FACE_Z
  5166.       @face.viewport = viewport
  5167.       @face.opacity = 0
  5168.       refresh_face_name
  5169.   end

  5170.   #--------------------------------------------------------------------------
  5171.   # * Refresh Face Name
  5172.   #--------------------------------------------------------------------------      
  5173.   def refresh_face_name      
  5174.       @face_image.dispose if @face_image != nil
  5175.       @face.bitmap.dispose if @face.bitmap != nil
  5176.       return if @actor == nil or @actor.id == nil
  5177.       @face_image = Cache.battle_hud(@actor.battler_face_name.to_s) rescue nil
  5178.       @face_image = Bitmap.new(32,32) if @face_image == nil
  5179.       @face_cw = FACE_ANIMATION ? @face_image.width / 5 : @face_image.width
  5180.       @face_ch = @face_image.height
  5181.       @face.ox = @face_cw / 2
  5182.       @face.oy = @face_ch / 2      
  5183.       @face.bitmap = Bitmap.new(@face_cw,@face_ch)
  5184.       @face_org = [@hud_position[0] + FACE_POSITION[0],
  5185.                    @hud_position[1] + @face.oy + FACE_POSITION[1]]
  5186.       if $game_temp.battler_face_pos[@actor_index] == nil
  5187.          $game_temp.battler_face_pos[@actor_index] = []
  5188.       end
  5189.       @face.x = @face_org[0]
  5190.       @face.y = @face_org[1]  
  5191.       limit_Y = (@hud_position[1] + FACE_POSITION[1] + @face_image.height)
  5192.       fy = @face_org[1]
  5193.       if limit_Y > Graphics.height
  5194.          @face.y = Graphics.height - (@face_image.height - @face.oy)
  5195.          fy = Graphics.height - 16
  5196.          @face_org[1] = @face.y
  5197.       end
  5198.       $game_temp.battler_face_pos[@actor_index][0] = @face_org[0]
  5199.       $game_temp.battler_face_pos[@actor_index][1] = fy
  5200.       $game_temp.battler_face_pos[@actor_index][2] = @face.z     
  5201.       clear_face_index
  5202.   end

  5203.   #--------------------------------------------------------------------------
  5204.   # * Refresh Face
  5205.   #--------------------------------------------------------------------------  
  5206.   def refresh_face
  5207.       @face.mirror = false
  5208.       @face.zoom_x = 1.00
  5209.       @face.zoom_y = 1.00
  5210.       @face_index = @actor.face_animation[1]
  5211.       @face.bitmap.clear
  5212.       if !FACE_ANIMATION
  5213.          f_scr = Rect.new(0,0,@face_cw,@face_ch)
  5214.       else
  5215.          f_scr = Rect.new(@face_index * @face_cw,0,@face_cw,@face_ch)
  5216.       end
  5217.       @face.bitmap.blt(0,0,@face_image,f_scr)
  5218.   end
  5219.    
  5220.   #--------------------------------------------------------------------------
  5221.   # * Update Face Duration
  5222.   #--------------------------------------------------------------------------   
  5223.   def update_face_duration
  5224.       return if @actor.face_animation[0] == 0
  5225.       @actor.face_animation[0] -= 1
  5226.       update_face_shake_effect
  5227.       update_face_zoom if @actor.face_animation[1] == 2
  5228.       return if @actor.face_animation[0] > 0
  5229.       clear_face_index
  5230.   end
  5231.   
  5232.   #--------------------------------------------------------------------------
  5233.   # * Clear Face Index
  5234.   #--------------------------------------------------------------------------      
  5235.   def clear_face_index
  5236.       @actor.face_animation[1] = @actor.low_hp? ? 3 : 0
  5237.       @actor.face_animation[1] = 4 if @actor.dead?
  5238.       refresh_face
  5239.   end
  5240.       
  5241.   #--------------------------------------------------------------------------
  5242.   # * Update Face Zoom
  5243.   #--------------------------------------------------------------------------      
  5244.   def update_face_zoom
  5245.       return if !FACE_ZOOM_ANIMATION
  5246.       case @actor.face_animation[0]
  5247.          when 30..60
  5248.             @face.zoom_x += 0.01
  5249.             @face.zoom_x = 1.30 if @face.zoom_x > 1.30
  5250.             @face.mirror = true unless !FACE_ZOOM_MIRROR_EFFECT
  5251.          when 1..29
  5252.             @face.zoom_x -= 0.01
  5253.             @face.zoom_x = 1.00 if @face.zoom_x < 1.00
  5254.             @face.mirror = false
  5255.          else
  5256.             @face.zoom_x = 1.00
  5257.             @face.mirror = false
  5258.       end
  5259.       @face.zoom_y = @face.zoom_x
  5260.   end
  5261.   
  5262.   #--------------------------------------------------------------------------
  5263.   # * Can Refresh Index MP TP?
  5264.   #--------------------------------------------------------------------------     
  5265.   def can_refresh_index_mp_tp?
  5266.       return true if @face_old_mp != @actor.mp
  5267.       return false
  5268.   end
  5269.   
  5270.   #--------------------------------------------------------------------------
  5271.   # * Refresh Face Index HP
  5272.   #--------------------------------------------------------------------------  
  5273.   def refresh_face_index_hp
  5274.       @actor.face_animation[0] = FACE_ANIMATION_DURATION
  5275.       @actor.face_animation[1] = @face_old_hp > @actor.hp ? 3 : 1
  5276.       @face_old_hp = @actor.hp
  5277.   end
  5278.   
  5279.   #--------------------------------------------------------------------------
  5280.   # * Refresh Face Index MP TP
  5281.   #--------------------------------------------------------------------------  
  5282.   def refresh_face_index_mp_tp
  5283.       if @face_old_mp < @actor.mp
  5284.          @actor.face_animation[0] = FACE_ANIMATION_DURATION
  5285.          @actor.face_animation[1] = 1
  5286.       end
  5287.       @face_old_mp = @actor.mp
  5288.       @face_old_tp = @actor.tp
  5289.   end  
  5290.   
  5291.   #--------------------------------------------------------------------------
  5292.   # * Update Face Shake Effect
  5293.   #--------------------------------------------------------------------------  
  5294.   def update_face_shake_effect
  5295.       return if !FACE_SHAKE_EFFECT
  5296.       if FACE_ANIMATION
  5297.          update_shake_animated_face
  5298.       else            
  5299.          update_shake_still_face
  5300.       end  
  5301.   end      

  5302.   #--------------------------------------------------------------------------
  5303.   # * Update Shake Still Effect Face
  5304.   #--------------------------------------------------------------------------   
  5305.   def update_shake_still_face
  5306.       if @actor.face_animation[0] > 0 and @actor.face_animation[1] == 3 and @actor.hp > 0
  5307.          @face.x = @face_org[0] - 4 + rand(8)
  5308.       else
  5309.          @face.x = @face_org[0]
  5310.       end     
  5311.   end
  5312.       
  5313.   #--------------------------------------------------------------------------
  5314.   # * Update Shake Animated Face
  5315.   #--------------------------------------------------------------------------   
  5316.   def update_shake_animated_face
  5317.       if @actor.face_animation[0] == 0
  5318.          @face.x = @face_org[0]
  5319.          return
  5320.       end
  5321.       if @actor.face_animation[1] == 3 and @actor.hp > 0
  5322.          @face.x = @face_org[0] - 4 + rand(8)
  5323.       else
  5324.          @face.x = @face_org[0]
  5325.       end         
  5326.   end
  5327.   
  5328.   #--------------------------------------------------------------------------
  5329.   # * Update Face
  5330.   #--------------------------------------------------------------------------   
  5331.   def update_face
  5332.       return if @face == nil
  5333.       sprite_visible(@face)
  5334.       refresh_face_index_hp if !FACE_ANIMATION and @face_old_hp != @actor.hp
  5335.       update_face_duration
  5336.       return if !FACE_ANIMATION
  5337.       refresh_face_index_mp_tp if can_refresh_index_mp_tp?
  5338.       refresh_face_index_hp if @face_old_hp != @actor.hp
  5339.       refresh_face if @face_index != @actor.face_animation[1]
  5340.   end  
  5341.   
  5342. end

  5343. #==============================================================================
  5344. # ■ Battle Manager
  5345. #==============================================================================
  5346. class << BattleManager
  5347.   
  5348.   #--------------------------------------------------------------------------
  5349.   # ● Battle End
  5350.   #--------------------------------------------------------------------------                    
  5351.   alias mog_battle_hud_battle_process_victory process_victory
  5352.   def process_victory
  5353.       execute_face_effect_end
  5354.       mog_battle_hud_battle_process_victory
  5355.   end
  5356.   
  5357.   #--------------------------------------------------------------------------
  5358.   # ● Execute Face Effect End
  5359.   #--------------------------------------------------------------------------                  
  5360.   def execute_face_effect_end
  5361.       $game_temp.battle_end = true
  5362.       for i in $game_party.members
  5363.           i.face_animation = [120,1,0] if i.hp > 0   
  5364.       end  
  5365.   end
  5366.   
  5367.   #--------------------------------------------------------------------------
  5368.   # * Display EXP Earned
  5369.   #--------------------------------------------------------------------------
  5370.   alias mog_battle_hud_ex_message_battle_process_defeat process_defeat
  5371.   def process_defeat
  5372.       $game_temp.battle_end = true
  5373.       mog_battle_hud_ex_message_battle_process_defeat
  5374.   end
  5375.   
  5376.   #--------------------------------------------------------------------------
  5377.   # * Process Abort
  5378.   #--------------------------------------------------------------------------
  5379.   alias mog_battle_hud_ex_process_abort process_abort
  5380.   def process_abort
  5381.       $game_temp.battle_end = true
  5382.       mog_battle_hud_ex_process_abort
  5383.   end  
  5384.   
  5385. end

  5386. #==============================================================================
  5387. # ** Scene Battle
  5388. #==============================================================================
  5389. class Scene_Battle < Scene_Base

  5390.   #--------------------------------------------------------------------------
  5391.   # * Use Item
  5392.   #--------------------------------------------------------------------------      
  5393.   alias mog_monogatari_use_item use_item
  5394.   def use_item
  5395.       execute_face_animation
  5396.       mog_monogatari_use_item
  5397.   end

  5398.   #--------------------------------------------------------------------------
  5399.   # * Execute Face Animation
  5400.   #--------------------------------------------------------------------------  
  5401.   def execute_face_animation
  5402.       return if @subject.is_a?(Game_Enemy)
  5403.       @subject.face_animation = [60 ,2,0]   
  5404.   end
  5405.    
  5406. end

  5407. #==============================================================================
  5408. #==============================================================================
  5409. # ** Battle Hud EX
  5410. #==============================================================================
  5411. #==============================================================================
  5412. class Battle_Hud_EX

  5413.   #--------------------------------------------------------------------------
  5414.   # * Dispose
  5415.   #--------------------------------------------------------------------------  
  5416.   def dispose
  5417.       terminate
  5418.       dispose_layout
  5419.       dispose_layout_2
  5420.       dispose_name
  5421.       dispose_face
  5422.       dispose_hp_number
  5423.       dispose_hp_number_max
  5424.       dispose_hp_meter
  5425.       dispose_hp_icon
  5426.       dispose_hp_icon_ex
  5427.       dispose_hp_icon_number
  5428.       dispose_mp_number
  5429.       dispose_mp_number_max
  5430.       dispose_mp_meter
  5431.       dispose_mp_icon
  5432.       dispose_mp_icon_ex
  5433.       dispose_mp_icon_number
  5434.       dispose_tp_number
  5435.       dispose_tp_number_max
  5436.       dispose_tp_meter
  5437.       dispose_tp_icon
  5438.       dispose_tp_icon_ex
  5439.       dispose_tp_icon_number
  5440.       dispose_at_number
  5441.       dispose_at_number_max
  5442.       dispose_at_meter      
  5443.       dispose_lv_number
  5444.       dispose_states
  5445.   end
  5446.   
  5447.   #--------------------------------------------------------------------------
  5448.   # * Dispose Layout
  5449.   #--------------------------------------------------------------------------  
  5450.   def dispose_layout
  5451.       return if @layout == nil
  5452.       @layout.dispose
  5453.       @layout = nil
  5454.   end
  5455.   
  5456.   #--------------------------------------------------------------------------
  5457.   # * Dispose Layout 2
  5458.   #--------------------------------------------------------------------------  
  5459.   def dispose_layout_2
  5460.       return if @layout2 == nil
  5461.       @layout2.dispose
  5462.       @layout2 = nil
  5463.   end  
  5464.   
  5465.   #--------------------------------------------------------------------------
  5466.   # * Dispose Name
  5467.   #--------------------------------------------------------------------------         
  5468.   def dispose_name
  5469.       return if @name == nil
  5470.       @name.bitmap.dispose
  5471.       @name.dispose
  5472.       @name = nil
  5473.   end  
  5474.   
  5475.   #--------------------------------------------------------------------------
  5476.   # * Dispose Face
  5477.   #--------------------------------------------------------------------------        
  5478.   def dispose_face
  5479.       return if @face == nil      
  5480.       @face.bitmap.dispose if @face.bitmap != nil   
  5481.       @face.dispose
  5482.       @face = nil
  5483.       @face_image.dispose if @face_image != nil
  5484.   end  
  5485.   
  5486.   #--------------------------------------------------------------------------
  5487.   # * Dispose HP Number
  5488.   #--------------------------------------------------------------------------   
  5489.   def dispose_hp_number
  5490.       return if @hp_number == nil
  5491.       @hp_number.bitmap.dispose
  5492.       @hp_number.dispose
  5493.       @hp_number = nil
  5494.   end

  5495.   #--------------------------------------------------------------------------
  5496.   # * Dispose HP Number Max
  5497.   #--------------------------------------------------------------------------   
  5498.   def dispose_hp_number_max
  5499.       return if @hp_number2 == nil
  5500.       @hp_number2.bitmap.dispose
  5501.       @hp_number2.dispose
  5502.       @hp_number2 = nil
  5503.   end   
  5504.   
  5505.   #--------------------------------------------------------------------------
  5506.   # * Dispose HP Meter
  5507.   #--------------------------------------------------------------------------     
  5508.   def dispose_hp_meter
  5509.       return if @hp_meter == nil
  5510.       @hp_meter.bitmap.dispose
  5511.       @hp_meter.dispose
  5512.       @hp_meter = nil
  5513.   end   
  5514.   
  5515.   #--------------------------------------------------------------------------
  5516.   # * Dispose HP Icon
  5517.   #--------------------------------------------------------------------------      
  5518.   def dispose_hp_icon
  5519.       return if @hp_icon == nil
  5520.       @hp_icon.bitmap.dispose if @hp_icon.bitmap != nil
  5521.       @hp_icon.dispose
  5522.       @hp_icon = nil
  5523.   end   
  5524.   
  5525.   #--------------------------------------------------------------------------
  5526.   # * Dispose HP Icon EX
  5527.   #--------------------------------------------------------------------------      
  5528.   def dispose_hp_icon_ex
  5529.       return if @hp_icon3 == nil
  5530.       @hp_icon3.bitmap.dispose
  5531.       @hp_icon3.dispose
  5532.       @hp_icon3 = nil
  5533.   end      
  5534.   
  5535.   #--------------------------------------------------------------------------
  5536.   # * Dispose HP Icon Number
  5537.   #--------------------------------------------------------------------------  
  5538.   def dispose_hp_icon_number
  5539.       return if @hp_icon_number == nil
  5540.       @hp_icon_number.bitmap.dispose
  5541.       @hp_icon_number.dispose
  5542.       @hp_icon_number = nil
  5543.   end   
  5544.   
  5545.   #--------------------------------------------------------------------------
  5546.   # * Dispose MP Number
  5547.   #--------------------------------------------------------------------------   
  5548.   def dispose_mp_number
  5549.       return if @mp_number == nil
  5550.       @mp_number.bitmap.dispose
  5551.       @mp_number.dispose
  5552.       @mp_number = nil
  5553.   end   
  5554.   
  5555.   #--------------------------------------------------------------------------
  5556.   # * Dispose MP Number Max
  5557.   #--------------------------------------------------------------------------   
  5558.   def dispose_mp_number_max
  5559.       return if @mp_number2 == nil
  5560.       @mp_number2.bitmap.dispose
  5561.       @mp_number2.dispose
  5562.       @mp_number2 = nil
  5563.   end   
  5564.   
  5565.   #--------------------------------------------------------------------------
  5566.   # * Dispose MP Meter
  5567.   #--------------------------------------------------------------------------     
  5568.   def dispose_mp_meter
  5569.       return if @mp_meter == nil
  5570.       @mp_meter.bitmap.dispose
  5571.       @mp_meter.dispose
  5572.       @mp_meter = nil
  5573.   end     
  5574.   
  5575.   #--------------------------------------------------------------------------
  5576.   # * Dispose MP Icon
  5577.   #--------------------------------------------------------------------------      
  5578.   def dispose_mp_icon
  5579.       return if @mp_icon == nil
  5580.       @mp_icon.bitmap.dispose if @mp_icon.bitmap != nil
  5581.       @mp_icon.dispose
  5582.       @mp_icon = nil
  5583.   end     
  5584.   
  5585.   #--------------------------------------------------------------------------
  5586.   # * Dispose MP Icon EX
  5587.   #--------------------------------------------------------------------------      
  5588.   def dispose_mp_icon_ex
  5589.       return if @mp_icon3 == nil
  5590.       @mp_icon3.bitmap.dispose
  5591.       @mp_icon3.dispose
  5592.       @mp_icon3 = nil
  5593.   end        
  5594.   
  5595.   #--------------------------------------------------------------------------
  5596.   # * Dispose MP Icon Number
  5597.   #--------------------------------------------------------------------------  
  5598.   def dispose_mp_icon_number
  5599.       return if @mp_icon_number == nil
  5600.       @mp_icon_number.bitmap.dispose
  5601.       @mp_icon_number.dispose
  5602.       @mp_icon_number = nil
  5603.   end   
  5604.    
  5605.   #--------------------------------------------------------------------------
  5606.   # * Dispose TP Number
  5607.   #--------------------------------------------------------------------------   
  5608.   def dispose_tp_number
  5609.       return if @tp_number == nil
  5610.       @tp_number.bitmap.dispose
  5611.       @tp_number.dispose
  5612.       @tp_number = nil
  5613.   end
  5614.   
  5615.   #--------------------------------------------------------------------------
  5616.   # * Dispose TP Number Max
  5617.   #--------------------------------------------------------------------------   
  5618.   def dispose_tp_number_max
  5619.       return if @tp_number2 == nil
  5620.       @tp_number2.bitmap.dispose
  5621.       @tp_number2.dispose
  5622.       @tp_number2 = nil
  5623.   end  
  5624.   
  5625.   #--------------------------------------------------------------------------
  5626.   # * Dispose TP Meter
  5627.   #--------------------------------------------------------------------------     
  5628.   def dispose_tp_meter
  5629.       return if @tp_meter == nil
  5630.       @tp_meter.bitmap.dispose
  5631.       @tp_meter.dispose
  5632.       @tp_meter = nil
  5633.   end     
  5634.   
  5635.   #--------------------------------------------------------------------------
  5636.   # * Dispose TP Icon
  5637.   #--------------------------------------------------------------------------      
  5638.   def dispose_tp_icon
  5639.       return if @tp_icon == nil
  5640.       @tp_icon.bitmap.dispose if @tp_icon.bitmap != nil
  5641.       @tp_icon.dispose
  5642.       @tp_icon = nil
  5643.   end   
  5644.   
  5645.   #--------------------------------------------------------------------------
  5646.   # * Dispose TP Icon EX
  5647.   #--------------------------------------------------------------------------      
  5648.   def dispose_tp_icon_ex
  5649.       return if @tp_icon3 == nil
  5650.       @tp_icon3.bitmap.dispose
  5651.       @tp_icon3.dispose
  5652.       @tp_icon3 = nil
  5653.   end   
  5654.   
  5655.   #--------------------------------------------------------------------------
  5656.   # * Dispose TP Icon Number
  5657.   #--------------------------------------------------------------------------  
  5658.   def dispose_tp_icon_number
  5659.       return if @tp_icon_number == nil
  5660.       @tp_icon_number.bitmap.dispose
  5661.       @tp_icon_number.dispose
  5662.       @tp_icon_numbe = nil
  5663.   end     
  5664.   
  5665.   #--------------------------------------------------------------------------
  5666.   # * Dispose AT Number
  5667.   #--------------------------------------------------------------------------   
  5668.   def dispose_at_number
  5669.       return if @at_number == nil
  5670.       @at_number.bitmap.dispose
  5671.       @at_number.dispose
  5672.       @at_number = nil
  5673.   end

  5674.   #--------------------------------------------------------------------------
  5675.   # * Dispose AT Number Max
  5676.   #--------------------------------------------------------------------------   
  5677.   def dispose_at_number_max
  5678.       return if @at_number2 == nil
  5679.       @at_number2.bitmap.dispose
  5680.       @at_number2.dispose
  5681.       @at_number2 = nil
  5682.   end   
  5683.   
  5684.   #--------------------------------------------------------------------------
  5685.   # * Dispose AT Meter
  5686.   #--------------------------------------------------------------------------     
  5687.   def dispose_at_meter
  5688.       return if @at_meter == nil
  5689.       @at_meter.bitmap.dispose
  5690.       @at_meter.dispose
  5691.       @at_meter = nil
  5692.   end     
  5693.   
  5694.   #--------------------------------------------------------------------------
  5695.   # * Dispose Lv Number
  5696.   #--------------------------------------------------------------------------   
  5697.   def dispose_lv_number
  5698.       return if @lv_number == nil
  5699.       @lv_number.bitmap.dispose
  5700.       @lv_number.dispose
  5701.       @lv_number = nil
  5702.   end
  5703.   
  5704.   #--------------------------------------------------------------------------
  5705.   # * Dispose States
  5706.   #--------------------------------------------------------------------------      
  5707.   def dispose_states
  5708.       return if @status == nil
  5709.       @status.bitmap.dispose if @status.bitmap != nil
  5710.       @status.dispose
  5711.       @actor_status.dispose if @actor_status != nil
  5712.       @status = nil
  5713.   end
  5714.   
  5715. end

  5716. #==============================================================================
  5717. #==============================================================================
  5718. # ** Battle Hud EX
  5719. #==============================================================================
  5720. #==============================================================================
  5721. class Battle_Hud_EX

  5722. #--------------------------------------------------------------------------
  5723. # * Refresh Visible
  5724. #--------------------------------------------------------------------------  
  5725. def refresh_visible(vis)
  5726.      @layout.visible = vis if @layout
  5727.      @layout2.visible = vis if @layout2
  5728.      @name.visible = vis if @name
  5729.      @lv_number.visible = vis if @lv_number
  5730.      @status.visible = vis if @status
  5731.      @face.visible = vis if @face     
  5732.      @hp_number.visible = vis if @hp_number
  5733.      @hp_number2.visible = vis if @hp_number2
  5734.      @hp_meter.visible = vis if @hp_meter
  5735.      @hp_icon.visible = vis if @hp_icon
  5736.      @hp_icon3.visible = vis if @hp_icon3
  5737.      @hp_icon_number.visible = vis if @hp_icon_number     
  5738.      @mp_number.visible = vis if @mp_number
  5739.      @mp_number2.visible = vis if @mp_number2
  5740.      @mp_meter.visible = vis if @mp_meter
  5741.      @mp_icon.visible = vis if @mp_icon
  5742.      @mp_icon3.visible = vis if @mp_icon3
  5743.      @mp_icon_number.visible = vis if @mp_icon_number
  5744.      @tp_number.visible = vis if @tp_number
  5745.      @tp_number2.visible = vis if @tp_number2
  5746.      @tp_meter.visible = vis if @tp_meter
  5747.      @tp_icon.visible = vis if @tp_icon
  5748.      @tp_icon3.visible = vis if @tp_icon3
  5749.      @tp_icon_number.visible = vis if @tp_icon_number      
  5750.      @at_number.visible = vis if @at_number
  5751.      @at_number2.visible = vis if @at_number2
  5752.      @at_meter.visible = vis if @at_meter   
  5753.   end  
  5754.   
  5755.   #--------------------------------------------------------------------------
  5756.   # * Update
  5757.   #--------------------------------------------------------------------------  
  5758.   def update
  5759.       return if @actor == nil
  5760.       @sprite_visible = sprite_visible?
  5761.       @sprite_visitle_wait -= 1 if @sprite_visitle_wait > 0
  5762.       update_layout ; update_layout_2 ; update_name
  5763.       update_face ; update_hp ; update_mp ; update_tp
  5764.       update_at ; update_level ; update_states
  5765.   end
  5766.   
  5767. end

  5768. #==============================================================================
  5769. # ■ Sprite Battler
  5770. #==============================================================================
  5771. class Sprite_Battler < Sprite_Base

  5772.   #--------------------------------------------------------------------------
  5773.   # ● Set AV
  5774.   #--------------------------------------------------------------------------      
  5775.   def set_av(a_viewport)
  5776.       @viewport_cm = a_viewport
  5777.   end
  5778.   
  5779.   #--------------------------------------------------------------------------
  5780.   # ● Dispose
  5781.   #--------------------------------------------------------------------------      
  5782.   alias mog_bc_dispose dispose
  5783.   def dispose
  5784.       mog_bc_dispose
  5785.       @viewport_cm.dispose if @viewport_cm != nil
  5786.   end
  5787.   
  5788.   #--------------------------------------------------------------------------
  5789.   # ● Maker Animation Sprites
  5790.   #--------------------------------------------------------------------------      
  5791.   alias mog_bc_make_animation_sprites make_animation_sprites
  5792.   def make_animation_sprites
  5793.       mog_bc_make_animation_sprites
  5794.       set_cm_viewport if $imported[:mog_battle_camera]
  5795.   end
  5796.   
  5797.   #--------------------------------------------------------------------------
  5798.   # ● Set CM Viewpor
  5799.   #--------------------------------------------------------------------------      
  5800.   def set_cm_viewport
  5801.       return if @viewport_cm == nil
  5802.       return if @ani_sprites == nil
  5803.       if @battler.is_a?(Game_Actor) and SceneManager.face_battler?
  5804.          @ani_sprites.each {|sprite| sprite.viewport = nil; sprite.z = 100}
  5805.          return
  5806.       end
  5807.       @ani_sprites.each {|sprite| sprite.viewport = @viewport_cm; sprite.z = 100}
  5808.   end
  5809.    
  5810. end

  5811. #==============================================================================
  5812. # ■ Game Temp
  5813. #==============================================================================
  5814. class Spriteset_Battle
  5815.   
  5816.   #--------------------------------------------------------------------------
  5817.   # ● Initialize
  5818.   #--------------------------------------------------------------------------      
  5819.   alias mog_bc_sp_initialize initialize
  5820.   def initialize
  5821.       mog_bc_sp_initialize
  5822.       if $imported[:mog_battle_camera] and @viewport_cm != nil
  5823.          battler_sprites.each do |sprite| sprite.set_av(@viewport_cm) end
  5824.       end
  5825.   end

  5826.   #--------------------------------------------------------------------------
  5827.   # ● Create Viewports
  5828.   #--------------------------------------------------------------------------      
  5829.   alias mog_bc_create_viewports create_viewports
  5830.   def create_viewports
  5831.       mog_bc_create_viewports
  5832.       if $imported[:mog_battle_camera]
  5833.          @viewport_cm = Viewport.new
  5834.          @viewport_cm.z = 100
  5835.       end   
  5836.   end
  5837.   
  5838.   #--------------------------------------------------------------------------
  5839.   # ● Dispose Viewports
  5840.   #--------------------------------------------------------------------------      
  5841.   alias mog_bc_dispose_viewports dispose_viewports
  5842.   def dispose_viewports
  5843.       mog_bc_dispose_viewports
  5844.       @viewport_cm.dispose if $imported[:mog_battle_camera] and @viewport_cm != nil
  5845.   end
  5846.   
  5847.   #--------------------------------------------------------------------------
  5848.   # ● Update Viewports
  5849.   #--------------------------------------------------------------------------      
  5850.   alias mog_bcf_update_viewports update_viewports
  5851.   def update_viewports
  5852.       mog_bcf_update_viewports
  5853.       update_viewport_cm if $imported[:mog_battle_camera]
  5854.   end

  5855.   #--------------------------------------------------------------------------
  5856.   # ● Update Viewport CM
  5857.   #--------------------------------------------------------------------------      
  5858.   def update_viewport_cm
  5859.       return if @viewport_cm == nil  
  5860.       @viewport_cm.ox = $game_troop.screen.shake + $game_temp.bc_data[0]
  5861.       @viewport_cm.oy = $game_temp.bc_data[1]
  5862.       @viewport_cm.update
  5863.   end
  5864.    
  5865. end
复制代码






Lv4.逐梦者

梦石
0
星屑
5736
在线时间
784 小时
注册时间
2019-1-20
帖子
196
2
发表于 4 小时前 | 只看该作者
要把颜色那个脚本放在 mog——战斗hugex脚本 之上

提高解答机会的方法:
看一下对应版本的帮助文件 看天气预报说今天不下雨
改变问题为更有可能的或常见的 如:天气自动变化下雨→天气系统 果然不准呀~
使用论坛的搜索功能查找相关问题 好丧啊... ...想看女装
清楚说明实际上你想解决的问题  想看坛友的女装  
脚本自己有改过的地方要标明  不要遮脸的
脚本有问题但不是默认的要全部贴出来 大胆点,尽情发
三包原则:包有BUG,包甩锅,包咕咕
回复

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2025-2-23 19:38

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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