Guest User

Untitled

a guest
Jun 17th, 2014
431
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 214.89 KB | None | 0 0
  1. #==============================================================================
  2. # +++ MOG - Battle Hud EX (v3.2) +++
  3. #==============================================================================
  4. # By Moghunter
  5. # http://www.atelier-rgss.com
  6. #==============================================================================
  7. # Sistema avançado de Hud de batalha, voltado para artistas gráficos e
  8. # usuários avançados.
  9. #
  10. # Compatível com :
  11. #
  12. # - Victor's Animated_battle (1.21)
  13. # - Victor's Active Time Battle (1.05)
  14. # - Victor's Map Turn Battle (1.09)
  15. # - Victor's Target Arrows (1.08)
  16. # - Yami's Battle Symphony (1.16)
  17. # - Yanfly's Battle Engine (1.09)
  18. # - Yanfly's Visual Battlers (1.01)
  19. # - Yanfly's Enemy Target Info (1.02)
  20. # - Kread-EX's Animated Battlers (1.08)
  21. # - Galv's Animated Battlers (1.2)
  22. # - Jet's Viewed Battle Systems (?)
  23. # - Jet's Animated Battlers(?)
  24. # - C Winter's Active Time Battle (1.21)
  25. # - Enu's Tankentai SBS (v1.00)
  26. #
  27. #==============================================================================
  28. #
  29. # Coloque as imagens da hud na pasta.
  30. #
  31. # Graphics/Huds/Battle/
  32. #==============================================================================
  33. # Para ocultar ou apresentar a hud de batalha use o código abaixo.
  34. #
  35. # battle_hud_visible(false)
  36. #
  37. # ou
  38. #
  39. # battle_hud_visible(true)
  40. #
  41. #==============================================================================
  42.  
  43. #==============================================================================
  44. # Atualizações desta versão.
  45. #============================================================================
  46. # (Ver 3.2)
  47. # - Função de ocultar a hud quando a janela de menssagem está ativa.
  48. # - Opção de ocultar determinadas condições na hud. (Ex - Guard)
  49. #==============================================================================
  50. module MOG_BATTLE_HUD_EX
  51.  
  52. #============================================================================
  53. #============================================================================
  54. # * HUD SPRITE (GENERAL)
  55. #============================================================================
  56. # Definição da quantidade maxima de personagens na batalha.
  57. #---------------------------------------------------------------------------
  58. MAX_BATTLE_MEMBERS = 4
  59. #---------------------------------------------------------------------------
  60. # Definição da prioridade da hud.
  61. #---------------------------------------------------------------------------
  62. HUD_Z = 150
  63. #---------------------------------------------------------------------------
  64. # Definição da posição geral da hud, influência em todos os sprites da hud.
  65. #---------------------------------------------------------------------------
  66. HUD_POSITION = [0,338]
  67. #---------------------------------------------------------------------------
  68. # Definição do espaço entre os membros do grupo.
  69. # (Use apenas para ajustes)
  70. #---------------------------------------------------------------------------
  71. MEMBERS_SPACE = [0,0]
  72. #---------------------------------------------------------------------------
  73. # Definição fixa da hud se deseja posicionar a hud em lugares
  74. # específicos da tela.
  75. #
  76. # FIXED_POSITION[INDEX_ID] = [X,Y]
  77. #
  78. #---------------------------------------------------------------------------
  79. FIXED_HUD_POSITION = []
  80. # FIXED_HUD_POSITION[0] = [10,10]
  81. # FIXED_HUD_POSITION[1] = [410,10]
  82. # FIXED_HUD_POSITION[2] = [10,320]
  83. # FIXED_HUD_POSITION[3] = [410,320]
  84. #---------------------------------------------------------------------------
  85. # Definição da posição do comando quando a opção de janelas fixa é ativada.
  86. #---------------------------------------------------------------------------
  87. FIXED_COMMAND_POSITION = []
  88. #FIXED_COMMAND_POSITION[0] = [130,10]
  89. # FIXED_COMMAND_POSITION[1] = [300,10]
  90. # FIXED_COMMAND_POSITION[2] = [130,290]
  91. # FIXED_COMMAND_POSITION[3] = [300,290]
  92. #---------------------------------------------------------------------------
  93. # Ocultar a HUD quando a janela de mensagem está ativa.
  94. #---------------------------------------------------------------------------
  95. MESSAGE_WINDOW_FADE_HUD = false
  96. #---------------------------------------------------------------------------
  97. # Definição da posição da janela de mensagem.
  98. #---------------------------------------------------------------------------
  99. # 0 - Acima
  100. # 1 - Centro
  101. # 2 - Abaixo
  102. #---------------------------------------------------------------------------
  103. BATTLE_MESSAGE_POSITION = 0
  104. #---------------------------------------------------------------------------
  105. # Definição da porcentagem do parâmetro baixo, isso influência na cor
  106. # do número dos parâmetros de HP, MP e TP.
  107. #---------------------------------------------------------------------------
  108. LOW_PARAMETER_PERCENTAGE = 30
  109. #============================================================================
  110.  
  111.  
  112. #============================================================================
  113. #============================================================================
  114. # * NAME
  115. #============================================================================
  116. # Ativar o Sprite do nome do personagem.
  117. #---------------------------------------------------------------------------
  118. NAME_VISIBLE = true
  119. #---------------------------------------------------------------------------
  120. # Definição da prioridade do Sprite.
  121. #---------------------------------------------------------------------------
  122. NAME_Z = 5
  123. #---------------------------------------------------------------------------
  124. # Definição da posição da Face. [X,Y]
  125. #---------------------------------------------------------------------------
  126. NAME_POSITION = [0,-7]
  127. #---------------------------------------------------------------------------
  128. # Definição do tipo alinhamento do nome.
  129. #
  130. # 0 - Esquerda
  131. # 1 - Centro
  132. # 2 - Direita
  133. #---------------------------------------------------------------------------
  134. NAME_ALIGN_TYPE = 1
  135. #---------------------------------------------------------------------------
  136. # Definição do nome da fonte.
  137. #---------------------------------------------------------------------------
  138. NAME_FONT_NAME = "Georgia"
  139. #---------------------------------------------------------------------------
  140. # Definição do tamanho da fonte.
  141. #---------------------------------------------------------------------------
  142. NAME_FONT_SIZE = 16
  143. #---------------------------------------------------------------------------
  144. # Ativar Bold.
  145. #---------------------------------------------------------------------------
  146. NAME_FONT_BOLD = true
  147. #---------------------------------------------------------------------------
  148. # Ativar Italic.
  149. #---------------------------------------------------------------------------
  150. NAME_FONT_ITALIC = true
  151. #---------------------------------------------------------------------------
  152. # Definição da cor da fonte
  153. #---------------------------------------------------------------------------
  154. NAME_FONT_COLOR = Color.new(255,255,255,255)
  155. #---------------------------------------------------------------------------
  156. # Ativar Sombra
  157. #---------------------------------------------------------------------------
  158. NAME_FONT_SHADOW = false
  159. #---------------------------------------------------------------------------
  160. # Definição da cor da sombra
  161. #---------------------------------------------------------------------------
  162. NAME_FONT_SHADOW_COLOR = Color.new(0,0,0,255)
  163. #---------------------------------------------------------------------------
  164. # Definição da distância da sombra.
  165. #---------------------------------------------------------------------------
  166. NAME_FONT_SHADOW_POSITION = [2,2]
  167. #============================================================================
  168. #============================================================================
  169.  
  170.  
  171. #============================================================================
  172. #============================================================================
  173. # * FACE
  174. #============================================================================
  175. # Ativar a face.
  176. # Será necessário o arquivo.
  177. #
  178. # ACTOR_NAME + _Face.png
  179. #
  180. # Eric_Face.png
  181. #
  182. #---------------------------------------------------------------------------
  183. FACE_VISIBLE = true
  184. # Ativar as Faces representando os battlers.
  185. # Deixe "false" se tiver problemas de compatibilidade com scripts.
  186. FACE_BATTLER = true
  187. #---------------------------------------------------------------------------
  188. # Definição da prioridade do sprite.
  189. #---------------------------------------------------------------------------
  190. FACE_Z = -1
  191. #---------------------------------------------------------------------------
  192. # Definição da posição da Face. [X,Y]
  193. #---------------------------------------------------------------------------
  194. FACE_POSITION = [23,6]
  195. #---------------------------------------------------------------------------
  196. # Ativar faces animadas.
  197. # Será necessário ter uma imagem de 4 faces do personagem no mesmo arquivo.
  198. #
  199. # FACE1/FACE2/FACE3/FACE4
  200. #
  201. # A imagem será dividida por 4 frames, no caso de definir a função como FALSE
  202. # a imagem será dividida por 1 frame
  203. #---------------------------------------------------------------------------
  204. FACE_ANIMATION = false
  205. #---------------------------------------------------------------------------
  206. # Ativar o efeito de Zoom quando o personagem usar alguma ação.
  207. #---------------------------------------------------------------------------
  208. FACE_ZOOM_ANIMATION = true
  209. #---------------------------------------------------------------------------
  210. # Ativar o efeito Mirror na animação de ação do personagem.
  211. #---------------------------------------------------------------------------
  212. FACE_ZOOM_MIRROR_EFFECT = true
  213. #---------------------------------------------------------------------------
  214. # Definição do tempo duração da animação da face.
  215. #---------------------------------------------------------------------------
  216. FACE_ANIMATION_DURATION = 40
  217. #---------------------------------------------------------------------------
  218. # Ativar o efeito tremor da face quando o personagem sofrer dano.
  219. #---------------------------------------------------------------------------
  220. FACE_SHAKE_EFFECT = true
  221. #============================================================================
  222. #============================================================================
  223.  
  224. #============================================================================
  225. #============================================================================
  226. # * TURN (ACTIVE INDICATOR)
  227. #============================================================================
  228. # Ativar o indicador de turno do personagem.
  229. # Será necessário o arquivo.
  230. #
  231. # Turn.png
  232. #
  233. #---------------------------------------------------------------------------
  234. TURN_SPRITE_VISIBLE = false
  235. #---------------------------------------------------------------------------
  236. # Definição da prioridade do Sprite.
  237. #---------------------------------------------------------------------------
  238. TURN_SPRITE_Z = 2
  239. #---------------------------------------------------------------------------
  240. # Definição da posição do sprite de turno.
  241. #---------------------------------------------------------------------------
  242. TURN_SPRITE_POSITION = [40,-60]
  243. #---------------------------------------------------------------------------
  244. # Ativar o efeito de animação de piscar.
  245. #---------------------------------------------------------------------------
  246. TURN_BLINK_EFFECT = true
  247. #---------------------------------------------------------------------------
  248.  
  249. #============================================================================
  250. #============================================================================
  251. # * HP
  252. #============================================================================
  253. # Ativar o número de HP.
  254. # Será necessário o arquivo.
  255. #
  256. # HP_Number.png
  257. #
  258. #---------------------------------------------------------------------------
  259. HP_NUMBER_VISIBLE = true
  260. #---------------------------------------------------------------------------
  261. # Definição da prioridade do Sprite.
  262. #---------------------------------------------------------------------------
  263. HP_NUMBER_Z = 2
  264. #---------------------------------------------------------------------------
  265. # Definição da posição do número de HP. [X,Y]
  266. #---------------------------------------------------------------------------
  267. HP_NUMBER_POSITION = [117,17]
  268. #---------------------------------------------------------------------------
  269. # Ativar o número de HP Total.
  270. # Será necessário o arquivo.
  271. #
  272. # HP_Number_Max.png
  273. #
  274. #---------------------------------------------------------------------------
  275. HP_NUMBER_MAX_VISIBLE = false
  276. #---------------------------------------------------------------------------
  277. # Definição da posição do número de HP Total. [X,Y]
  278. #---------------------------------------------------------------------------
  279. HP_NUMBER_MAX_POSITION = [165,30]
  280. #---------------------------------------------------------------------------
  281. # Definição do tipo alinhamento do número.
  282. #
  283. # 0 - Esquerda
  284. # 1 - Centro
  285. # 2 - Direita
  286. #---------------------------------------------------------------------------
  287. HP_NUMBER_ALIGN_TYPE = 2
  288. #---------------------------------------------------------------------------
  289. # Ativa o efeito de alinhar os números em posições de Y diferentes.
  290. #---------------------------------------------------------------------------
  291. HP_NUMBER_WAVE_ALIGN_EFFECT = false
  292. #---------------------------------------------------------------------------
  293. # Apresentar os números em porcentagem.
  294. #---------------------------------------------------------------------------
  295. HP_NUMBER_PERCENTAGE = false
  296. #---------------------------------------------------------------------------
  297. # Ativar números animados ("Rolantes").
  298. #---------------------------------------------------------------------------
  299. HP_NUMBER_ANIMATION = true
  300. #---------------------------------------------------------------------------
  301. # Ativar a cor do HP baixo.
  302. # Será necessário ter a imagem com as duas cores do paramêtro no mesmo
  303. # arquivo de imagem, a imagem será dividida por 2 frames de altura.
  304. #
  305. # NORMAL_COLOR
  306. # LOW_PARAMETER_COLOR
  307. #
  308. # Caso definir a função como FALSE a imagem será dividida apenas como
  309. # 1 frame de altura.
  310. #---------------------------------------------------------------------------
  311. HP_NUMBER_LOW_COLOR = false
  312. #---------------------------------------------------------------------------
  313. # Ativar o medidor de HP.
  314. # Será necessário o arquivo.
  315. #
  316. # HP_Meter.png
  317. #
  318. #---------------------------------------------------------------------------
  319. HP_METER_VISIBLE = true
  320. #---------------------------------------------------------------------------
  321. # Definição da prioridade do sprite.
  322. #---------------------------------------------------------------------------
  323. HP_METER_Z = 1
  324. #---------------------------------------------------------------------------
  325. # Definição da posição do medidor de HP. [X,Y]
  326. #---------------------------------------------------------------------------
  327. HP_METER_POSITION = [47,30]
  328. #---------------------------------------------------------------------------
  329. # Definição do ângulo do medidor.
  330. #---------------------------------------------------------------------------
  331. HP_METER_ANGLE = 0
  332. #---------------------------------------------------------------------------
  333. # Ativar o efeito mirror, essa opção faz com que o medidor tenha o movimento
  334. # inverso.
  335. #---------------------------------------------------------------------------
  336. HP_METER_MIRROR_EFFECT = false
  337. #---------------------------------------------------------------------------
  338. # Ativar o efeito animado de dano no medidor.
  339. # Será necessário ter a imagem com as duas cores do paramêtro no mesmo
  340. # arquivo de imagem, a imagem será dividida por 2 frames de altura.
  341. #
  342. # NORMAL_COLOR
  343. # DAMAGE_COLOR
  344. #
  345. # Se definir como FALSE use apenas use uma imagem com o tamanho normal.
  346. #---------------------------------------------------------------------------
  347. HP_METER_REDUCTION_ANIMATION = true
  348. #---------------------------------------------------------------------------
  349. # Ativar o efeito animado do "medidor fluindo".
  350. # Será necessário ter a imagem com a largura 3 vezes maior que o tamanho normal.
  351. # Essa imagem dever estar em gradiente para ter o efeito "fluindo".
  352. # Se definir como FALSE use apenas uma imagem com o tamanho normal.
  353. #---------------------------------------------------------------------------
  354. HP_METER_GRADIENT_ANIMATION = false
  355. #---------------------------------------------------------------------------
  356. # Ativar HP em ícones.
  357. # Será necessário ter a imagem.
  358. #
  359. # HP_Icon.png
  360. #
  361. #---------------------------------------------------------------------------
  362. HP_ICON_VISIBLE = false
  363. #---------------------------------------------------------------------------
  364. # Definição da prioridade do Sprite.
  365. #---------------------------------------------------------------------------
  366. HP_ICON_Z = 1
  367. #---------------------------------------------------------------------------
  368. # Posição do ícone de HP.
  369. #---------------------------------------------------------------------------
  370. HP_ICON_POSITION = [200,0]
  371. #---------------------------------------------------------------------------
  372. # Ativar o sprite EX do ultimo ícone
  373. # Será necessário ter a imagem.
  374. #
  375. # HP_Icon_EX.png
  376. #
  377. #---------------------------------------------------------------------------
  378. HP_ICON_EX_VISIBLE = false
  379. #---------------------------------------------------------------------------
  380. # Posição do ícone Animado.
  381. #---------------------------------------------------------------------------
  382. HP_ICON_EX_POSITION = [0,0]
  383. #---------------------------------------------------------------------------
  384. # Ativar o efeito de Zoom do Sprite.
  385. #---------------------------------------------------------------------------
  386. HP_ICON_EX_ZOOM_EFFECT = true
  387. #---------------------------------------------------------------------------
  388. # Espaço entre os ícones.
  389. #---------------------------------------------------------------------------
  390. HP_ICON_SPACE = [-10,-10]
  391. #---------------------------------------------------------------------------
  392. # Definição da quantidade maxima de ícones na horizontal.
  393. #---------------------------------------------------------------------------
  394. HP_ICON_COL_MAX = 10
  395. #---------------------------------------------------------------------------
  396. # Definição da quantidade maxima de ícones na vertical.
  397. #---------------------------------------------------------------------------
  398. HP_ICON_ROW_MAX = 2
  399. #---------------------------------------------------------------------------
  400. # Ativar o número de HP de ícones.
  401. # Será necessário ter a imagem.
  402. #
  403. # HP_Icon_Number.png
  404. #
  405. #---------------------------------------------------------------------------
  406. HP_ICON_NUMBER_VISIBLE = false
  407. #---------------------------------------------------------------------------
  408. # Definição da prioridade do sprite.
  409. #---------------------------------------------------------------------------
  410. HP_ICON_NUMBER_Z = 4
  411. #---------------------------------------------------------------------------
  412. # Posição do número do ícone
  413. #---------------------------------------------------------------------------
  414. HP_ICON_NUMBER_POSITION = [0,0]
  415. #---------------------------------------------------------------------------
  416. # Definição do tipo alinhamento do número.
  417. #
  418. # 0 - Esquerda
  419. # 1 - Centro
  420. # 2 - Direita
  421. #---------------------------------------------------------------------------
  422. HP_ICON_NUMBER_ALIGN_TYPE = 0
  423. #============================================================================
  424. #============================================================================
  425.  
  426.  
  427. #============================================================================
  428. #============================================================================
  429. # * MP
  430. #============================================================================
  431. # Ativar o número de MP.
  432. # Será necessário o arquivo.
  433. #
  434. # MP_Number.png
  435. #
  436. #---------------------------------------------------------------------------
  437. MP_NUMBER_VISIBLE = true
  438. #---------------------------------------------------------------------------
  439. # Definição da prioridade do Sprite.
  440. #---------------------------------------------------------------------------
  441. MP_NUMBER_Z = 2
  442. #---------------------------------------------------------------------------
  443. # Definição da posição do número de MP. [X,Y]
  444. #---------------------------------------------------------------------------
  445. MP_NUMBER_POSITION = [108,47]
  446. #---------------------------------------------------------------------------
  447. # Ativar o número de MP Total.
  448. # Será necessário o arquivo.
  449. #
  450. # MP_Number_Max.png
  451. #
  452. #---------------------------------------------------------------------------
  453. MP_NUMBER_MAX_VISIBLE = false
  454. #---------------------------------------------------------------------------
  455. # Definição da posição do número de MP Total. [X,Y]
  456. #---------------------------------------------------------------------------
  457. MP_NUMBER_MAX_POSITION = [128,53]
  458. #---------------------------------------------------------------------------
  459. # Definição do tipo alinhamento do número.
  460. #
  461. # 0 - Esquerda
  462. # 1 - Centro
  463. # 2 - Direita
  464. #---------------------------------------------------------------------------
  465. MP_NUMBER_ALIGN_TYPE = 2
  466. #---------------------------------------------------------------------------
  467. # Ativa o efeito de alinhar os números em posições de Y diferentes.
  468. #---------------------------------------------------------------------------
  469. MP_NUMBER_WAVE_ALIGN_EFFECT = false
  470. #---------------------------------------------------------------------------
  471. # Apresentar os números em porcentagem.
  472. #---------------------------------------------------------------------------
  473. MP_NUMBER_PERCENTAGE = false
  474. #---------------------------------------------------------------------------
  475. # Ativar números animados ("Rolantes").
  476. #---------------------------------------------------------------------------
  477. MP_NUMBER_ANIMATION = true
  478. #---------------------------------------------------------------------------
  479. # Ativar a cor do MP baixo.
  480. # Será necessário ter a imagem com as duas cores do paramêtro no mesmo
  481. # arquivo de imagem, a imagem será dividida por 2 frames de altura.
  482. #
  483. # NORMAL_COLOR
  484. # LOW_PARAMETER_COLOR
  485. #
  486. # Se definir como FALSE use apenas use uma imagem com o tamanho normal.
  487. #---------------------------------------------------------------------------
  488. MP_NUMBER_LOW_COLOR = false
  489. #---------------------------------------------------------------------------
  490. # Ativar o medidor de MP.
  491. # Será necessário o arquivo.
  492. #
  493. # MP_Meter.png
  494. #
  495. #---------------------------------------------------------------------------
  496. MP_METER_VISIBLE = true
  497. #---------------------------------------------------------------------------
  498. # Definição da prioridade do sprite.
  499. #---------------------------------------------------------------------------
  500. MP_METER_Z = 1
  501. #---------------------------------------------------------------------------
  502. # Definição da posição do medidor de MP. [X,Y]
  503. #---------------------------------------------------------------------------
  504. MP_METER_POSITION = [39,47]
  505. #---------------------------------------------------------------------------
  506. # Definição do ângulo do medidor.
  507. #---------------------------------------------------------------------------
  508. MP_METER_ANGLE = 0
  509. #---------------------------------------------------------------------------
  510. # Ativar o efeito mirror, essa opção faz com que o medidor tenha o movimento
  511. # inverso.
  512. #---------------------------------------------------------------------------
  513. MP_METER_MIRROR_EFFECT = false
  514. #---------------------------------------------------------------------------
  515. # Ativar o efeito animado de dano no medidor.
  516. # Será necessário ter a imagem com as duas cores do paramêtro no mesmo
  517. # arquivo de imagem, a imagem será dividida por 2 frames de altura.
  518. #
  519. # NORMAL_COLOR
  520. # DAMAGE_COLOR
  521. #
  522. # Se definir como FALSE use apenas use uma imagem com o tamanho normal.
  523. #---------------------------------------------------------------------------
  524. MP_METER_REDUCTION_ANIMATION = false
  525. #---------------------------------------------------------------------------
  526. # Ativar o efeito animado do "medidor fluindo".
  527. # Será necessário ter a imagem com a largura 3 vezes maior que o tamanho normal.
  528. # Essa imagem dever estar em gradiente para ter o efeito "fluindo".
  529. # Se definir como FALSE use apenas uma imagem com o tamanho normal.
  530. #---------------------------------------------------------------------------
  531. MP_METER_GRADIENT_ANIMATION = false
  532. #---------------------------------------------------------------------------
  533. # Ativar MP em ícones.
  534. # Será necessário ter a imagem.
  535. #
  536. # MP_Icon.png
  537. #
  538. #---------------------------------------------------------------------------
  539. MP_ICON_VISIBLE = false
  540. #---------------------------------------------------------------------------
  541. # Definição da prioridade do Sprite.
  542. #---------------------------------------------------------------------------
  543. MP_ICON_Z = 1
  544. #---------------------------------------------------------------------------
  545. # Posição do ícone de MP.
  546. #---------------------------------------------------------------------------
  547. MP_ICON_POSITION = [200,64]
  548. #---------------------------------------------------------------------------
  549. # Ativar o sprite EX do ultimo ícone
  550. # Será necessário ter a imagem.
  551. #
  552. # MP_Icon_EX.png
  553. #
  554. #---------------------------------------------------------------------------
  555. MP_ICON_EX_VISIBLE = false
  556. #---------------------------------------------------------------------------
  557. # Posição do ícone Animado.
  558. #---------------------------------------------------------------------------
  559. MP_ICON_EX_POSITION = [0,0]
  560. #---------------------------------------------------------------------------
  561. # Ativar o efeito de Zoom do Sprite.
  562. #---------------------------------------------------------------------------
  563. MP_ICON_EX_ZOOM_EFFECT = true
  564. #---------------------------------------------------------------------------
  565. # Espaço entre os ícones.
  566. #---------------------------------------------------------------------------
  567. MP_ICON_SPACE = [-10,-10]
  568. #---------------------------------------------------------------------------
  569. # Definição da quantidade maxima de ícones na horizontal.
  570. #---------------------------------------------------------------------------
  571. MP_ICON_COL_MAX = 10
  572. #---------------------------------------------------------------------------
  573. # Definição da quantidade maxima de ícones na vertical.
  574. #---------------------------------------------------------------------------
  575. MP_ICON_ROW_MAX = 2
  576. #---------------------------------------------------------------------------
  577. # Ativar o número de MP de ícones.
  578. # Será necessário ter a imagem.
  579. #
  580. # MP_Icon_Number.png
  581. #
  582. #---------------------------------------------------------------------------
  583. MP_ICON_NUMBER_VISIBLE = false
  584. #---------------------------------------------------------------------------
  585. # Definição da prioridade do sprite.
  586. #---------------------------------------------------------------------------
  587. MP_ICON_NUMBER_Z = 4
  588. #---------------------------------------------------------------------------
  589. # Posição do número do ícone
  590. #---------------------------------------------------------------------------
  591. MP_ICON_NUMBER_POSITION = [0,64]
  592. #---------------------------------------------------------------------------
  593. # Definição do tipo alinhamento do número.
  594. #
  595. # 0 - Esquerda
  596. # 1 - Centro
  597. # 2 - Direita
  598. #---------------------------------------------------------------------------
  599. MP_ICON_NUMBER_ALIGN_TYPE = 0
  600. #============================================================================
  601. #============================================================================
  602.  
  603.  
  604. #============================================================================
  605. #============================================================================
  606. # * TP
  607. #============================================================================
  608. # Ativar o número de TP.
  609. # Será necessário o arquivo.
  610. #
  611. # TP_Number.png
  612. #
  613. #---------------------------------------------------------------------------
  614. TP_NUMBER_VISIBLE = true
  615. #---------------------------------------------------------------------------
  616. # Definição da prioridade do sprite.
  617. #---------------------------------------------------------------------------
  618. TP_NUMBER_Z = 5
  619. #---------------------------------------------------------------------------
  620. # Definição da posição do número de TP. [X,Y]
  621. #---------------------------------------------------------------------------
  622. TP_NUMBER_POSITION = [8,-3]
  623. #---------------------------------------------------------------------------
  624. # Ativar o número de TP Total.
  625. # Será necessário o arquivo.
  626. #
  627. # TP_Number_Max.png
  628. #
  629. #---------------------------------------------------------------------------
  630. TP_NUMBER_MAX_VISIBLE = false
  631. #---------------------------------------------------------------------------
  632. # Definição da posição do número de TP Total. [X,Y]
  633. #---------------------------------------------------------------------------
  634. TP_NUMBER_MAX_POSITION = [165,73]
  635. #---------------------------------------------------------------------------
  636. # Definição do tipo alinhamento do número.
  637. #
  638. # 0 - Esquerda
  639. # 1 - Centro
  640. # 2 - Direita
  641. #---------------------------------------------------------------------------
  642. TP_NUMBER_ALIGN_TYPE = 1
  643. #---------------------------------------------------------------------------
  644. # Ativa o efeito de alinhar os números em posições de Y diferentes.
  645. #---------------------------------------------------------------------------
  646. TP_NUMBER_WAVE_ALIGN_EFFECT = false
  647. #---------------------------------------------------------------------------
  648. # Apresentar os números em porcentagem.
  649. #---------------------------------------------------------------------------
  650. TP_NUMBER_PERCENTAGE = false
  651. #---------------------------------------------------------------------------
  652. # Ativar números animados ("Rolantes").
  653. #---------------------------------------------------------------------------
  654. TP_NUMBER_ANIMATION = true
  655. #---------------------------------------------------------------------------
  656. # Ativar a cor do TP baixo.
  657. # Será necessário ter a imagem com as duas cores do paramêtro no mesmo
  658. # arquivo de imagem, a imagem será dividida por 2 frames de altura.
  659. #
  660. # NORMAL_COLOR
  661. # LOW_PARAMETER_COLOR
  662. #
  663. # Se definir como FALSE use apenas use uma imagem com o tamanho normal.
  664. #---------------------------------------------------------------------------
  665. TP_NUMBER_LOW_COLOR = false
  666. #---------------------------------------------------------------------------
  667. # Ativar o medidor de TP.
  668. # Será necessário o arquivo.
  669. #
  670. # TP_Meter.png
  671. #
  672. #---------------------------------------------------------------------------
  673. TP_METER_VISIBLE = false
  674. #---------------------------------------------------------------------------
  675. # Definição da prioridade do sprite.
  676. #---------------------------------------------------------------------------
  677. TP_METER_Z = 1
  678. #---------------------------------------------------------------------------
  679. # Definição da posição do medidor de TP. [X,Y]
  680. #---------------------------------------------------------------------------
  681. TP_METER_POSITION = [68,74]
  682. #---------------------------------------------------------------------------
  683. # Definição do ângulo do medidor.
  684. #---------------------------------------------------------------------------
  685. TP_METER_ANGLE = 0
  686. #---------------------------------------------------------------------------
  687. # Ativar o efeito mirror, essa opção faz com que o medidor tenha o movimento
  688. # inverso.
  689. #---------------------------------------------------------------------------
  690. TP_METER_MIRROR_EFFECT = false
  691. #---------------------------------------------------------------------------
  692. # Ativar o efeito animado de dano no medidor.
  693. # Será necessário ter a imagem com as duas cores do paramêtro no mesmo
  694. # arquivo de imagem, a imagem será dividida por 2 frames de altura.
  695. #
  696. # NORMAL_COLOR
  697. # DAMAGE_COLOR
  698. #
  699. # Se definir como FALSE use apenas use uma imagem com o tamanho normal.
  700. #---------------------------------------------------------------------------
  701. TP_METER_REDUCTION_ANIMATION = true
  702. #---------------------------------------------------------------------------
  703. # Ativar o efeito animado do "medidor fluindo".
  704. # Será necessário ter a imagem com a largura 3 vezes maior que o tamanho normal.
  705. # Essa imagem dever estar em gradiente para ter o efeito "fluindo".
  706. # Se definir como FALSE use apenas uma imagem com o tamanho normal.
  707. #---------------------------------------------------------------------------
  708. TP_METER_GRADIENT_ANIMATION = true
  709. #---------------------------------------------------------------------------
  710. # Ativar TP em ícones.
  711. # Será necessário ter a imagem.
  712. #
  713. # TP_Icon.png
  714. #
  715. #---------------------------------------------------------------------------
  716. TP_ICON_VISIBLE = false
  717. #---------------------------------------------------------------------------
  718. # Definição da prioridade do sprite.
  719. #---------------------------------------------------------------------------
  720. TP_ICON_Z = 1
  721. #---------------------------------------------------------------------------
  722. # Posição do ícone de TP.
  723. #---------------------------------------------------------------------------
  724. TP_ICON_POSITION = [200,128]
  725. #---------------------------------------------------------------------------
  726. # Ativar o sprite EX do ultimo ícone
  727. # Será necessário ter a imagem.
  728. #
  729. # TP_Icon_EX.png
  730. #
  731. #---------------------------------------------------------------------------
  732. TP_ICON_EX_VISIBLE = false
  733. #---------------------------------------------------------------------------
  734. # Posição do ícone Animado.
  735. #---------------------------------------------------------------------------
  736. TP_ICON_EX_POSITION = [0,0]
  737. #---------------------------------------------------------------------------
  738. # Ativar o efeito de Zoom do Sprite.
  739. #---------------------------------------------------------------------------
  740. TP_ICON_EX_ZOOM_EFFECT = true
  741. #---------------------------------------------------------------------------
  742. # Espaço entre os ícones.
  743. #---------------------------------------------------------------------------
  744. TP_ICON_SPACE = [-10,-10]
  745. #---------------------------------------------------------------------------
  746. # Definição da quantidade maxima de ícones na horizontal.
  747. #---------------------------------------------------------------------------
  748. TP_ICON_COL_MAX = 10
  749. #---------------------------------------------------------------------------
  750. # Definição da quantidade maxima de ícones na vertical.
  751. #---------------------------------------------------------------------------
  752. TP_ICON_ROW_MAX = 2
  753. #---------------------------------------------------------------------------
  754. # Ativar o número de TP de ícones.
  755. # Será necessário ter a imagem.
  756. #
  757. # TP_Icon_Number.png
  758. #
  759. #---------------------------------------------------------------------------
  760. TP_ICON_NUMBER_VISIBLE = false
  761. #---------------------------------------------------------------------------
  762. # Definição da prioridade do sprite.
  763. #---------------------------------------------------------------------------
  764. TP_ICON_NUMBER_Z = 4
  765. #---------------------------------------------------------------------------
  766. # Posição do número do ícone
  767. #---------------------------------------------------------------------------
  768. TP_ICON_NUMBER_POSITION = [0,128]
  769. #---------------------------------------------------------------------------
  770. # Definição do tipo alinhamento do número.
  771. #
  772. # 0 - Esquerda
  773. # 1 - Centro
  774. # 2 - Direita
  775. #---------------------------------------------------------------------------
  776. TP_ICON_NUMBER_ALIGN_TYPE = 0
  777. #============================================================================
  778. #============================================================================
  779.  
  780. #============================================================================
  781. #============================================================================
  782. # * AT
  783. #============================================================================
  784. # Ativar o número de AT.
  785. # Será necessário o arquivo.
  786. #
  787. # AT_Number.png
  788. #
  789. #---------------------------------------------------------------------------
  790. AT_NUMBER_VISIBLE = false
  791. #---------------------------------------------------------------------------
  792. # Definição da prioridade do Sprite.
  793. #---------------------------------------------------------------------------
  794. AT_NUMBER_Z = 2
  795. #---------------------------------------------------------------------------
  796. # Definição da posição do número de AT. [X,Y]
  797. #---------------------------------------------------------------------------
  798. AT_NUMBER_POSITION = [125,-27]
  799. #---------------------------------------------------------------------------
  800. # Ativar o número de AT Total.
  801. # Será necessário o arquivo.
  802. #
  803. # AT_Number_Max.png
  804. #
  805. #---------------------------------------------------------------------------
  806. AT_NUMBER_MAX_VISIBLE = false
  807. #---------------------------------------------------------------------------
  808. # Definição da posição do número de AT Total. [X,Y]
  809. #---------------------------------------------------------------------------
  810. AT_NUMBER_MAX_POSITION = [165,-17]
  811. #---------------------------------------------------------------------------
  812. # Definição do tipo alinhamento do número.
  813. #
  814. # 0 - Esquerda
  815. # 1 - Centro
  816. # 2 - Direita
  817. #---------------------------------------------------------------------------
  818. AT_NUMBER_ALIGN_TYPE = 2
  819. #---------------------------------------------------------------------------
  820. # Ativa o efeito de alinhar os números em posições de Y diferentes.
  821. #---------------------------------------------------------------------------
  822. AT_NUMBER_WAVE_ALIGN_EFFECT = false
  823. #---------------------------------------------------------------------------
  824. # Apresentar os números em porcentagem.
  825. #---------------------------------------------------------------------------
  826. AT_NUMBER_PERCENTAGE = true
  827. #---------------------------------------------------------------------------
  828. # Ativar números animados ("Rolantes").
  829. #---------------------------------------------------------------------------
  830. AT_NUMBER_ANIMATION = false
  831. #---------------------------------------------------------------------------
  832. # Ativar o medidor de AT.
  833. # Será necessário o arquivo.
  834. #
  835. # AT_Meter.png
  836. #
  837. #---------------------------------------------------------------------------
  838. AT_METER_VISIBLE = true
  839. #---------------------------------------------------------------------------
  840. # Definição da prioridade do sprite.
  841. #---------------------------------------------------------------------------
  842. AT_METER_Z = 1
  843. #---------------------------------------------------------------------------
  844. # Definição da posição do medidor de AT. [X,Y]
  845. #---------------------------------------------------------------------------
  846. AT_METER_POSITION = [28,64]
  847. #---------------------------------------------------------------------------
  848. # Definição do ângulo do medidor.
  849. #---------------------------------------------------------------------------
  850. AT_METER_ANGLE = 0
  851. #---------------------------------------------------------------------------
  852. # Ativar o efeito mirror, essa opção faz com que o medidor tenha o movimento
  853. # inverso.
  854. #---------------------------------------------------------------------------
  855. AT_METER_MIRROR_EFFECT = false
  856. #---------------------------------------------------------------------------
  857. # Ativar o efeito animado do "medidor fluindo".
  858. # Será necessário ter a imagem com a largura 3 vezes maior que o tamanho normal.
  859. # Essa imagem dever estar em gradiente para ter o efeito "fluindo".
  860. # Se definir como FALSE use apenas uma imagem com o tamanho normal.
  861. #---------------------------------------------------------------------------
  862. AT_METER_GRADIENT_ANIMATION = true
  863. #============================================================================
  864.  
  865.  
  866. #============================================================================
  867. #============================================================================
  868. # * LEVEL
  869. #============================================================================
  870. # Ativar o número de Level.
  871. # Será necessário o arquivo.
  872. #
  873. # LV_Number.png
  874. #
  875. #---------------------------------------------------------------------------
  876. LEVEL_NUMBER_VISIBLE = false
  877. #---------------------------------------------------------------------------
  878. # Definição da prioridade do Sprite.
  879. #---------------------------------------------------------------------------
  880. LEVEL_NUMBER_Z = 2
  881. #---------------------------------------------------------------------------
  882. # Definição da posição do número do Level. [X,Y]
  883. #---------------------------------------------------------------------------
  884. LEVEL_NUMBER_POSITION = [84,0]
  885. #---------------------------------------------------------------------------
  886. # Definição do tipo alinhamento do número.
  887. #
  888. # 0 - Esquerda
  889. # 1 - Centro
  890. # 2 - Direita
  891. #---------------------------------------------------------------------------
  892. LEVEL_NUMBER_ALIGN_TYPE = 1
  893. #============================================================================
  894. #============================================================================
  895.  
  896.  
  897. #============================================================================
  898. #============================================================================
  899. # * STATE
  900. #============================================================================
  901. # Ativar as condições.
  902. #---------------------------------------------------------------------------
  903. STATES_VISIBLE = true
  904. #---------------------------------------------------------------------------
  905. # Definição da prioridade do sprite.
  906. #---------------------------------------------------------------------------
  907. STATES_Z = 1
  908. #---------------------------------------------------------------------------
  909. # Definição da posição das condições. [X,Y]
  910. #---------------------------------------------------------------------------
  911. STATES_POSITION = [0,48]
  912. #---------------------------------------------------------------------------
  913. # Ativar o efeito animado das condições deslizando.
  914. #---------------------------------------------------------------------------
  915. STATES_SCROLLING_ANIMATION = false
  916. #---------------------------------------------------------------------------
  917. # Definição do ângulo do sprite.
  918. #---------------------------------------------------------------------------
  919. STATE_ANGLE = 0
  920. #---------------------------------------------------------------------------
  921. # Definição das condições que serão ocultadas pela hud.
  922. # EX - HIDE_STATES_ID = [9,10,13]
  923. #---------------------------------------------------------------------------
  924. HIDE_STATES_ID = []
  925. #============================================================================
  926. #============================================================================
  927.  
  928.  
  929. #============================================================================
  930. #============================================================================
  931. # * SECOND LAYOUT (Overlayer)
  932. #============================================================================
  933. # Ativar a segunda camada de Layout
  934. # Será necessário o arquivo.
  935. #
  936. # Layout_2.png
  937. #
  938. #============================================================================
  939. SECOND_LAYOUT = true
  940. #---------------------------------------------------------------------------
  941. # Definição da prioridade do sprite.
  942. #---------------------------------------------------------------------------
  943. SECOND_LAYOUT_Z = 4
  944. #---------------------------------------------------------------------------
  945. # Definição da posição do sprite.
  946. #---------------------------------------------------------------------------
  947. SECOND_LAYOUT_POSITION = [-5,-10]
  948. #============================================================================
  949. #============================================================================
  950.  
  951. end
  952.  
  953. #============================================================================
  954. #============================================================================
  955. # * CUSTOM WINDOWS (GENERAL)
  956. #============================================================================
  957. module MOG_BATTLE_HUD_EX
  958.  
  959. #============================================================================
  960. # * Ativar Janelas Customizadas.
  961. #============================================================================
  962. ENABLE_CUSTOM_WINDOWS = true
  963.  
  964. #============================================================================
  965. # * BATTLE LOG WINDOW
  966. #============================================================================
  967. #Definição da posição da janela de log.
  968. BATTLE_LOG_POSITION = [0,0]
  969. #============================================================================
  970.  
  971.  
  972. #============================================================================
  973. # * SKILL WINDOW
  974. #============================================================================
  975. #Definição do tamanho da janela.
  976. SKILL_WINDOW_SIZE = [Graphics.width, 120]
  977. #Definição da posição da janela.
  978. SKILL_WINDOW_POSITION = [0,0]
  979. #Definição da transparência da janela.
  980. SKILL_WINDOW_OPACITY = 0
  981. #Ativar a imagem de Layout. ("Layout_Skill.png")
  982. SKILL_WINDOW_LAYOUT = true
  983. #Definição do layout.
  984. SKILL_WINDOW_LAYOUT_POSITION = [0,-7]
  985. #============================================================================
  986.  
  987. #============================================================================
  988. # * ITEM WINDOW
  989. #============================================================================
  990. #Definição do tamanho da janela.
  991. ITEM_WINDOW_SIZE = [Graphics.width, 120]
  992. #Definição da posição da janela.
  993. ITEM_WINDOW_POSITION = [0,0]
  994. #Definição da transparência da janela.
  995. ITEM_WINDOW_OPACITY = 0
  996. #Ativar a imagem de Layout. ("Layout_Item.png")
  997. ITEM_WINDOW_LAYOUT = true
  998. #Definição do layout.
  999. ITEM_WINDOW_LAYOUT_POSITION = [0,-7]
  1000. #============================================================================
  1001.  
  1002. #============================================================================
  1003. # * COMMAND WINDOW
  1004. #============================================================================
  1005. #Ajustar automáticamente
  1006. AUTO_ADJUST_ACTOR_COMMAND = true
  1007. #Definição da posição da janela. (Apenas para Ajustes)
  1008. ACTOR_COMMAND_POSITION = [0,-17]
  1009. #Definição da transparência da janela.
  1010. ACTOR_COMMAND_OPACITY = 0
  1011. #Ativar a imagem de Layout. ("Layout_Command.png")
  1012. ACTOR_COMMAND_LAYOUT = true
  1013. #Definição do layout.
  1014. ACTOR_COMMAND_LAYOUT_POSITION = [0,0]
  1015. #============================================================================
  1016.  
  1017. #============================================================================
  1018. # * HELP WINDOW
  1019. #============================================================================
  1020. #Definição do tamanho da janela.
  1021. HELP_WINDOW_SIZE = [Graphics.width, 72]
  1022. #Definição do tamanho da janela.
  1023. HELP_WINDOW_POSITION = [Graphics.width / 2, 0]
  1024. #Definição da transparência da janela.
  1025. HELP_WINDOW_OPACITY = 0
  1026. #Ativar a imagem de Layout. ("Layout_Help.png")
  1027. HELP_WINDOW_LAYOUT = true
  1028. #Definição do layout.
  1029. HELP_WINDOW_LAYOUT_POSITION = [0,0]
  1030. #============================================================================
  1031.  
  1032. #============================================================================
  1033. # * TARGET ACTOR WINDOW
  1034. #============================================================================
  1035. #Definição do tamanho da janela.
  1036. ACTOR_WINDOW_SIZE = [Graphics.width, 120]
  1037. #Definição do tamanho da janela.
  1038. ACTOR_WINDOW_POSITION = [Graphics.width / 2, Graphics.height]
  1039. #Definição da transparência da janela.
  1040. ACTOR_WINDOW_OPACITY = 0
  1041. #Ativar a imagem de Layout. ("Layout_Target_Actor.png")
  1042. ACTOR_WINDOW_LAYOUT = true
  1043. #Definição do layout.
  1044. ACTOR_WINDOW_LAYOUT_POSITION = [0,0]
  1045. #============================================================================
  1046.  
  1047. #============================================================================
  1048. # * TARGET ENEMY WINDOW
  1049. #============================================================================
  1050. #Definição do tamanho da janela.
  1051. ENEMY_WINDOW_SIZE = [Graphics.width, 120]
  1052. #Definição do tamanho da janela.
  1053. ENEMY_WINDOW_POSITION = [Graphics.width / 2, Graphics.height]
  1054. #Definição da transparência da janela.
  1055. ENEMY_WINDOW_OPACITY = 0
  1056. #Ativar a imagem de Layout. ("Layout_Target_Actor.png")
  1057. ENEMY_WINDOW_LAYOUT = true
  1058. #Definição do layout.
  1059. ENEMY_WINDOW_LAYOUT_POSITION = [0,0]
  1060. #============================================================================
  1061.  
  1062. #============================================================================
  1063. # * PARTY WINDOW (Fight/Escape)
  1064. #============================================================================
  1065. #Definição do tamanho da janela.
  1066. PARTY_COMMAND_POSITION = [Graphics.width / 2,Graphics.height / 2]
  1067. #Definição da transparência da janela.
  1068. PARTY_COMMAND_OPACITY = 0
  1069. #Ativar a imagem de Layout. ("Layout_Party.png")
  1070. PARTY_COMMAND_LAYOUT = true
  1071. #Definição do layout.
  1072. PARTY_COMMAND_LAYOUT_POSITION = [0,0]
  1073. #============================================================================
  1074.  
  1075. end
  1076.  
  1077. $imported = {} if $imported.nil?
  1078. $imported[:mog_battle_hud_ex] = true
  1079.  
  1080. #==============================================================================
  1081. # ** Cache
  1082. #==============================================================================
  1083. module Cache
  1084.  
  1085. #--------------------------------------------------------------------------
  1086. # * Hud
  1087. #--------------------------------------------------------------------------
  1088. def self.battle_hud(filename)
  1089. load_bitmap("Graphics/Huds/Battle/", filename)
  1090. end
  1091.  
  1092. end
  1093.  
  1094. #==============================================================================
  1095. # ** Game Temp
  1096. #==============================================================================
  1097. class Game_Temp
  1098.  
  1099. attr_accessor :battler_face_pos
  1100. attr_accessor :hud_pos
  1101. attr_accessor :hud_pos_real
  1102. attr_accessor :com_pos
  1103. attr_accessor :mbhud_force_refresh
  1104. attr_accessor :mbhud_window
  1105. attr_accessor :command_visible
  1106. attr_accessor :refresh_turn_sprite
  1107. attr_accessor :battle_hud_visible
  1108.  
  1109. #--------------------------------------------------------------------------
  1110. # * Initialize
  1111. #--------------------------------------------------------------------------
  1112. alias mog_monogatari_bhud_initialize initialize
  1113. def initialize
  1114. @battler_face_pos = []
  1115. @hud_pos = []
  1116. @hud_pos_real = []
  1117. @com_pos = []
  1118. @mbhud_force_refresh = false
  1119. @mbhud_window = [false,false,false,false,false,false,false]
  1120. @command_visible = false
  1121. @refresh_turn_sprite = false
  1122. @battle_hud_visible = true
  1123. mog_monogatari_bhud_initialize
  1124. end
  1125.  
  1126. #--------------------------------------------------------------------------
  1127. # * Check Screen Xyz
  1128. #--------------------------------------------------------------------------
  1129. def check_screen_xyz_nil
  1130. return if !SceneManager.face_battler?
  1131. for actor in $game_party.battle_members
  1132. actor.screen_x = 0 if actor.screen_x == nil
  1133. actor.screen_y = 0 if actor.screen_y == nil
  1134. actor.screen_z = 0 if actor.screen_z == nil
  1135. end
  1136. end
  1137.  
  1138. end
  1139.  
  1140. #==============================================================================
  1141. # ** Game Interpreter
  1142. #==============================================================================
  1143. class Game_Interpreter
  1144.  
  1145. #--------------------------------------------------------------------------
  1146. # * Refresh Battle Hud
  1147. #--------------------------------------------------------------------------
  1148. def refresh_battle_hud
  1149. $game_temp.check_screen_xyz_nil rescue nil
  1150. $game_temp.mbhud_force_refresh = true
  1151. end
  1152.  
  1153. #--------------------------------------------------------------------------
  1154. # * Battler Face Name
  1155. #--------------------------------------------------------------------------
  1156. def battler_face_name(actor_id,face_name = "")
  1157. for actor in $game_party.members
  1158. actor.battler_face_name = face_name if actor.id == actor_id
  1159. end
  1160. refresh_battle_hud
  1161. end
  1162.  
  1163. #--------------------------------------------------------------------------
  1164. # * Battler Hud Visible
  1165. #--------------------------------------------------------------------------
  1166. def battle_hud_visible(value)
  1167. $game_temp.battle_hud_visible = value
  1168. end
  1169.  
  1170. #--------------------------------------------------------------------------
  1171. # * Command_129
  1172. #--------------------------------------------------------------------------
  1173. alias mog_monogatari_bhud_command_129 command_129
  1174. def command_129
  1175. mog_monogatari_bhud_command_129
  1176. refresh_battle_hud if SceneManager.scene_is?(Scene_Battle)
  1177. end
  1178.  
  1179. end
  1180.  
  1181. #==============================================================================
  1182. # ** Game Actor
  1183. #==============================================================================
  1184. class Game_Actor < Game_Battler
  1185.  
  1186. attr_accessor :face_animation
  1187. attr_accessor :battler_face_name
  1188.  
  1189. #--------------------------------------------------------------------------
  1190. # * Setup
  1191. #--------------------------------------------------------------------------
  1192. alias mog_monogatari_face_animation setup
  1193. def setup(actor_id)
  1194. mog_monogatari_face_animation(actor_id)
  1195. @face_animation = [0,0,0]
  1196. @battler_face_name = "Face_" + actor_id.to_s
  1197. end
  1198.  
  1199. #--------------------------------------------------------------------------
  1200. # ● Real Next Level
  1201. #--------------------------------------------------------------------------
  1202. def real_next_level
  1203. next_level_exp - exp_for_level(level)
  1204. end
  1205.  
  1206. #--------------------------------------------------------------------------
  1207. # ● Remain Exp
  1208. #--------------------------------------------------------------------------
  1209. def remain_exp
  1210. exp - exp_for_level(level)
  1211. end
  1212.  
  1213. #--------------------------------------------------------------------------
  1214. # ● Gain Exp Test
  1215. #--------------------------------------------------------------------------
  1216. def gain_exp_test
  1217. exp_r = rand(next_level_exp)
  1218. change_exp(self.exp + (exp_r * final_exp_rate).to_i, false)
  1219. end
  1220.  
  1221. #--------------------------------------------------------------------------
  1222. # ● Low HP?
  1223. #--------------------------------------------------------------------------
  1224. def low_hp?
  1225. hp <= (mhp * MOG_BATTLE_HUD_EX::LOW_PARAMETER_PERCENTAGE) / 100
  1226. end
  1227.  
  1228. #--------------------------------------------------------------------------
  1229. # ● Low MP?
  1230. #--------------------------------------------------------------------------
  1231. def low_mp?
  1232. mp <= (mmp * MOG_BATTLE_HUD_EX::LOW_PARAMETER_PERCENTAGE) / 100
  1233. end
  1234.  
  1235. #--------------------------------------------------------------------------
  1236. # ● Low TP?
  1237. #--------------------------------------------------------------------------
  1238. def low_tp?
  1239. tp <= (max_tp * MOG_BATTLE_HUD_EX::LOW_PARAMETER_PERCENTAGE) / 100
  1240. end
  1241.  
  1242. end
  1243.  
  1244. #==============================================================================
  1245. # ** Game Party
  1246. #==============================================================================
  1247. class Game_Party < Game_Unit
  1248.  
  1249. #--------------------------------------------------------------------------
  1250. # * Get Maximum Number of Battle Members
  1251. #--------------------------------------------------------------------------
  1252. def max_battle_members
  1253. return MOG_BATTLE_HUD_EX::MAX_BATTLE_MEMBERS
  1254. end
  1255.  
  1256. end
  1257.  
  1258. #==============================================================================
  1259. # ** BattleManager
  1260. #==============================================================================
  1261. module BattleManager
  1262.  
  1263. #--------------------------------------------------------------------------
  1264. # * Current Index
  1265. #--------------------------------------------------------------------------
  1266. def self.current_index
  1267. return 0 if @actor_index == nil
  1268. return @actor_index != -1 ? @actor_index : 0
  1269. end
  1270.  
  1271. #--------------------------------------------------------------------------
  1272. # * Current Index Real
  1273. #--------------------------------------------------------------------------
  1274. def self.current_index_real
  1275. return -1 if @actor_index == nil
  1276. return @actor_index
  1277. end
  1278.  
  1279. #--------------------------------------------------------------------------
  1280. # * Next Actor Avaliable
  1281. #--------------------------------------------------------------------------
  1282. def self.next_actor_avaliable?
  1283. return false if @actor_index == nil
  1284. next_index = @actor_index + 1
  1285. return false if next_index >= $game_party.members.size
  1286. return true
  1287. end
  1288.  
  1289. #--------------------------------------------------------------------------
  1290. # * To Next Command Input
  1291. #--------------------------------------------------------------------------
  1292. def self.next_command_avaliable
  1293. aindex = @actor_index
  1294. begin
  1295. if !actor || !actor.next_command
  1296. return false if actor == nil
  1297. aindex += 1
  1298. return false if aindex >= $game_party.members.size
  1299. end
  1300. end until actor.inputable?
  1301. return true
  1302. end
  1303.  
  1304. #--------------------------------------------------------------------------
  1305. # * Can Enable Window?
  1306. #--------------------------------------------------------------------------
  1307. def self.can_enable_window?
  1308. max_members = $game_party.members.size
  1309. index_real = current_index_real + 1
  1310. return false if index_real > max_members
  1311. return false if in_turn?
  1312. return false if $imported[:mog_battle_cursor]
  1313. return true
  1314. end
  1315.  
  1316. end
  1317.  
  1318. #==============================================================================
  1319. # ** SceneManager
  1320. #==============================================================================
  1321. module SceneManager
  1322.  
  1323. #--------------------------------------------------------------------------
  1324. # * Face Battler
  1325. #--------------------------------------------------------------------------
  1326. def self.face_battler?
  1327. return false if !MOG_BATTLE_HUD_EX::FACE_BATTLER
  1328. return false if $imported[:ve_animated_battle]
  1329. return false if $imported[:ve_actor_battlers]
  1330. return false if $imported["YES-BattleSymphony"]
  1331. return false if $imported["YEA-VisualBattlers"]
  1332. return false if $imported["Galv_Animated_Battlers"]
  1333. return false if $imported['KRX-AnimatedBattlers']
  1334. return false if $sv_camera != nil
  1335. return false if BattleManager.true_surprise != nil rescue nil
  1336. return false if $imported[:jet][:AnimatedBattlers] rescue nil
  1337. return true
  1338. end
  1339.  
  1340. end
  1341.  
  1342. #==============================================================================
  1343. # ** Spriteset Battle
  1344. #==============================================================================
  1345. class Spriteset_Battle
  1346.  
  1347. #--------------------------------------------------------------------------
  1348. # * Create Actors
  1349. #--------------------------------------------------------------------------
  1350. alias mog_battle_hud_create_actors create_actors
  1351. def create_actors
  1352. if can_create_max_members?
  1353. @actor_sprites = Array.new($game_party.max_battle_members) { Sprite_Battler.new(@viewport1) }
  1354. return
  1355. end
  1356. mog_battle_hud_create_actors
  1357. end
  1358.  
  1359. #--------------------------------------------------------------------------
  1360. # * Can Create Max Members
  1361. #--------------------------------------------------------------------------
  1362. def can_create_max_members?
  1363. return false if $imported[:ve_animated_battle]
  1364. return false if $imported[:ve_actor_battlers]
  1365. return false if $sv_camera != nil
  1366. return true
  1367. end
  1368.  
  1369. end
  1370.  
  1371. #==============================================================================
  1372. # ■ Scene Battle
  1373. #==============================================================================
  1374. class Scene_Battle < Scene_Base
  1375.  
  1376. #--------------------------------------------------------------------------
  1377. # ● Clear All Windows
  1378. #--------------------------------------------------------------------------
  1379. alias mog_battle_hud_ex_start start
  1380. def start
  1381. setup_battle_hud_ex
  1382. mog_battle_hud_ex_start
  1383. end
  1384.  
  1385. #--------------------------------------------------------------------------
  1386. # ● Setup Battle Hud EX
  1387. #--------------------------------------------------------------------------
  1388. def setup_battle_hud_ex
  1389. @force_clear_duration = 0
  1390. end
  1391.  
  1392. #--------------------------------------------------------------------------
  1393. # ● Clear All Windows
  1394. #--------------------------------------------------------------------------
  1395. def clear_all_windows
  1396. if @actor_window != nil
  1397. @actor_window.visible = false
  1398. @actor_window.active = false
  1399. end
  1400. if @status_window != nil
  1401. @status_window.visible = false
  1402. @status_window.active = false
  1403. end
  1404. if @actor_command_window != nil
  1405. @actor_command_window.visible = false
  1406. @actor_command_window.active = false
  1407. end
  1408. if @party_command_window != nil
  1409. @party_command_window.visible = false
  1410. @party_command_window.active = false
  1411. end
  1412. if @help_window != nil
  1413. @help_window.visible = false
  1414. end
  1415. end
  1416.  
  1417. #--------------------------------------------------------------------------
  1418. # ● Update
  1419. #--------------------------------------------------------------------------
  1420. alias mog_battle_hud_ex_update_main update
  1421. def update
  1422. mog_battle_hud_ex_update_main
  1423. update_battle_hud_ex
  1424. end
  1425.  
  1426. #--------------------------------------------------------------------------
  1427. # ● Update Battle Hud_ex
  1428. #--------------------------------------------------------------------------
  1429. def update_battle_hud_ex
  1430. end
  1431.  
  1432. end
  1433.  
  1434. if SceneManager.face_battler?
  1435. #==============================================================================
  1436. # ■ Game_Actor
  1437. #==============================================================================
  1438. class Game_Actor < Game_Battler
  1439.  
  1440. attr_accessor :screen_x
  1441. attr_accessor :screen_y
  1442. attr_accessor :screen_z
  1443.  
  1444.  
  1445. #--------------------------------------------------------------------------
  1446. # ● Use Sprite?
  1447. #--------------------------------------------------------------------------
  1448. def use_sprite?
  1449. return true
  1450. end
  1451.  
  1452. end
  1453.  
  1454. #==============================================================================
  1455. # ■ Sprite_Battler
  1456. #==============================================================================
  1457. class Sprite_Battler < Sprite_Base
  1458.  
  1459. #--------------------------------------------------------------------------
  1460. # ● Update Collapse
  1461. #--------------------------------------------------------------------------
  1462. alias mog_battle_hud_update_collapse update_collapse
  1463. def update_collapse
  1464. if face_can_cancel_method?
  1465. self.opacity = 255
  1466. self.visible = true
  1467. return
  1468. end
  1469. mog_battle_hud_update_collapse
  1470. end
  1471.  
  1472. #--------------------------------------------------------------------------
  1473. # ● Update Instant Collapse
  1474. #--------------------------------------------------------------------------
  1475. alias mog_battle_hud_update_instant_collapse update_instant_collapse
  1476. def update_instant_collapse
  1477. if face_can_cancel_method?
  1478. self.opacity = 255
  1479. self.visible = true
  1480. return
  1481. end
  1482. mog_battle_hud_update_instant_collapse
  1483. end
  1484.  
  1485. #--------------------------------------------------------------------------
  1486. # ● Init Visibility
  1487. #--------------------------------------------------------------------------
  1488. alias mog_battle_face_init_visibility init_visibility
  1489. def init_visibility
  1490. if face_can_cancel_method?
  1491. self.opacity = 255
  1492. self.visible = true
  1493. return
  1494. end
  1495. mog_battle_face_init_visibility
  1496. end
  1497.  
  1498. #--------------------------------------------------------------------------
  1499. # ● Face Can Cancel Method
  1500. #--------------------------------------------------------------------------
  1501. def face_can_cancel_method?
  1502. return false if !SceneManager.face_battler?
  1503. return false if @battler.is_a?(Game_Enemy)
  1504. return true
  1505. end
  1506.  
  1507. end
  1508.  
  1509. end
  1510.  
  1511. #==============================================================================
  1512. # ** Window_BattleStatus
  1513. #==============================================================================
  1514. class Window_BattleStatus < Window_Selectable
  1515. include MOG_BATTLE_HUD_EX
  1516.  
  1517. #--------------------------------------------------------------------------
  1518. # * Get Window Width
  1519. #--------------------------------------------------------------------------
  1520. def window_width
  1521. ACTOR_WINDOW_SIZE[0]
  1522. end
  1523.  
  1524. #--------------------------------------------------------------------------
  1525. # * Refresh
  1526. #--------------------------------------------------------------------------
  1527. alias mog_monogatari_refresh refresh
  1528. def refresh
  1529. mog_monogatari_refresh
  1530. self.visible = false
  1531. end
  1532.  
  1533. end
  1534.  
  1535. #==============================================================================
  1536. # ** Window Actor Command
  1537. #==============================================================================
  1538. class Window_ActorCommand < Window_Command
  1539.  
  1540. #--------------------------------------------------------------------------
  1541. # * Update
  1542. #--------------------------------------------------------------------------
  1543. alias mog_hud_battle_hud_ex_turn_sprite_update update
  1544. def update
  1545. mog_hud_battle_hud_ex_turn_sprite_update
  1546. $game_temp.command_visible = self.visible
  1547. end
  1548.  
  1549. end
  1550.  
  1551. if MOG_BATTLE_HUD_EX::ENABLE_CUSTOM_WINDOWS
  1552.  
  1553. #==============================================================================
  1554. # ** Window BattleLog
  1555. #==============================================================================
  1556. class Window_BattleLog < Window_Selectable
  1557.  
  1558. include MOG_BATTLE_HUD_EX
  1559.  
  1560. #--------------------------------------------------------------------------
  1561. # * Initialize
  1562. #--------------------------------------------------------------------------
  1563. alias mog_battle_hud_ex_log_initialize initialize
  1564. def initialize
  1565. mog_battle_hud_ex_log_initialize
  1566. self.x = BATTLE_LOG_POSITION[0]
  1567. self.y = BATTLE_LOG_POSITION[1]
  1568. end
  1569.  
  1570. #--------------------------------------------------------------------------
  1571. # * Create Back Sprite
  1572. #--------------------------------------------------------------------------
  1573. alias mog_battle_hud_ex_log_create_back_sprite create_back_sprite
  1574. def create_back_sprite
  1575. self.x = BATTLE_LOG_POSITION[0]
  1576. self.y = BATTLE_LOG_POSITION[1]
  1577. mog_battle_hud_ex_log_create_back_sprite
  1578. end
  1579.  
  1580. end
  1581.  
  1582. #==============================================================================
  1583. # ** Window Actor Command
  1584. #==============================================================================
  1585. class Window_ActorCommand < Window_Command
  1586.  
  1587. include MOG_BATTLE_HUD_EX
  1588.  
  1589. #--------------------------------------------------------------------------
  1590. # * Initialize
  1591. #--------------------------------------------------------------------------
  1592. alias mog_monogatari_initialize initialize
  1593. def initialize
  1594. mog_monogatari_initialize
  1595. create_layout
  1596. end
  1597.  
  1598. #--------------------------------------------------------------------------
  1599. # * Dispose
  1600. #--------------------------------------------------------------------------
  1601. alias mog_monogatari_actor_command_dispose dispose
  1602. def dispose
  1603. mog_monogatari_actor_command_dispose
  1604. dispose_layout
  1605. end
  1606.  
  1607. #--------------------------------------------------------------------------
  1608. # * Create Layout
  1609. #--------------------------------------------------------------------------
  1610. def create_layout
  1611. return if @layout != nil
  1612. return if !ACTOR_COMMAND_LAYOUT
  1613. return if $game_temp.mbhud_window[0]
  1614. $game_temp.mbhud_window[0] = true
  1615. @layout = Sprite.new
  1616. @layout.bitmap = Cache.battle_hud("Layout_Command")
  1617. @layout.z = self.z - 1
  1618. @layout.x = self.x + ACTOR_COMMAND_LAYOUT_POSITION[0]
  1619. @layout.y = self.y + ACTOR_COMMAND_LAYOUT_POSITION[1]
  1620. @layout.visible = false
  1621. end
  1622.  
  1623. #--------------------------------------------------------------------------
  1624. # * Dispose Layout
  1625. #--------------------------------------------------------------------------
  1626. def dispose_layout
  1627. return if @layout == nil
  1628. @layout.dispose
  1629. @layout = nil
  1630. end
  1631.  
  1632. #--------------------------------------------------------------------------
  1633. # * Refresh Layout
  1634. #--------------------------------------------------------------------------
  1635. def refresh_layout
  1636. return if @layout == nil
  1637. @layout.x = self.x + ACTOR_COMMAND_LAYOUT_POSITION[0]
  1638. @layout.y = self.y + ACTOR_COMMAND_LAYOUT_POSITION[1]
  1639. @layout.visible = self.active
  1640. end
  1641.  
  1642. #--------------------------------------------------------------------------
  1643. # * Select
  1644. #--------------------------------------------------------------------------
  1645. alias mog_monogatari_select_actor_command select
  1646. def select(index)
  1647. mog_monogatari_select_actor_command(index)
  1648. set_command_position
  1649. end
  1650.  
  1651. #--------------------------------------------------------------------------
  1652. # * Set Command Position
  1653. #--------------------------------------------------------------------------
  1654. def set_command_position
  1655. self.viewport = nil
  1656. self.opacity = ACTOR_COMMAND_OPACITY
  1657. battler_index = BattleManager.current_index rescue nil
  1658. battler_index = 0 if battler_index == nil
  1659. if @actor != nil and $game_temp.hud_pos[battler_index] != nil
  1660. if FIXED_COMMAND_POSITION[battler_index] != nil
  1661. self.x = FIXED_COMMAND_POSITION[battler_index][0]
  1662. self.y = FIXED_COMMAND_POSITION[battler_index][1]
  1663. else
  1664. self.x = ACTOR_COMMAND_POSITION[0] + $game_temp.hud_pos[battler_index][0] - (self.width / 2)
  1665. self.x = Graphics.width - self.width if self.x + self.width > Graphics.width
  1666. self.x = 0 if self.x < 0
  1667. self.y = ACTOR_COMMAND_POSITION[1] + $game_temp.hud_pos[battler_index][1] - self.height
  1668. end
  1669. end
  1670. refresh_layout
  1671. end
  1672.  
  1673. #--------------------------------------------------------------------------
  1674. # * Refresh
  1675. #--------------------------------------------------------------------------
  1676. alias mog_battle_hud_ex_refresh refresh
  1677. def refresh
  1678. mog_battle_hud_ex_refresh
  1679. $game_temp.refresh_turn_sprite = true
  1680. end
  1681.  
  1682. #--------------------------------------------------------------------------
  1683. # * Update
  1684. #--------------------------------------------------------------------------
  1685. alias mog_monogatari_actor_commnand_update update
  1686. def update
  1687. mog_monogatari_actor_commnand_update
  1688. self.visible = self.active
  1689. if @layout.visible != nil
  1690. refresh_layout if @layout.visible != self.visible
  1691. end
  1692. end
  1693.  
  1694. end
  1695.  
  1696. #==============================================================================
  1697. # ** Window_PartyCommand
  1698. #==============================================================================
  1699. class Window_PartyCommand < Window_Command
  1700.  
  1701. include MOG_BATTLE_HUD_EX
  1702.  
  1703. #--------------------------------------------------------------------------
  1704. # * Initialize
  1705. #--------------------------------------------------------------------------
  1706. alias mog_monogatari_party_initialize initialize
  1707. def initialize
  1708. mog_monogatari_party_initialize
  1709. create_layout
  1710. end
  1711.  
  1712. #--------------------------------------------------------------------------
  1713. # * Dispose
  1714. #--------------------------------------------------------------------------
  1715. alias mog_monogatari_party_window_dispose dispose
  1716. def dispose
  1717. mog_monogatari_party_window_dispose
  1718. dispose_layout
  1719. end
  1720.  
  1721. #--------------------------------------------------------------------------
  1722. # * Create Layout
  1723. #--------------------------------------------------------------------------
  1724. def create_layout
  1725. return if @layout != nil
  1726. return if !PARTY_COMMAND_LAYOUT
  1727. return if $game_temp.mbhud_window[1]
  1728. $game_temp.mbhud_window[1] = true
  1729. @layout = Sprite.new
  1730. @layout.bitmap = Cache.battle_hud("Layout_Party")
  1731. @layout.z = self.z - 1
  1732. refresh_layout
  1733. @layout.visible = false
  1734. end
  1735.  
  1736. #--------------------------------------------------------------------------
  1737. # * Dispose Layout
  1738. #--------------------------------------------------------------------------
  1739. def dispose_layout
  1740. return if @layout == nil
  1741. @layout.dispose
  1742. @layout = nil
  1743. end
  1744.  
  1745. #--------------------------------------------------------------------------
  1746. # * Refresh Layout
  1747. #--------------------------------------------------------------------------
  1748. def refresh_layout
  1749. return if @layout == nil
  1750. @layout.x = self.x + PARTY_COMMAND_LAYOUT_POSITION[0]
  1751. @layout.y = self.y + PARTY_COMMAND_LAYOUT_POSITION[1]
  1752. @layout.visible = self.visible
  1753. end
  1754.  
  1755. #--------------------------------------------------------------------------
  1756. # * Select
  1757. #--------------------------------------------------------------------------
  1758. alias mog_monogatari_select_partycommand select
  1759. def select(index)
  1760. mog_monogatari_select_partycommand(index)
  1761. self.viewport = nil
  1762. self.x = PARTY_COMMAND_POSITION[0] - (self.width / 2)
  1763. self.y = PARTY_COMMAND_POSITION[1] - (self.height / 2)
  1764. self.opacity = PARTY_COMMAND_OPACITY
  1765. end
  1766.  
  1767. #--------------------------------------------------------------------------
  1768. # * Update
  1769. #--------------------------------------------------------------------------
  1770. alias mog_monogatari_party_window_update update
  1771. def update
  1772. mog_monogatari_party_window_update
  1773. self.visible = self.active
  1774. if @layout != nil and @layout.visible != self.visible
  1775. refresh_layout
  1776. end
  1777. end
  1778.  
  1779. end
  1780.  
  1781. #==============================================================================
  1782. # ** Window_Help
  1783. #==============================================================================
  1784. class Window_Help < Window_Base
  1785.  
  1786. include MOG_BATTLE_HUD_EX
  1787.  
  1788. #--------------------------------------------------------------------------
  1789. # * Object Initialization
  1790. #--------------------------------------------------------------------------
  1791. alias mog_monogatari_battle_help_initialize initialize
  1792. def initialize(line_number = 2)
  1793. @battle_phase = false
  1794. mog_monogatari_battle_help_initialize(line_number)
  1795. if SceneManager.scene_is?(Scene_Battle)
  1796. @battle_phase = true
  1797. self.width = HELP_WINDOW_SIZE[0]
  1798. self.height = HELP_WINDOW_SIZE[1]
  1799. @org_position = [HELP_WINDOW_POSITION[0] - (self.width / 2),
  1800. HELP_WINDOW_POSITION[1]]
  1801. self.x = @org_position[0]
  1802. self.y = @org_position[1]
  1803. self.opacity = HELP_WINDOW_OPACITY
  1804. create_layout
  1805. end
  1806. end
  1807.  
  1808. #--------------------------------------------------------------------------
  1809. # * Dispose
  1810. #--------------------------------------------------------------------------
  1811. alias mog_monogatari_help_window_dispose dispose
  1812. def dispose
  1813. mog_monogatari_help_window_dispose
  1814. dispose_layout
  1815. end
  1816.  
  1817. #--------------------------------------------------------------------------
  1818. # * Create Layout
  1819. #--------------------------------------------------------------------------
  1820. def create_layout
  1821. return if @layout != nil
  1822. return if !HELP_WINDOW_LAYOUT
  1823. return if $game_temp.mbhud_window[2]
  1824. return if !SceneManager.scene_is?(Scene_Battle)
  1825. $game_temp.mbhud_window[2] = true
  1826. @layout = Sprite.new
  1827. @layout.bitmap = Cache.battle_hud("Layout_Help")
  1828. @layout.z = self.z - 1
  1829. refresh_layout
  1830. @layout.visible = false
  1831. end
  1832.  
  1833. #--------------------------------------------------------------------------
  1834. # * Dispose Layout
  1835. #--------------------------------------------------------------------------
  1836. def dispose_layout
  1837. return if @layout == nil
  1838. @layout.dispose
  1839. @layout = nil
  1840. end
  1841.  
  1842. #--------------------------------------------------------------------------
  1843. # * Refresh Layout
  1844. #--------------------------------------------------------------------------
  1845. def refresh_layout
  1846. return if @layout == nil
  1847. @layout.x = self.x + HELP_WINDOW_LAYOUT_POSITION[0]
  1848. @layout.y = self.y + HELP_WINDOW_LAYOUT_POSITION[1]
  1849. @layout.visible = self.visible
  1850. end
  1851.  
  1852. #--------------------------------------------------------------------------
  1853. # * Refresh
  1854. #--------------------------------------------------------------------------
  1855. alias mog_monogatari_battle_help_refresh refresh
  1856. def refresh
  1857. mog_monogatari_battle_help_refresh
  1858. if @battle_phase
  1859. self.x = @org_position[0]
  1860. self.y = @org_position[1]
  1861. self.opacity = HELP_WINDOW_OPACITY
  1862. end
  1863. end
  1864.  
  1865. #--------------------------------------------------------------------------
  1866. # * Update
  1867. #--------------------------------------------------------------------------
  1868. alias mog_monogatari_help_window_update update
  1869. def update
  1870. mog_monogatari_help_window_update
  1871. if @layout != nil
  1872. refresh_layout if @layout.visible != self.visible
  1873. @layout.visible = self.visible
  1874. end
  1875. end
  1876.  
  1877. end
  1878.  
  1879. #==============================================================================
  1880. # ** Window_BattleActor
  1881. #==============================================================================
  1882. class Window_BattleActor < Window_BattleStatus
  1883.  
  1884. include MOG_BATTLE_HUD_EX
  1885.  
  1886. #--------------------------------------------------------------------------
  1887. # * Initialize
  1888. #--------------------------------------------------------------------------
  1889. alias mog_monogatari_battle_actor_initialize initialize
  1890. def initialize(info_viewport)
  1891. @force_hide = can_force_hide?
  1892. mog_monogatari_battle_actor_initialize(info_viewport)
  1893. self.width = ACTOR_WINDOW_SIZE[0]
  1894. self.height = ACTOR_WINDOW_SIZE[1]
  1895. @org_position = [ACTOR_WINDOW_POSITION[0] - (self.width / 2),
  1896. ACTOR_WINDOW_POSITION[1] - self.height]
  1897. @org_position[1] = Graphics.height + 64 if @force_hide
  1898. self.x = @org_position[0]
  1899. self.y = @org_position[1]
  1900. self.opacity = ACTOR_WINDOW_OPACITY
  1901. self.z += 1
  1902. self.viewport = nil
  1903. create_layout
  1904. end
  1905.  
  1906. #--------------------------------------------------------------------------
  1907. # * Can Force Hide?
  1908. #--------------------------------------------------------------------------
  1909. def can_force_hide?
  1910. return true if $imported[:ve_target_arrow]
  1911. return true if $imported[:mog_battle_cursor]
  1912. return false
  1913. end
  1914.  
  1915. #--------------------------------------------------------------------------
  1916. # * Dispose
  1917. #--------------------------------------------------------------------------
  1918. alias mog_monogatari_actor_window_dispose dispose
  1919. def dispose
  1920. mog_monogatari_actor_window_dispose
  1921. dispose_layout
  1922. end
  1923.  
  1924. #--------------------------------------------------------------------------
  1925. # * Create Layout
  1926. #--------------------------------------------------------------------------
  1927. def create_layout
  1928. return if @layout != nil
  1929. return if !ACTOR_WINDOW_LAYOUT
  1930. return if $game_temp.mbhud_window[3]
  1931. $game_temp.mbhud_window[3] = true
  1932. @layout = Sprite.new
  1933. @layout.bitmap = Cache.battle_hud("Layout_Target_Actor")
  1934. @layout.z = self.z - 1
  1935. refresh_layout
  1936. @layout.visible = false
  1937. end
  1938.  
  1939. #--------------------------------------------------------------------------
  1940. # * Dispose Layout
  1941. #--------------------------------------------------------------------------
  1942. def dispose_layout
  1943. return if @layout == nil
  1944. @layout.dispose
  1945. @layout = nil
  1946. end
  1947.  
  1948. #--------------------------------------------------------------------------
  1949. # * Refresh Layout
  1950. #--------------------------------------------------------------------------
  1951. def refresh_layout
  1952. return if @layout == nil
  1953. @layout.x = self.x + ACTOR_WINDOW_LAYOUT_POSITION[0]
  1954. @layout.y = self.y + ACTOR_WINDOW_LAYOUT_POSITION[1]
  1955. @layout.visible = self.visible
  1956. end
  1957.  
  1958. if $imported[:ve_target_arrow]
  1959. #--------------------------------------------------------------------------
  1960. # * New method: show_actor
  1961. #--------------------------------------------------------------------------
  1962. alias mog_battle_hud_ex_show_actor show_actor
  1963. def show_actor
  1964. return true if SceneManager.face_battler?
  1965. mog_battle_hud_ex_show_actor
  1966. end
  1967. end
  1968.  
  1969. #--------------------------------------------------------------------------
  1970. # * Select
  1971. #--------------------------------------------------------------------------
  1972. alias mog_monogatari_select_actor select
  1973. def select(index)
  1974. mog_monogatari_select_actor(index)
  1975. self.viewport = nil
  1976. self.visible = true
  1977. self.x = @org_position[0]
  1978. self.y = @org_position[1]
  1979. self.opacity = ACTOR_WINDOW_OPACITY
  1980. end
  1981.  
  1982. #--------------------------------------------------------------------------
  1983. # * Update
  1984. #--------------------------------------------------------------------------
  1985. alias mog_monogatari_actor_window_update update
  1986. def update
  1987. mog_monogatari_actor_window_update
  1988. self.visible = self.active
  1989. self.visible = false if @force_hide
  1990. if @layout != nil
  1991. refresh_layout if @layout.visible != self.visible
  1992. end
  1993. end
  1994.  
  1995. end
  1996.  
  1997. #==============================================================================
  1998. # ** Window_BattleEnemy
  1999. #==============================================================================
  2000. class Window_BattleEnemy < Window_Selectable
  2001.  
  2002. include MOG_BATTLE_HUD_EX
  2003.  
  2004. #--------------------------------------------------------------------------
  2005. # * Initialize
  2006. #--------------------------------------------------------------------------
  2007. alias mog_monogatari_battle_enemy_initialize initialize
  2008. def initialize(info_viewport)
  2009. @force_hide = can_force_hide?
  2010. mog_monogatari_battle_enemy_initialize(info_viewport)
  2011. self.width = ENEMY_WINDOW_SIZE[0]
  2012. self.height = ENEMY_WINDOW_SIZE[1]
  2013. @org_position = [ENEMY_WINDOW_POSITION[0] - (self.width / 2),
  2014. ENEMY_WINDOW_POSITION[1] - self.height]
  2015. @org_position[1] = Graphics.height + 64 if @force_hide
  2016. self.x = @org_position[0]
  2017. self.y = @org_position[1]
  2018. self.opacity = ENEMY_WINDOW_OPACITY
  2019. self.z += 1
  2020. create_layout
  2021. end
  2022.  
  2023. #--------------------------------------------------------------------------
  2024. # * Can Force Hide?
  2025. #--------------------------------------------------------------------------
  2026. def can_force_hide?
  2027. return true if $imported[:ve_target_arrow]
  2028. return true if $imported[:mog_battle_cursor]
  2029. return false
  2030. end
  2031.  
  2032. #--------------------------------------------------------------------------
  2033. # * Dispose
  2034. #--------------------------------------------------------------------------
  2035. alias mog_monogatari_enemy_window_dispose dispose
  2036. def dispose
  2037. mog_monogatari_enemy_window_dispose
  2038. dispose_layout
  2039. end
  2040.  
  2041. #--------------------------------------------------------------------------
  2042. # * Create Layout
  2043. #--------------------------------------------------------------------------
  2044. def create_layout
  2045. return if @layout != nil
  2046. return if !ENEMY_WINDOW_LAYOUT
  2047. return if $game_temp.mbhud_window[4]
  2048. $game_temp.mbhud_window[4] = true
  2049. @layout = Sprite.new
  2050. @layout.bitmap = Cache.battle_hud("Layout_Target_Enemy")
  2051. @layout.z = self.z - 1
  2052. refresh_layout
  2053. @layout.visible = false
  2054. end
  2055.  
  2056. #--------------------------------------------------------------------------
  2057. # * Dispose Layout
  2058. #--------------------------------------------------------------------------
  2059. def dispose_layout
  2060. return if @layout == nil
  2061. @layout.dispose
  2062. @layout = nil
  2063. end
  2064.  
  2065. #--------------------------------------------------------------------------
  2066. # * Refresh Layout
  2067. #--------------------------------------------------------------------------
  2068. def refresh_layout
  2069. return if @layout == nil
  2070. @layout.x = self.x + ENEMY_WINDOW_LAYOUT_POSITION[0]
  2071. @layout.y = self.y + ENEMY_WINDOW_LAYOUT_POSITION[1]
  2072. @layout.visible = self.visible
  2073. end
  2074.  
  2075. #--------------------------------------------------------------------------
  2076. # * Select
  2077. #--------------------------------------------------------------------------
  2078. alias mog_monogatari_select_enemy select
  2079. def select(index)
  2080. mog_monogatari_select_enemy(index)
  2081. self.viewport = nil
  2082. self.visible = true
  2083. self.x = @org_position[0]
  2084. self.y = @org_position[1]
  2085. self.opacity = ENEMY_WINDOW_OPACITY
  2086. end
  2087.  
  2088. #--------------------------------------------------------------------------
  2089. # * Update
  2090. #--------------------------------------------------------------------------
  2091. alias mog_monogatari_enemy_window_update update
  2092. def update
  2093. mog_monogatari_enemy_window_update
  2094. self.visible = false if @force_hide
  2095. if @layout != nil and @layout.visible != self.visible
  2096. refresh_layout
  2097. end
  2098. end
  2099.  
  2100. if $imported["YEA-BattleEngine"]
  2101. #--------------------------------------------------------------------------
  2102. # * Draw Item
  2103. #--------------------------------------------------------------------------
  2104. def draw_item(index)
  2105. change_color(normal_color)
  2106. name = $game_troop.alive_members[index].name
  2107. draw_text(item_rect_for_text(index), name)
  2108. end
  2109. end
  2110.  
  2111. end
  2112.  
  2113. #==============================================================================
  2114. # ** Window_BattleSkill
  2115. #==============================================================================
  2116. class Window_BattleSkill < Window_SkillList
  2117. include MOG_BATTLE_HUD_EX
  2118.  
  2119. #--------------------------------------------------------------------------
  2120. # * Initialize
  2121. #--------------------------------------------------------------------------
  2122. alias mog_monogatari_battle_skill_initialize initialize
  2123. def initialize(help_window, info_viewport)
  2124. @force_hide = can_force_hide?
  2125. @force_hide_active = can_force_hide_active?
  2126. mog_monogatari_battle_skill_initialize(help_window, info_viewport)
  2127. self.width = SKILL_WINDOW_SIZE[0]
  2128. self.height = SKILL_WINDOW_SIZE[1]
  2129. @org_position = [SKILL_WINDOW_POSITION[0],
  2130. Graphics.height - self.height + SKILL_WINDOW_POSITION[1]]
  2131. self.x = @org_position[0]
  2132. self.y = @org_position[1]
  2133. self.opacity = SKILL_WINDOW_OPACITY
  2134. self.viewport = nil
  2135. create_layout
  2136. end
  2137.  
  2138. #--------------------------------------------------------------------------
  2139. # * Can Force Hide Active?
  2140. #--------------------------------------------------------------------------
  2141. def can_force_hide_active?
  2142. return true if $imported[:ve_target_arrow]
  2143. return true if $imported[:mog_battle_cursor] != nil
  2144. return false
  2145. end
  2146.  
  2147. #--------------------------------------------------------------------------
  2148. # * Can Force Hide?
  2149. #--------------------------------------------------------------------------
  2150. def can_force_hide?
  2151. return false
  2152. end
  2153.  
  2154. #--------------------------------------------------------------------------
  2155. # * Dispose
  2156. #--------------------------------------------------------------------------
  2157. alias mog_monogatari_skill_window_dispose dispose
  2158. def dispose
  2159. mog_monogatari_skill_window_dispose
  2160. dispose_layout
  2161. end
  2162.  
  2163. #--------------------------------------------------------------------------
  2164. # * Create Layout
  2165. #--------------------------------------------------------------------------
  2166. def create_layout
  2167. return if @layout != nil
  2168. return if !SKILL_WINDOW_LAYOUT
  2169. return if $game_temp.mbhud_window[5]
  2170. $game_temp.mbhud_window[5] = true
  2171. @layout = Sprite.new
  2172. @layout.bitmap = Cache.battle_hud("Layout_Skill")
  2173. @layout.z = self.z - 1
  2174. refresh_layout
  2175. @layout.visible = false
  2176. end
  2177.  
  2178. #--------------------------------------------------------------------------
  2179. # * Dispose Layout
  2180. #--------------------------------------------------------------------------
  2181. def dispose_layout
  2182. return if @layout == nil
  2183. @layout.dispose
  2184. @layout = nil
  2185. end
  2186.  
  2187. #--------------------------------------------------------------------------
  2188. # * Refresh Layout
  2189. #--------------------------------------------------------------------------
  2190. def refresh_layout
  2191. return if @layout == nil
  2192. @layout.x = self.x + SKILL_WINDOW_LAYOUT_POSITION[0]
  2193. @layout.y = self.y + SKILL_WINDOW_LAYOUT_POSITION[1]
  2194. @layout.visible = self.visible
  2195. end
  2196.  
  2197. #--------------------------------------------------------------------------
  2198. # * Select
  2199. #--------------------------------------------------------------------------
  2200. alias mog_monogatari_select_battle_skill select
  2201. def select(index)
  2202. mog_monogatari_select_battle_skill(index)
  2203. self.x = @org_position[0]
  2204. self.y = @org_position[1]
  2205. self.opacity = SKILL_WINDOW_OPACITY
  2206. end
  2207.  
  2208. #--------------------------------------------------------------------------
  2209. # * Update
  2210. #--------------------------------------------------------------------------
  2211. alias mog_monogatari_skill_window_update update
  2212. def update
  2213. mog_monogatari_skill_window_update
  2214. self.visible = self.active if @force_hide_active
  2215. self.visible = false if @force_hide
  2216. if @layout != nil and @layout.visible != self.visible
  2217. refresh_layout
  2218. end
  2219. end
  2220.  
  2221. end
  2222.  
  2223. #==============================================================================
  2224. # ** Window_BattleItem
  2225. #==============================================================================
  2226. class Window_BattleItem < Window_ItemList
  2227. include MOG_BATTLE_HUD_EX
  2228.  
  2229. #--------------------------------------------------------------------------
  2230. # * Initialize
  2231. #--------------------------------------------------------------------------
  2232. alias mog_monogatari_battle_item_initialize initialize
  2233. def initialize(help_window, info_viewport)
  2234. @force_hide = can_force_hide?
  2235. @force_hide_active = can_force_hide_active?
  2236. mog_monogatari_battle_item_initialize(help_window, info_viewport)
  2237. self.width = ITEM_WINDOW_SIZE[0]
  2238. self.height = ITEM_WINDOW_SIZE[1]
  2239. @org_position = [ITEM_WINDOW_POSITION[0],
  2240. Graphics.height - self.height + ITEM_WINDOW_POSITION[1]]
  2241. self.x = @org_position[0]
  2242. self.y = @org_position[1]
  2243. self.viewport = nil
  2244. self.opacity = ITEM_WINDOW_OPACITY
  2245. create_layout
  2246. end
  2247.  
  2248. #--------------------------------------------------------------------------
  2249. # * Can Force Hide Active?
  2250. #--------------------------------------------------------------------------
  2251. def can_force_hide_active?
  2252. return true if $imported[:ve_target_arrow]
  2253. return true if $imported[:mog_battle_cursor] != nil
  2254. return false
  2255. end
  2256.  
  2257. #--------------------------------------------------------------------------
  2258. # * Can Force Hide?
  2259. #--------------------------------------------------------------------------
  2260. def can_force_hide?
  2261. return false
  2262. end
  2263.  
  2264. #--------------------------------------------------------------------------
  2265. # * Dispose
  2266. #--------------------------------------------------------------------------
  2267. alias mog_monogatari_item_window_dispose dispose
  2268. def dispose
  2269. mog_monogatari_item_window_dispose
  2270. dispose_layout
  2271. end
  2272.  
  2273. #--------------------------------------------------------------------------
  2274. # * Create Layout
  2275. #--------------------------------------------------------------------------
  2276. def create_layout
  2277. return if @layout != nil
  2278. return if !ITEM_WINDOW_LAYOUT
  2279. return if $game_temp.mbhud_window[6]
  2280. $game_temp.mbhud_window[6] = true
  2281. @layout = Sprite.new
  2282. @layout.bitmap = Cache.battle_hud("Layout_Item")
  2283. @layout.z = self.z - 1
  2284. refresh_layout
  2285. @layout.visible = false
  2286. end
  2287.  
  2288. #--------------------------------------------------------------------------
  2289. # * Dispose Layout
  2290. #--------------------------------------------------------------------------
  2291. def dispose_layout
  2292. return if @layout == nil
  2293. @layout.dispose
  2294. @layout = nil
  2295. end
  2296.  
  2297. #--------------------------------------------------------------------------
  2298. # * Refresh Layout
  2299. #--------------------------------------------------------------------------
  2300. def refresh_layout
  2301. return if @layout == nil
  2302. @layout.x = self.x + ITEM_WINDOW_LAYOUT_POSITION[0]
  2303. @layout.y = self.y + ITEM_WINDOW_LAYOUT_POSITION[1]
  2304. @layout.visible = self.visible
  2305. end
  2306.  
  2307. #--------------------------------------------------------------------------
  2308. # * Select
  2309. #--------------------------------------------------------------------------
  2310. alias mog_monogatari_select_battle_item select
  2311. def select(index)
  2312. mog_monogatari_select_battle_item(index)
  2313. self.x = @org_position[0]
  2314. self.y = @org_position[1]
  2315. self.opacity = ITEM_WINDOW_OPACITY
  2316. end
  2317.  
  2318. #--------------------------------------------------------------------------
  2319. # * Update
  2320. #--------------------------------------------------------------------------
  2321. alias mog_monogatari_item_window_update update
  2322. def update
  2323. mog_monogatari_item_window_update
  2324. self.visible = self.active if @force_hide_active
  2325. self.visible = false if @force_hide
  2326. if @layout != nil
  2327. refresh_layout if @layout.visible != self.visible
  2328. end
  2329. end
  2330.  
  2331. end
  2332.  
  2333. end
  2334.  
  2335.  
  2336. #--------------------------------------------------------------------------
  2337. #--------------------------------------------------------------------------
  2338. #################################
  2339. if $imported["YEA-BattleEngine"]
  2340. #################################
  2341.  
  2342. #==============================================================================
  2343. # ** Window_BattleStatusAid
  2344. #==============================================================================
  2345. class Window_BattleStatusAid < Window_BattleStatus
  2346.  
  2347. #--------------------------------------------------------------------------
  2348. # * Refresh
  2349. #--------------------------------------------------------------------------
  2350. def refresh
  2351. contents.clear
  2352. self.visible = false
  2353. end
  2354.  
  2355. end
  2356.  
  2357. #==============================================================================
  2358. # ** Window_BattleStatus
  2359. #==============================================================================
  2360. class Window_BattleStatus < Window_Selectable
  2361.  
  2362. #--------------------------------------------------------------------------
  2363. # * Update
  2364. #--------------------------------------------------------------------------
  2365. alias mog_monogatari_bhud_yf_update update
  2366. def update
  2367. mog_monogatari_bhud_yf_update
  2368. update_visible_yf
  2369. end
  2370.  
  2371. #--------------------------------------------------------------------------
  2372. # * Update Visible Yf
  2373. #--------------------------------------------------------------------------
  2374. def update_visible_yf
  2375. self.visible = self.active
  2376. end
  2377.  
  2378. end
  2379.  
  2380. #==============================================================================
  2381. # ■ Window ActorCommand
  2382. #==============================================================================
  2383. class Window_ActorCommand < Window_Command
  2384.  
  2385. #--------------------------------------------------------------------------
  2386. # * Show
  2387. #--------------------------------------------------------------------------
  2388. alias mog_bhud_yf_command_show show
  2389. def show
  2390. return if !BattleManager.can_enable_window?
  2391. mog_bhud_yf_command_show
  2392. end
  2393.  
  2394. #--------------------------------------------------------------------------
  2395. # * Update
  2396. #--------------------------------------------------------------------------
  2397. alias mog_monogatari_bhud_yf_actorcommand_update update
  2398. def update
  2399. mog_monogatari_bhud_yf_actorcommand_update
  2400. update_visible_yf
  2401. end
  2402.  
  2403. #--------------------------------------------------------------------------
  2404. # * Update Visible Yf
  2405. #--------------------------------------------------------------------------
  2406. def update_visible_yf
  2407. self.visible = self.active
  2408. end
  2409.  
  2410. end
  2411.  
  2412. #==============================================================================
  2413. # ** Scene Battle
  2414. #==============================================================================
  2415. class Scene_Battle < Scene_Base
  2416.  
  2417. include MOG_BATTLE_HUD_EX
  2418.  
  2419. #--------------------------------------------------------------------------
  2420. # alias method: create_skill_window
  2421. #--------------------------------------------------------------------------
  2422. alias mog_yf_scene_battle_create_skill_window create_skill_window
  2423. def create_skill_window
  2424. mog_yf_scene_battle_create_skill_window
  2425. @skill_window.width = SKILL_WINDOW_SIZE[0]
  2426. @skill_window.height = SKILL_WINDOW_SIZE[1]
  2427. @skill_window.x = SKILL_WINDOW_POSITION[0]
  2428. @skill_window.y = SKILL_WINDOW_POSITION[1]
  2429. end
  2430.  
  2431. #--------------------------------------------------------------------------
  2432. # alias method: create_item_window
  2433. #--------------------------------------------------------------------------
  2434. alias mog_yf_scene_battle_create_item_window create_item_window
  2435. def create_item_window
  2436. mog_yf_scene_battle_create_item_window
  2437. @item_window.width = ITEM_WINDOW_SIZE[0]
  2438. @item_window.height = ITEM_WINDOW_SIZE[1]
  2439. @item_window.x = ITEM_WINDOW_POSITION[0]
  2440. @item_window.y = ITEM_WINDOW_POSITION[1]
  2441. end
  2442.  
  2443. #--------------------------------------------------------------------------
  2444. # * Next Command
  2445. #--------------------------------------------------------------------------
  2446. def next_command
  2447. if BattleManager.next_command
  2448. @status_window.show
  2449. redraw_current_status
  2450. @actor_command_window.show
  2451. @status_aid_window.hide
  2452. start_actor_command_selection
  2453. else
  2454. turn_start
  2455. end
  2456. end
  2457.  
  2458. #--------------------------------------------------------------------------
  2459. # ● Update Battle Hud_ex
  2460. #--------------------------------------------------------------------------
  2461. alias mog_monogatari_yf_sb_update_battle_hud_ex update_battle_hud_ex
  2462. def update_battle_hud_ex
  2463. update_yf_visible
  2464. mog_monogatari_yf_sb_update_battle_hud_ex
  2465. end
  2466.  
  2467. #--------------------------------------------------------------------------
  2468. # ● Update Yf Visible
  2469. #--------------------------------------------------------------------------
  2470. def update_yf_visible
  2471. return if @force_clear_duration > 0
  2472. @actor_window.visible = stw_can_visible?
  2473. @status_window.visible = @actor_window.visible
  2474. @status_window.opacity = @actor_window.opacity
  2475. end
  2476.  
  2477. #--------------------------------------------------------------------------
  2478. # * STW Can Visible
  2479. #--------------------------------------------------------------------------
  2480. def stw_can_visible?
  2481. return false if !BattleManager.can_enable_window?
  2482. return false if @item_window.visible
  2483. return false if @skill_window.visible
  2484. return true if @actor_window.active
  2485. return false
  2486. end
  2487.  
  2488. end
  2489.  
  2490. end
  2491. #--------------------------------------------------------------------------
  2492.  
  2493. #################################
  2494. if $imported["YEA-EnemyTargetInfo"]
  2495. #################################
  2496. class Window_Comparison < Window_Base
  2497.  
  2498. #--------------------------------------------------------------------------
  2499. # initialize
  2500. #--------------------------------------------------------------------------
  2501. alias mog_battle_hud_yf_wcomparison_initialize initialize
  2502. def initialize(type)
  2503. mog_battle_hud_yf_wcomparison_initialize(type)
  2504. self.z = 102
  2505. end
  2506.  
  2507. end
  2508. end
  2509. #--------------------------------------------------------------------------
  2510. #--------------------------------------------------------------------------
  2511.  
  2512.  
  2513. #--------------------------------------------------------------------------
  2514. #--------------------------------------------------------------------------
  2515. #################################
  2516. if $imported["YSA-CATB"]
  2517. #################################
  2518.  
  2519. #==============================================================================
  2520. # ■ Enemy CATB Gauge Viewport
  2521. #==============================================================================
  2522. class Enemy_CATB_Gauge_Viewport < Viewport
  2523.  
  2524. #--------------------------------------------------------------------------
  2525. # initialize
  2526. #--------------------------------------------------------------------------
  2527. alias mog_battle_hud_ex_yami_initialize initialize
  2528. def initialize(battler, sprite, type)
  2529. mog_battle_hud_ex_yami_initialize(battler, sprite, type)
  2530. self.z = 90
  2531. end
  2532.  
  2533. end
  2534.  
  2535. #==============================================================================
  2536. # ■ Game_Battler
  2537. #==============================================================================
  2538. class Game_Battler < Game_BattlerBase
  2539.  
  2540. attr_accessor :catb_value
  2541. attr_accessor :max_atb
  2542.  
  2543. #--------------------------------------------------------------------------
  2544. # * Max ATB
  2545. #--------------------------------------------------------------------------
  2546. def max_atb
  2547. return MAX_CATB_VALUE
  2548. return 1
  2549. end
  2550.  
  2551. end
  2552.  
  2553. end
  2554. #--------------------------------------------------------------------------
  2555. #--------------------------------------------------------------------------
  2556.  
  2557.  
  2558. #==============================================================================
  2559. # ** Spriteset_Battle
  2560. #==============================================================================
  2561. class Spriteset_Battle
  2562.  
  2563. #--------------------------------------------------------------------------
  2564. # * Initialize
  2565. #--------------------------------------------------------------------------
  2566. alias mog_battle_hud_ex_initialize initialize
  2567. def initialize
  2568. check_screen_xyz_nil rescue nil
  2569. mog_battle_hud_ex_initialize
  2570. create_battle_hud_ex
  2571. end
  2572.  
  2573. #--------------------------------------------------------------------------
  2574. # * Check Screen Xyz
  2575. #--------------------------------------------------------------------------
  2576. def check_screen_xyz_nil
  2577. return if !SceneManager.face_battler?
  2578. for actor in $game_party.battle_members
  2579. actor.screen_x = 0 if actor.screen_x == nil
  2580. actor.screen_y = 0 if actor.screen_y == nil
  2581. actor.screen_z = 0 if actor.screen_z == nil
  2582. end
  2583. end
  2584.  
  2585. #--------------------------------------------------------------------------
  2586. # * Check Screen Xyz after
  2587. #--------------------------------------------------------------------------
  2588. def check_screen_xyz_after
  2589. return if !SceneManager.face_battler?
  2590. index = 0
  2591. for actor in $game_party.battle_members
  2592. actor.screen_x = $game_temp.battler_face_pos[index][0] rescue nil
  2593. actor.screen_y = $game_temp.battler_face_pos[index][1] rescue nil
  2594. actor.screen_z = $game_temp.battler_face_pos[index][2] rescue nil
  2595. index += 1
  2596. end
  2597. end
  2598.  
  2599. #--------------------------------------------------------------------------
  2600. # * Dispose
  2601. #--------------------------------------------------------------------------
  2602. alias mog_battle_hud_ex_dispose dispose
  2603. def dispose
  2604. dispose_battle_hud_ex
  2605. mog_battle_hud_ex_dispose
  2606. end
  2607.  
  2608. #--------------------------------------------------------------------------
  2609. # * Update
  2610. #--------------------------------------------------------------------------
  2611. alias mog_battle_hud_ex_update update
  2612. def update
  2613. mog_battle_hud_ex_update
  2614. update_battle_hud_ex
  2615. end
  2616.  
  2617. #--------------------------------------------------------------------------
  2618. # * Create Battle Hud EX
  2619. #--------------------------------------------------------------------------
  2620. def create_battle_hud_ex
  2621. return if @battle_hud_ex != nil
  2622. $game_temp.battle_hud_visible = true
  2623. @battle_hud_ex = Monogatari_Bhud.new(@viewport1)
  2624. check_screen_xyz_after
  2625. end
  2626.  
  2627. #--------------------------------------------------------------------------
  2628. # * Dispose Battle Hud EX
  2629. #--------------------------------------------------------------------------
  2630. def dispose_battle_hud_ex
  2631. return if @battle_hud_ex == nil
  2632. @battle_hud_ex.dispose
  2633. @battle_hud_ex = nil
  2634. $game_temp.mbhud_window = [false,false,false,false,false,false,false]
  2635. end
  2636.  
  2637. #--------------------------------------------------------------------------
  2638. # * Update Battle Hud EX
  2639. #--------------------------------------------------------------------------
  2640. def update_battle_hud_ex
  2641. refresh_battle_hud if $game_temp.mbhud_force_refresh
  2642. return if @battle_hud_ex == nil
  2643. @battle_hud_ex.update
  2644. end
  2645.  
  2646. #--------------------------------------------------------------------------
  2647. # * Refresh Battle Hud
  2648. #--------------------------------------------------------------------------
  2649. def refresh_battle_hud
  2650. $game_temp.mbhud_force_refresh = false
  2651. check_screen_xyz_nil rescue nil
  2652. dispose_battle_hud_ex
  2653. create_battle_hud_ex
  2654. end
  2655.  
  2656. end
  2657.  
  2658. #==============================================================================
  2659. # ** Monogatari Bhud
  2660. #==============================================================================
  2661. class Monogatari_Bhud
  2662.  
  2663. include MOG_BATTLE_HUD_EX
  2664.  
  2665. #--------------------------------------------------------------------------
  2666. # * Initialize
  2667. #--------------------------------------------------------------------------
  2668. def initialize(viewport)
  2669. @pre_message_position = $game_message.position
  2670. $game_message.position = MOG_BATTLE_HUD_EX::BATTLE_MESSAGE_POSITION
  2671. @battle_hud = []
  2672. index = 0
  2673. for actor in $game_party.battle_members
  2674. @battle_hud.push(Battle_Hud_EX.new(actor,index,max_members,viewport))
  2675. index += 1
  2676. end
  2677. create_turn_sprite(viewport)
  2678. end
  2679.  
  2680. #--------------------------------------------------------------------------
  2681. # * Max members
  2682. #--------------------------------------------------------------------------
  2683. def max_members
  2684. if $game_party.members.size > $game_party.max_battle_members
  2685. return $game_party.max_battle_members
  2686. end
  2687. return $game_party.members.size
  2688. end
  2689.  
  2690. #--------------------------------------------------------------------------
  2691. # * Dispose
  2692. #--------------------------------------------------------------------------
  2693. def dispose
  2694. @battle_hud.each {|sprite| sprite.dispose }
  2695. dispose_turn_sprite
  2696. $game_message.position = @pre_message_position
  2697. end
  2698.  
  2699. #--------------------------------------------------------------------------
  2700. # * Update
  2701. #--------------------------------------------------------------------------
  2702. def update
  2703. @battle_hud.each {|sprite| sprite.update }
  2704. update_turn_sprite
  2705. end
  2706.  
  2707. end
  2708.  
  2709. #==============================================================================
  2710. # ** Monogatari Bhud
  2711. #==============================================================================
  2712. class Monogatari_Bhud
  2713.  
  2714. #--------------------------------------------------------------------------
  2715. # * Can Update Turn Sprite
  2716. #--------------------------------------------------------------------------
  2717. def can_refresh_turn_sprite?
  2718. return true if @turn_sprite.visible != $game_temp.command_visible
  2719. return true if $game_temp.refresh_turn_sprite
  2720. return false
  2721. end
  2722.  
  2723. #--------------------------------------------------------------------------
  2724. # * Create Turn Sprite
  2725. #--------------------------------------------------------------------------
  2726. def create_turn_sprite(viewport)
  2727. return if !TURN_SPRITE_VISIBLE
  2728. return if @turn_sprite != nil
  2729. @turn_sprite = Sprite.new
  2730. @turn_sprite.bitmap = Cache.battle_hud("Turn")
  2731. @turn_sprite.viewport = viewport
  2732. @turn_sprite.z = HUD_Z + TURN_SPRITE_Z
  2733. @turn_sprite.visible = false
  2734. @turn_sprite_update_time = 5
  2735. @turn_sprite_blink = [0,0]
  2736. end
  2737.  
  2738. #--------------------------------------------------------------------------
  2739. # * Dispose Turn Sprite
  2740. #--------------------------------------------------------------------------
  2741. def dispose_turn_sprite
  2742. return if @turn_sprite == nil
  2743. @turn_sprite.dispose
  2744. @turn_sprite = nil
  2745. end
  2746.  
  2747. #--------------------------------------------------------------------------
  2748. # * Update Turn Sprite
  2749. #--------------------------------------------------------------------------
  2750. def update_turn_sprite
  2751. return if @turn_sprite == nil
  2752. if @turn_sprite_update_time > 0
  2753. @turn_sprite_update_time -= 1
  2754. return
  2755. end
  2756. update_turn_visible if can_refresh_turn_sprite?
  2757. update_turn_blink
  2758. end
  2759.  
  2760. #--------------------------------------------------------------------------
  2761. # * Update Turn Visible
  2762. #--------------------------------------------------------------------------
  2763. def update_turn_visible
  2764. $game_temp.refresh_turn_sprite = false
  2765. @turn_sprite.visible = $game_temp.command_visible
  2766. battler_index = BattleManager.current_index rescue nil
  2767. battler_index = 0 if battler_index == nil
  2768. x = $game_temp.hud_pos_real[battler_index][0] + TURN_SPRITE_POSITION[0]
  2769. y = $game_temp.hud_pos_real[battler_index][1] + TURN_SPRITE_POSITION[1]
  2770. @turn_sprite.x = x
  2771. @turn_sprite.y = y
  2772. end
  2773.  
  2774. #--------------------------------------------------------------------------
  2775. # * Update Turn Blink
  2776. #--------------------------------------------------------------------------
  2777. def update_turn_blink
  2778. return if !TURN_BLINK_EFFECT
  2779. return if !@turn_sprite.visible
  2780. @turn_sprite_blink[0] += 1
  2781. case @turn_sprite_blink[0]
  2782. when 0..30
  2783. @turn_sprite_blink[1] += 3
  2784. when 31..60
  2785. @turn_sprite_blink[1] -= 3
  2786. else
  2787. @turn_sprite_blink = [0,0]
  2788. end
  2789. @turn_sprite.opacity = 150 + @turn_sprite_blink[1]
  2790. end
  2791.  
  2792.  
  2793. end
  2794.  
  2795. #==============================================================================
  2796. #==============================================================================
  2797. # ** Battle Hud EX
  2798. #==============================================================================
  2799. #==============================================================================
  2800. class Battle_Hud_EX
  2801. include MOG_BATTLE_HUD_EX
  2802.  
  2803. #--------------------------------------------------------------------------
  2804. # * Initialize
  2805. #--------------------------------------------------------------------------
  2806. def initialize(actor = nil,index = 0, max_members = 0,viewport = nil)
  2807. pre_cache
  2808. setup(actor,index,max_members)
  2809. create_sprites(viewport)
  2810. end
  2811.  
  2812. #--------------------------------------------------------------------------
  2813. # * Setup
  2814. #--------------------------------------------------------------------------
  2815. def setup(actor,index,max_members)
  2816. @actor = actor
  2817. @actor_index = index
  2818. @max_members = max_members
  2819. @actor.face_animation = [0,0,0]
  2820. @hp_icon_max = -1
  2821. @hp_icon_old = -1
  2822. @hp_icon_col_max = HP_ICON_COL_MAX
  2823. @hp_icon_col_max = 1 if @hp_icon_col_max <= 0
  2824. @hp_icon_row_max = HP_ICON_ROW_MAX
  2825. @hp_icon_row_max = 1 if @hp_icon_row_max <= 0
  2826. @hp_icon_real_max = @hp_icon_col_max * @hp_icon_row_max
  2827. @mp_icon_max = -1
  2828. @mp_icon_old = -1
  2829. @mp_icon_col_max = MP_ICON_COL_MAX
  2830. @mp_icon_col_max = 1 if @mp_icon_col_max <= 0
  2831. @mp_icon_row_max = MP_ICON_ROW_MAX
  2832. @mp_icon_row_max = 1 if @mp_icon_row_max <= 0
  2833. @mp_icon_real_max = @mp_icon_col_max * @mp_icon_row_max
  2834. @tp_icon_max = -1
  2835. @tp_icon_old = -1
  2836. @tp_icon_col_max = TP_ICON_COL_MAX
  2837. @tp_icon_col_max = 1 if @tp_icon_col_max <= 0
  2838. @tp_icon_row_max = TP_ICON_ROW_MAX
  2839. @tp_icon_row_max = 1 if @tp_icon_row_max <= 0
  2840. @tp_icon_real_max = @tp_icon_col_max * @tp_icon_row_max
  2841. @sprite_visible = true
  2842. setup_actor
  2843. setup_position
  2844. end
  2845.  
  2846. #--------------------------------------------------------------------------
  2847. # * Setup Actor
  2848. #--------------------------------------------------------------------------
  2849. def setup_actor
  2850. return if @actor == nil
  2851. @hp_number_refresh = true
  2852. @hp_number2_refresh = true
  2853. @hp_number_old = @actor.hp
  2854. @hp_number2_old = @actor.mhp
  2855. @hp_old_meter = 0
  2856. @mp_number_refresh = true
  2857. @mp_number2_refresh = true
  2858. @mp_number_old = @actor.mp
  2859. @mp_number2_old = @actor.mmp
  2860. @mp_old_meter = 0
  2861. @tp_number_refresh = true
  2862. @tp_number2_refresh = true
  2863. @tp_number_old = @actor.tp
  2864. @tp_number2_old = @actor.max_tp
  2865. @tp_old_meter = 0
  2866. @at_number_refresh = true
  2867. @at_number2_refresh = true
  2868. @at_number_old = actor_at
  2869. @at_number2_old = actor_max_at
  2870. @at_old_meter = 0
  2871. catb = ATB::MAX_AP rescue nil
  2872. @ccwinter_atb = true if catb != nil
  2873. end
  2874.  
  2875. #--------------------------------------------------------------------------
  2876. # * Terminate
  2877. #--------------------------------------------------------------------------
  2878. def terminate
  2879. if $imported[:ve_active_time_battle]
  2880. @actor.atb = 0 rescue nil
  2881. end
  2882. end
  2883.  
  2884. #--------------------------------------------------------------------------
  2885. # * AT
  2886. #--------------------------------------------------------------------------
  2887. def actor_at
  2888. return @actor.at if $imported[:mog_atb_system]
  2889. return @actor.atb if $imported[:ve_active_time_battle]
  2890. return @actor.catb_value if $imported["YSA-CATB"]
  2891. return @actor.ap if @ccwinter_atb != nil
  2892. return 0
  2893. end
  2894.  
  2895. #--------------------------------------------------------------------------
  2896. # * Max AT
  2897. #--------------------------------------------------------------------------
  2898. def actor_max_at
  2899. return $game_system.at_max if $imported[:mog_atb_system]
  2900. return @actor.max_atb if $imported[:ve_active_time_battle]
  2901. return @actor.max_atb if $imported["YSA-CATB"]
  2902. return ATB::MAX_AP if @ccwinter_atb != nil
  2903. return 1
  2904. end
  2905.  
  2906. #--------------------------------------------------------------------------
  2907. # ● Actor Cast
  2908. #--------------------------------------------------------------------------
  2909. def actor_cast
  2910. return @actor.at_cast[1] if $imported[:mog_atb_system]
  2911. return @actor.atb if $imported[:ve_active_time_battle]
  2912. return @actor.chant_count if @ccwinter_atb
  2913. return 0
  2914. end
  2915.  
  2916. #--------------------------------------------------------------------------
  2917. # ● Actor Max Cast
  2918. #--------------------------------------------------------------------------
  2919. def actor_max_cast
  2920. return @actor.at_cast[0].speed.abs if $imported[:mog_atb_system]
  2921. return @actor.max_atb if $imported[:ve_active_time_battle]
  2922. return @actor.max_chant_count if @ccwinter_atb
  2923. return 1
  2924. end
  2925.  
  2926. #--------------------------------------------------------------------------
  2927. # ● Actor Cast?
  2928. #--------------------------------------------------------------------------
  2929. def actor_cast?
  2930. if $imported[:mog_atb_system]
  2931. return true if [email protected]_cast.empty?
  2932. end
  2933. if $imported[:ve_active_time_battle]
  2934. return true if @actor.cast_action?
  2935. end
  2936. if @ccwinter_atb
  2937. return true if @actor.chanting?
  2938. end
  2939. return false
  2940. end
  2941.  
  2942. #--------------------------------------------------------------------------
  2943. # * Create Sprites
  2944. #--------------------------------------------------------------------------
  2945. def create_sprites(viewport)
  2946. dispose
  2947. return if @actor == nil
  2948. create_layout(viewport)
  2949. create_layout_2(viewport)
  2950. create_name(viewport)
  2951. create_face(viewport)
  2952. create_hp_number(viewport)
  2953. create_hp_number_max(viewport)
  2954. create_hp_meter(viewport)
  2955. create_hp_icon(viewport)
  2956. create_hp_icon_ex(viewport)
  2957. create_hp_icon_number(viewport)
  2958. create_mp_number(viewport)
  2959. create_mp_number_max(viewport)
  2960. create_mp_meter(viewport)
  2961. create_mp_icon(viewport)
  2962. create_mp_icon_ex(viewport)
  2963. create_mp_icon_number(viewport)
  2964. create_tp_number(viewport)
  2965. create_tp_number_max(viewport)
  2966. create_tp_meter(viewport)
  2967. create_tp_icon(viewport)
  2968. create_tp_icon_ex(viewport)
  2969. create_tp_icon_number(viewport)
  2970. create_at_number(viewport)
  2971. create_at_number_max(viewport)
  2972. create_at_meter(viewport)
  2973. create_level_number(viewport)
  2974. create_states(viewport)
  2975. update
  2976. end
  2977.  
  2978. #--------------------------------------------------------------------------
  2979. # * Sprite Visible
  2980. #--------------------------------------------------------------------------
  2981. def sprite_visible?
  2982. return false if $game_message.visible and MESSAGE_WINDOW_FADE_HUD
  2983. return false if !$game_temp.battle_hud_visible
  2984. return true
  2985. end
  2986.  
  2987. #--------------------------------------------------------------------------
  2988. # * Sprite Visible
  2989. #--------------------------------------------------------------------------
  2990. def sprite_visible(sprite)
  2991. if @sprite_visible
  2992. sprite.opacity += 5
  2993. else
  2994. sprite.opacity -= 10
  2995. end
  2996. end
  2997.  
  2998. end
  2999.  
  3000. #==============================================================================
  3001. #==============================================================================
  3002. # ** Battle Hud EX
  3003. #==============================================================================
  3004. #==============================================================================
  3005. class Battle_Hud_EX
  3006.  
  3007. #--------------------------------------------------------------------------
  3008. # * Setup Position
  3009. #--------------------------------------------------------------------------
  3010. def setup_position
  3011. sprite_width = (Graphics.width - 64) / 4
  3012. sprite_center = sprite_width / 2
  3013. if $game_party.battle_members.size > 4
  3014. members = $game_party.battle_members.size - 4
  3015. fx = 32 * members
  3016. else
  3017. fx = 0
  3018. end
  3019. space_x = MEMBERS_SPACE[0] - fx
  3020. space_y = MEMBERS_SPACE[1]
  3021. center = Graphics.width / 2
  3022. members_space = (Graphics.width + space_x) / @max_members
  3023. members_space2 = (members_space * @actor_index)
  3024. members_space3 = ((members_space / 2) * (@max_members - 1))
  3025. members_space_y = space_y * @actor_index
  3026. x = HUD_POSITION[0] - sprite_center + center + members_space2 - members_space3
  3027. screen_resize_y = 0
  3028. screen_resize_y = (Graphics.height - 416) if Graphics.height > 416
  3029. y = HUD_POSITION[1] + members_space_y + screen_resize_y
  3030. @hud_position = [x,y]
  3031. $game_temp.hud_pos_real[@actor_index] = [] if $game_temp.hud_pos_real[@actor_index] == nil
  3032. $game_temp.hud_pos_real[@actor_index] = [x,y]
  3033. x2 = x + sprite_center
  3034. $game_temp.hud_pos[@actor_index] = [] if $game_temp.hud_pos[@actor_index] == nil
  3035. $game_temp.hud_pos[@actor_index] = [x2,y]
  3036. if FIXED_HUD_POSITION[@actor_index] != nil
  3037. @hud_position = [FIXED_HUD_POSITION[@actor_index][0],FIXED_HUD_POSITION[@actor_index][1]]
  3038. $game_temp.hud_pos_real[@actor_index] = [@hud_position[0],@hud_position[1]]
  3039. $game_temp.hud_pos[@actor_index] = [] if $game_temp.hud_pos[@actor_index] == nil
  3040. $game_temp.hud_pos[@actor_index] = [Graphics.width / 2,(Graphics.height / 2) + 96]
  3041. end
  3042. end
  3043.  
  3044. end
  3045.  
  3046. #==============================================================================
  3047. # ** Game Temp
  3048. #==============================================================================
  3049. class Game_Temp
  3050.  
  3051. attr_accessor :cache_bhud_sprites
  3052.  
  3053. #--------------------------------------------------------------------------
  3054. # * Cache Battle Hud
  3055. #--------------------------------------------------------------------------
  3056. def cache_battle_hud
  3057. execute_cache_bhud_sprites if @cache_bhud_sprites == nil
  3058. end
  3059.  
  3060. #--------------------------------------------------------------------------
  3061. # * Execute Cache Bhud Sprites
  3062. #--------------------------------------------------------------------------
  3063. def execute_cache_bhud_sprites
  3064. @cache_bhud_sprites = []
  3065. windows = ["Layout_Command","Layout_Party","Layout_Help",
  3066. "Layout_Target_Actor","Layout_Target_Enemy","Layout_Skill",
  3067. "Layout_Item"]
  3068. for s in windows
  3069. @cache_bhud_sprites.push(Cache.battle_hud(s)) rescue nil
  3070. end
  3071. sprites = ["Layout","Layout_2",
  3072. "MP_Number","Max_MP_Number","MP_Icon","MP_Icon_EX","MP_Icon_Number",
  3073. "TP_Number","Max_TP_Number","TP_Icon","TP_Icon_EX","TP_Icon_Number",
  3074. "AT_Number","Max_AT_Number","AT_Icon","AT_Icon_EX","AT_Icon_Number",
  3075. "LV_Number","Turn","Iconset"
  3076. ]
  3077. for s in sprites
  3078. @cache_bhud_sprites.push(Cache.battle_hud(s)) rescue nil
  3079. end
  3080. end
  3081.  
  3082. end
  3083.  
  3084. #==============================================================================
  3085. # ** Spriteset_Map
  3086. #==============================================================================
  3087. class Spriteset_Map
  3088.  
  3089. #--------------------------------------------------------------------------
  3090. # * Initialize
  3091. #--------------------------------------------------------------------------
  3092. alias mog_monogatari_bhud_initialize initialize
  3093. def initialize
  3094. $game_temp.cache_battle_hud
  3095. mog_monogatari_bhud_initialize
  3096. end
  3097.  
  3098. end
  3099.  
  3100. #==============================================================================
  3101. #==============================================================================
  3102. # ** Battle Hud EX
  3103. #==============================================================================
  3104. #==============================================================================
  3105. class Battle_Hud_EX
  3106.  
  3107. #--------------------------------------------------------------------------
  3108. # * Pre Cache
  3109. #--------------------------------------------------------------------------
  3110. def pre_cache
  3111. $game_temp.cache_battle_hud
  3112. @force_hide = false
  3113. @force_hide_time = 0
  3114. @fade_hud = false
  3115. @fade_hud_gold = false
  3116. @fade_hud_equip = false
  3117. @layout_image = Cache.battle_hud("Layout")
  3118. @layout_cw = @layout_image.width
  3119. @layout_ch = @layout_image.height
  3120. @layout2_image = Cache.battle_hud("Layout_2") rescue nil
  3121. @layout2_cw = @layout2_image.width if @layout2_image != nil
  3122. @layout2_ch = @layout2_image.height if @layout2_image != nil
  3123. @layout2_cw = 0 if @layout2_cw == nil
  3124. #------------------------------------------------
  3125. # HP
  3126. #------------------------------------------------
  3127. if HP_NUMBER_VISIBLE
  3128. @hp_number_image = Cache.battle_hud("HP_Number")
  3129. @hp_number_cw = @hp_number_image.width / 10
  3130. if HP_NUMBER_LOW_COLOR
  3131. @hp_number_ch = @hp_number_image.height / 2
  3132. else
  3133. @hp_number_ch = @hp_number_image.height
  3134. end
  3135. @hp_wave_number = HP_NUMBER_WAVE_ALIGN_EFFECT
  3136. @hp_number_ch += (@hp_number_ch / 2) if @hp_wave_number
  3137. end
  3138. if HP_NUMBER_MAX_VISIBLE
  3139. @hp_number2_image = Cache.battle_hud("Max_HP_Number")
  3140. @hp_number2_cw = @hp_number2_image.width / 10
  3141. @hp_number2_ch = @hp_number2_image.height
  3142. end
  3143. if HP_METER_VISIBLE
  3144. @hp_meter_image = Cache.battle_hud("HP_Meter")
  3145. if HP_METER_GRADIENT_ANIMATION
  3146. @hp_meter_cw = @hp_meter_image.width / 3
  3147. else
  3148. @hp_meter_cw = @hp_meter_image.width
  3149. end
  3150. if HP_METER_REDUCTION_ANIMATION
  3151. @hp_meter_ch = @hp_meter_image.height / 2
  3152. else
  3153. @hp_meter_ch = @hp_meter_image.height
  3154. end
  3155. end
  3156. if HP_ICON_VISIBLE
  3157. @hp_icon_image = Cache.battle_hud("HP_Icon")
  3158. @hp_icon_cw = @hp_icon_image.width / 2
  3159. @hp_icon_ch = @hp_icon_image.height
  3160. end
  3161. if HP_ICON_EX_VISIBLE
  3162. @hp_icon2_image = Cache.battle_hud("HP_Icon_EX")
  3163. @hp_icon2_cw = @hp_icon2_image.width
  3164. @hp_icon2_ch = @hp_icon2_image.height
  3165. end
  3166. if HP_ICON_NUMBER_VISIBLE
  3167. @hp_icon_number_image = Cache.battle_hud("HP_Icon_Number")
  3168. @hp_icon_number_cw = @hp_icon_number_image.width / 10
  3169. @hp_icon_number_ch = @hp_icon_number_image.height
  3170. end
  3171. #------------------------------------------------
  3172. # MP
  3173. #------------------------------------------------
  3174. if MP_NUMBER_VISIBLE
  3175. @mp_number_image = Cache.battle_hud("MP_Number")
  3176. @mp_number_cw = @mp_number_image.width / 10
  3177. if MP_NUMBER_LOW_COLOR
  3178. @mp_number_ch = @mp_number_image.height / 2
  3179. else
  3180. @mp_number_ch = @mp_number_image.height
  3181. end
  3182. @mp_wave_number = MP_NUMBER_WAVE_ALIGN_EFFECT
  3183. @mp_number_ch += (@mp_number_ch / 2) if @mp_wave_number
  3184. end
  3185. if MP_NUMBER_MAX_VISIBLE
  3186. @mp_number2_image = Cache.battle_hud("Max_MP_Number")
  3187. @mp_number2_cw = @mp_number2_image.width / 10
  3188. @mp_number2_ch = @mp_number2_image.height
  3189. end
  3190. if MP_METER_VISIBLE
  3191. @mp_meter_image = Cache.battle_hud("MP_Meter")
  3192. if MP_METER_GRADIENT_ANIMATION
  3193. @mp_meter_cw = @mp_meter_image.width / 3
  3194. else
  3195. @mp_meter_cw = @mp_meter_image.width
  3196. end
  3197. if MP_METER_REDUCTION_ANIMATION
  3198. @mp_meter_ch = @mp_meter_image.height / 2
  3199. else
  3200. @mp_meter_ch = @mp_meter_image.height
  3201. end
  3202. end
  3203. if MP_ICON_VISIBLE
  3204. @mp_icon_image = Cache.battle_hud("MP_Icon")
  3205. @mp_icon_cw = @mp_icon_image.width / 2
  3206. @mp_icon_ch = @mp_icon_image.height
  3207. end
  3208. if MP_ICON_EX_VISIBLE
  3209. @mp_icon2_image = Cache.battle_hud("MP_Icon_EX")
  3210. @mp_icon2_cw = @mp_icon2_image.width
  3211. @mp_icon2_ch = @mp_icon2_image.height
  3212. end
  3213. if MP_ICON_NUMBER_VISIBLE
  3214. @mp_icon_number_image = Cache.battle_hud("MP_Icon_Number")
  3215. @mp_icon_number_cw = @mp_icon_number_image.width / 10
  3216. @mp_icon_number_ch = @mp_icon_number_image.height
  3217. end
  3218. #------------------------------------------------
  3219. # TP
  3220. #------------------------------------------------
  3221. if TP_NUMBER_VISIBLE
  3222. @tp_number_image = Cache.battle_hud("TP_Number")
  3223. @tp_number_cw = @tp_number_image.width / 10
  3224. if TP_NUMBER_LOW_COLOR
  3225. @tp_number_ch = @tp_number_image.height / 2
  3226. else
  3227. @tp_number_ch = @tp_number_image.height
  3228. end
  3229. @tp_wave_number = TP_NUMBER_WAVE_ALIGN_EFFECT
  3230. @tp_number_ch += (@tp_number_ch / 2) if @tp_wave_number
  3231. end
  3232. if TP_NUMBER_MAX_VISIBLE
  3233. @tp_number2_image = Cache.battle_hud("Max_TP_Number")
  3234. @tp_number2_cw = @tp_number2_image.width / 10
  3235. @tp_number2_ch = @tp_number2_image.height
  3236. end
  3237. if TP_METER_VISIBLE
  3238. @tp_meter_image = Cache.battle_hud("TP_Meter")
  3239. if TP_METER_GRADIENT_ANIMATION
  3240. @tp_meter_cw = @tp_meter_image.width / 3
  3241. else
  3242. @tp_meter_cw = @tp_meter_image.width
  3243. end
  3244. if TP_METER_REDUCTION_ANIMATION
  3245. @tp_meter_ch = @tp_meter_image.height / 2
  3246. else
  3247. @tp_meter_ch = @tp_meter_image.height
  3248. end
  3249. end
  3250. if TP_ICON_VISIBLE
  3251. @tp_icon_image = Cache.battle_hud("TP_Icon")
  3252. @tp_icon_cw = @tp_icon_image.width / 2
  3253. @tp_icon_ch = @tp_icon_image.height
  3254. end
  3255. if TP_ICON_EX_VISIBLE
  3256. @tp_icon2_image = Cache.battle_hud("TP_Icon_EX")
  3257. @tp_icon2_cw = @tp_icon2_image.width
  3258. @tp_icon2_ch = @tp_icon2_image.height
  3259. end
  3260. if TP_ICON_NUMBER_VISIBLE
  3261. @tp_icon_number_image = Cache.battle_hud("TP_Icon_Number")
  3262. @tp_icon_number_cw = @tp_icon_number_image.width / 10
  3263. @tp_icon_number_ch = @tp_icon_number_image.height
  3264. end
  3265. #------------------------------------------------
  3266. # AT
  3267. #------------------------------------------------
  3268. if AT_NUMBER_VISIBLE
  3269. @at_number_image = Cache.battle_hud("AT_Number")
  3270. @at_number_cw = @at_number_image.width / 10
  3271. @at_number_ch = @at_number_image.height
  3272. @at_wave_number = AT_NUMBER_WAVE_ALIGN_EFFECT
  3273. @at_number_ch += (@at_number_ch / 2) if @at_wave_number
  3274. end
  3275. if AT_NUMBER_MAX_VISIBLE
  3276. @at_number2_image = Cache.battle_hud("Max_AT_Number")
  3277. @at_number2_cw = @at_number2_image.width / 10
  3278. @at_number2_ch = @at_number2_image.height
  3279. end
  3280. if AT_METER_VISIBLE
  3281. @at_meter_image = Cache.battle_hud("AT_Meter")
  3282. if AT_METER_GRADIENT_ANIMATION
  3283. @at_meter_cw = @at_meter_image.width / 3
  3284. else
  3285. @at_meter_cw = @at_meter_image.width
  3286. end
  3287. @at_meter_ch = @at_meter_image.height / 3
  3288. end
  3289. #------------------------------------------------
  3290. # LV
  3291. #------------------------------------------------
  3292. if LEVEL_NUMBER_VISIBLE
  3293. @lv_number_image = Cache.battle_hud("LV_Number")
  3294. @lv_number_cw = @lv_number_image.width / 10
  3295. @lv_number_ch = @lv_number_image.height
  3296. end
  3297. #------------------------------------------------
  3298. # ICON
  3299. #------------------------------------------------
  3300. if STATES_VISIBLE or EQUIPMENT_VISIBLE
  3301. @icon_image = Cache.system("Iconset")
  3302. end
  3303. end
  3304.  
  3305. #--------------------------------------------------------------------------
  3306. # * Check Icon Image
  3307. #--------------------------------------------------------------------------
  3308. def check_icon_image
  3309. if @icon_image == nil or @icon_image.disposed?
  3310. @icon_image = Cache.system("Iconset")
  3311. end
  3312. end
  3313.  
  3314. end
  3315.  
  3316. #==============================================================================
  3317. #==============================================================================
  3318. # ** Battle Hud EX
  3319. #==============================================================================
  3320. #==============================================================================
  3321. class Battle_Hud_EX
  3322.  
  3323. #--------------------------------------------------------------------------
  3324. # * Update Number
  3325. #--------------------------------------------------------------------------
  3326. def update_number(type,value)
  3327. actor_value = @actor.hp if type == 0
  3328. actor_value = @actor.mp if type == 1
  3329. actor_value = @actor.tp if type == 2
  3330. actor_value = @actor.mhp if type == 3
  3331. actor_value = @actor.mmp if type == 4
  3332. actor_value = @actor.max_tp if type == 5
  3333. actor_value = actor_at if type == 6
  3334. actor_value = actor_max_at if type == 7
  3335. if value < actor_value
  3336. value += number_refresh_speed(actor_value,value)
  3337. value = actor_value if value >= actor_value
  3338. refresh_sprite_number(type,value)
  3339. elsif value > actor_value
  3340. value -= number_refresh_speed(actor_value,value)
  3341. value = actor_value if value <= actor_value
  3342. refresh_sprite_number(type,value)
  3343. end
  3344. end
  3345.  
  3346. #--------------------------------------------------------------------------
  3347. # * Number Refresh Speed
  3348. #--------------------------------------------------------------------------
  3349. def number_refresh_speed(actor_value,value)
  3350. n = 1 * (actor_value - value).abs / 10
  3351. return [[n, 99999999].min,1].max
  3352. end
  3353.  
  3354. #--------------------------------------------------------------------------
  3355. # * Update Number Fix
  3356. #--------------------------------------------------------------------------
  3357. def update_number_fix(type)
  3358. if type == 0
  3359. @hp_number_old = @actor.hp
  3360. @hp_number_refresh = true
  3361. elsif type == 1
  3362. @mp_number_old = @actor.mp
  3363. @mp_number_refresh = true
  3364. elsif type == 2
  3365. @tp_number_old = @actor.tp
  3366. @tp_number_refresh = true
  3367. elsif type == 3
  3368. @hp_number2_old = @actor.mhp
  3369. @hp_number2_refresh = true
  3370. elsif type == 4
  3371. @mp_number2_old = @actor.mmp
  3372. @mp_number2_refresh = true
  3373. elsif type == 5
  3374. @tp_number2_old = @actor.max_tp
  3375. @tp_number2_refresh = true
  3376. elsif type == 6
  3377. @at_number_old = actor_at
  3378. @at_number_refresh = true
  3379. elsif type == 7
  3380. @at_number2_old = actor_max_at
  3381. @at_number2_refresh = true
  3382. end
  3383. end
  3384.  
  3385. #--------------------------------------------------------------------------
  3386. # * Refresh Sprite Number
  3387. #--------------------------------------------------------------------------
  3388. def refresh_sprite_number(type,value)
  3389. @hp_number_refresh = true if type == 0
  3390. @hp_number_old = value if type == 0
  3391. @mp_number_refresh = true if type == 1
  3392. @mp_number_old = value if type == 1
  3393. @tp_number_refresh = true if type == 2
  3394. @tp_number_old = value if type == 2
  3395. @hp_number2_refresh = true if type == 3
  3396. @hp_number2_old = value if type == 3
  3397. @mp_number2_refresh = true if type == 4
  3398. @mp_number2_old = value if type == 4
  3399. @tp_number2_refresh = true if type == 5
  3400. @tp_number2_old = value if type == 5
  3401. @at_number_refresh = true if type == 6
  3402. @at_number_old = value if type == 6
  3403. @at_number2_refresh = true if type == 7
  3404. @at_number2_old = value if type == 7
  3405. end
  3406.  
  3407. #--------------------------------------------------------------------------
  3408. # * Refresh Number
  3409. #--------------------------------------------------------------------------
  3410. def refresh_number(type,value,sprite,image,number_cw,number_ch,wave_number = false)
  3411. sprite.bitmap.clear
  3412. clear_number_refresh(type)
  3413. number_color = low_number_color(type,number_ch)
  3414. if type == 0 and HP_NUMBER_PERCENTAGE
  3415. value_max = @actor.mhp
  3416. value = value.to_f / value_max.to_f * 100
  3417. value = 1 if (value < 0 and @actor.hp > 0) or @actor.hp == 1
  3418. elsif type == 1 and MP_NUMBER_PERCENTAGE
  3419. value_max = @actor.mmp
  3420. value = value.to_f / value_max.to_f * 100
  3421. elsif type == 2 and TP_NUMBER_PERCENTAGE
  3422. value_max = @actor.max_tp
  3423. value = value.to_f / value_max.to_f * 100
  3424. elsif type == 3 and HP_NUMBER_PERCENTAGE
  3425. value = 100
  3426. elsif type == 4 and MP_NUMBER_PERCENTAGE
  3427. value = 100
  3428. elsif type == 5 and TP_NUMBER_PERCENTAGE
  3429. value = 100
  3430. elsif type == 6 and AT_NUMBER_PERCENTAGE
  3431. value_max = actor_max_at
  3432. value = value.to_f / value_max.to_f * 100
  3433. elsif type == 7 and AT_NUMBER_PERCENTAGE
  3434. value = 100
  3435. end
  3436. value = 9999999 if value > 9999999
  3437. number_value = value.truncate.abs.to_s.split(//)
  3438. wave_h = 0
  3439. wave_h2 = wave_number ? (number_ch / 3) : 0
  3440. wave_h3 = number_color != 0 ? wave_h2 : 0
  3441. for r in 0..number_value.size - 1
  3442. number_value_abs = number_value[r].to_i
  3443. wh = wave_h2 * wave_h
  3444. wh2 = wave_h == 0 ? wave_h2 : 0
  3445. nsrc_rect = Rect.new(number_cw * number_value_abs, number_color - wave_h3, number_cw, number_ch - wh2)
  3446. sprite.bitmap.blt(number_cw * r, wh, image, nsrc_rect)
  3447. wave_h = wave_h == 0 ? 1 : 0
  3448. end
  3449. refresh_number_position(type,number_value.size,number_cw)
  3450. end
  3451.  
  3452. #--------------------------------------------------------------------------
  3453. # * Refresh Number
  3454. #--------------------------------------------------------------------------
  3455. def refresh_number_position(type,number_value,number_cw)
  3456. cx = number_value * number_cw
  3457. if type == 0
  3458. case HP_NUMBER_ALIGN_TYPE
  3459. when 0; @hp_number.x = @hud_position[0] + HP_NUMBER_POSITION[0]
  3460. when 1; @hp_number.x = @hud_position[0] + HP_NUMBER_POSITION[0] - (cx / 2)
  3461. when 2; @hp_number.x = @hud_position[0] + HP_NUMBER_POSITION[0] - cx
  3462. end
  3463. elsif type == 1
  3464. case MP_NUMBER_ALIGN_TYPE
  3465. when 0; @mp_number.x = @hud_position[0] + MP_NUMBER_POSITION[0]
  3466. when 1; @mp_number.x = @hud_position[0] + MP_NUMBER_POSITION[0] - (cx / 2)
  3467. when 2; @mp_number.x = @hud_position[0] + MP_NUMBER_POSITION[0] - cx
  3468. end
  3469. elsif type == 2
  3470. case TP_NUMBER_ALIGN_TYPE
  3471. when 0; @tp_number.x = @hud_position[0] + TP_NUMBER_POSITION[0]
  3472. when 1; @tp_number.x = @hud_position[0] + TP_NUMBER_POSITION[0] - (cx / 2)
  3473. when 2; @tp_number.x = @hud_position[0] + TP_NUMBER_POSITION[0] - cx
  3474. end
  3475. elsif type == 3
  3476. case HP_NUMBER_ALIGN_TYPE
  3477. when 0; @hp_number2.x = @hud_position[0] + HP_NUMBER_MAX_POSITION[0]
  3478. when 1; @hp_number2.x = @hud_position[0] + HP_NUMBER_MAX_POSITION[0] - (cx / 2)
  3479. when 2; @hp_number2.x = @hud_position[0] + HP_NUMBER_MAX_POSITION[0] - cx
  3480. end
  3481. elsif type == 4
  3482. case MP_NUMBER_ALIGN_TYPE
  3483. when 0; @mp_number2.x = @hud_position[0] + MP_NUMBER_MAX_POSITION[0]
  3484. when 1; @mp_number2.x = @hud_position[0] + MP_NUMBER_MAX_POSITION[0] - (cx / 2)
  3485. when 2; @mp_number2.x = @hud_position[0] + MP_NUMBER_MAX_POSITION[0] - cx
  3486. end
  3487. elsif type == 5
  3488. case TP_NUMBER_ALIGN_TYPE
  3489. when 0; @tp_number2.x = @hud_position[0] + TP_NUMBER_MAX_POSITION[0]
  3490. when 1; @tp_number2.x = @hud_position[0] + TP_NUMBER_MAX_POSITION[0] - (cx / 2)
  3491. when 2; @tp_number2.x = @hud_position[0] + TP_NUMBER_MAX_POSITION[0] - cx
  3492. end
  3493. elsif type == 6
  3494. case MP_NUMBER_ALIGN_TYPE
  3495. when 0; @at_number.x = @hud_position[0] + AT_NUMBER_POSITION[0]
  3496. when 1; @at_number.x = @hud_position[0] + AT_NUMBER_POSITION[0] - (cx / 2)
  3497. when 2; @at_number.x = @hud_position[0] + AT_NUMBER_POSITION[0] - cx
  3498. end
  3499. elsif type == 7
  3500. case AT_NUMBER_ALIGN_TYPE
  3501. when 0; @at_number2.x = @hud_position[0] + AT_NUMBER_POSITION[0]
  3502. when 1; @at_number2.x = @hud_position[0] + AT_NUMBER_POSITION[0] - (cx / 2)
  3503. when 2; @at_number2.x = @hud_position[0] + AT_NUMBER_POSITION[0] - cx
  3504. end
  3505. end
  3506. end
  3507.  
  3508. #--------------------------------------------------------------------------
  3509. # * Low Number Color
  3510. #--------------------------------------------------------------------------
  3511. def low_number_color(type,number_ch)
  3512. if type == 0
  3513. if HP_NUMBER_LOW_COLOR
  3514. return @actor.low_hp? ? number_ch : 0
  3515. else
  3516. return 0
  3517. end
  3518. elsif type == 1
  3519. if MP_NUMBER_LOW_COLOR
  3520. return @actor.low_mp? ? number_ch : 0
  3521. else
  3522. return 0
  3523. end
  3524. elsif type == 2
  3525. if TP_NUMBER_LOW_COLOR
  3526. return @actor.low_tp? ? number_ch : 0
  3527. else
  3528. return 0
  3529. end
  3530. else
  3531. return 0
  3532. end
  3533. end
  3534.  
  3535. #--------------------------------------------------------------------------
  3536. # * Clear Number Refresh
  3537. #--------------------------------------------------------------------------
  3538. def clear_number_refresh(type)
  3539. @hp_number_refresh = false if type == 0
  3540. @mp_number_refresh = false if type == 1
  3541. @tp_number_refresh = false if type == 2
  3542. @hp_number2_refresh = false if type == 3
  3543. @mp_number2_refresh = false if type == 4
  3544. @tp_number2_refresh = false if type == 5
  3545. @at_number_refresh = false if type == 6
  3546. @at_number2_refresh = false if type == 7
  3547. end
  3548.  
  3549. #--------------------------------------------------------------------------
  3550. # * Icon Limit
  3551. #--------------------------------------------------------------------------
  3552. def icon_limit(value,value_max)
  3553. n1 = value / value_max
  3554. n2 = value - (n1 * value_max)
  3555. n2 = value_max if (n2 == 0 and value > 0)
  3556. return n2
  3557. end
  3558.  
  3559. end
  3560.  
  3561. #==============================================================================
  3562. #==============================================================================
  3563. # ** Battle Hud EX
  3564. #==============================================================================
  3565. #==============================================================================
  3566. class Battle_Hud_EX
  3567.  
  3568. #--------------------------------------------------------------------------
  3569. # * Create Layout
  3570. #--------------------------------------------------------------------------
  3571. def create_layout(viewport)
  3572. @layout = Sprite.new
  3573. @layout.bitmap = @layout_image
  3574. @layout.z = HUD_Z
  3575. @layout.x = @hud_position[0]
  3576. @layout.y = @hud_position[1]
  3577. @layout.opacity = 0
  3578. @layout.viewport = viewport
  3579. end
  3580.  
  3581. #--------------------------------------------------------------------------
  3582. # * Update Layout
  3583. #--------------------------------------------------------------------------
  3584. def update_layout
  3585. return if @layout == nil
  3586. sprite_visible(@layout)
  3587. end
  3588.  
  3589. #--------------------------------------------------------------------------
  3590. # * Create Layout
  3591. #--------------------------------------------------------------------------
  3592. def create_layout_2(viewport)
  3593. return if !SECOND_LAYOUT
  3594. @layout2 = Sprite.new
  3595. @layout2.bitmap = @layout2_image
  3596. @layout2.z = HUD_Z + SECOND_LAYOUT_Z
  3597. @layout2.x = @hud_position[0] + SECOND_LAYOUT_POSITION[0]
  3598. @layout2.y = @hud_position[1] + SECOND_LAYOUT_POSITION[1]
  3599. @layout2.opacity = 0
  3600. @layout2.viewport = viewport
  3601. end
  3602.  
  3603. #--------------------------------------------------------------------------
  3604. # * Update Layout
  3605. #--------------------------------------------------------------------------
  3606. def update_layout_2
  3607. return if @layout2 == nil
  3608. sprite_visible(@layout2)
  3609. end
  3610.  
  3611. end
  3612.  
  3613. #==============================================================================
  3614. #==============================================================================
  3615. # ** Battle Hud EX
  3616. #==============================================================================
  3617. #==============================================================================
  3618. class Battle_Hud_EX
  3619.  
  3620. #--------------------------------------------------------------------------
  3621. # * Create Name
  3622. #--------------------------------------------------------------------------
  3623. def create_name(viewport)
  3624. return if !NAME_VISIBLE
  3625. @name = Sprite.new
  3626. @name.bitmap = Bitmap.new(160,32)
  3627. @name.bitmap.font.name = NAME_FONT_NAME
  3628. @name.bitmap.font.size = NAME_FONT_SIZE
  3629. @name.bitmap.font.bold = NAME_FONT_BOLD
  3630. @name.bitmap.font.italic = NAME_FONT_ITALIC
  3631. @name.bitmap.font.color = NAME_FONT_COLOR
  3632. @name.z = HUD_Z + NAME_Z
  3633. @name.x = @hud_position[0] + NAME_POSITION[0]
  3634. @name.y = @hud_position[1] + NAME_POSITION[1]
  3635. @name.viewport = viewport
  3636. @name.opacity = 0
  3637. refresh_name
  3638. end
  3639.  
  3640. #--------------------------------------------------------------------------
  3641. # * Refresh Name
  3642. #--------------------------------------------------------------------------
  3643. def refresh_name
  3644. return if @name == nil
  3645. @name.bitmap.clear
  3646. if NAME_FONT_SHADOW
  3647. @name.bitmap.font.color = NAME_FONT_SHADOW_COLOR
  3648. @name.bitmap.draw_text(NAME_FONT_SHADOW_POSITION[0],NAME_FONT_SHADOW_POSITION[1],160,32,@actor.name,NAME_ALIGN_TYPE)
  3649. @name.bitmap.font.color = NAME_FONT_COLOR
  3650. end
  3651. @name.bitmap.draw_text(0,0,160,32,@actor.name,NAME_ALIGN_TYPE)
  3652. end
  3653.  
  3654. #--------------------------------------------------------------------------
  3655. # * Update Name
  3656. #--------------------------------------------------------------------------
  3657. def update_name
  3658. return if @name == nil
  3659. sprite_visible(@name)
  3660. end
  3661.  
  3662. end
  3663.  
  3664. #==============================================================================
  3665. #==============================================================================
  3666. # ** Battle Hud EX
  3667. #==============================================================================
  3668. #==============================================================================
  3669. class Battle_Hud_EX
  3670.  
  3671. #--------------------------------------------------------------------------
  3672. # * Create HP Number
  3673. #--------------------------------------------------------------------------
  3674. def create_hp_number(viewport)
  3675. return if !HP_NUMBER_VISIBLE
  3676. @hp_number = Sprite.new
  3677. @hp_number.bitmap = Bitmap.new(@hp_number_cw * 4,@hp_number_ch)
  3678. @hp_number.z = HUD_Z + HP_NUMBER_Z
  3679. @hp_number.x = @hud_position[0] + HP_NUMBER_POSITION[0]
  3680. @hp_number.y = @hud_position[1] + HP_NUMBER_POSITION[1]
  3681. @hp_number.viewport = viewport
  3682. @hp_number.opacity = 0
  3683. end
  3684.  
  3685. #--------------------------------------------------------------------------
  3686. # * Create HP Number Max
  3687. #--------------------------------------------------------------------------
  3688. def create_hp_number_max(viewport)
  3689. return if !HP_NUMBER_MAX_VISIBLE
  3690. @hp_number2 = Sprite.new
  3691. @hp_number2.bitmap = Bitmap.new(@hp_number2_cw * 4,@hp_number2_ch)
  3692. @hp_number2.z = HUD_Z + HP_NUMBER_Z
  3693. @hp_number2.x = @hud_position[0] + HP_NUMBER_MAX_POSITION[0]
  3694. @hp_number2.y = @hud_position[1] + HP_NUMBER_MAX_POSITION[1]
  3695. @hp_number2.viewport = viewport
  3696. @hp_number2.opacity = 0
  3697. end
  3698.  
  3699. #--------------------------------------------------------------------------
  3700. # * Create HP Meter
  3701. #--------------------------------------------------------------------------
  3702. def create_hp_meter(viewport)
  3703. return if !HP_METER_VISIBLE
  3704. @hp_flow_max = @hp_meter_cw * 2
  3705. @hp_flow = rand(@hp_flow_max)
  3706. @hp_meter = Sprite.new
  3707. @hp_meter.bitmap = Bitmap.new(@hp_meter_cw,@hp_meter_ch)
  3708. @hp_meter.z = HUD_Z + HP_METER_Z
  3709. @hp_meter.x = @hud_position[0] + HP_METER_POSITION[0]
  3710. @hp_meter.y = @hud_position[1] + HP_METER_POSITION[1]
  3711. @hp_meter.angle = HP_METER_ANGLE
  3712. @hp_meter.mirror = HP_METER_MIRROR_EFFECT
  3713. @hp_meter.viewport = viewport
  3714. @hp_meter.opacity = 0
  3715. end
  3716.  
  3717. #--------------------------------------------------------------------------
  3718. # ● Update Flow HP
  3719. #--------------------------------------------------------------------------
  3720. def update_flow_hp
  3721. @hp_meter.bitmap.clear
  3722. @hp_flow = 0 if !HP_METER_GRADIENT_ANIMATION
  3723. meter_width = @hp_meter_cw * @actor.hp / @actor.mhp rescue nil
  3724. meter_width = 0 if meter_width == nil
  3725. execute_hp_damage_flow(meter_width)
  3726. meter_src_rect = Rect.new(@hp_flow, 0,meter_width, @hp_meter_ch)
  3727. @hp_meter.bitmap.blt(0,0, @hp_meter_image, meter_src_rect)
  3728. @hp_flow += 2
  3729. @hp_flow = 0 if @hp_flow >= @hp_flow_max
  3730. end
  3731.  
  3732. #--------------------------------------------------------------------------
  3733. # ● Execute HP Damage Flow
  3734. #--------------------------------------------------------------------------
  3735. def execute_hp_damage_flow(meter_width)
  3736. return if !HP_METER_REDUCTION_ANIMATION
  3737. return if @hp_old_meter == meter_width
  3738. n = (@hp_old_meter - meter_width).abs * 3 / 100
  3739. damage_flow = [[n, 2].min,0.5].max
  3740. @hp_old_meter -= damage_flow
  3741. @hp_old_meter = meter_width if @hp_old_meter <= meter_width
  3742. src_rect_old = Rect.new(0,@hp_meter_ch, @hp_old_meter, @hp_meter_ch)
  3743. @hp_meter.bitmap.blt(0,0, @hp_meter_image, src_rect_old)
  3744. end
  3745.  
  3746. #--------------------------------------------------------------------------
  3747. # * Create HP Icon
  3748. #--------------------------------------------------------------------------
  3749. def create_hp_icon(viewport)
  3750. return if !HP_ICON_VISIBLE
  3751. @hp_icon = Sprite.new
  3752. icon_width = @hp_icon_col_max * (@hp_icon_cw + HP_ICON_SPACE[0].abs)
  3753. icon_height = @hp_icon_row_max * (@hp_icon_ch + HP_ICON_SPACE[1].abs)
  3754. @hp_icon.bitmap = Bitmap.new(icon_width,icon_height)
  3755. @hp_icon.z = HUD_Z + HP_ICON_Z
  3756. @hp_icon.x = @hud_position[0] + HP_ICON_POSITION[0]
  3757. @hp_icon.y = @hud_position[1] + HP_ICON_POSITION[1]
  3758. @hp_icon.viewport = viewport
  3759. @hp_icon.opacity = 0
  3760. end
  3761.  
  3762. #--------------------------------------------------------------------------
  3763. # * Refresh HP Icon
  3764. #--------------------------------------------------------------------------
  3765. def refresh_hp_icon
  3766. @hp_icon_old = @actor.hp
  3767. @hp_icon.bitmap.clear
  3768. max_value = (@actor.mhp / @hp_icon_real_max) * @hp_icon_real_max
  3769. if @actor.hp > max_value
  3770. icon_max = icon_limit(@actor.mhp,@hp_icon_real_max)
  3771. else
  3772. icon_max = @actor.mhp
  3773. end
  3774. for i in 0...icon_max
  3775. break if (i / @hp_icon_col_max) >= @hp_icon_row_max
  3776. 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)
  3777. ry = (i / @hp_icon_col_max) * (@hp_icon_ch + HP_ICON_SPACE[1])
  3778. i_scr = Rect.new(0,0,@hp_icon_cw,@hp_icon_ch)
  3779. @hp_icon.bitmap.blt(rx,ry,@hp_icon_image ,i_scr )
  3780. end
  3781. icon_max = icon_limit(@actor.hp,@hp_icon_real_max)
  3782. rx = 0
  3783. ry = 0
  3784. for i in 0...icon_max
  3785. break if (i / @hp_icon_col_max) >= @hp_icon_row_max
  3786. 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)
  3787. ry = (i / @hp_icon_col_max) * (@hp_icon_ch + HP_ICON_SPACE[1])
  3788. i_scr = Rect.new(@hp_icon_cw,0,@hp_icon_cw,@hp_icon_ch)
  3789. @hp_icon.bitmap.blt(rx,ry,@hp_icon_image ,i_scr )
  3790. end
  3791. refresh_hp_icon_ex(rx,ry)
  3792. end
  3793.  
  3794. #--------------------------------------------------------------------------
  3795. # * Create HP Icon EX
  3796. #--------------------------------------------------------------------------
  3797. def create_hp_icon_ex(viewport)
  3798. return if !HP_ICON_EX_VISIBLE
  3799. @hp_icon3_anime_phase = 0
  3800. @hp_icon3 = Sprite.new
  3801. @hp_icon3.bitmap = Bitmap.new(@hp_icon2_cw,@hp_icon2_ch)
  3802. @hp_icon3.ox = @hp_icon3.bitmap.width / 2
  3803. @hp_icon3.oy = @hp_icon3.bitmap.height / 2
  3804. @hp_icon3.z = HUD_Z + HP_ICON_Z + 2
  3805. @hp_icon3_org = [@hud_position[0] + HP_ICON_POSITION[0] + HP_ICON_EX_POSITION[0] + @hp_icon3.ox,
  3806. @hud_position[1] + HP_ICON_POSITION[1] + HP_ICON_EX_POSITION[1] + @hp_icon3.oy]
  3807. @hp_icon3.x = @hp_icon3_org[0]
  3808. @hp_icon3.y = @hp_icon3_org[1]
  3809. @hp_icon3.viewport = viewport
  3810. @hp_icon3.opacity = 0
  3811. end
  3812.  
  3813. #--------------------------------------------------------------------------
  3814. # * Refresh HP Icon EX
  3815. #--------------------------------------------------------------------------
  3816. def refresh_hp_icon_ex(rx,ry)
  3817. return if @hp_icon3 == nil
  3818. @hp_icon3.bitmap.clear
  3819. return if @actor.hp == 0
  3820. i_scr = Rect.new(0,0,@hp_icon2_cw,@hp_icon2_ch)
  3821. @hp_icon3.bitmap.blt(0,0, @hp_icon2_image ,i_scr )
  3822. @hp_icon3.x = @hp_icon3_org[0] + rx
  3823. @hp_icon3.y = @hp_icon3_org[1] + ry
  3824. end
  3825.  
  3826. #--------------------------------------------------------------------------
  3827. # * Update Icon HP EX Anime
  3828. #--------------------------------------------------------------------------
  3829. def update_icon_hp_ex_anime
  3830. return if !HP_ICON_EX_ZOOM_EFFECT
  3831. if @hp_icon3_anime_phase == 0
  3832. @hp_icon3.zoom_x += 0.01
  3833. if @hp_icon3.zoom_x >= 1.30
  3834. @hp_icon3.zoom_x = 1.30
  3835. @hp_icon3_anime_phase = 1
  3836. end
  3837. else
  3838. @hp_icon3.zoom_x -= 0.01
  3839. if @hp_icon3.zoom_x <= 1.05
  3840. @hp_icon3.zoom_x = 1.05
  3841. @hp_icon3_anime_phase = 0
  3842. end
  3843. end
  3844. @hp_icon3.zoom_y = @hp_icon3.zoom_x
  3845. end
  3846.  
  3847. #--------------------------------------------------------------------------
  3848. # * Create HP Icon Nummber
  3849. #--------------------------------------------------------------------------
  3850. def create_hp_icon_number(viewport)
  3851. return if !HP_ICON_NUMBER_VISIBLE
  3852. @hp_icon_number_old = [-1,-1]
  3853. @hp_icon_number = Sprite.new
  3854. @hp_icon_number.bitmap = Bitmap.new(@hp_icon_number_cw * 4,@hp_icon_number_ch)
  3855. @hp_icon_number.z = HUD_Z + HP_ICON_NUMBER_Z
  3856. @hp_icon_number.x = @hud_position[0] + HP_ICON_NUMBER_POSITION[0]
  3857. @hp_icon_number.y = @hud_position[1] + HP_ICON_NUMBER_POSITION[1]
  3858. @hp_icon_number.viewport = viewport
  3859. @hp_icon_number.opacity = 0
  3860. end
  3861.  
  3862. #--------------------------------------------------------------------------
  3863. # * Refresh Icon Number HP
  3864. #--------------------------------------------------------------------------
  3865. def refresh_icon_number_hp
  3866. @hp_icon_number_old[0] = @actor.hp
  3867. @hp_icon_number_old[1] = @actor.mhp
  3868. @hp_icon_number.bitmap.clear
  3869. value = ((@actor.hp - 1) / @hp_icon_col_max) / @hp_icon_row_max
  3870. value = 0 if value < 0
  3871. number_value = value.truncate.abs.to_s.split(//)
  3872. for r in 0..number_value.size - 1
  3873. number_value_abs = number_value[r].to_i
  3874. nsrc_rect = Rect.new(@hp_icon_number_cw * number_value_abs, 0, @hp_icon_number_cw, @hp_icon_number_ch)
  3875. @hp_icon_number.bitmap.blt(@hp_icon_number_cw * r, 0, @hp_icon_number_image, nsrc_rect)
  3876. end
  3877. cx = (number_value.size * @hp_icon_number_cw)
  3878. case HP_ICON_NUMBER_ALIGN_TYPE
  3879. when 0; @hp_icon_number.x = @hud_position[0] + HP_ICON_NUMBER_POSITION[0]
  3880. when 1; @hp_icon_number.x = @hud_position[0] + HP_ICON_NUMBER_POSITION[0] - (cx / 2)
  3881. when 2; @hp_icon_number.x = @hud_position[0] + HP_ICON_NUMBER_POSITION[0] - cx
  3882. end
  3883. end
  3884.  
  3885. #--------------------------------------------------------------------------
  3886. # * Can Refresh Icon Number HP
  3887. #--------------------------------------------------------------------------
  3888. def can_refresh_icon_number_hp?
  3889. return true if @hp_icon_number_old[0] != @actor.hp
  3890. return true if @hp_icon_number_old[1] != @actor.mhp
  3891. return false
  3892. end
  3893.  
  3894. #--------------------------------------------------------------------------
  3895. # * Update HP
  3896. #--------------------------------------------------------------------------
  3897. def update_hp
  3898. if @hp_number != nil
  3899. if HP_NUMBER_ANIMATION
  3900. update_number(0,@hp_number_old)
  3901. else
  3902. update_number_fix(0) if @hp_number_old != @actor.hp
  3903. end
  3904. sprite_visible(@hp_number)
  3905. refresh_number(0,@hp_number_old,@hp_number,@hp_number_image,@hp_number_cw,@hp_number_ch,@hp_wave_number) if @hp_number_refresh
  3906. end
  3907. if @hp_number2 != nil
  3908. if HP_NUMBER_ANIMATION
  3909. update_number(3,@hp_number2_old)
  3910. else
  3911. update_number_fix(3) if @hp_number2_old != @actor.mhp
  3912. end
  3913. refresh_number(3,@hp_number2_old,@hp_number2,@hp_number2_image,@hp_number2_cw,@hp_number2_ch,@hp_wave_number) if @hp_number2_refresh
  3914. sprite_visible(@hp_number2)
  3915. end
  3916. if @hp_meter != nil
  3917. sprite_visible(@hp_meter)
  3918. update_flow_hp
  3919. end
  3920. if @hp_icon != nil
  3921. sprite_visible(@hp_icon)
  3922. refresh_hp_icon if @hp_icon_old != @actor.hp
  3923. end
  3924. if @hp_icon3 != nil
  3925. sprite_visible(@hp_icon3)
  3926. update_icon_hp_ex_anime
  3927. end
  3928. if @hp_icon_number != nil
  3929. sprite_visible(@hp_icon_number)
  3930. refresh_icon_number_hp if can_refresh_icon_number_hp?
  3931. end
  3932. end
  3933.  
  3934. end
  3935.  
  3936. #==============================================================================
  3937. #==============================================================================
  3938. # ** Battle Hud EX
  3939. #==============================================================================
  3940. #==============================================================================
  3941. class Battle_Hud_EX
  3942.  
  3943. #--------------------------------------------------------------------------
  3944. # * Create MP Number
  3945. #--------------------------------------------------------------------------
  3946. def create_mp_number(viewport)
  3947. return if !MP_NUMBER_VISIBLE
  3948. @mp_number = Sprite.new
  3949. @mp_number.bitmap = Bitmap.new(@mp_number_cw * 4, @mp_number_ch)
  3950. @mp_number.z = HUD_Z + MP_NUMBER_Z
  3951. @mp_number.x = @hud_position[0] + MP_NUMBER_POSITION[0]
  3952. @mp_number.y = @hud_position[1] + MP_NUMBER_POSITION[1]
  3953. @mp_number.viewport = viewport
  3954. @mp_number.opacity = 0
  3955. end
  3956.  
  3957. #--------------------------------------------------------------------------
  3958. # * Create MP Number Max
  3959. #--------------------------------------------------------------------------
  3960. def create_mp_number_max(viewport)
  3961. return if !MP_NUMBER_MAX_VISIBLE
  3962. @mp_number2 = Sprite.new
  3963. @mp_number2.bitmap = Bitmap.new(@mp_number2_cw * 4, @mp_number2_ch)
  3964. @mp_number2.z = HUD_Z + MP_NUMBER_Z
  3965. @mp_number2.x = @hud_position[0] + MP_NUMBER_MAX_POSITION[0]
  3966. @mp_number2.y = @hud_position[1] + MP_NUMBER_MAX_POSITION[1]
  3967. @mp_number2.viewport = viewport
  3968. @mp_number2.opacity = 0
  3969. end
  3970.  
  3971. #--------------------------------------------------------------------------
  3972. # * Create MP Meter
  3973. #--------------------------------------------------------------------------
  3974. def create_mp_meter(viewport)
  3975. return if !MP_METER_VISIBLE
  3976. @mp_flow_max = @mp_meter_cw * 2
  3977. @mp_flow = rand(@mp_flow_max)
  3978. @mp_meter = Sprite.new
  3979. @mp_meter.bitmap = Bitmap.new(@mp_meter_cw,@mp_meter_ch)
  3980. @mp_meter.z = HUD_Z + MP_METER_Z
  3981. @mp_meter.x = @hud_position[0] + MP_METER_POSITION[0]
  3982. @mp_meter.y = @hud_position[1] + MP_METER_POSITION[1]
  3983. @mp_meter.angle = MP_METER_ANGLE
  3984. @mp_meter.mirror = MP_METER_MIRROR_EFFECT
  3985. @mp_meter.viewport = viewport
  3986. @mp_meter.opacity = 0
  3987. end
  3988.  
  3989. #--------------------------------------------------------------------------
  3990. # ● Update Flow MP
  3991. #--------------------------------------------------------------------------
  3992. def update_flow_mp
  3993. @mp_meter.bitmap.clear
  3994. @mp_flow = 0 if !MP_METER_GRADIENT_ANIMATION
  3995. meter_width = @mp_meter_cw * @actor.mp / @actor.mmp rescue nil
  3996. meter_width = 0 if meter_width == nil
  3997. execute_mp_damage_flow(meter_width)
  3998. meter_src_rect = Rect.new(@mp_flow, 0,meter_width, @mp_meter_ch)
  3999. @mp_meter.bitmap.blt(0,0, @mp_meter_image, meter_src_rect)
  4000. @mp_flow += 2
  4001. @mp_flow = 0 if @mp_flow >= @mp_flow_max
  4002. end
  4003.  
  4004. #--------------------------------------------------------------------------
  4005. # ● Execute MP Damage Flow
  4006. #--------------------------------------------------------------------------
  4007. def execute_mp_damage_flow(meter_width)
  4008. return if !MP_METER_REDUCTION_ANIMATION
  4009. return if @mp_old_meter == meter_width
  4010. n = (@mp_old_meter - meter_width).abs * 3 / 100
  4011. damage_flow = [[n, 2].min,0.5].max
  4012. @mp_old_meter -= damage_flow
  4013. @mp_old_meter = meter_width if @mp_old_meter <= meter_width
  4014. src_rect_old = Rect.new(0,@mp_meter_ch, @mp_old_meter, @mp_meter_ch)
  4015. @mp_meter.bitmap.blt(0,0, @mp_meter_image, src_rect_old)
  4016. end
  4017.  
  4018. #--------------------------------------------------------------------------
  4019. # * Create MP Icon
  4020. #--------------------------------------------------------------------------
  4021. def create_mp_icon(viewport)
  4022. return if !MP_ICON_VISIBLE
  4023. @mp_icon = Sprite.new
  4024. icon_width = @mp_icon_col_max * (@mp_icon_cw + MP_ICON_SPACE[0].abs)
  4025. icon_height = @mp_icon_row_max * (@mp_icon_ch + MP_ICON_SPACE[1].abs)
  4026. @mp_icon.bitmap = Bitmap.new(icon_width,icon_height)
  4027. @mp_icon.z = HUD_Z + MP_ICON_Z
  4028. @mp_icon.x = @hud_position[0] + MP_ICON_POSITION[0]
  4029. @mp_icon.y = @hud_position[1] + MP_ICON_POSITION[1]
  4030. @mp_icon.viewport = viewport
  4031. @mp_icon.opacity = 0
  4032. end
  4033.  
  4034. #--------------------------------------------------------------------------
  4035. # * Refresh MP Icon
  4036. #--------------------------------------------------------------------------
  4037. def refresh_mp_icon
  4038. @mp_icon_old = @actor.mp
  4039. @mp_icon.bitmap.clear
  4040. max_value = (@actor.mmp / @mp_icon_real_max) * @mp_icon_real_max
  4041. if @actor.mp > max_value
  4042. icon_max = icon_limit(@actor.mmp,@mp_icon_real_max)
  4043. else
  4044. icon_max = @actor.mmp
  4045. end
  4046. for i in 0...icon_max
  4047. break if (i / @mp_icon_col_max) >= @mp_icon_row_max
  4048. 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)
  4049. ry = (i / @mp_icon_col_max) * (@mp_icon_ch + MP_ICON_SPACE[1])
  4050. i_scr = Rect.new(0,0,@mp_icon_cw,@mp_icon_ch)
  4051. @mp_icon.bitmap.blt(rx,ry,@mp_icon_image ,i_scr )
  4052. end
  4053. icon_max = icon_limit(@actor.mp,@mp_icon_real_max)
  4054. rx = 0
  4055. ry = 0
  4056. for i in 0...icon_max
  4057. break if (i / @mp_icon_col_max) >= @mp_icon_row_max
  4058. 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)
  4059. ry = (i / @mp_icon_col_max) * (@mp_icon_ch + MP_ICON_SPACE[1])
  4060. i_scr = Rect.new(@mp_icon_cw,0,@mp_icon_cw,@mp_icon_ch)
  4061. @mp_icon.bitmap.blt(rx,ry,@mp_icon_image ,i_scr )
  4062. end
  4063. refresh_mp_icon_ex(rx,ry)
  4064. end
  4065.  
  4066. #--------------------------------------------------------------------------
  4067. # * Create MP Icon EX
  4068. #--------------------------------------------------------------------------
  4069. def create_mp_icon_ex(viewport)
  4070. return if !MP_ICON_EX_VISIBLE
  4071. @mp_icon3_anime_phase = 0
  4072. @mp_icon3 = Sprite.new
  4073. @mp_icon3.bitmap = Bitmap.new(@mp_icon2_cw,@mp_icon2_ch)
  4074. @mp_icon3.ox = @mp_icon3.bitmap.width / 2
  4075. @mp_icon3.oy = @mp_icon3.bitmap.height / 2
  4076. @mp_icon3.z = HUD_Z + MP_ICON_Z + 2
  4077. @mp_icon3_org = [@hud_position[0] + MP_ICON_POSITION[0] + MP_ICON_EX_POSITION[0] + @mp_icon3.ox,
  4078. @hud_position[1] + MP_ICON_POSITION[1] + MP_ICON_EX_POSITION[1] + @mp_icon3.oy]
  4079. @mp_icon3.x = @mp_icon3_org[0]
  4080. @mp_icon3.y = @mp_icon3_org[1]
  4081. @mp_icon3.viewport = viewport
  4082. @mp_icon3.opacity = 0
  4083. end
  4084.  
  4085. #--------------------------------------------------------------------------
  4086. # * Refresh MP Icon EX
  4087. #--------------------------------------------------------------------------
  4088. def refresh_mp_icon_ex(rx,ry)
  4089. return if @mp_icon3 == nil
  4090. @mp_icon3.bitmap.clear
  4091. return if @actor.mp == 0
  4092. i_scr = Rect.new(0,0,@mp_icon2_cw,@mp_icon2_ch)
  4093. @mp_icon3.bitmap.blt(0,0, @mp_icon2_image ,i_scr )
  4094. @mp_icon3.x = @mp_icon3_org[0] + rx
  4095. @mp_icon3.y = @mp_icon3_org[1] + ry
  4096. end
  4097.  
  4098. #--------------------------------------------------------------------------
  4099. # * Update Icon MP EX Anime
  4100. #--------------------------------------------------------------------------
  4101. def update_icon_mp_ex_anime
  4102. return if !MP_ICON_EX_ZOOM_EFFECT
  4103. if @mp_icon3_anime_phase == 0
  4104. @mp_icon3.zoom_x += 0.01
  4105. if @mp_icon3.zoom_x >= 1.30
  4106. @mp_icon3.zoom_x = 1.30
  4107. @mp_icon3_anime_phase = 1
  4108. end
  4109. else
  4110. @mp_icon3.zoom_x -= 0.01
  4111. if @mp_icon3.zoom_x <= 1.05
  4112. @mp_icon3.zoom_x = 1.05
  4113. @mp_icon3_anime_phase = 0
  4114. end
  4115. end
  4116. @mp_icon3.zoom_y = @mp_icon3.zoom_x
  4117. end
  4118.  
  4119. #--------------------------------------------------------------------------
  4120. # * Create MP Icon Number
  4121. #--------------------------------------------------------------------------
  4122. def create_mp_icon_number(viewport)
  4123. return if !MP_ICON_NUMBER_VISIBLE
  4124. @mp_icon_number_old = [-1,-1]
  4125. @mp_icon_number = Sprite.new
  4126. @mp_icon_number.bitmap = Bitmap.new(@mp_icon_number_cw * 4,@mp_icon_number_ch)
  4127. @mp_icon_number.z = HUD_Z + MP_ICON_NUMBER_Z
  4128. @mp_icon_number.x = @hud_position[0] + MP_ICON_NUMBER_POSITION[0]
  4129. @mp_icon_number.y = @hud_position[1] + MP_ICON_NUMBER_POSITION[1]
  4130. @mp_icon_number.viewport = viewport
  4131. @mp_icon_number.opacity = 0
  4132. end
  4133.  
  4134. #--------------------------------------------------------------------------
  4135. # * Refresh Icon Number MP
  4136. #--------------------------------------------------------------------------
  4137. def refresh_icon_number_mp
  4138. @mp_icon_number_old[0] = @actor.mp
  4139. @mp_icon_number_old[1] = @actor.mmp
  4140. @mp_icon_number.bitmap.clear
  4141. value = ((@actor.mp - 1) / @mp_icon_col_max) / @mp_icon_row_max
  4142. value = 0 if value < 0
  4143. number_value = value.truncate.abs.to_s.split(//)
  4144. for r in 0..number_value.size - 1
  4145. number_value_abs = number_value[r].to_i
  4146. nsrc_rect = Rect.new(@mp_icon_number_cw * number_value_abs, 0, @mp_icon_number_cw, @mp_icon_number_ch)
  4147. @mp_icon_number.bitmap.blt(@mp_icon_number_cw * r, 0, @mp_icon_number_image, nsrc_rect)
  4148. end
  4149. cx = (number_value.size * @mp_icon_number_cw)
  4150. case MP_ICON_NUMBER_ALIGN_TYPE
  4151. when 0; @mp_icon_number.x = @hud_position[0] + MP_ICON_NUMBER_POSITION[0]
  4152. when 1; @mp_icon_number.x = @hud_position[0] + MP_ICON_NUMBER_POSITION[0] - (cx / 2)
  4153. when 2; @mp_icon_number.x = @hud_position[0] + MP_ICON_NUMBER_POSITION[0] - cx
  4154. end
  4155. end
  4156.  
  4157. #--------------------------------------------------------------------------
  4158. # * Can Refresh Icon Number MP
  4159. #--------------------------------------------------------------------------
  4160. def can_refresh_icon_number_mp?
  4161. return true if @mp_icon_number_old[0] != @actor.mp
  4162. return true if @mp_icon_number_old[1] != @actor.mmp
  4163. return false
  4164. end
  4165.  
  4166. #--------------------------------------------------------------------------
  4167. # * Update MP
  4168. #--------------------------------------------------------------------------
  4169. def update_mp
  4170. if @mp_number != nil
  4171. sprite_visible(@mp_number)
  4172. if MP_NUMBER_ANIMATION
  4173. update_number(1,@mp_number_old)
  4174. else
  4175. update_number_fix(1) if @mp_number_old != @actor.mp
  4176. end
  4177. refresh_number(1,@mp_number_old,@mp_number,@mp_number_image,@mp_number_cw,@mp_number_ch,@mp_wave_number) if @mp_number_refresh
  4178. end
  4179. if @mp_number2 != nil
  4180. sprite_visible(@mp_number2)
  4181. if MP_NUMBER_ANIMATION
  4182. update_number(4,@mp_number2_old)
  4183. else
  4184. update_number_fix(4) if @mp_number2_old != @actor.mmp
  4185. end
  4186. refresh_number(4,@mp_number2_old,@mp_number2,@mp_number2_image,@mp_number2_cw,@mp_number2_ch,@mp_wave_number) if @mp_number2_refresh
  4187. end
  4188. if @mp_meter != nil
  4189. sprite_visible(@mp_meter)
  4190. update_flow_mp
  4191. end
  4192. if @mp_icon != nil
  4193. sprite_visible(@mp_icon)
  4194. refresh_mp_icon if @mp_icon_old != @actor.mp
  4195. end
  4196. if @mp_icon3 != nil
  4197. sprite_visible(@mp_icon3)
  4198. update_icon_mp_ex_anime
  4199. end
  4200. if @mp_icon_number != nil
  4201. sprite_visible(@mp_icon_number)
  4202. refresh_icon_number_mp if can_refresh_icon_number_mp?
  4203. end
  4204. end
  4205.  
  4206. end
  4207.  
  4208. #==============================================================================
  4209. #==============================================================================
  4210. # ** Battle Hud EX
  4211. #==============================================================================
  4212. #==============================================================================
  4213. class Battle_Hud_EX
  4214.  
  4215. #--------------------------------------------------------------------------
  4216. # * Create TP Number
  4217. #--------------------------------------------------------------------------
  4218. def create_tp_number(viewport)
  4219. return if !TP_NUMBER_VISIBLE
  4220. @tp_number = Sprite.new
  4221. @tp_number.bitmap = Bitmap.new(@tp_number_cw * 3, @tp_number_ch)
  4222. @tp_number.z = HUD_Z + TP_NUMBER_Z
  4223. @tp_number.x = @hud_position[0] + TP_NUMBER_POSITION[0]
  4224. @tp_number.y = @hud_position[1] + TP_NUMBER_POSITION[1]
  4225. @tp_number.viewport = viewport
  4226. @tp_number.opacity = 0
  4227. end
  4228.  
  4229. #--------------------------------------------------------------------------
  4230. # * Create TP Number MAX
  4231. #--------------------------------------------------------------------------
  4232. def create_tp_number_max(viewport)
  4233. return if !TP_NUMBER_MAX_VISIBLE
  4234. @tp_number2 = Sprite.new
  4235. @tp_number2.bitmap = Bitmap.new(@tp_number2_cw * 3, @tp_number2_ch)
  4236. @tp_number2.z = HUD_Z + TP_NUMBER_Z
  4237. @tp_number2.x = @hud_position[0] + TP_NUMBER_MAX_POSITION[0]
  4238. @tp_number2.y = @hud_position[1] + TP_NUMBER_MAX_POSITION[1]
  4239. @tp_number2.viewport = viewport
  4240. @tp_number2.opacity = 0
  4241. end
  4242.  
  4243. #--------------------------------------------------------------------------
  4244. # * Create TP Meter
  4245. #--------------------------------------------------------------------------
  4246. def create_tp_meter(viewport)
  4247. return if !TP_METER_VISIBLE
  4248. @tp_flow_max = @tp_meter_cw * 2
  4249. @tp_flow = rand(@tp_flow_max)
  4250. @tp_meter = Sprite.new
  4251. @tp_meter.bitmap = Bitmap.new(@tp_meter_cw,@tp_meter_ch)
  4252. @tp_meter.z = HUD_Z + TP_METER_Z
  4253. @tp_meter.x = @hud_position[0] + TP_METER_POSITION[0]
  4254. @tp_meter.y = @hud_position[1] + TP_METER_POSITION[1]
  4255. @tp_meter.angle = TP_METER_ANGLE
  4256. @tp_meter.mirror = TP_METER_MIRROR_EFFECT
  4257. @tp_meter.viewport = viewport
  4258. @tp_meter.opacity = 0
  4259. end
  4260.  
  4261. #--------------------------------------------------------------------------
  4262. # ● Update Flow TP
  4263. #--------------------------------------------------------------------------
  4264. def update_flow_tp
  4265. @tp_meter.bitmap.clear
  4266. @tp_flow = 0 if !TP_METER_GRADIENT_ANIMATION
  4267. meter_width = @tp_meter_cw * @actor.tp / @actor.max_tp rescue nil
  4268. meter_width = 0 if meter_width == nil
  4269. execute_tp_damage_flow(meter_width)
  4270. meter_src_rect = Rect.new(@tp_flow, 0,meter_width, @tp_meter_ch)
  4271. @tp_meter.bitmap.blt(0,0, @tp_meter_image, meter_src_rect)
  4272. @tp_flow += 2
  4273. @tp_flow = 0 if @tp_flow >= @tp_flow_max
  4274. end
  4275.  
  4276. #--------------------------------------------------------------------------
  4277. # ● Execute TP Damage Flow
  4278. #--------------------------------------------------------------------------
  4279. def execute_tp_damage_flow(meter_width)
  4280. return if !TP_METER_REDUCTION_ANIMATION
  4281. return if @tp_old_meter == meter_width
  4282. n = (@tp_old_meter - meter_width).abs * 3 / 100
  4283. damage_flow = [[n, 2].min,0.5].max
  4284. @tp_old_meter -= damage_flow
  4285. @tp_old_meter = meter_width if @tp_old_meter <= meter_width
  4286. src_rect_old = Rect.new(0,@tp_meter_ch, @tp_old_meter, @tp_meter_ch)
  4287. @tp_meter.bitmap.blt(0,0, @tp_meter_image, src_rect_old)
  4288. end
  4289.  
  4290. #--------------------------------------------------------------------------
  4291. # * Create TP Icon
  4292. #--------------------------------------------------------------------------
  4293. def create_tp_icon(viewport)
  4294. return if !TP_ICON_VISIBLE
  4295. @tp_icon = Sprite.new
  4296. icon_width = @tp_icon_col_max * (@tp_icon_cw + TP_ICON_SPACE[0].abs)
  4297. icon_height = @tp_icon_row_max * (@tp_icon_ch + TP_ICON_SPACE[1].abs)
  4298. @tp_icon.bitmap = Bitmap.new(icon_width,icon_height)
  4299. @tp_icon.z = HUD_Z + TP_ICON_Z
  4300. @tp_icon.x = @hud_position[0] + TP_ICON_POSITION[0]
  4301. @tp_icon.y = @hud_position[1] + TP_ICON_POSITION[1]
  4302. @tp_icon.viewport = viewport
  4303. @tp_icon.opacity = 0
  4304. end
  4305.  
  4306. #--------------------------------------------------------------------------
  4307. # * Refresh TP Icon
  4308. #--------------------------------------------------------------------------
  4309. def refresh_tp_icon
  4310. @tp_icon_old = @actor.tp
  4311. @tp_icon.bitmap.clear
  4312. max_value = (@actor.max_tp / @tp_icon_real_max) * @tp_icon_real_max
  4313. if @actor.mp > max_value
  4314. icon_max = icon_limit(@actor.max_tp,@tp_icon_real_max)
  4315. else
  4316. icon_max = @actor.max_tp
  4317. end
  4318. for i in 0...icon_max
  4319. break if (i / @tp_icon_col_max) >= @tp_icon_row_max
  4320. 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)
  4321. ry = (i / @tp_icon_col_max) * (@tp_icon_ch + TP_ICON_SPACE[1])
  4322. i_scr = Rect.new(0,0,@tp_icon_cw,@tp_icon_ch)
  4323. @tp_icon.bitmap.blt(rx,ry,@tp_icon_image ,i_scr )
  4324. end
  4325. icon_max = icon_limit(@actor.tp,@tp_icon_real_max)
  4326. rx = 0
  4327. ry = 0
  4328. for i in 0...icon_max
  4329. break if (i / @tp_icon_col_max) >= @tp_icon_row_max
  4330. 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)
  4331. ry = (i / @tp_icon_col_max) * (@tp_icon_ch + TP_ICON_SPACE[1])
  4332. i_scr = Rect.new(@mp_icon_cw,0,@tp_icon_cw,@tp_icon_ch)
  4333. @tp_icon.bitmap.blt(rx,ry,@tp_icon_image ,i_scr )
  4334. end
  4335. refresh_tp_icon_ex(rx,ry)
  4336. end
  4337.  
  4338. #--------------------------------------------------------------------------
  4339. # * Create TP Icon EX
  4340. #--------------------------------------------------------------------------
  4341. def create_tp_icon_ex(viewport)
  4342. return if !TP_ICON_EX_VISIBLE
  4343. @tp_icon3_anime_phase = 0
  4344. @tp_icon3 = Sprite.new
  4345. @tp_icon3.bitmap = Bitmap.new(@tp_icon2_cw,@tp_icon2_ch)
  4346. @tp_icon3.ox = @tp_icon3.bitmap.width / 2
  4347. @tp_icon3.oy = @tp_icon3.bitmap.height / 2
  4348. @tp_icon3.z = HUD_Z + TP_ICON_Z + 2
  4349. @tp_icon3_org = [@hud_position[0] + TP_ICON_POSITION[0] + TP_ICON_EX_POSITION[0] + @tp_icon3.ox,
  4350. @hud_position[1] + TP_ICON_POSITION[1] + TP_ICON_EX_POSITION[1] + @tp_icon3.oy]
  4351. @tp_icon3.x = @tp_icon3_org[0]
  4352. @tp_icon3.y = @tp_icon3_org[1]
  4353. @tp_icon3.viewport = viewport
  4354. @tp_icon3.opacity = 0
  4355. end
  4356.  
  4357. #--------------------------------------------------------------------------
  4358. # * Refresh TP Icon EX
  4359. #--------------------------------------------------------------------------
  4360. def refresh_tp_icon_ex(rx,ry)
  4361. return if @tp_icon3 == nil
  4362. @tp_icon3.bitmap.clear
  4363. return if @actor.tp == 0
  4364. i_scr = Rect.new(0,0,@tp_icon2_cw,@tp_icon2_ch)
  4365. @tp_icon3.bitmap.blt(0,0, @tp_icon2_image ,i_scr )
  4366. @tp_icon3.x = @tp_icon3_org[0] + rx
  4367. @tp_icon3.y = @tp_icon3_org[1] + ry
  4368. end
  4369.  
  4370. #--------------------------------------------------------------------------
  4371. # * Update Icon TP EX Anime
  4372. #--------------------------------------------------------------------------
  4373. def update_icon_tp_ex_anime
  4374. return if !MP_ICON_EX_ZOOM_EFFECT
  4375. if @tp_icon3_anime_phase == 0
  4376. @tp_icon3.zoom_x += 0.01
  4377. if @tp_icon3.zoom_x >= 1.30
  4378. @tp_icon3.zoom_x = 1.30
  4379. @tp_icon3_anime_phase = 1
  4380. end
  4381. else
  4382. @tp_icon3.zoom_x -= 0.01
  4383. if @tp_icon3.zoom_x <= 1.05
  4384. @tp_icon3.zoom_x = 1.05
  4385. @tp_icon3_anime_phase = 0
  4386. end
  4387. end
  4388. @tp_icon3.zoom_y = @tp_icon3.zoom_x
  4389. end
  4390.  
  4391. #--------------------------------------------------------------------------
  4392. # * Create HP Icon Number
  4393. #--------------------------------------------------------------------------
  4394. def create_tp_icon_number(viewport)
  4395. return if !TP_ICON_NUMBER_VISIBLE
  4396. @tp_icon_number_old = [-1,-1]
  4397. @tp_icon_number = Sprite.new
  4398. @tp_icon_number.bitmap = Bitmap.new(@tp_icon_number_cw * 3,@tp_icon_number_ch)
  4399. @tp_icon_number.z = HUD_Z + TP_ICON_NUMBER_Z
  4400. @tp_icon_number.x = @hud_position[0] + TP_ICON_NUMBER_POSITION[0]
  4401. @tp_icon_number.y = @hud_position[1] + TP_ICON_NUMBER_POSITION[1]
  4402. @tp_icon_number.viewport = viewport
  4403. @tp_icon_number.opacity = 0
  4404. end
  4405.  
  4406. #--------------------------------------------------------------------------
  4407. # * Refresh Icon Number TP
  4408. #--------------------------------------------------------------------------
  4409. def refresh_icon_number_tp
  4410. @tp_icon_number_old[0] = @actor.tp
  4411. @tp_icon_number_old[1] = @actor.max_tp
  4412. @tp_icon_number.bitmap.clear
  4413. value = ((@actor.tp - 1) / @tp_icon_col_max) / @tp_icon_row_max
  4414. value = 0 if value < 0
  4415. number_value = value.truncate.abs.to_s.split(//)
  4416. for r in 0..number_value.size - 1
  4417. number_value_abs = number_value[r].to_i
  4418. nsrc_rect = Rect.new(@tp_icon_number_cw * number_value_abs, 0, @tp_icon_number_cw, @tp_icon_number_ch)
  4419. @tp_icon_number.bitmap.blt(@tp_icon_number_cw * r, 0, @tp_icon_number_image, nsrc_rect)
  4420. end
  4421. cx = (number_value.size * @tp_icon_number_cw)
  4422. case TP_ICON_NUMBER_ALIGN_TYPE
  4423. when 0; @tp_icon_number.x = @hud_position[0] + TP_ICON_NUMBER_POSITION[0]
  4424. when 1; @tp_icon_number.x = @hud_position[0] + TP_ICON_NUMBER_POSITION[0] - (cx / 2)
  4425. when 2; @tp_icon_number.x = @hud_position[0] + TP_ICON_NUMBER_POSITION[0] - cx
  4426. end
  4427. end
  4428.  
  4429. #--------------------------------------------------------------------------
  4430. # * Can Refresh Icon Number TP
  4431. #--------------------------------------------------------------------------
  4432. def can_refresh_icon_number_tp?
  4433. return true if @tp_icon_number_old[0] != @actor.tp
  4434. return true if @tp_icon_number_old[1] != @actor.max_tp
  4435. return false
  4436. end
  4437.  
  4438. #--------------------------------------------------------------------------
  4439. # * Update TP
  4440. #--------------------------------------------------------------------------
  4441. def update_tp
  4442. if @tp_number != nil
  4443. sprite_visible(@tp_number)
  4444. if MP_NUMBER_ANIMATION
  4445. update_number(2,@tp_number_old)
  4446. else
  4447. update_number_fix(2) if @tp_number_old != @actor.tp
  4448. end
  4449. refresh_number(2,@tp_number_old,@tp_number,@tp_number_image,@tp_number_cw,@tp_number_ch,@tp_wave_number) if @tp_number_refresh
  4450. end
  4451. if @tp_number2 != nil
  4452. sprite_visible(@tp_number2)
  4453. if MP_NUMBER_ANIMATION
  4454. update_number(5,@tp_number2_old)
  4455. else
  4456. update_number_fix(5) if @tp_number2_old != @actor.max_tp
  4457. end
  4458. refresh_number(5,@tp_number2_old,@tp_number2,@tp_number2_image,@tp_number2_cw,@tp_number2_ch,@tp_wave_number) if @tp_number2_refresh
  4459. end
  4460. if @tp_meter != nil
  4461. sprite_visible(@tp_meter)
  4462. update_flow_tp
  4463. end
  4464. if @tp_icon != nil
  4465. sprite_visible(@tp_icon)
  4466. refresh_tp_icon if @tp_icon_old != @actor.tp
  4467. end
  4468. if @tp_icon3 != nil
  4469. sprite_visible(@tp_icon3)
  4470. update_icon_tp_ex_anime
  4471. end
  4472. if @tp_icon_number != nil
  4473. sprite_visible(@tp_icon_number)
  4474. refresh_icon_number_tp if can_refresh_icon_number_tp?
  4475. end
  4476. end
  4477.  
  4478. end
  4479.  
  4480. #==============================================================================
  4481. #==============================================================================
  4482. # ** Battle Hud EX
  4483. #==============================================================================
  4484. #==============================================================================
  4485. class Battle_Hud_EX
  4486.  
  4487. #--------------------------------------------------------------------------
  4488. # * Create AT Number
  4489. #--------------------------------------------------------------------------
  4490. def create_at_number(viewport)
  4491. return if !AT_NUMBER_VISIBLE
  4492. @at_number = Sprite.new
  4493. @at_number.bitmap = Bitmap.new(@at_number_cw * 4,@at_number_ch)
  4494. @at_number.z = HUD_Z + AT_NUMBER_Z
  4495. @at_number.x = @hud_position[0] + AT_NUMBER_POSITION[0]
  4496. @at_number.y = @hud_position[1] + AT_NUMBER_POSITION[1]
  4497. @at_number.viewport = viewport
  4498. @at_number.opacity = 0
  4499. end
  4500.  
  4501. #--------------------------------------------------------------------------
  4502. # * Create AT Number Max
  4503. #--------------------------------------------------------------------------
  4504. def create_at_number_max(viewport)
  4505. return if !AT_NUMBER_MAX_VISIBLE
  4506. @at_number2 = Sprite.new
  4507. @at_number2.bitmap = Bitmap.new(@at_number2_cw * 4,@at_number2_ch)
  4508. @at_number2.z = HUD_Z + AT_NUMBER_Z
  4509. @at_number2.x = @hud_position[0] + AT_NUMBER_MAX_POSITION[0]
  4510. @at_number2.y = @hud_position[1] + AT_NUMBER_MAX_POSITION[1]
  4511. @at_number2.viewport = viewport
  4512. @at_number2.opacity = 0
  4513. end
  4514.  
  4515. #--------------------------------------------------------------------------
  4516. # * Create AT Meter
  4517. #--------------------------------------------------------------------------
  4518. def create_at_meter(viewport)
  4519. return if !AT_METER_VISIBLE
  4520. @at_flow_max = @at_meter_cw * 2
  4521. @at_flow = rand(@at_flow_max)
  4522. @at_meter = Sprite.new
  4523. @at_meter.bitmap = Bitmap.new(@at_meter_cw,@at_meter_ch)
  4524. @at_meter.z = HUD_Z + AT_METER_Z
  4525. @at_meter.x = @hud_position[0] + AT_METER_POSITION[0]
  4526. @at_meter.y = @hud_position[1] + AT_METER_POSITION[1]
  4527. @at_meter.angle = AT_METER_ANGLE
  4528. @at_meter.mirror = AT_METER_MIRROR_EFFECT
  4529. @at_meter.viewport = viewport
  4530. @at_meter.opacity = 0
  4531. end
  4532.  
  4533. #--------------------------------------------------------------------------
  4534. # ● Update Flow AT
  4535. #--------------------------------------------------------------------------
  4536. def update_flow_at
  4537. @at_meter.bitmap.clear
  4538. @at_flow = 0 if !AT_METER_GRADIENT_ANIMATION
  4539. if actor_cast?
  4540. meter_width = @at_meter_cw * actor_cast / actor_max_cast rescue nil
  4541. meter_width = 0 if meter_width == nil
  4542. ch = @at_meter_ch * 2
  4543. else
  4544. meter_width = @at_meter_cw * actor_at / actor_max_at rescue nil
  4545. meter_width = 0 if meter_width == nil
  4546. ch = actor_at >= actor_max_at ? @at_meter_ch : 0
  4547. end
  4548. meter_src_rect = Rect.new(@at_flow, ch,meter_width, @at_meter_ch)
  4549. @at_meter.bitmap.blt(0,0, @at_meter_image, meter_src_rect)
  4550. @at_flow += 2
  4551. @at_flow = 0 if @at_flow >= @at_flow_max
  4552. end
  4553.  
  4554. #--------------------------------------------------------------------------
  4555. # * Update AT
  4556. #--------------------------------------------------------------------------
  4557. def update_at
  4558. if @at_number != nil
  4559. sprite_visible(@at_number)
  4560. if AT_NUMBER_ANIMATION
  4561. update_number(6,@at_number_old)
  4562. else
  4563. update_number_fix(6) if @at_number_old != actor_at
  4564. end
  4565. refresh_number(6,@at_number_old,@at_number,@at_number_image,@at_number_cw,@at_number_ch,@at_wave_number) if @at_number_refresh
  4566. end
  4567. if @at_number2 != nil
  4568. sprite_visible(@at_number2)
  4569. if AT_NUMBER_ANIMATION
  4570. update_number(7,@at_number2_old)
  4571. else
  4572. update_number_fix(7) if @at_number2_old != actor_max_at
  4573. end
  4574. refresh_number(7,@at_number2_old,@at_number2,@at_number2_image,@at_number2_cw,@at_number2_ch,@at_wave_number) if @at_number2_refresh
  4575. end
  4576. if @at_meter != nil
  4577. sprite_visible(@at_meter)
  4578. update_flow_at
  4579. end
  4580. end
  4581.  
  4582. end
  4583.  
  4584. #==============================================================================
  4585. #==============================================================================
  4586. # ** Battle Hud EX
  4587. #==============================================================================
  4588. #==============================================================================
  4589. class Battle_Hud_EX
  4590.  
  4591. #--------------------------------------------------------------------------
  4592. # * Create Level Number
  4593. #--------------------------------------------------------------------------
  4594. def create_level_number(viewport)
  4595. return if !LEVEL_NUMBER_VISIBLE
  4596. @old_level = -1
  4597. @lv_number = Sprite.new
  4598. @lv_number.bitmap = Bitmap.new(@lv_number_cw * 2, @lv_number_ch)
  4599. @lv_number.z = HUD_Z + LEVEL_NUMBER_Z
  4600. @lv_number.x = @hud_position[0] + LEVEL_NUMBER_POSITION[0]
  4601. @lv_number.y = @hud_position[1] + LEVEL_NUMBER_POSITION[1]
  4602. @lv_number.viewport = viewport
  4603. @lv_number.opacity = 0
  4604. end
  4605.  
  4606. #--------------------------------------------------------------------------
  4607. # * Refresh Level Number
  4608. #--------------------------------------------------------------------------
  4609. def refresh_level_number
  4610. @lv_number.bitmap.clear
  4611. @old_level = @actor.level
  4612. number_value = @actor.level.abs.to_s.split(//)
  4613. for r in 0..number_value.size - 1
  4614. number_value_abs = number_value[r].to_i
  4615. nsrc_rect = Rect.new(@lv_number_cw * number_value_abs, 0, @lv_number_cw, @lv_number_ch)
  4616. @lv_number.bitmap.blt(@lv_number_cw * r, 0, @lv_number_image, nsrc_rect)
  4617. end
  4618. cx = (number_value.size * @lv_number_cw)
  4619. case LEVEL_NUMBER_ALIGN_TYPE
  4620. when 0; @lv_number.x = @hud_position[0] + LEVEL_NUMBER_POSITION[0]
  4621. when 1; @lv_number.x = @hud_position[0] + LEVEL_NUMBER_POSITION[0] - (cx / 2)
  4622. when 2; @lv_number.x = @hud_position[0] + LEVEL_NUMBER_POSITION[0] - cx
  4623. end
  4624. end
  4625.  
  4626. #--------------------------------------------------------------------------
  4627. # * Update Level
  4628. #--------------------------------------------------------------------------
  4629. def update_level
  4630. return if @lv_number == nil
  4631. sprite_visible(@lv_number)
  4632. refresh_level_number if @old_level != @actor.level
  4633. end
  4634.  
  4635. end
  4636.  
  4637. #==============================================================================
  4638. #==============================================================================
  4639. # ** Battle Hud EX
  4640. #==============================================================================
  4641. #==============================================================================
  4642. class Battle_Hud_EX
  4643.  
  4644. #--------------------------------------------------------------------------
  4645. # * Create States
  4646. #--------------------------------------------------------------------------
  4647. def create_states(viewport)
  4648. return if !STATES_VISIBLE
  4649. @status_old = nil
  4650. @status_flow = [-24,0]
  4651. @status_size_real = 0
  4652. @status = Sprite.new
  4653. @status.bitmap = Bitmap.new(24,24)
  4654. @status.x = @hud_position[0] + STATES_POSITION[0]
  4655. @status.y = @hud_position[1] + STATES_POSITION[1]
  4656. @status.z = HUD_Z + STATES_Z
  4657. @status.angle = STATE_ANGLE
  4658. @status.viewport = viewport
  4659. @status.opacity = 0
  4660. end
  4661.  
  4662. #--------------------------------------------------------------------------
  4663. # * Refresh States
  4664. #--------------------------------------------------------------------------
  4665. def refresh_states
  4666. check_icon_image
  4667. @status_size_real = set_real_states_size
  4668. @status_old = @actor.states
  4669. @status_flow = [0,0]
  4670. @states_size = @status_size_real > 0 ? (26 * @status_size_real) : 24
  4671. @actor_status.dispose if @actor_status != nil
  4672. @actor_status = Bitmap.new(@states_size,24)
  4673. index = 0
  4674. for i in @actor.states
  4675. next if HIDE_STATES_ID.include?(i.id)
  4676. rect = Rect.new(i.icon_index % 16 * 24, i.icon_index / 16 * 24, 24, 24)
  4677. @actor_status.blt(26 * index , 0, @icon_image, rect)
  4678. index += 1
  4679. end
  4680. end
  4681.  
  4682. #--------------------------------------------------------------------------
  4683. # * Set Real States Size
  4684. #--------------------------------------------------------------------------
  4685. def set_real_states_size
  4686. n = 0
  4687. for i in @actor.states
  4688. next if HIDE_STATES_ID.include?(i.id)
  4689. n += 1
  4690. end
  4691. return n
  4692. end
  4693.  
  4694. #--------------------------------------------------------------------------
  4695. # * Flow_Status
  4696. #--------------------------------------------------------------------------
  4697. def flow_states
  4698. return if @actor_status == nil
  4699. @status.bitmap.clear
  4700. return if @actor.states.size == 0
  4701. st_src_rect = Rect.new(@status_flow[0],0, 24,24)
  4702. @status.bitmap.blt(0,0, @actor_status, st_src_rect)
  4703. if STATES_SCROLLING_ANIMATION
  4704. @status_flow[0] += 1
  4705. @status_flow[0] = -24 if @status_flow[0] >= @states_size + 2
  4706. else
  4707. @status_flow[1] += 1 unless @actor.states.size <= 1
  4708. if @status_flow[1] > 30
  4709. @status_flow[1] = 0
  4710. @status_flow[0] += 26
  4711. @status_flow[0] = 0 if @status_flow[0] >= (@states_size - 0)
  4712. end
  4713. end
  4714. end
  4715.  
  4716. #--------------------------------------------------------------------------
  4717. # * Update States
  4718. #--------------------------------------------------------------------------
  4719. def update_states
  4720. return if @status == nil
  4721. sprite_visible(@status)
  4722. refresh_states if @status_old != @actor.states
  4723. flow_states
  4724. end
  4725.  
  4726. end
  4727.  
  4728. #==============================================================================
  4729. #==============================================================================
  4730. # ** Battle Hud EX
  4731. #==============================================================================
  4732. #==============================================================================
  4733. class Battle_Hud_EX
  4734.  
  4735. #--------------------------------------------------------------------------
  4736. # * Create Face
  4737. #--------------------------------------------------------------------------
  4738. def create_face(viewport)
  4739. return if !FACE_VISIBLE
  4740. @face_old_hp = @actor.hp
  4741. @face_old_mp = @actor.mp
  4742. @face_old_tp = @actor.tp
  4743. @face_name = ""
  4744. @face = Sprite.new
  4745. @face_org = [@hud_position[0] + FACE_POSITION[0], @hud_position[1] + FACE_POSITION[1]]
  4746. @face.x = @face_org[0]
  4747. @face.y = @face_org[1]
  4748. @face.z = HUD_Z + FACE_Z
  4749. @face.viewport = viewport
  4750. @face.opacity = 0
  4751. refresh_face_name
  4752. end
  4753.  
  4754. #--------------------------------------------------------------------------
  4755. # * Refresh Face Name
  4756. #--------------------------------------------------------------------------
  4757. def refresh_face_name
  4758. @face_image.dispose if @face_image != nil
  4759. @face.bitmap.dispose if @face.bitmap != nil
  4760. return if @actor == nil or @actor.id == nil
  4761. @face_image = Cache.battle_hud(@actor.battler_face_name.to_s) rescue nil
  4762. @face_image = Bitmap.new(32,32) if @face_image == nil
  4763. @face_cw = FACE_ANIMATION ? @face_image.width / 5 : @face_image.width
  4764. @face_ch = @face_image.height
  4765. @face.ox = @face_cw / 2
  4766. @face.oy = @face_ch / 2
  4767. @face.bitmap = Bitmap.new(@face_cw,@face_ch)
  4768. @face_org = [@hud_position[0] + FACE_POSITION[0],
  4769. @hud_position[1] + @face.oy + FACE_POSITION[1]]
  4770. if $game_temp.battler_face_pos[@actor_index] == nil
  4771. $game_temp.battler_face_pos[@actor_index] = []
  4772. end
  4773. @face.x = @face_org[0]
  4774. @face.y = @face_org[1]
  4775. limit_Y = (@hud_position[1] + FACE_POSITION[1] + @face_image.height)
  4776. fy = @face_org[1]
  4777. if limit_Y > Graphics.height
  4778. @face.y = Graphics.height - (@face_image.height - @face.oy)
  4779. fy = Graphics.height - 16
  4780. end
  4781. $game_temp.battler_face_pos[@actor_index][0] = @face_org[0]
  4782. $game_temp.battler_face_pos[@actor_index][1] = fy
  4783. $game_temp.battler_face_pos[@actor_index][2] = @face.z
  4784. clear_face_index
  4785. end
  4786.  
  4787. #--------------------------------------------------------------------------
  4788. # * Refresh Face
  4789. #--------------------------------------------------------------------------
  4790. def refresh_face
  4791. @face.mirror = false
  4792. @face.zoom_x = 1.00
  4793. @face.zoom_y = 1.00
  4794. @face_index = @actor.face_animation[1]
  4795. @face.bitmap.clear
  4796. if !FACE_ANIMATION
  4797. f_scr = Rect.new(0,0,@face_cw,@face_ch)
  4798. else
  4799. f_scr = Rect.new(@face_index * @face_cw,0,@face_cw,@face_ch)
  4800. end
  4801. @face.bitmap.blt(0,0,@face_image,f_scr)
  4802. end
  4803.  
  4804. #--------------------------------------------------------------------------
  4805. # * Update Face Duration
  4806. #--------------------------------------------------------------------------
  4807. def update_face_duration
  4808. return if @actor.face_animation[0] == 0
  4809. @actor.face_animation[0] -= 1
  4810. update_face_shake_effect
  4811. update_face_zoom if @actor.face_animation[1] == 2
  4812. return if @actor.face_animation[0] > 0
  4813. clear_face_index
  4814. end
  4815.  
  4816. #--------------------------------------------------------------------------
  4817. # * Clear Face Index
  4818. #--------------------------------------------------------------------------
  4819. def clear_face_index
  4820. @actor.face_animation[1] = @actor.low_hp? ? 3 : 0
  4821. @actor.face_animation[1] = 4 if @actor.dead?
  4822. refresh_face
  4823. end
  4824.  
  4825. #--------------------------------------------------------------------------
  4826. # * Update Face Zoom
  4827. #--------------------------------------------------------------------------
  4828. def update_face_zoom
  4829. return if !FACE_ZOOM_ANIMATION
  4830. case @actor.face_animation[0]
  4831. when 30..60
  4832. @face.zoom_x += 0.01
  4833. @face.zoom_x = 1.30 if @face.zoom_x > 1.30
  4834. @face.mirror = true unless !FACE_ZOOM_MIRROR_EFFECT
  4835. when 1..29
  4836. @face.zoom_x -= 0.01
  4837. @face.zoom_x = 1.00 if @face.zoom_x < 1.00
  4838. @face.mirror = false
  4839. else
  4840. @face.zoom_x = 1.00
  4841. @face.mirror = false
  4842. end
  4843. @face.zoom_y = @face.zoom_x
  4844. end
  4845.  
  4846. #--------------------------------------------------------------------------
  4847. # * Can Refresh Index MP TP?
  4848. #--------------------------------------------------------------------------
  4849. def can_refresh_index_mp_tp?
  4850. return true if @face_old_mp != @actor.mp
  4851. return false
  4852. end
  4853.  
  4854. #--------------------------------------------------------------------------
  4855. # * Refresh Face Index HP
  4856. #--------------------------------------------------------------------------
  4857. def refresh_face_index_hp
  4858. @actor.face_animation[0] = FACE_ANIMATION_DURATION
  4859. @actor.face_animation[1] = @face_old_hp > @actor.hp ? 3 : 1
  4860. @face_old_hp = @actor.hp
  4861. end
  4862.  
  4863. #--------------------------------------------------------------------------
  4864. # * Refresh Face Index MP TP
  4865. #--------------------------------------------------------------------------
  4866. def refresh_face_index_mp_tp
  4867. if @face_old_mp < @actor.mp
  4868. @actor.face_animation[0] = FACE_ANIMATION_DURATION
  4869. @actor.face_animation[1] = 1
  4870. end
  4871. @face_old_mp = @actor.mp
  4872. @face_old_tp = @actor.tp
  4873. end
  4874.  
  4875. #--------------------------------------------------------------------------
  4876. # * Update Face Shake Effect
  4877. #--------------------------------------------------------------------------
  4878. def update_face_shake_effect
  4879. return if !FACE_SHAKE_EFFECT
  4880. if FACE_ANIMATION
  4881. update_shake_animated_face
  4882. else
  4883. update_shake_still_face
  4884. end
  4885. end
  4886.  
  4887. #--------------------------------------------------------------------------
  4888. # * Update Shake Still Effect Face
  4889. #--------------------------------------------------------------------------
  4890. def update_shake_still_face
  4891. if @actor.face_animation[0] > 0 and @actor.face_animation[1] == 3 and @actor.hp > 0
  4892. @face.x = @face_org[0] - 4 + rand(8)
  4893. else
  4894. @face.x = @face_org[0]
  4895. end
  4896. end
  4897.  
  4898. #--------------------------------------------------------------------------
  4899. # * Update Shake Animated Face
  4900. #--------------------------------------------------------------------------
  4901. def update_shake_animated_face
  4902. if @actor.face_animation[0] == 0
  4903. @face.x = @face_org[0]
  4904. return
  4905. end
  4906. if @actor.face_animation[1] == 3 and @actor.hp > 0
  4907. @face.x = @face_org[0] - 4 + rand(8)
  4908. else
  4909. @face.x = @face_org[0]
  4910. end
  4911. end
  4912.  
  4913. #--------------------------------------------------------------------------
  4914. # * Update Face
  4915. #--------------------------------------------------------------------------
  4916. def update_face
  4917. return if @face == nil
  4918. sprite_visible(@face)
  4919. refresh_face_index_hp if !FACE_ANIMATION and @face_old_hp != @actor.hp
  4920. update_face_duration
  4921. return if !FACE_ANIMATION
  4922. refresh_face_index_mp_tp if can_refresh_index_mp_tp?
  4923. refresh_face_index_hp if @face_old_hp != @actor.hp
  4924. refresh_face if @face_index != @actor.face_animation[1]
  4925. end
  4926.  
  4927. end
  4928.  
  4929. #==============================================================================
  4930. # ■ Battle Manager
  4931. #==============================================================================
  4932. class << BattleManager
  4933.  
  4934. #--------------------------------------------------------------------------
  4935. # ● Battle End
  4936. #--------------------------------------------------------------------------
  4937. alias mog_battle_hud_battle_process_victory process_victory
  4938. def process_victory
  4939. execute_face_effect
  4940. mog_battle_hud_battle_process_victory
  4941. end
  4942.  
  4943. #--------------------------------------------------------------------------
  4944. # ● Prepare
  4945. #--------------------------------------------------------------------------
  4946. def execute_face_effect
  4947. $game_message.position = MOG_BATTLE_HUD_EX::BATTLE_MESSAGE_POSITION
  4948. for i in $game_party.members
  4949. i.face_animation = [120,1,0] if i.hp > 0
  4950. end
  4951. end
  4952.  
  4953. #--------------------------------------------------------------------------
  4954. # * Display EXP Earned
  4955. #--------------------------------------------------------------------------
  4956. alias mog_battle_hud_ex_message_battle_process_defeat process_defeat
  4957. def process_defeat
  4958. $game_message.position = MOG_BATTLE_HUD_EX::BATTLE_MESSAGE_POSITION
  4959. mog_battle_hud_ex_message_battle_process_defeat
  4960. end
  4961.  
  4962. #--------------------------------------------------------------------------
  4963. # * Process Escape
  4964. #--------------------------------------------------------------------------
  4965. alias mog_battle_hud_ex_message_battle_process_escape process_escape
  4966. def process_escape
  4967. $game_message.position = MOG_BATTLE_HUD_EX::BATTLE_MESSAGE_POSITION
  4968. mog_battle_hud_ex_message_battle_process_escape
  4969. end
  4970.  
  4971. #--------------------------------------------------------------------------
  4972. # * Display EXP Earned
  4973. #--------------------------------------------------------------------------
  4974. alias mog_battle_hud_ex_message_battle_display_exp display_exp
  4975. def display_exp
  4976. $game_message.position = MOG_BATTLE_HUD_EX::BATTLE_MESSAGE_POSITION
  4977. mog_battle_hud_ex_message_battle_display_exp
  4978. end
  4979.  
  4980. #--------------------------------------------------------------------------
  4981. # * Gold Acquisition and Display
  4982. #--------------------------------------------------------------------------
  4983. alias mog_battle_hud_ex_message_battle_gain_gold gain_gold
  4984. def gain_gold
  4985. $game_message.position = MOG_BATTLE_HUD_EX::BATTLE_MESSAGE_POSITION
  4986. mog_battle_hud_ex_message_battle_gain_gold
  4987. end
  4988.  
  4989. #--------------------------------------------------------------------------
  4990. # * Dropped Item Acquisition and Display
  4991. #--------------------------------------------------------------------------
  4992. alias mog_battle_hud_ex_message_battle_gain_drop_items gain_drop_items
  4993. def gain_drop_items
  4994. $game_message.position = MOG_BATTLE_HUD_EX::BATTLE_MESSAGE_POSITION
  4995. mog_battle_hud_ex_message_battle_gain_drop_items
  4996. end
  4997.  
  4998. #--------------------------------------------------------------------------
  4999. # * EXP Acquisition and Level Up Display
  5000. #--------------------------------------------------------------------------
  5001. alias mog_battle_hud_ex_message_battle_gain_exp gain_exp
  5002. def gain_exp
  5003. $game_message.position = MOG_BATTLE_HUD_EX::BATTLE_MESSAGE_POSITION
  5004. mog_battle_hud_ex_message_battle_gain_exp
  5005. end
  5006.  
  5007. end
  5008.  
  5009. #==============================================================================
  5010. # ** Scene Battle
  5011. #==============================================================================
  5012. class Scene_Battle < Scene_Base
  5013.  
  5014. #--------------------------------------------------------------------------
  5015. # * Use Item
  5016. #--------------------------------------------------------------------------
  5017. alias mog_monogatari_use_item use_item
  5018. def use_item
  5019. execute_face_animation
  5020. mog_monogatari_use_item
  5021. end
  5022.  
  5023. #--------------------------------------------------------------------------
  5024. # * Execute Face Animation
  5025. #--------------------------------------------------------------------------
  5026. def execute_face_animation
  5027. return if @subject.is_a?(Game_Enemy)
  5028. @subject.face_animation = [60 ,2,0]
  5029. end
  5030.  
  5031. end
  5032.  
  5033. #==============================================================================
  5034. #==============================================================================
  5035. # ** Battle Hud EX
  5036. #==============================================================================
  5037. #==============================================================================
  5038. class Battle_Hud_EX
  5039.  
  5040. #--------------------------------------------------------------------------
  5041. # * Dispose
  5042. #--------------------------------------------------------------------------
  5043. def dispose
  5044. terminate
  5045. dispose_layout
  5046. dispose_layout_2
  5047. dispose_name
  5048. dispose_face
  5049. dispose_hp_number
  5050. dispose_hp_number_max
  5051. dispose_hp_meter
  5052. dispose_hp_icon
  5053. dispose_hp_icon_ex
  5054. dispose_hp_icon_number
  5055. dispose_mp_number
  5056. dispose_mp_number_max
  5057. dispose_mp_meter
  5058. dispose_mp_icon
  5059. dispose_mp_icon_ex
  5060. dispose_mp_icon_number
  5061. dispose_tp_number
  5062. dispose_tp_number_max
  5063. dispose_tp_meter
  5064. dispose_tp_icon
  5065. dispose_tp_icon_ex
  5066. dispose_tp_icon_number
  5067. dispose_at_number
  5068. dispose_at_number_max
  5069. dispose_at_meter
  5070. dispose_lv_number
  5071. dispose_states
  5072. end
  5073.  
  5074. #--------------------------------------------------------------------------
  5075. # * Dispose Layout
  5076. #--------------------------------------------------------------------------
  5077. def dispose_layout
  5078. return if @layout == nil
  5079. @layout.dispose
  5080. @layout = nil
  5081. end
  5082.  
  5083. #--------------------------------------------------------------------------
  5084. # * Dispose Layout 2
  5085. #--------------------------------------------------------------------------
  5086. def dispose_layout_2
  5087. return if @layout2 == nil
  5088. @layout2.dispose
  5089. @layout2 = nil
  5090. end
  5091.  
  5092. #--------------------------------------------------------------------------
  5093. # * Dispose Name
  5094. #--------------------------------------------------------------------------
  5095. def dispose_name
  5096. return if @name == nil
  5097. @name.bitmap.dispose
  5098. @name.dispose
  5099. @name = nil
  5100. end
  5101.  
  5102. #--------------------------------------------------------------------------
  5103. # * Dispose Face
  5104. #--------------------------------------------------------------------------
  5105. def dispose_face
  5106. return if @face == nil
  5107. @face.bitmap.dispose if @face.bitmap != nil
  5108. @face.dispose
  5109. @face = nil
  5110. @face_image.dispose if @face_image != nil
  5111. end
  5112.  
  5113. #--------------------------------------------------------------------------
  5114. # * Dispose HP Number
  5115. #--------------------------------------------------------------------------
  5116. def dispose_hp_number
  5117. return if @hp_number == nil
  5118. @hp_number.bitmap.dispose
  5119. @hp_number.dispose
  5120. @hp_number = nil
  5121. end
  5122.  
  5123. #--------------------------------------------------------------------------
  5124. # * Dispose HP Number Max
  5125. #--------------------------------------------------------------------------
  5126. def dispose_hp_number_max
  5127. return if @hp_number2 == nil
  5128. @hp_number2.bitmap.dispose
  5129. @hp_number2.dispose
  5130. @hp_number2 = nil
  5131. end
  5132.  
  5133. #--------------------------------------------------------------------------
  5134. # * Dispose HP Meter
  5135. #--------------------------------------------------------------------------
  5136. def dispose_hp_meter
  5137. return if @hp_meter == nil
  5138. @hp_meter.bitmap.dispose
  5139. @hp_meter.dispose
  5140. @hp_meter = nil
  5141. end
  5142.  
  5143. #--------------------------------------------------------------------------
  5144. # * Dispose HP Icon
  5145. #--------------------------------------------------------------------------
  5146. def dispose_hp_icon
  5147. return if @hp_icon == nil
  5148. @hp_icon.bitmap.dispose if @hp_icon.bitmap != nil
  5149. @hp_icon.dispose
  5150. @hp_icon = nil
  5151. end
  5152.  
  5153. #--------------------------------------------------------------------------
  5154. # * Dispose HP Icon EX
  5155. #--------------------------------------------------------------------------
  5156. def dispose_hp_icon_ex
  5157. return if @hp_icon3 == nil
  5158. @hp_icon3.bitmap.dispose
  5159. @hp_icon3.dispose
  5160. @hp_icon3 = nil
  5161. end
  5162.  
  5163. #--------------------------------------------------------------------------
  5164. # * Dispose HP Icon Number
  5165. #--------------------------------------------------------------------------
  5166. def dispose_hp_icon_number
  5167. return if @hp_icon_number == nil
  5168. @hp_icon_number.bitmap.dispose
  5169. @hp_icon_number.dispose
  5170. @hp_icon_number = nil
  5171. end
  5172.  
  5173. #--------------------------------------------------------------------------
  5174. # * Dispose MP Number
  5175. #--------------------------------------------------------------------------
  5176. def dispose_mp_number
  5177. return if @mp_number == nil
  5178. @mp_number.bitmap.dispose
  5179. @mp_number.dispose
  5180. @mp_number = nil
  5181. end
  5182.  
  5183. #--------------------------------------------------------------------------
  5184. # * Dispose MP Number Max
  5185. #--------------------------------------------------------------------------
  5186. def dispose_mp_number_max
  5187. return if @mp_number2 == nil
  5188. @mp_number2.bitmap.dispose
  5189. @mp_number2.dispose
  5190. @mp_number2 = nil
  5191. end
  5192.  
  5193. #--------------------------------------------------------------------------
  5194. # * Dispose MP Meter
  5195. #--------------------------------------------------------------------------
  5196. def dispose_mp_meter
  5197. return if @mp_meter == nil
  5198. @mp_meter.bitmap.dispose
  5199. @mp_meter.dispose
  5200. @mp_meter = nil
  5201. end
  5202.  
  5203. #--------------------------------------------------------------------------
  5204. # * Dispose MP Icon
  5205. #--------------------------------------------------------------------------
  5206. def dispose_mp_icon
  5207. return if @mp_icon == nil
  5208. @mp_icon.bitmap.dispose if @mp_icon.bitmap != nil
  5209. @mp_icon.dispose
  5210. @mp_icon = nil
  5211. end
  5212.  
  5213. #--------------------------------------------------------------------------
  5214. # * Dispose MP Icon EX
  5215. #--------------------------------------------------------------------------
  5216. def dispose_mp_icon_ex
  5217. return if @mp_icon3 == nil
  5218. @mp_icon3.bitmap.dispose
  5219. @mp_icon3.dispose
  5220. @mp_icon3 = nil
  5221. end
  5222.  
  5223. #--------------------------------------------------------------------------
  5224. # * Dispose MP Icon Number
  5225. #--------------------------------------------------------------------------
  5226. def dispose_mp_icon_number
  5227. return if @mp_icon_number == nil
  5228. @mp_icon_number.bitmap.dispose
  5229. @mp_icon_number.dispose
  5230. @mp_icon_number = nil
  5231. end
  5232.  
  5233. #--------------------------------------------------------------------------
  5234. # * Dispose TP Number
  5235. #--------------------------------------------------------------------------
  5236. def dispose_tp_number
  5237. return if @tp_number == nil
  5238. @tp_number.bitmap.dispose
  5239. @tp_number.dispose
  5240. @tp_number = nil
  5241. end
  5242.  
  5243. #--------------------------------------------------------------------------
  5244. # * Dispose TP Number Max
  5245. #--------------------------------------------------------------------------
  5246. def dispose_tp_number_max
  5247. return if @tp_number2 == nil
  5248. @tp_number2.bitmap.dispose
  5249. @tp_number2.dispose
  5250. @tp_number2 = nil
  5251. end
  5252.  
  5253. #--------------------------------------------------------------------------
  5254. # * Dispose TP Meter
  5255. #--------------------------------------------------------------------------
  5256. def dispose_tp_meter
  5257. return if @tp_meter == nil
  5258. @tp_meter.bitmap.dispose
  5259. @tp_meter.dispose
  5260. @tp_meter = nil
  5261. end
  5262.  
  5263. #--------------------------------------------------------------------------
  5264. # * Dispose TP Icon
  5265. #--------------------------------------------------------------------------
  5266. def dispose_tp_icon
  5267. return if @tp_icon == nil
  5268. @tp_icon.bitmap.dispose if @tp_icon.bitmap != nil
  5269. @tp_icon.dispose
  5270. @tp_icon = nil
  5271. end
  5272.  
  5273. #--------------------------------------------------------------------------
  5274. # * Dispose TP Icon EX
  5275. #--------------------------------------------------------------------------
  5276. def dispose_tp_icon_ex
  5277. return if @tp_icon3 == nil
  5278. @tp_icon3.bitmap.dispose
  5279. @tp_icon3.dispose
  5280. @tp_icon3 = nil
  5281. end
  5282.  
  5283. #--------------------------------------------------------------------------
  5284. # * Dispose TP Icon Number
  5285. #--------------------------------------------------------------------------
  5286. def dispose_tp_icon_number
  5287. return if @tp_icon_number == nil
  5288. @tp_icon_number.bitmap.dispose
  5289. @tp_icon_number.dispose
  5290. @tp_icon_numbe = nil
  5291. end
  5292.  
  5293. #--------------------------------------------------------------------------
  5294. # * Dispose AT Number
  5295. #--------------------------------------------------------------------------
  5296. def dispose_at_number
  5297. return if @at_number == nil
  5298. @at_number.bitmap.dispose
  5299. @at_number.dispose
  5300. @at_number = nil
  5301. end
  5302.  
  5303. #--------------------------------------------------------------------------
  5304. # * Dispose AT Number Max
  5305. #--------------------------------------------------------------------------
  5306. def dispose_at_number_max
  5307. return if @at_number2 == nil
  5308. @at_number2.bitmap.dispose
  5309. @at_number2.dispose
  5310. @at_number2 = nil
  5311. end
  5312.  
  5313. #--------------------------------------------------------------------------
  5314. # * Dispose AT Meter
  5315. #--------------------------------------------------------------------------
  5316. def dispose_at_meter
  5317. return if @at_meter == nil
  5318. @at_meter.bitmap.dispose
  5319. @at_meter.dispose
  5320. @at_meter = nil
  5321. end
  5322.  
  5323. #--------------------------------------------------------------------------
  5324. # * Dispose Lv Number
  5325. #--------------------------------------------------------------------------
  5326. def dispose_lv_number
  5327. return if @lv_number == nil
  5328. @lv_number.bitmap.dispose
  5329. @lv_number.dispose
  5330. @lv_number = nil
  5331. end
  5332.  
  5333. #--------------------------------------------------------------------------
  5334. # * Dispose States
  5335. #--------------------------------------------------------------------------
  5336. def dispose_states
  5337. return if @status == nil
  5338. @status.bitmap.dispose if @status.bitmap != nil
  5339. @status.dispose
  5340. @actor_status.dispose if @actor_status != nil
  5341. @status = nil
  5342. end
  5343.  
  5344. end
  5345.  
  5346. #==============================================================================
  5347. #==============================================================================
  5348. # ** Battle Hud EX
  5349. #==============================================================================
  5350. #==============================================================================
  5351. class Battle_Hud_EX
  5352.  
  5353. #--------------------------------------------------------------------------
  5354. # * Update
  5355. #--------------------------------------------------------------------------
  5356. def update
  5357. return if @actor == nil
  5358. @sprite_visible = sprite_visible?
  5359. update_layout
  5360. update_layout_2
  5361. update_name
  5362. update_face
  5363. update_hp
  5364. update_mp
  5365. update_tp
  5366. update_at
  5367. update_level
  5368. update_states
  5369. end
  5370.  
  5371. end
Advertisement
Add Comment
Please, Sign In to add comment