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

Project1

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

[已经过期] 关于特定状态下更改角色战斗图

[复制链接]

Lv3.寻梦者

梦石
0
星屑
1422
在线时间
245 小时
注册时间
2019-1-18
帖子
190
跳转到指定楼层
1
发表于 2019-9-12 17:22:26 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 造小梦 于 2019-9-13 11:10 编辑

如题,我想做一个“变身”技能,使用后赋予角色一个【变身】状态,当角色处于这个状态时战斗图像改变,状态解除后又变回去,这种效果该怎么实现?我不想用战斗事件,太废时间了,求大佬指点。
显示战斗图的脚本如下:
RUBY 代码复制
  1. #==============================================================================
  2. # +++ MOG - Battle Hud EX (v6.6) +++
  3. #==============================================================================
  4. # By Moghunter
  5. # [url]https://atelierrgss.wordpress.com/[/url]
  6. #==============================================================================
  7. #
  8. # Coloque as imagens da hud na pasta.
  9. #
  10. # Graphics/Huds/Battle/
  11. #==============================================================================
  12. # Para ocultar ou apresentar a hud de batalha use o código abaixo.
  13. #
  14. # battle_hud_visible(false)
  15. #
  16. # ou
  17. #
  18. # battle_hud_visible(true)
  19. #
  20. #==============================================================================
  21. # Para mudar o sprite da face do battler use o código abaixo.
  22. #==============================================================================
  23. #
  24. # battler_face_name( ACTOR_ID, FIlE_NAME )
  25. #
  26. #==============================================================================
  27.  
  28. #==============================================================================
  29. # Atualizações desta versão.
  30. #==============================================================================
  31. # (ver 6.6)
  32. #      - Correção do Crash caso optar por desativar o layout das janelas.
  33. # (ver 6.5)
  34. #      - Melhoria no cálculo da posição Z.
  35. #      - Correção de travar o menu.
  36. # (ver 6.4)
  37. #      - Correção do glitch de aparecer um pedaço da Windowskin quando se
  38. #        usa mais de 4 battlers na batalha.
  39. # (ver 6.3)
  40. #      - Compatibilidade com o MOG Battle Camera.
  41. # (ver 6.2)
  42. #     - Refresh da hud ao trocar a posição dos personagens.
  43. # (ver 6.0)
  44. #     - Adição da camada da tela.
  45. #     - Adição do efeito Slide.
  46. #     - Adição de novas opções referente a fonte.
  47. #==============================================================================
  48.  
  49. $imported = {} if $imported.nil?
  50. $imported[:mog_battle_hud_ex] = true
  51.  
  52. module MOG_BATTLE_HUD_EX
  53.  
  54.   #============================================================================
  55.   #============================================================================
  56.   # * HUD SPRITE (GENERAL)
  57.   #============================================================================
  58.   # Definição da quantidade maxima de personagens na batalha.
  59.   #---------------------------------------------------------------------------
  60.   MAX_BATTLE_MEMBERS = 4
  61.   #---------------------------------------------------------------------------
  62.   # Definição da prioridade da hud.
  63.   #---------------------------------------------------------------------------
  64.   HUD_Z = 90
  65.   #---------------------------------------------------------------------------
  66.   # Definição da posição geral da hud, influência em todos os sprites da hud.
  67.   #---------------------------------------------------------------------------
  68.   HUD_POSITION = [8,350]
  69.   #---------------------------------------------------------------------------
  70.   # Definição do espaço entre os membros do grupo.
  71.   # (Use apenas para ajustes)
  72.   #---------------------------------------------------------------------------
  73.   MEMBERS_SPACE = [-50,0]
  74.   #---------------------------------------------------------------------------
  75.   # Definição fixa da hud se deseja posicionar a hud em lugares
  76.   # específicos da tela.
  77.   #
  78.   # FIXED_POSITION[INDEX_ID] = [X,Y]
  79.   #
  80.   #---------------------------------------------------------------------------
  81.   FIXED_HUD_POSITION = []
  82.   #FIXED_HUD_POSITION[0] = [220,300]
  83.   #FIXED_HUD_POSITION[1] = [220 + 26,300 + 28]
  84.   #FIXED_HUD_POSITION[2] = [220 + 26 * 2,300 + 28 * 2]
  85.   #FIXED_HUD_POSITION[3] = [220 + 26 * 3 ,300 +28 * 3]  
  86.  
  87.   #---------------------------------------------------------------------------
  88.   # Definição da posição do comando quando a opção de janelas fixa é ativada.
  89.   #---------------------------------------------------------------------------
  90.   FIXED_COMMAND_POSITION = []
  91.   #FIXED_COMMAND_POSITION[0] = [130,10]
  92.   # FIXED_COMMAND_POSITION[1] = [300,10]
  93.   # FIXED_COMMAND_POSITION[2] = [130,290]
  94.   # FIXED_COMMAND_POSITION[3] = [300,290]
  95.   #---------------------------------------------------------------------------
  96.   # Ocultar a HUD quando a janela de mensagem está ativa.
  97.   #---------------------------------------------------------------------------
  98.   MESSAGE_WINDOW_FADE_HUD = true
  99.   #---------------------------------------------------------------------------
  100.   # Definição da porcentagem do parâmetro baixo, isso influência na cor
  101.   # do número dos parâmetros de HP, MP e TP.
  102.   #---------------------------------------------------------------------------
  103.   LOW_PARAMETER_PERCENTAGE = 30
  104.   #============================================================================
  105.   #============================================================================
  106.  
  107.  
  108.   #============================================================================
  109.   #============================================================================
  110.   # * NAME
  111.   #============================================================================
  112.   # Ativar o Sprite do nome do personagem.
  113.   #---------------------------------------------------------------------------
  114.   NAME_VISIBLE = true
  115.   #---------------------------------------------------------------------------
  116.   # Definição da prioridade do Sprite.
  117.   #---------------------------------------------------------------------------  
  118.   NAME_Z = 5
  119.   #---------------------------------------------------------------------------
  120.   # Definição da posição da Face. [X,Y]
  121.   #---------------------------------------------------------------------------
  122.   NAME_POSITION = [-2,-22]
  123.   #---------------------------------------------------------------------------
  124.   # Definição do tipo alinhamento do nome.
  125.   #
  126.   # 0 - Esquerda
  127.   # 1 - Centro
  128.   # 2 - Direita
  129.   #---------------------------------------------------------------------------  
  130.   NAME_ALIGN_TYPE = 0
  131.   #---------------------------------------------------------------------------
  132.   # Definição do tamanho da fonte.
  133.   #---------------------------------------------------------------------------   
  134.   NAME_FONT_SIZE = 17
  135.   #---------------------------------------------------------------------------
  136.   # Ativar Bold.
  137.   #---------------------------------------------------------------------------   
  138.   NAME_FONT_BOLD = false
  139.   #---------------------------------------------------------------------------
  140.   # Ativar Italic.
  141.   #---------------------------------------------------------------------------   
  142.   NAME_FONT_ITALIC = false
  143.   #---------------------------------------------------------------------------
  144.   # Definição da cor da fonte
  145.   #---------------------------------------------------------------------------     
  146.   NAME_FONT_COLOR = Color.new(255,255,255,255)
  147.   #---------------------------------------------------------------------------
  148.   # Ativar Sombra
  149.   #---------------------------------------------------------------------------  
  150.   NAME_FONT_SHADOW = true
  151.   #---------------------------------------------------------------------------
  152.   # Definição da cor da sombra
  153.   #---------------------------------------------------------------------------   
  154.   NAME_FONT_SHADOW_COLOR = Color.new(0,0,0,255)
  155.   #---------------------------------------------------------------------------
  156.   # Definição da distância da sombra.
  157.   #---------------------------------------------------------------------------   
  158.   NAME_FONT_SHADOW_POSITION = [1,1]  
  159.   #============================================================================
  160.   #============================================================================
  161.  
  162.  
  163.   #============================================================================
  164.   #============================================================================
  165.   # * FACE
  166.   #============================================================================
  167.   # Ativar a face.
  168.   # Será necessário o arquivo.
  169.   #
  170.   # ACTOR_NAME + _Face.png
  171.   #
  172.   # Eric_Face.png
  173.   #
  174.   #---------------------------------------------------------------------------
  175.   FACE_VISIBLE = true
  176.   # Ativar as Faces representando os battlers.
  177.   # Deixe "false" se tiver problemas de compatibilidade com scripts.
  178.   FACE_BATTLER = true
  179.   #---------------------------------------------------------------------------
  180.   # Definição da prioridade do sprite.
  181.   #---------------------------------------------------------------------------  
  182.   FACE_Z = 2
  183.   #---------------------------------------------------------------------------
  184.   # Definição da posição da Face. [X,Y]
  185.   #---------------------------------------------------------------------------
  186.   FACE_POSITION = [25,0]
  187.   #---------------------------------------------------------------------------
  188.   # Ativar faces animadas.
  189.   # Será necessário ter uma imagem de 5 faces do personagem no mesmo arquivo.
  190.   #
  191.   # FACE1/FACE2/FACE3/FACE4
  192.   #
  193.   # A imagem será dividida por 4 frames, no caso de definir a função como FALSE
  194.   # a imagem será dividida por 1 frame
  195.   #---------------------------------------------------------------------------  
  196.   FACE_ANIMATION = false
  197.   #---------------------------------------------------------------------------
  198.   # Ativar o efeito de Zoom quando o personagem usar alguma ação.
  199.   #---------------------------------------------------------------------------
  200.   FACE_ZOOM_ANIMATION = false
  201.   #---------------------------------------------------------------------------
  202.   # Ativar o efeito Mirror na animação de ação do personagem.
  203.   #---------------------------------------------------------------------------
  204.   FACE_ZOOM_MIRROR_EFFECT = false
  205.   #---------------------------------------------------------------------------
  206.   # Definição do tempo duração da animação da face.
  207.   #---------------------------------------------------------------------------  
  208.   FACE_ANIMATION_DURATION = 40
  209.   #---------------------------------------------------------------------------
  210.   # Ativar o efeito tremor da face quando o personagem sofrer dano.
  211.   #---------------------------------------------------------------------------  
  212.   FACE_SHAKE_EFFECT = true
  213.   #============================================================================
  214.   #============================================================================
  215.  
  216.  
  217.   #============================================================================
  218.   #============================================================================
  219.   # * TURN (ACTIVE INDICATOR)
  220.   #============================================================================
  221.   # Ativar o indicador de turno do personagem.
  222.   # Será necessário o arquivo.
  223.   #
  224.   # Turn.png
  225.   #
  226.   #---------------------------------------------------------------------------
  227.   TURN_SPRITE_VISIBLE = true
  228.   #---------------------------------------------------------------------------
  229.   # Definição da prioridade do Sprite.
  230.   #---------------------------------------------------------------------------   
  231.   TURN_SPRITE_Z = 1
  232.   #---------------------------------------------------------------------------
  233.   # Definição da posição do sprite de turno.
  234.   #---------------------------------------------------------------------------  
  235.   TURN_SPRITE_POSITION = [0,0]
  236.   #---------------------------------------------------------------------------  
  237.   # Ativar o efeito de animação de piscar.
  238.   #---------------------------------------------------------------------------  
  239.   TURN_BLINK_EFFECT = true
  240.   #---------------------------------------------------------------------------  
  241.  
  242.  
  243.   #============================================================================
  244.   #============================================================================
  245.   # * HP
  246.   #============================================================================
  247.   # Ativar o número de HP.
  248.   # Será necessário o arquivo.
  249.   #
  250.   # HP_Number.png
  251.   #
  252.   #---------------------------------------------------------------------------
  253.   HP_NUMBER_VISIBLE = true
  254.   #---------------------------------------------------------------------------
  255.   # Definição da prioridade do Sprite.
  256.   #---------------------------------------------------------------------------   
  257.   HP_NUMBER_Z = 5
  258.   #---------------------------------------------------------------------------
  259.   # Definição da posição do número de HP. [X,Y]
  260.   #---------------------------------------------------------------------------  
  261.   HP_NUMBER_POSITION = [115,1]
  262.   #---------------------------------------------------------------------------  
  263.   # Ativar o número de HP Total.
  264.   # Será necessário o arquivo.
  265.   #
  266.   # HP_Number_Max.png
  267.   #
  268.   #---------------------------------------------------------------------------
  269.   HP_NUMBER_MAX_VISIBLE = false
  270.   #---------------------------------------------------------------------------
  271.   # Definição da posição do número de HP Total. [X,Y]
  272.   #---------------------------------------------------------------------------  
  273.   HP_NUMBER_MAX_POSITION = [165,30]
  274.   #---------------------------------------------------------------------------
  275.   # Definição do tipo alinhamento do número.
  276.   #
  277.   # 0 - Esquerda
  278.   # 1 - Centro
  279.   # 2 - Direita
  280.   #---------------------------------------------------------------------------  
  281.   HP_NUMBER_ALIGN_TYPE = 2
  282.   #---------------------------------------------------------------------------
  283.   # Ativa o efeito de alinhar os números em posições de Y diferentes.
  284.   #---------------------------------------------------------------------------
  285.   HP_NUMBER_WAVE_ALIGN_EFFECT = false
  286.   #---------------------------------------------------------------------------
  287.   # Apresentar os números em porcentagem.
  288.   #---------------------------------------------------------------------------   
  289.   HP_NUMBER_PERCENTAGE = false
  290.   #---------------------------------------------------------------------------
  291.   # Ativar números animados ("Rolantes").
  292.   #---------------------------------------------------------------------------  
  293.   HP_NUMBER_ANIMATION = true
  294.   #---------------------------------------------------------------------------
  295.   # Ativar a cor do HP baixo.
  296.   # Será necessário ter a imagem com as duas cores do paramêtro no mesmo
  297.   # arquivo de imagem, a imagem será dividida por 2 frames de altura.
  298.   #
  299.   # NORMAL_COLOR
  300.   # LOW_PARAMETER_COLOR
  301.   #
  302.   # Caso definir a função como FALSE a imagem será dividida apenas como
  303.   # 1 frame de altura.
  304.   #---------------------------------------------------------------------------  
  305.   HP_NUMBER_LOW_COLOR = false
  306.   #---------------------------------------------------------------------------
  307.   # Ativar o medidor de HP.
  308.   # Será necessário o arquivo.
  309.   #
  310.   # HP_Meter.png
  311.   #  
  312.   #---------------------------------------------------------------------------  
  313.   HP_METER_VISIBLE = true
  314.   #---------------------------------------------------------------------------
  315.   # Definição da prioridade do sprite.
  316.   #---------------------------------------------------------------------------   
  317.   HP_METER_Z = 4
  318.   #---------------------------------------------------------------------------
  319.   # Definição da posição do medidor de HP. [X,Y]
  320.   #---------------------------------------------------------------------------  
  321.   HP_METER_POSITION = [34,13]
  322.   #---------------------------------------------------------------------------
  323.   # Definição do ângulo do medidor.
  324.   #---------------------------------------------------------------------------  
  325.   HP_METER_ANGLE = 0
  326.   #---------------------------------------------------------------------------
  327.   # Ativar o efeito mirror, essa opção faz com que o medidor tenha o movimento
  328.   # inverso.
  329.   #---------------------------------------------------------------------------  
  330.   HP_METER_MIRROR_EFFECT = false
  331.   #---------------------------------------------------------------------------
  332.   # Ativar o efeito animado de dano no medidor.
  333.   # Será necessário ter a imagem com as duas cores do paramêtro no mesmo
  334.   # arquivo de imagem, a imagem será dividida por 2 frames de altura.
  335.   #
  336.   # NORMAL_COLOR
  337.   # DAMAGE_COLOR
  338.   #
  339.   # Se definir como FALSE use apenas use uma imagem com o tamanho normal.
  340.   #---------------------------------------------------------------------------  
  341.   HP_METER_REDUCTION_ANIMATION = true
  342.   #---------------------------------------------------------------------------
  343.   # Ativar o efeito animado do "medidor fluindo".
  344.   # Será necessário ter a imagem com a largura 3 vezes maior que o tamanho normal.
  345.   # Essa imagem dever estar em gradiente para ter o efeito "fluindo".
  346.   # Se definir como FALSE use apenas uma imagem com o tamanho normal.
  347.   #---------------------------------------------------------------------------  
  348.   HP_METER_GRADIENT_ANIMATION = true
  349.   #---------------------------------------------------------------------------
  350.   # Ativar HP em ícones.
  351.   # Será necessário ter a imagem.
  352.   #
  353.   # HP_Icon.png
  354.   #
  355.   #---------------------------------------------------------------------------
  356.   HP_ICON_VISIBLE = false
  357.   #---------------------------------------------------------------------------
  358.   # Definição da prioridade do Sprite.
  359.   #---------------------------------------------------------------------------   
  360.   HP_ICON_Z = 1
  361.   #---------------------------------------------------------------------------
  362.   # Posição do ícone de HP.
  363.   #---------------------------------------------------------------------------  
  364.   HP_ICON_POSITION = [60,10]
  365.   #---------------------------------------------------------------------------
  366.   # Ativar o sprite EX do ultimo ícone
  367.   # Será necessário ter a imagem.
  368.   #
  369.   # HP_Icon_EX.png
  370.   #
  371.   #---------------------------------------------------------------------------
  372.   HP_ICON_EX_VISIBLE = false
  373.   #---------------------------------------------------------------------------
  374.   # Posição do ícone Animado.
  375.   #---------------------------------------------------------------------------  
  376.   HP_ICON_EX_POSITION = [0,0]
  377.   #---------------------------------------------------------------------------
  378.   # Ativar o efeito de Zoom do Sprite.
  379.   #---------------------------------------------------------------------------
  380.   HP_ICON_EX_ZOOM_EFFECT = true
  381.   #---------------------------------------------------------------------------
  382.   # Espaço entre os ícones.
  383.   #---------------------------------------------------------------------------   
  384.   HP_ICON_SPACE = [-10,-10]
  385.   #---------------------------------------------------------------------------
  386.   # Definição da quantidade maxima de ícones na horizontal.
  387.   #---------------------------------------------------------------------------  
  388.   HP_ICON_COL_MAX = 10
  389.   #---------------------------------------------------------------------------
  390.   # Definição da quantidade maxima de ícones na vertical.
  391.   #---------------------------------------------------------------------------   
  392.   HP_ICON_ROW_MAX = 2
  393.   #---------------------------------------------------------------------------
  394.   # Ativar o número de HP de ícones.
  395.   # Será necessário ter a imagem.
  396.   #
  397.   # HP_Icon_Number.png
  398.   #
  399.   #---------------------------------------------------------------------------
  400.   HP_ICON_NUMBER_VISIBLE = false
  401.   #---------------------------------------------------------------------------
  402.   # Definição da prioridade do sprite.
  403.   #---------------------------------------------------------------------------
  404.   HP_ICON_NUMBER_Z = 4
  405.   #---------------------------------------------------------------------------
  406.   # Posição do número do ícone
  407.   #---------------------------------------------------------------------------  
  408.   HP_ICON_NUMBER_POSITION = [33,22]
  409.   #---------------------------------------------------------------------------
  410.   # Definição do tipo alinhamento do número.
  411.   #
  412.   # 0 - Esquerda
  413.   # 1 - Centro
  414.   # 2 - Direita
  415.   #---------------------------------------------------------------------------  
  416.   HP_ICON_NUMBER_ALIGN_TYPE = 1  
  417.   #============================================================================
  418.   #============================================================================
  419.  
  420.  
  421.   #============================================================================
  422.   #============================================================================
  423.   # * MP
  424.   #============================================================================
  425.   # Ativar o número de MP.
  426.   # Será necessário o arquivo.
  427.   #
  428.   # MP_Number.png
  429.   #  
  430.   #---------------------------------------------------------------------------  
  431.   MP_NUMBER_VISIBLE = true
  432.   #---------------------------------------------------------------------------
  433.   # Definição da prioridade do Sprite.
  434.   #---------------------------------------------------------------------------   
  435.   MP_NUMBER_Z = 5  
  436.   #---------------------------------------------------------------------------
  437.   # Definição da posição do número de MP. [X,Y]
  438.   #---------------------------------------------------------------------------  
  439.   MP_NUMBER_POSITION = [115,17]
  440.   #---------------------------------------------------------------------------  
  441.   # Ativar o número de MP Total.
  442.   # Será necessário o arquivo.
  443.   #
  444.   # MP_Number_Max.png
  445.   #
  446.   #---------------------------------------------------------------------------
  447.   MP_NUMBER_MAX_VISIBLE = false
  448.   #---------------------------------------------------------------------------
  449.   # Definição da posição do número de MP Total. [X,Y]
  450.   #---------------------------------------------------------------------------  
  451.   MP_NUMBER_MAX_POSITION = [128,53]
  452.   #---------------------------------------------------------------------------
  453.   # Definição do tipo alinhamento do número.
  454.   #
  455.   # 0 - Esquerda
  456.   # 1 - Centro
  457.   # 2 - Direita
  458.   #---------------------------------------------------------------------------  
  459.   MP_NUMBER_ALIGN_TYPE = 2
  460.   #---------------------------------------------------------------------------
  461.   # Ativa o efeito de alinhar os números em posições de Y diferentes.
  462.   #---------------------------------------------------------------------------
  463.   MP_NUMBER_WAVE_ALIGN_EFFECT = false   
  464.   #---------------------------------------------------------------------------
  465.   # Apresentar os números em porcentagem.
  466.   #---------------------------------------------------------------------------   
  467.   MP_NUMBER_PERCENTAGE = false
  468.   #---------------------------------------------------------------------------
  469.   # Ativar números animados ("Rolantes").
  470.   #---------------------------------------------------------------------------  
  471.   MP_NUMBER_ANIMATION = true
  472.   #---------------------------------------------------------------------------
  473.   # Ativar a cor do MP baixo.
  474.   # Será necessário ter a imagem com as duas cores do paramêtro no mesmo
  475.   # arquivo de imagem, a imagem será dividida por 2 frames de altura.
  476.   #
  477.   # NORMAL_COLOR
  478.   # LOW_PARAMETER_COLOR
  479.   #
  480.   # Se definir como FALSE use apenas use uma imagem com o tamanho normal.
  481.   #---------------------------------------------------------------------------  
  482.   MP_NUMBER_LOW_COLOR = false
  483.   #---------------------------------------------------------------------------
  484.   # Ativar o medidor de MP.
  485.   # Será necessário o arquivo.
  486.   #
  487.   # MP_Meter.png
  488.   #   
  489.   #---------------------------------------------------------------------------  
  490.   MP_METER_VISIBLE = true
  491.   #---------------------------------------------------------------------------
  492.   # Definição da prioridade do sprite.
  493.   #---------------------------------------------------------------------------   
  494.   MP_METER_Z = 4  
  495.   #---------------------------------------------------------------------------
  496.   # Definição da posição do medidor de MP. [X,Y]
  497.   #---------------------------------------------------------------------------  
  498.   MP_METER_POSITION = [34,30]
  499.   #---------------------------------------------------------------------------
  500.   # Definição do ângulo do medidor.
  501.   #---------------------------------------------------------------------------  
  502.   MP_METER_ANGLE = 0
  503.   #---------------------------------------------------------------------------
  504.   # Ativar o efeito mirror, essa opção faz com que o medidor tenha o movimento
  505.   # inverso.
  506.   #---------------------------------------------------------------------------  
  507.   MP_METER_MIRROR_EFFECT = false
  508.   #---------------------------------------------------------------------------
  509.   # Ativar o efeito animado de dano no medidor.
  510.   # Será necessário ter a imagem com as duas cores do paramêtro no mesmo
  511.   # arquivo de imagem, a imagem será dividida por 2 frames de altura.
  512.   #
  513.   # NORMAL_COLOR
  514.   # DAMAGE_COLOR
  515.   #
  516.   # Se definir como FALSE use apenas use uma imagem com o tamanho normal.
  517.   #---------------------------------------------------------------------------  
  518.   MP_METER_REDUCTION_ANIMATION = true
  519.   #---------------------------------------------------------------------------
  520.   # Ativar o efeito animado do "medidor fluindo".
  521.   # Será necessário ter a imagem com a largura 3 vezes maior que o tamanho normal.
  522.   # Essa imagem dever estar em gradiente para ter o efeito "fluindo".
  523.   # Se definir como FALSE use apenas uma imagem com o tamanho normal.
  524.   #---------------------------------------------------------------------------  
  525.   MP_METER_GRADIENT_ANIMATION = true
  526.   #---------------------------------------------------------------------------
  527.   # Ativar MP em ícones.
  528.   # Será necessário ter a imagem.
  529.   #
  530.   # MP_Icon.png
  531.   #
  532.   #---------------------------------------------------------------------------
  533.   MP_ICON_VISIBLE = false
  534.   #---------------------------------------------------------------------------
  535.   # Definição da prioridade do Sprite.
  536.   #---------------------------------------------------------------------------   
  537.   MP_ICON_Z = 1  
  538.   #---------------------------------------------------------------------------
  539.   # Posição do ícone de MP.
  540.   #---------------------------------------------------------------------------  
  541.   MP_ICON_POSITION = [92,30]
  542.   #---------------------------------------------------------------------------
  543.   # Ativar o sprite EX do ultimo ícone
  544.   # Será necessário ter a imagem.
  545.   #
  546.   # MP_Icon_EX.png
  547.   #
  548.   #---------------------------------------------------------------------------
  549.   MP_ICON_EX_VISIBLE = false
  550.   #---------------------------------------------------------------------------
  551.   # Posição do ícone Animado.
  552.   #---------------------------------------------------------------------------  
  553.   MP_ICON_EX_POSITION = [0,0]
  554.   #---------------------------------------------------------------------------
  555.   # Ativar o efeito de Zoom do Sprite.
  556.   #---------------------------------------------------------------------------
  557.   MP_ICON_EX_ZOOM_EFFECT = true
  558.   #---------------------------------------------------------------------------
  559.   # Espaço entre os ícones.
  560.   #---------------------------------------------------------------------------   
  561.   MP_ICON_SPACE = [3,3]
  562.   #---------------------------------------------------------------------------
  563.   # Definição da quantidade maxima de ícones na horizontal.
  564.   #---------------------------------------------------------------------------  
  565.   MP_ICON_COL_MAX = 15
  566.   #---------------------------------------------------------------------------
  567.   # Definição da quantidade maxima de ícones na vertical.
  568.   #---------------------------------------------------------------------------   
  569.   MP_ICON_ROW_MAX = 1
  570.   #---------------------------------------------------------------------------
  571.   # Ativar o número de MP de ícones.
  572.   # Será necessário ter a imagem.
  573.   #
  574.   # MP_Icon_Number.png
  575.   #
  576.   #---------------------------------------------------------------------------
  577.   MP_ICON_NUMBER_VISIBLE = false
  578.   #---------------------------------------------------------------------------
  579.   # Definição da prioridade do sprite.
  580.   #---------------------------------------------------------------------------
  581.   MP_ICON_NUMBER_Z = 4
  582.   #---------------------------------------------------------------------------
  583.   # Posição do número do ícone
  584.   #---------------------------------------------------------------------------  
  585.   MP_ICON_NUMBER_POSITION = [75,65]
  586.   #---------------------------------------------------------------------------
  587.   # Definição do tipo alinhamento do número.
  588.   #
  589.   # 0 - Esquerda
  590.   # 1 - Centro
  591.   # 2 - Direita
  592.   #---------------------------------------------------------------------------  
  593.   MP_ICON_NUMBER_ALIGN_TYPE = 1  
  594.   #============================================================================
  595.   #============================================================================
  596.  
  597.  
  598.   #============================================================================
  599.   #============================================================================
  600.   # * TP
  601.   #============================================================================
  602.   # Ativar o número de TP.
  603.   # Será necessário o arquivo.
  604.   #
  605.   # TP_Number.png
  606.   #   
  607.   #---------------------------------------------------------------------------
  608.   TP_NUMBER_VISIBLE = true
  609.   #---------------------------------------------------------------------------
  610.   # Definição da prioridade do sprite.
  611.   #---------------------------------------------------------------------------
  612.   TP_NUMBER_Z = 5  
  613.   #---------------------------------------------------------------------------
  614.   # Definição da posição do número de TP. [X,Y]
  615.   #---------------------------------------------------------------------------  
  616.   TP_NUMBER_POSITION = [115,36]
  617.   #---------------------------------------------------------------------------  
  618.   # Ativar o número de TP Total.
  619.   # Será necessário o arquivo.
  620.   #
  621.   # TP_Number_Max.png
  622.   #
  623.   #---------------------------------------------------------------------------
  624.   TP_NUMBER_MAX_VISIBLE = false
  625.   #---------------------------------------------------------------------------
  626.   # Definição da posição do número de TP Total. [X,Y]
  627.   #---------------------------------------------------------------------------  
  628.   TP_NUMBER_MAX_POSITION = [160,73]
  629.   #---------------------------------------------------------------------------
  630.   # Definição do tipo alinhamento do número.
  631.   #
  632.   # 0 - Esquerda
  633.   # 1 - Centro
  634.   # 2 - Direita
  635.   #---------------------------------------------------------------------------  
  636.   TP_NUMBER_ALIGN_TYPE = 2
  637.   #---------------------------------------------------------------------------
  638.   # Ativa o efeito de alinhar os números em posições de Y diferentes.
  639.   #---------------------------------------------------------------------------
  640.   TP_NUMBER_WAVE_ALIGN_EFFECT = false   
  641.   #---------------------------------------------------------------------------
  642.   # Apresentar os números em porcentagem.
  643.   #---------------------------------------------------------------------------   
  644.   TP_NUMBER_PERCENTAGE = false
  645.   #---------------------------------------------------------------------------
  646.   # Ativar números animados ("Rolantes").
  647.   #---------------------------------------------------------------------------  
  648.   TP_NUMBER_ANIMATION = true
  649.   #---------------------------------------------------------------------------
  650.   # Ativar a cor do TP baixo.
  651.   # Será necessário ter a imagem com as duas cores do paramêtro no mesmo
  652.   # arquivo de imagem, a imagem será dividida por 2 frames de altura.
  653.   #
  654.   # NORMAL_COLOR
  655.   # LOW_PARAMETER_COLOR
  656.   #
  657.   # Se definir como FALSE use apenas use uma imagem com o tamanho normal.
  658.   #---------------------------------------------------------------------------  
  659.   TP_NUMBER_LOW_COLOR = false
  660.   #---------------------------------------------------------------------------
  661.   # Ativar o medidor de TP.
  662.   # Será necessário o arquivo.
  663.   #
  664.   # TP_Meter.png
  665.   #   
  666.   #---------------------------------------------------------------------------  
  667.   TP_METER_VISIBLE = true
  668.   #---------------------------------------------------------------------------
  669.   # Definição da prioridade do sprite.
  670.   #---------------------------------------------------------------------------
  671.   TP_METER_Z = 4  
  672.   #---------------------------------------------------------------------------
  673.   # Definição da posição do medidor de TP. [X,Y]
  674.   #---------------------------------------------------------------------------  
  675.   TP_METER_POSITION = [61,48]
  676.   #---------------------------------------------------------------------------
  677.   # Definição do ângulo do medidor.
  678.   #---------------------------------------------------------------------------  
  679.   TP_METER_ANGLE = 0
  680.   #---------------------------------------------------------------------------
  681.   # Ativar o efeito mirror, essa opção faz com que o medidor tenha o movimento
  682.   # inverso.
  683.   #---------------------------------------------------------------------------  
  684.   TP_METER_MIRROR_EFFECT = false
  685.   #---------------------------------------------------------------------------
  686.   # Ativar o efeito animado de dano no medidor.
  687.   # Será necessário ter a imagem com as duas cores do paramêtro no mesmo
  688.   # arquivo de imagem, a imagem será dividida por 2 frames de altura.
  689.   #
  690.   # NORMAL_COLOR
  691.   # DAMAGE_COLOR
  692.   #
  693.   # Se definir como FALSE use apenas use uma imagem com o tamanho normal.
  694.   #---------------------------------------------------------------------------  
  695.   TP_METER_REDUCTION_ANIMATION = true
  696.   #---------------------------------------------------------------------------
  697.   # Ativar o efeito animado do "medidor fluindo".
  698.   # Será necessário ter a imagem com a largura 3 vezes maior que o tamanho normal.
  699.   # Essa imagem dever estar em gradiente para ter o efeito "fluindo".
  700.   # Se definir como FALSE use apenas uma imagem com o tamanho normal.
  701.   #---------------------------------------------------------------------------  
  702.   TP_METER_GRADIENT_ANIMATION = true
  703.   #---------------------------------------------------------------------------
  704.   # Ativar TP em ícones.
  705.   # Será necessário ter a imagem.
  706.   #
  707.   # TP_Icon.png
  708.   #
  709.   #---------------------------------------------------------------------------
  710.   TP_ICON_VISIBLE = false
  711.   #---------------------------------------------------------------------------
  712.   # Definição da prioridade do sprite.
  713.   #---------------------------------------------------------------------------
  714.   TP_ICON_Z = 1  
  715.   #---------------------------------------------------------------------------
  716.   # Posição do ícone de TP.
  717.   #---------------------------------------------------------------------------  
  718.   TP_ICON_POSITION = [200,128]
  719.   #---------------------------------------------------------------------------
  720.   # Ativar o sprite EX do ultimo ícone
  721.   # Será necessário ter a imagem.
  722.   #
  723.   # TP_Icon_EX.png
  724.   #
  725.   #---------------------------------------------------------------------------
  726.   TP_ICON_EX_VISIBLE = false
  727.   #---------------------------------------------------------------------------
  728.   # Posição do ícone Animado.
  729.   #---------------------------------------------------------------------------  
  730.   TP_ICON_EX_POSITION = [0,0]
  731.   #---------------------------------------------------------------------------
  732.   # Ativar o efeito de Zoom do Sprite.
  733.   #---------------------------------------------------------------------------
  734.   TP_ICON_EX_ZOOM_EFFECT = true
  735.   #---------------------------------------------------------------------------
  736.   # Espaço entre os ícones.
  737.   #---------------------------------------------------------------------------   
  738.   TP_ICON_SPACE = [-10,-10]
  739.   #---------------------------------------------------------------------------
  740.   # Definição da quantidade maxima de ícones na horizontal.
  741.   #---------------------------------------------------------------------------  
  742.   TP_ICON_COL_MAX = 10
  743.   #---------------------------------------------------------------------------
  744.   # Definição da quantidade maxima de ícones na vertical.
  745.   #---------------------------------------------------------------------------   
  746.   TP_ICON_ROW_MAX = 2
  747.   #---------------------------------------------------------------------------
  748.   # Ativar o número de TP de ícones.
  749.   # Será necessário ter a imagem.
  750.   #
  751.   # TP_Icon_Number.png
  752.   #
  753.   #---------------------------------------------------------------------------
  754.   TP_ICON_NUMBER_VISIBLE = false
  755.   #---------------------------------------------------------------------------
  756.   # Definição da prioridade do sprite.
  757.   #---------------------------------------------------------------------------
  758.   TP_ICON_NUMBER_Z = 4
  759.   #---------------------------------------------------------------------------
  760.   # Posição do número do ícone
  761.   #---------------------------------------------------------------------------  
  762.   TP_ICON_NUMBER_POSITION = [0,128]
  763.   #---------------------------------------------------------------------------
  764.   # Definição do tipo alinhamento do número.
  765.   #
  766.   # 0 - Esquerda
  767.   # 1 - Centro
  768.   # 2 - Direita
  769.   #---------------------------------------------------------------------------  
  770.   TP_ICON_NUMBER_ALIGN_TYPE = 0   
  771.   #============================================================================
  772.   #============================================================================
  773.  
  774.   #============================================================================
  775.   #============================================================================
  776.   # * AT
  777.   #============================================================================
  778.   # Ativar o número de AT.
  779.   # Será necessário o arquivo.
  780.   #
  781.   # AT_Number.png
  782.   #
  783.   #---------------------------------------------------------------------------
  784.   AT_NUMBER_VISIBLE = false
  785.   #---------------------------------------------------------------------------
  786.   # Definição da prioridade do Sprite.
  787.   #---------------------------------------------------------------------------   
  788.   AT_NUMBER_Z = 2
  789.   #---------------------------------------------------------------------------
  790.   # Definição da posição do número de AT. [X,Y]
  791.   #---------------------------------------------------------------------------  
  792.   AT_NUMBER_POSITION = [125,-27]
  793.   #---------------------------------------------------------------------------  
  794.   # Ativar o número de AT Total.
  795.   # Será necessário o arquivo.
  796.   #
  797.   # AT_Number_Max.png
  798.   #
  799.   #---------------------------------------------------------------------------
  800.   AT_NUMBER_MAX_VISIBLE = false
  801.   #---------------------------------------------------------------------------
  802.   # Definição da posição do número de AT Total. [X,Y]
  803.   #---------------------------------------------------------------------------  
  804.   AT_NUMBER_MAX_POSITION = [165,-17]
  805.   #---------------------------------------------------------------------------
  806.   # Definição do tipo alinhamento do número.
  807.   #
  808.   # 0 - Esquerda
  809.   # 1 - Centro
  810.   # 2 - Direita
  811.   #---------------------------------------------------------------------------  
  812.   AT_NUMBER_ALIGN_TYPE = 2
  813.   #---------------------------------------------------------------------------
  814.   # Ativa o efeito de alinhar os números em posições de Y diferentes.
  815.   #---------------------------------------------------------------------------
  816.   AT_NUMBER_WAVE_ALIGN_EFFECT = false
  817.   #---------------------------------------------------------------------------
  818.   # Apresentar os números em porcentagem.
  819.   #---------------------------------------------------------------------------   
  820.   AT_NUMBER_PERCENTAGE = false
  821.   #---------------------------------------------------------------------------
  822.   # Ativar números animados ("Rolantes").
  823.   #---------------------------------------------------------------------------  
  824.   AT_NUMBER_ANIMATION = false
  825.   #---------------------------------------------------------------------------
  826.   # Ativar o medidor de AT.
  827.   # Será necessário o arquivo.
  828.   #
  829.   # AT_Meter.png
  830.   #  
  831.   #---------------------------------------------------------------------------  
  832.   AT_METER_VISIBLE = false
  833.   #---------------------------------------------------------------------------
  834.   # Definição da prioridade do sprite.
  835.   #---------------------------------------------------------------------------   
  836.   AT_METER_Z = 1
  837.   #---------------------------------------------------------------------------
  838.   # Definição da posição do medidor de AT. [X,Y]
  839.   #---------------------------------------------------------------------------  
  840.   AT_METER_POSITION = [38,76]
  841.   #---------------------------------------------------------------------------
  842.   # Definição do ângulo do medidor.
  843.   #---------------------------------------------------------------------------  
  844.   AT_METER_ANGLE = 0
  845.   #---------------------------------------------------------------------------
  846.   # Ativar o efeito mirror, essa opção faz com que o medidor tenha o movimento
  847.   # inverso.
  848.   #---------------------------------------------------------------------------  
  849.   AT_METER_MIRROR_EFFECT = false
  850.   #---------------------------------------------------------------------------
  851.   # Ativar o efeito animado do "medidor fluindo".
  852.   # Será necessário ter a imagem com a largura 3 vezes maior que o tamanho normal.
  853.   # Essa imagem dever estar em gradiente para ter o efeito "fluindo".
  854.   # Se definir como FALSE use apenas uma imagem com o tamanho normal.
  855.   #---------------------------------------------------------------------------  
  856.   AT_METER_GRADIENT_ANIMATION = true
  857.   #============================================================================
  858.  
  859.  
  860.   #============================================================================
  861.   #============================================================================
  862.   # * LEVEL
  863.   #============================================================================
  864.   # Ativar o número de Level.
  865.   # Será necessário o arquivo.
  866.   #
  867.   # LV_Number.png
  868.   #   
  869.   #---------------------------------------------------------------------------
  870.   LEVEL_NUMBER_VISIBLE = false
  871.   #---------------------------------------------------------------------------
  872.   # Definição da prioridade do Sprite.
  873.   #---------------------------------------------------------------------------   
  874.   LEVEL_NUMBER_Z = 2
  875.   #---------------------------------------------------------------------------
  876.   # Definição da posição do número do Level. [X,Y]
  877.   #---------------------------------------------------------------------------  
  878.   LEVEL_NUMBER_POSITION = [84,0]
  879.   #---------------------------------------------------------------------------
  880.   # Definição do tipo alinhamento do número.
  881.   #
  882.   # 0 - Esquerda
  883.   # 1 - Centro
  884.   # 2 - Direita
  885.   #---------------------------------------------------------------------------  
  886.   LEVEL_NUMBER_ALIGN_TYPE = 1     
  887.   #============================================================================
  888.   #============================================================================
  889.  
  890.  
  891.   #============================================================================
  892.   #============================================================================
  893.   # * STATE
  894.   #============================================================================
  895.   # Ativar as condições.
  896.   #---------------------------------------------------------------------------  
  897.   STATES_VISIBLE = true
  898.   #---------------------------------------------------------------------------
  899.   # Definição da prioridade do sprite.
  900.   #---------------------------------------------------------------------------   
  901.   STATES_Z = 5
  902.   #---------------------------------------------------------------------------
  903.   # Definição da posição das condições. [X,Y]
  904.   #---------------------------------------------------------------------------  
  905.   STATES_POSITION = [34,36]
  906.   #---------------------------------------------------------------------------
  907.   # Ativar o efeito animado das condições deslizando.
  908.   #---------------------------------------------------------------------------  
  909.   STATES_SCROLLING_ANIMATION = false
  910.   #---------------------------------------------------------------------------
  911.   # Definição do ângulo do sprite.
  912.   #---------------------------------------------------------------------------   
  913.   STATE_ANGLE = 0
  914.   #---------------------------------------------------------------------------
  915.   # Definição das condições que serão ocultadas pela hud.
  916.   # EX - HIDE_STATES_ID = [9,10,12,14]
  917.   #---------------------------------------------------------------------------   
  918.   HIDE_STATES_ID = [9,28,29,52,26,27,28,48,56,57,68,76,77,109,110,111,130,131,132,138,141,154,156,160,161,162,163,164,167]
  919.   #============================================================================
  920.   #============================================================================
  921.  
  922.   #============================================================================
  923.   #============================================================================
  924.   # * SECOND LAYOUT (Overlayer)
  925.   #============================================================================  
  926.   # Ativar a segunda camada de Layout
  927.   # Será necessário o arquivo.
  928.   #
  929.   # Layout_2.png
  930.   #
  931.   #============================================================================  
  932.   SECOND_LAYOUT = true
  933.   #---------------------------------------------------------------------------
  934.   # Definição da prioridade do sprite.
  935.   #---------------------------------------------------------------------------  
  936.   SECOND_LAYOUT_Z = 3
  937.   #---------------------------------------------------------------------------
  938.   # Definição da posição do sprite.
  939.   #---------------------------------------------------------------------------   
  940.   SECOND_LAYOUT_POSITION = [0,0]
  941.   #============================================================================
  942.   #============================================================================
  943.  
  944.   #============================================================================
  945.   #============================================================================
  946.   # * SCREEN LAYOUT
  947.   #============================================================================  
  948.   # Ativar o Layout da tela.
  949.   # Será necessário o arquivo.
  950.   #
  951.   # Layout_Screen.png
  952.   #
  953.   #============================================================================  
  954.   #Ativar o Layout da tela
  955.   SCREEN_LAYOUT = false
  956.   #---------------------------------------------------------------------------
  957.   #Posição do layout
  958.   #---------------------------------------------------------------------------
  959.   SCREEN_LAYOUT_POSITION = [0,0]
  960.   #---------------------------------------------------------------------------
  961.   #Definição da posição Z
  962.   #---------------------------------------------------------------------------
  963.   SCREEN_LAYOUT_Z = -2   
  964.  
  965. end
  966.  
  967. #============================================================================
  968. #============================================================================
  969. # * CUSTOM WINDOWS (GENERAL)
  970. #============================================================================
  971. module MOG_BATTLE_HUD_EX
  972.  
  973. #============================================================================
  974. # * Ativar Janelas Customizadas.
  975. #============================================================================
  976.   ENABLE_CUSTOM_WINDOWS = true
  977.  
  978. #============================================================================
  979. # * BATTLE LOG WINDOW
  980. #============================================================================
  981. #Definição da posição da janela de log.
  982.   BATTLE_LOG_POSITION = [0,0]
  983. #============================================================================
  984.  
  985. #============================================================================
  986. # * FONT SETTING
  987. #============================================================================
  988. #Ativar a configuração da fonte.
  989. ENABLE_WINDOW_FONT_SET = false
  990. #Definição do nome da fonte.
  991. WINDOW_FONT_NAME = nil
  992. #Definição do tamanho da fonte.
  993. WINDOW_FONT_SIZE = 18
  994. #Ativar fonte em bold;
  995. WINDOW_FONT_BOLD = false
  996. #Ativar fonte em itálico.
  997. WINDOW_FONT_ITALIC = false
  998.  
  999. #============================================================================
  1000. # * SKILL WINDOW
  1001. #============================================================================
  1002. #Definição do tamanho da janela.
  1003.   SKILL_WINDOW_SIZE = [Graphics.width, 120]
  1004. #Definição da posição da janela.
  1005.   SKILL_WINDOW_POSITION = [0, 0]
  1006. #Definição da transparência da janela.
  1007.   SKILL_WINDOW_OPACITY = 0
  1008. #Ativar a imagem de Layout. ("Layout_Skill.png")
  1009.   SKILL_WINDOW_LAYOUT = true
  1010. #Definição do layout.
  1011.   SKILL_WINDOW_LAYOUT_POSITION = [0,-7]
  1012. #Definição da quantidade colunas máxima.
  1013.   SKILL_COL_MAX = 2
  1014.   #Ativar a animação de slide.
  1015.   SKILL_WINDOW_SLIDE_EFFECT = false
  1016.   #Definição da posição do slide.
  1017.   SKILL_WINDOW_SLIDE_POSITION = [150,0]   
  1018. #============================================================================
  1019.  
  1020. #============================================================================
  1021. # * ITEM WINDOW
  1022. #============================================================================
  1023. #Definição do tamanho da janela.  
  1024.   ITEM_WINDOW_SIZE = [Graphics.width, 120]
  1025. #Definição da posição da janela.
  1026.   ITEM_WINDOW_POSITION = [0,0]
  1027. #Definição da transparência da janela.
  1028.   ITEM_WINDOW_OPACITY = 0
  1029. #Ativar a imagem de Layout. ("Layout_Item.png")   
  1030.   ITEM_WINDOW_LAYOUT = true
  1031. #Definição do layout.  
  1032.   ITEM_WINDOW_LAYOUT_POSITION = [0,-7]   
  1033. #Definição da quantidade colunas máxima.
  1034.   ITEM_COL_MAX = 2
  1035.   #Ativar a animação de slide.
  1036.   ITEM_WINDOW_SLIDE_EFFECT = false
  1037.   #Definição da posição do slide.
  1038.   ITEM_WINDOW_SLIDE_POSITION = [150,0]  
  1039. #============================================================================
  1040.  
  1041. #============================================================================
  1042. # * COMMAND WINDOW
  1043. #============================================================================
  1044. #Ajustar automáticamente   
  1045.   AUTO_ADJUST_ACTOR_COMMAND = true
  1046. #Definição da posição da janela. (Apenas para Ajustes)
  1047.   ACTOR_COMMAND_POSITION = [-14,-20]
  1048. #Definição da transparência da janela.
  1049.   ACTOR_COMMAND_OPACITY = 0
  1050. #Ativar a imagem de Layout. ("Layout_Command.png")   
  1051.   ACTOR_COMMAND_LAYOUT = true
  1052. #Definição do layout.   
  1053.   ACTOR_COMMAND_LAYOUT_POSITION = [1,-6]
  1054. #============================================================================
  1055.  
  1056. #============================================================================
  1057. # * HELP WINDOW
  1058. #============================================================================
  1059. #Definição do tamanho da janela.   
  1060.   HELP_WINDOW_SIZE = [Graphics.width, 72]
  1061. #Definição do tamanho da janela.
  1062.   HELP_WINDOW_POSITION = [Graphics.width / 2, 0]  
  1063. #Definição da transparência da janela.
  1064.   HELP_WINDOW_OPACITY = 0
  1065. #Ativar a imagem de Layout. ("Layout_Help.png")   
  1066.   HELP_WINDOW_LAYOUT = true
  1067. #Definição do layout.
  1068.   HELP_WINDOW_LAYOUT_POSITION = [0,0]
  1069.   #Ativar a animação de slide.
  1070.   HELP_WINDOW_SLIDE_EFFECT = false
  1071.   #Definição da posição do slide.
  1072.   HELP_WINDOW_SLIDE_POSITION = [0,-150]   
  1073. #============================================================================
  1074.  
  1075. #============================================================================
  1076. # * TARGET ACTOR WINDOW
  1077. #============================================================================
  1078. #Definição do tamanho da janela.   
  1079.   ACTOR_WINDOW_SIZE = [Graphics.width, 120]  
  1080. #Definição do tamanho da janela.
  1081.   ACTOR_WINDOW_POSITION = [Graphics.width / 2, Graphics.height]
  1082. #Definição da transparência da janela.  
  1083.   ACTOR_WINDOW_OPACITY = 0
  1084. #Ativar a imagem de Layout. ("Layout_Target_Actor.png")
  1085.   ACTOR_WINDOW_LAYOUT = true
  1086. #Definição do layout.
  1087.   ACTOR_WINDOW_LAYOUT_POSITION = [0,-7]
  1088.   #Ativar a animação de slide.
  1089.   ACTOR_WINDOW_SLIDE_EFFECT = false
  1090.   #Definição da posição do slide.
  1091.   ACTOR_WINDOW_SLIDE_POSITION = [0,100]      
  1092. #============================================================================
  1093.  
  1094. #============================================================================
  1095. # * TARGET ENEMY WINDOW
  1096. #============================================================================
  1097. #Definição do tamanho da janela.
  1098.   ENEMY_WINDOW_SIZE = [Graphics.width, 120]
  1099. #Definição do tamanho da janela.  
  1100.   ENEMY_WINDOW_POSITION = [Graphics.width / 2, Graphics.height]
  1101. #Definição da transparência da janela.   
  1102.   ENEMY_WINDOW_OPACITY = 0
  1103. #Ativar a imagem de Layout. ("Layout_Target_Actor.png")
  1104.   ENEMY_WINDOW_LAYOUT = true
  1105. #Definição do layout.
  1106.   ENEMY_WINDOW_LAYOUT_POSITION = [0,-7]
  1107.   #Ativar a animação de slide.
  1108.   ENEMY_WINDOW_SLIDE_EFFECT = false
  1109.   #Definição da posição do slide.
  1110.   ENEMY_WINDOW_SLIDE_POSITION = [0,100]   
  1111. #============================================================================
  1112.  
  1113. #============================================================================
  1114. # * PARTY WINDOW (Fight/Escape)
  1115. #============================================================================
  1116. #Definição do tamanho da janela.  
  1117.   PARTY_COMMAND_POSITION = [Graphics.width / 2,Graphics.height / 2]
  1118. #Definição da transparência da janela.   
  1119.   PARTY_COMMAND_OPACITY = 0
  1120. #Ativar a imagem de Layout. ("Layout_Party.png")  
  1121.   PARTY_COMMAND_LAYOUT = true
  1122. #Definição do layout.  
  1123.   PARTY_COMMAND_LAYOUT_POSITION = [-256,-6]
  1124.   #Ativar a animação de slide.
  1125.   PARTY_COMMAND_SLIDE_EFFECT = false
  1126.   #Definição da posição do slide.
  1127.   PARTY_COMMAND_SLIDE_POSITION = [0,-150]      
  1128. #============================================================================
  1129.  
  1130. end
  1131.  
  1132. #==============================================================================
  1133. # ** Cache
  1134. #==============================================================================
  1135. module Cache
  1136.  
  1137.   #--------------------------------------------------------------------------
  1138.   # * Hud
  1139.   #--------------------------------------------------------------------------
  1140.   def self.battle_hud(filename)
  1141.       load_bitmap("Graphics/Huds/Battle/", filename)
  1142.   end
  1143.  
  1144. end
  1145.  
  1146. #==============================================================================
  1147. # ** Game Temp
  1148. #==============================================================================
  1149. class Game_Temp
  1150.  
  1151.   attr_accessor :battler_face_pos
  1152.   attr_accessor :hud_pos
  1153.   attr_accessor :hud_pos_real
  1154.   attr_accessor :com_pos
  1155.   attr_accessor :mbhud_force_refresh
  1156.   attr_accessor :mbhud_window
  1157.   attr_accessor :command_visible
  1158.   attr_accessor :refresh_turn_sprite
  1159.   attr_accessor :battle_hud_visible
  1160.   attr_accessor :battle_hud_visible_refresh
  1161.   attr_accessor :battle_end
  1162.  
  1163.   #--------------------------------------------------------------------------
  1164.   # * Initialize
  1165.   #--------------------------------------------------------------------------   
  1166.   alias mog_monogatari_bhud_initialize initialize
  1167.   def initialize
  1168.       @battler_face_pos = []
  1169.       @hud_pos = []
  1170.       @hud_pos_real = []
  1171.       @com_pos = []
  1172.       @mbhud_force_refresh = false
  1173.       @mbhud_window = [false,false,false,false,false,false,false]
  1174.       @command_visible = false
  1175.       @refresh_turn_sprite = false
  1176.       @battle_hud_visible = true
  1177.       @battle_hud_visible_refresh = [false,false]
  1178.       @battle_end = false      
  1179.       mog_monogatari_bhud_initialize
  1180.   end
  1181.  
  1182.   #--------------------------------------------------------------------------
  1183.   # * Check Screen Xyz
  1184.   #--------------------------------------------------------------------------   
  1185.   def check_screen_xyz_nil
  1186.       return if !SceneManager.face_battler?
  1187.       for actor in $game_party.battle_members
  1188.           actor.screen_x = 0 if actor.screen_x == nil
  1189.           actor.screen_y = 0 if actor.screen_y == nil
  1190.           actor.screen_z = 0 if actor.screen_z == nil
  1191.       end
  1192.   end  
  1193.  
  1194.   #--------------------------------------------------------------------------
  1195.   # ● Sprite Visible
  1196.   #--------------------------------------------------------------------------   
  1197.   def sprite_visible
  1198.       return false if $game_message.visible
  1199.       return false if $game_temp.battle_end
  1200.       return true
  1201.   end  
  1202.  
  1203. end
  1204.  
  1205. #==============================================================================
  1206. # ** Game Interpreter
  1207. #==============================================================================
  1208. class Game_Interpreter
  1209.  
  1210. #--------------------------------------------------------------------------
  1211. # * Refresh Battle Hud
  1212. #--------------------------------------------------------------------------
  1213. def refresh_battle_hud
  1214.      $game_temp.check_screen_xyz_nil rescue nil
  1215.      $game_temp.mbhud_force_refresh = true
  1216. end
  1217.  
  1218. #--------------------------------------------------------------------------
  1219. # * Battler Face Name
  1220. #--------------------------------------------------------------------------
  1221. def battler_face_name(actor_id,face_name = "")
  1222.      for actor in $game_party.members
  1223.          actor.battler_face_name = face_name if actor.id == actor_id
  1224.      end
  1225.      refresh_battle_hud
  1226. end  
  1227.  
  1228. #--------------------------------------------------------------------------
  1229. # * Battler Hud Visible
  1230. #--------------------------------------------------------------------------
  1231. def battle_hud_visible(value)
  1232.      $game_temp.battle_hud_visible = value
  1233. end
  1234.  
  1235. #--------------------------------------------------------------------------
  1236. # * Command_129
  1237. #--------------------------------------------------------------------------
  1238. alias mog_monogatari_bhud_command_129 command_129
  1239. def command_129
  1240.      mog_monogatari_bhud_command_129     
  1241.      refresh_battle_hud if SceneManager.scene_is?(Scene_Battle)
  1242. end
  1243.  
  1244. end
  1245.  
  1246. #==============================================================================
  1247. # ** Game Actor
  1248. #==============================================================================
  1249. class Game_Actor < Game_Battler
  1250.  
  1251.   attr_accessor :face_animation
  1252.   attr_accessor :battler_face_name
  1253.  
  1254.   #--------------------------------------------------------------------------
  1255.   # * Setup
  1256.   #--------------------------------------------------------------------------
  1257.   alias mog_monogatari_face_animation setup
  1258.   def setup(actor_id)
  1259.       mog_monogatari_face_animation(actor_id)
  1260.       @face_animation = [0,0,0]
  1261.       @battler_face_name = "Face_" + actor_id.to_s
  1262.   end   
  1263.  
  1264.   #--------------------------------------------------------------------------
  1265.   # ● Real Next Level
  1266.   #--------------------------------------------------------------------------  
  1267.   def real_next_level
  1268.       next_level_exp - exp_for_level(level)
  1269.   end
  1270.  
  1271.   #--------------------------------------------------------------------------
  1272.   # ● Remain Exp
  1273.   #--------------------------------------------------------------------------  
  1274.   def remain_exp
  1275.       exp - exp_for_level(level)
  1276.   end
  1277.  
  1278.   #--------------------------------------------------------------------------
  1279.   # ● Gain Exp Test
  1280.   #--------------------------------------------------------------------------
  1281.   def gain_exp_test
  1282.       exp_r = rand(next_level_exp)
  1283.       change_exp(self.exp + (exp_r * final_exp_rate).to_i, false)
  1284.   end   
  1285.  
  1286.   #--------------------------------------------------------------------------
  1287.   # ● Low HP?
  1288.   #--------------------------------------------------------------------------   
  1289.   def low_hp?
  1290.       hp <= (mhp * MOG_BATTLE_HUD_EX::LOW_PARAMETER_PERCENTAGE) / 100
  1291.   end
  1292.  
  1293.   #--------------------------------------------------------------------------
  1294.   # ● Low MP?
  1295.   #--------------------------------------------------------------------------   
  1296.   def low_mp?
  1297.       mp <= (mmp * MOG_BATTLE_HUD_EX::LOW_PARAMETER_PERCENTAGE) / 100
  1298.   end  
  1299.  
  1300.   #--------------------------------------------------------------------------
  1301.   # ● Low TP?
  1302.   #--------------------------------------------------------------------------   
  1303.   def low_tp?
  1304.       tp <= (max_tp * MOG_BATTLE_HUD_EX::LOW_PARAMETER_PERCENTAGE) / 100
  1305.   end  
  1306.  
  1307. end
  1308.  
  1309. #==============================================================================
  1310. # ** Game Party
  1311. #==============================================================================
  1312. class Game_Party < Game_Unit
  1313.  
  1314.   #--------------------------------------------------------------------------
  1315.   # * Get Maximum Number of Battle Members
  1316.   #--------------------------------------------------------------------------
  1317.   def max_battle_members
  1318.       return MOG_BATTLE_HUD_EX::MAX_BATTLE_MEMBERS
  1319.   end
  1320.  
  1321. #--------------------------------------------------------------------------
  1322. # * Swap Order
  1323. #--------------------------------------------------------------------------
  1324. alias mog_bhex_swap_order swap_order
  1325. def swap_order(index1, index2)
  1326.      mog_bhex_swap_order(index1, index2)
  1327.      if SceneManager.scene_is?(Scene_Battle)  
  1328.      $game_temp.check_screen_xyz_nil rescue nil
  1329.      $game_temp.mbhud_force_refresh = true     
  1330.      end
  1331. end  
  1332.  
  1333. end
  1334.  
  1335. #==============================================================================
  1336. # ** BattleManager
  1337. #==============================================================================
  1338. module BattleManager
  1339.  
  1340. #--------------------------------------------------------------------------
  1341. # * Current Index
  1342. #--------------------------------------------------------------------------   
  1343. def self.current_index
  1344.      if $imported[:mog_atb_system]
  1345.         return actor.index if actor
  1346.      end   
  1347.      return 0 if @actor_index == nil
  1348.      return @actor_index != -1 ? @actor_index : 0
  1349. end
  1350.  
  1351. #--------------------------------------------------------------------------
  1352. # * Current Index Real
  1353. #--------------------------------------------------------------------------   
  1354. def self.current_index_real
  1355.      return -1 if @actor_index == nil
  1356.      return @actor_index
  1357. end
  1358.  
  1359.   #--------------------------------------------------------------------------
  1360.   # * Next Actor Avaliable
  1361.   #--------------------------------------------------------------------------
  1362.   def self.next_actor_avaliable?
  1363.       return false if @actor_index == nil
  1364.       next_index = @actor_index + 1
  1365.       return false if next_index >= $game_party.members.size
  1366.       return true
  1367.   end
  1368.  
  1369.   #--------------------------------------------------------------------------
  1370.   # * To Next Command Input
  1371.   #--------------------------------------------------------------------------
  1372.   def self.next_command_avaliable
  1373.     aindex = @actor_index
  1374.     begin      
  1375.       if !actor || !actor.next_command
  1376.         return false if actor == nil
  1377.         aindex += 1
  1378.         return false if aindex >= $game_party.members.size
  1379.       end
  1380.     end until actor.inputable?
  1381.     return true
  1382.   end  
  1383.  
  1384.   #--------------------------------------------------------------------------
  1385.   # * Can Enable Window?
  1386.   #--------------------------------------------------------------------------
  1387.   def self.can_enable_window?
  1388.       max_members = $game_party.members.size
  1389.       index_real = current_index_real + 1
  1390.       return false if index_real > max_members
  1391.       return false if in_turn?
  1392.       return false if $imported[:mog_battle_cursor]
  1393.       return true
  1394.   end
  1395.  
  1396. end
  1397.  
  1398. #==============================================================================
  1399. # ** SceneManager
  1400. #==============================================================================
  1401. module SceneManager
  1402.  
  1403.   #--------------------------------------------------------------------------
  1404.   # * Face Battler
  1405.   #--------------------------------------------------------------------------
  1406.   def self.face_battler?
  1407.       return false if !MOG_BATTLE_HUD_EX::FACE_BATTLER
  1408.       return false if !MOG_BATTLE_HUD_EX::FACE_VISIBLE
  1409.       return false if $imported[:mog_sprite_actor]
  1410.       return false if $imported[:ve_animated_battle]
  1411.       return false if $imported[:ve_actor_battlers]
  1412.       return false if $imported["YES-BattleSymphony"]
  1413.       return false if $imported["YEA-VisualBattlers"]
  1414.       return false if $imported["Galv_Animated_Battlers"]
  1415.       return false if $imported['KRX-AnimatedBattlers']
  1416.       return false if $imported[:Theo_BasicFuntions]
  1417.       return false if $sv_camera != nil
  1418.       return false if BattleManager.true_surprise != nil rescue nil
  1419.       return false if $imported[:jet][:AnimatedBattlers] rescue nil      
  1420.       return true
  1421.   end
  1422.  
  1423. end
  1424.  
  1425. #==============================================================================
  1426. # ■ Sprite Picture
  1427. #==============================================================================
  1428. class Sprite_Picture < Sprite
  1429.  
  1430.   #--------------------------------------------------------------------------
  1431.   # * Initialize
  1432.   #--------------------------------------------------------------------------
  1433.   alias mog_battle_hud_initialize initialize
  1434.   def initialize(viewport, picture)
  1435.       mog_battle_hud_initialize(viewport, picture)
  1436.       self.viewport = nil if SceneManager.scene_is?(Scene_Battle)
  1437.  
  1438.   end  
  1439.  
  1440.   #--------------------------------------------------------------------------
  1441.   # * Update Position
  1442.   #--------------------------------------------------------------------------
  1443.   alias mog_battle_hud_update_position update_position
  1444.   def update_position
  1445.       mog_battle_hud_update_position
  1446.       self.z = @picture.number + 120 if SceneManager.scene_is?(Scene_Battle)
  1447.   end
  1448.  
  1449. end
  1450.  
  1451. #==============================================================================
  1452. # ■ Sprite Base
  1453. #==============================================================================
  1454. class Sprite_Base < Sprite
  1455.  
  1456.   #--------------------------------------------------------------------------
  1457.   # * Initialize
  1458.   #--------------------------------------------------------------------------
  1459.   alias mog_bhud_ex_initialize initialize
  1460.   def initialize(viewport = nil)
  1461.       @ani_x = SceneManager.face_battler? ? MOG_BATTLE_HUD_EX::HUD_Z + 20 : 100
  1462.       mog_bhud_ex_initialize(viewport)
  1463.   end  
  1464.  
  1465.   #--------------------------------------------------------------------------
  1466.   # * Animation Set Sprite
  1467.   #--------------------------------------------------------------------------
  1468.   alias mog_battle_hud_ex_animation_set_sprites animation_set_sprites
  1469.   def animation_set_sprites(frame)
  1470.       mog_battle_hud_ex_animation_set_sprites(frame)
  1471.       update_sprite_z_animation rescue nil if SceneManager.scene_is?(Scene_Battle)
  1472.   end  
  1473.  
  1474.   #--------------------------------------------------------------------------
  1475.   # * Update Sprite Z Animation
  1476.   #--------------------------------------------------------------------------
  1477.   def update_sprite_z_animation  
  1478.       if $imported[:mog_battle_camera]
  1479.          @ani_sprites.each_with_index do |sprite, i|
  1480.          sprite.z = @ani_x + i end      
  1481.       else
  1482.          @ani_sprites.each_with_index do |sprite, i|
  1483.          sprite.viewport = nil ; sprite.z = @ani_x + i end
  1484.       end   
  1485.   end  
  1486.  
  1487. end
  1488.  
  1489. #==============================================================================
  1490. # ** Spriteset Battle
  1491. #==============================================================================
  1492. class Spriteset_Battle  
  1493.  
  1494.   #--------------------------------------------------------------------------
  1495.   # * Create Actors
  1496.   #--------------------------------------------------------------------------
  1497.   alias mog_battle_hud_create_actors create_actors
  1498.   def create_actors
  1499.       if can_create_max_members?
  1500.          @actor_sprites = Array.new($game_party.max_battle_members) { Sprite_Battler.new(@viewport1) }
  1501.          return
  1502.       end
  1503.       mog_battle_hud_create_actors
  1504.   end
  1505.  
  1506.   #--------------------------------------------------------------------------
  1507.   # * Can Create Max Members
  1508.   #--------------------------------------------------------------------------
  1509.   def can_create_max_members?
  1510.       return false if $imported[:ve_animated_battle]
  1511.       return false if $imported[:ve_actor_battlers]
  1512.       return false if $sv_camera != nil
  1513.       return true
  1514.   end
  1515.  
  1516. end
  1517.  
  1518. #==============================================================================
  1519. # ■ Scene Battle
  1520. #==============================================================================
  1521. class Scene_Battle < Scene_Base
  1522.  
  1523. #--------------------------------------------------------------------------
  1524. # ● Clear All Windows
  1525. #--------------------------------------------------------------------------
  1526.   alias mog_battle_hud_ex_start start
  1527.   def start
  1528.       setup_battle_hud_ex
  1529.       mog_battle_hud_ex_start
  1530.   end
  1531.  
  1532. #--------------------------------------------------------------------------
  1533. # ● Setup Battle Hud EX
  1534. #--------------------------------------------------------------------------
  1535. def setup_battle_hud_ex
  1536.      @force_clear_duration = 0
  1537. end
  1538.  
  1539. #--------------------------------------------------------------------------
  1540. # ● Clear All Windows
  1541. #--------------------------------------------------------------------------
  1542. def clear_all_windows
  1543.      if @actor_window != nil
  1544.         @actor_window.visible = false
  1545.         @actor_window.active = false
  1546.      end   
  1547.      if @status_window != nil
  1548.         @status_window.visible = false
  1549.         @status_window.active = false
  1550.      end   
  1551.      if @actor_command_window != nil
  1552.         @actor_command_window.visible = false
  1553.         @actor_command_window.active = false
  1554.      end
  1555.      if @party_command_window != nil
  1556.         @party_command_window.visible = false
  1557.         @party_command_window.active = false
  1558.      end
  1559.      if @help_window != nil
  1560.         @help_window.visible = false
  1561.      end  
  1562. end   
  1563.  
  1564. #--------------------------------------------------------------------------
  1565. # ● Update
  1566. #--------------------------------------------------------------------------
  1567.   alias mog_battle_hud_ex_update_main update
  1568.   def update
  1569.       mog_battle_hud_ex_update_main
  1570.       update_battle_hud_ex
  1571.   end
  1572.  
  1573. #--------------------------------------------------------------------------
  1574. # ● Update Battle Hud_ex
  1575. #--------------------------------------------------------------------------
  1576.   def update_battle_hud_ex
  1577.       @status_window.visible = false
  1578.   end
  1579.  
  1580.   if MOG_BATTLE_HUD_EX::ENABLE_CUSTOM_WINDOWS
  1581.   #--------------------------------------------------------------------------
  1582.   # * On Skill OK
  1583.   #--------------------------------------------------------------------------
  1584.   alias mog_battle_hud_ex_on_skill_ok on_skill_ok
  1585.   def on_skill_ok
  1586.       @skill = @skill_window.item
  1587.       @skill_window.hide if @skill.for_opponent? or @skill.for_friend?
  1588.       mog_battle_hud_ex_on_skill_ok
  1589.   end
  1590.  
  1591.   #--------------------------------------------------------------------------
  1592.   # * On Item OK
  1593.   #--------------------------------------------------------------------------
  1594.   alias mog_battle_hud_on_item_ok on_item_ok
  1595.   def on_item_ok
  1596.       @item = @item_window.item
  1597.       @item_window.hide if @item.for_opponent? or @item.for_friend?
  1598.       mog_battle_hud_on_item_ok
  1599.   end     
  1600.  
  1601.   #--------------------------------------------------------------------------
  1602.   # * On Enemy Cancel
  1603.   #--------------------------------------------------------------------------
  1604.   alias mog_battle_hud_ex_on_enemy_cancel on_enemy_cancel
  1605.   def on_enemy_cancel
  1606.       mog_battle_hud_ex_on_enemy_cancel
  1607.       @skill_window.show if @skill_window.active
  1608.       @item_window.show if @item_window.active      
  1609.   end
  1610.  
  1611.   #--------------------------------------------------------------------------
  1612.   # * On Actor Cancel
  1613.   #--------------------------------------------------------------------------
  1614.   alias mog_battle_hud_ex_on_actor_cancel on_actor_cancel
  1615.   def on_actor_cancel
  1616.       mog_battle_hud_ex_on_actor_cancel
  1617.       @skill_window.show if @skill_window.active
  1618.       @item_window.show if @item_window.active
  1619.       mog_battle_hud_ex_on_actor_cancel
  1620.   end  
  1621.   end
  1622.  
  1623. end
  1624.  
  1625. if SceneManager.face_battler?
  1626. #==============================================================================
  1627. # ■ Game_Actor
  1628. #==============================================================================
  1629. class Game_Actor < Game_Battler
  1630.  
  1631.   attr_accessor :screen_x
  1632.   attr_accessor :screen_y
  1633.   attr_accessor :screen_z
  1634.  
  1635.  
  1636. #--------------------------------------------------------------------------
  1637. # ● Use Sprite?
  1638. #--------------------------------------------------------------------------
  1639.   def use_sprite?
  1640.       return true
  1641.   end
  1642.  
  1643. end
  1644.  
  1645. #==============================================================================
  1646. # ■ Sprite_Battler
  1647. #==============================================================================
  1648. class Sprite_Battler < Sprite_Base
  1649.   include MOG_BATTLE_HUD_EX
  1650.  
  1651.   #--------------------------------------------------------------------------
  1652.   # ● Update Collapse
  1653.   #--------------------------------------------------------------------------                          
  1654.    alias mog_battle_hud_update_collapse update_collapse
  1655.    def update_collapse
  1656.        return if face_can_cancel_method?
  1657.        mog_battle_hud_update_collapse
  1658.    end  
  1659.  
  1660.   #--------------------------------------------------------------------------
  1661.   # ● Update Instant Collapse
  1662.   #--------------------------------------------------------------------------                             
  1663.    alias mog_battle_hud_update_instant_collapse update_instant_collapse
  1664.    def update_instant_collapse
  1665.        return if face_can_cancel_method?
  1666.        mog_battle_hud_update_instant_collapse
  1667.    end  
  1668.  
  1669.   #--------------------------------------------------------------------------
  1670.   # ● Face Can Cancel Method
  1671.   #--------------------------------------------------------------------------                                 
  1672.   def face_can_cancel_method?
  1673.       return false if !SceneManager.face_battler?
  1674.       return false if @battler.is_a?(Game_Enemy)
  1675.       self.opacity = 255 ; self.visible = true
  1676.       return true
  1677.   end  
  1678.  
  1679.   #--------------------------------------------------------------------------
  1680.   # ● Update Bitmap
  1681.   #--------------------------------------------------------------------------                                 
  1682.   alias mog_battle_hud_ex_update_bitmap update_bitmap
  1683.   def update_bitmap
  1684.       return if face_can_cancel_method?
  1685.       mog_battle_hud_ex_update_bitmap
  1686.   end  
  1687.  
  1688.   #--------------------------------------------------------------------------
  1689.   # ● Update Position
  1690.   #--------------------------------------------------------------------------                                 
  1691.   alias mog_battle_hud_ex_update_position update_position
  1692.   def update_position
  1693.       if @battler.is_a?(Game_Actor) and SceneManager.face_battler?
  1694.          if !face_sprite_visible? or $game_temp.battle_end
  1695.              self.y = -1000
  1696.              return
  1697.          end
  1698.       end   
  1699.       mog_battle_hud_ex_update_position
  1700.   end  
  1701.  
  1702.   #--------------------------------------------------------------------------
  1703.   # * Sprite Visible
  1704.   #--------------------------------------------------------------------------
  1705.   def face_sprite_visible?
  1706.       return false if $game_message.visible and MESSAGE_WINDOW_FADE_HUD
  1707.       return false if !$game_temp.battle_hud_visible
  1708.       return true
  1709.   end  
  1710.  
  1711. end
  1712.  
  1713. end
  1714.  
  1715. #==============================================================================
  1716. # ** Window_BattleStatus
  1717. #==============================================================================
  1718. class Window_BattleStatus < Window_Selectable
  1719. include MOG_BATTLE_HUD_EX
  1720.  
  1721.   #--------------------------------------------------------------------------
  1722.   # * Get Window Width
  1723.   #--------------------------------------------------------------------------
  1724.   def window_width
  1725.       ACTOR_WINDOW_SIZE[0]
  1726.   end
  1727.  
  1728. #--------------------------------------------------------------------------
  1729. # * Refresh
  1730. #--------------------------------------------------------------------------   
  1731. alias mog_monogatari_refresh refresh
  1732. def refresh
  1733.      mog_monogatari_refresh
  1734.      self.visible = false
  1735.      self.opacity = 0
  1736.      self.contents_opacity = 0
  1737.      self.y = 1200
  1738. end  
  1739.  
  1740. end  
  1741.  
  1742. #==============================================================================
  1743. # ** Window Actor Command
  1744. #==============================================================================
  1745. class Window_ActorCommand < Window_Command
  1746.  
  1747. #--------------------------------------------------------------------------
  1748. # * Update
  1749. #--------------------------------------------------------------------------   
  1750.   alias mog_hud_battle_hud_ex_turn_sprite_update update
  1751.   def update
  1752.       mog_hud_battle_hud_ex_turn_sprite_update
  1753.       $game_temp.command_visible = self.visible
  1754.   end
  1755.  
  1756. end
  1757.  
  1758. #==============================================================================
  1759. # ** Window_BattleActor
  1760. #==============================================================================
  1761. class Window_BattleActor < Window_BattleStatus
  1762.  
  1763.   #--------------------------------------------------------------------------
  1764.   # * Refresh
  1765.   #--------------------------------------------------------------------------
  1766.   alias mog_battle_hud_ex_actor_w_refresh refresh
  1767.   def refresh
  1768.       mog_battle_hud_ex_actor_w_refresh
  1769.       self.contents_opacity = 255
  1770.       self.opacity = 255 if !MOG_BATTLE_HUD_EX::ENABLE_CUSTOM_WINDOWS
  1771.       self.visible = true
  1772.   end
  1773.  
  1774. end  
  1775.  
  1776. if MOG_BATTLE_HUD_EX::ENABLE_CUSTOM_WINDOWS
  1777.  
  1778. #==============================================================================
  1779. # ** Window BattleLog
  1780. #==============================================================================
  1781. class Window_BattleLog < Window_Selectable
  1782.  
  1783.   include MOG_BATTLE_HUD_EX
  1784.  
  1785. #--------------------------------------------------------------------------
  1786. # * Initialize
  1787. #--------------------------------------------------------------------------   
  1788.   alias mog_battle_hud_ex_log_initialize initialize
  1789.   def initialize
  1790.       mog_battle_hud_ex_log_initialize
  1791.       self.x = BATTLE_LOG_POSITION[0]
  1792.       self.y = BATTLE_LOG_POSITION[1]
  1793.       self.z = MOG_BATTLE_HUD_EX::HUD_Z + 140
  1794.   end
  1795.  
  1796. #--------------------------------------------------------------------------
  1797. # * Create Back Sprite
  1798. #--------------------------------------------------------------------------   
  1799.   alias mog_battle_hud_ex_log_create_back_sprite create_back_sprite
  1800.   def create_back_sprite
  1801.       self.x = BATTLE_LOG_POSITION[0]
  1802.       self.y = BATTLE_LOG_POSITION[1]
  1803.       self.z = MOG_BATTLE_HUD_EX::HUD_Z + 140
  1804.       mog_battle_hud_ex_log_create_back_sprite
  1805.   end
  1806.  
  1807. end  
  1808.  
  1809. #==============================================================================
  1810. # ** Window Actor Command
  1811. #==============================================================================
  1812. class Window_ActorCommand < Window_Command
  1813.  
  1814.   include MOG_BATTLE_HUD_EX
  1815.  
  1816. #--------------------------------------------------------------------------
  1817. # * Initialize
  1818. #--------------------------------------------------------------------------   
  1819. alias mog_monogatari_initialize initialize
  1820. def initialize
  1821.      mog_monogatari_initialize
  1822.      create_layout if $imported[:mog_battle_command_ex] == nil
  1823. end
  1824.  
  1825. #--------------------------------------------------------------------------
  1826. # * Dispose
  1827. #--------------------------------------------------------------------------
  1828. alias mog_monogatari_actor_command_dispose dispose
  1829. def dispose
  1830.      mog_monogatari_actor_command_dispose
  1831.      dispose_layout
  1832. end
  1833.  
  1834. #--------------------------------------------------------------------------
  1835. # * Create Layout
  1836. #--------------------------------------------------------------------------   
  1837. def create_layout
  1838.      return if @layout != nil
  1839.      return if !ACTOR_COMMAND_LAYOUT
  1840.      return if $game_temp.mbhud_window[0]
  1841.      self.z = MOG_BATTLE_HUD_EX::HUD_Z + 150
  1842.      $game_temp.mbhud_window[0] = true
  1843.      @layout = Sprite.new
  1844.      @layout.bitmap = Cache.battle_hud("Layout_Command")
  1845.      @layout.z = self.z - 1
  1846.      @layout.x = self.x + ACTOR_COMMAND_LAYOUT_POSITION[0]
  1847.      @layout.y = self.y + ACTOR_COMMAND_LAYOUT_POSITION[1]
  1848.      @layout.visible = false
  1849. end
  1850.  
  1851. #--------------------------------------------------------------------------
  1852. # * Dispose Layout
  1853. #--------------------------------------------------------------------------
  1854. def dispose_layout
  1855.      return if @layout == nil
  1856.      @layout.dispose
  1857.      @layout = nil
  1858. end
  1859.  
  1860. #--------------------------------------------------------------------------
  1861. # * Refresh Layout
  1862. #--------------------------------------------------------------------------
  1863. def refresh_layout
  1864.      return if @layout == nil
  1865.      @layout.x = self.x + ACTOR_COMMAND_LAYOUT_POSITION[0]
  1866.      @layout.y = self.y + ACTOR_COMMAND_LAYOUT_POSITION[1]
  1867.      @layout.visible = self.visible
  1868.      @layout.z = self.z - 1
  1869. end
  1870.  
  1871. #--------------------------------------------------------------------------
  1872. # * Select
  1873. #--------------------------------------------------------------------------  
  1874. alias mog_monogatari_select_actor_command select
  1875. def select(index)
  1876.      mog_monogatari_select_actor_command(index)
  1877.      set_command_position if $imported[:mog_battle_command_ex] == nil
  1878. end   
  1879.  
  1880. #--------------------------------------------------------------------------
  1881. # * Set Command Position
  1882. #--------------------------------------------------------------------------   
  1883. def set_command_position
  1884.      self.viewport = nil
  1885.      self.opacity = ACTOR_COMMAND_OPACITY
  1886.      battler_index = BattleManager.current_index rescue nil
  1887.      battler_index = 0 if battler_index == nil     
  1888.      if @actor != nil and $game_temp.hud_pos[battler_index] != nil
  1889.         if FIXED_COMMAND_POSITION[battler_index] != nil
  1890.            self.x = FIXED_COMMAND_POSITION[battler_index][0]
  1891.            self.y = FIXED_COMMAND_POSITION[battler_index][1]              
  1892.         else  
  1893.            self.x = ACTOR_COMMAND_POSITION[0] + $game_temp.hud_pos[battler_index][0] - (self.width / 2)
  1894.            self.x = Graphics.width - self.width if self.x + self.width > Graphics.width
  1895.            self.x = 0 if self.x < 0
  1896.            self.y = ACTOR_COMMAND_POSITION[1] + $game_temp.hud_pos[battler_index][1] - self.height
  1897.         end   
  1898.      end      
  1899.      refresh_layout
  1900. end  
  1901.  
  1902. #--------------------------------------------------------------------------
  1903. # * Refresh
  1904. #--------------------------------------------------------------------------   
  1905. alias mog_battle_hud_ex_refresh refresh
  1906. def refresh
  1907.      mog_battle_hud_ex_refresh
  1908.      $game_temp.refresh_turn_sprite = true if $imported[:mog_battle_command_ex] == nil
  1909. end
  1910.  
  1911. #--------------------------------------------------------------------------
  1912. # * Update
  1913. #--------------------------------------------------------------------------  
  1914. alias mog_monogatari_actor_commnand_update update
  1915. def update     
  1916.      mog_monogatari_actor_commnand_update
  1917.      if $imported[:mog_battle_command_ex] == nil
  1918.      self.visible = self.active
  1919.      if !@layout.nil?
  1920.         refresh_layout if @layout.visible != self.visible
  1921.         @layout.visible = false if !$game_temp.sprite_visible
  1922.      end        
  1923.      self.visible = false if !$game_temp.sprite_visible     
  1924.      end
  1925. end
  1926.  
  1927. end
  1928.  
  1929. #==============================================================================
  1930. # ** Window_PartyCommand
  1931. #==============================================================================
  1932. class Window_PartyCommand < Window_Command
  1933.  
  1934.   include MOG_BATTLE_HUD_EX
  1935.  
  1936. #--------------------------------------------------------------------------
  1937. # * Initialize
  1938. #--------------------------------------------------------------------------   
  1939.   alias mog_monogatari_party_initialize initialize
  1940.   def initialize
  1941.       mog_monogatari_party_initialize
  1942.     #  self.x = @org_position[0] ; self.y = @org_position[1]
  1943.     #  self.opacity = PARTY_COMMAND_OPACITY   
  1944.       create_layout
  1945.   end
  1946.  
  1947. #--------------------------------------------------------------------------
  1948. # * Dispose
  1949. #--------------------------------------------------------------------------
  1950. alias mog_monogatari_party_window_dispose dispose
  1951. def dispose
  1952.      mog_monogatari_party_window_dispose
  1953.      dispose_layout
  1954. end
  1955.  
  1956. #--------------------------------------------------------------------------
  1957. # * Create Layout
  1958. #--------------------------------------------------------------------------   
  1959. def create_layout
  1960.      return if @layout != nil
  1961.      return if !PARTY_COMMAND_LAYOUT
  1962.      return if $game_temp.mbhud_window[1]
  1963.      self.z = MOG_BATTLE_HUD_EX::HUD_Z + 150
  1964.      $game_temp.mbhud_window[1] = true
  1965.      @org_position_2 = [@org_position[0] + PARTY_COMMAND_LAYOUT_POSITION[0],@org_position[1] + PARTY_COMMAND_LAYOUT_POSITION[1]]
  1966.      @layout = Sprite.new
  1967.      @layout.bitmap = Cache.battle_hud("Layout_Party")
  1968.      @layout.z = self.z - 1
  1969.      refresh_layout
  1970.      @layout.visible = false
  1971. end
  1972.  
  1973. #--------------------------------------------------------------------------
  1974. # * Dispose Layout
  1975. #--------------------------------------------------------------------------
  1976. def dispose_layout
  1977.      return if @layout == nil
  1978.      @layout.dispose
  1979.      @layout = nil
  1980. end
  1981.  
  1982. #--------------------------------------------------------------------------
  1983. # * Refresh Layout
  1984. #--------------------------------------------------------------------------
  1985. def refresh_layout
  1986.      return if @layout == nil
  1987.      @layout.x = @org_position_2[0]
  1988.      @layout.y = @org_position_2[1]
  1989.      @layout.x += PARTY_COMMAND_SLIDE_POSITION[0] if PARTY_COMMAND_SLIDE_EFFECT
  1990.      @layout.y += PARTY_COMMAND_SLIDE_POSITION[1] if PARTY_COMMAND_SLIDE_EFFECT
  1991.      @layout.visible = self.visible
  1992. end         
  1993.  
  1994. #--------------------------------------------------------------------------
  1995. # * Select
  1996. #--------------------------------------------------------------------------  
  1997. alias mog_monogatari_refresh_partycommand refresh
  1998. def refresh
  1999.      if @org_position == nil
  2000.       @org_position = [PARTY_COMMAND_POSITION[0] - (self.width / 2),
  2001.                        PARTY_COMMAND_POSITION[1] - (self.height / 2)]  
  2002.      end                  
  2003.      mog_monogatari_refresh_partycommand
  2004.  
  2005.       self.viewport = nil      
  2006.       self.x = @org_position[0] ; self.y = @org_position[1]
  2007.       if PARTY_COMMAND_SLIDE_EFFECT
  2008.          self.x += PARTY_COMMAND_SLIDE_POSITION[0]
  2009.          self.y += PARTY_COMMAND_SLIDE_POSITION[1]
  2010.  
  2011.       end
  2012.       self.opacity = PARTY_COMMAND_OPACITY     
  2013. end   
  2014.  
  2015. def show
  2016.  
  2017. end
  2018.  
  2019. #--------------------------------------------------------------------------
  2020. # * Show
  2021. #--------------------------------------------------------------------------   
  2022.   alias mog_bg_ex_slide_show_party show
  2023.   def show
  2024.       self.viewport = nil
  2025.       self.x = @org_position[0] ; self.y = @org_position[1]
  2026.       if PARTY_COMMAND_SLIDE_EFFECT
  2027.          self.x += PARTY_COMMAND_SLIDE_POSITION[0]
  2028.          self.y += PARTY_COMMAND_SLIDE_POSITION[1]
  2029.  
  2030.       end
  2031.       self.opacity = PARTY_COMMAND_OPACITY
  2032.       mog_bg_ex_slide_show_party
  2033.   end
  2034.  
  2035. #--------------------------------------------------------------------------
  2036. # * Update
  2037. #--------------------------------------------------------------------------  
  2038. alias mog_monogatari_party_window_update update
  2039. def update
  2040.      mog_monogatari_party_window_update  
  2041.      self.visible = self.active
  2042.      if @layout != nil and @layout.visible != self.visible        
  2043.         refresh_layout
  2044.      end
  2045.      execute_slide_effect if self.visible
  2046. end   
  2047.  
  2048. end
  2049.  
  2050. #==============================================================================
  2051. # ** Window_Help
  2052. #==============================================================================
  2053. class Window_Help < Window_Base
  2054.  
  2055.   include MOG_BATTLE_HUD_EX
  2056.  
  2057.   #--------------------------------------------------------------------------
  2058.   # * Object Initialization
  2059.   #--------------------------------------------------------------------------
  2060.   alias mog_monogatari_battle_help_initialize initialize
  2061.   def initialize(line_number = 2)
  2062.       @battle_phase = false
  2063.       mog_monogatari_battle_help_initialize(line_number)
  2064.       @wait_time = 5
  2065.       if SceneManager.scene_is?(Scene_Battle)
  2066.          @battle_phase = true         
  2067.          self.width = HELP_WINDOW_SIZE[0]
  2068.          self.height = HELP_WINDOW_SIZE[1]      
  2069.          @org_position = [HELP_WINDOW_POSITION[0] - (self.width / 2),
  2070.                           HELP_WINDOW_POSITION[1]]         
  2071.          self.x = @org_position[0]
  2072.          self.y = @org_position[1]  
  2073.          self.opacity = HELP_WINDOW_OPACITY
  2074.          self.z = MOG_BATTLE_HUD_EX::HUD_Z + 150
  2075.          create_layout
  2076.       end     
  2077. end
  2078.  
  2079. #--------------------------------------------------------------------------
  2080. # * Dispose
  2081. #--------------------------------------------------------------------------
  2082. alias mog_monogatari_help_window_dispose dispose
  2083. def dispose
  2084.      mog_monogatari_help_window_dispose
  2085.      dispose_layout
  2086. end
  2087.  
  2088. #--------------------------------------------------------------------------
  2089. # * Create Layout
  2090. #--------------------------------------------------------------------------   
  2091. def create_layout
  2092.      return if @layout != nil
  2093.      return if !HELP_WINDOW_LAYOUT
  2094.      return if $game_temp.mbhud_window[2]
  2095.      return if !SceneManager.scene_is?(Scene_Battle)
  2096.      $game_temp.mbhud_window[2] = true
  2097.      @org_position_2 = [self.x + HELP_WINDOW_LAYOUT_POSITION[0],self.y + HELP_WINDOW_LAYOUT_POSITION[1]]
  2098.      @layout = Sprite.new
  2099.      @layout.bitmap = Cache.battle_hud("Layout_Help")
  2100.      @layout.z = self.z - 1
  2101.      refresh_layout
  2102.      @layout.visible = false
  2103. end
  2104.  
  2105. #--------------------------------------------------------------------------
  2106. # * Dispose Layout
  2107. #--------------------------------------------------------------------------
  2108. def dispose_layout
  2109.      return if @layout == nil
  2110.      @layout.dispose
  2111.      @layout = nil
  2112. end
  2113.  
  2114. #--------------------------------------------------------------------------
  2115. # * Refresh Layout
  2116. #--------------------------------------------------------------------------
  2117. def refresh_layout
  2118.      return if @layout == nil
  2119.      @layout.x = @org_position_2[0]
  2120.      @layout.y = @org_position_2[1]
  2121.      @layout.x += HELP_WINDOW_SLIDE_POSITION[0] if HELP_WINDOW_SLIDE_EFFECT
  2122.      @layout.y += HELP_WINDOW_SLIDE_POSITION[1] if HELP_WINDOW_SLIDE_EFFECT
  2123.      @layout.visible = self.visible  
  2124. end   
  2125.  
  2126. #--------------------------------------------------------------------------
  2127. # * Show
  2128. #--------------------------------------------------------------------------   
  2129.   alias mog_bg_ex_slide_show_help show
  2130.   def show
  2131.       if @battle_phase
  2132.       self.viewport = nil
  2133.       self.x = @org_position[0] ; self.y = @org_position[1]
  2134.       if HELP_WINDOW_SLIDE_EFFECT
  2135.          self.x += HELP_WINDOW_SLIDE_POSITION[0]
  2136.          self.y += HELP_WINDOW_SLIDE_POSITION[1]
  2137.       end
  2138.       self.opacity = HELP_WINDOW_OPACITY
  2139.       end
  2140.       mog_bg_ex_slide_show_help
  2141.   end  
  2142.  
  2143. #--------------------------------------------------------------------------
  2144. # * Update
  2145. #--------------------------------------------------------------------------  
  2146. alias mog_monogatari_help_window_update update
  2147. def update
  2148.      if @wait_time > 0
  2149.         @wait_time -= 1
  2150.         return
  2151.      end   
  2152.      mog_monogatari_help_window_update
  2153.      if SceneManager.scene_is?(Scene_Battle)
  2154.         if @layout != nil           
  2155.            refresh_layout if @layout.visible != self.visible
  2156.            @layout.visible = self.visible
  2157.         end
  2158.         self.visible = false if !$game_temp.sprite_visible
  2159.         execute_slide_effect if self.visible        
  2160.      end
  2161. end   
  2162.  
  2163. end
  2164.  
  2165. #==============================================================================
  2166. # ** Window_BattleActor
  2167. #==============================================================================
  2168. class Window_BattleActor < Window_BattleStatus
  2169.  
  2170.   include MOG_BATTLE_HUD_EX
  2171.  
  2172.   #--------------------------------------------------------------------------
  2173.   # * Initialize
  2174.   #--------------------------------------------------------------------------   
  2175.   alias mog_monogatari_battle_actor_initialize initialize
  2176.   def initialize(info_viewport)
  2177.       @force_hide = can_force_hide?
  2178.       mog_monogatari_battle_actor_initialize(info_viewport)
  2179.       self.width = ACTOR_WINDOW_SIZE[0]
  2180.       self.height = ACTOR_WINDOW_SIZE[1]
  2181.       @org_position = [ACTOR_WINDOW_POSITION[0] - (self.width / 2),
  2182.                        ACTOR_WINDOW_POSITION[1] - self.height]
  2183.       @org_position[1] = Graphics.height + 64 if @force_hide
  2184.       self.x = @org_position[0]
  2185.       self.y = @org_position[1]
  2186.       self.opacity = ACTOR_WINDOW_OPACITY
  2187.       self.z = MOG_BATTLE_HUD_EX::HUD_Z + 151
  2188.       self.viewport = nil
  2189.       create_layout
  2190.   end
  2191.  
  2192.   #--------------------------------------------------------------------------
  2193.   # * Can Force Hide?
  2194.   #--------------------------------------------------------------------------   
  2195.   def can_force_hide?
  2196.       return true if $imported[:ve_target_arrow]
  2197.       return true if $imported[:mog_battle_cursor]
  2198.       return false
  2199.   end
  2200.  
  2201. #--------------------------------------------------------------------------
  2202. # * Dispose
  2203. #--------------------------------------------------------------------------
  2204. alias mog_monogatari_actor_window_dispose dispose
  2205. def dispose
  2206.      mog_monogatari_actor_window_dispose
  2207.      dispose_layout
  2208. end
  2209.  
  2210. #--------------------------------------------------------------------------
  2211. # * Create Layout
  2212. #--------------------------------------------------------------------------   
  2213. def create_layout
  2214.      return if @layout != nil
  2215.      return if !ACTOR_WINDOW_LAYOUT
  2216.      return if $game_temp.mbhud_window[3]
  2217.      $game_temp.mbhud_window[3] = true
  2218.      @org_position_2 = [self.x + ACTOR_WINDOW_LAYOUT_POSITION[0],self.y + ACTOR_WINDOW_LAYOUT_POSITION[1]]
  2219.      @layout = Sprite.new
  2220.      @layout.bitmap = Cache.battle_hud("Layout_Target_Actor")
  2221.      @layout.z = self.z - 1
  2222.      refresh_layout
  2223.      @layout.visible = false
  2224. end
  2225.  
  2226. #--------------------------------------------------------------------------
  2227. # * Dispose Layout
  2228. #--------------------------------------------------------------------------
  2229. def dispose_layout
  2230.      return if @layout == nil
  2231.      @layout.dispose
  2232.      @layout = nil
  2233. end
  2234.  
  2235. #--------------------------------------------------------------------------
  2236. # * Refresh Layout
  2237. #--------------------------------------------------------------------------
  2238. def refresh_layout
  2239.      return if @layout == nil
  2240.      @layout.x = @org_position_2[0]
  2241.      @layout.y = @org_position_2[1]
  2242.      @layout.x += ACTOR_WINDOW_SLIDE_POSITION[0] if ACTOR_WINDOW_SLIDE_EFFECT
  2243.      @layout.y += ACTOR_WINDOW_SLIDE_POSITION[1] if ACTOR_WINDOW_SLIDE_EFFECT
  2244.      @layout.visible = self.visible
  2245. end     
  2246.  
  2247.   if $imported[:ve_target_arrow]
  2248.   #--------------------------------------------------------------------------
  2249.   # * New method: show_actor
  2250.   #--------------------------------------------------------------------------
  2251.   alias mog_battle_hud_ex_show_actor show_actor
  2252.   def show_actor
  2253.       return true if SceneManager.face_battler?
  2254.       mog_battle_hud_ex_show_actor
  2255.   end
  2256.   end
  2257.  
  2258. #--------------------------------------------------------------------------
  2259. # * Show
  2260. #--------------------------------------------------------------------------   
  2261.   alias mog_bg_ex_slide_show_actor show
  2262.   def show
  2263.       self.viewport = nil
  2264.       self.x = @org_position[0] ; self.y = @org_position[1]
  2265.       if ACTOR_WINDOW_SLIDE_EFFECT
  2266.          self.x += ACTOR_WINDOW_SLIDE_POSITION[0]
  2267.          self.y += ACTOR_WINDOW_SLIDE_POSITION[1]
  2268.       end
  2269.       self.opacity = ACTOR_WINDOW_OPACITY
  2270.       mog_bg_ex_slide_show_actor
  2271.   end  
  2272.  
  2273. #--------------------------------------------------------------------------
  2274. # * Update
  2275. #--------------------------------------------------------------------------  
  2276. alias mog_monogatari_actor_window_update update
  2277. def update
  2278.      mog_monogatari_actor_window_update   
  2279.      self.visible = self.active
  2280.      self.visible = false if @force_hide
  2281.      if @layout != nil        
  2282.         refresh_layout if @layout.visible != self.visible        
  2283.      end
  2284.      if !$game_temp.sprite_visible   
  2285.         self.visible = false
  2286.         @layout.visible = self.visible if @layout != nil
  2287.      end   
  2288.      execute_slide_effect if self.visible
  2289.   end  
  2290.  
  2291. end
  2292.  
  2293. #==============================================================================
  2294. # ** Window_BattleEnemy
  2295. #==============================================================================
  2296. class Window_BattleEnemy < Window_Selectable
  2297.  
  2298.   include MOG_BATTLE_HUD_EX
  2299.  
  2300.   #--------------------------------------------------------------------------
  2301.   # * Initialize
  2302.   #--------------------------------------------------------------------------   
  2303.   alias mog_monogatari_battle_enemy_initialize initialize
  2304.   def initialize(info_viewport)
  2305.       @force_hide = can_force_hide?
  2306.       mog_monogatari_battle_enemy_initialize(info_viewport)
  2307.       self.width = ENEMY_WINDOW_SIZE[0]
  2308.       self.height = ENEMY_WINDOW_SIZE[1]      
  2309.       @org_position = [ENEMY_WINDOW_POSITION[0] - (self.width / 2),
  2310.                        ENEMY_WINDOW_POSITION[1] - self.height]
  2311.       @org_position[1] = Graphics.height + 64 if @force_hide               
  2312.       self.x = @org_position[0]
  2313.       self.y = @org_position[1]      
  2314.       self.opacity = ENEMY_WINDOW_OPACITY
  2315.       self.z = MOG_BATTLE_HUD_EX::HUD_Z + 151
  2316.       create_layout
  2317.   end  
  2318.  
  2319.   #--------------------------------------------------------------------------
  2320.   # * Can Force Hide?
  2321.   #--------------------------------------------------------------------------   
  2322.   def can_force_hide?
  2323.       return true if $imported[:ve_target_arrow]
  2324.       return true if $imported[:mog_battle_cursor]
  2325.       return false
  2326.   end   
  2327.  
  2328. #--------------------------------------------------------------------------
  2329. # * Dispose
  2330. #--------------------------------------------------------------------------
  2331. alias mog_monogatari_enemy_window_dispose dispose
  2332. def dispose
  2333.      mog_monogatari_enemy_window_dispose
  2334.      dispose_layout
  2335. end
  2336.  
  2337. #--------------------------------------------------------------------------
  2338. # * Create Layout
  2339. #--------------------------------------------------------------------------   
  2340. def create_layout
  2341.      return if @layout != nil
  2342.      return if !ENEMY_WINDOW_LAYOUT
  2343.      return if $game_temp.mbhud_window[4]
  2344.      $game_temp.mbhud_window[4] = true     
  2345.      @org_position_2 = [self.x + ENEMY_WINDOW_LAYOUT_POSITION[0],self.y + ENEMY_WINDOW_LAYOUT_POSITION[1]]
  2346.      @layout = Sprite.new
  2347.      @layout.bitmap = Cache.battle_hud("Layout_Target_Enemy")
  2348.      @layout.z = self.z - 1
  2349.      refresh_layout
  2350.      @layout.visible = false
  2351. end
  2352.  
  2353. #--------------------------------------------------------------------------
  2354. # * Dispose Layout
  2355. #--------------------------------------------------------------------------
  2356. def dispose_layout
  2357.      return if @layout == nil
  2358.      @layout.dispose
  2359.      @layout = nil
  2360. end
  2361.  
  2362. #--------------------------------------------------------------------------
  2363. # * Refresh Layout
  2364. #--------------------------------------------------------------------------
  2365. def refresh_layout
  2366.      return if @layout == nil
  2367.      @layout.x = @org_position_2[0]
  2368.      @layout.y = @org_position_2[1]
  2369.      @layout.x += ENEMY_WINDOW_SLIDE_POSITION[0] if ENEMY_WINDOW_SLIDE_EFFECT
  2370.      @layout.y += ENEMY_WINDOW_SLIDE_POSITION[1] if ENEMY_WINDOW_SLIDE_EFFECT
  2371.      @layout.visible = self.visible
  2372. end      
  2373.  
  2374. #--------------------------------------------------------------------------
  2375. # * Show
  2376. #--------------------------------------------------------------------------   
  2377.   alias mog_bg_ex_slide_show_enemy show
  2378.   def show
  2379.       self.viewport = nil
  2380.       self.x = @org_position[0] ; self.y = @org_position[1]
  2381.       if ENEMY_WINDOW_SLIDE_EFFECT
  2382.          self.x += ENEMY_WINDOW_SLIDE_POSITION[0]
  2383.          self.y += ENEMY_WINDOW_SLIDE_POSITION[1]
  2384.       end
  2385.       self.opacity = ENEMY_WINDOW_OPACITY
  2386.       mog_bg_ex_slide_show_enemy
  2387.   end  
  2388.  
  2389. #--------------------------------------------------------------------------
  2390. # * Update
  2391. #--------------------------------------------------------------------------  
  2392. alias mog_monogatari_enemy_window_update update
  2393. def update
  2394.      mog_monogatari_enemy_window_update
  2395.      self.visible = false if @force_hide
  2396.      if @layout != nil and @layout.visible != self.visible        
  2397.         refresh_layout
  2398.      end
  2399.      if !$game_temp.sprite_visible   
  2400.         self.visible = false
  2401.         @layout.visible = self.visible if @layout != nil
  2402.      end   
  2403.      execute_slide_effect if self.visible
  2404.   end   
  2405.  
  2406.   if $imported["YEA-BattleEngine"]
  2407.   #--------------------------------------------------------------------------
  2408.   # * Draw Item
  2409.   #--------------------------------------------------------------------------
  2410.   def draw_item(index)
  2411.       change_color(normal_color)
  2412.       name = $game_troop.alive_members[index].name
  2413.       draw_text(item_rect_for_text(index), name)
  2414.   end
  2415.   end
  2416.  
  2417.   #--------------------------------------------------------------------------
  2418.   # * Process Cursor Move
  2419.   #--------------------------------------------------------------------------
  2420.   alias mog_atb_wenemy_process_cursor_move process_cursor_move
  2421.   def process_cursor_move
  2422.       return if SceneManager.scene_is?(Scene_Battle) and !$game_temp.sprite_visible
  2423.       mog_atb_wenemy_process_cursor_move
  2424.   end
  2425.  
  2426.   #--------------------------------------------------------------------------
  2427.   # * Process Handling
  2428.   #--------------------------------------------------------------------------
  2429.   alias mog_atb_wenemy_process_handling process_handling
  2430.   def process_handling  
  2431.       return if SceneManager.scene_is?(Scene_Battle) and !$game_temp.sprite_visible
  2432.       mog_atb_wenemy_process_handling
  2433.   end  
  2434.  
  2435. end
  2436.  
  2437. #==============================================================================
  2438. # ** Window_BattleSkill
  2439. #==============================================================================
  2440. class Window_BattleSkill < Window_SkillList
  2441. include MOG_BATTLE_HUD_EX
  2442.  
  2443. #--------------------------------------------------------------------------
  2444. # * Initialize
  2445. #--------------------------------------------------------------------------   
  2446. alias mog_monogatari_battle_skill_initialize initialize
  2447. def initialize(help_window, info_viewport)
  2448.      @force_hide = can_force_hide?
  2449.      @force_hide_active = can_force_hide_active?     
  2450.      mog_monogatari_battle_skill_initialize(help_window, info_viewport)
  2451.      self.width = SKILL_WINDOW_SIZE[0]
  2452.      self.height = SKILL_WINDOW_SIZE[1]   
  2453.      @org_position = [SKILL_WINDOW_POSITION[0],
  2454.           Graphics.height - self.height + SKILL_WINDOW_POSITION[1]]
  2455.      self.x = @org_position[0]
  2456.      self.y = @org_position[1]
  2457.      self.opacity = SKILL_WINDOW_OPACITY
  2458.      self.viewport = nil
  2459.      self.z = MOG_BATTLE_HUD_EX::HUD_Z + 150
  2460.      create_layout
  2461. end
  2462.  
  2463. #--------------------------------------------------------------------------
  2464. # * Col Max
  2465. #--------------------------------------------------------------------------   
  2466.   def col_max
  2467.       return SKILL_COL_MAX
  2468.   end
  2469.  
  2470. #--------------------------------------------------------------------------
  2471. # * Can Force Hide Active?
  2472. #--------------------------------------------------------------------------   
  2473. def can_force_hide_active?
  2474.      return true if $imported[:ve_target_arrow]
  2475.      return true if $imported[:mog_battle_cursor] != nil
  2476.      return false
  2477. end   
  2478.  
  2479.   #--------------------------------------------------------------------------
  2480.   # * Can Force Hide?
  2481.   #--------------------------------------------------------------------------   
  2482.   def can_force_hide?
  2483.       return false
  2484.   end
  2485.  
  2486. #--------------------------------------------------------------------------
  2487. # * Dispose
  2488. #--------------------------------------------------------------------------
  2489. alias mog_monogatari_skill_window_dispose dispose
  2490. def dispose
  2491.      mog_monogatari_skill_window_dispose
  2492.      dispose_layout
  2493. end
  2494.  
  2495. #--------------------------------------------------------------------------
  2496. # * Create Layout
  2497. #--------------------------------------------------------------------------   
  2498. def create_layout
  2499.      return if @layout != nil
  2500.      return if !SKILL_WINDOW_LAYOUT
  2501.      return if $game_temp.mbhud_window[5]
  2502.      $game_temp.mbhud_window[5] = true
  2503.      @org_position_2 = [self.x + SKILL_WINDOW_LAYOUT_POSITION[0],self.y + SKILL_WINDOW_LAYOUT_POSITION[1]]
  2504.      @layout = Sprite.new
  2505.      @layout.bitmap = Cache.battle_hud("Layout_Skill")
  2506.      @layout.z = self.z - 1
  2507.      refresh_layout
  2508.      @layout.visible = false
  2509. end
  2510.  
  2511. #--------------------------------------------------------------------------
  2512. # * Dispose Layout
  2513. #--------------------------------------------------------------------------
  2514. def dispose_layout
  2515.      return if @layout == nil
  2516.      @layout.dispose
  2517.      @layout = nil
  2518. end
  2519.  
  2520. #--------------------------------------------------------------------------
  2521. # * Refresh Layout
  2522. #--------------------------------------------------------------------------
  2523. def refresh_layout
  2524.      return if @layout == nil
  2525.      @layout.x = @org_position_2[0]
  2526.      @layout.y = @org_position_2[1]
  2527.      @layout.x += SKILL_WINDOW_SLIDE_POSITION[0] if SKILL_WINDOW_SLIDE_EFFECT
  2528.      @layout.y += SKILL_WINDOW_SLIDE_POSITION[1] if SKILL_WINDOW_SLIDE_EFFECT
  2529.      @layout.visible = self.visible
  2530. end  
  2531.  
  2532. #--------------------------------------------------------------------------
  2533. # * Show
  2534. #--------------------------------------------------------------------------   
  2535.   alias mog_bg_ex_slide_show_skill show
  2536.   def show
  2537.       self.viewport = nil
  2538.       self.x = @org_position[0] ; self.y = @org_position[1]
  2539.       if SKILL_WINDOW_SLIDE_EFFECT
  2540.          self.x += SKILL_WINDOW_SLIDE_POSITION[0]
  2541.          self.y += SKILL_WINDOW_SLIDE_POSITION[1]
  2542.       end
  2543.       self.opacity = SKILL_WINDOW_OPACITY
  2544.       mog_bg_ex_slide_show_skill
  2545.   end
  2546.  
  2547. #--------------------------------------------------------------------------
  2548. # * Update
  2549. #--------------------------------------------------------------------------  
  2550. alias mog_monogatari_skill_window_update update
  2551. def update
  2552.      mog_monogatari_skill_window_update
  2553.      self.visible = self.active if @force_hide_active
  2554.      self.visible = false if @force_hide
  2555.      if @layout != nil and @layout.visible != self.visible        
  2556.         refresh_layout
  2557.     end
  2558.     self.visible = false if !$game_temp.sprite_visible
  2559.     execute_slide_effect if self.visible
  2560. end
  2561.  
  2562. end
  2563.  
  2564. #==============================================================================
  2565. # ** Window_BattleItem
  2566. #==============================================================================
  2567. class Window_BattleItem < Window_ItemList
  2568.   include MOG_BATTLE_HUD_EX
  2569.  
  2570. #--------------------------------------------------------------------------
  2571. # * Initialize
  2572. #--------------------------------------------------------------------------  
  2573. alias mog_monogatari_battle_item_initialize initialize
  2574. def initialize(help_window, info_viewport)
  2575.      @force_hide = can_force_hide?
  2576.      @force_hide_active = can_force_hide_active?
  2577.      mog_monogatari_battle_item_initialize(help_window, info_viewport)
  2578.      self.width = ITEM_WINDOW_SIZE[0]
  2579.      self.height = ITEM_WINDOW_SIZE[1]
  2580.      @org_position = [ITEM_WINDOW_POSITION[0],
  2581.           Graphics.height - self.height + ITEM_WINDOW_POSITION[1]]
  2582.      self.x = @org_position[0]
  2583.      self.y = @org_position[1]
  2584.      self.viewport = nil
  2585.      self.opacity = ITEM_WINDOW_OPACITY
  2586.      self.z = MOG_BATTLE_HUD_EX::HUD_Z + 150
  2587.      create_layout
  2588. end  
  2589.  
  2590. #--------------------------------------------------------------------------
  2591. # * Col Max
  2592. #--------------------------------------------------------------------------   
  2593.   def col_max
  2594.       return ITEM_COL_MAX
  2595.   end  
  2596.  
  2597. #--------------------------------------------------------------------------
  2598. # * Can Force Hide Active?
  2599. #--------------------------------------------------------------------------   
  2600. def can_force_hide_active?
  2601.      return true if $imported[:ve_target_arrow]
  2602.      return true if $imported[:mog_battle_cursor] != nil
  2603.      return false
  2604. end  
  2605.  
  2606. #--------------------------------------------------------------------------
  2607. # * Can Force Hide?
  2608. #--------------------------------------------------------------------------   
  2609. def can_force_hide?
  2610.      return false
  2611. end
  2612.  
  2613. #--------------------------------------------------------------------------
  2614. # * Dispose
  2615. #--------------------------------------------------------------------------
  2616. alias mog_monogatari_item_window_dispose dispose
  2617. def dispose
  2618.      mog_monogatari_item_window_dispose
  2619.      dispose_layout
  2620. end
  2621.  
  2622. #--------------------------------------------------------------------------
  2623. # * Create Layout
  2624. #--------------------------------------------------------------------------   
  2625. def create_layout
  2626.      return if @layout != nil
  2627.      return if !ITEM_WINDOW_LAYOUT
  2628.      return if $game_temp.mbhud_window[6]
  2629.      $game_temp.mbhud_window[6] = true
  2630.      @org_position_2 = [self.x + ITEM_WINDOW_LAYOUT_POSITION[0],self.y + ITEM_WINDOW_LAYOUT_POSITION[1]]
  2631.      @layout = Sprite.new
  2632.      @layout.bitmap = Cache.battle_hud("Layout_Item")
  2633.      @layout.z = self.z - 1
  2634.      refresh_layout
  2635.      @layout.visible = false
  2636. end
  2637.  
  2638. #--------------------------------------------------------------------------
  2639. # * Dispose Layout
  2640. #--------------------------------------------------------------------------
  2641. def dispose_layout
  2642.      return if @layout == nil
  2643.      @layout.dispose
  2644.      @layout = nil
  2645. end
  2646.  
  2647. #--------------------------------------------------------------------------
  2648. # * Refresh Layout
  2649. #--------------------------------------------------------------------------
  2650. def refresh_layout
  2651.      return if @layout == nil
  2652.      @layout.x = @org_position_2[0]
  2653.      @layout.y = @org_position_2[1]
  2654.      @layout.x += ITEM_WINDOW_SLIDE_POSITION[0] if ITEM_WINDOW_SLIDE_EFFECT
  2655.      @layout.y += ITEM_WINDOW_SLIDE_POSITION[1] if ITEM_WINDOW_SLIDE_EFFECT
  2656.      @layout.visible = self.visible
  2657. end  
  2658.  
  2659. #--------------------------------------------------------------------------
  2660. # * Show
  2661. #--------------------------------------------------------------------------   
  2662.   alias mog_bg_ex_slide_show_item show
  2663.   def show
  2664.       self.viewport = nil
  2665.       self.x = @org_position[0] ; self.y = @org_position[1]
  2666.       if ITEM_WINDOW_SLIDE_EFFECT
  2667.          self.x += ITEM_WINDOW_SLIDE_POSITION[0]
  2668.          self.y += ITEM_WINDOW_SLIDE_POSITION[1]
  2669.       end
  2670.       self.opacity = ITEM_WINDOW_OPACITY
  2671.       mog_bg_ex_slide_show_item      
  2672.   end
  2673.  
  2674. #--------------------------------------------------------------------------
  2675. # * Update
  2676. #--------------------------------------------------------------------------  
  2677. alias mog_monogatari_item_window_update update
  2678. def update
  2679.      mog_monogatari_item_window_update
  2680.      self.visible = self.active if @force_hide_active
  2681.      self.visible = false if @force_hide
  2682.      if @layout != nil
  2683.         refresh_layout if @layout.visible != self.visible
  2684.      end
  2685.      self.visible = false if !$game_temp.sprite_visible
  2686.      execute_slide_effect if self.visible
  2687.   end  
  2688.  
  2689. end
  2690.  
  2691. end
  2692.  
  2693. #--------------------------------------------------------------------------
  2694. #--------------------------------------------------------------------------
  2695. #################################
  2696. if $imported["YEA-BattleEngine"]
  2697. #################################
  2698.  
  2699. #==============================================================================
  2700. # ** Window_BattleStatusAid
  2701. #==============================================================================
  2702. class Window_BattleStatusAid < Window_BattleStatus
  2703.  
  2704. #--------------------------------------------------------------------------
  2705. # * Refresh
  2706. #--------------------------------------------------------------------------   
  2707.   def refresh
  2708.       contents.clear
  2709.       self.visible = false
  2710.   end
  2711.  
  2712. end
  2713.  
  2714. #==============================================================================
  2715. # ** Window_BattleStatus
  2716. #==============================================================================
  2717. class Window_BattleStatus < Window_Selectable
  2718.  
  2719. #--------------------------------------------------------------------------
  2720. # * Update
  2721. #--------------------------------------------------------------------------
  2722. alias mog_monogatari_bhud_yf_update update
  2723. def update
  2724.      mog_monogatari_bhud_yf_update
  2725.      update_visible_yf
  2726. end
  2727.  
  2728. #--------------------------------------------------------------------------
  2729. # * Update Visible Yf
  2730. #--------------------------------------------------------------------------
  2731. def update_visible_yf
  2732.      self.visible = self.active
  2733.      self.visible = false if !$game_temp.sprite_visible
  2734. end
  2735.  
  2736. end  
  2737.  
  2738. #==============================================================================
  2739. # ■ Window ActorCommand
  2740. #==============================================================================
  2741. class Window_ActorCommand < Window_Command
  2742.  
  2743. #--------------------------------------------------------------------------
  2744. # * Show
  2745. #--------------------------------------------------------------------------
  2746.   alias mog_bhud_yf_command_show show
  2747.   def show
  2748.       return if !BattleManager.can_enable_window?
  2749.       mog_bhud_yf_command_show
  2750.   end
  2751.  
  2752. #--------------------------------------------------------------------------
  2753. # * Update
  2754. #--------------------------------------------------------------------------
  2755. alias mog_monogatari_bhud_yf_actorcommand_update update
  2756. def update
  2757.      mog_monogatari_bhud_yf_actorcommand_update
  2758.      update_visible_yf
  2759. end
  2760.  
  2761. #--------------------------------------------------------------------------
  2762. # * Update Visible Yf
  2763. #--------------------------------------------------------------------------
  2764. def update_visible_yf
  2765.      self.visible = self.active
  2766.      self.visible = false if !$game_temp.sprite_visible
  2767. end
  2768.  
  2769. end
  2770.  
  2771. #==============================================================================
  2772. # ** Scene Battle
  2773. #==============================================================================
  2774. class Scene_Battle < Scene_Base
  2775.  
  2776.   include MOG_BATTLE_HUD_EX
  2777.  
  2778.   #--------------------------------------------------------------------------
  2779.   # alias method: create_skill_window
  2780.   #--------------------------------------------------------------------------
  2781.   alias mog_yf_scene_battle_create_skill_window create_skill_window
  2782.   def create_skill_window
  2783.       mog_yf_scene_battle_create_skill_window
  2784.       @skill_window.width = SKILL_WINDOW_SIZE[0]
  2785.       @skill_window.height = SKILL_WINDOW_SIZE[1]
  2786.       @skill_window.x = SKILL_WINDOW_POSITION[0]
  2787.       @skill_window.y = SKILL_WINDOW_POSITION[1]
  2788.   end
  2789.  
  2790.   #--------------------------------------------------------------------------
  2791.   # alias method: create_item_window
  2792.   #--------------------------------------------------------------------------
  2793.   alias mog_yf_scene_battle_create_item_window create_item_window
  2794.   def create_item_window
  2795.       mog_yf_scene_battle_create_item_window
  2796.       @item_window.width = ITEM_WINDOW_SIZE[0]
  2797.       @item_window.height = ITEM_WINDOW_SIZE[1]
  2798.       @item_window.x = ITEM_WINDOW_POSITION[0]
  2799.       @item_window.y = ITEM_WINDOW_POSITION[1]
  2800.   end  
  2801.  
  2802. if !$imported[:mog_atb_system]
  2803. #--------------------------------------------------------------------------
  2804. # * Next Command
  2805. #--------------------------------------------------------------------------
  2806.   def next_command
  2807.     if BattleManager.next_command
  2808.        @status_window.show
  2809.        redraw_current_status
  2810.        @actor_command_window.show
  2811.        @status_aid_window.hide      
  2812.        start_actor_command_selection
  2813.     else
  2814.       turn_start
  2815.     end
  2816.   end
  2817.   end
  2818.  
  2819. #--------------------------------------------------------------------------
  2820. # * STW Can Visible
  2821. #--------------------------------------------------------------------------   
  2822.   def stw_can_visible?
  2823.       return false if !BattleManager.can_enable_window?
  2824.       return false if @item_window.visible
  2825.       return false if @skill_window.visible
  2826.       return true if @actor_window.active
  2827.       return false
  2828.   end
  2829.  
  2830. if $imported["YEA-CommandEquip"]
  2831. #--------------------------------------------------------------------------
  2832. # * Command Equip
  2833. #--------------------------------------------------------------------------   
  2834.   alias mog_yf_command_equip command_equip
  2835.   def command_equip
  2836.       @actor_command_window.visible = false
  2837.       @actor_command_window.update
  2838.       $game_temp.battle_hud_visible_refresh = [true,false]
  2839.       @spriteset.update_battle_hud_ex
  2840.       @spriteset.battler_sprites.each do |s| s.dispose_animation end
  2841.       mog_yf_command_equip
  2842.       $game_temp.battle_hud_visible_refresh = [true,true]
  2843.   end
  2844.   end
  2845.  
  2846. end
  2847.  
  2848. end
  2849. #--------------------------------------------------------------------------
  2850.  
  2851.  
  2852. ######################################
  2853. if $imported["YEA-EnemyTargetInfo"]
  2854. ######################################
  2855.  
  2856. #==============================================================================
  2857. # ■ Window_Comparison
  2858. #==============================================================================
  2859. class Window_Comparison < Window_Base
  2860.  
  2861.   #--------------------------------------------------------------------------
  2862.   # * Refresh
  2863.   #--------------------------------------------------------------------------     
  2864.   alias mog_battle_hud_ex_yf_refresh refresh
  2865.   def refresh
  2866.       mog_battle_hud_ex_yf_refresh
  2867.       self.z = MOG_BATTLE_HUD_EX::HUD_Z + 152
  2868.       self.viewport = nil
  2869.   end
  2870.  
  2871. end
  2872.  
  2873. #==============================================================================
  2874. # ■ Window_ComparisonHelp
  2875. #==============================================================================
  2876. class Window_ComparisonHelp < Window_Base
  2877.  
  2878.   #--------------------------------------------------------------------------
  2879.   # * Refresh
  2880.   #--------------------------------------------------------------------------     
  2881.   alias mog_battle_hud_ex_yf_refresh refresh
  2882.   def refresh
  2883.       mog_battle_hud_ex_yf_refresh
  2884.       self.z = MOG_BATTLE_HUD_EX::HUD_Z + 152
  2885.       self.viewport = nil
  2886.   end
  2887.  
  2888. end
  2889. end
  2890. #--------------------------------------------------------------------------
  2891. #--------------------------------------------------------------------------
  2892.  
  2893.  
  2894. #################################
  2895. if $imported["YEA-EnemyTargetInfo"]
  2896. #################################
  2897. class Window_Comparison < Window_Base
  2898.  
  2899.   #--------------------------------------------------------------------------
  2900.   # initialize
  2901.   #--------------------------------------------------------------------------
  2902.   alias mog_battle_hud_yf_wcomparison_initialize initialize
  2903.   def initialize(type)
  2904.       mog_battle_hud_yf_wcomparison_initialize(type)
  2905.       self.z = 102
  2906.   end  
  2907.  
  2908. end
  2909. end
  2910. #--------------------------------------------------------------------------
  2911. #--------------------------------------------------------------------------
  2912.  
  2913. #--------------------------------------------------------------------------
  2914. #--------------------------------------------------------------------------
  2915. #################################
  2916. if $imported["YSA-CATB"]
  2917. #################################
  2918.  
  2919. #==============================================================================
  2920. # ■ Enemy CATB Gauge Viewport
  2921. #==============================================================================
  2922. class Enemy_CATB_Gauge_Viewport < Viewport
  2923.  
  2924.   #--------------------------------------------------------------------------
  2925.   # initialize
  2926.   #--------------------------------------------------------------------------
  2927.   alias mog_battle_hud_ex_yami_initialize initialize
  2928.   def initialize(battler, sprite, type)
  2929.       mog_battle_hud_ex_yami_initialize(battler, sprite, type)
  2930.       self.z = 90
  2931.   end
  2932.  
  2933. end
  2934.  
  2935. #==============================================================================
  2936. # ■ Game_Battler
  2937. #==============================================================================
  2938. class Game_Battler < Game_BattlerBase
  2939.  
  2940.   attr_accessor :catb_value  
  2941.   attr_accessor :max_atb
  2942.  
  2943.   #--------------------------------------------------------------------------
  2944.   # * Max ATB
  2945.   #--------------------------------------------------------------------------   
  2946.   def max_atb
  2947.       return MAX_CATB_VALUE
  2948.       return 1
  2949.   end
  2950.  
  2951. end
  2952.  
  2953. end
  2954. #--------------------------------------------------------------------------
  2955. #--------------------------------------------------------------------------
  2956.  
  2957. #==============================================================================
  2958. # ** Window Base
  2959. #==============================================================================
  2960. class Window_Base < Window
  2961.  
  2962. #--------------------------------------------------------------------------
  2963. # * Execute Move W
  2964. #--------------------------------------------------------------------------      
  2965. def execute_move_w(sprite,type,cp,np)
  2966.      sp = 6 + ((cp - np).abs / 10)
  2967.      if cp > np ;    cp -= sp ; cp = np if cp < np
  2968.         elsif cp < np ; cp += sp ; cp = np if cp > np
  2969.      end     
  2970.      sprite.x = cp if type == 0 ; sprite.y = cp if type == 1
  2971. end
  2972.  
  2973. #--------------------------------------------------------------------------
  2974. # * Set BH EX Font
  2975. #--------------------------------------------------------------------------   
  2976.   def set_bh_ex_font
  2977.       return if !MOG_BATTLE_HUD_EX::ENABLE_WINDOW_FONT_SET
  2978.       self.contents.font.bold = MOG_BATTLE_HUD_EX::WINDOW_FONT_BOLD
  2979.       self.contents.font.size = MOG_BATTLE_HUD_EX::WINDOW_FONT_SIZE
  2980.       self.contents.font.italic = MOG_BATTLE_HUD_EX::WINDOW_FONT_ITALIC
  2981.       self.contents.font.name = MOG_BATTLE_HUD_EX::WINDOW_FONT_NAME if MOG_BATTLE_HUD_EX::WINDOW_FONT_NAME != nil
  2982.   end
  2983.  
  2984. #--------------------------------------------------------------------------
  2985. # * Execute Slide Effect
  2986. #--------------------------------------------------------------------------   
  2987. def execute_slide_effect
  2988.      return if @org_position == nil
  2989.      execute_move_w(self,0,self.x,@org_position[0])
  2990.      execute_move_w(self,1,self.y,@org_position[1])
  2991.      return if @layout == nil
  2992.      execute_move_w(@layout,0,@layout.x,@org_position_2[0])
  2993.      execute_move_w(@layout,1,@layout.y,@org_position_2[1])     
  2994. end     
  2995.  
  2996. end
  2997.  
  2998. #==============================================================================
  2999. # ** Window Help
  3000. #==============================================================================
  3001. class Window_Help < Window_Base
  3002.  
  3003. #--------------------------------------------------------------------------
  3004. # * Draw Text
  3005. #--------------------------------------------------------------------------   
  3006.   alias mog_bh_ex_draw_text_help draw_text
  3007.   def draw_text(*args)
  3008.       set_bh_ex_font
  3009.       mog_bh_ex_draw_text_help(*args)
  3010.   end
  3011.  
  3012. end
  3013.  
  3014. #==============================================================================
  3015. # ** Window BattleActor
  3016. #==============================================================================
  3017. class Window_BattleActor < Window_BattleStatus
  3018.  
  3019. #--------------------------------------------------------------------------
  3020. # * Draw Item
  3021. #--------------------------------------------------------------------------   
  3022.   alias mog_bbex_draw_item_actor draw_item
  3023.   def draw_item(index)
  3024.       set_bh_ex_font
  3025.       mog_bbex_draw_item_actor(index)
  3026.   end
  3027.  
  3028. end
  3029.  
  3030. #==============================================================================
  3031. # ** Window BattleEnemy
  3032. #==============================================================================
  3033. class Window_BattleEnemy < Window_Selectable
  3034.  
  3035. #--------------------------------------------------------------------------
  3036. # * Draw Item
  3037. #--------------------------------------------------------------------------   
  3038.   alias mog_bbex_draw_item_enemy draw_item
  3039.   def draw_item(index)
  3040.       set_bh_ex_font
  3041.       mog_bbex_draw_item_enemy(index)
  3042.   end
  3043.  
  3044. end
  3045.  
  3046. #==============================================================================
  3047. # ** Window ItemList
  3048. #==============================================================================
  3049. class Window_ItemList < Window_Selectable
  3050.  
  3051. #--------------------------------------------------------------------------
  3052. # * Draw Item Name
  3053. #--------------------------------------------------------------------------   
  3054.    alias mog_bhex_draw_item_name_item draw_item_name
  3055.    def draw_item_name(item, x, y, enabled = true, width = 172)
  3056.        set_bh_ex_font
  3057.        mog_bhex_draw_item_name_item(item, x, y, enabled , width )
  3058.    end  
  3059.  
  3060. end
  3061.  
  3062. #==============================================================================
  3063. # ** Window SkillList
  3064. #==============================================================================
  3065. class Window_SkillList < Window_Selectable  
  3066.  
  3067. #--------------------------------------------------------------------------
  3068. # * Draw Item Name
  3069. #--------------------------------------------------------------------------   
  3070.    alias mog_bhex_draw_item_name_skill draw_item_name
  3071.    def draw_item_name(item, x, y, enabled = true, width = 172)
  3072.        set_bh_ex_font
  3073.        mog_bhex_draw_item_name_skill(item, x, y, enabled , width )
  3074.    end   
  3075.  
  3076. end
  3077.  
  3078. #==============================================================================
  3079. # ** Spriteset_Battle
  3080. #==============================================================================
  3081. class Spriteset_Battle
  3082.  
  3083.   #--------------------------------------------------------------------------
  3084.   # * Initialize
  3085.   #--------------------------------------------------------------------------
  3086.   alias mog_battle_hud_ex_initialize initialize
  3087.   def initialize
  3088.       check_screen_xyz_nil rescue nil
  3089.       mog_battle_hud_ex_initialize
  3090.       create_battle_hud_ex
  3091.   end
  3092.  
  3093.   #--------------------------------------------------------------------------
  3094.   # * Check Screen Xyz
  3095.   #--------------------------------------------------------------------------   
  3096.   def check_screen_xyz_nil
  3097.       return if !SceneManager.face_battler?
  3098.       for actor in $game_party.battle_members
  3099.           actor.screen_x = 0 if actor.screen_x == nil
  3100.           actor.screen_y = 0 if actor.screen_y == nil
  3101.           actor.screen_z = 0 if actor.screen_z == nil
  3102.       end
  3103.   end
  3104.  
  3105.   #--------------------------------------------------------------------------
  3106.   # * Check Screen Xyz after
  3107.   #--------------------------------------------------------------------------     
  3108.   def check_screen_xyz_after
  3109.       return if !SceneManager.face_battler?
  3110.       $game_party.battle_members.each_with_index do |actor, index|
  3111.           actor.screen_x = $game_temp.battler_face_pos[index][0] rescue nil
  3112.           actor.screen_y = $game_temp.battler_face_pos[index][1] rescue nil
  3113.           actor.screen_z = $game_temp.battler_face_pos[index][2] rescue nil
  3114.       end   
  3115.   end
  3116.  
  3117.   #--------------------------------------------------------------------------
  3118.   # * Dispose
  3119.   #--------------------------------------------------------------------------  
  3120.   alias mog_battle_hud_ex_dispose dispose
  3121.   def dispose
  3122.       dispose_battle_hud_ex
  3123.       mog_battle_hud_ex_dispose
  3124.   end
  3125.  
  3126.   #--------------------------------------------------------------------------
  3127.   # * Update
  3128.   #--------------------------------------------------------------------------  
  3129.   alias mog_battle_hud_ex_update update
  3130.   def update
  3131.       mog_battle_hud_ex_update
  3132.       update_battle_hud_ex
  3133.   end
  3134.  
  3135.   #--------------------------------------------------------------------------
  3136.   # * Create Battle Hud EX
  3137.   #--------------------------------------------------------------------------   
  3138.   def create_battle_hud_ex
  3139.       return if @battle_hud_ex != nil
  3140.       $game_temp.battle_hud_visible = true
  3141.       @battle_hud_ex = Monogatari_Bhud.new(nil)
  3142.       check_screen_xyz_after
  3143.   end
  3144.  
  3145.   #--------------------------------------------------------------------------
  3146.   # * Dispose Battle Hud EX
  3147.   #--------------------------------------------------------------------------   
  3148.   def dispose_battle_hud_ex
  3149.       return if @battle_hud_ex == nil
  3150.       @battle_hud_ex.dispose
  3151.       @battle_hud_ex = nil
  3152.       $game_temp.mbhud_window = [false,false,false,false,false,false,false]
  3153.   end
  3154.  
  3155.   #--------------------------------------------------------------------------
  3156.   # * Update Battle Hud EX
  3157.   #--------------------------------------------------------------------------   
  3158.   def update_battle_hud_ex
  3159.       refresh_battle_hud if $game_temp.mbhud_force_refresh
  3160.       return if @battle_hud_ex == nil
  3161.       @battle_hud_ex.update
  3162.   end
  3163.  
  3164.   #--------------------------------------------------------------------------
  3165.   # * Refresh Battle Hud
  3166.   #--------------------------------------------------------------------------   
  3167.   def refresh_battle_hud
  3168.       $game_temp.mbhud_force_refresh = false
  3169.       check_screen_xyz_nil rescue nil
  3170.       dispose_battle_hud_ex
  3171.       create_battle_hud_ex
  3172.   end
  3173.  
  3174. end
  3175.  
  3176. #==============================================================================
  3177. # ** Monogatari Bhud
  3178. #==============================================================================
  3179. class Monogatari_Bhud
  3180.  
  3181.   include MOG_BATTLE_HUD_EX
  3182.  
  3183.   #--------------------------------------------------------------------------
  3184.   # * Initialize
  3185.   #--------------------------------------------------------------------------  
  3186.   def initialize(viewport)
  3187.       @battle_hud = [] ; @sprite_visitle_wait = 0
  3188.       $game_party.battle_members.each_with_index do |actor, index|
  3189.       @battle_hud.push(Battle_Hud_EX.new(actor,index,max_members,nil)) end
  3190.       create_turn_sprite(nil)
  3191.       create_screen_layout(nil)      
  3192.   end
  3193.  
  3194.   #--------------------------------------------------------------------------
  3195.   # * Max members
  3196.   #--------------------------------------------------------------------------   
  3197.   def max_members
  3198.       if $game_party.members.size > $game_party.max_battle_members
  3199.          return $game_party.max_battle_members
  3200.       end   
  3201.       return $game_party.members.size
  3202.   end
  3203.  
  3204.   #--------------------------------------------------------------------------
  3205.   # * Dispose
  3206.   #--------------------------------------------------------------------------   
  3207.   def dispose
  3208.       @battle_hud.each {|sprite| sprite.dispose }
  3209.       dispose_turn_sprite
  3210.       dispose_screen_layout
  3211.   end
  3212.  
  3213.   #--------------------------------------------------------------------------
  3214.   # * Update
  3215.   #--------------------------------------------------------------------------   
  3216.   def update
  3217.       @battle_hud.each {|sprite| sprite.update }
  3218.       update_turn_sprite
  3219.       update_screen_layout
  3220.       refresh_battle_hud_visible if $game_temp.battle_hud_visible_refresh[0]
  3221.   end
  3222.  
  3223.   #--------------------------------------------------------------------------
  3224.   # * Update
  3225.   #--------------------------------------------------------------------------   
  3226.   def refresh_battle_hud_visible
  3227.       $game_temp.battle_hud_visible_refresh[0] = false
  3228.       @turn_sprite.visible = $game_temp.battle_hud_visible_refresh[1] if @turn_sprite != nil
  3229.       @screen_layout.visible = $game_temp.battle_hud_visible_refresh[1] if @screen_layout != nil
  3230.       @skill_name.visible = $game_temp.battle_hud_visible_refresh[1] if @skill_name != nil
  3231.       @battle_hud.each {|sprite| sprite.refresh_visible($game_temp.battle_hud_visible_refresh[1]) }
  3232. end
  3233.  
  3234. end
  3235.  
  3236. #==============================================================================
  3237. # ** Monogatari Bhud
  3238. #==============================================================================
  3239. class Monogatari_Bhud
  3240.  
  3241. #--------------------------------------------------------------------------
  3242. # * Can Update Turn Sprite
  3243. #--------------------------------------------------------------------------
  3244.   def can_refresh_turn_sprite?
  3245.       return true if @turn_sprite.visible != $game_temp.command_visible
  3246.       return true if $game_temp.refresh_turn_sprite
  3247.       return false
  3248.   end
  3249.  
  3250. #--------------------------------------------------------------------------
  3251. # * Create Turn Sprite
  3252. #--------------------------------------------------------------------------
  3253.   def create_turn_sprite(viewport)
  3254.       return if !TURN_SPRITE_VISIBLE
  3255.       return if @turn_sprite != nil
  3256.       @turn_sprite = Sprite.new
  3257.       @turn_sprite.bitmap = Cache.battle_hud("Turn")
  3258.       @turn_sprite.viewport = viewport
  3259.       @turn_sprite.z = HUD_Z + TURN_SPRITE_Z
  3260.       @turn_sprite.visible = false
  3261.       @turn_sprite_update_time = 5
  3262.       @turn_sprite_blink = [0,0]
  3263.   end
  3264.  
  3265. #--------------------------------------------------------------------------
  3266. # * Dispose Turn Sprite
  3267. #--------------------------------------------------------------------------
  3268.   def dispose_turn_sprite
  3269.       return if @turn_sprite == nil
  3270.       @turn_sprite.dispose
  3271.       @turn_sprite = nil
  3272.   end
  3273.  
  3274. #--------------------------------------------------------------------------
  3275. # * Update Turn Sprite
  3276. #--------------------------------------------------------------------------
  3277.   def update_turn_sprite
  3278.       return if @turn_sprite == nil
  3279.       if @turn_sprite_update_time > 0
  3280.          @turn_sprite_update_time -= 1
  3281.          return
  3282.       end  
  3283.       update_turn_visible
  3284.       update_turn_blink
  3285.   end
  3286.  
  3287. #--------------------------------------------------------------------------
  3288. # * Update Turn Visible
  3289. #--------------------------------------------------------------------------   
  3290.   def update_turn_visible   
  3291.       $game_temp.refresh_turn_sprite = false
  3292.       @turn_sprite.visible = can_turn_sprite_visible?
  3293.       return if BattleManager.actor == nil
  3294.       x = $game_temp.hud_pos_real[BattleManager.actor.index][0] + TURN_SPRITE_POSITION[0] rescue nil
  3295.       y = $game_temp.hud_pos_real[BattleManager.actor.index][1] + TURN_SPRITE_POSITION[1] rescue nil
  3296.       x = -1000 if x == nil ; y = -1000 if y == nil
  3297.       @turn_sprite.x = x ; @turn_sprite.y = y      
  3298. end
  3299.  
  3300. #--------------------------------------------------------------------------
  3301. # * Can Turn Sprite Visible?
  3302. #--------------------------------------------------------------------------   
  3303. def can_turn_sprite_visible?
  3304.      return false if BattleManager.actor == nil
  3305.      return false if $game_temp.battle_end
  3306.      return false if $game_message.visible
  3307.      return true
  3308. end
  3309.  
  3310. #--------------------------------------------------------------------------
  3311. # * Update Turn Blink
  3312. #--------------------------------------------------------------------------   
  3313. def update_turn_blink
  3314.      return if !TURN_BLINK_EFFECT
  3315.      return if !@turn_sprite.visible
  3316.      @turn_sprite_blink[0] += 1
  3317.      case @turn_sprite_blink[0]
  3318.        when 0..30
  3319.           @turn_sprite_blink[1] += 3
  3320.        when 31..60
  3321.           @turn_sprite_blink[1] -= 3
  3322.        else
  3323.          @turn_sprite_blink = [0,0]
  3324.      end
  3325.      @turn_sprite.opacity = 150 + @turn_sprite_blink[1]
  3326. end
  3327.  
  3328.  
  3329. end
  3330.  
  3331. #==============================================================================
  3332. # ** Monogatari Bhud
  3333. #==============================================================================
  3334. class Monogatari_Bhud
  3335.  
  3336.   #--------------------------------------------------------------------------
  3337.   # * Create Screen Layout
  3338.   #--------------------------------------------------------------------------   
  3339.   def create_screen_layout(viewport)
  3340.       return if !SCREEN_LAYOUT
  3341.       @screen_layout = Sprite.new
  3342.       @screen_layout.bitmap = Cache.battle_hud("Layout_Screen")
  3343.       @screen_layout.z = HUD_Z + SCREEN_LAYOUT_Z
  3344.       @screen_layout.x = SCREEN_LAYOUT_POSITION[0]
  3345.       @screen_layout.y = SCREEN_LAYOUT_POSITION[1]
  3346.       @screen_layout.opacity = 0
  3347.       @screen_layout.viewport = viewport
  3348.    end     
  3349.  
  3350.   #--------------------------------------------------------------------------
  3351.   # * Dispose Screen Layout
  3352.   #--------------------------------------------------------------------------
  3353.    def dispose_screen_layout
  3354.        return if @screen_layout == nil
  3355.        @screen_layout.dispose ; @screen_layout = nil     
  3356.    end
  3357.  
  3358.   #--------------------------------------------------------------------------
  3359.   # * Update Screen Layout
  3360.   #--------------------------------------------------------------------------
  3361.    def update_screen_layout
  3362.        return if @screen_layout == nil
  3363.        @sprite_visitle_wait -= 1 if @sprite_visitle_wait > 0
  3364.        sprite_visible(@screen_layout)
  3365.    end
  3366.  
  3367.   #--------------------------------------------------------------------------
  3368.   # * Sprite Visible
  3369.   #--------------------------------------------------------------------------
  3370.   def sprite_visible?
  3371.       return false if $game_message.visible and MESSAGE_WINDOW_FADE_HUD
  3372.       return false if !$game_temp.battle_hud_visible
  3373.       return false if !$game_temp.sprite_visible
  3374.       return true
  3375.   end
  3376.  
  3377.   #--------------------------------------------------------------------------
  3378.   # * Sprite Visible
  3379.   #--------------------------------------------------------------------------
  3380.   def sprite_visible(sprite)      
  3381.       if sprite_visible?
  3382.          sprite.opacity += 5 unless @sprite_visitle_wait > 0
  3383.       else
  3384.          sprite.opacity -= 10 ; @sprite_visitle_wait = 5
  3385.       end
  3386.   end   
  3387.  
  3388. end
  3389.  
  3390. #==============================================================================
  3391. #==============================================================================
  3392. # ** Battle Hud EX
  3393. #==============================================================================
  3394. #==============================================================================
  3395. class Battle_Hud_EX
  3396.   include MOG_BATTLE_HUD_EX
  3397.  
  3398.   #--------------------------------------------------------------------------
  3399.   # * Initialize
  3400.   #--------------------------------------------------------------------------  
  3401.   def initialize(actor = nil,index = 0, max_members = 0,viewport = nil)
  3402.       pre_cache
  3403.       setup(actor,index,max_members)
  3404.       create_sprites(viewport)
  3405.   end
  3406.  
  3407.   #--------------------------------------------------------------------------
  3408.   # * Setup
  3409.   #--------------------------------------------------------------------------   
  3410.   def setup(actor,index,max_members)
  3411.       $game_temp.battle_end = false
  3412.       @actor = actor
  3413.       @actor_index = index
  3414.       @max_members = max_members
  3415.       @actor.face_animation = [0,0,0]
  3416.       @hp_icon_max = -1
  3417.       @hp_icon_old = -1
  3418.       @hp_icon_col_max = HP_ICON_COL_MAX
  3419.       @hp_icon_col_max = 1 if @hp_icon_col_max <= 0
  3420.       @hp_icon_row_max = HP_ICON_ROW_MAX
  3421.       @hp_icon_row_max = 1 if @hp_icon_row_max <= 0
  3422.       @hp_icon_real_max = @hp_icon_col_max * @hp_icon_row_max
  3423.       @mp_icon_max = -1
  3424.       @mp_icon_old = -1
  3425.       @mp_icon_col_max = MP_ICON_COL_MAX
  3426.       @mp_icon_col_max = 1 if @mp_icon_col_max <= 0
  3427.       @mp_icon_row_max = MP_ICON_ROW_MAX
  3428.       @mp_icon_row_max = 1 if @mp_icon_row_max <= 0
  3429.       @mp_icon_real_max = @mp_icon_col_max * @mp_icon_row_max
  3430.       @tp_icon_max = -1
  3431.       @tp_icon_old = -1
  3432.       @tp_icon_col_max = TP_ICON_COL_MAX
  3433.       @tp_icon_col_max = 1 if @tp_icon_col_max <= 0
  3434.       @tp_icon_row_max = TP_ICON_ROW_MAX
  3435.       @tp_icon_row_max = 1 if @tp_icon_row_max <= 0
  3436.       @tp_icon_real_max = @tp_icon_col_max * @tp_icon_row_max
  3437.       @sprite_visible = true
  3438.       @sprite_visitle_wait = 0
  3439.       setup_actor
  3440.       setup_position
  3441.   end
  3442.  
  3443.   #--------------------------------------------------------------------------
  3444.   # * Setup Actor
  3445.   #--------------------------------------------------------------------------   
  3446.   def setup_actor
  3447.       return if @actor == nil
  3448.       @hp_number_refresh = true
  3449.       @hp_number2_refresh = true
  3450.       @hp_number_old = @actor.hp
  3451.       @hp_number2_old = @actor.mhp
  3452.       @hp_old_meter = 0      
  3453.       @mp_number_refresh = true
  3454.       @mp_number2_refresh = true
  3455.       @mp_number_old = @actor.mp
  3456.       @mp_number2_old = @actor.mmp
  3457.       @mp_old_meter = 0      
  3458.       @tp_number_refresh = true
  3459.       @tp_number2_refresh = true
  3460.       @tp_number_old = @actor.tp
  3461.       @tp_number2_old = @actor.max_tp  
  3462.       @tp_old_meter = 0
  3463.       @at_number_refresh = true
  3464.       @at_number2_refresh = true
  3465.       @at_number_old = actor_at
  3466.       @at_number2_old = actor_max_at
  3467.       @at_old_meter = 0
  3468.       catb = ATB::MAX_AP rescue nil
  3469.       @ccwinter_atb = true if catb != nil
  3470.   end  
  3471.  
  3472.   #--------------------------------------------------------------------------
  3473.   # * Terminate
  3474.   #--------------------------------------------------------------------------   
  3475.   def terminate
  3476.       @actor.atb = 0 rescue nil if $imported[:ve_active_time_battle]
  3477.   end
  3478.  
  3479.   #--------------------------------------------------------------------------
  3480.   # * AT
  3481.   #--------------------------------------------------------------------------  
  3482.   def actor_at
  3483.       return @actor.atb if $imported[:mog_atb_system]
  3484.       return @actor.atb if $imported[:ve_active_time_battle]
  3485.       return @actor.catb_value if $imported["YSA-CATB"]
  3486.       return @actor.ap if @ccwinter_atb != nil
  3487.       return 0
  3488.   end
  3489.  
  3490.   #--------------------------------------------------------------------------
  3491.   # * Max AT
  3492.   #--------------------------------------------------------------------------  
  3493.   def actor_max_at
  3494.       return @actor.atb_max if $imported[:mog_atb_system]
  3495.       return @actor.max_atb if $imported[:ve_active_time_battle]
  3496.       return @actor.max_atb if $imported["YSA-CATB"]
  3497.       return ATB::MAX_AP if @ccwinter_atb != nil
  3498.       return 1
  3499.   end
  3500.  
  3501.   #--------------------------------------------------------------------------
  3502.   # ● Actor Cast
  3503.   #--------------------------------------------------------------------------            
  3504.   def actor_cast
  3505.       return @actor.atb_cast[1] if $imported[:mog_atb_system]
  3506.       return @actor.atb if $imported[:ve_active_time_battle]
  3507.       return @actor.chant_count rescue 0 if @ccwinter_atb != nil
  3508.       return 0
  3509.   end
  3510.  
  3511.   #--------------------------------------------------------------------------
  3512.   # ● Actor Max Cast
  3513.   #--------------------------------------------------------------------------            
  3514.   def actor_max_cast
  3515.       if $imported[:mog_atb_system]
  3516.          return @actor.atb_cast[2] if @actor.atb_cast[2] != 0
  3517.          return @actor.atb_cast[0].speed.abs
  3518.       end   
  3519.       return @actor.max_atb if $imported[:ve_active_time_battle]
  3520.       return @actor.max_chant_count rescue 1 if @ccwinter_atb != nil
  3521.       return 1
  3522.   end
  3523.  
  3524.   #--------------------------------------------------------------------------
  3525.   # ● Actor Cast?
  3526.   #--------------------------------------------------------------------------            
  3527.   def actor_cast?   
  3528.       if $imported[:mog_atb_system]
  3529.          return true if !@actor.atb_cast.empty?
  3530.       end   
  3531.       if $imported[:ve_active_time_battle]
  3532.          return true if @actor.cast_action?
  3533.       end      
  3534.       if @ccwinter_atb
  3535.          return true if @actor.chanting?
  3536.       end
  3537.       return false
  3538.   end  
  3539.  
  3540.   #--------------------------------------------------------------------------
  3541.   # * Create Sprites
  3542.   #--------------------------------------------------------------------------   
  3543.   def create_sprites(viewport)
  3544.       dispose
  3545.       return if @actor == nil
  3546.       create_layout(viewport)
  3547.       create_layout_2(viewport)
  3548.       create_name(viewport)
  3549.       create_face(viewport)
  3550.       create_hp_number(viewport)
  3551.       create_hp_number_max(viewport)
  3552.       create_hp_meter(viewport)
  3553.       create_hp_icon(viewport)
  3554.       create_hp_icon_ex(viewport)
  3555.       create_hp_icon_number(viewport)
  3556.       create_mp_number(viewport)
  3557.       create_mp_number_max(viewport)
  3558.       create_mp_meter(viewport)
  3559.       create_mp_icon(viewport)
  3560.       create_mp_icon_ex(viewport)
  3561.       create_mp_icon_number(viewport)
  3562.       create_tp_number(viewport)
  3563.       create_tp_number_max(viewport)
  3564.       create_tp_meter(viewport)
  3565.       create_tp_icon(viewport)
  3566.       create_tp_icon_ex(viewport)
  3567.       create_tp_icon_number(viewport)
  3568.       create_at_number(viewport)
  3569.       create_at_number_max(viewport)
  3570.       create_at_meter(viewport)      
  3571.       create_level_number(viewport)
  3572.       create_states(viewport)
  3573.       update
  3574.   end   
  3575.  
  3576.   #--------------------------------------------------------------------------
  3577.   # * Sprite Visible
  3578.   #--------------------------------------------------------------------------
  3579.   def sprite_visible?
  3580.       return false if $game_message.visible and MESSAGE_WINDOW_FADE_HUD
  3581.       return false if !$game_temp.battle_hud_visible
  3582.       return false if !$game_temp.sprite_visible
  3583.       return true
  3584.   end
  3585.  
  3586.   #--------------------------------------------------------------------------
  3587.   # * Sprite Visible
  3588.   #--------------------------------------------------------------------------
  3589.   def sprite_visible(sprite)
  3590.       if @sprite_visible         
  3591.          sprite.opacity += 5 unless @sprite_visitle_wait > 0
  3592.       else
  3593.          sprite.opacity -= 10 ; @sprite_visitle_wait = 5
  3594.       end
  3595.   end
  3596.  
  3597. end
  3598.  
  3599. #==============================================================================
  3600. #==============================================================================
  3601. # ** Battle Hud EX
  3602. #==============================================================================
  3603. #==============================================================================
  3604. class Battle_Hud_EX
  3605.  
  3606.   #--------------------------------------------------------------------------
  3607.   # * Setup Position
  3608.   #--------------------------------------------------------------------------
  3609.   def setup_position
  3610.       sprite_width = (Graphics.width - 64) / 4
  3611.       sprite_center = sprite_width / 2  
  3612.       if $game_party.battle_members.size > 4
  3613.          members = $game_party.battle_members.size - 4
  3614.          fx = 32 * members
  3615.        else
  3616.          fx = 0
  3617.       end   
  3618.       space_x = MEMBERS_SPACE[0] - fx
  3619.       space_y = MEMBERS_SPACE[1]      
  3620.       center = Graphics.width / 2
  3621.       members_space = (Graphics.width + space_x) / @max_members
  3622.       members_space2 = (members_space * @actor_index)      
  3623.       members_space3 = ((members_space / 2) * (@max_members - 1))
  3624.       members_space_y = space_y * @actor_index
  3625.       x = HUD_POSITION[0] - sprite_center + center + members_space2 - members_space3
  3626.       screen_resize_y = 0
  3627.       screen_resize_y = (Graphics.height - 416) if Graphics.height > 416
  3628.       y = HUD_POSITION[1] + members_space_y + screen_resize_y
  3629.       @hud_position = [x,y]
  3630.       $game_temp.hud_pos_real[@actor_index] = [] if $game_temp.hud_pos_real[@actor_index] == nil
  3631.       $game_temp.hud_pos_real[@actor_index] = [x,y]
  3632.       x2 = x + sprite_center
  3633.       $game_temp.hud_pos[@actor_index] = [] if $game_temp.hud_pos[@actor_index] == nil
  3634.       $game_temp.hud_pos[@actor_index] = [x2,y]
  3635.       if FIXED_HUD_POSITION[@actor_index] != nil     
  3636.          @hud_position = [FIXED_HUD_POSITION[@actor_index][0],FIXED_HUD_POSITION[@actor_index][1]]
  3637.          $game_temp.hud_pos_real[@actor_index] = [@hud_position[0],@hud_position[1]]
  3638.          $game_temp.hud_pos[@actor_index] = [] if $game_temp.hud_pos[@actor_index] == nil
  3639.          $game_temp.hud_pos[@actor_index] = [Graphics.width / 2,(Graphics.height / 2) + 96]   
  3640.       end      
  3641.   end
  3642.  
  3643. end
  3644.  
  3645. #==============================================================================
  3646. # ** Game Temp
  3647. #==============================================================================
  3648. class Game_Temp
  3649.  
  3650.   attr_accessor :cache_bhud_sprites
  3651.  
  3652.   #--------------------------------------------------------------------------
  3653.   # * Cache Battle Hud
  3654.   #--------------------------------------------------------------------------  
  3655.   def cache_battle_hud      
  3656.       execute_cache_bhud_sprites if @cache_bhud_sprites == nil
  3657.   end
  3658.  
  3659.   #--------------------------------------------------------------------------
  3660.   # * Execute Cache Bhud Sprites
  3661.   #--------------------------------------------------------------------------  
  3662.   def execute_cache_bhud_sprites
  3663.       @cache_bhud_sprites = []
  3664.       windows = ["Layout_Command","Layout_Party","Layout_Help",
  3665.       "Layout_Target_Actor","Layout_Target_Enemy","Layout_Skill",
  3666.       "Layout_Item"]
  3667.       for s in windows
  3668.           @cache_bhud_sprites.push(Cache.battle_hud(s)) rescue nil
  3669.       end
  3670.       sprites = ["Layout","Layout_2",
  3671.      "MP_Number","Max_MP_Number","MP_Icon","MP_Icon_EX","MP_Icon_Number",
  3672.      "TP_Number","Max_TP_Number","TP_Icon","TP_Icon_EX","TP_Icon_Number",  
  3673.      "AT_Number","Max_AT_Number","AT_Icon","AT_Icon_EX","AT_Icon_Number",  
  3674.      "LV_Number","Turn","Iconset","Layout_Screen"
  3675.       ]
  3676.       for s in sprites
  3677.           @cache_bhud_sprites.push(Cache.battle_hud(s)) rescue nil
  3678.       end      
  3679.   end
  3680.  
  3681. end
  3682.  
  3683. #==============================================================================
  3684. # ** Spriteset_Map
  3685. #==============================================================================
  3686. class Spriteset_Map
  3687.  
  3688.   #--------------------------------------------------------------------------
  3689.   # * Initialize
  3690.   #--------------------------------------------------------------------------
  3691.   alias mog_monogatari_bhud_initialize initialize
  3692.   def initialize
  3693.       $game_temp.cache_battle_hud
  3694.       mog_monogatari_bhud_initialize
  3695.   end
  3696.  
  3697. end
  3698.  
  3699. #==============================================================================
  3700. #==============================================================================
  3701. # ** Battle Hud EX
  3702. #==============================================================================
  3703. #==============================================================================
  3704. class Battle_Hud_EX
  3705.  
  3706.   #--------------------------------------------------------------------------
  3707.   # * Pre Cache
  3708.   #--------------------------------------------------------------------------
  3709.   def pre_cache
  3710.       $game_temp.cache_battle_hud
  3711.       @force_hide = false
  3712.       @force_hide_time = 0
  3713.       @fade_hud = false
  3714.       @fade_hud_gold = false     
  3715.       @fade_hud_equip = false
  3716.       @layout_image = Cache.battle_hud("Layout")
  3717.       @layout_cw = @layout_image.width
  3718.       @layout_ch = @layout_image.height
  3719.       @layout2_image = Cache.battle_hud("Layout_2") rescue nil
  3720.       @layout2_cw = @layout2_image.width if @layout2_image != nil
  3721.       @layout2_ch = @layout2_image.height if @layout2_image != nil
  3722.       @layout2_cw = 0 if @layout2_cw == nil      
  3723.       #------------------------------------------------
  3724.       # HP
  3725.       #------------------------------------------------
  3726.       if HP_NUMBER_VISIBLE
  3727.          @hp_number_image = Cache.battle_hud("HP_Number")
  3728.          @hp_number_cw = @hp_number_image.width / 10
  3729.          if HP_NUMBER_LOW_COLOR
  3730.             @hp_number_ch = @hp_number_image.height / 2
  3731.          else
  3732.             @hp_number_ch = @hp_number_image.height
  3733.          end   
  3734.          @hp_wave_number = HP_NUMBER_WAVE_ALIGN_EFFECT
  3735.          @hp_number_ch += (@hp_number_ch / 2) if @hp_wave_number      
  3736.       end
  3737.       if HP_NUMBER_MAX_VISIBLE
  3738.          @hp_number2_image = Cache.battle_hud("Max_HP_Number")
  3739.          @hp_number2_cw = @hp_number2_image.width / 10
  3740.          @hp_number2_ch = @hp_number2_image.height
  3741.       end
  3742.       if HP_METER_VISIBLE
  3743.          @hp_meter_image = Cache.battle_hud("HP_Meter")
  3744.          if HP_METER_GRADIENT_ANIMATION
  3745.             @hp_meter_cw = @hp_meter_image.width / 3
  3746.          else   
  3747.             @hp_meter_cw = @hp_meter_image.width
  3748.          end   
  3749.          if HP_METER_REDUCTION_ANIMATION
  3750.             @hp_meter_ch = @hp_meter_image.height / 2
  3751.          else
  3752.             @hp_meter_ch = @hp_meter_image.height
  3753.          end  
  3754.       end
  3755.       if HP_ICON_VISIBLE
  3756.          @hp_icon_image = Cache.battle_hud("HP_Icon")
  3757.          @hp_icon_cw = @hp_icon_image.width / 2
  3758.          @hp_icon_ch = @hp_icon_image.height
  3759.       end
  3760.       if HP_ICON_EX_VISIBLE
  3761.          @hp_icon2_image = Cache.battle_hud("HP_Icon_EX")
  3762.          @hp_icon2_cw = @hp_icon2_image.width
  3763.          @hp_icon2_ch = @hp_icon2_image.height        
  3764.       end      
  3765.       if HP_ICON_NUMBER_VISIBLE
  3766.          @hp_icon_number_image = Cache.battle_hud("HP_Icon_Number")
  3767.          @hp_icon_number_cw = @hp_icon_number_image.width / 10
  3768.          @hp_icon_number_ch = @hp_icon_number_image.height        
  3769.       end
  3770.       #------------------------------------------------
  3771.       # MP
  3772.       #------------------------------------------------
  3773.       if MP_NUMBER_VISIBLE
  3774.          @mp_number_image = Cache.battle_hud("MP_Number")
  3775.          @mp_number_cw = @mp_number_image.width / 10
  3776.          if MP_NUMBER_LOW_COLOR
  3777.             @mp_number_ch = @mp_number_image.height / 2
  3778.          else
  3779.             @mp_number_ch = @mp_number_image.height
  3780.         end
  3781.         @mp_wave_number = MP_NUMBER_WAVE_ALIGN_EFFECT
  3782.         @mp_number_ch += (@mp_number_ch / 2) if @mp_wave_number
  3783.       end
  3784.       if MP_NUMBER_MAX_VISIBLE
  3785.          @mp_number2_image = Cache.battle_hud("Max_MP_Number")
  3786.          @mp_number2_cw = @mp_number2_image.width / 10
  3787.          @mp_number2_ch = @mp_number2_image.height
  3788.       end
  3789.       if MP_METER_VISIBLE
  3790.          @mp_meter_image = Cache.battle_hud("MP_Meter")
  3791.          if MP_METER_GRADIENT_ANIMATION
  3792.             @mp_meter_cw = @mp_meter_image.width / 3
  3793.          else   
  3794.             @mp_meter_cw = @mp_meter_image.width
  3795.          end  
  3796.          if MP_METER_REDUCTION_ANIMATION
  3797.             @mp_meter_ch = @mp_meter_image.height / 2
  3798.          else
  3799.             @mp_meter_ch = @mp_meter_image.height
  3800.          end
  3801.       end
  3802.       if MP_ICON_VISIBLE
  3803.          @mp_icon_image = Cache.battle_hud("MP_Icon")
  3804.          @mp_icon_cw = @mp_icon_image.width / 2
  3805.          @mp_icon_ch = @mp_icon_image.height
  3806.       end
  3807.       if MP_ICON_EX_VISIBLE
  3808.          @mp_icon2_image = Cache.battle_hud("MP_Icon_EX")
  3809.          @mp_icon2_cw = @mp_icon2_image.width
  3810.          @mp_icon2_ch = @mp_icon2_image.height        
  3811.       end      
  3812.       if MP_ICON_NUMBER_VISIBLE
  3813.          @mp_icon_number_image = Cache.battle_hud("MP_Icon_Number")
  3814.          @mp_icon_number_cw = @mp_icon_number_image.width / 10
  3815.          @mp_icon_number_ch = @mp_icon_number_image.height        
  3816.       end
  3817.       #------------------------------------------------
  3818.       # TP
  3819.       #------------------------------------------------
  3820.       if TP_NUMBER_VISIBLE
  3821.          @tp_number_image = Cache.battle_hud("TP_Number")
  3822.          @tp_number_cw = @tp_number_image.width / 10
  3823.          if TP_NUMBER_LOW_COLOR
  3824.             @tp_number_ch = @tp_number_image.height / 2
  3825.          else
  3826.             @tp_number_ch = @tp_number_image.height
  3827.          end  
  3828.         @tp_wave_number = TP_NUMBER_WAVE_ALIGN_EFFECT
  3829.         @tp_number_ch += (@tp_number_ch / 2) if @tp_wave_number      
  3830.       end
  3831.       if TP_NUMBER_MAX_VISIBLE
  3832.          @tp_number2_image = Cache.battle_hud("Max_TP_Number")
  3833.          @tp_number2_cw = @tp_number2_image.width / 10
  3834.          @tp_number2_ch = @tp_number2_image.height
  3835.       end
  3836.       if TP_METER_VISIBLE
  3837.          @tp_meter_image = Cache.battle_hud("TP_Meter")
  3838.          if TP_METER_GRADIENT_ANIMATION
  3839.             @tp_meter_cw = @tp_meter_image.width / 3
  3840.          else   
  3841.             @tp_meter_cw = @tp_meter_image.width
  3842.          end  
  3843.          if TP_METER_REDUCTION_ANIMATION
  3844.             @tp_meter_ch = @tp_meter_image.height / 2      
  3845.          else
  3846.             @tp_meter_ch = @tp_meter_image.height
  3847.          end   
  3848.       end        
  3849.       if TP_ICON_VISIBLE
  3850.          @tp_icon_image = Cache.battle_hud("TP_Icon")
  3851.          @tp_icon_cw = @tp_icon_image.width / 2
  3852.          @tp_icon_ch = @tp_icon_image.height
  3853.       end  
  3854.       if TP_ICON_EX_VISIBLE
  3855.          @tp_icon2_image = Cache.battle_hud("TP_Icon_EX")
  3856.          @tp_icon2_cw = @tp_icon2_image.width
  3857.          @tp_icon2_ch = @tp_icon2_image.height        
  3858.       end      
  3859.       if TP_ICON_NUMBER_VISIBLE
  3860.          @tp_icon_number_image = Cache.battle_hud("TP_Icon_Number")
  3861.          @tp_icon_number_cw = @tp_icon_number_image.width / 10
  3862.          @tp_icon_number_ch = @tp_icon_number_image.height        
  3863.       end
  3864.       #------------------------------------------------
  3865.       # AT
  3866.       #------------------------------------------------
  3867.       if AT_NUMBER_VISIBLE
  3868.          @at_number_image = Cache.battle_hud("AT_Number")
  3869.          @at_number_cw = @at_number_image.width / 10
  3870.          @at_number_ch = @at_number_image.height
  3871.          @at_wave_number = AT_NUMBER_WAVE_ALIGN_EFFECT
  3872.          @at_number_ch += (@at_number_ch / 2) if @at_wave_number      
  3873.       end
  3874.       if AT_NUMBER_MAX_VISIBLE
  3875.          @at_number2_image = Cache.battle_hud("Max_AT_Number")
  3876.          @at_number2_cw = @at_number2_image.width / 10
  3877.          @at_number2_ch = @at_number2_image.height
  3878.       end
  3879.       if AT_METER_VISIBLE
  3880.          @at_meter_image = Cache.battle_hud("AT_Meter")
  3881.          if AT_METER_GRADIENT_ANIMATION
  3882.             @at_meter_cw = @at_meter_image.width / 3
  3883.          else   
  3884.             @at_meter_cw = @at_meter_image.width
  3885.          end   
  3886.          @at_meter_ch = @at_meter_image.height / 3
  3887.       end
  3888.       #------------------------------------------------
  3889.       # LV
  3890.       #------------------------------------------------  
  3891.       if LEVEL_NUMBER_VISIBLE
  3892.          @lv_number_image = Cache.battle_hud("LV_Number")
  3893.          @lv_number_cw = @lv_number_image.width / 10
  3894.          @lv_number_ch = @lv_number_image.height
  3895.       end      
  3896.       #------------------------------------------------
  3897.       # ICON
  3898.       #------------------------------------------------  
  3899.       if STATES_VISIBLE or EQUIPMENT_VISIBLE
  3900.          @icon_image = Cache.system("Iconset")
  3901.       end         
  3902.   end
  3903.  
  3904.   #--------------------------------------------------------------------------
  3905.   # * Check Icon Image
  3906.   #--------------------------------------------------------------------------         
  3907.   def check_icon_image
  3908.       if @icon_image == nil or @icon_image.disposed?
  3909.          @icon_image = Cache.system("Iconset")
  3910.       end   
  3911.   end  
  3912.  
  3913. end
  3914.  
  3915. #==============================================================================
  3916. #==============================================================================
  3917. # ** Battle Hud EX
  3918. #==============================================================================
  3919. #==============================================================================
  3920. class Battle_Hud_EX
  3921.  
  3922.   #--------------------------------------------------------------------------
  3923.   # * Update Number
  3924.   #--------------------------------------------------------------------------   
  3925.   def update_number(type,value)
  3926.       actor_value = @actor.hp if type == 0
  3927.       actor_value = @actor.mp if type == 1
  3928.       actor_value = @actor.tp if type == 2
  3929.       actor_value = @actor.mhp if type == 3
  3930.       actor_value = @actor.mmp if type == 4
  3931.       actor_value = @actor.max_tp if type == 5
  3932.       actor_value = actor_at if type == 6
  3933.       actor_value = actor_max_at if type == 7
  3934.       if value < actor_value
  3935.          value += number_refresh_speed(actor_value,value)
  3936.          value = actor_value if value >= actor_value
  3937.          refresh_sprite_number(type,value)
  3938.      elsif value > actor_value
  3939.          value -= number_refresh_speed(actor_value,value)
  3940.          value = actor_value if value <= actor_value
  3941.          refresh_sprite_number(type,value)
  3942.      end  
  3943.   end
  3944.  
  3945.   #--------------------------------------------------------------------------
  3946.   # * Number Refresh Speed
  3947.   #--------------------------------------------------------------------------      
  3948.   def number_refresh_speed(actor_value,value)
  3949.       n =  1 * (actor_value - value).abs / 10
  3950.       return [[n, 99999999].min,1].max   
  3951.   end
  3952.  
  3953.   #--------------------------------------------------------------------------
  3954.   # * Update Number Fix
  3955.   #--------------------------------------------------------------------------      
  3956.   def update_number_fix(type)
  3957.       if type == 0
  3958.          @hp_number_old =  @actor.hp
  3959.          @hp_number_refresh = true
  3960.       elsif type == 1
  3961.          @mp_number_old =  @actor.mp
  3962.          @mp_number_refresh = true
  3963.       elsif type == 2
  3964.          @tp_number_old =  @actor.tp
  3965.          @tp_number_refresh = true  
  3966.       elsif type == 3
  3967.          @hp_number2_old =  @actor.mhp
  3968.          @hp_number2_refresh = true
  3969.       elsif type == 4
  3970.          @mp_number2_old =  @actor.mmp
  3971.          @mp_number2_refresh = true
  3972.       elsif type == 5
  3973.          @tp_number2_old =  @actor.max_tp
  3974.          @tp_number2_refresh = true  
  3975.       elsif type == 6
  3976.          @at_number_old =  actor_at
  3977.          @at_number_refresh = true         
  3978.       elsif type == 7
  3979.          @at_number2_old = actor_max_at
  3980.          @at_number2_refresh = true            
  3981.       end   
  3982.   end  
  3983.  
  3984.   #--------------------------------------------------------------------------
  3985.   # * Refresh Sprite Number
  3986.   #--------------------------------------------------------------------------   
  3987.   def refresh_sprite_number(type,value)   
  3988.       @hp_number_refresh = true if type == 0
  3989.       @hp_number_old = value if type == 0
  3990.       @mp_number_refresh = true if type == 1
  3991.       @mp_number_old = value if type == 1
  3992.       @tp_number_refresh = true if type == 2
  3993.       @tp_number_old = value if type == 2
  3994.       @hp_number2_refresh = true if type == 3
  3995.       @hp_number2_old = value if type == 3
  3996.       @mp_number2_refresh = true if type == 4
  3997.       @mp_number2_old = value if type == 4
  3998.       @tp_number2_refresh = true if type == 5
  3999.       @tp_number2_old = value if type == 5
  4000.       @at_number_refresh = true if type == 6
  4001.       @at_number_old = value if type == 6
  4002.       @at_number2_refresh = true if type == 7
  4003.       @at_number2_old = value if type == 7
  4004.   end  
  4005.  
  4006.   #--------------------------------------------------------------------------
  4007.   # * Refresh Number
  4008.   #--------------------------------------------------------------------------   
  4009.   def refresh_number(type,value,sprite,image,number_cw,number_ch,wave_number = false)
  4010.       sprite.bitmap.clear
  4011.       clear_number_refresh(type)
  4012.       number_color = low_number_color(type,number_ch)
  4013.       if type == 0 and HP_NUMBER_PERCENTAGE
  4014.          value_max = @actor.mhp
  4015.          value = value.to_f / value_max.to_f * 100
  4016.          value = 1 if (value < 0 and @actor.hp > 0) or @actor.hp == 1
  4017.       elsif type == 1 and MP_NUMBER_PERCENTAGE
  4018.          value_max = @actor.mmp
  4019.          value = value.to_f / value_max.to_f * 100
  4020.       elsif type == 2 and TP_NUMBER_PERCENTAGE
  4021.          value_max = @actor.max_tp
  4022.          value = value.to_f / value_max.to_f * 100  
  4023.       elsif type == 3 and HP_NUMBER_PERCENTAGE
  4024.          value = 100
  4025.       elsif type == 4 and MP_NUMBER_PERCENTAGE
  4026.          value = 100
  4027.       elsif type == 5 and TP_NUMBER_PERCENTAGE
  4028.          value = 100
  4029.       elsif type == 6 and AT_NUMBER_PERCENTAGE
  4030.          value_max = actor_max_at
  4031.          value = value.to_f / value_max.to_f * 100
  4032.       elsif type == 7 and AT_NUMBER_PERCENTAGE
  4033.          value = 100         
  4034.       end
  4035.       value = 9999999 if value > 9999999
  4036.       number_value = value.truncate.abs.to_s.split(//)
  4037.       wave_h = 0
  4038.       wave_h2 = wave_number ? (number_ch / 3) : 0
  4039.       wave_h3 = number_color != 0 ? wave_h2 : 0
  4040.       for r in 0..number_value.size - 1         
  4041.          number_value_abs = number_value[r].to_i
  4042.          wh = wave_h2 * wave_h
  4043.          wh2 = wave_h == 0 ? wave_h2 : 0
  4044.          nsrc_rect = Rect.new(number_cw * number_value_abs, number_color - wave_h3, number_cw, number_ch - wh2)
  4045.          sprite.bitmap.blt(number_cw *  r, wh, image, nsrc_rect)
  4046.          wave_h = wave_h == 0 ? 1 : 0
  4047.       end
  4048.       refresh_number_position(type,number_value.size,number_cw)
  4049.   end
  4050.  
  4051.   #--------------------------------------------------------------------------
  4052.   # * Refresh Number
  4053.   #--------------------------------------------------------------------------     
  4054.   def refresh_number_position(type,number_value,number_cw)
  4055.       cx = number_value * number_cw
  4056.       if type == 0
  4057.          case HP_NUMBER_ALIGN_TYPE
  4058.            when 0; @hp_number.x = @hud_position[0] + HP_NUMBER_POSITION[0]
  4059.            when 1; @hp_number.x = @hud_position[0] + HP_NUMBER_POSITION[0] - (cx / 2)
  4060.            when 2; @hp_number.x = @hud_position[0] + HP_NUMBER_POSITION[0] - cx
  4061.          end            
  4062.       elsif type == 1
  4063.          case MP_NUMBER_ALIGN_TYPE
  4064.            when 0; @mp_number.x = @hud_position[0] + MP_NUMBER_POSITION[0]
  4065.            when 1; @mp_number.x = @hud_position[0] + MP_NUMBER_POSITION[0] - (cx / 2)
  4066.            when 2; @mp_number.x = @hud_position[0] + MP_NUMBER_POSITION[0] - cx
  4067.          end     
  4068.       elsif type == 2  
  4069.          case TP_NUMBER_ALIGN_TYPE
  4070.            when 0; @tp_number.x = @hud_position[0] + TP_NUMBER_POSITION[0]
  4071.            when 1; @tp_number.x = @hud_position[0] + TP_NUMBER_POSITION[0] - (cx / 2)
  4072.            when 2; @tp_number.x = @hud_position[0] + TP_NUMBER_POSITION[0] - cx
  4073.          end           
  4074.       elsif type == 3   
  4075.          case HP_NUMBER_ALIGN_TYPE
  4076.            when 0; @hp_number2.x = @hud_position[0] + HP_NUMBER_MAX_POSITION[0]
  4077.            when 1; @hp_number2.x = @hud_position[0] + HP_NUMBER_MAX_POSITION[0] - (cx / 2)
  4078.            when 2; @hp_number2.x = @hud_position[0] + HP_NUMBER_MAX_POSITION[0] - cx
  4079.          end           
  4080.       elsif type ==  4
  4081.          case MP_NUMBER_ALIGN_TYPE
  4082.            when 0; @mp_number2.x = @hud_position[0] + MP_NUMBER_MAX_POSITION[0]
  4083.            when 1; @mp_number2.x = @hud_position[0] + MP_NUMBER_MAX_POSITION[0] - (cx / 2)
  4084.            when 2; @mp_number2.x = @hud_position[0] + MP_NUMBER_MAX_POSITION[0] - cx
  4085.          end         
  4086.       elsif type ==  5
  4087.          case TP_NUMBER_ALIGN_TYPE
  4088.            when 0; @tp_number2.x = @hud_position[0] + TP_NUMBER_MAX_POSITION[0]
  4089.            when 1; @tp_number2.x = @hud_position[0] + TP_NUMBER_MAX_POSITION[0] - (cx / 2)
  4090.            when 2; @tp_number2.x = @hud_position[0] + TP_NUMBER_MAX_POSITION[0] - cx
  4091.          end
  4092.       elsif type ==  6     
  4093.          case MP_NUMBER_ALIGN_TYPE
  4094.            when 0; @at_number.x = @hud_position[0] + AT_NUMBER_POSITION[0]
  4095.            when 1; @at_number.x = @hud_position[0] + AT_NUMBER_POSITION[0] - (cx / 2)
  4096.            when 2; @at_number.x = @hud_position[0] + AT_NUMBER_POSITION[0] - cx
  4097.          end            
  4098.       elsif type ==  7     
  4099.          case AT_NUMBER_ALIGN_TYPE
  4100.            when 0; @at_number2.x = @hud_position[0] + AT_NUMBER_POSITION[0]
  4101.            when 1; @at_number2.x = @hud_position[0] + AT_NUMBER_POSITION[0] - (cx / 2)
  4102.            when 2; @at_number2.x = @hud_position[0] + AT_NUMBER_POSITION[0] - cx
  4103.          end
  4104.       end  
  4105.   end
  4106.  
  4107.   #--------------------------------------------------------------------------
  4108.   # * Low Number Color
  4109.   #--------------------------------------------------------------------------      
  4110.   def low_number_color(type,number_ch)
  4111.       if type == 0
  4112.          if HP_NUMBER_LOW_COLOR
  4113.             return @actor.low_hp? ? number_ch : 0
  4114.          else
  4115.             return 0
  4116.          end  
  4117.       elsif type == 1
  4118.          if MP_NUMBER_LOW_COLOR   
  4119.             return @actor.low_mp? ? number_ch : 0
  4120.          else
  4121.             return 0
  4122.          end         
  4123.       elsif type == 2
  4124.          if TP_NUMBER_LOW_COLOR
  4125.             return @actor.low_tp? ? number_ch : 0
  4126.          else
  4127.             return 0
  4128.          end
  4129.       else   
  4130.          return 0  
  4131.       end     
  4132.   end
  4133.  
  4134.   #--------------------------------------------------------------------------
  4135.   # * Clear Number Refresh
  4136.   #--------------------------------------------------------------------------      
  4137.   def clear_number_refresh(type)
  4138.       @hp_number_refresh = false if type == 0
  4139.       @mp_number_refresh = false if type == 1
  4140.       @tp_number_refresh = false if type == 2
  4141.       @hp_number2_refresh = false if type == 3
  4142.       @mp_number2_refresh = false if type == 4
  4143.       @tp_number2_refresh = false if type == 5
  4144.       @at_number_refresh = false if type == 6
  4145.       @at_number2_refresh = false if type == 7
  4146.   end  
  4147.  
  4148.   #--------------------------------------------------------------------------
  4149.   # * Icon Limit
  4150.   #--------------------------------------------------------------------------      
  4151.   def icon_limit(value,value_max)
  4152.       n1 = value / value_max
  4153.       n2 = value - (n1 * value_max)
  4154.       n2 = value_max if (n2 == 0 and value > 0)
  4155.       return n2
  4156.   end  
  4157.  
  4158. end
  4159.  
  4160. #==============================================================================
  4161. #==============================================================================
  4162. # ** Battle Hud EX
  4163. #==============================================================================
  4164. #==============================================================================
  4165. class Battle_Hud_EX
  4166.  
  4167.   #--------------------------------------------------------------------------
  4168.   # * Create Layout
  4169.   #--------------------------------------------------------------------------   
  4170.   def create_layout(viewport)
  4171.       @layout = Sprite.new
  4172.       @layout.bitmap = @layout_image
  4173.       @layout.z = HUD_Z
  4174.       @layout.x = @hud_position[0]
  4175.       @layout.y = @hud_position[1]
  4176.       @layout.opacity = 0
  4177.       @layout.viewport = viewport
  4178.   end   
  4179.  
  4180.   #--------------------------------------------------------------------------
  4181.   # * Update Layout
  4182.   #--------------------------------------------------------------------------   
  4183.   def update_layout
  4184.       return if @layout == nil
  4185.       sprite_visible(@layout)
  4186.   end
  4187.  
  4188.   #--------------------------------------------------------------------------
  4189.   # * Create Layout
  4190.   #--------------------------------------------------------------------------   
  4191.   def create_layout_2(viewport)
  4192.       return if !SECOND_LAYOUT
  4193.       @layout2 = Sprite.new
  4194.       @layout2.bitmap = @layout2_image
  4195.       @layout2.z = HUD_Z + SECOND_LAYOUT_Z
  4196.       @layout2.x = @hud_position[0] + SECOND_LAYOUT_POSITION[0]
  4197.       @layout2.y = @hud_position[1] + SECOND_LAYOUT_POSITION[1]
  4198.       @layout2.opacity = 0
  4199.       @layout2.viewport = viewport
  4200.   end   
  4201.  
  4202.   #--------------------------------------------------------------------------
  4203.   # * Update Layout
  4204.   #--------------------------------------------------------------------------   
  4205.   def update_layout_2
  4206.       return if @layout2 == nil
  4207.       sprite_visible(@layout2)
  4208.   end  
  4209.  
  4210. end
  4211.  
  4212. #==============================================================================
  4213. #==============================================================================
  4214. # ** Battle Hud EX
  4215. #==============================================================================
  4216. #==============================================================================
  4217. class Battle_Hud_EX
  4218.  
  4219.   #--------------------------------------------------------------------------
  4220.   # * Create Name
  4221.   #--------------------------------------------------------------------------      
  4222.   def create_name(viewport)
  4223.       return if !NAME_VISIBLE
  4224.       @name = Sprite.new
  4225.       @name.bitmap = Bitmap.new(160,32)
  4226.       @name.bitmap.font.size = NAME_FONT_SIZE
  4227.       @name.bitmap.font.bold = NAME_FONT_BOLD
  4228.       @name.bitmap.font.italic = NAME_FONT_ITALIC
  4229.       @name.bitmap.font.color = NAME_FONT_COLOR
  4230.       @name.z = HUD_Z + NAME_Z
  4231.       @name.x = @hud_position[0] + NAME_POSITION[0]
  4232.       @name.y = @hud_position[1] + NAME_POSITION[1]
  4233.       @name.viewport = viewport
  4234.       @name.opacity = 0
  4235.       refresh_name
  4236.   end
  4237.  
  4238.   #--------------------------------------------------------------------------
  4239.   # * Refresh Name
  4240.   #--------------------------------------------------------------------------      
  4241.   def refresh_name
  4242.       return if @name == nil
  4243.       @name.bitmap.clear
  4244.       if NAME_FONT_SHADOW
  4245.          @name.bitmap.font.color = NAME_FONT_SHADOW_COLOR
  4246.          @name.bitmap.draw_text(NAME_FONT_SHADOW_POSITION[0],NAME_FONT_SHADOW_POSITION[1],160,32,@actor.name,NAME_ALIGN_TYPE)
  4247.          @name.bitmap.font.color = NAME_FONT_COLOR
  4248.       end   
  4249.       @name.bitmap.draw_text(0,0,160,32,@actor.name,NAME_ALIGN_TYPE)
  4250.   end
  4251.  
  4252.   #--------------------------------------------------------------------------
  4253.   # * Update Name
  4254.   #--------------------------------------------------------------------------        
  4255.   def update_name
  4256.       return if @name == nil
  4257.       sprite_visible(@name)
  4258.   end
  4259.  
  4260. end
  4261.  
  4262. #==============================================================================
  4263. #==============================================================================
  4264. # ** Battle Hud EX
  4265. #==============================================================================
  4266. #==============================================================================
  4267. class Battle_Hud_EX
  4268.  
  4269.   #--------------------------------------------------------------------------
  4270.   # * Create HP Number
  4271.   #--------------------------------------------------------------------------  
  4272.   def create_hp_number(viewport)
  4273.       return if !HP_NUMBER_VISIBLE
  4274.       @hp_number = Sprite.new
  4275.       @hp_number.bitmap = Bitmap.new(@hp_number_cw * 6,@hp_number_ch)
  4276.       @hp_number.z = HUD_Z + HP_NUMBER_Z
  4277.       @hp_number.x = @hud_position[0] + HP_NUMBER_POSITION[0]
  4278.       @hp_number.y = @hud_position[1] + HP_NUMBER_POSITION[1]
  4279.       @hp_number.viewport = viewport
  4280.       @hp_number.opacity = 0
  4281.   end
  4282.  
  4283.   #--------------------------------------------------------------------------
  4284.   # * Create HP Number Max
  4285.   #--------------------------------------------------------------------------  
  4286.   def create_hp_number_max(viewport)
  4287.       return if !HP_NUMBER_MAX_VISIBLE
  4288.       @hp_number2 = Sprite.new
  4289.       @hp_number2.bitmap = Bitmap.new(@hp_number2_cw * 6,@hp_number2_ch)
  4290.       @hp_number2.z = HUD_Z + HP_NUMBER_Z
  4291.       @hp_number2.x = @hud_position[0] + HP_NUMBER_MAX_POSITION[0]
  4292.       @hp_number2.y = @hud_position[1] + HP_NUMBER_MAX_POSITION[1]
  4293.       @hp_number2.viewport = viewport
  4294.       @hp_number2.opacity = 0
  4295.   end  
  4296.  
  4297.   #--------------------------------------------------------------------------
  4298.   # * Create HP Meter
  4299.   #--------------------------------------------------------------------------   
  4300.   def create_hp_meter(viewport)
  4301.       return if !HP_METER_VISIBLE
  4302.       @hp_flow_max = @hp_meter_cw * 2
  4303.       @hp_flow = rand(@hp_flow_max)
  4304.       @hp_meter = Sprite.new
  4305.       @hp_meter.bitmap = Bitmap.new(@hp_meter_cw,@hp_meter_ch)
  4306.       @hp_meter.z = HUD_Z + HP_METER_Z
  4307.       @hp_meter.x = @hud_position[0] + HP_METER_POSITION[0]
  4308.       @hp_meter.y = @hud_position[1] + HP_METER_POSITION[1]
  4309.       @hp_meter.angle = HP_METER_ANGLE
  4310.       @hp_meter.mirror = HP_METER_MIRROR_EFFECT
  4311.       @hp_meter.viewport = viewport
  4312.       @hp_meter.opacity = 0
  4313.   end
  4314.  
  4315.   #--------------------------------------------------------------------------
  4316.   # ● Update Flow HP
  4317.   #--------------------------------------------------------------------------            
  4318.   def update_flow_hp
  4319.       @hp_meter.bitmap.clear
  4320.       @hp_flow = 0 if !HP_METER_GRADIENT_ANIMATION
  4321.       meter_width = @hp_meter_cw * @actor.hp / @actor.mhp rescue nil
  4322.       meter_width = 0 if meter_width == nil
  4323.       execute_hp_damage_flow(meter_width)      
  4324.       meter_src_rect = Rect.new(@hp_flow, 0,meter_width, @hp_meter_ch)
  4325.       @hp_meter.bitmap.blt(0,0, @hp_meter_image, meter_src_rect)  
  4326.       @hp_flow += 1
  4327.       @hp_flow = 0 if @hp_flow >= @hp_flow_max
  4328.   end  
  4329.  
  4330.   #--------------------------------------------------------------------------
  4331.   # ● Execute HP Damage Flow
  4332.   #--------------------------------------------------------------------------
  4333.   def execute_hp_damage_flow(meter_width)
  4334.       return if !HP_METER_REDUCTION_ANIMATION
  4335.       return if @hp_old_meter == meter_width
  4336.       n = (@hp_old_meter - meter_width).abs * 3 / 100
  4337.       damage_flow = [[n, 2].min,0.5].max
  4338.       @hp_old_meter -= damage_flow
  4339.       @hp_old_meter = meter_width if @hp_old_meter <= meter_width
  4340.       src_rect_old = Rect.new(0,@hp_meter_ch, @hp_old_meter, @hp_meter_ch)
  4341.       @hp_meter.bitmap.blt(0,0, @hp_meter_image, src_rect_old)      
  4342.   end
  4343.  
  4344.   #--------------------------------------------------------------------------
  4345.   # * Create HP Icon
  4346.   #--------------------------------------------------------------------------  
  4347.   def create_hp_icon(viewport)
  4348.       return if !HP_ICON_VISIBLE
  4349.       @hp_icon = Sprite.new
  4350.       icon_width = @hp_icon_col_max * (@hp_icon_cw + HP_ICON_SPACE[0].abs)
  4351.       icon_height = @hp_icon_row_max * (@hp_icon_ch + HP_ICON_SPACE[1].abs)
  4352.       @hp_icon.bitmap = Bitmap.new(icon_width,icon_height)      
  4353.       @hp_icon.z = HUD_Z + HP_ICON_Z
  4354.       @hp_icon.x = @hud_position[0] + HP_ICON_POSITION[0]
  4355.       @hp_icon.y = @hud_position[1] + HP_ICON_POSITION[1]
  4356.       @hp_icon.viewport = viewport
  4357.       @hp_icon.opacity = 0
  4358.   end
  4359.  
  4360.   #--------------------------------------------------------------------------
  4361.   # * Refresh HP Icon
  4362.   #--------------------------------------------------------------------------   
  4363.   def refresh_hp_icon
  4364.       @hp_icon_old = @actor.hp
  4365.       @hp_icon.bitmap.clear
  4366.       max_value = (@actor.mhp / @hp_icon_real_max) * @hp_icon_real_max
  4367.       if @actor.hp > max_value
  4368.          icon_max = icon_limit(@actor.mhp,@hp_icon_real_max)
  4369.       else   
  4370.          icon_max = @actor.mhp
  4371.       end      
  4372.       for i in 0...icon_max
  4373.           break if (i / @hp_icon_col_max) >= @hp_icon_row_max
  4374.           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)
  4375.           ry = (i / @hp_icon_col_max) * (@hp_icon_ch + HP_ICON_SPACE[1])
  4376.           i_scr = Rect.new(0,0,@hp_icon_cw,@hp_icon_ch)
  4377.           @hp_icon.bitmap.blt(rx,ry,@hp_icon_image ,i_scr )      
  4378.       end      
  4379.       icon_max = icon_limit(@actor.hp,@hp_icon_real_max)
  4380.       rx = 0
  4381.       ry = 0
  4382.       for i in 0...icon_max
  4383.           break if (i / @hp_icon_col_max) >= @hp_icon_row_max
  4384.           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)
  4385.           ry = (i / @hp_icon_col_max) * (@hp_icon_ch + HP_ICON_SPACE[1])
  4386.           i_scr = Rect.new(@hp_icon_cw,0,@hp_icon_cw,@hp_icon_ch)
  4387.           @hp_icon.bitmap.blt(rx,ry,@hp_icon_image ,i_scr )
  4388.       end
  4389.       refresh_hp_icon_ex(rx,ry)      
  4390.   end
  4391.  
  4392.   #--------------------------------------------------------------------------
  4393.   # * Create HP Icon EX
  4394.   #--------------------------------------------------------------------------  
  4395.   def create_hp_icon_ex(viewport)
  4396.       return if !HP_ICON_EX_VISIBLE
  4397.       @hp_icon3_anime_phase = 0
  4398.       @hp_icon3 = Sprite.new
  4399.       @hp_icon3.bitmap = Bitmap.new(@hp_icon2_cw,@hp_icon2_ch)
  4400.       @hp_icon3.ox = @hp_icon3.bitmap.width / 2
  4401.       @hp_icon3.oy = @hp_icon3.bitmap.height / 2
  4402.       @hp_icon3.z = HUD_Z + HP_ICON_Z + 2
  4403.       @hp_icon3_org = [@hud_position[0] + HP_ICON_POSITION[0] + HP_ICON_EX_POSITION[0] + @hp_icon3.ox,
  4404.                        @hud_position[1] + HP_ICON_POSITION[1] + HP_ICON_EX_POSITION[1] + @hp_icon3.oy]
  4405.       @hp_icon3.x = @hp_icon3_org[0]
  4406.       @hp_icon3.y = @hp_icon3_org[1]
  4407.       @hp_icon3.viewport = viewport
  4408.       @hp_icon3.opacity = 0
  4409.   end   
  4410.  
  4411.   #--------------------------------------------------------------------------
  4412.   # * Refresh HP Icon EX
  4413.   #--------------------------------------------------------------------------      
  4414.   def refresh_hp_icon_ex(rx,ry)
  4415.       return if @hp_icon3 == nil
  4416.       @hp_icon3.bitmap.clear
  4417.       return if @actor.hp == 0
  4418.       i_scr = Rect.new(0,0,@hp_icon2_cw,@hp_icon2_ch)
  4419.       @hp_icon3.bitmap.blt(0,0, @hp_icon2_image ,i_scr )
  4420.       @hp_icon3.x = @hp_icon3_org[0] + rx
  4421.       @hp_icon3.y = @hp_icon3_org[1] + ry     
  4422.   end
  4423.  
  4424.   #--------------------------------------------------------------------------
  4425.   # * Update Icon HP EX Anime
  4426.   #--------------------------------------------------------------------------  
  4427.   def update_icon_hp_ex_anime
  4428.       return if !HP_ICON_EX_ZOOM_EFFECT
  4429.       if @hp_icon3_anime_phase == 0
  4430.          @hp_icon3.zoom_x += 0.01
  4431.          if @hp_icon3.zoom_x >= 1.30
  4432.             @hp_icon3.zoom_x = 1.30
  4433.             @hp_icon3_anime_phase = 1
  4434.          end  
  4435.       else
  4436.         @hp_icon3.zoom_x -= 0.01
  4437.         if @hp_icon3.zoom_x <= 1.05
  4438.            @hp_icon3.zoom_x = 1.05
  4439.            @hp_icon3_anime_phase = 0
  4440.         end   
  4441.       end  
  4442.       @hp_icon3.zoom_y = @hp_icon3.zoom_x
  4443.   end
  4444.  
  4445.   #--------------------------------------------------------------------------
  4446.   # * Create HP Icon Nummber
  4447.   #--------------------------------------------------------------------------      
  4448.   def create_hp_icon_number(viewport)
  4449.       return if !HP_ICON_NUMBER_VISIBLE
  4450.       @hp_icon_number_old = [-1,-1]
  4451.       @hp_icon_number = Sprite.new
  4452.       @hp_icon_number.bitmap = Bitmap.new(@hp_icon_number_cw * 4,@hp_icon_number_ch)
  4453.       @hp_icon_number.z = HUD_Z + HP_ICON_NUMBER_Z
  4454.       @hp_icon_number.x = @hud_position[0] + HP_ICON_NUMBER_POSITION[0]
  4455.       @hp_icon_number.y = @hud_position[1] + HP_ICON_NUMBER_POSITION[1]
  4456.       @hp_icon_number.viewport = viewport
  4457.       @hp_icon_number.opacity = 0
  4458.   end
  4459.  
  4460.   #--------------------------------------------------------------------------
  4461.   # * Refresh Icon Number HP
  4462.   #--------------------------------------------------------------------------  
  4463.   def refresh_icon_number_hp
  4464.       @hp_icon_number_old[0] = @actor.hp
  4465.       @hp_icon_number_old[1] = @actor.mhp
  4466.       @hp_icon_number.bitmap.clear
  4467.       value = ((@actor.hp - 1) / @hp_icon_col_max) / @hp_icon_row_max
  4468.       value = 0 if value < 0
  4469.       number_value = value.truncate.abs.to_s.split(//)
  4470.       for r in 0..number_value.size - 1         
  4471.          number_value_abs = number_value[r].to_i
  4472.          nsrc_rect = Rect.new(@hp_icon_number_cw * number_value_abs, 0, @hp_icon_number_cw, @hp_icon_number_ch)
  4473.          @hp_icon_number.bitmap.blt(@hp_icon_number_cw *  r, 0, @hp_icon_number_image, nsrc_rect)
  4474.       end
  4475.       cx = (number_value.size * @hp_icon_number_cw)
  4476.       case HP_ICON_NUMBER_ALIGN_TYPE
  4477.          when 0; @hp_icon_number.x = @hud_position[0] + HP_ICON_NUMBER_POSITION[0]
  4478.          when 1; @hp_icon_number.x = @hud_position[0] + HP_ICON_NUMBER_POSITION[0] - (cx / 2)
  4479.          when 2; @hp_icon_number.x = @hud_position[0] + HP_ICON_NUMBER_POSITION[0] - cx
  4480.       end   
  4481.   end
  4482.  
  4483.   #--------------------------------------------------------------------------
  4484.   # * Can Refresh Icon Number HP
  4485.   #--------------------------------------------------------------------------  
  4486.   def can_refresh_icon_number_hp?
  4487.       return true if @hp_icon_number_old[0] != @actor.hp
  4488.       return true if @hp_icon_number_old[1] != @actor.mhp
  4489.       return false
  4490.   end
  4491.  
  4492.   #--------------------------------------------------------------------------
  4493.   # * Update HP
  4494.   #--------------------------------------------------------------------------   
  4495.   def update_hp
  4496.       if @hp_number != nil
  4497.          if HP_NUMBER_ANIMATION
  4498.             update_number(0,@hp_number_old)
  4499.          else   
  4500.             update_number_fix(0) if @hp_number_old != @actor.hp
  4501.          end
  4502.          sprite_visible(@hp_number)  
  4503.          refresh_number(0,@hp_number_old,@hp_number,@hp_number_image,@hp_number_cw,@hp_number_ch,@hp_wave_number) if @hp_number_refresh
  4504.       end
  4505.       if @hp_number2 != nil
  4506.          if HP_NUMBER_ANIMATION
  4507.             update_number(3,@hp_number2_old)
  4508.          else   
  4509.             update_number_fix(3) if @hp_number2_old != @actor.mhp
  4510.          end  
  4511.          refresh_number(3,@hp_number2_old,@hp_number2,@hp_number2_image,@hp_number2_cw,@hp_number2_ch,@hp_wave_number) if @hp_number2_refresh
  4512.          sprite_visible(@hp_number2)
  4513.       end
  4514.       if @hp_meter != nil
  4515.          sprite_visible(@hp_meter)
  4516.          update_flow_hp
  4517.       end   
  4518.       if @hp_icon != nil
  4519.          sprite_visible(@hp_icon)
  4520.          refresh_hp_icon if @hp_icon_old != @actor.hp
  4521.       end
  4522.       if @hp_icon3 != nil
  4523.          sprite_visible(@hp_icon3)
  4524.          update_icon_hp_ex_anime
  4525.       end      
  4526.       if @hp_icon_number != nil
  4527.          sprite_visible(@hp_icon_number)
  4528.          refresh_icon_number_hp if can_refresh_icon_number_hp?
  4529.       end  
  4530.   end  
  4531.  
  4532. end
  4533.  
  4534. #==============================================================================
  4535. #==============================================================================
  4536. # ** Battle Hud EX
  4537. #==============================================================================
  4538. #==============================================================================
  4539. class Battle_Hud_EX
  4540.  
  4541.   #--------------------------------------------------------------------------
  4542.   # * Create MP Number
  4543.   #--------------------------------------------------------------------------  
  4544.   def create_mp_number(viewport)
  4545.       return if !MP_NUMBER_VISIBLE
  4546.       @mp_number = Sprite.new
  4547.       @mp_number.bitmap = Bitmap.new(@mp_number_cw * 6, @mp_number_ch)
  4548.       @mp_number.z = HUD_Z + MP_NUMBER_Z
  4549.       @mp_number.x = @hud_position[0] + MP_NUMBER_POSITION[0]
  4550.       @mp_number.y = @hud_position[1] + MP_NUMBER_POSITION[1]
  4551.       @mp_number.viewport = viewport
  4552.       @mp_number.opacity = 0
  4553.   end
  4554.  
  4555.   #--------------------------------------------------------------------------
  4556.   # * Create MP Number Max
  4557.   #--------------------------------------------------------------------------  
  4558.   def create_mp_number_max(viewport)
  4559.       return if !MP_NUMBER_MAX_VISIBLE
  4560.       @mp_number2 = Sprite.new
  4561.       @mp_number2.bitmap = Bitmap.new(@mp_number2_cw * 6, @mp_number2_ch)
  4562.       @mp_number2.z = HUD_Z + MP_NUMBER_Z
  4563.       @mp_number2.x = @hud_position[0] + MP_NUMBER_MAX_POSITION[0]
  4564.       @mp_number2.y = @hud_position[1] + MP_NUMBER_MAX_POSITION[1]
  4565.       @mp_number2.viewport = viewport
  4566.       @mp_number2.opacity = 0
  4567.   end  
  4568.  
  4569.   #--------------------------------------------------------------------------
  4570.   # * Create MP Meter
  4571.   #--------------------------------------------------------------------------   
  4572.   def create_mp_meter(viewport)
  4573.       return if !MP_METER_VISIBLE
  4574.       @mp_flow_max = @mp_meter_cw * 2
  4575.       @mp_flow = rand(@mp_flow_max)
  4576.       @mp_meter = Sprite.new
  4577.       @mp_meter.bitmap = Bitmap.new(@mp_meter_cw,@mp_meter_ch)
  4578.       @mp_meter.z = HUD_Z + MP_METER_Z
  4579.       @mp_meter.x = @hud_position[0] + MP_METER_POSITION[0]
  4580.       @mp_meter.y = @hud_position[1] + MP_METER_POSITION[1]
  4581.       @mp_meter.angle = MP_METER_ANGLE
  4582.       @mp_meter.mirror = MP_METER_MIRROR_EFFECT
  4583.       @mp_meter.viewport = viewport
  4584.       @mp_meter.opacity = 0
  4585.   end
  4586.  
  4587.   #--------------------------------------------------------------------------
  4588.   # ● Update Flow MP
  4589.   #--------------------------------------------------------------------------            
  4590.   def update_flow_mp
  4591.       @mp_meter.bitmap.clear
  4592.       @mp_flow = 0 if !MP_METER_GRADIENT_ANIMATION
  4593.       meter_width = @mp_meter_cw * @actor.mp / @actor.mmp rescue nil
  4594.       meter_width = 0 if meter_width == nil
  4595.       execute_mp_damage_flow(meter_width)      
  4596.       meter_src_rect = Rect.new(@mp_flow, 0,meter_width, @mp_meter_ch)
  4597.       @mp_meter.bitmap.blt(0,0, @mp_meter_image, meter_src_rect)  
  4598.       @mp_flow += 1
  4599.       @mp_flow = 0 if @mp_flow >= @mp_flow_max
  4600.   end  
  4601.  
  4602.   #--------------------------------------------------------------------------
  4603.   # ● Execute MP Damage Flow
  4604.   #--------------------------------------------------------------------------
  4605.   def execute_mp_damage_flow(meter_width)
  4606.       return if !MP_METER_REDUCTION_ANIMATION
  4607.       return if @mp_old_meter == meter_width
  4608.       n = (@mp_old_meter - meter_width).abs * 3 / 100
  4609.       damage_flow = [[n, 2].min,0.5].max
  4610.       @mp_old_meter -= damage_flow      
  4611.       @mp_old_meter = meter_width if @mp_old_meter <= meter_width
  4612.       src_rect_old = Rect.new(0,@mp_meter_ch, @mp_old_meter, @mp_meter_ch)
  4613.       @mp_meter.bitmap.blt(0,0, @mp_meter_image, src_rect_old)      
  4614.   end
  4615.  
  4616.   #--------------------------------------------------------------------------
  4617.   # * Create MP Icon
  4618.   #--------------------------------------------------------------------------  
  4619.   def create_mp_icon(viewport)
  4620.       return if !MP_ICON_VISIBLE
  4621.       @mp_icon = Sprite.new
  4622.       icon_width = @mp_icon_col_max * (@mp_icon_cw + MP_ICON_SPACE[0].abs)
  4623.       icon_height = @mp_icon_row_max * (@mp_icon_ch + MP_ICON_SPACE[1].abs)
  4624.       @mp_icon.bitmap = Bitmap.new(icon_width,icon_height)      
  4625.       @mp_icon.z = HUD_Z + MP_ICON_Z
  4626.       @mp_icon.x = @hud_position[0] + MP_ICON_POSITION[0]
  4627.       @mp_icon.y = @hud_position[1] + MP_ICON_POSITION[1]
  4628.       @mp_icon.viewport = viewport
  4629.       @mp_icon.opacity = 0
  4630.   end
  4631.  
  4632.   #--------------------------------------------------------------------------
  4633.   # * Refresh MP Icon
  4634.   #--------------------------------------------------------------------------   
  4635.   def refresh_mp_icon
  4636.       @mp_icon_old = @actor.mp
  4637.       @mp_icon.bitmap.clear
  4638.       max_value = (@actor.mmp / @mp_icon_real_max) * @mp_icon_real_max
  4639.       if @actor.mp > max_value
  4640.          icon_max = icon_limit(@actor.mmp,@mp_icon_real_max)
  4641.       else   
  4642.          icon_max = @actor.mmp
  4643.       end      
  4644.       for i in 0...icon_max
  4645.           break if (i / @mp_icon_col_max) >= @mp_icon_row_max
  4646.           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)
  4647.           ry = (i / @mp_icon_col_max) * (@mp_icon_ch + MP_ICON_SPACE[1])
  4648.           i_scr = Rect.new(0,0,@mp_icon_cw,@mp_icon_ch)
  4649.           @mp_icon.bitmap.blt(rx,ry,@mp_icon_image ,i_scr )      
  4650.       end      
  4651.       icon_max = icon_limit(@actor.mp,@mp_icon_real_max)
  4652.       rx = 0
  4653.       ry = 0
  4654.       for i in 0...icon_max
  4655.           break if (i / @mp_icon_col_max) >= @mp_icon_row_max
  4656.           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)
  4657.           ry = (i / @mp_icon_col_max) * (@mp_icon_ch + MP_ICON_SPACE[1])
  4658.           i_scr = Rect.new(@mp_icon_cw,0,@mp_icon_cw,@mp_icon_ch)
  4659.           @mp_icon.bitmap.blt(rx,ry,@mp_icon_image ,i_scr )
  4660.       end
  4661.       refresh_mp_icon_ex(rx,ry)      
  4662.   end
  4663.  
  4664.   #--------------------------------------------------------------------------
  4665.   # * Create MP Icon EX
  4666.   #--------------------------------------------------------------------------  
  4667.   def create_mp_icon_ex(viewport)
  4668.       return if !MP_ICON_EX_VISIBLE
  4669.       @mp_icon3_anime_phase = 0
  4670.       @mp_icon3 = Sprite.new
  4671.       @mp_icon3.bitmap = Bitmap.new(@mp_icon2_cw,@mp_icon2_ch)
  4672.       @mp_icon3.ox = @mp_icon3.bitmap.width / 2
  4673.       @mp_icon3.oy = @mp_icon3.bitmap.height / 2
  4674.       @mp_icon3.z = HUD_Z + MP_ICON_Z + 2
  4675.       @mp_icon3_org = [@hud_position[0] + MP_ICON_POSITION[0] + MP_ICON_EX_POSITION[0] + @mp_icon3.ox,
  4676.                        @hud_position[1] + MP_ICON_POSITION[1] + MP_ICON_EX_POSITION[1] + @mp_icon3.oy]
  4677.       @mp_icon3.x = @mp_icon3_org[0]
  4678.       @mp_icon3.y = @mp_icon3_org[1]
  4679.       @mp_icon3.viewport = viewport
  4680.       @mp_icon3.opacity = 0
  4681.   end   
  4682.  
  4683.   #--------------------------------------------------------------------------
  4684.   # * Refresh MP Icon EX
  4685.   #--------------------------------------------------------------------------      
  4686.   def refresh_mp_icon_ex(rx,ry)
  4687.       return if @mp_icon3 == nil
  4688.       @mp_icon3.bitmap.clear
  4689.       return if @actor.mp == 0
  4690.       i_scr = Rect.new(0,0,@mp_icon2_cw,@mp_icon2_ch)
  4691.       @mp_icon3.bitmap.blt(0,0, @mp_icon2_image ,i_scr )
  4692.       @mp_icon3.x = @mp_icon3_org[0] + rx
  4693.       @mp_icon3.y = @mp_icon3_org[1] + ry     
  4694.   end
  4695.  
  4696.   #--------------------------------------------------------------------------
  4697.   # * Update Icon MP EX Anime
  4698.   #--------------------------------------------------------------------------  
  4699.   def update_icon_mp_ex_anime
  4700.       return if !MP_ICON_EX_ZOOM_EFFECT
  4701.       if @mp_icon3_anime_phase == 0
  4702.          @mp_icon3.zoom_x += 0.01
  4703.          if @mp_icon3.zoom_x >= 1.30
  4704.             @mp_icon3.zoom_x = 1.30
  4705.             @mp_icon3_anime_phase = 1
  4706.          end  
  4707.       else
  4708.         @mp_icon3.zoom_x -= 0.01
  4709.         if @mp_icon3.zoom_x <= 1.05
  4710.            @mp_icon3.zoom_x = 1.05
  4711.            @mp_icon3_anime_phase = 0
  4712.         end   
  4713.       end  
  4714.       @mp_icon3.zoom_y = @mp_icon3.zoom_x
  4715.   end  
  4716.  
  4717.   #--------------------------------------------------------------------------
  4718.   # * Create MP Icon Number
  4719.   #--------------------------------------------------------------------------      
  4720.   def create_mp_icon_number(viewport)
  4721.       return if !MP_ICON_NUMBER_VISIBLE
  4722.       @mp_icon_number_old = [-1,-1]
  4723.       @mp_icon_number = Sprite.new
  4724.       @mp_icon_number.bitmap = Bitmap.new(@mp_icon_number_cw * 4,@mp_icon_number_ch)
  4725.       @mp_icon_number.z = HUD_Z + MP_ICON_NUMBER_Z
  4726.       @mp_icon_number.x = @hud_position[0] + MP_ICON_NUMBER_POSITION[0]
  4727.       @mp_icon_number.y = @hud_position[1] + MP_ICON_NUMBER_POSITION[1]
  4728.       @mp_icon_number.viewport = viewport
  4729.       @mp_icon_number.opacity = 0
  4730.   end
  4731.  
  4732.   #--------------------------------------------------------------------------
  4733.   # * Refresh Icon Number MP
  4734.   #--------------------------------------------------------------------------  
  4735.   def refresh_icon_number_mp
  4736.       @mp_icon_number_old[0] = @actor.mp
  4737.       @mp_icon_number_old[1] = @actor.mmp
  4738.       @mp_icon_number.bitmap.clear
  4739.       value = ((@actor.mp - 1) / @mp_icon_col_max) / @mp_icon_row_max
  4740.       value = 0 if value < 0
  4741.       number_value = value.truncate.abs.to_s.split(//)
  4742.       for r in 0..number_value.size - 1         
  4743.          number_value_abs = number_value[r].to_i
  4744.          nsrc_rect = Rect.new(@mp_icon_number_cw * number_value_abs, 0, @mp_icon_number_cw, @mp_icon_number_ch)
  4745.          @mp_icon_number.bitmap.blt(@mp_icon_number_cw *  r, 0, @mp_icon_number_image, nsrc_rect)
  4746.       end
  4747.       cx = (number_value.size * @mp_icon_number_cw)
  4748.       case MP_ICON_NUMBER_ALIGN_TYPE
  4749.          when 0; @mp_icon_number.x = @hud_position[0] + MP_ICON_NUMBER_POSITION[0]
  4750.          when 1; @mp_icon_number.x = @hud_position[0] + MP_ICON_NUMBER_POSITION[0] - (cx / 2)
  4751.          when 2; @mp_icon_number.x = @hud_position[0] + MP_ICON_NUMBER_POSITION[0] - cx
  4752.       end        
  4753.   end
  4754.  
  4755.   #--------------------------------------------------------------------------
  4756.   # * Can Refresh Icon Number MP
  4757.   #--------------------------------------------------------------------------  
  4758.   def can_refresh_icon_number_mp?
  4759.       return true if @mp_icon_number_old[0] != @actor.mp
  4760.       return true if @mp_icon_number_old[1] != @actor.mmp
  4761.       return false
  4762.   end   
  4763.  
  4764.   #--------------------------------------------------------------------------
  4765.   # * Update MP
  4766.   #--------------------------------------------------------------------------   
  4767.   def update_mp
  4768.       if @mp_number != nil
  4769.          sprite_visible(@mp_number)
  4770.          if MP_NUMBER_ANIMATION
  4771.             update_number(1,@mp_number_old)
  4772.          else
  4773.             update_number_fix(1) if @mp_number_old != @actor.mp
  4774.          end  
  4775.          refresh_number(1,@mp_number_old,@mp_number,@mp_number_image,@mp_number_cw,@mp_number_ch,@mp_wave_number) if @mp_number_refresh
  4776.       end
  4777.       if @mp_number2 != nil
  4778.          sprite_visible(@mp_number2)
  4779.          if MP_NUMBER_ANIMATION
  4780.             update_number(4,@mp_number2_old)
  4781.          else
  4782.             update_number_fix(4) if @mp_number2_old != @actor.mmp
  4783.          end  
  4784.          refresh_number(4,@mp_number2_old,@mp_number2,@mp_number2_image,@mp_number2_cw,@mp_number2_ch,@mp_wave_number) if @mp_number2_refresh
  4785.       end      
  4786.       if @mp_meter != nil
  4787.          sprite_visible(@mp_meter)
  4788.          update_flow_mp
  4789.       end
  4790.       if @mp_icon != nil
  4791.          sprite_visible(@mp_icon)
  4792.          refresh_mp_icon if @mp_icon_old != @actor.mp
  4793.       end
  4794.       if @mp_icon3 != nil
  4795.          sprite_visible(@mp_icon3)
  4796.          update_icon_mp_ex_anime
  4797.       end         
  4798.       if @mp_icon_number != nil
  4799.          sprite_visible(@mp_icon_number)
  4800.          refresh_icon_number_mp if can_refresh_icon_number_mp?
  4801.       end      
  4802.   end  
  4803.  
  4804. end
  4805.  
  4806. #==============================================================================
  4807. #==============================================================================
  4808. # ** Battle Hud EX
  4809. #==============================================================================
  4810. #==============================================================================
  4811. class Battle_Hud_EX
  4812.  
  4813.   #--------------------------------------------------------------------------
  4814.   # * Create TP Number
  4815.   #--------------------------------------------------------------------------  
  4816.   def create_tp_number(viewport)
  4817.       return if !TP_NUMBER_VISIBLE
  4818.       @tp_number = Sprite.new
  4819.       @tp_number.bitmap = Bitmap.new(@tp_number_cw * 6, @tp_number_ch)
  4820.       @tp_number.z = HUD_Z + TP_NUMBER_Z
  4821.       @tp_number.x = @hud_position[0] + TP_NUMBER_POSITION[0]
  4822.       @tp_number.y = @hud_position[1] + TP_NUMBER_POSITION[1]
  4823.       @tp_number.viewport = viewport
  4824.       @tp_number.opacity = 0
  4825.   end
  4826.  
  4827.   #--------------------------------------------------------------------------
  4828.   # * Create TP Number MAX
  4829.   #--------------------------------------------------------------------------  
  4830.   def create_tp_number_max(viewport)
  4831.       return if !TP_NUMBER_MAX_VISIBLE
  4832.       @tp_number2 = Sprite.new
  4833.       @tp_number2.bitmap = Bitmap.new(@tp_number2_cw * 6, @tp_number2_ch)
  4834.       @tp_number2.z = HUD_Z + TP_NUMBER_Z
  4835.       @tp_number2.x = @hud_position[0] + TP_NUMBER_MAX_POSITION[0]
  4836.       @tp_number2.y = @hud_position[1] + TP_NUMBER_MAX_POSITION[1]
  4837.       @tp_number2.viewport = viewport
  4838.       @tp_number2.opacity = 0
  4839.   end  
  4840.  
  4841.   #--------------------------------------------------------------------------
  4842.   # * Create TP Meter
  4843.   #--------------------------------------------------------------------------   
  4844.   def create_tp_meter(viewport)
  4845.       return if !TP_METER_VISIBLE
  4846.       @tp_flow_max = @tp_meter_cw * 2
  4847.       @tp_flow = rand(@tp_flow_max)
  4848.       @tp_meter = Sprite.new
  4849.       @tp_meter.bitmap = Bitmap.new(@tp_meter_cw,@tp_meter_ch)
  4850.       @tp_meter.z = HUD_Z + TP_METER_Z
  4851.       @tp_meter.x = @hud_position[0] + TP_METER_POSITION[0]
  4852.       @tp_meter.y = @hud_position[1] + TP_METER_POSITION[1]
  4853.       @tp_meter.angle = TP_METER_ANGLE
  4854.       @tp_meter.mirror = TP_METER_MIRROR_EFFECT
  4855.       @tp_meter.viewport = viewport
  4856.       @tp_meter.opacity = 0
  4857.   end
  4858.  
  4859.   #--------------------------------------------------------------------------
  4860.   # ● Update Flow TP
  4861.   #--------------------------------------------------------------------------            
  4862.   def update_flow_tp
  4863.       @tp_meter.bitmap.clear      
  4864.       @tp_flow = 0 if !TP_METER_GRADIENT_ANIMATION
  4865.       meter_width = @tp_meter_cw * @actor.tp / @actor.max_tp rescue nil  
  4866.       meter_width = 0 if meter_width == nil
  4867.       execute_tp_damage_flow(meter_width)      
  4868.       meter_src_rect = Rect.new(@tp_flow, 0,meter_width, @tp_meter_ch)
  4869.       @tp_meter.bitmap.blt(0,0, @tp_meter_image, meter_src_rect)  
  4870.       @tp_flow += 1
  4871.       @tp_flow = 0 if @tp_flow >= @tp_flow_max
  4872.   end  
  4873.  
  4874.   #--------------------------------------------------------------------------
  4875.   # ● Execute TP Damage Flow
  4876.   #--------------------------------------------------------------------------
  4877.   def execute_tp_damage_flow(meter_width)
  4878.       return if !TP_METER_REDUCTION_ANIMATION
  4879.       return if @tp_old_meter == meter_width
  4880.       n = (@tp_old_meter - meter_width).abs * 3 / 100
  4881.       damage_flow = [[n, 2].min,0.5].max
  4882.       @tp_old_meter -= damage_flow
  4883.       @tp_old_meter = meter_width if @tp_old_meter <= meter_width
  4884.       src_rect_old = Rect.new(0,@tp_meter_ch, @tp_old_meter, @tp_meter_ch)
  4885.       @tp_meter.bitmap.blt(0,0, @tp_meter_image, src_rect_old)      
  4886.   end
  4887.  
  4888.   #--------------------------------------------------------------------------
  4889.   # * Create TP Icon
  4890.   #--------------------------------------------------------------------------  
  4891.   def create_tp_icon(viewport)
  4892.       return if !TP_ICON_VISIBLE
  4893.       @tp_icon = Sprite.new
  4894.       icon_width = @tp_icon_col_max * (@tp_icon_cw + TP_ICON_SPACE[0].abs)
  4895.       icon_height = @tp_icon_row_max * (@tp_icon_ch + TP_ICON_SPACE[1].abs)
  4896.       @tp_icon.bitmap = Bitmap.new(icon_width,icon_height)      
  4897.       @tp_icon.z = HUD_Z + TP_ICON_Z
  4898.       @tp_icon.x = @hud_position[0] + TP_ICON_POSITION[0]
  4899.       @tp_icon.y = @hud_position[1] + TP_ICON_POSITION[1]
  4900.       @tp_icon.viewport = viewport
  4901.       @tp_icon.opacity = 0
  4902.   end
  4903.  
  4904.   #--------------------------------------------------------------------------
  4905.   # * Refresh TP Icon
  4906.   #--------------------------------------------------------------------------   
  4907.   def refresh_tp_icon
  4908.       @tp_icon_old = @actor.tp
  4909.       @tp_icon.bitmap.clear
  4910.       max_value = (@actor.max_tp / @tp_icon_real_max) * @tp_icon_real_max
  4911.       if @actor.mp > max_value
  4912.          icon_max = icon_limit(@actor.max_tp,@tp_icon_real_max)
  4913.       else   
  4914.          icon_max = @actor.max_tp
  4915.       end      
  4916.       for i in 0...icon_max
  4917.           break if (i / @tp_icon_col_max) >= @tp_icon_row_max
  4918.           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)
  4919.           ry = (i / @tp_icon_col_max) * (@tp_icon_ch + TP_ICON_SPACE[1])
  4920.           i_scr = Rect.new(0,0,@tp_icon_cw,@tp_icon_ch)
  4921.           @tp_icon.bitmap.blt(rx,ry,@tp_icon_image ,i_scr )      
  4922.       end      
  4923.       icon_max = icon_limit(@actor.tp,@tp_icon_real_max)
  4924.       rx = 0
  4925.       ry = 0
  4926.       for i in 0...icon_max
  4927.           break if (i / @tp_icon_col_max) >= @tp_icon_row_max
  4928.           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)
  4929.           ry = (i / @tp_icon_col_max) * (@tp_icon_ch + TP_ICON_SPACE[1])
  4930.           i_scr = Rect.new(@mp_icon_cw,0,@tp_icon_cw,@tp_icon_ch)
  4931.           @tp_icon.bitmap.blt(rx,ry,@tp_icon_image ,i_scr )
  4932.       end
  4933.       refresh_tp_icon_ex(rx,ry)      
  4934.   end
  4935.  
  4936.   #--------------------------------------------------------------------------
  4937.   # * Create TP Icon EX
  4938.   #--------------------------------------------------------------------------  
  4939.   def create_tp_icon_ex(viewport)
  4940.       return if !TP_ICON_EX_VISIBLE
  4941.       @tp_icon3_anime_phase = 0
  4942.       @tp_icon3 = Sprite.new
  4943.       @tp_icon3.bitmap = Bitmap.new(@tp_icon2_cw,@tp_icon2_ch)
  4944.       @tp_icon3.ox = @tp_icon3.bitmap.width / 2
  4945.       @tp_icon3.oy = @tp_icon3.bitmap.height / 2
  4946.       @tp_icon3.z = HUD_Z + TP_ICON_Z + 2
  4947.       @tp_icon3_org = [@hud_position[0] + TP_ICON_POSITION[0] + TP_ICON_EX_POSITION[0] + @tp_icon3.ox,
  4948.                        @hud_position[1] + TP_ICON_POSITION[1] + TP_ICON_EX_POSITION[1] + @tp_icon3.oy]
  4949.       @tp_icon3.x = @tp_icon3_org[0]
  4950.       @tp_icon3.y = @tp_icon3_org[1]
  4951.       @tp_icon3.viewport = viewport
  4952.       @tp_icon3.opacity = 0
  4953.   end   
  4954.  
  4955.   #--------------------------------------------------------------------------
  4956.   # * Refresh TP Icon EX
  4957.   #--------------------------------------------------------------------------      
  4958.   def refresh_tp_icon_ex(rx,ry)
  4959.       return if @tp_icon3 == nil
  4960.       @tp_icon3.bitmap.clear
  4961.       return if @actor.tp == 0
  4962.       i_scr = Rect.new(0,0,@tp_icon2_cw,@tp_icon2_ch)
  4963.       @tp_icon3.bitmap.blt(0,0, @tp_icon2_image ,i_scr )
  4964.       @tp_icon3.x = @tp_icon3_org[0] + rx
  4965.       @tp_icon3.y = @tp_icon3_org[1] + ry     
  4966.   end
  4967.  
  4968.   #--------------------------------------------------------------------------
  4969.   # * Update Icon TP EX Anime
  4970.   #--------------------------------------------------------------------------  
  4971.   def update_icon_tp_ex_anime
  4972.       return if !MP_ICON_EX_ZOOM_EFFECT
  4973.       if @tp_icon3_anime_phase == 0
  4974.          @tp_icon3.zoom_x += 0.01
  4975.          if @tp_icon3.zoom_x >= 1.30
  4976.             @tp_icon3.zoom_x = 1.30
  4977.             @tp_icon3_anime_phase = 1
  4978.          end  
  4979.       else
  4980.         @tp_icon3.zoom_x -= 0.01
  4981.         if @tp_icon3.zoom_x <= 1.05
  4982.            @tp_icon3.zoom_x = 1.05
  4983.            @tp_icon3_anime_phase = 0
  4984.         end   
  4985.       end  
  4986.       @tp_icon3.zoom_y = @tp_icon3.zoom_x
  4987.   end   
  4988.  
  4989.   #--------------------------------------------------------------------------
  4990.   # * Create HP Icon Number
  4991.   #--------------------------------------------------------------------------      
  4992.   def create_tp_icon_number(viewport)
  4993.       return if !TP_ICON_NUMBER_VISIBLE
  4994.       @tp_icon_number_old = [-1,-1]
  4995.       @tp_icon_number = Sprite.new
  4996.       @tp_icon_number.bitmap = Bitmap.new(@tp_icon_number_cw * 3,@tp_icon_number_ch)
  4997.       @tp_icon_number.z = HUD_Z + TP_ICON_NUMBER_Z
  4998.       @tp_icon_number.x = @hud_position[0] + TP_ICON_NUMBER_POSITION[0]
  4999.       @tp_icon_number.y = @hud_position[1] + TP_ICON_NUMBER_POSITION[1]
  5000.       @tp_icon_number.viewport = viewport
  5001.       @tp_icon_number.opacity = 0
  5002.   end
  5003.  
  5004.   #--------------------------------------------------------------------------
  5005.   # * Refresh Icon Number TP
  5006.   #--------------------------------------------------------------------------  
  5007.   def refresh_icon_number_tp
  5008.       @tp_icon_number_old[0] = @actor.tp
  5009.       @tp_icon_number_old[1] = @actor.max_tp
  5010.       @tp_icon_number.bitmap.clear
  5011.       value = ((@actor.tp - 1) / @tp_icon_col_max) / @tp_icon_row_max
  5012.       value = 0 if value < 0
  5013.       number_value = value.truncate.abs.to_s.split(//)
  5014.       for r in 0..number_value.size - 1         
  5015.          number_value_abs = number_value[r].to_i
  5016.          nsrc_rect = Rect.new(@tp_icon_number_cw * number_value_abs, 0, @tp_icon_number_cw, @tp_icon_number_ch)
  5017.          @tp_icon_number.bitmap.blt(@tp_icon_number_cw *  r, 0, @tp_icon_number_image, nsrc_rect)
  5018.       end
  5019.       cx = (number_value.size * @tp_icon_number_cw)
  5020.       case TP_ICON_NUMBER_ALIGN_TYPE
  5021.          when 0; @tp_icon_number.x = @hud_position[0] + TP_ICON_NUMBER_POSITION[0]
  5022.          when 1; @tp_icon_number.x = @hud_position[0] + TP_ICON_NUMBER_POSITION[0] - (cx / 2)
  5023.          when 2; @tp_icon_number.x = @hud_position[0] + TP_ICON_NUMBER_POSITION[0] - cx
  5024.       end        
  5025.   end
  5026.  
  5027.   #--------------------------------------------------------------------------
  5028.   # * Can Refresh Icon Number TP
  5029.   #--------------------------------------------------------------------------  
  5030.   def can_refresh_icon_number_tp?
  5031.       return true if @tp_icon_number_old[0] != @actor.tp
  5032.       return true if @tp_icon_number_old[1] != @actor.max_tp
  5033.       return false
  5034.   end   
  5035.  
  5036.   #--------------------------------------------------------------------------
  5037.   # * Update TP
  5038.   #--------------------------------------------------------------------------   
  5039.   def update_tp
  5040.       if @tp_number != nil
  5041.          sprite_visible(@tp_number)
  5042.          if MP_NUMBER_ANIMATION
  5043.             update_number(2,@tp_number_old)
  5044.          else
  5045.             update_number_fix(2) if @tp_number_old != @actor.tp
  5046.          end           
  5047.          refresh_number(2,@tp_number_old,@tp_number,@tp_number_image,@tp_number_cw,@tp_number_ch,@tp_wave_number) if @tp_number_refresh         
  5048.       end   
  5049.       if @tp_number2 != nil
  5050.          sprite_visible(@tp_number2)
  5051.          if MP_NUMBER_ANIMATION
  5052.             update_number(5,@tp_number2_old)
  5053.          else
  5054.             update_number_fix(5) if @tp_number2_old != @actor.max_tp
  5055.          end           
  5056.          refresh_number(5,@tp_number2_old,@tp_number2,@tp_number2_image,@tp_number2_cw,@tp_number2_ch,@tp_wave_number) if @tp_number2_refresh
  5057.       end        
  5058.       if @tp_meter != nil
  5059.          sprite_visible(@tp_meter)
  5060.          update_flow_tp
  5061.       end
  5062.       if @tp_icon != nil
  5063.          sprite_visible(@tp_icon)
  5064.          refresh_tp_icon if @tp_icon_old != @actor.tp
  5065.       end
  5066.       if @tp_icon3 != nil
  5067.          sprite_visible(@tp_icon3)
  5068.          update_icon_tp_ex_anime
  5069.       end         
  5070.       if @tp_icon_number != nil
  5071.          sprite_visible(@tp_icon_number)
  5072.          refresh_icon_number_tp if can_refresh_icon_number_tp?
  5073.       end  
  5074.   end  
  5075.  
  5076. end
  5077.  
  5078. #==============================================================================
  5079. #==============================================================================
  5080. # ** Battle Hud EX
  5081. #==============================================================================
  5082. #==============================================================================
  5083. class Battle_Hud_EX
  5084.  
  5085.   #--------------------------------------------------------------------------
  5086.   # * Create AT Number
  5087.   #--------------------------------------------------------------------------  
  5088.   def create_at_number(viewport)
  5089.       return if !AT_NUMBER_VISIBLE
  5090.       @at_number = Sprite.new
  5091.       @at_number.bitmap = Bitmap.new(@at_number_cw * 4,@at_number_ch)
  5092.       @at_number.z = HUD_Z + AT_NUMBER_Z
  5093.       @at_number.x = @hud_position[0] + AT_NUMBER_POSITION[0]
  5094.       @at_number.y = @hud_position[1] + AT_NUMBER_POSITION[1]
  5095.       @at_number.viewport = viewport
  5096.       @at_number.opacity = 0
  5097.   end
  5098.  
  5099.   #--------------------------------------------------------------------------
  5100.   # * Create AT Number Max
  5101.   #--------------------------------------------------------------------------  
  5102.   def create_at_number_max(viewport)
  5103.       return if !AT_NUMBER_MAX_VISIBLE
  5104.       @at_number2 = Sprite.new
  5105.       @at_number2.bitmap = Bitmap.new(@at_number2_cw * 4,@at_number2_ch)
  5106.       @at_number2.z = HUD_Z + AT_NUMBER_Z
  5107.       @at_number2.x = @hud_position[0] + AT_NUMBER_MAX_POSITION[0]
  5108.       @at_number2.y = @hud_position[1] + AT_NUMBER_MAX_POSITION[1]
  5109.       @at_number2.viewport = viewport
  5110.       @at_number2.opacity = 0
  5111.   end  
  5112.  
  5113.   #--------------------------------------------------------------------------
  5114.   # * Create AT Meter
  5115.   #--------------------------------------------------------------------------   
  5116.   def create_at_meter(viewport)
  5117.       return if !AT_METER_VISIBLE
  5118.       @at_flow_max = @at_meter_cw * 2
  5119.       @at_flow = rand(@at_flow_max)
  5120.       @at_meter = Sprite.new
  5121.       @at_meter.bitmap = Bitmap.new(@at_meter_cw,@at_meter_ch)
  5122.       @at_meter.z = HUD_Z + AT_METER_Z
  5123.       @at_meter.x = @hud_position[0] + AT_METER_POSITION[0]
  5124.       @at_meter.y = @hud_position[1] + AT_METER_POSITION[1]
  5125.       @at_meter.angle = AT_METER_ANGLE
  5126.       @at_meter.mirror = AT_METER_MIRROR_EFFECT
  5127.       @at_meter.viewport = viewport
  5128.       @at_meter.opacity = 0
  5129.   end
  5130.  
  5131.   #--------------------------------------------------------------------------
  5132.   # ● Update Flow AT
  5133.   #--------------------------------------------------------------------------            
  5134.   def update_flow_at
  5135.       @at_meter.bitmap.clear
  5136.       @at_flow = 0 if !AT_METER_GRADIENT_ANIMATION
  5137.       if actor_cast?
  5138.          meter_width = @at_meter_cw * actor_cast / actor_max_cast rescue nil
  5139.          meter_width = 0 if meter_width == nil
  5140.          ch = @at_meter_ch * 2
  5141.       else
  5142.          meter_width = @at_meter_cw * actor_at / actor_max_at rescue nil
  5143.          meter_width = 0 if meter_width == nil         
  5144.          ch = actor_at >= actor_max_at ? @at_meter_ch : 0
  5145.       end   
  5146.       meter_src_rect = Rect.new(@at_flow, ch,meter_width, @at_meter_ch)
  5147.       @at_meter.bitmap.blt(0,0, @at_meter_image, meter_src_rect)  
  5148.       @at_flow += 1
  5149.       @at_flow = 0 if @at_flow >= @at_flow_max
  5150.   end  
  5151.  
  5152.   #--------------------------------------------------------------------------
  5153.   # * Update AT
  5154.   #--------------------------------------------------------------------------   
  5155.   def update_at
  5156.       if @at_number != nil
  5157.          sprite_visible(@at_number)
  5158.          if AT_NUMBER_ANIMATION
  5159.             update_number(6,@at_number_old)
  5160.          else   
  5161.             update_number_fix(6) if @at_number_old != actor_at
  5162.          end  
  5163.          refresh_number(6,@at_number_old,@at_number,@at_number_image,@at_number_cw,@at_number_ch,@at_wave_number) if @at_number_refresh
  5164.       end
  5165.       if @at_number2 != nil
  5166.          sprite_visible(@at_number2)
  5167.          if AT_NUMBER_ANIMATION
  5168.             update_number(7,@at_number2_old)
  5169.          else   
  5170.             update_number_fix(7) if @at_number2_old != actor_max_at
  5171.          end  
  5172.          refresh_number(7,@at_number2_old,@at_number2,@at_number2_image,@at_number2_cw,@at_number2_ch,@at_wave_number) if @at_number2_refresh
  5173.       end
  5174.       if @at_meter != nil
  5175.          sprite_visible(@at_meter)
  5176.          update_flow_at
  5177.       end   
  5178.   end  
  5179.  
  5180. end
  5181.  
  5182. #==============================================================================
  5183. #==============================================================================
  5184. # ** Battle Hud EX
  5185. #==============================================================================
  5186. #==============================================================================
  5187. class Battle_Hud_EX
  5188.  
  5189.   #--------------------------------------------------------------------------
  5190.   # * Create Level Number
  5191.   #--------------------------------------------------------------------------   
  5192.   def create_level_number(viewport)
  5193.       return if !LEVEL_NUMBER_VISIBLE
  5194.       @old_level = -1
  5195.       @lv_number = Sprite.new
  5196.       @lv_number.bitmap = Bitmap.new(@lv_number_cw * 2, @lv_number_ch)
  5197.       @lv_number.z = HUD_Z + LEVEL_NUMBER_Z
  5198.       @lv_number.x = @hud_position[0] + LEVEL_NUMBER_POSITION[0]
  5199.       @lv_number.y = @hud_position[1] + LEVEL_NUMBER_POSITION[1]
  5200.       @lv_number.viewport = viewport
  5201.       @lv_number.opacity = 0
  5202.   end
  5203.  
  5204.   #--------------------------------------------------------------------------
  5205.   # * Refresh Level Number
  5206.   #--------------------------------------------------------------------------  
  5207.   def refresh_level_number
  5208.       @lv_number.bitmap.clear
  5209.       @old_level = @actor.level      
  5210.       number_value = @actor.level.abs.to_s.split(//)
  5211.       for r in 0..number_value.size - 1         
  5212.          number_value_abs = number_value[r].to_i
  5213.          nsrc_rect = Rect.new(@lv_number_cw * number_value_abs, 0, @lv_number_cw, @lv_number_ch)
  5214.          @lv_number.bitmap.blt(@lv_number_cw *  r, 0, @lv_number_image, nsrc_rect)
  5215.       end
  5216.       cx = (number_value.size * @lv_number_cw)
  5217.       case LEVEL_NUMBER_ALIGN_TYPE
  5218.            when 0; @lv_number.x = @hud_position[0] + LEVEL_NUMBER_POSITION[0]
  5219.            when 1; @lv_number.x = @hud_position[0] + LEVEL_NUMBER_POSITION[0] - (cx / 2)
  5220.            when 2; @lv_number.x = @hud_position[0] + LEVEL_NUMBER_POSITION[0] - cx
  5221.       end
  5222.   end
  5223.  
  5224.   #--------------------------------------------------------------------------
  5225.   # * Update Level
  5226.   #--------------------------------------------------------------------------  
  5227.   def update_level
  5228.       return if @lv_number == nil
  5229.       sprite_visible(@lv_number)
  5230.       refresh_level_number if @old_level != @actor.level
  5231.   end
  5232.  
  5233. end
  5234.  
  5235. #==============================================================================
  5236. #==============================================================================
  5237. # ** Battle Hud EX
  5238. #==============================================================================
  5239. #==============================================================================
  5240. class Battle_Hud_EX
  5241.  
  5242.   #--------------------------------------------------------------------------
  5243.   # * Create States
  5244.   #--------------------------------------------------------------------------  
  5245.   def create_states(viewport)
  5246.       return if !STATES_VISIBLE
  5247.       @status_old = nil
  5248.       @status_flow = [-24,0]
  5249.       @status_size_real = 0
  5250.       @status = Sprite.new
  5251.       @status.bitmap = Bitmap.new(24,24)
  5252.       @status.x = @hud_position[0] + STATES_POSITION[0]
  5253.       @status.y = @hud_position[1] + STATES_POSITION[1]
  5254.       @status.z = HUD_Z + STATES_Z
  5255.       @status.angle = STATE_ANGLE
  5256.       @status.viewport = viewport
  5257.       @status.opacity = 0
  5258.   end
  5259.  
  5260.   #--------------------------------------------------------------------------
  5261.   # * Refresh States
  5262.   #--------------------------------------------------------------------------        
  5263.   def refresh_states
  5264.       check_icon_image
  5265.       @status_size_real = set_real_states_size
  5266.       @status_old = @actor.states
  5267.       @status_flow = [0,0]
  5268.       @states_size = @status_size_real > 0 ? (26 * @status_size_real) : 24
  5269.       @actor_status.dispose if @actor_status != nil
  5270.       @actor_status = Bitmap.new(@states_size,24)
  5271.       index = 0
  5272.       for i in @actor.states
  5273.          next if HIDE_STATES_ID.include?(i.id)         
  5274.          rect = Rect.new(i.icon_index % 16 * 24, i.icon_index / 16 * 24, 24, 24)
  5275.          @actor_status.blt(26 * index , 0, @icon_image, rect)
  5276.          index += 1
  5277.       end
  5278.   end   
  5279.  
  5280.   #--------------------------------------------------------------------------
  5281.   # * Set Real States Size
  5282.   #--------------------------------------------------------------------------        
  5283.   def set_real_states_size
  5284.       n = 0
  5285.       for i in @actor.states
  5286.           next if HIDE_STATES_ID.include?(i.id)  
  5287.           n += 1
  5288.       end
  5289.       return n
  5290.   end
  5291.  
  5292.   #--------------------------------------------------------------------------
  5293.   # * Flow_Status
  5294.   #--------------------------------------------------------------------------         
  5295.   def flow_states
  5296.       return if @actor_status == nil
  5297.       @status.bitmap.clear
  5298.       return if @actor.states.size == 0
  5299.       st_src_rect = Rect.new(@status_flow[0],0, 24,24)
  5300.       @status.bitmap.blt(0,0, @actor_status, st_src_rect)
  5301.       if STATES_SCROLLING_ANIMATION
  5302.          @status_flow[0] += 1
  5303.          @status_flow[0] = -24 if @status_flow[0] >= @states_size + 2
  5304.       else   
  5305.          @status_flow[1] += 1 unless @actor.states.size <= 1
  5306.          if @status_flow[1] > 30
  5307.             @status_flow[1] = 0
  5308.             @status_flow[0] += 26
  5309.             @status_flow[0] = 0 if @status_flow[0] >= (@states_size - 0)
  5310.          end   
  5311.      end   
  5312.   end      
  5313.  
  5314.   #--------------------------------------------------------------------------
  5315.   # * Update States
  5316.   #--------------------------------------------------------------------------  
  5317.   def update_states
  5318.       return if @status == nil
  5319.       sprite_visible(@status)
  5320.       refresh_states if @status_old != @actor.states
  5321.       flow_states
  5322.   end  
  5323.  
  5324. end
  5325.  
  5326. #==============================================================================
  5327. #==============================================================================
  5328. # ** Battle Hud EX
  5329. #==============================================================================
  5330. #==============================================================================
  5331. class Battle_Hud_EX
  5332.  
  5333.   #--------------------------------------------------------------------------
  5334.   # * Create Face
  5335.   #--------------------------------------------------------------------------   
  5336.   def create_face(viewport)
  5337.       return if !FACE_VISIBLE
  5338.       @face_old_hp = @actor.hp
  5339.       @face_old_mp = @actor.mp
  5340.       @face_old_tp = @actor.tp
  5341.       @face_name = ""
  5342.       @face = Sprite.new
  5343.       @face_org = [@hud_position[0] + FACE_POSITION[0], @hud_position[1] + FACE_POSITION[1]]
  5344.       @face.x = @face_org[0]
  5345.       @face.y = @face_org[1]
  5346.       @face.z = HUD_Z + FACE_Z
  5347.       @face.viewport = viewport
  5348.       @face.opacity = 0
  5349.       refresh_face_name
  5350.   end
  5351.  
  5352.   #--------------------------------------------------------------------------
  5353.   # * Refresh Face Name
  5354.   #--------------------------------------------------------------------------      
  5355.   def refresh_face_name      
  5356.       @face_image.dispose if @face_image != nil
  5357.       @face.bitmap.dispose if @face.bitmap != nil
  5358.       return if @actor == nil or @actor.id == nil
  5359.       @face_image = Cache.battle_hud(@actor.battler_face_name.to_s) rescue nil
  5360.       @face_image = Bitmap.new(32,32) if @face_image == nil
  5361.       @face_cw = FACE_ANIMATION ? @face_image.width / 5 : @face_image.width
  5362.       @face_ch = @face_image.height
  5363.       @face.ox = @face_cw / 2
  5364.       @face.oy = @face_ch / 2      
  5365.       @face.bitmap = Bitmap.new(@face_cw,@face_ch)
  5366.       @face_org = [@hud_position[0] + FACE_POSITION[0],
  5367.                    @hud_position[1] + @face.oy + FACE_POSITION[1]]
  5368.       if $game_temp.battler_face_pos[@actor_index] == nil
  5369.          $game_temp.battler_face_pos[@actor_index] = []
  5370.       end
  5371.       @face.x = @face_org[0]
  5372.       @face.y = @face_org[1]  
  5373.       limit_Y = (@hud_position[1] + FACE_POSITION[1] + @face_image.height)
  5374.       fy = @face_org[1]
  5375.       if limit_Y > Graphics.height
  5376.          @face.y = Graphics.height - (@face_image.height - @face.oy)
  5377.          fy = Graphics.height - 16
  5378.          @face_org[1] = @face.y
  5379.       end
  5380.       $game_temp.battler_face_pos[@actor_index][0] = @face_org[0]
  5381.       $game_temp.battler_face_pos[@actor_index][1] = fy
  5382.       $game_temp.battler_face_pos[@actor_index][2] = @face.z     
  5383.       clear_face_index
  5384.   end
  5385.  
  5386.   #--------------------------------------------------------------------------
  5387.   # * Refresh Face
  5388.   #--------------------------------------------------------------------------  
  5389.   def refresh_face
  5390.       @face.mirror = false
  5391.       @face.zoom_x = 1.00
  5392.       @face.zoom_y = 1.00
  5393.       @face_index = @actor.face_animation[1]
  5394.       @face.bitmap.clear
  5395.       if !FACE_ANIMATION
  5396.          f_scr = Rect.new(0,0,@face_cw,@face_ch)
  5397.       else
  5398.          f_scr = Rect.new(@face_index * @face_cw,0,@face_cw,@face_ch)
  5399.       end
  5400.       @face.bitmap.blt(0,0,@face_image,f_scr)
  5401.   end
  5402.  
  5403.   #--------------------------------------------------------------------------
  5404.   # * Update Face Duration
  5405.   #--------------------------------------------------------------------------   
  5406.   def update_face_duration
  5407.       return if @actor.face_animation[0] == 0
  5408.       @actor.face_animation[0] -= 1
  5409.       update_face_shake_effect
  5410.       update_face_zoom if @actor.face_animation[1] == 2
  5411.       return if @actor.face_animation[0] > 0
  5412.       clear_face_index
  5413.   end
  5414.  
  5415.   #--------------------------------------------------------------------------
  5416.   # * Clear Face Index
  5417.   #--------------------------------------------------------------------------      
  5418.   def clear_face_index
  5419.       @actor.face_animation[1] = @actor.low_hp? ? 3 : 0
  5420.       @actor.face_animation[1] = 4 if @actor.dead?
  5421.       refresh_face
  5422.   end
  5423.  
  5424.   #--------------------------------------------------------------------------
  5425.   # * Update Face Zoom
  5426.   #--------------------------------------------------------------------------      
  5427.   def update_face_zoom
  5428.       return if !FACE_ZOOM_ANIMATION
  5429.       case @actor.face_animation[0]
  5430.          when 30..60
  5431.             @face.zoom_x += 0.01
  5432.             @face.zoom_x = 1.30 if @face.zoom_x > 1.30
  5433.             @face.mirror = true unless !FACE_ZOOM_MIRROR_EFFECT
  5434.          when 1..29
  5435.             @face.zoom_x -= 0.01
  5436.             @face.zoom_x = 1.00 if @face.zoom_x < 1.00
  5437.             @face.mirror = false
  5438.          else
  5439.             @face.zoom_x = 1.00
  5440.             @face.mirror = false
  5441.       end
  5442.       @face.zoom_y = @face.zoom_x
  5443.   end
  5444.  
  5445.   #--------------------------------------------------------------------------
  5446.   # * Can Refresh Index MP TP?
  5447.   #--------------------------------------------------------------------------     
  5448.   def can_refresh_index_mp_tp?
  5449.       return true if @face_old_mp != @actor.mp
  5450.       return false
  5451.   end
  5452.  
  5453.   #--------------------------------------------------------------------------
  5454.   # * Refresh Face Index HP
  5455.   #--------------------------------------------------------------------------  
  5456.   def refresh_face_index_hp
  5457.       @actor.face_animation[0] = FACE_ANIMATION_DURATION
  5458.       @actor.face_animation[1] = @face_old_hp > @actor.hp ? 3 : 1
  5459.       @face_old_hp = @actor.hp
  5460.   end
  5461.  
  5462.   #--------------------------------------------------------------------------
  5463.   # * Refresh Face Index MP TP
  5464.   #--------------------------------------------------------------------------  
  5465.   def refresh_face_index_mp_tp
  5466.       if @face_old_mp < @actor.mp
  5467.          @actor.face_animation[0] = FACE_ANIMATION_DURATION
  5468.          @actor.face_animation[1] = 1
  5469.       end
  5470.       @face_old_mp = @actor.mp
  5471.       @face_old_tp = @actor.tp
  5472.   end  
  5473.  
  5474.   #--------------------------------------------------------------------------
  5475.   # * Update Face Shake Effect
  5476.   #--------------------------------------------------------------------------  
  5477.   def update_face_shake_effect
  5478.       return if !FACE_SHAKE_EFFECT
  5479.       if FACE_ANIMATION
  5480.          update_shake_animated_face
  5481.       else            
  5482.          update_shake_still_face
  5483.       end  
  5484.   end      
  5485.  
  5486.   #--------------------------------------------------------------------------
  5487.   # * Update Shake Still Effect Face
  5488.   #--------------------------------------------------------------------------   
  5489.   def update_shake_still_face
  5490.       if @actor.face_animation[0] > 0 and @actor.face_animation[1] == 3 and @actor.hp > 0
  5491.          @face.x = @face_org[0] - 4 + rand(8)
  5492.       else
  5493.          @face.x = @face_org[0]
  5494.       end     
  5495.   end
  5496.  
  5497.   #--------------------------------------------------------------------------
  5498.   # * Update Shake Animated Face
  5499.   #--------------------------------------------------------------------------   
  5500.   def update_shake_animated_face
  5501.       if @actor.face_animation[0] == 0
  5502.          @face.x = @face_org[0]
  5503.          return
  5504.       end
  5505.       if @actor.face_animation[1] == 3 and @actor.hp > 0
  5506.          @face.x = @face_org[0] - 4 + rand(8)
  5507.       else
  5508.          @face.x = @face_org[0]
  5509.       end         
  5510.   end
  5511.  
  5512.   #--------------------------------------------------------------------------
  5513.   # * Update Face
  5514.   #--------------------------------------------------------------------------   
  5515.   def update_face
  5516.       return if @face == nil
  5517.       sprite_visible(@face)
  5518.       refresh_face_index_hp if !FACE_ANIMATION and @face_old_hp != @actor.hp
  5519.       update_face_duration
  5520.       return if !FACE_ANIMATION
  5521.       refresh_face_index_mp_tp if can_refresh_index_mp_tp?
  5522.       refresh_face_index_hp if @face_old_hp != @actor.hp
  5523.       refresh_face if @face_index != @actor.face_animation[1]
  5524.   end  
  5525.  
  5526. end
  5527.  
  5528. #==============================================================================
  5529. # ■ Battle Manager
  5530. #==============================================================================
  5531. class << BattleManager
  5532.  
  5533.   #--------------------------------------------------------------------------
  5534.   # ● Battle End
  5535.   #--------------------------------------------------------------------------                    
  5536.   alias mog_battle_hud_battle_process_victory process_victory
  5537.   def process_victory
  5538.       execute_face_effect_end
  5539.       mog_battle_hud_battle_process_victory
  5540.   end
  5541.  
  5542.   #--------------------------------------------------------------------------
  5543.   # ● Execute Face Effect End
  5544.   #--------------------------------------------------------------------------                  
  5545.   def execute_face_effect_end
  5546.       $game_temp.battle_end = true
  5547.       for i in $game_party.members
  5548.           i.face_animation = [120,1,0] if i.hp > 0   
  5549.       end  
  5550.   end
  5551.  
  5552.   #--------------------------------------------------------------------------
  5553.   # * Display EXP Earned
  5554.   #--------------------------------------------------------------------------
  5555.   alias mog_battle_hud_ex_message_battle_process_defeat process_defeat
  5556.   def process_defeat
  5557.       $game_temp.battle_end = true
  5558.       mog_battle_hud_ex_message_battle_process_defeat
  5559.   end
  5560.  
  5561.   #--------------------------------------------------------------------------
  5562.   # * Process Abort
  5563.   #--------------------------------------------------------------------------
  5564.   alias mog_battle_hud_ex_process_abort process_abort
  5565.   def process_abort
  5566.       $game_temp.battle_end = true
  5567.       mog_battle_hud_ex_process_abort
  5568.   end  
  5569.  
  5570. end
  5571.  
  5572. #==============================================================================
  5573. # ** Scene Battle
  5574. #==============================================================================
  5575. class Scene_Battle < Scene_Base
  5576.  
  5577.   #--------------------------------------------------------------------------
  5578.   # * Use Item
  5579.   #--------------------------------------------------------------------------      
  5580.   alias mog_monogatari_use_item use_item
  5581.   def use_item
  5582.       execute_face_animation
  5583.       mog_monogatari_use_item
  5584.   end
  5585.  
  5586.   #--------------------------------------------------------------------------
  5587.   # * Execute Face Animation
  5588.   #--------------------------------------------------------------------------  
  5589.   def execute_face_animation
  5590.       return if @subject.is_a?(Game_Enemy)
  5591.       @subject.face_animation = [60 ,2,0]   
  5592.   end
  5593.  
  5594. end
  5595.  
  5596. #==============================================================================
  5597. #==============================================================================
  5598. # ** Battle Hud EX
  5599. #==============================================================================
  5600. #==============================================================================
  5601. class Battle_Hud_EX
  5602.  
  5603.   #--------------------------------------------------------------------------
  5604.   # * Dispose
  5605.   #--------------------------------------------------------------------------  
  5606.   def dispose
  5607.       terminate
  5608.       dispose_layout
  5609.       dispose_layout_2
  5610.       dispose_name
  5611.       dispose_face
  5612.       dispose_hp_number
  5613.       dispose_hp_number_max
  5614.       dispose_hp_meter
  5615.       dispose_hp_icon
  5616.       dispose_hp_icon_ex
  5617.       dispose_hp_icon_number
  5618.       dispose_mp_number
  5619.       dispose_mp_number_max
  5620.       dispose_mp_meter
  5621.       dispose_mp_icon
  5622.       dispose_mp_icon_ex
  5623.       dispose_mp_icon_number
  5624.       dispose_tp_number
  5625.       dispose_tp_number_max
  5626.       dispose_tp_meter
  5627.       dispose_tp_icon
  5628.       dispose_tp_icon_ex
  5629.       dispose_tp_icon_number
  5630.       dispose_at_number
  5631.       dispose_at_number_max
  5632.       dispose_at_meter      
  5633.       dispose_lv_number
  5634.       dispose_states
  5635.   end
  5636.  
  5637.   #--------------------------------------------------------------------------
  5638.   # * Dispose Layout
  5639.   #--------------------------------------------------------------------------  
  5640.   def dispose_layout
  5641.       return if @layout == nil
  5642.       @layout.dispose
  5643.       @layout = nil
  5644.   end
  5645.  
  5646.   #--------------------------------------------------------------------------
  5647.   # * Dispose Layout 2
  5648.   #--------------------------------------------------------------------------  
  5649.   def dispose_layout_2
  5650.       return if @layout2 == nil
  5651.       @layout2.dispose
  5652.       @layout2 = nil
  5653.   end  
  5654.  
  5655.   #--------------------------------------------------------------------------
  5656.   # * Dispose Name
  5657.   #--------------------------------------------------------------------------         
  5658.   def dispose_name
  5659.       return if @name == nil
  5660.       @name.bitmap.dispose
  5661.       @name.dispose
  5662.       @name = nil
  5663.   end  
  5664.  
  5665.   #--------------------------------------------------------------------------
  5666.   # * Dispose Face
  5667.   #--------------------------------------------------------------------------        
  5668.   def dispose_face
  5669.       return if @face == nil      
  5670.       @face.bitmap.dispose if @face.bitmap != nil   
  5671.       @face.dispose
  5672.       @face = nil
  5673.       @face_image.dispose if @face_image != nil
  5674.   end  
  5675.  
  5676.   #--------------------------------------------------------------------------
  5677.   # * Dispose HP Number
  5678.   #--------------------------------------------------------------------------   
  5679.   def dispose_hp_number
  5680.       return if @hp_number == nil
  5681.       @hp_number.bitmap.dispose
  5682.       @hp_number.dispose
  5683.       @hp_number = nil
  5684.   end
  5685.  
  5686.   #--------------------------------------------------------------------------
  5687.   # * Dispose HP Number Max
  5688.   #--------------------------------------------------------------------------   
  5689.   def dispose_hp_number_max
  5690.       return if @hp_number2 == nil
  5691.       @hp_number2.bitmap.dispose
  5692.       @hp_number2.dispose
  5693.       @hp_number2 = nil
  5694.   end   
  5695.  
  5696.   #--------------------------------------------------------------------------
  5697.   # * Dispose HP Meter
  5698.   #--------------------------------------------------------------------------     
  5699.   def dispose_hp_meter
  5700.       return if @hp_meter == nil
  5701.       @hp_meter.bitmap.dispose
  5702.       @hp_meter.dispose
  5703.       @hp_meter = nil
  5704.   end   
  5705.  
  5706.   #--------------------------------------------------------------------------
  5707.   # * Dispose HP Icon
  5708.   #--------------------------------------------------------------------------      
  5709.   def dispose_hp_icon
  5710.       return if @hp_icon == nil
  5711.       @hp_icon.bitmap.dispose if @hp_icon.bitmap != nil
  5712.       @hp_icon.dispose
  5713.       @hp_icon = nil
  5714.   end   
  5715.  
  5716.   #--------------------------------------------------------------------------
  5717.   # * Dispose HP Icon EX
  5718.   #--------------------------------------------------------------------------      
  5719.   def dispose_hp_icon_ex
  5720.       return if @hp_icon3 == nil
  5721.       @hp_icon3.bitmap.dispose
  5722.       @hp_icon3.dispose
  5723.       @hp_icon3 = nil
  5724.   end      
  5725.  
  5726.   #--------------------------------------------------------------------------
  5727.   # * Dispose HP Icon Number
  5728.   #--------------------------------------------------------------------------  
  5729.   def dispose_hp_icon_number
  5730.       return if @hp_icon_number == nil
  5731.       @hp_icon_number.bitmap.dispose
  5732.       @hp_icon_number.dispose
  5733.       @hp_icon_number = nil
  5734.   end   
  5735.  
  5736.   #--------------------------------------------------------------------------
  5737.   # * Dispose MP Number
  5738.   #--------------------------------------------------------------------------   
  5739.   def dispose_mp_number
  5740.       return if @mp_number == nil
  5741.       @mp_number.bitmap.dispose
  5742.       @mp_number.dispose
  5743.       @mp_number = nil
  5744.   end   
  5745.  
  5746.   #--------------------------------------------------------------------------
  5747.   # * Dispose MP Number Max
  5748.   #--------------------------------------------------------------------------   
  5749.   def dispose_mp_number_max
  5750.       return if @mp_number2 == nil
  5751.       @mp_number2.bitmap.dispose
  5752.       @mp_number2.dispose
  5753.       @mp_number2 = nil
  5754.   end   
  5755.  
  5756.   #--------------------------------------------------------------------------
  5757.   # * Dispose MP Meter
  5758.   #--------------------------------------------------------------------------     
  5759.   def dispose_mp_meter
  5760.       return if @mp_meter == nil
  5761.       @mp_meter.bitmap.dispose
  5762.       @mp_meter.dispose
  5763.       @mp_meter = nil
  5764.   end     
  5765.  
  5766.   #--------------------------------------------------------------------------
  5767.   # * Dispose MP Icon
  5768.   #--------------------------------------------------------------------------      
  5769.   def dispose_mp_icon
  5770.       return if @mp_icon == nil
  5771.       @mp_icon.bitmap.dispose if @mp_icon.bitmap != nil
  5772.       @mp_icon.dispose
  5773.       @mp_icon = nil
  5774.   end     
  5775.  
  5776.   #--------------------------------------------------------------------------
  5777.   # * Dispose MP Icon EX
  5778.   #--------------------------------------------------------------------------      
  5779.   def dispose_mp_icon_ex
  5780.       return if @mp_icon3 == nil
  5781.       @mp_icon3.bitmap.dispose
  5782.       @mp_icon3.dispose
  5783.       @mp_icon3 = nil
  5784.   end        
  5785.  
  5786.   #--------------------------------------------------------------------------
  5787.   # * Dispose MP Icon Number
  5788.   #--------------------------------------------------------------------------  
  5789.   def dispose_mp_icon_number
  5790.       return if @mp_icon_number == nil
  5791.       @mp_icon_number.bitmap.dispose
  5792.       @mp_icon_number.dispose
  5793.       @mp_icon_number = nil
  5794.   end   
  5795.  
  5796.   #--------------------------------------------------------------------------
  5797.   # * Dispose TP Number
  5798.   #--------------------------------------------------------------------------   
  5799.   def dispose_tp_number
  5800.       return if @tp_number == nil
  5801.       @tp_number.bitmap.dispose
  5802.       @tp_number.dispose
  5803.       @tp_number = nil
  5804.   end
  5805.  
  5806.   #--------------------------------------------------------------------------
  5807.   # * Dispose TP Number Max
  5808.   #--------------------------------------------------------------------------   
  5809.   def dispose_tp_number_max
  5810.       return if @tp_number2 == nil
  5811.       @tp_number2.bitmap.dispose
  5812.       @tp_number2.dispose
  5813.       @tp_number2 = nil
  5814.   end  
  5815.  
  5816.   #--------------------------------------------------------------------------
  5817.   # * Dispose TP Meter
  5818.   #--------------------------------------------------------------------------     
  5819.   def dispose_tp_meter
  5820.       return if @tp_meter == nil
  5821.       @tp_meter.bitmap.dispose
  5822.       @tp_meter.dispose
  5823.       @tp_meter = nil
  5824.   end     
  5825.  
  5826.   #--------------------------------------------------------------------------
  5827.   # * Dispose TP Icon
  5828.   #--------------------------------------------------------------------------      
  5829.   def dispose_tp_icon
  5830.       return if @tp_icon == nil
  5831.       @tp_icon.bitmap.dispose if @tp_icon.bitmap != nil
  5832.       @tp_icon.dispose
  5833.       @tp_icon = nil
  5834.   end   
  5835.  
  5836.   #--------------------------------------------------------------------------
  5837.   # * Dispose TP Icon EX
  5838.   #--------------------------------------------------------------------------      
  5839.   def dispose_tp_icon_ex
  5840.       return if @tp_icon3 == nil
  5841.       @tp_icon3.bitmap.dispose
  5842.       @tp_icon3.dispose
  5843.       @tp_icon3 = nil
  5844.   end   
  5845.  
  5846.   #--------------------------------------------------------------------------
  5847.   # * Dispose TP Icon Number
  5848.   #--------------------------------------------------------------------------  
  5849.   def dispose_tp_icon_number
  5850.       return if @tp_icon_number == nil
  5851.       @tp_icon_number.bitmap.dispose
  5852.       @tp_icon_number.dispose
  5853.       @tp_icon_numbe = nil
  5854.   end     
  5855.  
  5856.   #--------------------------------------------------------------------------
  5857.   # * Dispose AT Number
  5858.   #--------------------------------------------------------------------------   
  5859.   def dispose_at_number
  5860.       return if @at_number == nil
  5861.       @at_number.bitmap.dispose
  5862.       @at_number.dispose
  5863.       @at_number = nil
  5864.   end
  5865.  
  5866.   #--------------------------------------------------------------------------
  5867.   # * Dispose AT Number Max
  5868.   #--------------------------------------------------------------------------   
  5869.   def dispose_at_number_max
  5870.       return if @at_number2 == nil
  5871.       @at_number2.bitmap.dispose
  5872.       @at_number2.dispose
  5873.       @at_number2 = nil
  5874.   end   
  5875.  
  5876.   #--------------------------------------------------------------------------
  5877.   # * Dispose AT Meter
  5878.   #--------------------------------------------------------------------------     
  5879.   def dispose_at_meter
  5880.       return if @at_meter == nil
  5881.       @at_meter.bitmap.dispose
  5882.       @at_meter.dispose
  5883.       @at_meter = nil
  5884.   end     
  5885.  
  5886.   #--------------------------------------------------------------------------
  5887.   # * Dispose Lv Number
  5888.   #--------------------------------------------------------------------------   
  5889.   def dispose_lv_number
  5890.       return if @lv_number == nil
  5891.       @lv_number.bitmap.dispose
  5892.       @lv_number.dispose
  5893.       @lv_number = nil
  5894.   end
  5895.  
  5896.   #--------------------------------------------------------------------------
  5897.   # * Dispose States
  5898.   #--------------------------------------------------------------------------      
  5899.   def dispose_states
  5900.       return if @status == nil
  5901.       @status.bitmap.dispose if @status.bitmap != nil
  5902.       @status.dispose
  5903.       @actor_status.dispose if @actor_status != nil
  5904.       @status = nil
  5905.   end
  5906.  
  5907. end
  5908.  
  5909. #==============================================================================
  5910. #==============================================================================
  5911. # ** Battle Hud EX
  5912. #==============================================================================
  5913. #==============================================================================
  5914. class Battle_Hud_EX
  5915.  
  5916. #--------------------------------------------------------------------------
  5917. # * Refresh Visible
  5918. #--------------------------------------------------------------------------  
  5919. def refresh_visible(vis)
  5920.      @layout.visible = vis if @layout
  5921.      @layout2.visible = vis if @layout2
  5922.      @name.visible = vis if @name
  5923.      @lv_number.visible = vis if @lv_number
  5924.      @status.visible = vis if @status
  5925.      @face.visible = vis if @face     
  5926.      @hp_number.visible = vis if @hp_number
  5927.      @hp_number2.visible = vis if @hp_number2
  5928.      @hp_meter.visible = vis if @hp_meter
  5929.      @hp_icon.visible = vis if @hp_icon
  5930.      @hp_icon3.visible = vis if @hp_icon3
  5931.      @hp_icon_number.visible = vis if @hp_icon_number     
  5932.      @mp_number.visible = vis if @mp_number
  5933.      @mp_number2.visible = vis if @mp_number2
  5934.      @mp_meter.visible = vis if @mp_meter
  5935.      @mp_icon.visible = vis if @mp_icon
  5936.      @mp_icon3.visible = vis if @mp_icon3
  5937.      @mp_icon_number.visible = vis if @mp_icon_number
  5938.      @tp_number.visible = vis if @tp_number
  5939.      @tp_number2.visible = vis if @tp_number2
  5940.      @tp_meter.visible = vis if @tp_meter
  5941.      @tp_icon.visible = vis if @tp_icon
  5942.      @tp_icon3.visible = vis if @tp_icon3
  5943.      @tp_icon_number.visible = vis if @tp_icon_number      
  5944.      @at_number.visible = vis if @at_number
  5945.      @at_number2.visible = vis if @at_number2
  5946.      @at_meter.visible = vis if @at_meter   
  5947.   end  
  5948.  
  5949.   #--------------------------------------------------------------------------
  5950.   # * Update
  5951.   #--------------------------------------------------------------------------  
  5952.   def update
  5953.       return if @actor == nil
  5954.       @sprite_visible = sprite_visible?
  5955.       @sprite_visitle_wait -= 1 if @sprite_visitle_wait > 0
  5956.       update_layout ; update_layout_2 ; update_name
  5957.       update_face ; update_hp ; update_mp ; update_tp
  5958.       update_at ; update_level ; update_states
  5959.   end
  5960.  
  5961. end
  5962.  
  5963. #==============================================================================
  5964. # ■ Sprite Battler
  5965. #==============================================================================
  5966. class Sprite_Battler < Sprite_Base
  5967.  
  5968.   #--------------------------------------------------------------------------
  5969.   # ● Set AV
  5970.   #--------------------------------------------------------------------------      
  5971.   def set_av(a_viewport)
  5972.       @viewport_cm = a_viewport
  5973.   end
  5974.  
  5975.   #--------------------------------------------------------------------------
  5976.   # ● Dispose
  5977.   #--------------------------------------------------------------------------      
  5978.   alias mog_bc_dispose dispose
  5979.   def dispose
  5980.       mog_bc_dispose
  5981.       @viewport_cm.dispose if @viewport_cm != nil
  5982.   end
  5983.  
  5984.   #--------------------------------------------------------------------------
  5985.   # ● Maker Animation Sprites
  5986.   #--------------------------------------------------------------------------      
  5987.   alias mog_bc_make_animation_sprites make_animation_sprites
  5988.   def make_animation_sprites
  5989.       mog_bc_make_animation_sprites
  5990.       set_cm_viewport if $imported[:mog_battle_camera]
  5991.   end
  5992.  
  5993.   #--------------------------------------------------------------------------
  5994.   # ● Set CM Viewpor
  5995.   #--------------------------------------------------------------------------      
  5996.   def set_cm_viewport
  5997.       return if @viewport_cm == nil
  5998.       return if @ani_sprites == nil
  5999.       if @battler.is_a?(Game_Actor) and SceneManager.face_battler?
  6000.          @ani_sprites.each {|sprite| sprite.viewport = nil; sprite.z = 100}
  6001.          return
  6002.       end
  6003.       @ani_sprites.each {|sprite| sprite.viewport = @viewport_cm; sprite.z = 100}
  6004.   end
  6005.  
  6006. end
  6007.  
  6008. #==============================================================================
  6009. # ■ Game Temp
  6010. #==============================================================================
  6011. class Spriteset_Battle
  6012.  
  6013.   #--------------------------------------------------------------------------
  6014.   # ● Initialize
  6015.   #--------------------------------------------------------------------------      
  6016.   alias mog_bc_sp_initialize initialize
  6017.   def initialize
  6018.       mog_bc_sp_initialize
  6019.       if $imported[:mog_battle_camera] and @viewport_cm != nil
  6020.          battler_sprites.each do |sprite| sprite.set_av(@viewport_cm) end
  6021.       end
  6022.   end
  6023.  
  6024.   #--------------------------------------------------------------------------
  6025.   # ● Create Viewports
  6026.   #--------------------------------------------------------------------------      
  6027.   alias mog_bc_create_viewports create_viewports
  6028.   def create_viewports
  6029.       mog_bc_create_viewports
  6030.       if $imported[:mog_battle_camera]
  6031.          @viewport_cm = Viewport.new
  6032.          @viewport_cm.z = 100
  6033.       end   
  6034.   end
  6035.  
  6036.   #--------------------------------------------------------------------------
  6037.   # ● Dispose Viewports
  6038.   #--------------------------------------------------------------------------      
  6039.   alias mog_bc_dispose_viewports dispose_viewports
  6040.   def dispose_viewports
  6041.       mog_bc_dispose_viewports
  6042.       @viewport_cm.dispose if $imported[:mog_battle_camera] and @viewport_cm != nil
  6043.   end
  6044.  
  6045.   #--------------------------------------------------------------------------
  6046.   # ● Update Viewports
  6047.   #--------------------------------------------------------------------------      
  6048.   alias mog_bcf_update_viewports update_viewports
  6049.   def update_viewports
  6050.       mog_bcf_update_viewports
  6051.       update_viewport_cm if $imported[:mog_battle_camera]
  6052.   end
  6053.  
  6054.   #--------------------------------------------------------------------------
  6055.   # ● Update Viewport CM
  6056.   #--------------------------------------------------------------------------      
  6057.   def update_viewport_cm
  6058.       return if @viewport_cm == nil  
  6059.       @viewport_cm.ox = $game_troop.screen.shake + $game_temp.bc_data[0]
  6060.       @viewport_cm.oy = $game_temp.bc_data[1]
  6061.       @viewport_cm.update
  6062.   end
  6063.  
  6064. end

Lv3.寻梦者

梦石
0
星屑
1083
在线时间
140 小时
注册时间
2019-5-12
帖子
57
2
发表于 2019-9-13 09:34:16 | 只看该作者
先说好,这个我并不会,但是你想让别人帮你改这个,你起码也得把显示战斗图的脚本发出来吧?大佬也不是神啊。
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1422
在线时间
245 小时
注册时间
2019-1-18
帖子
190
3
 楼主| 发表于 2019-9-13 11:01:44 | 只看该作者
真の玛娜君 发表于 2019-9-13 09:34
先说好,这个我并不会,但是你想让别人帮你改这个,你起码也得把显示战斗图的脚本发出来吧?大佬也不是神啊。 ...

我都不知道显示战斗图的脚本在哪。。。
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1083
在线时间
140 小时
注册时间
2019-5-12
帖子
57
4
发表于 2019-9-13 11:58:30 | 只看该作者
造小梦 发表于 2019-9-13 11:01
我都不知道显示战斗图的脚本在哪。。。

那别人更不知道啊,sa的话应该是MOG的脚本
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1422
在线时间
245 小时
注册时间
2019-1-18
帖子
190
5
 楼主| 发表于 2019-9-13 15:27:01 | 只看该作者
真の玛娜君 发表于 2019-9-13 11:58
那别人更不知道啊,sa的话应该是MOG的脚本

嗯,我发了,大佬看看呗。。。
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1083
在线时间
140 小时
注册时间
2019-5-12
帖子
57
6
发表于 2019-9-13 22:27:16 | 只看该作者
造小梦 发表于 2019-9-13 15:27
嗯,我发了,大佬看看呗。。。

我说了我不会呀,我不是什么大佬,我是事件党,只懂一点很基础的脚本,我接触VA甚至没你早,只不过我比较喜欢钻研罢了。
不过我也用过这个脚本,看看能不能降低一下其他人回答的难度吧 battler_face_name( ACTOR_ID, FIlE_NAME )  这个应该可以更改战斗图,用公共事件触发,具体用法我也不太清楚,如何和状态挂钩我也不清楚,看其他大佬的吧。
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-4-24 20:12

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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