查看: 4164|回复: 16

[有事请教] 关于MOG的地图血条HUD

[复制链接]
梦石
20
星屑
13972
在线时间
1744 小时
注册时间
2017-1-12
回帖
1666

MZ评测员开拓者

发表于 2020-1-28 11:51:15 | 显示全部楼层 |阅读模式

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

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

×
本帖最后由 火锅深处 于 2020-2-11 19:49 编辑

emmm......如图,复制了用icon显血的设置,但是发现在地图上减HP的时候左上角的红心完全没变化。
地图血条.png
然后因为我设定了“不会导致战斗不能”,所以只剩1点HP时会变成这样。但是之前都是上图的样子。并且如果在只剩1点的时候喝回复药也是就算喝一点也会回复到上图的样子。
地图血条2.png

如果转换成血条而不是红心icon的模式的话倒是会减血。是还需要设置什么吗?(印象中我应该没有动什么东西。)

需要的文件(在img下新建一个actorhud文件夹,放在里面的):
MP_Meter.png Layout.png HP_Icon.png

脚本
  1. //=============================================================================
  2. // MOG_ActorHud.js           (Template - 02)
  3. //=============================================================================

  4. /*:
  5. * @plugindesc (v2.0 *) Adiciona uma Hud com os parâmetros do personagem.
  6. * @author Moghunter
  7. *
  8. * @param -> MAIN <<<<<<<<<<<<<<<<<<<<<<<
  9. * @desc
  10. *  
  11. * @param Initial Visible
  12. * @desc Ativar a Hud no inicio do jogo.
  13. * @default true
  14. * @type boolean
  15. * @on Visible From Start
  16. * @off Hide
  17. * @parent -> MAIN <<<<<<<<<<<<<<<<<<<<<<<
  18. *
  19. * @param Hud X-Axis
  20. * @desc Definição da posição X-Axis da Hud.
  21. * @default 0
  22. * @type number
  23. * @parent -> MAIN <<<<<<<<<<<<<<<<<<<<<<<
  24. *
  25. * @param Hud Y-Axis
  26. * @desc Definição da posição Y-Axis da Hud.
  27. * @default 0
  28. * @type number
  29. * @parent -> MAIN <<<<<<<<<<<<<<<<<<<<<<<
  30. *
  31. * @param Smart Fade
  32. * @desc Ativa transparência na hud quando a hud estiver acima do personagem.
  33. * @default true
  34. * @type boolean
  35. * @on Overlapping Character
  36. * @off Always Visible
  37. * @parent -> MAIN <<<<<<<<<<<<<<<<<<<<<<<
  38. *
  39. * @param Auto Fade
  40. * @desc Oculta na hud quando a janela de messagem estiver ativada.
  41. * @default true
  42. * @type boolean
  43. * @on Window Message
  44. * @off Always Visible
  45. * @parent -> MAIN <<<<<<<<<<<<<<<<<<<<<<<
  46. *
  47. * @param
  48. *
  49. * @param -> LAYOUT 2 <<<<<<<<<<<<<<<<<<<<<<<
  50. * @desc
  51. *
  52. * @param Layout Overlay Visible
  53. * @desc Apresentar o segundo layout acima dos medidores e face.
  54. * @default false
  55. * @type boolean
  56. * @on Show
  57. * @off Hide
  58. * @parent -> LAYOUT 2 <<<<<<<<<<<<<<<<<<<<<<<
  59. *
  60. * @param Layout Overlay X-Axis
  61. * @desc Definição da posição X-Axis da face.
  62. * @default 0
  63. * @type number
  64. * @parent -> LAYOUT 2 <<<<<<<<<<<<<<<<<<<<<<<
  65. *
  66. * @param Layout Overlay Y-Axis
  67. * @desc Definição da posição Y-Axis da face.
  68. * @default 0
  69. * @type number
  70. * @parent -> LAYOUT 2 <<<<<<<<<<<<<<<<<<<<<<<
  71. *
  72. * @param
  73. *
  74. * @param -> FACE <<<<<<<<<<<<<<<<<<<<<<<
  75. * @desc
  76. *
  77. * @param Face Visible
  78. * @desc Apresentar a imagem da face.
  79. * @default false
  80. * @type boolean
  81. * @on Show
  82. * @off Hide
  83. * @parent -> FACE <<<<<<<<<<<<<<<<<<<<<<<
  84. *
  85. * @param Face X-Axis
  86. * @desc Definição da posição X-Axis da face.
  87. * @default 0
  88. * @type number
  89. * @parent -> FACE <<<<<<<<<<<<<<<<<<<<<<<
  90. *
  91. * @param Face Y-Axis
  92. * @desc Definição da posição Y-Axis da face.
  93. * @default 0
  94. * @type number
  95. * @parent -> FACE <<<<<<<<<<<<<<<<<<<<<<<
  96. *
  97. * @param Face Priority
  98. * @desc Prioridade da Face. (0 Low - 1 High)
  99. * @default 0
  100. * @type select
  101. * @option (0) Below the Layout
  102. * @value 0
  103. * @option (1) Above the Layout
  104. * @value 1
  105. * @parent -> FACE <<<<<<<<<<<<<<<<<<<<<<<
  106. *
  107. * @param
  108. *
  109. * @param -> NAME <<<<<<<<<<<<<<<<<<<<<<<
  110. * @desc
  111. *
  112. * @param Name Visible
  113. * @desc Apresentar o nome do personagem.
  114. * @default false
  115. * @type boolean
  116. * @on Show
  117. * @off Hide
  118. * @parent -> NAME <<<<<<<<<<<<<<<<<<<<<<<
  119. *
  120. * @param Name X-Axis
  121. * @desc Definição da posição X-Axis do nome.
  122. * @default 0
  123. * @type number
  124. * @parent -> NAME <<<<<<<<<<<<<<<<<<<<<<<
  125. *
  126. * @param Name Y-Axis
  127. * @desc Definição da posição Y-Axis do nome.
  128. * @default 0
  129. * @type number
  130. * @parent -> NAME <<<<<<<<<<<<<<<<<<<<<<<
  131. *
  132. * @param Name Font Size
  133. * @desc Definição do tamanho da fonte do nome.
  134. * @default 20
  135. * @type number
  136. * @parent -> NAME <<<<<<<<<<<<<<<<<<<<<<<
  137. *
  138. * @param Name Bold Size
  139. * @desc Definição do tamanho do contorno.
  140. * @default 4
  141. * @type number
  142. * @parent -> NAME <<<<<<<<<<<<<<<<<<<<<<<
  143. *
  144. * @param Name Font Italic
  145. * @desc Ativar fonte em itálico.
  146. * @default false
  147. * @type boolean
  148. * @on Enable
  149. * @off Disable
  150. * @parent -> NAME <<<<<<<<<<<<<<<<<<<<<<<
  151. *
  152. * @param
  153. *
  154. * @param -> HP <<<<<<<<<<<<<<<<<<<<<<<
  155. * @desc
  156. *
  157. * @param HP Meter Visible
  158. * @text Gauge Visible
  159. * @desc Apresentar o medidor de HP
  160. * @default false
  161. * @type boolean
  162. * @on Show
  163. * @off Hide
  164. * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<<
  165. *
  166. * @param HP Meter X-Axis
  167. * @text Gauge X-Axis
  168. * @desc Definição da posição X-Axis do medidor de HP.
  169. * @default 0
  170. * @type number
  171. * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<<
  172. *
  173. * @param HP Meter Y-Axis
  174. * @text Gauge Y-Axis
  175. * @desc Definição da posição Y-Axis do medidor de HP.
  176. * @default 0
  177. * @type number
  178. * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<<
  179. *
  180. * @param HP Meter Angle
  181. * @text Gauge Angle  
  182. * @desc Ángulo do medidor.
  183. * @default 0
  184. * @type number
  185. * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<<
  186. *
  187. * @param HP Meter Flow Anime
  188. * @text Gauge Gradient Animation
  189. * @desc Ativar animação de gradiente no medidor.
  190. * É necessário que a imagem tenha 3x a largura do medidor.
  191. * @default false
  192. * @type boolean
  193. * @on Enable
  194. * @off Disable
  195. * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<<
  196. *
  197. * @param HP Meter Flow Speed
  198. * @text Gauge Gradient Speed  
  199. * @desc Define a velocidade de animação do gradient.
  200. * É necessário que a imagem tenha 3x a largura do medidor.
  201. * @default 4
  202. * @type number
  203. * @min 1
  204. * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<<
  205. *
  206. * @param HP Number Visible
  207. * @desc Apresentar o numero de HP
  208. * @default false
  209. * @type boolean
  210. * @on Show
  211. * @off Hide
  212. * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<<
  213. *
  214. * @param HP Number Align
  215. * @desc Definição do alinhamento dos números.
  216. * 0 - Espquerda     1 - Centro       2 - Direita
  217. * @default 2
  218. * @type select
  219. * @option Left
  220. * @value 0
  221. * @option Center
  222. * @value 1
  223. * @option Right
  224. * @value 2  
  225. * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<<
  226. *  
  227. * @param HP Number X-Axis
  228. * @desc Definição da posição X-Axis do numero de HP.
  229. * @default 0
  230. * @type number
  231. * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<<
  232. *
  233. * @param HP Number Y-Axis
  234. * @desc Definição da posição Y-Axis do numero de HP.
  235. * @default 0
  236. * @type number
  237. * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<<
  238. *
  239. * @param MaxHP Number Visible
  240. * @desc Apresentar o numero de HP maximo.
  241. * @default false
  242. * @type boolean
  243. * @on Show
  244. * @off Hide
  245. * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<<
  246. *
  247. * @param MaxHP Number X-Axis
  248. * @desc Definição da posição X-Axis do numero de HP maximo.
  249. * @default 0
  250. * @type number
  251. * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<<
  252. *
  253. * @param MaxHP Number Y-Axis
  254. * @desc Definição da posição Y-Axis do numero de HP maximo.
  255. * @default 0
  256. * @type number
  257. * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<<
  258. *
  259. * @param HP Icon Visible
  260. * @desc Apresentar o ícone de HP.
  261. * @default true
  262. * @type boolean
  263. * @on Show
  264. * @off Hide
  265. * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<<
  266. *
  267. * @param HP Icon Half Mode
  268. * @desc Um ícone equivale a 2 pontos de HP.
  269. * @default true
  270. * @type boolean
  271. * @on Enable (Zelda Style)
  272. * @off Disable
  273. * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<<
  274. *
  275. * @param HP Icon Max Colors
  276. * @desc Quantidade de cores do ícone.
  277. * A imagem será dividida pelo número de cores.
  278. * @default 2
  279. * @type number
  280. * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<<
  281. *
  282. * @param HP Icon Max Rows
  283. * @desc Quantidade de ícones por linha.
  284. * @default 10
  285. * @type number
  286. * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<<
  287. *
  288. * @param HP Icon Max Columns
  289. * @desc Quantidade de linhas.
  290. * @default 2
  291. * @type number
  292. * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<<
  293. *
  294. * @param HP Icon X-Axis
  295. * @desc Quantidade X-Axis dos ícones.
  296. * @default 67
  297. * @type number
  298. * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<<
  299. *
  300. * @param HP Icon Y-Axis
  301. * @desc Quantidade Y-Axis dos ícones.
  302. * @default 70
  303. * @type number
  304. * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<<
  305. *
  306. * @param HP Icon Space X
  307. * @desc Definição do espaço entre os ícones na horizontal.
  308. * @default 0
  309. * @type number
  310. * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<<
  311. *
  312. * @param HP Icon Space Y
  313. * @desc Definição do espaço entre os ícones na vertical.
  314. * @default 0
  315. * @type number
  316. * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<<
  317. *
  318. * @param HP Icon Zoom Anime
  319. * @desc Ativar a animação de zoom no último ícone.
  320. * @type boolean
  321. * @on Enable
  322. * @off Disable  
  323. * @default true

  324. * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<<
  325. *
  326. * @param
  327. *
  328. * @param -> MP <<<<<<<<<<<<<<<<<<<<<<<
  329. * @desc
  330. *
  331. * @param MP Meter Visible
  332. * @text Gauge Visible
  333. * @desc Apresentar o medidor de MP
  334. * @default true
  335. * @type boolean
  336. * @on Show
  337. * @off Hide
  338. * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<<
  339. *
  340. * @param MP Meter X-Axis
  341. * @text Gauge X-Axis
  342. * @desc Definição da posição X-Axis do medidor de MP.
  343. * @default 43
  344. * @type number
  345. * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<<
  346. *
  347. * @param MP Meter Y-Axis
  348. * @text Gauge Y-Axis
  349. * @desc Definição da posição Y-Axis do medidor de MP.
  350. * @default 98
  351. * @type number
  352. * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<<
  353. *
  354. * @param MP Meter Angle
  355. * @text Gauge Angle
  356. * @desc Ángulo do medidor.
  357. * @default 0
  358. * @type number
  359. * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<<
  360. *
  361. * @param MP Meter Flow Anime
  362. * @text Gauge Gradient Animation  
  363. * @desc Ativar animação de gradiente no medidor.
  364. * É necessário que a imagem tenha 3x a largura do medidor.
  365. * @default true
  366. * @type boolean
  367. * @on Enable
  368. * @off Disable
  369. * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<<
  370. *
  371. * @param MP Meter Flow Speed
  372. * @text Gauge Gradient Speed  
  373. * @desc Define a velocidade de animação do gradient.
  374. * É necessário que a imagem tenha 3x a largura do medidor.
  375. * @default 2
  376. * @type number
  377. * @min 1
  378. * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<<
  379. *
  380. * @param MP Number Visible
  381. * @desc Apresentar o numero de MP
  382. * @default false
  383. * @type boolean
  384. * @on Show
  385. * @off Hide
  386. * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<<
  387. *
  388. * @param MP Number Align
  389. * @desc Definição do alinhamento dos números.
  390. * 0 - Espquerda     1 - Centro       2 - Direita
  391. * @default 0
  392. * @type select
  393. * @option Left
  394. * @value 0
  395. * @option Center
  396. * @value 1
  397. * @option Right
  398. * @value 2   
  399. * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<<
  400. *  
  401. * @param MP Number X-Axis
  402. * @desc Definição da posição X-Axis do numero de MP.
  403. * @default 0
  404. * @type number
  405. * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<<
  406. *
  407. * @param MP Number Y-Axis
  408. * @desc Definição da posição Y-Axis do numero de MP.
  409. * @default 0
  410. * @type number
  411. * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<<
  412. *
  413. * @param MaxMP Number Visible
  414. * @desc Apresentar o numero de MP maximo.
  415. * @default false
  416. * @type boolean
  417. * @on Show
  418. * @off Hide
  419. * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<<
  420. *
  421. * @param MaxMP Number X-Axis
  422. * @desc Definição da posição X-Axis do numero de MP maximo.
  423. * @default 0
  424. * @type number
  425. * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<<
  426. *
  427. * @param MaxMP Number Y-Axis
  428. * @desc Definição da posição Y-Axis do numero de MP maximo.
  429. * @default 0
  430. * @type number
  431. * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<<
  432. *
  433. * @param MP Icon Visible
  434. * @desc Apresentar o ícone de MP.
  435. * @default false
  436. * @type boolean
  437. * @on Show
  438. * @off Hide
  439. * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<<
  440. *
  441. * @param MP Icon Half Mode
  442. * @desc Um ícone equivale a 2 pontos de MP.
  443. * @default false
  444. * @type boolean
  445. * @on Enable (Zelda Style)
  446. * @off Disable
  447. * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<<
  448. *
  449. * @param MP Icon Max Colors
  450. * @desc Quantidade de cores do ícone.
  451. * A imagem será dividida pelo número de cores.
  452. * @default 0
  453. * @type number
  454. * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<<
  455. *
  456. * @param MP Icon Max Rows
  457. * @desc Quantidade de ícones por linha.
  458. * @default 1
  459. * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<<
  460. *
  461. * @param MP Icon Max Columns
  462. * @desc Quantidade de linhas.
  463. * @default 1
  464. * @type number
  465. * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<<
  466. *
  467. * @param MP Icon X-Axis
  468. * @desc Quantidade X-Axis dos ícones.
  469. * @default 0
  470. * @type number
  471. * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<<
  472. *
  473. * @param MP Icon Y-Axis
  474. * @desc Quantidade Y-Axis dos ícones.
  475. * @default 0
  476. * @type number
  477. * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<<
  478. *
  479. * @param MP Icon Space X
  480. * @desc Definição do espaço entre os ícones na horizontal.
  481. * @default 0
  482. * @type number
  483. * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<<
  484. *
  485. * @param MP Icon Space Y
  486. * @desc Definição do espaço entre os ícones na vertical.
  487. * @default 0
  488. * @type number
  489. * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<<
  490. *
  491. * @param MP Icon Zoom Anime
  492. * @desc Ativar a animação de zoom no último ícone.
  493. * @default false
  494. * @type boolean
  495. * @on Enable
  496. * @off Disable
  497. * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<<
  498. *
  499. * @param
  500. *
  501. * @param -> TP <<<<<<<<<<<<<<<<<<<<<<<
  502. * @desc
  503. *
  504. * @param TP Meter Visible
  505. * @text Gauge Visible  
  506. * @desc Apresentar o medidor de TP
  507. * @default false
  508. * @type boolean
  509. * @on Show
  510. * @off Hide
  511. * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<<
  512. *
  513. * @param TP Meter X-Axis
  514. * @text Gauge X-Axis
  515. * @desc Definição da posição X-Axis do medidor de TP.
  516. * @default 0
  517. * @type number
  518. * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<<
  519. *
  520. * @param TP Meter Y-Axis
  521. * @text Gauge Y-Axis
  522. * @desc Definição da posição Y-Axis do medidor de TP.
  523. * @default 0
  524. * @type number
  525. * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<<
  526. *
  527. * @param TP Meter Angle
  528. * @text Gauge Angle
  529. * @desc Ángulo do medidor.
  530. * @default 0
  531. * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<<
  532. *
  533. * @param TP Meter Flow Anime
  534. * @text Gauge Gradient Animation
  535. * @desc Ativar animação de gradiente no medidor.
  536. * É necessário que a imagem tenha 3x a largura do medidor.
  537. * @default false
  538. * @type boolean
  539. * @on Enable
  540. * @off Disable
  541. * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<<
  542. *
  543. * @param TP Meter Flow Speed
  544. * @text Gauge Gradient Speed  
  545. * @desc Define a velocidade de animação do gradient.
  546. * É necessário que a imagem tenha 3x a largura do medidor.
  547. * @default 4
  548. * @type number
  549. * @min 1
  550. * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<<
  551. *
  552. * @param TP Number Visible
  553. * @desc Apresentar o numero de TP.
  554. * @default false  
  555. * @type boolean
  556. * @on Show
  557. * @off Hide
  558. * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<<
  559. *
  560. * @param TP Number Align
  561. * @desc Definição do alinhamento dos números.
  562. * 0 - Espquerda     1 - Centro       2 - Direita
  563. * @default 0
  564. * @type select
  565. * @option Left
  566. * @value 0
  567. * @option Center
  568. * @value 1
  569. * @option Right
  570. * @value 2  
  571. * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<<
  572. *
  573. * @param TP Number X-Axis
  574. * @desc Definição da posição X-Axis do numero de TP.
  575. * @default 0
  576. * @type number
  577. * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<<
  578. *
  579. * @param TP Number Y-Axis
  580. * @desc Definição da posição Y-Axis do numero de TP.
  581. * @default 0
  582. * @type number
  583. * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<<
  584. *
  585. * @param MaxTP Number Visible
  586. * @desc Apresentar o numero de TP maximo.
  587. * @default false
  588. * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<<
  589. *
  590. * @param MaxTP Number X-Axis
  591. * @desc Definição da posição X-Axis do numero de TP maximo.
  592. * @default 0
  593. * @type number
  594. * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<<
  595. *
  596. * @param MaxTP Number Y-Axis
  597. * @desc Definição da posição Y-Axis do numero de TP maximo.
  598. * @default 0
  599. * @type number
  600. * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<<
  601. *
  602. * @param TP Icon Visible
  603. * @desc Apresentar o ícone de TP.
  604. * @default false
  605. * @type boolean
  606. * @on Show
  607. * @off Hide
  608. * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<<
  609. *
  610. * @param TP Icon Half Mode
  611. * @desc Um ícone equivale a 2 pontos de TP.
  612. * @default false
  613. * @type boolean
  614. * @on Enable (Zelda Style)
  615. * @off Disable
  616. * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<<
  617. *
  618. * @param TP Icon Max Colors
  619. * @desc Quantidade de cores do ícone.
  620. * A imagem será dividida pelo número de cores.
  621. * @default 2
  622. * @type number
  623. * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<<
  624. *
  625. * @param TP Icon Max Rows
  626. * @desc Quantidade de ícones por linha.
  627. * @default 10
  628. * @type number
  629. * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<<
  630. *
  631. * @param TP Icon Max Columns
  632. * @desc Quantidade de linhas.
  633. * @default 2
  634. * @type number
  635. * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<<
  636. *
  637. * @param TP Icon X-Axis
  638. * @desc Quantidade X-Axis dos ícones.
  639. * @default 0
  640. * @type number
  641. * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<<
  642. *
  643. * @param TP Icon Y-Axis
  644. * @desc Quantidade Y-Axis dos ícones.
  645. * @default 0
  646. * @type number
  647. * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<<
  648. *
  649. * @param TP Icon Space X
  650. * @desc Definição do espaço entre os ícones na horizontal.
  651. * @default 0
  652. * @type number
  653. * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<<
  654. *
  655. * @param TP Icon Space Y
  656. * @desc Definição do espaço entre os ícones na vertical.
  657. * @default 0
  658. * @type number
  659. * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<<
  660. *
  661. * @param TP Icon Zoom Anime
  662. * @desc Ativar a animação de zoom no último ícone.
  663. * @default true
  664. * @type boolean
  665. * @on Enable
  666. * @off Disable
  667. * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<<
  668. *
  669. * @param
  670. *
  671. * @param -> EXP <<<<<<<<<<<<<<<<<<<<<<<
  672. * @desc
  673. *
  674. * @param EXP Meter Visible
  675. * @desc Apresentar o medidor de EXP
  676. * @default false
  677. * @type boolean
  678. * @on Show
  679. * @off Hide
  680. * @parent -> EXP <<<<<<<<<<<<<<<<<<<<<<<
  681. *
  682. * @param EXP Meter X-Axis
  683. * @desc Definição da posição X-Axis do medidor de EXP.
  684. * @default 0
  685. * @type number
  686. * @parent -> EXP <<<<<<<<<<<<<<<<<<<<<<<
  687. *
  688. * @param EXP Meter Y-Axis
  689. * @desc Definição da posição Y-Axis do medidor de EXP.
  690. * @default 0
  691. * @type number
  692. * @parent -> EXP <<<<<<<<<<<<<<<<<<<<<<<
  693. *
  694. * @param EXP Meter Angle
  695. * @desc Ángulo do medidor.
  696. * @default 0
  697. * @type number
  698. * @parent -> EXP <<<<<<<<<<<<<<<<<<<<<<<
  699. *
  700. * @param Level Number Visible
  701. * @desc Apresentar o numero de Level.
  702. * @default false
  703. * @type boolean
  704. * @on Show
  705. * @off Hide
  706. * @parent -> EXP <<<<<<<<<<<<<<<<<<<<<<<
  707. *
  708. * @param Level Number Align
  709. * @desc Definição do alinhamento dos números.
  710. * 0 - Espquerda     1 - Centro       2 - Direita
  711. * @default 0
  712. * @type select
  713. * @option Left
  714. * @value 0
  715. * @option Center
  716. * @value 1
  717. * @option Right
  718. * @value 2
  719. * @parent -> EXP <<<<<<<<<<<<<<<<<<<<<<<
  720. *
  721. * @param Level Number X-Axis
  722. * @desc Definição da posição X-Axis do numero de Level.
  723. * @default 0
  724. * @type number
  725. * @parent -> EXP <<<<<<<<<<<<<<<<<<<<<<<
  726. *
  727. * @param Level Number Y-Axis
  728. * @desc Definição da posição Y-Axis do numero de Level.
  729. * @default 0
  730. * @type number
  731. * @parent -> EXP <<<<<<<<<<<<<<<<<<<<<<<
  732. *
  733. * @param
  734. *
  735. * @param -> STATES <<<<<<<<<<<<<<<<<<<<<<<
  736. * @desc
  737. *
  738. * @param States Visible
  739. * @desc Apresentar o numero as condições.
  740. * @default false
  741. * @type boolean
  742. * @on Show
  743. * @off Hide
  744. * @parent -> STATES <<<<<<<<<<<<<<<<<<<<<<<
  745. *
  746. * @param States X-Axis
  747. * @desc Definição da posição X-Axis das condições.
  748. * @default 0
  749. * @type number
  750. * @parent -> STATES <<<<<<<<<<<<<<<<<<<<<<<
  751. *
  752. * @param States Y-Axis
  753. * @desc Definição da posição Y-Axis das condições.
  754. * @default 0
  755. * @type number
  756. * @parent -> STATES <<<<<<<<<<<<<<<<<<<<<<<
  757. *
  758. * @help  
  759. * =============================================================================
  760. * +++ MOG Actor Hud (v2.0) +++
  761. * By Moghunter
  762. * [url]https://atelierrgss.wordpress.com/[/url]
  763. * =============================================================================
  764. * Adiciona uma Hud com os parâmetros do personagem.
  765. *
  766. * =============================================================================
  767. * - REQUIRED FILES
  768. * =============================================================================
  769. * Serão necessários os arquivos. (img/actorhud/)
  770. *
  771. * HP_Meter.png
  772. * HP_Number.png
  773. * MP_Meter.png
  774. * MP_Number.png
  775. * TP_Meter.png
  776. * TP_Number.png
  777. * Layout.png
  778. * Layout2.png
  779. * LV_Number.png
  780. * EXP_Meter.png
  781. *
  782. * =============================================================================
  783. * Para nomear as faces dos battlers basta nomear da seguinte forma.
  784. *
  785. * Face_ + ACTOR_ID.png
  786. *
  787. * Face_1.png
  788. * Face_2.png
  789. * Face_3.png
  790. * ...
  791. *
  792. * =============================================================================
  793. * - PLUGIN COMMANDS
  794. * =============================================================================
  795. * Para ocultar ou apresentar a hud use os códigos abaixo.
  796. *
  797. * hide_actor_hud
  798. * show_actor_hud
  799. *
  800. * ============================================================================
  801. * - WHAT'S  NEW (version 2.0)
  802. * ============================================================================
  803. * - (NEW) - Plugins parameters compatíveis com RM1.5+
  804. * - (NEW) - Adição da segunda camada de Layout (Overlay).
  805. * - (NEW) - Possibilidade de mudar a velocidade de animação do gradient.
  806. * - (BUG FIX) - Correção de resetar a animação de gradiente ao voltar do menu.
  807. * - (BUG FIX) - Correção de resetar a transparência ao voltar do menu.   
  808. */

  809. //=============================================================================
  810. // ** PLUGIN PARAMETERS
  811. //=============================================================================
  812.   var Imported = Imported || {};
  813.   Imported.MOG_ActorHud = true;
  814.   var Moghunter = Moghunter || {};

  815.    Moghunter.parameters = PluginManager.parameters('MOG_ActorHud');
  816.    
  817.     // HUD POSITION
  818.         Moghunter.ahud_pos_x = Number(Moghunter.parameters['Hud X-Axis'] || 0);
  819.         Moghunter.ahud_pos_y = Number(Moghunter.parameters['Hud Y-Axis'] || 440);
  820.         Moghunter.ahud_fade_limit = Number(Moghunter.parameters['Fade Max'] || 90);
  821.         Moghunter.ahud_layout2_visible = String(Moghunter.parameters['Layout Overlay Visible'] || true);
  822.         Moghunter.ahud_layout2_x = Number(Moghunter.parameters['Layout Overlay X-Axis'] || 0);
  823.         Moghunter.ahud_layout2_y = Number(Moghunter.parameters['Layout Overlay Y-Axis'] || 0);
  824.        
  825.         // FACE POSITION
  826.         Moghunter.ahud_face_visible = String(Moghunter.parameters['Face Visible'] || true);
  827.         Moghunter.ahud_face_shake = String(Moghunter.parameters['Face Shake Animation'] || true);
  828.         Moghunter.ahud_face_zoom = String(Moghunter.parameters['Face Zoom Animation'] || true);
  829.         Moghunter.ahud_face_animated = String(Moghunter.parameters['Face Frame Animation'] || false);
  830.         Moghunter.ahud_face_pos_x = Number(Moghunter.parameters['Face X-Axis'] || 55);
  831.         Moghunter.ahud_face_pos_y = Number(Moghunter.parameters['Face Y-Axis'] || 100);
  832.         Moghunter.ahud_face_priority = Number(Moghunter.parameters['Face Priority'] || 1);
  833.        
  834.         // NAME POSITION
  835.         Moghunter.ahud_name_visible = String(Moghunter.parameters['Name Visible'] || true);
  836.         Moghunter.ahud_name_font_size = Number(Moghunter.parameters['Name Font Size'] || 20);
  837.         Moghunter.ahud_name_font_bold_size = Number(Moghunter.parameters['Name Bold Size'] || 4);
  838.         Moghunter.ahud_name_font_italic = String(Moghunter.parameters['Name Font Italic'] || false);       
  839.         Moghunter.ahud_name_pos_x = Number(Moghunter.parameters['Name X-Axis'] || 5);
  840.         Moghunter.ahud_name_pos_y = Number(Moghunter.parameters['Name Y-Axis'] || 20);       
  841.        
  842.         // HP ICON POSITION
  843.         Moghunter.ahud_hp_icon_visible = String(Moghunter.parameters['HP Icon Visible'] || 'false');
  844.         Moghunter.ahud_hp_icon_halfMode = String(Moghunter.parameters['HP Icon Half Mode'] || 'false');       
  845.         Moghunter.ahud_hp_icon_colorMax = Number(Moghunter.parameters['HP Icon Max Colors'] || 2);         
  846.         Moghunter.ahud_hp_icon_rows = Number(Moghunter.parameters['HP Icon Max Rows'] || 10);
  847.         Moghunter.ahud_hp_icon_cols = Number(Moghunter.parameters['HP Icon Max Columns'] || 2);       
  848.         Moghunter.ahud_hp_icon_pos_x = Number(Moghunter.parameters['HP Icon X-Axis'] || 143);
  849.         Moghunter.ahud_hp_icon_pos_y = Number(Moghunter.parameters['HP Icon Y-Axis'] || 85);       
  850.         Moghunter.ahud_hp_icon_space_x = Number(Moghunter.parameters['HP Icon Space X'] || 0);
  851.         Moghunter.ahud_hp_icon_space_y = Number(Moghunter.parameters['HP Icon Space Y'] || 0);       
  852.         Moghunter.ahud_hp_icon_zoomAnime = String(Moghunter.parameters['HP Icon Zoom Anime'] || 'true');       
  853.        
  854.         // MP ICON POSITION
  855.         Moghunter.ahud_mp_icon_visible = String(Moghunter.parameters['MP Icon Visible'] || 'false');
  856.         Moghunter.ahud_mp_icon_halfMode = String(Moghunter.parameters['MP Icon Half Mode'] || 'false');       
  857.         Moghunter.ahud_mp_icon_colorMax = Number(Moghunter.parameters['MP Icon Max Colors'] || 2);         
  858.         Moghunter.ahud_mp_icon_rows = Number(Moghunter.parameters['MP Icon Max Rows'] || 10);
  859.         Moghunter.ahud_mp_icon_cols = Number(Moghunter.parameters['MP Icon Max Columns'] || 2);       
  860.         Moghunter.ahud_mp_icon_pos_x = Number(Moghunter.parameters['MP Icon X-Axis'] || 143);
  861.         Moghunter.ahud_mp_icon_pos_y = Number(Moghunter.parameters['MP Icon Y-Axis'] || 125);       
  862.         Moghunter.ahud_mp_icon_space_x = Number(Moghunter.parameters['MP Icon Space X'] || 0);
  863.         Moghunter.ahud_mp_icon_space_y = Number(Moghunter.parameters['MP Icon Space Y'] || 0);       
  864.         Moghunter.ahud_mp_icon_zoomAnime = String(Moghunter.parameters['MP Icon Zoom Anime'] || 'true');       

  865.         // TP ICON POSITION
  866.         Moghunter.ahud_tp_icon_visible = String(Moghunter.parameters['TP Icon Visible'] || 'false');
  867.         Moghunter.ahud_tp_icon_halfMode = String(Moghunter.parameters['TP Icon Half Mode'] || 'false');       
  868.         Moghunter.ahud_tp_icon_colorMax = Number(Moghunter.parameters['TP Icon Max Colors'] || 2);         
  869.         Moghunter.ahud_tp_icon_rows = Number(Moghunter.parameters['TP Icon Max Rows'] || 10);
  870.         Moghunter.ahud_tp_icon_cols = Number(Moghunter.parameters['TP Icon Max Columns'] || 2);       
  871.         Moghunter.ahud_tp_icon_pos_x = Number(Moghunter.parameters['TP Icon X-Axis'] || 143);
  872.         Moghunter.ahud_tp_icon_pos_y = Number(Moghunter.parameters['TP Icon Y-Axis'] || 50);       
  873.         Moghunter.ahud_tp_icon_space_x = Number(Moghunter.parameters['TP Icon Space X'] || 0);
  874.         Moghunter.ahud_tp_icon_space_y = Number(Moghunter.parameters['TP Icon Space Y'] || 0);       
  875.         Moghunter.ahud_tp_icon_zoomAnime = String(Moghunter.parameters['TP Icon Zoom Anime'] || 'true');       
  876.        
  877.         // HP METER POSITION
  878.         Moghunter.ahud_hp_meter_visible = String(Moghunter.parameters['HP Meter Visible'] || true);
  879.         Moghunter.ahud_hp_meter_pos_x = Number(Moghunter.parameters['HP Meter X-Axis'] || 143);
  880.         Moghunter.ahud_hp_meter_pos_y = Number(Moghunter.parameters['HP Meter Y-Axis'] || 85);
  881.         Moghunter.ahud_hp_meter_rotation = Number(Moghunter.parameters['HP Meter Angle'] || 0);
  882.         Moghunter.ahud_hp_meter_flow = String(Moghunter.parameters['HP Meter Flow Anime'] || true);
  883.         Moghunter.ahud_hp_flowSpd = Number(Moghunter.parameters['HP Meter Flow Speed'] || 2);
  884.        
  885.         // HP NUMBER POSITION
  886.         Moghunter.ahud_hp_number_visible  = String(Moghunter.parameters['HP Number Visible'] || true);
  887.         Moghunter.ahud_hp_number_align  = Number(Moghunter.parameters['HP Number Align'] || 0);
  888.         Moghunter.ahud_hp_number_pos_x  = Number(Moghunter.parameters['HP Number X-Axis'] || 270);
  889.         Moghunter.ahud_hp_number_pos_y  = Number(Moghunter.parameters['HP Number Y-Axis'] || 70);
  890.         Moghunter.ahud_maxhp_number_visible  = String(Moghunter.parameters['MaxHP Number Visible'] || false);
  891.         Moghunter.ahud_maxhp_number_pos_x  = Number(Moghunter.parameters['MaxHP Number X-Axis'] || 125);
  892.         Moghunter.ahud_maxhp_number_pos_y  = Number(Moghunter.parameters['MaxHP Number Y-Axis'] || 13);       

  893.         // MP METER POSITION
  894.         Moghunter.ahud_mp_meter_visible = String(Moghunter.parameters['MP Meter Visible'] || true);
  895.         Moghunter.ahud_mp_meter_pos_x = Number(Moghunter.parameters['MP Meter X-Axis'] || 160);
  896.         Moghunter.ahud_mp_meter_pos_y = Number(Moghunter.parameters['MP Meter Y-Axis'] || 115);       
  897.         Moghunter.ahud_mp_meter_rotation = Number(Moghunter.parameters['MP Meter Angle'] || 0);
  898.         Moghunter.ahud_mp_meter_flow = String(Moghunter.parameters['MP Meter Flow Anime'] || true);
  899.         Moghunter.ahud_mp_flowSpd = Number(Moghunter.parameters['MP Meter Flow Speed'] || 2);
  900.        
  901.         // MP NUMBER POSITION
  902.         Moghunter.ahud_mp_number_visible  = String(Moghunter.parameters['MP Number Visible'] || true);
  903.     Moghunter.ahud_mp_number_align  = Number(Moghunter.parameters['MP Number Align'] || 0);       
  904.         Moghunter.ahud_mp_number_pos_x  = Number(Moghunter.parameters['MP Number X-Axis'] || 287);
  905.         Moghunter.ahud_mp_number_pos_y  = Number(Moghunter.parameters['MP Number Y-Axis'] || 100);
  906.         Moghunter.ahud_maxmp_number_visible  = String(Moghunter.parameters['MaxMP Number Visible'] || false);
  907.         Moghunter.ahud_maxmp_number_pos_x  = Number(Moghunter.parameters['MaxMP Number X-Axis'] || 196);
  908.         Moghunter.ahud_maxmp_number_pos_y  = Number(Moghunter.parameters['MaxMP Number Y-Axis'] || 78);       

  909.         // TP METER POSITION
  910.         Moghunter.ahud_tp_meter_visible = String(Moghunter.parameters['TP Meter Visible'] || true);
  911.         Moghunter.ahud_tp_meter_pos_x = Number(Moghunter.parameters['TP Meter X-Axis'] || 143);
  912.         Moghunter.ahud_tp_meter_pos_y = Number(Moghunter.parameters['TP Meter Y-Axis'] || 145);       
  913.         Moghunter.ahud_tp_meter_rotation = Number(Moghunter.parameters['TP Meter Angle'] || 0);
  914.         Moghunter.ahud_tp_meter_flow = String(Moghunter.parameters['TP Meter Flow Anime'] || false);
  915.         Moghunter.ahud_tp_flowSpd = Number(Moghunter.parameters['TP Meter Flow Speed'] || 2);
  916.        
  917.         // TP NUMBER POSITION
  918.         Moghunter.ahud_tp_number_visible  = String(Moghunter.parameters['TP Number Visible'] || true);
  919.         Moghunter.ahud_tp_number_align  = Number(Moghunter.parameters['TP Number Align'] || 0);       
  920.         Moghunter.ahud_tp_number_pos_x  = Number(Moghunter.parameters['TP Number X-Axis'] || 270);
  921.         Moghunter.ahud_tp_number_pos_y  = Number(Moghunter.parameters['TP Number Y-Axis'] || 130);
  922.         Moghunter.ahud_maxtp_number_visible  = String(Moghunter.parameters['MaxTP Number Visible'] || false);
  923.         Moghunter.ahud_maxtp_number_pos_x  = Number(Moghunter.parameters['MaxTP Number X-Axis'] || 185);
  924.         Moghunter.ahud_maxtp_number_pos_y  = Number(Moghunter.parameters['MaxTP Number Y-Axis'] || 116);       

  925.         // Level NUMBER POSITION
  926.         Moghunter.ahud_level_number_visible  = String(Moghunter.parameters['Level Number Visible'] || true);
  927.         Moghunter.ahud_level_number_align  = Number(Moghunter.parameters['Level Number Align'] || 1);       
  928.         Moghunter.ahud_level_number_pos_x  = Number(Moghunter.parameters['Level Number X-Axis'] || 65);
  929.         Moghunter.ahud_level_number_pos_y  = Number(Moghunter.parameters['Level Number Y-Axis'] || 153);

  930.     // EXP METER POSITION
  931.         Moghunter.ahud_exp_meter_visible = String(Moghunter.parameters['EXP Meter Visible'] || true);
  932.         Moghunter.ahud_exp_meter_pos_x = Number(Moghunter.parameters['EXP Meter X-Axis'] || 127);
  933.         Moghunter.ahud_exp_meter_pos_y = Number(Moghunter.parameters['EXP Meter Y-Axis'] || 173);       
  934.         Moghunter.ahud_exp_meter_rotation = Number(Moghunter.parameters['EXP Meter Angle'] || 0);
  935.        
  936.         // STATES POSITION
  937.         Moghunter.ahud_states_visible = String(Moghunter.parameters['States Visible'] || true);
  938.         Moghunter.ahud_states_pos_x = Number(Moghunter.parameters['States X-Axis'] || 5);
  939.         Moghunter.ahud_states_pos_y = Number(Moghunter.parameters['States Y-Axis'] || 64);       

  940.     Moghunter.ahud_hudvisible = String(Moghunter.parameters['Initial Visible'] || "false");       
  941.     Moghunter.ahud_smartFade = String(Moghunter.parameters['Smart Fade'] || "true");       
  942.         Moghunter.ahud_autoFade = String(Moghunter.parameters['Auto Fade'] || "true");
  943.                
  944. //=============================================================================
  945. // ** ImageManager
  946. //=============================================================================

  947. //==============================
  948. // * Actor Hud
  949. //==============================
  950. ImageManager.loadAHud = function(filename) {
  951.     return this.loadBitmap('img/actorhud/', filename, 0, true);
  952. };                       

  953. //=============================================================================
  954. // ** Game_System
  955. //=============================================================================

  956. //==============================
  957. // * Initialize
  958. //==============================
  959. var _alias_mog_ahud_sys_initialize = Game_System.prototype.initialize;
  960. Game_System.prototype.initialize = function() {
  961.         _alias_mog_ahud_sys_initialize.call(this);
  962.         this._ahud_position = [0,0];
  963.         this._ahud_visible = String(Moghunter.ahud_hudvisible) === "true" ? true : false;
  964.         this._ahud_smartFade = String(Moghunter.ahud_smartFade) === "true" ? true : false;
  965.         this._ahud_autoFade = String(Moghunter.ahud_autoFade) === "true" ? true : false;
  966.         this._ahud_opacity = 0;
  967.         this._ahud_flowData = [0,0,0];
  968. };

  969. //=============================================================================
  970. // ** Game BattlerBase
  971. //=============================================================================

  972. //==============================
  973. // * Initialize
  974. //==============================
  975. var _alias_mog_ahud_gbat_initMembers = Game_BattlerBase.prototype.initMembers
  976. Game_BattlerBase.prototype.initMembers = function() {
  977.         _alias_mog_ahud_gbat_initMembers.call(this);
  978.         this._ahud_face_data = [0,0,0,0];
  979. };

  980. //=============================================================================
  981. // ** Game Actor
  982. //=============================================================================

  983. //==============================
  984. // * Current EXP R
  985. //==============================
  986. Game_Actor.prototype.current_exp_r = function() {
  987.     return this.nextLevelExp() - this.nextRequiredExp() - this.expForLevel(this._level);
  988. };

  989. //==============================
  990. // * Next Level EXP R
  991. //==============================
  992. Game_Actor.prototype.nextLevelExp_r = function() {
  993.     return this.expForLevel(this._level + 1) - this.expForLevel(this._level) ;
  994. };

  995. //=============================================================================
  996. // ** Game Character Base
  997. //=============================================================================

  998. //==============================
  999. // * Screen RealX
  1000. //==============================
  1001. Game_CharacterBase.prototype.screen_realX = function() {
  1002.     return this.scrolledX() * $gameMap.tileWidth();
  1003. };

  1004. //==============================
  1005. // * Screen RealY
  1006. //==============================
  1007. Game_CharacterBase.prototype.screen_realY = function() {
  1008.     return this.scrolledY() * $gameMap.tileHeight();
  1009. };

  1010. //=============================================================================
  1011. // ** Game_Interpreter
  1012. //=============================================================================       

  1013. //==============================
  1014. // * PluginCommand
  1015. //==============================
  1016. var _alias_mog_actorhud_pluginCommand = Game_Interpreter.prototype.pluginCommand
  1017. Game_Interpreter.prototype.pluginCommand = function(command, args) {
  1018.         _alias_mog_actorhud_pluginCommand.call(this,command, args)
  1019.         if (command === "show_actor_hud")  { $gameSystem._ahud_visible = true};
  1020.         if (command === "hide_actor_hud")  { $gameSystem._ahud_visible = false;};
  1021.         return true;
  1022. };

  1023. //=============================================================================
  1024. // ** Scene Base
  1025. //=============================================================================

  1026. //==============================
  1027. // ** create Hud Field
  1028. //==============================
  1029. Scene_Base.prototype.createHudField = function() {
  1030.         this._hudField = new Sprite();
  1031.         this._hudField.z = 10;
  1032.         this.addChild(this._hudField);
  1033. };

  1034. //==============================
  1035. // ** sort MZ
  1036. //==============================
  1037. Scene_Base.prototype.sortMz = function() {
  1038.    this._hudField.children.sort(function(a, b){return a.mz-b.mz});
  1039. };

  1040. //=============================================================================
  1041. // ** Scene Map
  1042. //=============================================================================

  1043. //==============================
  1044. // ** create Spriteset
  1045. //==============================
  1046. var _mog_actorHud_sMap_createSpriteset = Scene_Map.prototype.createSpriteset;
  1047. Scene_Map.prototype.createSpriteset = function() {
  1048.         _mog_actorHud_sMap_createSpriteset.call(this);
  1049.         if (!this._hudField) {this.createHudField()};
  1050.         this.createActorHud();
  1051.         this.sortMz();
  1052. };

  1053. //==============================
  1054. // * Create Actor Hud
  1055. //==============================
  1056. Scene_Map.prototype.createActorHud = function() {
  1057.         this._actorHud = new Actor_Hud();
  1058.         this._actorHud.mz = 101;
  1059.         this._hudField.addChild(this._actorHud);       
  1060. };

  1061. //=============================================================================
  1062. // * Actor_Hud
  1063. //=============================================================================
  1064. function Actor_Hud() {
  1065.     this.initialize.apply(this, arguments);
  1066. };

  1067. Actor_Hud.prototype = Object.create(Sprite.prototype);
  1068. Actor_Hud.prototype.constructor = Actor_Hud;

  1069. //==============================
  1070. // * Initialize
  1071. //==============================
  1072. Actor_Hud.prototype.initialize = function(hud_id) {
  1073.     Sprite.prototype.initialize.call(this);
  1074.         this.visible = false;       
  1075.     this._data_initial_ref = [0,true];
  1076.         this._hud_id = hud_id;
  1077.         this._hud_size = [-1,-1,-1,-1];
  1078.     this.base_parameter_clear();
  1079.     this.load_img();
  1080.         if (!$gameSystem._ahud_visible) {
  1081.                 $gameSystem._ahud_opacity = 0;
  1082.                 this.opacity = 0
  1083.         };
  1084.         this.opacity = $gameSystem._ahud_opacity;
  1085.         this.update();
  1086. };

  1087. //==============================
  1088. // * Load Img
  1089. //==============================
  1090. Actor_Hud.prototype.load_img = function() {
  1091.         this._layout_img = ImageManager.loadAHud("Layout");
  1092.         this._state_img = ImageManager.loadSystem("IconSet");
  1093.         if (String(Moghunter.ahud_layout2_visible) == "true") {this._layout2_img = ImageManager.loadAHud("Layout2")};
  1094.         if (String(Moghunter.ahud_hp_meter_visible) == "true") {this._hp_meter_img = ImageManager.loadAHud("HP_Meter")};
  1095.         if (String(Moghunter.ahud_mp_meter_visible) == "true") {this._mp_meter_img = ImageManager.loadAHud("MP_Meter")};
  1096.         if (String(Moghunter.ahud_tp_meter_visible) == "true") {this._tp_meter_img = ImageManager.loadAHud("TP_Meter")};       
  1097.         if (String(Moghunter.ahud_hp_icon_visible) == "true") {this._hp_icon_img = ImageManager.loadAHud("HP_Icon")};
  1098.         if (String(Moghunter.ahud_mp_icon_visible) == "true") {this._mp_icon_img = ImageManager.loadAHud("MP_Icon")};
  1099.         if (String(Moghunter.ahud_tp_icon_visible) == "true") {this._tp_icon_img = ImageManager.loadAHud("TP_Icon")};       
  1100.         if (String(Moghunter.ahud_exp_meter_visible) == "true") {this._exp_meter_img = ImageManager.loadAHud("EXP_Meter")};
  1101.         if (String(Moghunter.ahud_hp_number_visible) == "true") {this._hp_number_img = ImageManager.loadAHud("HP_Number")};
  1102.         if (String(Moghunter.ahud_mp_number_visible) == "true") {this._mp_number_img = ImageManager.loadAHud("MP_Number")};
  1103.         if (String(Moghunter.ahud_tp_number_visible) == "true") {this._tp_number_img = ImageManager.loadAHud("TP_Number")};
  1104.         if (String(Moghunter.ahud_level_number_visible) == "true") {this._level_number_img = ImageManager.loadAHud("LV_Number")};
  1105.         if (String(Moghunter.ahud_maxhp_number_visible) == "true") {this._maxhp_number_img = ImageManager.loadAHud("HP_Number2")};
  1106.         if (String(Moghunter.ahud_maxmp_number_visible) == "true") {this._maxmp_number_img = ImageManager.loadAHud("MP_Number2")};
  1107.         if (String(Moghunter.ahud_maxtp_number_visible) == "true") {this._maxtp_number_img = ImageManager.loadAHud("TP_Number2")};       
  1108. };

  1109. //==============================
  1110. // * Base Parameter Clear
  1111. //==============================
  1112. Actor_Hud.prototype.base_parameter_clear = function() {
  1113.          this._hp_old = [-1,-1];
  1114.          this._maxhp_old = [-1,-1];
  1115.          this._hp_old_ani = [-1,-1];
  1116.          this._hp_flow = [false,0,0,0];
  1117.      this._mp_old = [-1,-1];
  1118.          this._maxmp_old = [-1,-1];
  1119.          this._mp_old_ani = [-1,-1];
  1120.          this._mp_flow = [false,0,0,0];
  1121.          this._tp_old = [-1,-1];
  1122.          this._maxtp_old = [-1,-1];
  1123.          this._tp_old_ani = -1;
  1124.          this._tp_flow = [false,0,0,0];
  1125.          this._exp_old = [-1,-1];
  1126.          this._exp_flow = [false,0,0,0];       
  1127.          this._hp_number_old = -1;
  1128.          this._mp_number_old = -1;
  1129.          this._hp_number_old = -1;         
  1130.          this._hp_icon_old = [-1,-1];
  1131.          this._mp_icon_old = [-1,-1];
  1132.          this._tp_icon_old = [-1,-1];
  1133.          this._hp_img_data = [0,0,0];
  1134.          this._mp_img_data = [0,0,0];
  1135.          this._tp_img_data = [0,0,0];
  1136.          this._states_old = [];
  1137.          this._states_data = [0,0,0];
  1138.          this._active = false;
  1139.          this._hp_flow_speed = Moghunter.ahud_hp_flowSpd * 0.1;
  1140.          this._mp_flow_speed = Moghunter.ahud_mp_flowSpd * 0.1;
  1141.          this._tp_flow_speed = Moghunter.ahud_tp_flowSpd * 0.1;
  1142.          this._hud_size = [0,0];
  1143. };

  1144. //==============================
  1145. // * Need Refresh Bhud
  1146. //==============================
  1147. Actor_Hud.prototype.need_refreh_bhud = function() {
  1148.         if (this._data_initial_ref[1]) {return true};
  1149.         if (this._battler != $gameParty.members()[0]) {return true};
  1150.         return false;
  1151. };

  1152. //==============================
  1153. // * Refresh Bhud
  1154. //==============================
  1155. Actor_Hud.prototype.refresh_bhud = function() {
  1156.          this._data_initial_ref[1] = false;
  1157.          this._battler = $gameParty.members()[0];
  1158.          this._hud_size = [0,0];
  1159.          this.base_parameter_clear();
  1160.          this.create_base_sprites();
  1161. };

  1162. //==============================
  1163. // * Refresh Position
  1164. //==============================
  1165. Actor_Hud.prototype.refresh_position = function() {
  1166.          this.set_hud_position();         
  1167.          this.visible = true;     
  1168.          this.create_sprites();
  1169.          this._layout.x = this._pos_x;
  1170.          this._layout.y = this._pos_y;
  1171.          if (this._face) {
  1172.               this._face.x = this._pos_x + Moghunter.ahud_face_pos_x;
  1173.              this._face.y = this._pos_y + Moghunter.ahud_face_pos_y;
  1174.                  this._battler._face_pos = [this._face.x,this._face.y];
  1175.      };
  1176. };

  1177. //==============================
  1178. // * Set Hud Position
  1179. //==============================
  1180. Actor_Hud.prototype.set_hud_position = function() {
  1181.      this._hud_size[0] = Moghunter.ahud_pos_x - ($gameMap.tileWidth() / 2);
  1182.      this._hud_size[1] = Moghunter.ahud_pos_y - ($gameMap.tileHeight() / 2);
  1183.      this._hud_size[2] = Moghunter.ahud_pos_x + this._layout.bitmap.width - $gameMap.tileWidth();
  1184.      this._hud_size[3] = Moghunter.ahud_pos_y + this._layout.bitmap.height;         
  1185.          this._pos_x = Moghunter.ahud_pos_x;
  1186.          this._pos_y = Moghunter.ahud_pos_y;
  1187. };

  1188. //==============================
  1189. // * Update
  1190. //==============================
  1191. Actor_Hud.prototype.update = function() {
  1192.     Sprite.prototype.update.call(this);       
  1193.         if (this.need_refreh_bhud()) {this.refresh_bhud()};
  1194.     if (!this._battler) {this.visible = false;return};
  1195.         if (!this._layout_img.isReady()) {return};
  1196.         if (this._hud_size[0] === 0) {this.refresh_position();return};
  1197.         this.update_sprites();
  1198. };

  1199. //==============================
  1200. // * Create Base Sprites
  1201. //==============================
  1202. Actor_Hud.prototype.create_base_sprites = function() {
  1203.         if (Number(Moghunter.ahud_face_priority) === 0) {
  1204.                this.create_face();
  1205.             this.create_layout();}
  1206.         else {
  1207.                 this.create_layout();
  1208.                this.create_face();                           
  1209.     };
  1210. };

  1211. //==============================
  1212. // * Create Sprites
  1213. //==============================
  1214. Actor_Hud.prototype.create_sprites = function() {
  1215.         this.create_hp_meter();
  1216.         this.create_mp_meter();
  1217.     this.create_tp_meter();
  1218.         this.create_hp_icon();
  1219.         this.create_mp_icon();
  1220.     this.create_tp_icon();
  1221.         this.create_exp_meter();
  1222.         if (this._layout2_img) {this.create_layout2()};
  1223.         this.create_hp_number();
  1224.         this.create_maxhp_number();
  1225.         this.create_mp_number();       
  1226.     this.create_maxmp_number();
  1227.         this.create_tp_number();
  1228.         this.create_level_number();
  1229.         this.create_maxtp_number();
  1230.     this.create_states();       
  1231.         this.create_name();
  1232. };

  1233. //==============================
  1234. // * Update Sprites
  1235. //==============================
  1236. Actor_Hud.prototype.update_sprites = function() {       
  1237.         this.update_visible();
  1238.         this.update_face();       
  1239.     this.update_hp();
  1240.         this.update_mp();
  1241.     this.update_tp();
  1242.     this.update_states();
  1243.         this.update_exp();
  1244. };

  1245. //==============================
  1246. // * Need Hide
  1247. //==============================
  1248. Actor_Hud.prototype.needHide = function(start) {
  1249.         if (Imported.MOG_ChronoEngine && $gameSystem.isChronoMode()) {return true};
  1250.     if (!this._battler) {return true};       
  1251.         if (!$gameSystem._ahud_visible) {return true};
  1252.         if (!$gameSystem._ahud_autoFade) {return false};
  1253.         if ($gameMessage.isBusy()) {return true};
  1254.         return false
  1255. };

  1256. //==============================
  1257. // * Update visible
  1258. //==============================
  1259. Actor_Hud.prototype.update_visible = function() {
  1260.          this.visible = true;
  1261.      if (this.needHide(false)) {
  1262.                  this.opacity -= 15;
  1263.          } else {                        
  1264.                 if (this.needFade()) {
  1265.                         if (this.opacity > Moghunter.ahud_fade_limit) {
  1266.                                 this.opacity -= 10;
  1267.                                 if (this.opacity < Moghunter.ahud_fade_limit) {this.opacity = Moghunter.ahud_fade_limit};
  1268.                          };
  1269.                 } else {
  1270.                                  this.opacity += 10;
  1271.                 };               
  1272.          };
  1273.          $gameSystem._ahud_opacity = this.opacity;
  1274. };

  1275. //==============================
  1276. // * Need Fade
  1277. //==============================
  1278. Actor_Hud.prototype.needFade = function() {
  1279.     if (this._hud_size[0] === -1) {return false};
  1280.         if (!this._battler) {return false};
  1281.         if (!$gameSystem._ahud_smartFade) {return false};
  1282.         if ($gamePlayer.screen_realX() < this._hud_size[0]) {return false};
  1283.         if ($gamePlayer.screen_realX() > this._hud_size[2]) {return false};
  1284.         if ($gamePlayer.screen_realY() < this._hud_size[1]) {return false};
  1285.         if ($gamePlayer.screen_realY() > this._hud_size[3]) {return false};       
  1286.     return true;
  1287. };


  1288. //==============================
  1289. // * Update Dif
  1290. //==============================
  1291. Actor_Hud.prototype.update_dif = function(value,real_value,speed) {
  1292.         if (value == real_value) {return value};
  1293.         var dnspeed = 1 + (Math.abs(value - real_value) / speed);
  1294.         if (value > real_value) {value -= dnspeed;
  1295.             if (value < real_value) {value = real_value};}
  1296.     else if (value < real_value) {value  += dnspeed;
  1297.             if (value  > real_value) {value  = real_value};               
  1298.     };
  1299.         return Math.floor(value);
  1300. };

  1301. //==============================
  1302. // * Refresh Meter
  1303. //==============================
  1304. Actor_Hud.prototype.refresh_meter = function(sprite,value,value_max,type,div) {
  1305.         var ch = sprite.bitmap.height / div;
  1306.     var meter_rate = sprite.bitmap.width * value / value_max;
  1307.         sprite.setFrame(0,type * ch, meter_rate, ch);
  1308. };

  1309. //==============================
  1310. // * Refresh Flow
  1311. //==============================
  1312. Actor_Hud.prototype.refresh_meter_flow = function(sprite,value,value_max,type,flow) {
  1313.         var cw = sprite.bitmap.width / 3;
  1314.         var ch = sprite.bitmap.height / 2;
  1315.     var meter_rate = cw * value / value_max;
  1316.         sprite.setFrame(flow,type * ch, meter_rate, ch);
  1317. };

  1318. //==============================
  1319. // * Refresh Number
  1320. //==============================
  1321. Actor_Hud.prototype.refresh_number = function(sprites,value,img_data,x,center) {
  1322.     numbers = Math.abs(value).toString().split("");  
  1323.            for (var i = 0; i < sprites.length ; i++) {sprites[i].visible = false;
  1324.            if (i > numbers.length) {return};
  1325.            var n = Number(numbers[i]);
  1326.            sprites[i].setFrame(n * img_data[2], 0, img_data[2], img_data[1]);
  1327.            sprites[i].visible = true;
  1328.            var nx = -(img_data[2] * i) + (img_data[2] * numbers.length);
  1329.            if (sprites.align === 1) {
  1330.               var xi = (img_data[2] * numbers.length) / 2;                  
  1331.                    sprites[i].x = x + xi - nx;
  1332.        } else if (sprites.align === 2) {
  1333.                var xi = img_data[2] * numbers.length;                  
  1334.                    sprites[i].x = x + xi - nx;
  1335.               } else {
  1336.                    sprites[i].x = x - nx;
  1337.            };
  1338.     };
  1339. };

  1340. //==============================
  1341. // * Need Refresh Parameter
  1342. //==============================
  1343. Actor_Hud.prototype.need_refresh_parameter = function(parameter) {
  1344.   switch (parameter) {
  1345.           case 0:
  1346.          if (this._hp_old[0] != this._battler.hp) {return true};
  1347.                  if (this._hp_old[1] != this._battler.mhp) {return true};
  1348.          break;
  1349.           case 1:
  1350.          if (this._mp_old[0] != this._battler.mp) {return true};
  1351.                  if (this._mp_old[1] != this._battler.mmp) {return true};
  1352.          break;                       
  1353.           case 2:
  1354.          if (this._tp_old[0] != this._battler.tp) {return true};                 
  1355.                  if (this._tp_old[1] != this._battler.maxTp()) {return true};
  1356.          break;       
  1357.           case 3:
  1358.          if (this._exp_old != this._battler.currentExp()) {return true};
  1359.          break;                                                        
  1360.   };
  1361.   return false;
  1362. };

  1363. //==============================
  1364. // * Create Layout
  1365. //==============================
  1366. Actor_Hud.prototype.create_layout = function() {
  1367.         this.removeChild(this._layout);
  1368.         if (!this._battler) {return};
  1369.         this._layout = new Sprite(this._layout_img);
  1370.         this.addChild(this._layout);
  1371. };

  1372. //==============================
  1373. // * Create Layout 2
  1374. //==============================
  1375. Actor_Hud.prototype.create_layout2 = function() {
  1376.         this.removeChild(this._layout2);
  1377.         if (!this._battler) {return};
  1378.         this._layout2 = new Sprite(this._layout2_img);
  1379.         this._layout2.x = Moghunter.ahud_layout2_x;
  1380.         this._layout2.y = Moghunter.ahud_layout2_y;
  1381.         this.addChild(this._layout2);
  1382. };
  1383.        
  1384. //==============================
  1385. // * Create Face
  1386. //==============================
  1387. Actor_Hud.prototype.create_face = function() {
  1388.         if (String(Moghunter.ahud_face_visible) != "true") {return};
  1389.         this.removeChild(this._face);
  1390.         if (!this._battler) {return};       
  1391.         this._face = new Sprite(ImageManager.loadAHud("Face_" + this._battler._actorId));
  1392.         this._face.anchor.x = 0.5;
  1393.         this._face.anchor.y = 0.5;
  1394.         this._face_data = [0,0,false,false,false,-1];
  1395.         if (String(Moghunter.ahud_face_shake) === "true") {this._face_data[2] = true}
  1396.         if (String(Moghunter.ahud_face_animated) === "true") {this._face_data[4] = true}
  1397.         this._battler._ahud_face_data = [0,0,0,0]
  1398.         this.addChild(this._face);
  1399. };

  1400. //==============================
  1401. // * Update Face
  1402. //==============================
  1403. Actor_Hud.prototype.update_face = function() {
  1404.         if (!this._face) {return};
  1405.         if (!this._face.bitmap.isReady()) {return};
  1406.         if (this._face_data[4] && this._face_data[5] != this._battler._ahud_face_data[2]) {this.refresh_face();};
  1407.     this.update_face_animation();
  1408.     this.update_face_shake();
  1409.     this.update_face_zoom();
  1410. };

  1411. //==============================
  1412. // * Refresh Face
  1413. //==============================
  1414. Actor_Hud.prototype.refresh_face = function() {
  1415.         this._face_data[5] = this._battler._ahud_face_data[2];
  1416.         var cw = this._face.bitmap.width / 5;
  1417.         var ch = this._face.bitmap.height;
  1418.         this._face.setFrame(cw * this._face_data[5], 0, cw, ch);
  1419. };

  1420. //==============================
  1421. // * Update Face Animation
  1422. //==============================
  1423. Actor_Hud.prototype.update_face_animation = function() {
  1424.         if (this._battler._ahud_face_data[3] > 0) {this._battler._ahud_face_data[3] -= 1;
  1425.             if (this._battler._ahud_face_data[3] === 0) {
  1426.                         if (this._battler.isDead()) {this._battler._ahud_face_data[2] = 4}
  1427.                         else if (this._battler.hp <= 30 * this._battler.mhp / 100) {this._battler._ahud_face_data[2] = 3}
  1428.                         else {this._battler._ahud_face_data[2] = 0};
  1429.                         };
  1430.         };
  1431. };

  1432. //==============================
  1433. // * Update Face Zoom
  1434. //==============================
  1435. Actor_Hud.prototype.update_face_zoom = function() {
  1436.         if (this._battler._ahud_face_data[1] > 0) {this._battler._ahud_face_data[1] -= 1;
  1437.             if (this._battler._ahud_face_data[1] == 0) {this._face.scale.x = 1.00}
  1438.                 else if (this._battler._ahud_face_data[1] < 20) {this._face.scale.x -= 0.01;
  1439.                          if (this._face.scale.x < 1.00) {this._face.scale.x = 1.00;};       
  1440.             }
  1441.                 else if (this._battler._ahud_face_data[1] < 40){this._face.scale.x += 0.01;
  1442.                          if (this._face.scale.x > 1.25) {this._face.scale.x = 1.25;};
  1443.             };
  1444.             this._face.scale.y = this._face.scale.x;
  1445.         };
  1446. };

  1447. //==============================
  1448. // * Update Face Shake
  1449. //==============================
  1450. Actor_Hud.prototype.update_face_shake = function() {
  1451.         this._face.x = this._pos_x + Moghunter.ahud_face_pos_x;
  1452.         if (this._face_data[2] && this._battler._ahud_face_data[0] > 0) {this._battler._ahud_face_data[0] -= 1;
  1453.             this._face.x = this._pos_x + Moghunter.ahud_face_pos_x + ((Math.random() * 12) - 6);
  1454.         };
  1455. };

  1456. //==============================
  1457. // * Create Name
  1458. //==============================
  1459. Actor_Hud.prototype.create_name = function() {
  1460.         if (String(Moghunter.ahud_name_visible) != "true") {return};
  1461.         this.removeChild(this._name);
  1462.         if (!this._battler) {return};       
  1463.         this._name = new Sprite(new Bitmap(300,48));
  1464.         this._name.x = this._pos_x + Moghunter.ahud_name_pos_x;
  1465.         this._name.y = this._pos_y + Moghunter.ahud_name_pos_y;
  1466.         this._name.bitmap.fontSize = Number(Moghunter.ahud_name_font_size);
  1467.         if (String(Moghunter.ahud_name_font_italic) === "true") {this._name.bitmap.fontItalic = true};
  1468.     this._name.bitmap.outlineWidth = Number(Moghunter.ahud_name_font_bold_size);
  1469.         this.addChild(this._name);       
  1470.         this.refresh_name();
  1471. };

  1472. //==============================
  1473. // * Refresh Name
  1474. //==============================
  1475. Actor_Hud.prototype.refresh_name = function() {
  1476.         this._name.bitmap.clear();
  1477.         this._name.bitmap.drawText(this._battler._name, 0, 0, this._name.bitmap.width, this._name.bitmap.height,0);       
  1478. };

  1479. //==============================
  1480. // * Create HP Meter
  1481. //==============================
  1482. Actor_Hud.prototype.create_hp_meter = function() {
  1483.         if (String(Moghunter.ahud_hp_meter_visible) != "true") {return};
  1484.         this.removeChild(this._hp_meter_blue);
  1485.         this.removeChild(this._hp_meter_red);
  1486.         if (!this._battler) {return};
  1487.         this._hp_meter_red = new Sprite(this._hp_meter_img);
  1488.         this._hp_meter_red.x = this._pos_x + Moghunter.ahud_hp_meter_pos_x;
  1489.         this._hp_meter_red.y = this._pos_y + Moghunter.ahud_hp_meter_pos_y;
  1490.         this._hp_meter_red.rotation = Moghunter.ahud_hp_meter_rotation * Math.PI / 180;
  1491.         this._hp_meter_red.setFrame(0,0,0,0);
  1492.         this.addChild(this._hp_meter_red);               
  1493.         this._hp_meter_blue = new Sprite(this._hp_meter_img);
  1494.         this._hp_meter_blue.x = this._hp_meter_red.x;
  1495.         this._hp_meter_blue.y = this._hp_meter_red.y;
  1496.         this._hp_meter_blue.rotation = this._hp_meter_red.rotation * Math.PI / 180;
  1497.         this._hp_meter_blue.setFrame(0,0,0,0);
  1498.         this.addChild(this._hp_meter_blue);
  1499.         this._hp_old_ani[0] = this._battler.hp - 1;
  1500.         if (String(Moghunter.ahud_hp_meter_flow) === "true") {this._hp_flow[0] = true;
  1501.             this._hp_flow[2] = this._hp_meter_img.width / 3;
  1502.                 this._hp_flow[3] = this._hp_flow[2] * 2;
  1503.                 this._hp_flow[1] = Math.floor(Math.random() * this._hp_flow[2]);
  1504.         };
  1505. };

  1506. //==============================
  1507. // * Create HP icon
  1508. //==============================
  1509. Actor_Hud.prototype.create_hp_icon = function() {
  1510.    if (String(Moghunter.ahud_hp_icon_visible) != "true") {return};
  1511.         if (this._hp_icons) {
  1512.             for (var i = 0; i < this._hp_icons.length; i++) {
  1513.                         this.removeChild(this._hp_icons[i]);
  1514.             };
  1515.             for (var i = 0; i < this._hp_iconsB.length; i++) {
  1516.                         this.removeChild(this._hp_iconsB[i]);
  1517.             };
  1518.         };       
  1519.         if (!this._battler) {return};       
  1520.         var n_icons = Moghunter.ahud_hp_icon_rows * Moghunter.ahud_hp_icon_cols;
  1521.         this._hp_icons = [];
  1522.         this._hp_icons.iconMode = String(Moghunter.ahud_hp_icon_halfMode) == "true" ? true : false;
  1523.         this._hp_iconsB = [];

  1524.         this._hp_iconsB.iconMode = this._hp_icons.iconMode;
  1525.         this._hp_IconZoomAnime = String(Moghunter.ahud_hp_icon_zoomAnime) == "true" ? true : false;
  1526.         var colors = Math.max(Moghunter.ahud_hp_icon_colorMax, 2)
  1527.         var cw = this._hp_icon_img.width / colors;
  1528.         var ch = this._hp_icon_img.height / 2;
  1529.         for (var i = 0; i < n_icons; i++) {
  1530.                  this._hp_iconsB[i] = new Sprite(this._hp_icon_img);
  1531.                  this._hp_iconsB[i].colorMax = colors;
  1532.                  this._hp_iconsB[i].anchor.x = 0.5;
  1533.                  this._hp_iconsB[i].anchor.y = 0.5;
  1534.                  this._hp_iconsB[i].rows = Moghunter.ahud_hp_icon_rows;
  1535.                  this._hp_iconsB[i].cols = Moghunter.ahud_hp_icon_cols;
  1536.                  this._hp_iconsB[i].org = [this._pos_x + Moghunter.ahud_hp_icon_pos_x - cw,this._pos_y + Moghunter.ahud_hp_icon_pos_y - ch];
  1537.                  this._hp_iconsB[i].spc = [Moghunter.ahud_hp_icon_space_x,Moghunter.ahud_hp_icon_space_y];
  1538.                  this._hp_iconsB[i].zoomA = this._hp_IconZoomAnime;
  1539.                  this._hp_iconsB[i].zoomData = [0,0,0,1.00];
  1540.                  this._hp_iconsB[i].visible = false;
  1541.                  this._hp_iconsB[i].enabled = false;
  1542.                  this.addChild(this._hp_iconsB[i]);
  1543.         };               
  1544.         for (var i = 0; i < n_icons; i++) {
  1545.                  this._hp_icons[i] = new Sprite(this._hp_icon_img);
  1546.                  this._hp_icons[i].colorMax = Math.max(Moghunter.ahud_hp_icon_colorMax, 2);
  1547.                  this._hp_icons[i].anchor.x = 0.5;
  1548.                  this._hp_icons[i].anchor.y = 0.5;                 
  1549.                  this._hp_icons[i].rows = Moghunter.ahud_hp_icon_rows;
  1550.                  this._hp_icons[i].cols = Moghunter.ahud_hp_icon_cols;
  1551.                  this._hp_icons[i].org = [this._pos_x + Moghunter.ahud_hp_icon_pos_x - cw,this._pos_y + Moghunter.ahud_hp_icon_pos_y - ch];
  1552.                  this._hp_icons[i].spc = [Moghunter.ahud_hp_icon_space_x,Moghunter.ahud_hp_icon_space_y];
  1553.                  this._hp_icons[i].zoomA = this._hp_IconZoomAnime;
  1554.                  this._hp_icons[i].zoomData = [0,0,0,1.00];         
  1555.                  this._hp_icons[i].visible = false;
  1556.                  this._hp_icons[i].enabled = false;
  1557.                  this.addChild(this._hp_icons[i]);
  1558.         };
  1559. };

  1560. //==============================
  1561. // * Create MP icon
  1562. //==============================
  1563. Actor_Hud.prototype.create_mp_icon = function() {
  1564.    if (String(Moghunter.ahud_mp_icon_visible) != "true") {return};
  1565.         if (this._mp_icons) {
  1566.             for (var i = 0; i < this._mp_icons.length; i++) {
  1567.                         this.removeChild(this._mp_icons[i]);
  1568.             };
  1569.             for (var i = 0; i < this._mp_iconsB.length; i++) {
  1570.                         this.removeChild(this._mp_iconsB[i]);
  1571.             };
  1572.         };       
  1573.         if (!this._battler) {return};       
  1574.         var n_icons = Moghunter.ahud_mp_icon_rows * Moghunter.ahud_mp_icon_cols;
  1575.         this._mp_icons = [];
  1576.         this._mp_icons.iconMode = String(Moghunter.ahud_mp_icon_halfMode) == "true" ? true : false;
  1577.         this._mp_iconsB = [];
  1578.         this._mp_iconsB.iconMode = 0;
  1579.         this._mp_IconZoomAnime = String(Moghunter.ahud_mp_icon_zoomAnime) == "true" ? true : false
  1580.         var colors = Math.max(Moghunter.ahud_mp_icon_colorMax, 2);
  1581.         var cw = this._mp_icon_img.width / colors;
  1582.         var ch = this._mp_icon_img.height / 2;
  1583.         for (var i = 0; i < n_icons; i++) {
  1584.                  this._mp_iconsB[i] = new Sprite(this._mp_icon_img);
  1585.                  this._mp_iconsB[i].colorMax = colors;
  1586.                  this._mp_iconsB[i].anchor.x = 0.5;
  1587.                  this._mp_iconsB[i].anchor.y = 0.5;
  1588.                  this._mp_iconsB[i].rows = Moghunter.ahud_mp_icon_rows;
  1589.                  this._mp_iconsB[i].cols = Moghunter.ahud_mp_icon_cols;
  1590.                  this._mp_iconsB[i].org = [this._pos_x + Moghunter.ahud_mp_icon_pos_x - cw,this._pos_y + Moghunter.ahud_mp_icon_pos_y - ch];
  1591.                  this._mp_iconsB[i].spc = [Moghunter.ahud_mp_icon_space_x,Moghunter.ahud_mp_icon_space_y];
  1592.                  this._mp_iconsB[i].zoomA = this._mp_IconZoomAnime;
  1593.                  this._mp_iconsB[i].zoomData = [0,0,0,1.00];
  1594.                  this._mp_iconsB[i].visible = false;
  1595.                  this._mp_iconsB[i].enabled = false;
  1596.                  this.addChild(this._mp_iconsB[i]);
  1597.         };               
  1598.         for (var i = 0; i < n_icons; i++) {
  1599.                  this._mp_icons[i] = new Sprite(this._mp_icon_img);
  1600.                  this._mp_icons[i].colorMax = Math.max(Moghunter.ahud_mp_icon_colorMax, 2);
  1601.                  this._mp_icons[i].anchor.x = 0.5;
  1602.                  this._mp_icons[i].anchor.y = 0.5;                 
  1603.                  this._mp_icons[i].rows = Moghunter.ahud_mp_icon_rows;

  1604.                  this._mp_icons[i].cols = Moghunter.ahud_mp_icon_cols;
  1605.                  this._mp_icons[i].org = [this._pos_x + Moghunter.ahud_mp_icon_pos_x - cw,this._pos_y + Moghunter.ahud_mp_icon_pos_y - ch];
  1606.                  this._mp_icons[i].spc = [Moghunter.ahud_mp_icon_space_x,Moghunter.ahud_mp_icon_space_y];
  1607.                  this._mp_icons[i].zoomA = this._mp_IconZoomAnime;
  1608.                  this._mp_icons[i].zoomData = [0,0,0,1.00];         
  1609.                  this._mp_icons[i].visible = false;
  1610.                  this._mp_icons[i].enabled = false;
  1611.                  this.addChild(this._mp_icons[i]);
  1612.         };       
  1613. };

  1614. //==============================
  1615. // * Create TP icon
  1616. //==============================
  1617. Actor_Hud.prototype.create_tp_icon = function() {
  1618.    if (String(Moghunter.ahud_tp_icon_visible) != "true") {return};
  1619.         if (this._tp_icons) {
  1620.             for (var i = 0; i < this._tp_icons.length; i++) {
  1621.                         this.removeChild(this._tp_icons[i]);
  1622.             };
  1623.             for (var i = 0; i < this._tp_iconsB.length; i++) {
  1624.                         this.removeChild(this._tp_iconsB[i]);
  1625.             };
  1626.         };       
  1627.         if (!this._battler) {return};       
  1628.         var n_icons = Moghunter.ahud_tp_icon_rows * Moghunter.ahud_tp_icon_cols;
  1629.         this._tp_icons = [];
  1630.         this._tp_icons.iconMode = String(Moghunter.ahud_tp_icon_halfMode) == "true" ? true : false;
  1631.         this._tp_iconsB = [];
  1632.         this._tp_iconsB.iconMode = this._tp_icons.iconMode;
  1633.         this._tp_IconZoomAnime = String(Moghunter.ahud_tp_icon_zoomAnime) == "true" ? true : false;
  1634.         var colors = Math.max(Moghunter.ahud_tp_icon_colorMax, 2);
  1635.         var cw = this._tp_icon_img.width / colors;
  1636.         var ch = this._tp_icon_img.height / 2;
  1637.         for (var i = 0; i < n_icons; i++) {
  1638.                  this._tp_iconsB[i] = new Sprite(this._tp_icon_img);
  1639.                  this._tp_iconsB[i].colorMax = colors;
  1640.                  this._tp_iconsB[i].anchor.x = 0.5;
  1641.                  this._tp_iconsB[i].anchor.y = 0.5;
  1642.                  this._tp_iconsB[i].rows = Moghunter.ahud_tp_icon_rows;
  1643.                  this._tp_iconsB[i].cols = Moghunter.ahud_tp_icon_cols;
  1644.                  this._tp_iconsB[i].org = [this._pos_x + Moghunter.ahud_tp_icon_pos_x - cw,this._pos_y + Moghunter.ahud_tp_icon_pos_y - ch];
  1645.                  this._tp_iconsB[i].spc = [Moghunter.ahud_tp_icon_space_x,Moghunter.ahud_tp_icon_space_y];
  1646.                  this._tp_iconsB[i].zoomA = this._tp_IconZoomAnime;
  1647.                  this._tp_iconsB[i].zoomData = [0,0,0,1.00];
  1648.                  this._tp_iconsB[i].visible = false;
  1649.                  this._tp_iconsB[i].enabled = false;
  1650.                  this.addChild(this._tp_iconsB[i]);
  1651.         };               
  1652.         for (var i = 0; i < n_icons; i++) {
  1653.                  this._tp_icons[i] = new Sprite(this._tp_icon_img);
  1654.                  this._tp_icons[i].colorMax = Math.max(Moghunter.ahud_tp_icon_colorMax, 2);
  1655.                  this._tp_icons[i].anchor.x = 0.5;
  1656.                  this._tp_icons[i].anchor.y = 0.5;                 
  1657.                  this._tp_icons[i].rows = Moghunter.ahud_tp_icon_rows;
  1658.                  this._tp_icons[i].cols = Moghunter.ahud_tp_icon_cols;
  1659.                  this._tp_icons[i].org = [this._pos_x + Moghunter.ahud_tp_icon_pos_x - cw,this._pos_y + Moghunter.ahud_tp_icon_pos_y - ch];
  1660.                  this._tp_icons[i].spc = [Moghunter.ahud_tp_icon_space_x,Moghunter.ahud_tp_icon_space_y];
  1661.                  this._tp_icons[i].zoomA = this._tp_IconZoomAnime;
  1662.                  this._tp_icons[i].zoomData = [0,0,0,1.00];         
  1663.                  this._tp_icons[i].visible = false;
  1664.                  this._tp_icons[i].enabled = false;
  1665.                  this.addChild(this._tp_icons[i]);
  1666.         };               
  1667. };


  1668. //==============================
  1669. // * setFrameIcon
  1670. //==============================
  1671. Actor_Hud.prototype.setFrameIcon = function(icon,image,i,hp,cw,ch) {       
  1672.         var sX = cw + 2 + icon.spc[0];
  1673.         var sY = ch + 2 + icon.spc[1];
  1674.         var lX = sX * icon.rows;
  1675.         var lines = Math.floor(i / icon.rows);
  1676.         icon.scale.y = icon.scale.x;
  1677.         icon.setFrame(hp,0,cw,ch);
  1678.         icon.x = icon.org[0] + (sX * i) - (lX * lines);
  1679.         icon.y = icon.org[1] + (sY * lines);
  1680. };

  1681. //==============================
  1682. // * is Icon Visible
  1683. //==============================
  1684. Actor_Hud.prototype.isIconVisible = function(i,mode,par,par_max,realvalue,isMaxValue,colorIndex,colorIndex2,realvalue2,icon,maxvalue) {       
  1685.     icon.opacity = 255;
  1686.         icon.blendMode = 0;
  1687.         if (mode === 0) {
  1688.             if (i >= par_max) {return false};
  1689.                 return true;
  1690.         };
  1691.         if (par === 0) {return false};
  1692.         if (par > maxvalue) {
  1693.                 icon.opacity = 155;
  1694.                 icon.blendMode = 1;
  1695.                 return true;
  1696.         };
  1697.     if (isMaxValue) {return true};
  1698.         if (colorIndex > 0 && colorIndex2 >= colorIndex) {
  1699.             icon.opacity = i >= realvalue ? 0 : 255;
  1700.                 icon.blendMode = i >= realvalue ? 1 : 0;
  1701.                 if (colorIndex2 > colorIndex) {return true};
  1702.                 if (i >= realvalue2) {return false};
  1703.     } else {
  1704.           if (i >= realvalue) {return false};
  1705.     };
  1706.     return true;
  1707. };

  1708. //==============================
  1709. // * set Color Index
  1710. //==============================
  1711. Actor_Hud.prototype.setColorIndex = function(i,mode,par,par_max,realvalue,isMaxValue,colorIndex,colorMax,maxvalue) {       
  1712.      if (par === 0) {return 0};
  1713.          if (colorIndex >= colorMax || par > maxvalue) {return colorMax - 1}
  1714.      if (mode === 0) {return colorIndex};
  1715.          if (mode === 1) {
  1716.                  if (realvalue === 0) {return colorIndex};
  1717.                  return colorIndex + 1;
  1718.          };
  1719.      return 0;
  1720. };

  1721. //==============================
  1722. // * is Icon Enabled
  1723. //==============================
  1724. Actor_Hud.prototype.isIconEnabled = function(i,mode,par,par_max,realvalue,iconMax,colorIndex,colorMax,maxvalue) {       
  1725.      if (mode === 0) {return false};
  1726.          if (par === 0) {return false};
  1727.          if (colorIndex >= colorMax || par > maxvalue) {return true}
  1728.          if (realvalue != 0 && i === (realvalue - 1)) {return true};
  1729.          if (realvalue === 0 && i === (iconMax - 1)) {return true};
  1730.      return false
  1731. };

  1732. //==============================
  1733. // * refresh Icons
  1734. //==============================
  1735. Actor_Hud.prototype.refresh_icons = function(sprites,image,par,par_max,mode) {       
  1736.     if (sprites.iconMode) {
  1737.                 this.refreshIconHalfMode(sprites,image,par,par_max,mode);
  1738.         } else {
  1739.                 this.refreshIconNormalMode(sprites,image,par,par_max,mode);
  1740.         };
  1741. };

  1742. //==============================
  1743. // * refresh Icon Normal Mode
  1744. //==============================
  1745. Actor_Hud.prototype.refreshIconNormalMode = function(sprites,image,par,par_max,mode) {       
  1746.     for (var i = 0; i < sprites.length; i++) {
  1747.            var icon = sprites[i];
  1748.        var cw = image.width / icon.colorMax;
  1749.            var ch = image.height;          
  1750.            var iconMax = icon.rows;
  1751.            var colorIndex = Math.floor(par / iconMax);
  1752.            var colorMax = icon.colorMax;
  1753.            var avaliableValue = Math.floor(colorIndex * iconMax)
  1754.            var realvalue = par - avaliableValue;
  1755.            var isMaxValue = par === avaliableValue ? true : false;
  1756.            var colorIndex2 = Math.floor(par_max / iconMax);
  1757.            var avaliableValue2 = Math.floor(colorIndex2 * iconMax)
  1758.            var realvalue2 = par_max - avaliableValue2;
  1759.            var maxvalue = iconMax * (colorMax - 1);
  1760.            var hp = cw * this.setColorIndex(i,mode,par,par_max,realvalue,isMaxValue,colorIndex,colorMax,maxvalue);
  1761.        icon.visible = this.isIconVisible(i,mode,par,par_max,realvalue,isMaxValue,colorIndex,colorIndex2,realvalue2,icon,maxvalue);
  1762.            icon.enable = this.isIconEnabled(i,mode,par,par_max,realvalue,iconMax,colorIndex,colorMax,maxvalue);
  1763.            icon.scale.x = 1.00;
  1764.            icon.zoomData = [0,0,0,icon.scale.x];
  1765.            this.setFrameIcon(icon,image,i,hp,cw,ch);
  1766.         };
  1767. };

  1768. //==============================
  1769. // * refresh Icon Half Mode
  1770. //==============================
  1771. Actor_Hud.prototype.refreshIconHalfMode = function(sprites,image,par,par_max,mode) {       
  1772.     var halfpar = Math.floor(par / 2);
  1773.         var parOdd1 = par%2;
  1774.         var parOdd2 = parOdd1 == 0 ? true : false;
  1775.         var prepar = par;
  1776.         par = sprites.iconMode ? (halfpar + parOdd1) : par;
  1777.         var prepar2 = par;
  1778.         var halfmaxpar = Math.floor(par_max / 2);
  1779.         var parmaxOdd1 = par_max%2;
  1780.         var parmaxOdd2 = parmaxOdd1 == 0 ? true : false;
  1781.         var preparmax = par_max;
  1782.         par_max = sprites.iconMode ? (halfmaxpar + parmaxOdd1) : par_max;
  1783.         var preparmax2 = par_max;       
  1784.         if (mode === 1 && par > sprites.length) {

  1785.                         var mx_g = Math.floor(par / sprites.length);
  1786.                         var mx_l = sprites.length * mx_g;
  1787.                         var par = par - mx_l;
  1788.                         if (par === 0) {par = sprites.length};
  1789.         };
  1790.         for (var i = 0; i < sprites.length; i++) {
  1791.                 var icon = sprites[i];
  1792.                 icon.visible = false;
  1793.                 icon.opacity = 255;
  1794.                 icon.enable = (prepar2 > 0 && i === (prepar2 - 1) && mode === 1) ? true : false;
  1795.                 var cw = image.width / icon.colorMax;
  1796.                 var ch = image.height;
  1797.                 if (par > 0 && icon.colorMax > 2) {
  1798.                         var lines  = Math.floor((prepar - 1) / sprites.length) + 1;
  1799.                         if (lines >= icon.colorMax - 1) {
  1800.                                 var hp = (icon.colorMax - 1) * cw;
  1801.                                 if (mode === 1) {icon.opacity = 0};
  1802.                         } else {
  1803.               if (mode === 0 && lines > 0) {lines--};
  1804.                           var hp = lines * cw;       
  1805.                         };
  1806.                 } else {
  1807.                         if (mode === 1 && prepar2 > sprites.length) {
  1808.                                 par = prepar;
  1809.                                 icon.enable = false;
  1810.                         };               
  1811.                     var hp = mode === 1 ? cw : 0;
  1812.                 };
  1813.                 var sX = cw + 2 + icon.spc[0];
  1814.                 var sY = ch + 2 + icon.spc[1];
  1815.                 var lX = sX * icon.rows;
  1816.                 var lines = Math.floor(i / icon.rows);
  1817.                 if (sprites.iconMode) {
  1818.                         if (mode === 0) {
  1819.                                 icon.scale.x = 1.00;
  1820.                                 if (par_max <= sprites.length && i == par_max - 1) {
  1821.                                         icon.scale.x = !parmaxOdd2 ? 0.5 : 1.00;
  1822.                                 };
  1823.                         } else  {
  1824.                                 if (prepar2 - 1 === i) {
  1825.                                         icon.scale.x = parOdd2 ? 1.00 : 0.50;
  1826.                                 } else {
  1827.                                         icon.scale.x = 1.00;
  1828.                                 };               
  1829.                         };
  1830.                 } else {
  1831.                         icon.scale.x = 1.00;
  1832.                 };
  1833.                 icon.scale.y = icon.scale.x;
  1834.                 icon.zoomData = [0,0,0,icon.scale.x];
  1835.                 icon.visible = true
  1836.                 if (par_max < sprites.length && i > (par_max - 1)) {icon.visible = false};
  1837.                  if (mode === 1) {
  1838.                         icon.visible = i > prepar2 - 1 ? false : true
  1839.                 };
  1840.                 icon.setFrame(hp,0,cw,ch);
  1841.                 icon.x = icon.org[0] + (sX * i) - (lX * lines);
  1842.                 icon.y = icon.org[1] + (sY * lines);
  1843.         };
  1844. };

  1845. //==============================
  1846. // * update Icon Zoom Anime
  1847. //==============================
  1848. Actor_Hud.prototype.updateIconZoomAnime = function(sprites) {
  1849.         for (var i = 0; i < sprites.length; i++) {
  1850.                  var icon = sprites[i];
  1851.                  if (icon.enable) {
  1852.                          icon.zoomData[1]++;
  1853.                          if (icon.zoomData[1] > 2) {
  1854.                              icon.zoomData[1] = 0;
  1855.                                  icon.zoomData[2]++;
  1856.                              if (icon.zoomData[2] < 15) {
  1857.                                  icon.zoomData[0] += 0.02;
  1858.                                  } else if (icon.zoomData[2] < 30) {
  1859.                                          icon.zoomData[0] -= 0.02;
  1860.                                  } else {
  1861.                                          icon.zoomData[0] = 0;
  1862.                                      icon.zoomData[2] = 0;
  1863.                                  };
  1864.                              icon.scale.x = icon.zoomData[3] + icon.zoomData[0];
  1865.                              icon.scale.y = icon.scale.x;
  1866.                          };
  1867.                  };
  1868.         };
  1869. };

  1870. //==============================
  1871. // * Create HP Number
  1872. //==============================
  1873. Actor_Hud.prototype.create_hp_number = function() {
  1874.         if (String(Moghunter.ahud_hp_number_visible) != "true") {return};
  1875.         if (this._hp_number) {for (var i = 0; i < this._hp_number.length; i++) {this.removeChild(this._hp_number[i]);}};
  1876.         if (!this._battler) {return};
  1877.         this._hp_number = [];
  1878.         this._hp_number.align = Number(Moghunter.ahud_hp_number_align);
  1879.         this._hp_img_data = [this._hp_number_img.width,this._hp_number_img.height,
  1880.                               this._hp_number_img.width / 10, this._hp_number_img.height / 2,
  1881.                                                   this._pos_x + Moghunter.ahud_hp_number_pos_x,
  1882.                                                   this._pos_y + Moghunter.ahud_hp_number_pos_y,
  1883.                                                   ];
  1884.         for (var i = 0; i < 5; i++) {
  1885.            this._hp_number[i] = new Sprite(this._hp_number_img);
  1886.            this._hp_number[i].visible = false;
  1887.            this._hp_number[i].x = this._hp_img_data[4];
  1888.            this._hp_number[i].y = this._hp_img_data[5];
  1889.            this.addChild(this._hp_number[i]);
  1890.         };       
  1891.         this._hp_number_old = this._battler.hp;       
  1892.         this.refresh_number(this._hp_number,this._hp_number_old,this._hp_img_data,this._hp_img_data[4],0);       
  1893. };

  1894. //==============================
  1895. // * Create maxHP Number
  1896. //==============================
  1897. Actor_Hud.prototype.create_maxhp_number = function() {
  1898.         if (String(Moghunter.ahud_maxhp_number_visible) != "true") {return};
  1899.         if (this._maxhp_number) {for (var i = 0; i < this._maxhp_number.length; i++) {this.removeChild(this._maxhp_number[i]);}};
  1900.         if (!this._battler) {return};       
  1901.         this._maxhp_number = [];
  1902.         this._maxhp_number.align = Number(Moghunter.ahud_hp_number_align);
  1903.         this._maxhp_img_data = [this._maxhp_number_img.width,this._maxhp_number_img.height,
  1904.                               this._maxhp_number_img.width / 10, this._maxhp_number_img.height / 2,
  1905.                                                   this._pos_x + Moghunter.ahud_maxhp_number_pos_x,
  1906.                                                   this._pos_y + Moghunter.ahud_maxhp_number_pos_y,
  1907.                                                   ];
  1908.         for (var i = 0; i < 5; i++) {
  1909.            this._maxhp_number[i] = new Sprite(this._maxhp_number_img);
  1910.            this._maxhp_number[i].visible = false;
  1911.            this._maxhp_number[i].x = this._maxhp_img_data[4];
  1912.            this._maxhp_number[i].y = this._maxhp_img_data[5];
  1913.            this.addChild(this._maxhp_number[i]);
  1914.         };               
  1915.         this._maxhp_number_old = this._battler.mhp;       
  1916.         this.refresh_number(this._maxhp_number,this._maxhp_number_old,this._maxhp_img_data,this._maxhp_img_data[4],0);       
  1917. };

  1918. //==============================
  1919. // * Update HP
  1920. //==============================
  1921. Actor_Hud.prototype.update_hp = function() {
  1922.         if (this._hp_meter_blue) {
  1923.                 if(this._hp_flow[0]) {
  1924.                    if (this._hp_old[1] != this._battler.mhp) {
  1925.                        this._hp_old = [this._battler.hp,this._battler.mhp];
  1926.                            this.refresh_meter_flow(this._hp_meter_red,this._battler.hp,this._battler.mhp,1,$gameSystem._ahud_flowData[0]);
  1927.                    };                                       
  1928.                    this.refresh_meter_flow(this._hp_meter_blue,this._battler.hp,this._battler.mhp,0,$gameSystem._ahud_flowData[0]);
  1929.                       var dif_meter = this.update_dif(this._hp_old_ani[0],this._battler.hp,160)
  1930.                    if (this._hp_old_ani[0] != dif_meter) {this._hp_old_ani[0] = dif_meter;
  1931.                this.refresh_meter_flow(this._hp_meter_red,this._hp_old_ani[0],this._battler.mhp,1,$gameSystem._ahud_flowData[0]);
  1932.                    };
  1933.                    $gameSystem._ahud_flowData[0] += this._hp_flow_speed;
  1934.                    if ($gameSystem._ahud_flowData[0] > this._hp_flow[3]) {$gameSystem._ahud_flowData[0] = 0};
  1935.                }
  1936.                 else {
  1937.                    if (this.need_refresh_parameter(0)) {
  1938.                                 this.refresh_meter(this._hp_meter_blue,this._battler.hp,this._battler.mhp,0,2,0);
  1939.                                 this._hp_old = [this._battler.hp,this._battler.mhp];
  1940.                         };
  1941.                         var dif_meter = this.update_dif(this._hp_old_ani[0],this._battler.hp,160)
  1942.                         if (this._hp_old_ani[0] != dif_meter) {this._hp_old_ani[0] = dif_meter;
  1943.                         this.refresh_meter(this._hp_meter_red,this._hp_old_ani[0],this._battler.mhp,1,2,0);};               
  1944.             };
  1945.     };
  1946.         if (this._hp_number) {
  1947.                 var dif_number = this.update_dif(this._hp_number_old,this._battler.hp,30)
  1948.                 if (this._hp_number_old != dif_number) {this._hp_number_old = dif_number;
  1949.                 this.refresh_number(this._hp_number,this._hp_number_old,this._hp_img_data,this._hp_img_data[4],0);};
  1950.         };
  1951.     if (this._maxhp_number) {
  1952.                 if (this._maxhp_number_old != this._battler.mhp) {this._maxhp_number_old = this._battler.mhp;
  1953.                 this.refresh_number(this._maxhp_number,this._maxhp_number_old,this._maxhp_img_data,this._maxhp_img_data[4],0);};
  1954.         };
  1955.         if (this._hp_icons) {
  1956.                 if (this._hp_icon_old[0] != this._battler.hp || this._hp_icon_old[1] != this._battler.mhp) {
  1957.                     this._hp_icon_old[0] = this._battler.hp;
  1958.                         this._hp_icon_old[1] = this._battler.mhp;
  1959.                         this.refresh_icons(this._hp_iconsB,this._hp_icon_img,this._battler.hp,this._battler.mhp,0);
  1960.                 this.refresh_icons(this._hp_icons,this._hp_icon_img,this._battler.hp,this._battler.mhp,1);
  1961.                 };
  1962.                 if (this._hp_IconZoomAnime) {this.updateIconZoomAnime(this._hp_icons)};
  1963.     };
  1964. };

  1965. //==============================
  1966. // * Create MP Meter
  1967. //==============================
  1968. Actor_Hud.prototype.create_mp_meter = function() {
  1969.         if (String(Moghunter.ahud_mp_meter_visible) != "true") {return};
  1970.         this.removeChild(this._mp_meter_blue);
  1971.         this.removeChild(this._mp_meter_red);
  1972.         if (!this._battler) {return};
  1973.         this._mp_meter_red = new Sprite(this._mp_meter_img);
  1974.         this._mp_meter_red.x = this._pos_x + Moghunter.ahud_mp_meter_pos_x;
  1975.         this._mp_meter_red.y = this._pos_y + Moghunter.ahud_mp_meter_pos_y;
  1976.         this._mp_meter_red.rotation = Moghunter.ahud_mp_meter_rotation * Math.PI / 180;
  1977.         this._mp_meter_red.setFrame(0,0,0,0);
  1978.         this.addChild(this._mp_meter_red);               
  1979.         this._mp_meter_blue = new Sprite(this._mp_meter_img);
  1980.         this._mp_meter_blue.x = this._mp_meter_red.x;
  1981.         this._mp_meter_blue.y = this._mp_meter_red.y;
  1982.         this._mp_meter_blue.rotation = this._mp_meter_red.rotation * Math.PI / 180;
  1983.         this._mp_meter_blue.setFrame(0,0,0,0);
  1984.         this.addChild(this._mp_meter_blue);
  1985.         this._mp_old_ani[0] = this._battler.mp - 1;
  1986.         if (String(Moghunter.ahud_mp_meter_flow) === "true") {this._mp_flow[0] = true;
  1987.             this._mp_flow[2] = this._mp_meter_img.width / 3;
  1988.                 this._mp_flow[3] = this._mp_flow[2] * 2;
  1989.                 this._mp_flow[1] = Math.floor(Math.random() * this._mp_flow[2]);
  1990.         };
  1991. };

  1992. //==============================
  1993. // * Create MP Number
  1994. //==============================
  1995. Actor_Hud.prototype.create_mp_number = function() {
  1996.         if (String(Moghunter.ahud_mp_number_visible) != "true") {return};
  1997.         if (this._mp_number) {for (var i = 0; i < this._mp_number.length; i++) {this.removeChild(this._mp_number[i]);}};
  1998.         if (!this._battler) {return};
  1999.         this._mp_number = [];
  2000.         this._mp_number.align = Number(Moghunter.ahud_mp_number_align);
  2001.         this._mp_img_data = [this._mp_number_img.width,this._mp_number_img.height,
  2002.                               this._mp_number_img.width / 10, this._mp_number_img.height / 2,
  2003.                                                   this._pos_x + Moghunter.ahud_mp_number_pos_x,
  2004.                                                   this._pos_y + Moghunter.ahud_mp_number_pos_y,
  2005.                                                   ];
  2006.         for (var i = 0; i < 5; i++) {
  2007.            this._mp_number[i] = new Sprite(this._mp_number_img);
  2008.            this._mp_number[i].visible = false;
  2009.            this._mp_number[i].x = this._mp_img_data[4];
  2010.            this._mp_number[i].y = this._mp_img_data[5] ;
  2011.            this.addChild(this._mp_number[i]);
  2012.         };       
  2013.         this._mp_number_old = this._battler.mp;
  2014.         this.refresh_number(this._mp_number,this._mp_number_old,this._mp_img_data,this._mp_img_data[4],0);       
  2015. };

  2016. //==============================
  2017. // * Create MaxMP Number
  2018. //==============================
  2019. Actor_Hud.prototype.create_maxmp_number = function() {
  2020.         if (String(Moghunter.ahud_maxmp_number_visible) != "true") {return};
  2021.         if (this._maxmp_number) {for (var i = 0; i < this._maxmp_number.length; i++) {this.removeChild(this._maxmp_number[i]);}};
  2022.         if (!this._battler) {return};
  2023.         this._maxmp_number = [];
  2024.         this._maxmp_number.align = Number(Moghunter.ahud_mp_number_align);
  2025.         this._maxmp_img_data = [this._maxmp_number_img.width,this._maxmp_number_img.height,
  2026.                               this._maxmp_number_img.width / 10, this._maxmp_number_img.height / 2,
  2027.                                                   this._pos_x + Moghunter.ahud_maxmp_number_pos_x,
  2028.                                                   this._pos_y + Moghunter.ahud_maxmp_number_pos_y,
  2029.                                                   ];
  2030.         for (var i = 0; i < 5; i++) {
  2031.            this._maxmp_number[i] = new Sprite(this._maxmp_number_img);
  2032.            this._maxmp_number[i].visible = false;
  2033.            this._maxmp_number[i].x = this._maxmp_img_data[4];
  2034.            this._maxmp_number[i].y = this._maxmp_img_data[5] ;
  2035.            this.addChild(this._maxmp_number[i]);
  2036.         };       
  2037.         this._maxmp_number_old = this._battler.mmp;       
  2038.         this.refresh_number(this._maxmp_number,this._maxmp_number_old,this._maxmp_img_data,this._maxmp_img_data[4],0);       
  2039. };

  2040. //==============================
  2041. // * Update MP
  2042. //==============================
  2043. Actor_Hud.prototype.update_mp = function() {
  2044.         if (this._mp_meter_blue) {
  2045.                 if(this._mp_flow[0]) {
  2046.                    if (this._mp_old[1] != this._battler.mmp) {
  2047.                        this._mp_old = [this._battler.mp,this._battler.mmp];
  2048.                            this.refresh_meter_flow(this._mp_meter_red,this._battler.mp,this._battler.mmp,1,$gameSystem._ahud_flowData[1]);
  2049.                    };                       
  2050.                    this.refresh_meter_flow(this._mp_meter_blue,this._battler.mp,this._battler.mmp,0,$gameSystem._ahud_flowData[1]);
  2051.                       var dif_meter = this.update_dif(this._mp_old_ani[0],this._battler.mp,160);
  2052.                    if (this._mp_old_ani[0] != dif_meter) {this._mp_old_ani[0] = dif_meter;
  2053.                this.refresh_meter_flow(this._mp_meter_red,this._mp_old_ani[0],this._battler.mmp,1,$gameSystem._ahud_flowData[1]);
  2054.                    };
  2055.                    $gameSystem._ahud_flowData[1] += this._mp_flow_speed;
  2056.                    if ($gameSystem._ahud_flowData[1] > this._mp_flow[3]) {$gameSystem._ahud_flowData[1] = 0};                  
  2057.                }
  2058.                 else {               
  2059.                         if (this.need_refresh_parameter(1)) {
  2060.                                 this.refresh_meter(this._mp_meter_blue,this._battler.mp,this._battler.mmp,0,2,0);
  2061.                                 this._mp_old = [this._battler.mp,this._battler.mmp];
  2062.                         };
  2063.                         var dif_meter = this.update_dif(this._mp_old_ani[0],this._battler.mp,160)
  2064.                         if (this._mp_old_ani[0] != dif_meter) {this._mp_old_ani[0] = dif_meter;
  2065.                         this.refresh_meter(this._mp_meter_red,this._mp_old_ani[0],this._battler.mmp,1,2,0);};
  2066.                 };
  2067.     };
  2068.         if (this._mp_number) {
  2069.                 var dif_number = this.update_dif(this._mp_number_old,this._battler.mp,30)
  2070.                 if (this._mp_number_old != dif_number) {this._mp_number_old = dif_number;
  2071.                 this.refresh_number(this._mp_number,this._mp_number_old,this._mp_img_data,this._mp_img_data[4],0);};
  2072.         };
  2073.         if (this._maxmp_number) {
  2074.                 if (this._maxmp_number_old != this._battler.mmp) {this._maxmp_number_old = this._battler.mmp;
  2075.                 this.refresh_number(this._maxmp_number,this._maxmp_number_old,this._maxmp_img_data,this._maxmp_img_data[4],0);};
  2076.         };
  2077.         if (this._mp_icons) {
  2078.                 if (this._mp_icon_old[0] != this._battler.mp || this._mp_icon_old[1] != this._battler.mmp) {
  2079.                     this._mp_icon_old[0] = this._battler.mp;
  2080.                         this._mp_icon_old[1] = this._battler.mmp;
  2081.                         this.refresh_icons(this._mp_iconsB,this._mp_icon_img,this._battler.mp,this._battler.mmp,0);
  2082.                 this.refresh_icons(this._mp_icons,this._mp_icon_img,this._battler.mp,this._battler.mmp,1);
  2083.                 };
  2084.                 if (this._mp_IconZoomAnime) {this.updateIconZoomAnime(this._mp_icons)};
  2085.     };       
  2086. };

  2087. //==============================
  2088. // * Create TP Meter
  2089. //==============================
  2090. Actor_Hud.prototype.create_tp_meter = function() {
  2091.         if (String(Moghunter.ahud_tp_meter_visible) != "true") {return};
  2092.         this.removeChild(this._tp_meter_blue);
  2093.         this.removeChild(this._tp_meter_red);
  2094.         if (!this._battler) {return};
  2095.         this._tp_meter_red = new Sprite(this._tp_meter_img);
  2096.         this._tp_meter_red.x = this._pos_x + Moghunter.ahud_tp_meter_pos_x;
  2097.         this._tp_meter_red.y = this._pos_y + Moghunter.ahud_tp_meter_pos_y;
  2098.         this._tp_meter_red.rotation = Moghunter.ahud_tp_meter_rotation * Math.PI / 180;
  2099.         this._tp_meter_red.setFrame(0,0,0,0);
  2100.         this.addChild(this._tp_meter_red);               
  2101.         this._tp_meter_blue = new Sprite(this._tp_meter_img);
  2102.         this._tp_meter_blue.x = this._tp_meter_red.x;
  2103.         this._tp_meter_blue.y = this._tp_meter_red.y;
  2104.         this._tp_meter_blue.rotation = this._tp_meter_red.rotation * Math.PI / 180;
  2105.         this._tp_meter_blue.setFrame(0,0,0,0);
  2106.         this.addChild(this._tp_meter_blue);
  2107.         this._tp_old_ani[0] = this._battler.tp - 1;
  2108.         if (String(Moghunter.ahud_tp_meter_flow) === "true") {this._tp_flow[0] = true;
  2109.             this._tp_flow[2] = this._tp_meter_img.width / 3;
  2110.                 this._tp_flow[3] = this._tp_flow[2] * 2;
  2111.                 this._tp_flow[1] = Math.floor(Math.random() * this._tp_flow[2]);
  2112.         };
  2113. };

  2114. //==============================
  2115. // * Create TP Number
  2116. //==============================
  2117. Actor_Hud.prototype.create_tp_number = function() {
  2118.         if (String(Moghunter.ahud_tp_number_visible) != "true") {return};
  2119.         if (this._tp_number) {for (var i = 0; i < this._tp_number.length; i++) {this.removeChild(this._tp_number[i]);}};
  2120.         if (!this._battler) {return};
  2121.         this._tp_number = [];
  2122.         this._tp_number.align = Number(Moghunter.ahud_tp_number_align);
  2123.         this._tp_img_data = [this._tp_number_img.width,this._tp_number_img.height,
  2124.                               this._tp_number_img.width / 10, this._tp_number_img.height / 2,
  2125.                                                   this._pos_x + Moghunter.ahud_tp_number_pos_x,
  2126.                                                   this._pos_y + Moghunter.ahud_tp_number_pos_y,
  2127.                                                   ];
  2128.         for (var i = 0; i < 5; i++) {
  2129.            this._tp_number[i] = new Sprite(this._tp_number_img);
  2130.            this._tp_number[i].visible = false;
  2131.            this._tp_number[i].x = this._tp_img_data[4];
  2132.            this._tp_number[i].y = this._tp_img_data[5] ;
  2133.            this.addChild(this._tp_number[i]);
  2134.         };       
  2135.         this._tp_number_old = this._battler.tp;
  2136.         this.refresh_number(this._tp_number,this._tp_number_old,this._tp_img_data,this._tp_img_data[4],0);       
  2137. };

  2138. //==============================
  2139. // * Create MaxTP Number
  2140. //==============================
  2141. Actor_Hud.prototype.create_maxtp_number = function() {
  2142.         if (String(Moghunter.ahud_maxtp_number_visible) != "true") {return};
  2143.         if (this._maxtp_number) {for (var i = 0; i < this._maxtp_number.length; i++) {this.removeChild(this._maxtp_number[i]);}};
  2144.         if (!this._battler) {return};
  2145.         this._maxtp_number = [];
  2146.         this._maxtp_number.align = Number(Moghunter.ahud_tp_number_align);
  2147.         this._maxtp_img_data = [this._maxtp_number_img.width,this._maxtp_number_img.height,
  2148.                               this._maxtp_number_img.width / 10, this._maxtp_number_img.height / 2,
  2149.                                                   this._pos_x + Moghunter.ahud_maxtp_number_pos_x,
  2150.                                                   this._pos_y + Moghunter.ahud_maxtp_number_pos_y,
  2151.                                                   ];
  2152.         for (var i = 0; i < 5; i++) {
  2153.            this._maxtp_number[i] = new Sprite(this._maxtp_number_img);
  2154.            this._maxtp_number[i].visible = false;
  2155.            this._maxtp_number[i].x = this._maxtp_img_data[4];
  2156.            this._maxtp_number[i].y = this._maxtp_img_data[5] ;
  2157.            this.addChild(this._maxtp_number[i]);
  2158.         };       
  2159.         this._maxtp_number_old = 100;
  2160.         this.refresh_number(this._maxtp_number,this._maxtp_number_old,this._maxtp_img_data,this._maxtp_img_data[4],0);       
  2161. };

  2162. //==============================
  2163. // * Update TP
  2164. //==============================
  2165. Actor_Hud.prototype.update_tp = function() {
  2166.         if (this._tp_meter_blue) {
  2167.                 if(this._tp_flow[0]) {
  2168.                    if (this._tp_old[1] != this._battler.maxTp()) {
  2169.                        this._tp_old = [this._battler.tp,this._battler.maxTp()];
  2170.                            this.refresh_meter_flow(this._tp_meter_red,this._battler.tp,this._battler.maxTp(),1,$gameSystem._ahud_flowData[2]);
  2171.                    };                               
  2172.                    this.refresh_meter_flow(this._tp_meter_blue,this._battler.tp,this._battler.maxTp(),0,$gameSystem._ahud_flowData[2]);
  2173.                       var dif_meter = this.update_dif(this._tp_old_ani[0],this._battler.tp,160)
  2174.                    if (this._tp_old_ani[0] != dif_meter) {this._tp_old_ani[0] = dif_meter;
  2175.                this.refresh_meter_flow(this._tp_meter_red,this._tp_old_ani[0],this._battler.maxTp(),1,$gameSystem._ahud_flowData[2]);
  2176.                    };
  2177.                    $gameSystem._ahud_flowData[2] += this._tp_flow_speed;
  2178.                    if ($gameSystem._ahud_flowData[2] > this._tp_flow[3]) {$gameSystem._ahud_flowData[2] = 0};                  
  2179.                }
  2180.                 else {       
  2181.                         if (this.need_refresh_parameter(2)) {
  2182.                                 this.refresh_meter(this._tp_meter_blue,this._battler.tp,this._battler.maxTp(),0,2,0);
  2183.                                 this._tp_old = [this._battler.tp,this._battler.maxTp()];
  2184.                         };
  2185.                         var dif_meter = this.update_dif(this._tp_old_ani[0],this._battler.tp,160)
  2186.                         if (this._tp_old_ani[0] != dif_meter) {this._tp_old_ani[0] = dif_meter;
  2187.                         this.refresh_meter(this._tp_meter_red,this._tp_old_ani[0],this._battler.maxTp(),1,2,0);};
  2188.         };
  2189.     };
  2190.         if (this._tp_number) {
  2191.                 var dif_number = this.update_dif(this._tp_number_old,this._battler.tp,30)
  2192.                 if (this._tp_number_old != dif_number) {this._tp_number_old = dif_number;
  2193.                 this.refresh_number(this._tp_number,this._tp_number_old,this._tp_img_data,this._tp_img_data[4],0);};
  2194.         };
  2195.         if (this._tp_icons) {
  2196.                 if (this._tp_icon_old[0] != this._battler.tp || this._tp_icon_old[1] != this._battler.maxTp()) {
  2197.                     this._tp_icon_old[0] = this._battler.tp;
  2198.                         this._tp_icon_old[1] = this._battler.maxTp();
  2199.                         this.refresh_icons(this._tp_iconsB,this._tp_icon_img,this._battler.tp,this._battler.maxTp(),0);
  2200.                 this.refresh_icons(this._tp_icons,this._tp_icon_img,this._battler.tp,this._battler.maxTp(),1);
  2201.                 };
  2202.                 if (this._tp_IconZoomAnime) {this.updateIconZoomAnime(this._tp_icons)};
  2203.     };       
  2204. };


  2205. //==============================
  2206. // * Create Exp Meter
  2207. //==============================
  2208. Actor_Hud.prototype.create_exp_meter = function() {       
  2209. if (String(Moghunter.ahud_exp_meter_visible) != "true") {return};
  2210.         this.removeChild(this._exp_meter);
  2211.         if (!this._battler) {return};
  2212.         this._exp_meter = new Sprite(this._exp_meter_img);
  2213.         this._exp_meter.x = this._pos_x + Moghunter.ahud_exp_meter_pos_x;
  2214.         this._exp_meter.y = this._pos_y + Moghunter.ahud_exp_meter_pos_y;
  2215.         this._exp_meter.rotation = this._exp_meter.rotation * Math.PI / 180;
  2216.         this.addChild(this._exp_meter);
  2217.         if (String(Moghunter.ahud_exp_meter_flow) === "true") {this._exp_flow[0] = true;
  2218.             this._exp_flow[2] = this._exp_meter_img.width / 3;
  2219.                 this._exp_flow[3] = this._exp_flow[2] * 2;
  2220.                 this._exp_flow[1] = Math.floor(Math.random() * this._exp_flow[2]);
  2221.         };
  2222.         this._exp_meter.setFrame(0,0,0,0);
  2223. };

  2224. //==============================
  2225. // * Create Level Number
  2226. //==============================
  2227. Actor_Hud.prototype.create_level_number = function() {
  2228.         if (String(Moghunter.ahud_level_number_visible) != "true") {return};
  2229.         if (this._level_number) {for (var i = 0; i < this._level_number.length; i++) {this.removeChild(this._level_number[i]);}};
  2230.         if (!this._battler) {return};
  2231.         this._level_number = [];
  2232.         this._level_number.align = Number(Moghunter.ahud_level_number_align);
  2233.         this._level_img_data = [this._level_number_img.width,this._level_number_img.height,
  2234.                               this._level_number_img.width / 10, this._level_number_img.height / 2,
  2235.                                                   this._pos_x + Moghunter.ahud_level_number_pos_x,
  2236.                                                   this._pos_y + Moghunter.ahud_level_number_pos_y,
  2237.                                                   ];
  2238.         for (var i = 0; i < 3; i++) {
  2239.            this._level_number[i] = new Sprite(this._level_number_img);
  2240.            this._level_number[i].visible = false;
  2241.            this._level_number[i].x = this._level_img_data[4];
  2242.            this._level_number[i].y = this._level_img_data[5];
  2243.            this.addChild(this._level_number[i]);
  2244.         };       
  2245.         this._level_number_old = this._battler.level;
  2246.         this.refresh_number(this._level_number,this._level_number_old,this._level_img_data,this._level_img_data[4],1);       
  2247. };

  2248. //==============================
  2249. // * Update Exp
  2250. //==============================
  2251. Actor_Hud.prototype.update_exp = function() {
  2252.         if (this._exp_meter) {
  2253.                 if (this.need_refresh_parameter(3)) {
  2254.                         if (this._battler.isMaxLevel()) {
  2255.                             this.refresh_meter(this._exp_meter,1,1,0,1,1);
  2256.                     } else {
  2257.                              this.refresh_meter(this._exp_meter,this._battler.current_exp_r(),this._battler.nextLevelExp_r(),0,1,1);
  2258.                         };
  2259.                         this._exp_old = this._battler.currentExp();
  2260.                 };
  2261.     };
  2262.         if (this._level_number) {
  2263.                 var dif_number = this.update_dif(this._level_number_old,this._battler.level,30)
  2264.                 if (this._level_number_old != dif_number) {this._level_number_old = dif_number;
  2265.                     if (this._hp_old_ani) {this._hp_old_ani[0] = 0};
  2266.                         if (this._mp_old_ani) {this._mp_old_ani[0] = 0};
  2267.                         if (this._tp_old_ani) {this._tp_old_ani[0] = 0};
  2268.                     this.refresh_number(this._level_number,this._level_number_old,this._level_img_data,this._level_img_data[4],1);};
  2269.         };
  2270. };

  2271. //==============================
  2272. // * Create States
  2273. //==============================
  2274. Actor_Hud.prototype.create_states = function() {
  2275.         if (String(Moghunter.ahud_states_visible) != "true") {return};
  2276.         this.removeChild(this._state_icon);
  2277.         if (!this._battler) {return};
  2278.         this._states_data = [0,0,0];
  2279.         this._state_icon = new Sprite(this._state_img);
  2280.         this._state_icon.x = this._pos_x + Moghunter.ahud_states_pos_x;
  2281.         this._state_icon.y = this._pos_y + Moghunter.ahud_states_pos_y;
  2282.         this._state_icon.visible = false;
  2283.         this.addChild(this._state_icon);
  2284.         this.refresh_states();       
  2285. };

  2286. //==============================
  2287. // * Refresh States
  2288. //==============================
  2289. Actor_Hud.prototype.refresh_states = function() {
  2290.         this._states_data[0] = 0;
  2291.         this._states_data[2] = 0;
  2292.         this._state_icon.visible = false;
  2293.         if (this._battler.allIcons().length == 0) {this._states_data[1] = 0;return};
  2294.        if (this._battler.allIcons()[this._states_data[1]]) {       
  2295.                 this._states_data[0] = this._battler.allIcons()[this._states_data[1]];
  2296.                 this._state_icon.visible = true;
  2297.                 var sx = this._states_data[0] % 16 * 32;
  2298.                 var sy = Math.floor(this._states_data[0] / 16) * 32;
  2299.                 this._state_icon.setFrame(sx, sy, 32, 32);
  2300.                 this._battler.need_refresh_bhud_states = false;       
  2301.        
  2302.            };
  2303.         this._states_data[1] += 1;
  2304.         if (this._states_data[1] >= this._battler.allIcons().length) {
  2305.                 this._states_data[1] = 0
  2306.         };
  2307. };

  2308. //==============================
  2309. // * Update States
  2310. //==============================
  2311. Actor_Hud.prototype.update_states = function() {
  2312.         if (!this._state_icon) {return};
  2313.         this._states_data[2] += 1;
  2314.         if (this.need_refresh_states()) {this.refresh_states();};
  2315. };

  2316. //==============================
  2317. // * Need Refresh States
  2318. //==============================
  2319. Actor_Hud.prototype.need_refresh_states = function() {
  2320.         if (this._battler.need_refresh_bhud_states) {return true};
  2321.         if (this._states_data[2] > 60) {return true};
  2322.         return false;
  2323. };
复制代码
梦石
20
星屑
13972
在线时间
1744 小时
注册时间
2017-1-12
回帖
1666

MZ评测员开拓者

 楼主| 发表于 2020-1-30 08:34:19 | 显示全部楼层
一天就被压下去了......稍微提一下,希望不算连贴。
回复

使用道具 举报

梦石
0
星屑
844
在线时间
157 小时
注册时间
2018-12-13
回帖
45
发表于 2020-1-30 14:41:43 | 显示全部楼层
那就老老实实用血条
不然你试试把血条画成红心的样式

点评

我还真试了,但是mog的血条可能有规格限制,导致只显示了心形的上半部分,又不知怎么改这个规格_(:з」∠)_  发表于 2020-1-30 15:23
无所事事
回复

使用道具 举报

梦石
0
星屑
133
在线时间
21 小时
注册时间
2019-6-16
回帖
4
发表于 2020-2-11 18:19:22 | 显示全部楼层
楼主,我研究了一下。mog的血条好像并没有规格的限制,我的血条显示的高度变为了图片高度的3分之1
你可以试试这样画
❤
❤
❤
看看是不是只显示一个❤
回复

使用道具 举报

梦石
20
星屑
13972
在线时间
1744 小时
注册时间
2017-1-12
回帖
1666

MZ评测员开拓者

 楼主| 发表于 2020-2-11 19:48:15 | 显示全部楼层
lkj25888 发表于 2020-2-11 18:19
楼主,我研究了一下。mog的血条好像并没有规格的限制,我的血条显示的高度变为了图片高度的3分之1
你可以试 ...

如果是指icon用在传统血条上的策略,也就是说血条从这样 HP_Meter3.png 变成这样 HP_Meter.png 的话。
显示效果会从这样 icon1.PNG 变成这样 三排血条.PNG 这么一看第一个好像也不只是变成三分之一的问题,而是仿佛把图像拆成上下两段又叠在一起了。
我开始怀疑是不是MV在版本更新的时候处理图像的方式变了(作为对脚本一无所知的人)。之前从另一位大佬(drill)那边下的mog血条范例显示有不正常
回复

使用道具 举报

梦石
0
星屑
133
在线时间
21 小时
注册时间
2019-6-16
回帖
4
发表于 2020-2-11 22:06:30 | 显示全部楼层
本帖最后由 lkj25888 于 2020-2-11 22:44 编辑

恩,抱歉了,我也是刚入坑不久的小白,这些深层次的东西我就完全不知道了。但是我想到了一个东西
回复

使用道具 举报

梦石
0
星屑
133
在线时间
21 小时
注册时间
2019-6-16
回帖
4
发表于 2020-2-11 22:33:48 | 显示全部楼层

,

本帖最后由 lkj25888 于 2020-2-11 22:37 编辑

楼主,我解决了,方法很简单,我看到你的图片发现有一层血条是完好的,然后我就想,会不会是因为下方有两层血条的原因,然后我就拿ps去掉了
结果就成功了,刚开始是我的理解出了问题,只需要图片的高度是原来的三倍,但是血条并不需要
Q$%OB(1AI)Q0~9F]ZJOWN(W.png
HP_Meter.png
回复

使用道具 举报

梦石
0
星屑
4881
在线时间
425 小时
注册时间
2019-10-22
回帖
647
发表于 2020-2-12 01:00:26 | 显示全部楼层
lkj25888 发表于 2020-2-11 22:33
楼主,我解决了,方法很简单,我看到你的图片发现有一层血条是完好的,然后我就想,会不会是因为下方有两层 ...

没什么深奥的东西  就是长宽比的问题  插件里面有计算公式

也就是你说的改成3倍  长宽比就符合对图片裁剪
















回复

使用道具 举报

梦石
20
星屑
13972
在线时间
1744 小时
注册时间
2017-1-12
回帖
1666

MZ评测员开拓者

 楼主| 发表于 2020-2-12 09:40:38 | 显示全部楼层
lkj25888 发表于 2020-2-11 22:33
楼主,我解决了,方法很简单,我看到你的图片发现有一层血条是完好的,然后我就想,会不会是因为下方有两层 ...

多谢提醒,试了你那种方法以后我因为发现血条流动的方式和原来的不太一样(没动态)),又观察了一下原素材
HP_Meter2.png 发现原本的血条素材是分成上下两部分的,暗色的部分是减血会流动的部分。
所以把素材又改了一下(两倍高,下面一半是减血时的流动状态),现在看起来效果应该差不多了。
HP_Meter.png
回复

使用道具 举报

梦石
0
星屑
15309
在线时间
720 小时
注册时间
2011-7-16
回帖
1373

开拓者

发表于 2020-2-16 12:20:01 | 显示全部楼层
厉害呀,这血条效果相当不错,不过感觉icon模式更有特色

点评

只剩1点HP的时候所有心会瞬间变空,但是只有这种情况会变……  发表于 2020-2-16 16:43
范例中满屏幕的其它hud的血条全部都能够正确显示当前的血量,包括行走图头顶上的,唯独心没有任何变化,看起来不是我想的那么简单,应该不是bug  发表于 2020-2-16 16:36
去看了下,能显示心,但是其它血条都位置错乱了,然后战斗一场后,一颗心也没少  发表于 2020-2-16 16:33
有的。MOG压缩包里还有一个专门的文件夹“ActorHud_Teamplates”放了同插件的三种血条  发表于 2020-2-16 13:14
mog范例里面有这个功能吗?有的话,我去看看  发表于 2020-2-16 12:38
RMMV网络插件,开源免费,内含服务器端,无需强制登录,云数据,弹幕,云存档,排名,兑换码,版本检测,可自由上架下架删除。q群399090587
免打包运行MV游戏,云游戏,安卓App雷神游戏厅,在线玩游戏,上传下载游戏
开源游戏:重装机兵之重装归来【RMMV制作】全球首款按照美剧分季分集的方式发布的游戏
体素画 -- MV画3D像素图的画板
RMMV显示3D模型和场景的插件
RMMV显示spine骨骼动画的插件
RMMV秘密通道插件
突破敌群数量上限8个的插件
在rmmv中显示gif动态图片的插件
一款可以在mv游戏界面的任意位置显示任意文字的插件
RMMV Toast 插件 带物品得失提示,可以设置开启关闭 兼容yep itemcore
制作一个改名卡道具插件、调整标题页面菜单的插件、在标题页面之前显示大段文字的插件、标题页面显示版本号的插件
物品得失自动提示自动上色自动换行插件
我的Q群 663889472
另外,我的插件、范例、游戏都在这里
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部