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

Project1

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

[已经解决] 状态栏脸图设置求助!送V!谢谢

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
171 小时
注册时间
2013-8-6
帖子
101
跳转到指定楼层
1
发表于 2013-8-24 11:52:52 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
10星屑
这是昨天的求助帖:http://rpg.blue/thread-329089-1-1.html
没有大神帮忙,现在真心无法解决了,队伍人数设置6,脸图只显示4个,多出两个人看不到也无法选择
送10V求解决,求美化,求状态脸图放下6人,谢谢
脚本用的Glimmer/Lost Paradise的横版范例
地址:http://www.66rpg.com/articles/3398  或者   http://rpg.blue/forum.php?mod=viewthread&tid=223368

help.JPG (236.21 KB, 下载次数: 20)

help.JPG

最佳答案

查看完整内容

脸图素材规格为65*96,边缘做成虚化的效果更好(图中就是虚化的效果) 如果哪句报错的话检查一下是不是被论坛添加了[%url]这样的代码 class Game_Party < Game_Unit def max_battle_members return 6 end end #============================================================================== # # ▼ Yanfly Engine Ace - Ace Battle Engine v1.19 # -- Last Updated: 2012.01.29 # -- Level: Normal, Hard # -- ...

Lv5.捕梦者 (暗夜天使)

只有笨蛋才会看到

梦石
1
星屑
21040
在线时间
9340 小时
注册时间
2012-6-19
帖子
7107

开拓者短篇九导演组冠军

2
发表于 2013-8-24 11:52:53 | 只看该作者
本帖最后由 喵呜喵5 于 2013-8-24 21:42 编辑



脸图素材规格为65*96,边缘做成虚化的效果更好(图中就是虚化的效果)

如果哪句报错的话检查一下是不是被论坛添加了[url=xxxx][\url]这样的代码

RUBY 代码复制
  1. class Game_Party < Game_Unit
  2.   def max_battle_members
  3.     return 6
  4.   end
  5. end
  6.  
  7. #==============================================================================
  8. #
  9. # ▼ Yanfly Engine Ace - Ace Battle Engine v1.19
  10. # -- Last Updated: 2012.01.29
  11. # -- Level: Normal, Hard
  12. # -- Requires: n/a
  13. #
  14. #==============================================================================
  15.  
  16. $imported = {} if $imported.nil?
  17. $imported["YEA-BattleEngine"] = true
  18.  
  19. #==============================================================================
  20. # ▼ Updates
  21. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  22. # 2012.01.29 - Visual Changes: Buff stacks now show one popup upon one skill.
  23. # 2012.01.24 - Compatibility Update: Enemy Levels
  24. # 2012.01.18 - Bug Fixed: Help Window clears text upon selecting nil items.
  25. # 2012.01.11 - Added <one animation> tag for multi-hit skills to play an
  26. #              animation only once.
  27. #            - Reduced lag from battle system constantly recreating bitmaps.
  28. # 2012.01.10 - Compatibility Update: Battle System FTB
  29. # 2012.01.09 - Anticrash methods implemented.
  30. #            - Damage Popups are now separate for damage formulas and recovery.
  31. # 2012.01.05 - Bug fixed: Game no longer crashes with escape skills/items.
  32. # 2012.01.02 - Compatibility Update: Target Manager
  33. #            - Added Option: AUTO_FAST
  34. #            - Random hits now show animations individually.
  35. # 2011.12.30 - Compatibility Update: Enemy Levels
  36. #            - Added Option to center the actors in the HUD.
  37. # 2011.12.27 - Bug fixed: TP Damage skills and items no longer crash game.
  38. #            - Default battle system bug fixes are now included from YEA's Ace
  39. #              Core Engine.
  40. #            - Groundwork is also made to support future battle system types.
  41. #            - Multi-hit actions no longer linger when a target dies during the
  42. #              middle of one of the hits.
  43. #            - Compatibility Update: Lunatic Objects v1.02
  44. # 2011.12.26 - Bug fixed: Multi-hit popups occured even after an enemy's dead.
  45. # 2011.12.22 - Bug fixed: Elemental Resistance popup didn't show.
  46. # 2011.12.20 - Bug fixed: Death state popups against immortal states.
  47. #            - Bug fixed: During State popup fix.
  48. #            - Added HIDE_POPUP_SWITCH.
  49. # 2011.12.17 - Compatibiilty Update: Cast Animations
  50. # 2011.12.15 - Compatibility Update: Battle Command List
  51. # 2011.12.14 - Compatibility Update: Lunatic Objects
  52. # 2011.12.13 - Compatibility Update: Command Party
  53. # 2011.12.12 - Bug fixed: Turn stalling if no inputable members.
  54. # 2011.12.10 - Compatibility update for Automatic Party HUD.
  55. #            - Popup graphical bug fixed.
  56. #            - Bug fixed: Didn't wait for boss dead animations.
  57. #            - Bug fixed: Surprise attacks that froze the game.
  58. #            - Bug fixed: Popups didn't show for straight recovery effects.
  59. # 2011.12.08 - Finished Script.
  60. # 2011.12.04 - Started Script.
  61. #
  62. #==============================================================================
  63. # ▼ Introduction
  64. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  65. # Ace Battle Engine works as a foundation for future battle engine add-ons. It
  66. # allows for easier management of the battle engine without adding too many
  67. # features, allowing users to customize what they want as they see fit. While
  68. # the Ace Battle Engine isn't an entirely new engine, it gives users control
  69. # that RPG Maker VX Ace didn't originally give them.
  70. #
  71. # Furthermore, this script provides some new features. They are as follows:
  72. #
  73. # -----------------------------------------------------------------------------
  74. # Animation Fixes
  75. # -----------------------------------------------------------------------------
  76. # Though the Yanfly Engine Ace - Ace Core Engine script contains these fixes,
  77. # these fixes are included in this script as well to ensure it's working for
  78. # the battle script in the event someone chooses not to work with the Ace Core
  79. # Engine script. The animation fixes prevent excessive animation overlaying
  80. # (and making the screen look really ugly) and prevents animation clashing
  81. # between two dual wielding normal attack animations.
  82. #
  83. # -----------------------------------------------------------------------------
  84. # Enemy Animations
  85. # -----------------------------------------------------------------------------
  86. # Enemies now show battle animations when they deliver attacks and skills
  87. # against the player's party. Before in RPG Maker VX Ace, it was nothing more
  88. # than just sound effects and the screen shaking. Now, animations play where
  89. # the status window is and relative to the position of each party member.
  90. #
  91. # -----------------------------------------------------------------------------
  92. # Left/Right Command Selection
  93. # -----------------------------------------------------------------------------
  94. # While choosing actions, the player can press Left or Right to move freely
  95. # between (alive) actors to change their skills. Players no longer have to
  96. # cancel all the way back to change one person's skill and reselect everything.
  97. # On that note, there is now the option that when a battle starts or at the
  98. # end of a turn, players will start immediately at command selection rather
  99. # than needing to select "Fight" in the Party Command Window.
  100. #
  101. # -----------------------------------------------------------------------------
  102. # Popups
  103. # -----------------------------------------------------------------------------
  104. # Dealing damage, inflicting states, adding buffs, landing critical hits,
  105. # striking weaknesses, missing attacks, you name it, there's probably a popup
  106. # for it. Popups deliver information to the player in a quick or orderly
  107. # fashion without requiring the player to read lines of text.
  108. #
  109. # -----------------------------------------------------------------------------
  110. # Targeting Window
  111. # -----------------------------------------------------------------------------
  112. # When targeting enemies, the window is no longer displayed. Instead, the
  113. # targeted enemies are highlighted and their names are shown at the top of the
  114. # screen in a help window. Another thing that's changed is when skills that
  115. # target multiple targets are selected, there is a confirmation step that the
  116. # player must take before continuing. In this confirmation step, all of the
  117. # multiple targets are selected and in the help window would display the scope
  118. # of the skill (such as "All Foes" or "Random Foes"). RPG Maker VX Ace skipped
  119. # this step by default.
  120. #
  121. # -----------------------------------------------------------------------------
  122. # Toggling On and Off Special Effects and Text
  123. # -----------------------------------------------------------------------------
  124. # Not everybody likes having the screen shake or the enemies blink when they
  125. # take damage. These effects can now be toggled on and off. Certain text can
  126. # also be toggled on and off from appearing. A lot of the displayed text has
  127. # been rendered redundant through the use of popups.
  128. #
  129. # -----------------------------------------------------------------------------
  130. # Visual Battle Status Window
  131. # -----------------------------------------------------------------------------
  132. # Rather than just having rows of names with HP and MP bars next to them, the
  133. # Battle Status Window now displays actors' faces and their gauges aligned at
  134. # the bottom. More status effects can be shown in addition to showing more
  135. # members on screen at once. The Battle Status Window is also optimized to
  136. # refresh less (thus, removing potential lag from the system).
  137. #
  138. # -----------------------------------------------------------------------------
  139. # Window Position Changes
  140. # -----------------------------------------------------------------------------
  141. # Windows such as the Skill Window and Item Window have been rearranged to
  142. # always provide the player a clear view of the battlefield rather than opening
  143. # up and covering everything. As such, the window positions are placed at the
  144. # bottom of the screen and are repositioned.
  145. #
  146. #==============================================================================
  147. # ▼ Instructions
  148. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  149. # To install this script, open up your script editor and copy/paste this script
  150. # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
  151. #
  152. # -----------------------------------------------------------------------------
  153. # Skill Notetags - These notetags go in the skills notebox in the database.
  154. # -----------------------------------------------------------------------------
  155. # <one animation>
  156. # Causes the action to display the action animation only once, even if it's a
  157. # multi-hit action. This is used primarily for non-all scope targeting.
  158. #
  159. # -----------------------------------------------------------------------------
  160. # Item Notetags - These notetags go in the items notebox in the database.
  161. # -----------------------------------------------------------------------------
  162. # <one animation>
  163. # Causes the action to display the action animation only once, even if it's a
  164. # multi-hit action. This is used primarily for non-all scope targeting.
  165. #
  166. # -----------------------------------------------------------------------------
  167. # Enemy Notetags - These notetags go in the enemy notebox in the database.
  168. # -----------------------------------------------------------------------------
  169. # <atk ani 1: x>
  170. # <atk ani 2: x>
  171. # Changes the normal attack animation of the particular enemy to animation x.
  172. # Attack animation 1 is the first one that plays. If there's a second animation
  173. # then the second one will play after in mirrored form.
  174. #
  175. # -----------------------------------------------------------------------------
  176. # State Notetags - These notetags go in the state notebox in the database.
  177. # -----------------------------------------------------------------------------
  178. # <popup add: string>
  179. # <popup rem: string>
  180. # <popup dur: string>
  181. # Status effects now create popups whenever they're inflicted. However, if you
  182. # don't like that a certain status effect uses a particular colour setting,
  183. # change "string" to one of the rulesets below to cause that popup to use a
  184. # different ruleset.
  185. #
  186. # <popup hide add>
  187. # <popup hide rem>
  188. # <popup hide dur>
  189. # Not everybody wants status effects to show popups when inflicted. When this
  190. # is the case, insert the respective tag to hide popups from appearing when the
  191. # state is added, removed, or during the stand-by phases.
  192. #
  193. # -----------------------------------------------------------------------------
  194. # Debug Tools - These tools only work during Test Play.
  195. # -----------------------------------------------------------------------------
  196. # - F5 Key -
  197. # Recovers all actors. Restores their HP and MP to max. Does not affect TP.
  198. # All states and buffs are removed whether they are positive or negative.
  199. #
  200. # - F6 Key -
  201. # Sets all actors to have 1 HP, 0 MP, and 0 TP. States are unaffected.
  202. #
  203. # - F7 Key -
  204. # Sets all actors to have max TP. Everything else is unaffected.
  205. #
  206. # - F8 Key -
  207. # Kills all enemies in battle. Ends the battle quickly.
  208. #
  209. #==============================================================================
  210. # ▼ Compatibility
  211. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  212. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  213. # it will run with RPG Maker VX without adjusting.
  214. #
  215. #==============================================================================
  216.  
  217. module YEA
  218.   module BATTLE
  219.  
  220.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  221.     # - General Battle Settings -
  222.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  223.     # These settings are adjusted for the overall battle system. These are
  224.     # various miscellaneous options to adjust. Each of the settings below will
  225.     # explain what they do. Change default enemy battle animations here, too.
  226.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  227.     BLINK_EFFECTS      = false  # Blink sprite when damaged?
  228.     FLASH_WHITE_EFFECT = true   # Flash enemy white when it starts an attack.
  229.     SCREEN_SHAKE       = false  # Shake screen in battle?
  230.     SKIP_PARTY_COMMAND = true   # Skips the Fight/Escape menu.
  231.     AUTO_FAST          = true   # Causes message windows to not wait.
  232.     ENEMY_ATK_ANI      = 36     # Sets default attack animation for enemies.
  233.  
  234.     # If this switch is ON, popups will be hidden. If OFF, the popups will be
  235.     # shown. If you do not wish to use this switch, set it to 0.
  236.     HIDE_POPUP_SWITCH  = 11
  237.  
  238.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  239.     # - Battle Status Window -
  240.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  241.     # This sets the default battle system your game will use. If your game
  242.     # doesn't have any other battle systems installed, it will use :dtb.
  243.     #
  244.     # Battle System        Requirement
  245.     #   :dtb               - Default Turn Battle. Default system.
  246.     #   :ftb               - YEA Battle System Add-On: Free Turn Battle
  247.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  248.     DEFAULT_BATTLE_SYSTEM = :dtb     # Default battle system set.
  249.  
  250.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  251.     # - Battle Status Window -
  252.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  253.     # Here, you can adjust the settings for the battle status window. The
  254.     # battle status window, by default, will show the actor's face, HP, MP, TP
  255.     # (if viable), and any inflicted status effects.
  256.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  257.     BATTLESTATUS_NAME_FONT_SIZE = 20    # Font size used for name.
  258.     BATTLESTATUS_TEXT_FONT_SIZE = 20    # Font size used for HP, MP, TP.
  259.     BATTLESTATUS_NO_ACTION_ICON = 185   # No action icon.
  260.     BATTLESTATUS_HPGAUGE_Y_PLUS = 31    # Y Location buffer used for HP gauge.
  261.     BATTLESTATUS_CENTER_FACES   = false # Center faces for the Battle Status.
  262.  
  263.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  264.     # - Help Window Text -
  265.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  266.     # When selecting a target to attack, this is the text that will be shown
  267.     # in place of a target's name for special cases. These special cases are
  268.     # for selections that were originally non-targetable battle scopes.
  269.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  270.     HELP_TEXT_ALL_FOES        = "敌方全体"
  271.     HELP_TEXT_ONE_RANDOM_FOE  = "敌方随机成员一名"
  272.     HELP_TEXT_MANY_RANDOM_FOE = "敌方随机成员%d名"
  273.     HELP_TEXT_ALL_ALLIES      = "我方全体"
  274.     HELP_TEXT_ALL_DEAD_ALLIES = "我方全体(战斗不能)"
  275.     HELP_TEXT_ONE_RANDOM_ALLY = "我方随机成员一名"
  276.     HELP_TEXT_RANDOM_ALLIES   = "我方随机成员%d名"
  277.  
  278.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  279.     # - Popup Settings -
  280.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  281.     # These settings will adjust the popups that appear in battle. Popups
  282.     # deliver information to your player as battlers deal damage, inflict
  283.     # status effects, and more.
  284.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  285.     ENABLE_POPUPS  = false#true     # Set this to false if you wish to disable them.
  286.     FLASH_CRITICAL = true     # Sets critical hits to flash.
  287.  
  288.     # This hash adjusts the popup settings that will govern how popups appear.
  289.     # Adjust them accordingly.
  290.     POPUP_SETTINGS ={
  291.       :offset     => -24,         # Height offset of a popup.
  292.       :fade       => 12,          # Fade rate for each popup.
  293.       :full       => 60,          # Frames before a popup fades.
  294.       :hp_dmg     => "-%s ",      # SprintF for HP damage.
  295.       :hp_heal    => "+%s ",      # SprintF for HP healing.
  296.       :mp_dmg     => "-%s MP",    # SprintF for MP damage.
  297.       :mp_heal    => "+%s MP",    # SprintF for MP healing.
  298.       :tp_dmg     => "-%s TP",    # SprintF for MP damage.
  299.       :tp_heal    => "+%s TP",    # SprintF for MP healing.
  300.       :drained    => "DRAIN",     # Text display for draining HP/MP.
  301.       :critical   => "CRITICAL!", # Text display for critical hit.
  302.       :missed     => "MISS",      # Text display for missed attack.
  303.       :evaded     => "EVADE!",    # Text display for evaded attack.
  304.       :nulled     => "NULL",      # Text display for nulled attack.
  305.       :failed     => "FAILED",    # Text display for a failed attack.
  306.       :add_state  => "+%s",      # SprintF for added states.
  307.       :rem_state  => "-%s",      # SprintF for removed states.
  308.       :dur_state  => "%s",        # SprintF for during states.
  309.       :ele_rates  => true,        # This will display elemental affinities.
  310.       :ele_wait   => 20,          # This is how many frames will wait.
  311.       :weakpoint  => "WEAKPOINT", # Appears if foe is weak to element.
  312.       :resistant  => "RESIST",    # Appears if foe is resistant to element.
  313.       :immune     => "IMMUNE",    # Appears if foe is immune to element.
  314.       :absorbed   => "ABSORB",    # Appears if foe can absorb the element.
  315.       :add_buff   => "%s+",      # Appears when a positive buff is applied.
  316.       :add_debuff => "%s-",      # Appears when a negative buff is applied.
  317.     } # Do not remove this.
  318.  
  319.     # This is the default font used for the popups. Adjust them accordingly
  320.     # or even add new ones.
  321.     DEFAULT = ["Microsoft Yahei","微软雅黑","黑体", "VL Gothic", "Verdana", "Arial", "Courier"]
  322. #~  
  323.     # The following are the various rules that govern the individual popup
  324.     # types that will appear. Adjust them accordingly. Here is a list of what
  325.     # each category does.
  326.     #   Zoom1    The zoom the popup starts at. Values over 2.0 may cause lag.
  327.     #   Zoom2    The zoom the popup goes to. Values over 2.0 may cause lag.
  328.     #   Sz       The font size used for the popup text.
  329.     #   Bold     Applying bold for the popup text.
  330.     #   Italic   Applying italic for the popup text.
  331.     #   Red      The red value of the popup text.
  332.     #   Grn      The green value of the popup text.
  333.     #   Blu      The blue value of the popup text.
  334.     #   Font     The font used for the popup text.
  335.     POPUP_RULES ={
  336.       # Type     => [ Zoom1, Zoom2, Sz, Bold, Italic, Red, Grn, Blu, Font]
  337.       "DEFAULT"  => [   2.0,   1.0, 24, true,  false, 255, 255, 255, DEFAULT],
  338.       "CRITICAL" => [   2.0,   1.0, 24, true,  false, 255,  80,  80, DEFAULT],
  339.       "HP_DMG"   => [   2.0,   1.0, 36, true,  false, 255, 255, 255, DEFAULT],
  340.       "HP_HEAL"  => [   2.0,   1.0, 36, true,  false, 130, 250, 130, DEFAULT],
  341.       "MP_DMG"   => [   2.0,   1.0, 36, true,  false, 220, 180, 255, DEFAULT],
  342.       "MP_HEAL"  => [   2.0,   1.0, 36, true,  false, 160, 230, 255, DEFAULT],
  343.       "TP_DMG"   => [   2.0,   1.0, 36, true,  false, 242, 108,  78, DEFAULT],
  344.       "TP_HEAL"  => [   2.0,   1.0, 36, true,  false, 251, 175,  92, DEFAULT],
  345.       "ADDSTATE" => [   2.0,   1.0, 24, true,  false, 240, 100, 100, DEFAULT],
  346.       "REMSTATE" => [   2.0,   1.0, 24, true,  false, 125, 170, 225, DEFAULT],
  347.       "DURSTATE" => [   2.0,   1.0, 24, true,  false, 255, 240, 150, DEFAULT],
  348.       "DRAIN"    => [   2.0,   1.0, 36, true,  false, 250, 190, 255, DEFAULT],
  349.       "POSITIVE" => [   2.0,   1.0, 24, true,  false, 110, 210, 245, DEFAULT],
  350.       "NEGATIVE" => [   2.0,   1.0, 24, true,  false, 245, 155, 195, DEFAULT],
  351.       "WEAK_ELE" => [   0.5,   1.0, 24, true,  false, 240, 110,  80, DEFAULT],
  352.       "IMMU_ELE" => [   0.5,   1.0, 24, true,  false, 185, 235, 255, DEFAULT],
  353.       "REST_ELE" => [   0.5,   1.0, 24, true,  false, 145, 230, 180, DEFAULT],
  354.       "ABSB_ELE" => [   0.5,   1.0, 24, true,  false, 250, 190, 255, DEFAULT],
  355.       "BUFF"     => [   2.0,   1.0, 24, true,  false, 255, 240, 100, DEFAULT],
  356.       "DEBUFF"   => [   2.0,   1.0, 24, true,  false, 160, 130, 200, DEFAULT],
  357.     } # Do not remove this.
  358.  
  359.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  360.     # - Streamlined Messages -
  361.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  362.     # Want to remove some of those annoying messages that appear all the time?
  363.     # Now you can! Select which messages you want to enable or disable. Some of
  364.     # these messages will be rendered useless due to popups.
  365.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  366.     MSG_ENEMY_APPEARS  = false  # Message when enemy appears start of battle.
  367.     MSG_CURRENT_STATE  = false  # Show which states has affected battler.
  368.     MSG_CURRENT_ACTION = true   # Show the current action of the battler.
  369.     MSG_COUNTERATTACK  = true   # Show the message for a counterattack.
  370.     MSG_REFLECT_MAGIC  = true   # Show message for reflecting magic attacks.
  371.     MSG_SUBSTITUTE_HIT = true   # Show message for ally taking another's hit.
  372.     MSG_FAILURE_HIT    = false  # Show effect failed against target.
  373.     MSG_CRITICAL_HIT   = false  # Show attack was a critical hit.
  374.     MSG_HIT_MISSED     = false  # Show attack missed the target.
  375.     MSG_EVASION        = false  # Show attack was evaded by the target.
  376.     MSG_HP_DAMAGE      = false  # Show HP damage to target.
  377.     MSG_MP_DAMAGE      = false  # Show MP damage to target.
  378.     MSG_TP_DAMAGE      = false  # Show TP damage to target.
  379.     MSG_ADDED_STATES   = false  # Show target's added states.
  380.     MSG_REMOVED_STATES = false  # Show target's removed states.
  381.     MSG_CHANGED_BUFFS  = false  # Show target's changed buffs.
  382.  
  383.   end # BATTLE
  384. end # YEA
  385.  
  386. #==============================================================================
  387. # ▼ Editting anything past this point may potentially result in causing
  388. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  389. # halitosis so edit at your own risk.
  390. #==============================================================================
  391.  
  392. module YEA
  393.   module REGEXP
  394.   module ENEMY
  395.  
  396.     ATK_ANI1 = /<(?:ATK_ANI_1|atk ani 1):[ ]*(\d+)>/i
  397.     ATK_ANI2 = /<(?:ATK_ANI_2|atk ani 2):[ ]*(\d+)>/i
  398.  
  399.   end # ENEMY
  400.   module USABLEITEM
  401.  
  402.     ONE_ANIMATION = /<(?:ONE_ANIMATION|one animation)>/i
  403.  
  404.   end # USABLEITEM
  405.   module STATE
  406.  
  407.     POPUP_ADD = /<(?:POPUP_ADD_RULE|popup add rule|popup add):[ ](.*)>/i
  408.     POPUP_REM = /<(?:POPUP_REM_RULE|popup rem rule|popup rem):[ ](.*)>/i
  409.     POPUP_DUR = /<(?:POPUP_DUR_RULE|popup dur rule|popup dur):[ ](.*)>/i
  410.  
  411.     HIDE_ADD  = /<(?:POPUP_HIDE_ADD|popup hide add|hide add)>/i
  412.     HIDE_REM  = /<(?:POPUP_HIDE_REM|popup hide rem|hide rem)>/i
  413.     HIDE_DUR  = /<(?:POPUP_HIDE_DUR|popup hide dur|hide dur)>/i
  414.  
  415.   end # STATE
  416.   end # REGEXP
  417. end # YEA
  418.  
  419. #==============================================================================
  420. # ■ Switch
  421. #==============================================================================
  422.  
  423. module Switch
  424.  
  425.   #--------------------------------------------------------------------------
  426.   # self.hide_popups
  427.   #--------------------------------------------------------------------------
  428.   def self.hide_popups
  429.     return false if YEA::BATTLE::HIDE_POPUP_SWITCH <= 0
  430.     return $game_switches[YEA::BATTLE::HIDE_POPUP_SWITCH]
  431.   end
  432.  
  433. end # Switch
  434.  
  435. #==============================================================================
  436. # ■ Colour
  437. #==============================================================================
  438.  
  439. module Colour
  440.  
  441.   #--------------------------------------------------------------------------
  442.   # self.text_colour
  443.   #--------------------------------------------------------------------------
  444.   def self.text_colour(index)
  445.     windowskin = Cache.system("Window")
  446.     x = 64 + (index % 8) * 8
  447.     y = 96 + (index / 8) * 8
  448.     return windowskin.get_pixel(x, y)
  449.   end
  450.  
  451. end # Colour
  452.  
  453. #==============================================================================
  454. # ■ Icon
  455. #==============================================================================
  456.  
  457. module Icon
  458.  
  459.   #--------------------------------------------------------------------------
  460.   # self.no_action
  461.   #--------------------------------------------------------------------------
  462.   def self.no_action; return YEA::BATTLE::BATTLESTATUS_NO_ACTION_ICON; end
  463.  
  464. end # Icon
  465.  
  466. #==============================================================================
  467. # ■ Numeric
  468. #==============================================================================
  469.  
  470. class Numeric
  471.  
  472.   #--------------------------------------------------------------------------
  473.   # new method: group_digits
  474.   #--------------------------------------------------------------------------
  475.   unless $imported["YEA-CoreEngine"]
  476.   def group; return self.to_s; end
  477.   end # $imported["YEA-CoreEngine"]
  478.  
  479. end # Numeric
  480.  
  481. #==============================================================================
  482. # ■ DataManager
  483. #==============================================================================
  484.  
  485. module DataManager
  486.  
  487.   #--------------------------------------------------------------------------
  488.   # alias method: load_database
  489.   #--------------------------------------------------------------------------
  490.   class <<self; alias load_database_abe load_database; end
  491.   def self.load_database
  492.     load_database_abe
  493.     load_notetags_abe
  494.   end
  495.  
  496.   #--------------------------------------------------------------------------
  497.   # new method: load_notetags_abe
  498.   #--------------------------------------------------------------------------
  499.   def self.load_notetags_abe
  500.     groups = [$data_enemies, $data_states, $data_skills, $data_items]
  501.     for group in groups
  502.       for obj in group
  503.         next if obj.nil?
  504.         obj.load_notetags_abe
  505.       end
  506.     end
  507.   end
  508.  
  509. end # DataManager
  510.  
  511. #==============================================================================
  512. # ■ RPG::UsableItem
  513. #==============================================================================
  514.  
  515. class RPG::UsableItem < RPG::BaseItem
  516.  
  517.   #--------------------------------------------------------------------------
  518.   # public instance variables
  519.   #--------------------------------------------------------------------------
  520.   attr_accessor :one_animation
  521.  
  522.   #--------------------------------------------------------------------------
  523.   # common cache: load_notetags_abe
  524.   #--------------------------------------------------------------------------
  525.   def load_notetags_abe
  526.     @one_animation = false
  527.     #---
  528.     self.note.split(/[\r\n]+/).each { |line|
  529.       case line
  530.       #---
  531.       when YEA::REGEXP::USABLEITEM::ONE_ANIMATION
  532.         @one_animation = true
  533.       end
  534.     } # self.note.split
  535.     #---
  536.   end
  537.  
  538. end # RPG::UsableItem
  539.  
  540. #==============================================================================
  541. # ■ RPG::Enemy
  542. #==============================================================================
  543.  
  544. class RPG::Enemy < RPG::BaseItem
  545.  
  546.   #--------------------------------------------------------------------------
  547.   # public instance variables
  548.   #--------------------------------------------------------------------------
  549.   attr_accessor :atk_animation_id1
  550.   attr_accessor :atk_animation_id2
  551.  
  552.   #--------------------------------------------------------------------------
  553.   # common cache: load_notetags_abe
  554.   #--------------------------------------------------------------------------
  555.   def load_notetags_abe
  556.     @atk_animation_id1 = YEA::BATTLE::ENEMY_ATK_ANI
  557.     @atk_animation_id2 = 0
  558.     #---
  559.     self.note.split(/[\r\n]+/).each { |line|
  560.       case line
  561.       #---
  562.       when YEA::REGEXP::ENEMY::ATK_ANI1
  563.         @atk_animation_id1 = $1.to_i
  564.       when YEA::REGEXP::ENEMY::ATK_ANI2
  565.         @atk_animation_id2 = $1.to_i
  566.       end
  567.     } # self.note.split
  568.     #---
  569.   end
  570.  
  571. end # RPG::Enemy
  572.  
  573. #==============================================================================
  574. # ■ RPG::Enemy
  575. #==============================================================================
  576.  
  577. class RPG::State < RPG::BaseItem
  578.  
  579.   #--------------------------------------------------------------------------
  580.   # public instance variables
  581.   #--------------------------------------------------------------------------
  582.   attr_accessor :popup_rules
  583.  
  584.   #--------------------------------------------------------------------------
  585.   # common cache: load_notetags_abe
  586.   #--------------------------------------------------------------------------
  587.   def load_notetags_abe
  588.     @popup_rules = {
  589.       :add_state => "ADDSTATE",
  590.       :rem_state => "REMSTATE",
  591.       :dur_state => nil
  592.     } # Do not remove this.
  593.     #---
  594.     self.note.split(/[\r\n]+/).each { |line|
  595.       case line
  596.       #---
  597.       when YEA::REGEXP::STATE::POPUP_ADD
  598.         @popup_rules[:add_state] = $1.upcase.to_s
  599.       when YEA::REGEXP::STATE::POPUP_REM
  600.         @popup_rules[:rem_state] = $1.upcase.to_s
  601.       when YEA::REGEXP::STATE::POPUP_DUR
  602.         @popup_rules[:dur_state] = $1.upcase.to_s
  603.       when YEA::REGEXP::STATE::HIDE_ADD
  604.         @popup_rules[:add_state] = nil
  605.       when YEA::REGEXP::STATE::HIDE_REM
  606.         @popup_rules[:rem_state] = nil
  607.       when YEA::REGEXP::STATE::HIDE_DUR
  608.         @popup_rules[:dur_state] = nil
  609.       end
  610.     } # self.note.split
  611.     #---
  612.   end
  613.  
  614. end # RPG::State
  615.  
  616. #==============================================================================
  617. # ■ BattleManager
  618. #==============================================================================
  619.  
  620. module BattleManager
  621.  
  622.   #--------------------------------------------------------------------------
  623.   # overwrite method: self.battle_start
  624.   #--------------------------------------------------------------------------
  625.   def self.battle_start
  626.     $game_system.battle_count += 1
  627.     $game_party.on_battle_start
  628.     $game_troop.on_battle_start
  629.     return unless YEA::BATTLE::MSG_ENEMY_APPEARS
  630.     $game_troop.enemy_names.each do |name|
  631.       $game_message.add(sprintf(Vocab::Emerge, name))
  632.     end
  633.     if @preemptive
  634.       $game_message.add(sprintf(Vocab::Preemptive, $game_party.name))
  635.     elsif @surprise
  636.       $game_message.add(sprintf(Vocab::Surprise, $game_party.name))
  637.     end
  638.     wait_for_message
  639.   end
  640.  
  641.   #--------------------------------------------------------------------------
  642.   # overwrite method: make_action_orders
  643.   #--------------------------------------------------------------------------
  644.   def self.make_action_orders
  645.     make_dtb_action_orders if btype?(:dtb)
  646.   end
  647.  
  648.   #--------------------------------------------------------------------------
  649.   # new method: make_dtb_action_orders
  650.   #--------------------------------------------------------------------------
  651.   def self.make_dtb_action_orders
  652.     @action_battlers = []
  653.     @action_battlers += $game_party.members unless @surprise
  654.     @action_battlers += $game_troop.members unless @preemptive
  655.     @action_battlers.each {|battler| battler.make_speed }
  656.     @action_battlers.sort! {|a,b| b.speed - a.speed }
  657.   end
  658.  
  659.   #--------------------------------------------------------------------------
  660.   # overwrite method: turn_start
  661.   #--------------------------------------------------------------------------
  662.   def self.turn_start
  663.     @phase = :turn
  664.     clear_actor
  665.     $game_troop.increase_turn
  666.     @performed_battlers = []
  667.     make_action_orders
  668.   end
  669.  
  670.   #--------------------------------------------------------------------------
  671.   # overwrite method: next_subject
  672.   #--------------------------------------------------------------------------
  673.   def self.next_subject
  674.     @performed_battlers = [] if @performed_battlers.nil?
  675.     loop do
  676.       @action_battlers -= @performed_battlers
  677.       battler = @action_battlers.shift
  678.       return nil unless battler
  679.       next unless battler.index && battler.alive?
  680.       @performed_battlers.push(battler)
  681.       return battler
  682.     end
  683.   end
  684.  
  685.   #--------------------------------------------------------------------------
  686.   # overwrite method: force_action
  687.   #--------------------------------------------------------------------------
  688.   def self.force_action(battler)
  689.     @action_forced = [] if @action_forced == nil
  690.     @action_forced.push(battler)
  691.     return unless Switch.forced_action_remove
  692.     @action_battlers.delete(battler)
  693.   end
  694.  
  695.   #--------------------------------------------------------------------------
  696.   # overwrite method: action_forced?
  697.   #--------------------------------------------------------------------------
  698.   def self.action_forced?
  699.     @action_forced != nil
  700.   end
  701.  
  702.   #--------------------------------------------------------------------------
  703.   # overwrite method: action_forced_battler
  704.   #--------------------------------------------------------------------------
  705.   def self.action_forced_battler
  706.     @action_forced.shift
  707.   end
  708.  
  709.   #--------------------------------------------------------------------------
  710.   # overwrite method: clear_action_force
  711.   #--------------------------------------------------------------------------
  712.   def self.clear_action_force
  713.     return if @action_forced.nil?
  714.     @action_forced = nil if @action_forced.empty?
  715.   end
  716.  
  717.   #--------------------------------------------------------------------------
  718.   # new method: self.init_battle_type
  719.   #--------------------------------------------------------------------------
  720.   def self.init_battle_type
  721.     set_btype($game_system.battle_system)
  722.   end
  723.  
  724.   #--------------------------------------------------------------------------
  725.   # new method: self.set_btype
  726.   #--------------------------------------------------------------------------
  727.   def self.set_btype(btype = :dtb)
  728.     @battle_type = btype
  729.   end
  730.  
  731.   #--------------------------------------------------------------------------
  732.   # new method: self.btype?
  733.   #--------------------------------------------------------------------------
  734.   def self.btype?(btype)
  735.     return @battle_type == btype
  736.   end
  737.  
  738. end # BattleManager
  739.  
  740. #==============================================================================
  741. # ■ Game_System
  742. #==============================================================================
  743.  
  744. class Game_System
  745.  
  746.   #--------------------------------------------------------------------------
  747.   # new method: battle_system
  748.   #--------------------------------------------------------------------------
  749.   def battle_system
  750.     if @battle_system.nil?
  751.       return battle_system_corrected(YEA::BATTLE::DEFAULT_BATTLE_SYSTEM)
  752.     else
  753.       return battle_system_corrected(@battle_system)
  754.     end
  755.   end
  756.  
  757.   #--------------------------------------------------------------------------
  758.   # new method: set_battle_system
  759.   #--------------------------------------------------------------------------
  760.   def set_battle_system(type)
  761.     case type
  762.     when :dtb; @battle_system = :dtb
  763.     when :ftb; @battle_system = $imported["YEA-BattleSystem-FTB"] ? :ftb : :dtb
  764.     else;      @battle_system = :dtb
  765.     end
  766.   end
  767.  
  768.   #--------------------------------------------------------------------------
  769.   # new method: battle_system_corrected
  770.   #--------------------------------------------------------------------------
  771.   def battle_system_corrected(type)
  772.     case type
  773.     when :dtb; return :dtb
  774.     when :ftb; return $imported["YEA-BattleSystem-FTB"] ? :ftb : :dtb
  775.     else;      return :dtb
  776.     end
  777.   end
  778.  
  779. end # Game_System
  780.  
  781. #==============================================================================
  782. # ■ Sprite_Base
  783. #==============================================================================
  784.  
  785. class Sprite_Base < Sprite
  786.  
  787.   #--------------------------------------------------------------------------
  788.   # new method: start_pseudo_animation
  789.   #--------------------------------------------------------------------------
  790.   unless $imported["YEA-CoreEngine"]
  791.   def start_pseudo_animation(animation, mirror = false)
  792.     dispose_animation
  793.     @animation = animation
  794.     return if @animation.nil?
  795.     @ani_mirror = mirror
  796.     set_animation_rate
  797.     @ani_duration = @animation.frame_max * @ani_rate + 1
  798.     @ani_sprites = []
  799.   end
  800.   end # $imported["YEA-CoreEngine"]
  801.  
  802. end # Sprite_Base
  803.  
  804. #==============================================================================
  805. # ■ Sprite_Battler
  806. #==============================================================================
  807.  
  808. class Sprite_Battler < Sprite_Base
  809.  
  810.   #--------------------------------------------------------------------------
  811.   # public instance variables
  812.   #--------------------------------------------------------------------------
  813.   attr_accessor :effect_type
  814.   attr_accessor :battler_visible
  815.   attr_accessor :popups
  816.  
  817.   #--------------------------------------------------------------------------
  818.   # alias method: initialize
  819.   #--------------------------------------------------------------------------
  820.   alias sprite_battler_initialize_abe initialize
  821.   def initialize(viewport, battler = nil)
  822.     sprite_battler_initialize_abe(viewport, battler)
  823.     @popups = []
  824.     @popup_flags = []
  825.   end
  826.  
  827.   #--------------------------------------------------------------------------
  828.   # alias method: update_bitmap
  829.   #--------------------------------------------------------------------------
  830.   alias sprite_battler_update_bitmap_abe update_bitmap
  831.   def update_bitmap
  832.     return if @battler.actor? && @battler.battler_name == ""
  833.     sprite_battler_update_bitmap_abe
  834.   end
  835.  
  836.   #--------------------------------------------------------------------------
  837.   # alias method: setup_new_animation
  838.   #--------------------------------------------------------------------------
  839.   unless $imported["YEA-CoreEngine"]
  840.   alias sprite_battler_setup_new_animation_abe setup_new_animation
  841.   def setup_new_animation
  842.     sprite_battler_setup_new_animation_abe
  843.     return if @battler.pseudo_ani_id <= 0
  844.     animation = $data_animations[@battler.pseudo_ani_id]
  845.     mirror = @battler.animation_mirror
  846.     start_pseudo_animation(animation, mirror)
  847.     @battler.pseudo_ani_id = 0
  848.   end
  849.   end # $imported["YEA-CoreEngine"]
  850.  
  851.   #--------------------------------------------------------------------------
  852.   # alias method: setup_new_effect
  853.   #--------------------------------------------------------------------------
  854.   alias sprite_battler_setup_new_effect_abe setup_new_effect
  855.   def setup_new_effect
  856.     sprite_battler_setup_new_effect_abe
  857.     setup_popups
  858.   end
  859.  
  860.   #--------------------------------------------------------------------------
  861.   # new method: setup_popups
  862.   #--------------------------------------------------------------------------
  863.   def setup_popups
  864.     return unless @battler.use_sprite?
  865.     @battler.popups = [] if @battler.popups.nil?
  866.     return if @battler.popups == []
  867.     array = @battler.popups.shift
  868.     create_new_popup(array[0], array[1], array[2])
  869.   end
  870.  
  871.   #--------------------------------------------------------------------------
  872.   # new method: create_new_popup
  873.   #--------------------------------------------------------------------------
  874.   def create_new_popup(value, rules, flags)
  875.     return if [url=home.php?mod=space&uid=133701]@battler[/url] == nil
  876.     return if flags & @popup_flags != []
  877.     array = YEA::BATTLE::POPUP_RULES[rules]
  878.     for popup in @popups
  879.       popup.y -= 24
  880.     end
  881.     return unless SceneManager.scene.is_a?(Scene_Battle)
  882.     return if SceneManager.scene.spriteset.nil?
  883.     view = SceneManager.scene.spriteset.viewportPopups
  884.     new_popup = Sprite_Popup.new(view, @battler, value, rules, flags)
  885.     @popups.push(new_popup)
  886.     @popup_flags.push("weakness") if flags.include?("weakness")
  887.     @popup_flags.push("resistant") if flags.include?("resistant")
  888.     @popup_flags.push("immune") if flags.include?("immune")
  889.     @popup_flags.push("absorbed") if flags.include?("absorbed")
  890.   end
  891.  
  892.   #--------------------------------------------------------------------------
  893.   # alias method: update_effect
  894.   #--------------------------------------------------------------------------
  895.   alias sprite_battler_update_effect_abe update_effect
  896.   def update_effect
  897.     sprite_battler_update_effect_abe
  898.     update_popups
  899.   end
  900.  
  901.   #--------------------------------------------------------------------------
  902.   # new method: update_popups
  903.   #--------------------------------------------------------------------------
  904.   def update_popups
  905.     for popup in @popups
  906.       popup.update
  907.       next unless popup.opacity <= 0
  908.       popup.bitmap.dispose
  909.       popup.dispose
  910.       @popups.delete(popup)
  911.       popup = nil
  912.     end
  913.     @popup_flags = [] if @popups == [] && @popup_flags != []
  914.     return unless SceneManager.scene_is?(Scene_Battle)
  915.     if @current_active_battler != SceneManager.scene.subject
  916.       @current_active_battler = SceneManager.scene.subject
  917.       @popup_flags = []
  918.     end
  919.   end
  920.  
  921. end # Sprite_Battler
  922.  
  923. #==============================================================================
  924. # ■ Sprite_Popup
  925. #==============================================================================
  926.  
  927. class Sprite_Popup < Sprite_Base
  928.  
  929.   #--------------------------------------------------------------------------
  930.   # public instance variables
  931.   #--------------------------------------------------------------------------
  932.   attr_accessor :flags
  933.  
  934.   #--------------------------------------------------------------------------
  935.   # initialize
  936.   #--------------------------------------------------------------------------
  937.   def initialize(viewport, battler, value, rules, flags)
  938.     super(viewport)
  939.     @value = value
  940.     @rules = rules
  941.     @rules = "DEFAULT" unless YEA::BATTLE::POPUP_RULES.include?(@rules)
  942.     [url=home.php?mod=space&uid=274289]@fade[/url] = YEA::BATTLE::POPUP_SETTINGS[:fade]
  943.     @full = YEA::BATTLE::POPUP_SETTINGS[:full]
  944.     @flags = flags
  945.     @battler = battler
  946.     create_popup_bitmap
  947.   end
  948.  
  949.   #--------------------------------------------------------------------------
  950.   # create_popup_bitmap
  951.   #--------------------------------------------------------------------------
  952.   def create_popup_bitmap
  953.     rules_array = YEA::BATTLE::POPUP_RULES[@rules]
  954.     bw = Graphics.width
  955.     bw += 48 if @flags.include?("state")
  956.     bh = Font.default_size * 3
  957.     bitmap = Bitmap.new(bw, bh)
  958.     bitmap.font.name = rules_array[8]
  959.     size = @flags.include?("critical") ? rules_array[2] * 1.2 : rules_array[2]
  960.     bitmap.font.size = size
  961.     bitmap.font.bold = rules_array[3]
  962.     bitmap.font.italic = rules_array[4]
  963.     if flags.include?("critical")
  964.       crit = YEA::BATTLE::POPUP_RULES["CRITICAL"]
  965.       bitmap.font.out_color.set(crit[5], crit[6], crit[7], 255)
  966.     else
  967.       bitmap.font.out_color.set(0, 0, 0, 255)
  968.     end
  969.     dx = 0; dy = 0; dw = 0
  970.     dx += 24 if @flags.include?("state")
  971.     dw += 24 if @flags.include?("state")
  972.     if @flags.include?("state") || @flags.include?("buff")
  973.       c_width = bitmap.text_size(@value).width
  974.       icon_bitmap = $game_temp.iconset
  975.       icon_index = flag_state_icon
  976.       rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
  977.       bitmap.blt(dx+(bw-c_width)/2-36, (bh - 24)/2, icon_bitmap, rect, 255)
  978.     end
  979.     bitmap.font.color.set(rules_array[5], rules_array[6], rules_array[7])
  980.     bitmap.draw_text(dx, dy, bw-dw, bh, @value, 1)
  981.     self.bitmap = bitmap
  982.     self.x = @battler.screen_x
  983.     self.x += rand(4) - rand(4) if @battler.sprite.popups.size >= 1
  984.     self.x -= SceneManager.scene.spriteset.viewport1.ox
  985.     self.y = @battler.screen_y - @battler.sprite.oy/2
  986.     self.y -= @battler.sprite.oy/2 if @battler.actor?
  987.     self.y -= SceneManager.scene.spriteset.viewport1.oy
  988.     self.ox = bw/2; self.oy = bh/2
  989.     self.zoom_x = self.zoom_y = rules_array[0]
  990.     if @flags.include?("no zoom")
  991.       self.zoom_x = self.zoom_y = rules_array[1]
  992.     end
  993.     @target_zoom = rules_array[1]
  994.     @zoom_direction = (self.zoom_x > @target_zoom) ? "down" : "up"
  995.     self.z = 500
  996.   end
  997.  
  998.   #--------------------------------------------------------------------------
  999.   # update
  1000.   #--------------------------------------------------------------------------
  1001.   def update
  1002.     super
  1003.     #---
  1004.     if @flags.include?("critical") && YEA::BATTLE::FLASH_CRITICAL
  1005.       @hue_duration = 2 if @hue_duration == nil || @hue_duration == 0
  1006.       @hue_duration -= 1
  1007.       self.bitmap.hue_change(15) if @hue_duration <= 0
  1008.     end
  1009.     #---
  1010.     if @zoom_direction == "up"
  1011.       self.zoom_x = [self.zoom_x + 0.075, @target_zoom].min
  1012.       self.zoom_y = [self.zoom_y + 0.075, @target_zoom].min
  1013.     else
  1014.       self.zoom_x = [self.zoom_x - 0.075, @target_zoom].max
  1015.       self.zoom_y = [self.zoom_y - 0.075, @target_zoom].max
  1016.     end
  1017.     #---
  1018.     @full -= 1
  1019.     return if @full > 0
  1020.     self.y -= 1
  1021.     self.opacity -= @fade
  1022.   end
  1023.  
  1024.   #--------------------------------------------------------------------------
  1025.   # flag_state_icon
  1026.   #--------------------------------------------------------------------------
  1027.   def flag_state_icon
  1028.     for item in @flags; return item if item.is_a?(Integer); end
  1029.     return 0
  1030.   end
  1031.  
  1032. end # Sprite_Popup
  1033.  
  1034. #==============================================================================
  1035. # ■ Spriteset_Battle
  1036. #==============================================================================
  1037.  
  1038. class Spriteset_Battle
  1039.  
  1040.   #--------------------------------------------------------------------------
  1041.   # public instance variables
  1042.   #--------------------------------------------------------------------------
  1043.   attr_accessor :actor_sprites
  1044.   attr_accessor :enemy_sprites
  1045.   attr_accessor :viewport1
  1046.   attr_accessor :viewportPopups
  1047.  
  1048.   #--------------------------------------------------------------------------
  1049.   # alias method: create_viewports
  1050.   #--------------------------------------------------------------------------
  1051.   alias spriteset_battle_create_viewports_abe create_viewports
  1052.   def create_viewports
  1053.     spriteset_battle_create_viewports_abe
  1054.     @viewportPopups = Viewport.new
  1055.     @viewportPopups.z = 200
  1056.   end
  1057.  
  1058.   #--------------------------------------------------------------------------
  1059.   # alias method: dispose_viewports
  1060.   #--------------------------------------------------------------------------
  1061.   alias spriteset_battle_dispose_viewports_abe dispose_viewports
  1062.   def dispose_viewports
  1063.     spriteset_battle_dispose_viewports_abe
  1064.     @viewportPopups.dispose
  1065.   end
  1066.  
  1067.   #--------------------------------------------------------------------------
  1068.   # alias method: update_viewports
  1069.   #--------------------------------------------------------------------------
  1070.   alias spriteset_battle_update_viewports_abe update_viewports
  1071.   def update_viewports
  1072.     spriteset_battle_update_viewports_abe
  1073.     @viewportPopups.update
  1074.   end
  1075.  
  1076. end # Spriteset_Battle
  1077.  
  1078. #==============================================================================
  1079. # ■ Game_Temp
  1080. #==============================================================================
  1081.  
  1082. class Game_Temp
  1083.  
  1084.   #--------------------------------------------------------------------------
  1085.   # public instance variables
  1086.   #--------------------------------------------------------------------------
  1087.   attr_accessor :battle_aid
  1088.   attr_accessor :evaluating
  1089.   attr_accessor :iconset
  1090.  
  1091.   #--------------------------------------------------------------------------
  1092.   # alias method: initialize
  1093.   #--------------------------------------------------------------------------
  1094.   alias game_temp_initialize_abe initialize
  1095.   def initialize
  1096.     game_temp_initialize_abe
  1097.     @iconset = Cache.system("Iconset")
  1098.   end
  1099.  
  1100. end # Game_Temp
  1101.  
  1102. #==============================================================================
  1103. # ■ Game_Action
  1104. #==============================================================================
  1105.  
  1106. class Game_Action
  1107.  
  1108.   #--------------------------------------------------------------------------
  1109.   # overwrite method: speed
  1110.   #--------------------------------------------------------------------------
  1111.   def speed
  1112.     speed = subject.agi
  1113.     speed += item.speed if item
  1114.     speed += subject.atk_speed if attack?
  1115.     return speed
  1116.   end
  1117.  
  1118.   #--------------------------------------------------------------------------
  1119.   # alias method: evaluate_item_with_target
  1120.   #--------------------------------------------------------------------------
  1121.   alias evaluate_item_with_target_abe evaluate_item_with_target
  1122.   def evaluate_item_with_target(target)
  1123.     $game_temp.evaluating = true
  1124.     result = evaluate_item_with_target_abe(target)
  1125.     $game_temp.evaluating = false
  1126.     return result
  1127.   end
  1128.  
  1129. end # Game_Action
  1130.  
  1131. #==============================================================================
  1132. # ■ Game_ActionResult
  1133. #==============================================================================
  1134.  
  1135. class Game_ActionResult
  1136.  
  1137.   #--------------------------------------------------------------------------
  1138.   # alias method: clear
  1139.   #--------------------------------------------------------------------------
  1140.   alias game_actionresult_clear_abe clear
  1141.   def clear
  1142.     game_actionresult_clear_abe
  1143.     clear_stored_damage
  1144.   end
  1145.  
  1146.   #--------------------------------------------------------------------------
  1147.   # new method: clear_stored_damage
  1148.   #--------------------------------------------------------------------------
  1149.   def clear_stored_damage
  1150.     @stored_hp_damage = 0
  1151.     @stored_mp_damage = 0
  1152.     @stored_tp_damage = 0
  1153.     @stored_hp_drain = 0
  1154.     @stored_mp_drain = 0
  1155.   end
  1156.  
  1157.   #--------------------------------------------------------------------------
  1158.   # new method: store_damage
  1159.   #--------------------------------------------------------------------------
  1160.   def store_damage
  1161.     @stored_hp_damage += @hp_damage
  1162.     @stored_mp_damage += @mp_damage
  1163.     @stored_tp_damage += @tp_damage
  1164.     @stored_hp_drain += @hp_drain
  1165.     @stored_mp_drain += @mp_drain
  1166.   end
  1167.  
  1168.   #--------------------------------------------------------------------------
  1169.   # new method: restore_damage
  1170.   #--------------------------------------------------------------------------
  1171.   def restore_damage
  1172.     @hp_damage = @stored_hp_damage
  1173.     @mp_damage = @stored_mp_damage
  1174.     @tp_damage = @stored_tp_damage
  1175.     @hp_drain = @stored_hp_drain
  1176.     @mp_drain = @stored_mp_drain
  1177.   end
  1178.  
  1179. end # Game_ActionResult
  1180.  
  1181. #==============================================================================
  1182. # ■ Game_BattlerBase
  1183. #==============================================================================
  1184.  
  1185. class Game_BattlerBase
  1186.  
  1187.   #--------------------------------------------------------------------------
  1188.   # public instance variables
  1189.   #--------------------------------------------------------------------------
  1190.   attr_accessor :popups
  1191.  
  1192.   #--------------------------------------------------------------------------
  1193.   # new method: create_popup
  1194.   #--------------------------------------------------------------------------
  1195.   def create_popup(value, rules = "DEFAULT", flags = [])
  1196.     return unless SceneManager.scene_is?(Scene_Battle)
  1197.     return unless YEA::BATTLE::ENABLE_POPUPS
  1198.     return if Switch.hide_popups
  1199.     @popups = [] if @popups.nil?
  1200.     @popups.push([value, rules, flags])
  1201.   end
  1202.  
  1203.   #--------------------------------------------------------------------------
  1204.   # new method: make_damage_popups
  1205.   #--------------------------------------------------------------------------
  1206.   def make_damage_popups(user)
  1207.     if @result.hp_drain != 0
  1208.       text = YEA::BATTLE::POPUP_SETTINGS[:drained]
  1209.       rules = "DRAIN"
  1210.       user.create_popup(text, rules)
  1211.       setting = :hp_dmg  if @result.hp_drain < 0
  1212.       setting = :hp_heal if @result.hp_drain > 0
  1213.       rules = "HP_DMG"   if @result.hp_drain < 0
  1214.       rules = "HP_HEAL"  if @result.hp_drain > 0
  1215.       value = @result.hp_drain.abs
  1216.       text = sprintf(YEA::BATTLE::POPUP_SETTINGS[setting], value.group)
  1217.       user.create_popup(text, rules)
  1218.     end
  1219.     if @result.mp_drain != 0
  1220.       text = YEA::BATTLE::POPUP_SETTINGS[:drained]
  1221.       rules = "DRAIN"
  1222.       user.create_popup(text, rules)
  1223.       setting = :mp_dmg  if @result.mp_drain < 0
  1224.       setting = :mp_heal if @result.mp_drain > 0
  1225.       rules = "HP_DMG"   if @result.mp_drain < 0
  1226.       rules = "HP_HEAL"  if @result.mp_drain > 0
  1227.       value = @result.mp_drain.abs
  1228.       text = sprintf(YEA::BATTLE::POPUP_SETTINGS[setting], value.group)
  1229.       user.create_popup(text, rules)
  1230.     end
  1231.     #---
  1232.     flags = []
  1233.     flags.push("critical") if @result.critical
  1234.     if @result.hp_damage != 0
  1235.       setting = :hp_dmg  if @result.hp_damage > 0
  1236.       setting = :hp_heal if @result.hp_damage < 0
  1237.       rules = "HP_DMG"   if @result.hp_damage > 0
  1238.       rules = "HP_HEAL"  if @result.hp_damage < 0
  1239.       value = @result.hp_damage.abs
  1240.       text = sprintf(YEA::BATTLE::POPUP_SETTINGS[setting], value.group)
  1241.       create_popup(text, rules, flags)
  1242.     end
  1243.     if @result.mp_damage != 0
  1244.       setting = :mp_dmg  if @result.mp_damage > 0
  1245.       setting = :mp_heal if @result.mp_damage < 0
  1246.       rules = "MP_DMG"   if @result.mp_damage > 0
  1247.       rules = "MP_HEAL"  if @result.mp_damage < 0
  1248.       value = @result.mp_damage.abs
  1249.       text = sprintf(YEA::BATTLE::POPUP_SETTINGS[setting], value.group)
  1250.       create_popup(text, rules, flags)
  1251.     end
  1252.     if @result.tp_damage != 0
  1253.       setting = :tp_dmg  if @result.tp_damage > 0
  1254.       setting = :tp_heal if @result.tp_damage < 0
  1255.       rules = "TP_DMG"   if @result.tp_damage > 0
  1256.       rules = "TP_HEAL"  if @result.tp_damage < 0
  1257.       value = @result.tp_damage.abs
  1258.       text = sprintf(YEA::BATTLE::POPUP_SETTINGS[setting], value.group)
  1259.       create_popup(text, rules)
  1260.     end
  1261.     @result.store_damage
  1262.     @result.clear_damage_values
  1263.   end
  1264.  
  1265.   #--------------------------------------------------------------------------
  1266.   # alias method: erase_state
  1267.   #--------------------------------------------------------------------------
  1268.   alias game_battlerbase_erase_state_abe erase_state
  1269.   def erase_state(state_id)
  1270.     make_state_popup(state_id, :rem_state) if @states.include?(state_id)
  1271.     game_battlerbase_erase_state_abe(state_id)
  1272.   end
  1273.  
  1274.   #--------------------------------------------------------------------------
  1275.   # new method: make_during_state_popup
  1276.   #--------------------------------------------------------------------------
  1277.   def make_during_state_popup
  1278.     state_id = most_important_state_id
  1279.     return if state_id == 0
  1280.     make_state_popup(state_id, :dur_state)
  1281.   end
  1282.  
  1283.   #--------------------------------------------------------------------------
  1284.   # new method: most_important_state_id
  1285.   #--------------------------------------------------------------------------
  1286.   def most_important_state_id
  1287.     states.each {|state| return state.id unless state.message3.empty? }
  1288.     return 0
  1289.   end
  1290.  
  1291.   #--------------------------------------------------------------------------
  1292.   # new method: make_state_popup
  1293.   #--------------------------------------------------------------------------
  1294.   def make_state_popup(state_id, type)
  1295.     state = $data_states[state_id]
  1296.     return if state.icon_index == 0
  1297.     rules = state.popup_rules[type]
  1298.     return if rules.nil?
  1299.     text = sprintf(YEA::BATTLE::POPUP_SETTINGS[type], state.name)
  1300.     flags = ["state", state.icon_index]
  1301.     create_popup(text, rules, flags)
  1302.   end
  1303.  
  1304.   #--------------------------------------------------------------------------
  1305.   # new method: make_miss_popups
  1306.   #--------------------------------------------------------------------------
  1307.   def make_miss_popups(user, item)
  1308.     return if dead?
  1309.     if @result.missed
  1310.       text = YEA::BATTLE::POPUP_SETTINGS[:missed]
  1311.       rules = "DEFAULT"
  1312.       create_popup(text, rules)
  1313.     end
  1314.     if @result.evaded
  1315.       text = YEA::BATTLE::POPUP_SETTINGS[:evaded]
  1316.       rules = "DEFAULT"
  1317.       create_popup(text, rules)
  1318.     end
  1319.     if @result.hit? && !@result.success
  1320.       text = YEA::BATTLE::POPUP_SETTINGS[:failed]
  1321.       rules = "DEFAULT"
  1322.       create_popup(text, rules)
  1323.     end
  1324.     if @result.hit? && item.damage.to_hp?
  1325.       if @result.hp_damage == 0 && @result.hp_damage == 0
  1326.         text = YEA::BATTLE::POPUP_SETTINGS[:nulled]
  1327.         rules = "DEFAULT"
  1328.         create_popup(text, rules)
  1329.       end
  1330.     end
  1331.   end
  1332.  
  1333.   #--------------------------------------------------------------------------
  1334.   # new method: make_rate_popup
  1335.   #--------------------------------------------------------------------------
  1336.   def make_rate_popup(rate)
  1337.     return if rate == 1.0
  1338.     flags = []
  1339.     if rate > 1.0
  1340.       text = YEA::BATTLE::POPUP_SETTINGS[:weakpoint]
  1341.       rules = "WEAK_ELE"
  1342.       flags.push("weakness")
  1343.     elsif rate == 0.0
  1344.       text = YEA::BATTLE::POPUP_SETTINGS[:immune]
  1345.       rules = "IMMU_ELE"
  1346.       flags.push("immune")
  1347.     elsif rate < 0.0
  1348.       text = YEA::BATTLE::POPUP_SETTINGS[:absorbed]
  1349.       rules = "ABSB_ELE"
  1350.       flags.push("absorbed")
  1351.     else
  1352.       text = YEA::BATTLE::POPUP_SETTINGS[:resistant]
  1353.       rules = "REST_ELE"
  1354.       flags.push("resistant")
  1355.     end
  1356.     create_popup(text, rules, flags)
  1357.   end
  1358.  
  1359.   #--------------------------------------------------------------------------
  1360.   # new method: make_buff_popup
  1361.   #--------------------------------------------------------------------------
  1362.   def make_buff_popup(param_id, positive = true)
  1363.     return unless alive?
  1364.     name = Vocab::param(param_id)
  1365.     if positive
  1366.       text = sprintf(YEA::BATTLE::POPUP_SETTINGS[:add_buff], name)
  1367.       rules = "BUFF"
  1368.       buff_level = 1
  1369.     else
  1370.       text = sprintf(YEA::BATTLE::POPUP_SETTINGS[:add_debuff], name)
  1371.       rules = "DEBUFF"
  1372.       buff_level = -1
  1373.     end
  1374.     icon = buff_icon_index(buff_level, param_id)
  1375.     flags = ["buff", icon]
  1376. #~     return if @popups.include?([text, rules, flags])
  1377.     create_popup(text, rules, flags)
  1378.   end
  1379.  
  1380. end # Game_BattlerBase
  1381.  
  1382. #==============================================================================
  1383. # ■ Game_Battler
  1384. #==============================================================================
  1385.  
  1386. class Game_Battler < Game_BattlerBase
  1387.  
  1388.   #--------------------------------------------------------------------------
  1389.   # public instance variables
  1390.   #--------------------------------------------------------------------------
  1391.   attr_accessor :pseudo_ani_id
  1392.  
  1393.   #--------------------------------------------------------------------------
  1394.   # alias method: on_battle_end
  1395.   #--------------------------------------------------------------------------
  1396.   alias game_battler_on_battle_end_abe on_battle_end
  1397.   def on_battle_end
  1398.     game_battler_on_battle_end_abe
  1399.     @popups = []
  1400.   end
  1401.  
  1402.   #--------------------------------------------------------------------------
  1403.   # alias method: clear_sprite_effects
  1404.   #--------------------------------------------------------------------------
  1405.   alias game_battler_clear_sprite_effects_abe clear_sprite_effects
  1406.   def clear_sprite_effects
  1407.     game_battler_clear_sprite_effects_abe
  1408.     @pseudo_ani_id = 0
  1409.   end
  1410.  
  1411.   #--------------------------------------------------------------------------
  1412.   # alias method: item_apply
  1413.   #--------------------------------------------------------------------------
  1414.   alias game_battler_item_apply_abe item_apply
  1415.   def item_apply(user, item)
  1416.     game_battler_item_apply_abe(user, item)
  1417.     make_miss_popups(user, item)
  1418.   end
  1419.  
  1420.   #--------------------------------------------------------------------------
  1421.   # alias method: make_damage_value
  1422.   #--------------------------------------------------------------------------
  1423.   alias game_battler_make_damage_value_abe make_damage_value
  1424.   def make_damage_value(user, item)
  1425.     game_battler_make_damage_value_abe(user, item)
  1426.     rate = item_element_rate(user, item)
  1427.     make_rate_popup(rate) unless $game_temp.evaluating
  1428.   end
  1429.  
  1430.   #--------------------------------------------------------------------------
  1431.   # alias method: execute_damage
  1432.   #--------------------------------------------------------------------------
  1433.   alias game_battler_execute_damage_abe execute_damage
  1434.   def execute_damage(user)
  1435.     game_battler_execute_damage_abe(user)
  1436.     make_damage_popups(user)
  1437.   end
  1438.  
  1439.   #--------------------------------------------------------------------------
  1440.   # alias method: item_effect_recover_hp
  1441.   #--------------------------------------------------------------------------
  1442.   alias game_battler_item_effect_recover_hp_abe item_effect_recover_hp
  1443.   def item_effect_recover_hp(user, item, effect)
  1444.     game_battler_item_effect_recover_hp_abe(user, item, effect)
  1445.     make_damage_popups(user)
  1446.   end
  1447.  
  1448.   #--------------------------------------------------------------------------
  1449.   # alias method: item_effect_recover_mp
  1450.   #--------------------------------------------------------------------------
  1451.   alias game_battler_item_effect_recover_mp_abe item_effect_recover_mp
  1452.   def item_effect_recover_mp(user, item, effect)
  1453.     game_battler_item_effect_recover_mp_abe(user, item, effect)
  1454.     make_damage_popups(user)
  1455.   end
  1456.  
  1457.   #--------------------------------------------------------------------------
  1458.   # alias method: item_effect_gain_tp
  1459.   #--------------------------------------------------------------------------
  1460.   alias game_battler_item_effect_gain_tp_abe item_effect_gain_tp
  1461.   def item_effect_gain_tp(user, item, effect)
  1462.     game_battler_item_effect_gain_tp_abe(user, item, effect)
  1463.     make_damage_popups(user)
  1464.   end
  1465.  
  1466.   #--------------------------------------------------------------------------
  1467.   # alias method: item_user_effect
  1468.   #--------------------------------------------------------------------------
  1469.   alias game_battler_item_user_effect_abe item_user_effect
  1470.   def item_user_effect(user, item)
  1471.     game_battler_item_user_effect_abe(user, item)
  1472.     @result.restore_damage
  1473.   end
  1474.  
  1475.   #--------------------------------------------------------------------------
  1476.   # alias method: add_new_state
  1477.   #--------------------------------------------------------------------------
  1478.   alias game_battler_add_new_state_abe add_new_state
  1479.   def add_new_state(state_id)
  1480.     game_battler_add_new_state_abe(state_id)
  1481.     make_state_popup(state_id, :add_state) if @states.include?(state_id)
  1482.   end
  1483.  
  1484.   #--------------------------------------------------------------------------
  1485.   # alias method: add_buff
  1486.   #--------------------------------------------------------------------------
  1487.   alias game_battler_add_buff_abe add_buff
  1488.   def add_buff(param_id, turns)
  1489.     make_buff_popup(param_id, true)
  1490.     game_battler_add_buff_abe(param_id, turns)
  1491.   end
  1492.  
  1493.   #--------------------------------------------------------------------------
  1494.   # alias method: add_debuff
  1495.   #--------------------------------------------------------------------------
  1496.   alias game_battler_add_debuff_abe add_debuff
  1497.   def add_debuff(param_id, turns)
  1498.     make_buff_popup(param_id, false)
  1499.     game_battler_add_debuff_abe(param_id, turns)
  1500.   end
  1501.  
  1502.   #--------------------------------------------------------------------------
  1503.   # alias method: regenerate_all
  1504.   #--------------------------------------------------------------------------
  1505.   alias game_battler_regenerate_all_abe regenerate_all
  1506.   def regenerate_all
  1507.     game_battler_regenerate_all_abe
  1508.     return unless alive?
  1509.     make_damage_popups(self)
  1510.   end
  1511.  
  1512.   #--------------------------------------------------------------------------
  1513.   # new method: can_collapse?
  1514.   #--------------------------------------------------------------------------
  1515.   def can_collapse?
  1516.     return false unless dead?
  1517.     unless actor?
  1518.       return false unless sprite.battler_visible
  1519.       array = [:collapse, :boss_collapse, :instant_collapse]
  1520.       return false if array.include?(sprite.effect_type)
  1521.     end
  1522.     return true
  1523.   end
  1524.  
  1525.   #--------------------------------------------------------------------------
  1526.   # new method: draw_mp?
  1527.   #--------------------------------------------------------------------------
  1528.   def draw_mp?; return true; end
  1529.  
  1530.   #--------------------------------------------------------------------------
  1531.   # new method: draw_tp?
  1532.   #--------------------------------------------------------------------------
  1533.   def draw_tp?
  1534.     return $data_system.opt_display_tp
  1535.   end
  1536.  
  1537. end # Game_Battler
  1538.  
  1539. #==============================================================================
  1540. # ■ Game_Actor
  1541. #==============================================================================
  1542.  
  1543. class Game_Actor < Game_Battler
  1544.  
  1545.   #def battler_name
  1546.     #return "Slime"
  1547.   #end
  1548.  
  1549.   #def battler_hue
  1550.     #return 0
  1551.   #end
  1552.  
  1553.   #--------------------------------------------------------------------------
  1554.   # overwrite method: perform_damage_effect
  1555.   #--------------------------------------------------------------------------
  1556.   def perform_damage_effect
  1557.     $game_troop.screen.start_shake(5, 5, 10) if YEA::BATTLE::SCREEN_SHAKE
  1558.     @sprite_effect_type = :blink if YEA::BATTLE::BLINK_EFFECTS
  1559.     Sound.play_actor_damage
  1560.   end
  1561.  
  1562.   #--------------------------------------------------------------------------
  1563.   # overwrite method: use_sprite?
  1564.   #--------------------------------------------------------------------------
  1565.   def use_sprite?; return true; end
  1566.  
  1567.   #--------------------------------------------------------------------------
  1568.   # new method: screen_x
  1569.   #--------------------------------------------------------------------------
  1570.   def screen_x
  1571.     return 0 unless SceneManager.scene_is?(Scene_Battle)
  1572.     status_window = SceneManager.scene.status_window
  1573.     return 0 if status_window.nil?
  1574.     item_rect_width = (status_window.width-24) / $game_party.max_battle_members
  1575.     ext = SceneManager.scene.info_viewport.ox
  1576.     rect = SceneManager.scene.status_window.item_rect(self.index)
  1577.     constant = 128 + 12
  1578.     return constant + rect.x + item_rect_width / 2 - ext
  1579.   end
  1580.  
  1581.   #--------------------------------------------------------------------------
  1582.   # new method: screen_y
  1583.   #--------------------------------------------------------------------------
  1584.   def screen_y
  1585.     return Graphics.height - 120 unless SceneManager.scene_is?(Scene_Battle)
  1586.     return Graphics.height - 120 if SceneManager.scene.status_window.nil?
  1587.     return Graphics.height - (SceneManager.scene.status_window.height * 7/8)
  1588.   end
  1589.  
  1590.   #--------------------------------------------------------------------------
  1591.   # new method: screen_z
  1592.   #--------------------------------------------------------------------------
  1593.   def screen_z; return 100; end
  1594.  
  1595.   #--------------------------------------------------------------------------
  1596.   # new method: sprite
  1597.   #--------------------------------------------------------------------------
  1598.   def sprite
  1599.     index = $game_party.battle_members.index(self)
  1600.     return SceneManager.scene.spriteset.actor_sprites[index]
  1601.   end
  1602.  
  1603.   #--------------------------------------------------------------------------
  1604.   # new method: draw_mp?
  1605.   #--------------------------------------------------------------------------
  1606.   def draw_mp?
  1607.     return true unless draw_tp?
  1608.     for skill in skills
  1609.       next unless added_skill_types.include?(skill.stype_id)
  1610.       return true if skill.mp_cost > 0
  1611.     end
  1612.     return false
  1613.   end
  1614.  
  1615.   #--------------------------------------------------------------------------
  1616.   # new method: draw_tp?
  1617.   #--------------------------------------------------------------------------
  1618.   def draw_tp?
  1619.     return false unless $data_system.opt_display_tp
  1620.     for skill in skills
  1621.       next unless added_skill_types.include?(skill.stype_id)
  1622.       return true if skill.tp_cost > 0
  1623.     end
  1624.     return false
  1625.   end
  1626.  
  1627. end # Game_Actor
  1628.  
  1629. #==============================================================================
  1630. # ■ Game_Enemy
  1631. #==============================================================================
  1632.  
  1633. class Game_Enemy < Game_Battler
  1634.  
  1635.   #--------------------------------------------------------------------------
  1636.   # overwrite method: perform_damage_effect
  1637.   #--------------------------------------------------------------------------
  1638.   def perform_damage_effect
  1639.     @sprite_effect_type = :blink if YEA::BATTLE::BLINK_EFFECTS
  1640.     Sound.play_enemy_damage
  1641.   end
  1642.  
  1643.   #--------------------------------------------------------------------------
  1644.   # new methods: attack_animation_id
  1645.   #--------------------------------------------------------------------------
  1646.   def atk_animation_id1; return enemy.atk_animation_id1; end
  1647.   def atk_animation_id2; return enemy.atk_animation_id2; end
  1648.  
  1649.   #--------------------------------------------------------------------------
  1650.   # new method: sprite
  1651.   #--------------------------------------------------------------------------
  1652.   def sprite
  1653.     return SceneManager.scene.spriteset.enemy_sprites.reverse[self.index]
  1654.   end
  1655.  
  1656. end # Game_Enemy
  1657.  
  1658. #==============================================================================
  1659. # ■ Game_Unit
  1660. #==============================================================================
  1661.  
  1662. class Game_Unit
  1663.  
  1664.   #--------------------------------------------------------------------------
  1665.   # alias method: make_actions
  1666.   #--------------------------------------------------------------------------
  1667.   alias game_unit_make_actions_abe make_actions
  1668.   def make_actions
  1669.     game_unit_make_actions_abe
  1670.     refresh_autobattler_status_window
  1671.   end
  1672.  
  1673.   #--------------------------------------------------------------------------
  1674.   # new method: refresh_autobattler_status_window
  1675.   #--------------------------------------------------------------------------
  1676.   def refresh_autobattler_status_window
  1677.     return unless SceneManager.scene_is?(Scene_Battle)
  1678.     return unless self.is_a?(Game_Party)
  1679.     SceneManager.scene.refresh_autobattler_status_window
  1680.   end
  1681.  
  1682. end # Game_Unit
  1683.  
  1684. #==============================================================================
  1685. # ■ Window_PartyCommand
  1686. #==============================================================================
  1687.  
  1688. class Window_PartyCommand < Window_Command
  1689.  
  1690.   #--------------------------------------------------------------------------
  1691.   # overwrite method: process_handling
  1692.   #--------------------------------------------------------------------------
  1693.   def process_handling
  1694.     return unless open? && active
  1695.     return process_dir6 if Input.repeat?(:RIGHT)
  1696.     return super
  1697.   end
  1698.  
  1699.   #--------------------------------------------------------------------------
  1700.   # new method: process_dir6
  1701.   #--------------------------------------------------------------------------
  1702.   def process_dir6
  1703.     Sound.play_cursor
  1704.     Input.update
  1705.     deactivate
  1706.     call_handler(:dir6)
  1707.   end
  1708.  
  1709. end # Window_PartyCommand
  1710.  
  1711. #==============================================================================
  1712. # ■ Window_ActorCommand
  1713. #==============================================================================
  1714.  
  1715. class Window_ActorCommand < Window_Command
  1716.  
  1717.   #--------------------------------------------------------------------------
  1718.   # overwrite method: process_handling
  1719.   #--------------------------------------------------------------------------
  1720.   def process_handling
  1721.     return unless open? && active
  1722.     return process_dir4 if Input.repeat?(:LEFT)
  1723.     return process_dir6 if Input.repeat?(:RIGHT)
  1724.     return super
  1725.   end
  1726.  
  1727.   #--------------------------------------------------------------------------
  1728.   # new method: process_dir4
  1729.   #--------------------------------------------------------------------------
  1730.   def process_dir4
  1731.     Sound.play_cursor
  1732.     Input.update
  1733.     deactivate
  1734.     call_handler(:cancel)
  1735.   end
  1736.  
  1737.   #--------------------------------------------------------------------------
  1738.   # new method: process_dir6
  1739.   #--------------------------------------------------------------------------
  1740.   def process_dir6
  1741.     Sound.play_cursor
  1742.     #Input.update
  1743.     #deactivate
  1744.     #call_handler(:dir6)
  1745.   end
  1746.  
  1747. end # Window_ActorCommand
  1748.  
  1749. #==============================================================================
  1750. # ■ Window_BattleStatus
  1751. #==============================================================================
  1752.  
  1753. class Window_BattleStatus < Window_Selectable
  1754.  
  1755.   #--------------------------------------------------------------------------
  1756.   # overwrite method: initialize
  1757.   #--------------------------------------------------------------------------
  1758.   def initialize
  1759.     super(0, 0, window_width, window_height+24)
  1760.     self.openness = 0
  1761.     @party = $game_party.battle_members.clone
  1762.   end
  1763.  
  1764.   #--------------------------------------------------------------------------
  1765.   # overwrite method: col_max
  1766.   #--------------------------------------------------------------------------
  1767.   def col_max; return $game_party.max_battle_members; end
  1768.  
  1769.   #--------------------------------------------------------------------------
  1770.   # new method: battle_members
  1771.   #--------------------------------------------------------------------------
  1772.   def battle_members; return $game_party.battle_members; end
  1773.  
  1774.   #--------------------------------------------------------------------------
  1775.   # new method: actor
  1776.   #--------------------------------------------------------------------------
  1777.   def actor; return battle_members[@index]; end
  1778.  
  1779.   #--------------------------------------------------------------------------
  1780.   # overwrite method: update
  1781.   #--------------------------------------------------------------------------
  1782.   def update
  1783.     super
  1784.     return if @party == $game_party.battle_members
  1785.     @party = $game_party.battle_members.clone
  1786.     refresh
  1787.   end
  1788.  
  1789.   def draw_actor_figure(actor, x, y, enabled = true)
  1790.     bitmap = Cache.system("bf"+actor.id.to_s+".png")
  1791.     rect = Rect.new(0,0,bitmap.width, bitmap.height)   
  1792.     contents.blt(x, y, bitmap, rect, enabled ? 255 : translucent_alpha)
  1793.     bitmap.dispose
  1794.   end
  1795.   #--------------------------------------------------------------------------
  1796.   # overwrite method: draw_item
  1797.   #--------------------------------------------------------------------------
  1798.   def draw_item(index)
  1799.     return if index.nil?
  1800.     clear_item(index)
  1801.     actor = battle_members[index]
  1802.     rect = item_rect(index)
  1803.     item_x = rect.x #+ 6
  1804.     return if actor.nil?
  1805. #~     draw_actor_figure(actor, item_x+2, rect.y+2, actor.alive?)
  1806.     draw_actor_figure(actor, item_x, rect.y, actor.alive?)
  1807.     draw_actor_name(actor, item_x, rect.y, rect.width)
  1808. #~     draw_actor_action(actor, item_x + 96, rect.y - 2)
  1809.     draw_actor_icons(actor, item_x, line_height-5, rect.width)
  1810.     gx = YEA::BATTLE::BATTLESTATUS_HPGAUGE_Y_PLUS
  1811.     yadj = 10
  1812.     contents.font.size = YEA::BATTLE::BATTLESTATUS_TEXT_FONT_SIZE
  1813.     draw_actor_hp(actor, item_x+2, line_height*2+gx, rect.width)
  1814.     if draw_tp?(actor) && draw_mp?(actor)
  1815.       dw = rect.width/2-2-16
  1816.       dw += 1 if $imported["YEA-CoreEngine"] && YEA::CORE::GAUGE_OUTLINE
  1817.       draw_actor_tp(actor, item_x+2, line_height*3+gx-yadj+3, dw)
  1818.       dw = rect.width - rect.width/2 - 2-6
  1819.       draw_actor_mp(actor, item_x+rect.width/2-6, line_height*3+gx-yadj+3, dw)
  1820.     elsif draw_tp?(actor) && !draw_mp?(actor)
  1821.       draw_actor_tp(actor, item_x+2, line_height*3+gx-yadj+3, rect.width)
  1822.     else
  1823.       draw_actor_mp(actor, item_x+2, line_height*3+gx-yadj+3, rect.width)
  1824.     end
  1825.     draw_actor_action(actor, item_x, line_height*2+gx)
  1826.   end
  1827.  
  1828.   def draw_actor_icons(actor, x, y, width = 96)
  1829.     icons = (actor.state_icons + actor.buff_icons)[0, width / 24]
  1830.     icons.each_with_index {|n, i| draw_icon(n, x + 24 * i, y,false) }
  1831.   end
  1832.   #--------------------------------------------------------------------------
  1833.   # overwrite method: item_rect
  1834.   #--------------------------------------------------------------------------
  1835.   def item_rect(index)
  1836.     rect = Rect.new
  1837.     rect.width = contents.width / 6 #$game_party.max_battle_members + 32
  1838.     rect.height = contents.height
  1839.     rect.x = index * rect.width
  1840.     if YEA::BATTLE::BATTLESTATUS_CENTER_FACES
  1841.       rect.x += (contents.width - $game_party.members.size * rect.width) / 2
  1842.     end
  1843.     rect.y = 0
  1844.     return rect
  1845.   end
  1846.  
  1847.   #--------------------------------------------------------------------------
  1848.   # overwrite method: draw_face
  1849.   #--------------------------------------------------------------------------
  1850.   def draw_face(face_name, face_index, dx, dy, enabled = true)
  1851.     bitmap = Cache.face(face_name)
  1852.     fx = [(96 - item_rect(0).width + 1) / 2, 0].max
  1853.     fy = face_index / 4 * 96 + 2
  1854.     fw = [item_rect(0).width - 4, 92].min
  1855.     rect = Rect.new(fx, fy, fw, 92)
  1856.     rect = Rect.new(face_index % 4 * 96 + fx, fy, fw, 92)
  1857.     contents.blt(dx, dy, bitmap, rect, enabled ? 255 : translucent_alpha)
  1858.     bitmap.dispose
  1859.   end
  1860.  
  1861.   #--------------------------------------------------------------------------
  1862.   # overwrite method: draw_actor_name
  1863.   #--------------------------------------------------------------------------
  1864.   def draw_actor_name(actor, dx, dy, dw = 112)
  1865.     reset_font_settings
  1866.     contents.font.size = YEA::BATTLE::BATTLESTATUS_NAME_FONT_SIZE
  1867.     change_color(hp_color(actor))
  1868. #~     draw_text(dx+24, dy, dw-24, line_height, actor.name)
  1869.     draw_text(dx, dy, dw, line_height, actor.name)
  1870.   end
  1871.  
  1872.   #--------------------------------------------------------------------------
  1873.   # new method: draw_actor_action
  1874.   #--------------------------------------------------------------------------
  1875.   def draw_actor_action(actor, dx, dy)
  1876.     draw_icon(action_icon(actor), dx, dy)
  1877.   end
  1878.  
  1879.   #--------------------------------------------------------------------------
  1880.   # new method: action_icon
  1881.   #--------------------------------------------------------------------------
  1882.   def action_icon(actor)
  1883.     return Icon.no_action if actor.current_action.nil?
  1884.     return Icon.no_action if actor.current_action.item.nil?
  1885.     return actor.current_action.item.icon_index
  1886.   end
  1887.  
  1888.   #--------------------------------------------------------------------------
  1889.   # new method: draw_tp?
  1890.   #--------------------------------------------------------------------------
  1891.   def draw_tp?(actor)
  1892.     return actor.draw_tp?
  1893.   end
  1894.  
  1895.   #--------------------------------------------------------------------------
  1896.   # new method: draw_mp?
  1897.   #--------------------------------------------------------------------------
  1898.   def draw_mp?(actor)
  1899.     return actor.draw_mp?
  1900.   end
  1901.  
  1902.   #--------------------------------------------------------------------------
  1903.   # overwrite method: draw_current_and_max_values
  1904.   #--------------------------------------------------------------------------
  1905.   def draw_current_and_max_values(dx, dy, dw, current, max, color1, color2)
  1906.     change_color(color1)
  1907.     draw_text(dx, dy, dw, line_height, current.group, 2)
  1908.   end
  1909.  
  1910.   #--------------------------------------------------------------------------
  1911.   # overwrite method: draw_actor_hp
  1912.   #--------------------------------------------------------------------------
  1913.   def draw_actor_hp(actor, dx, dy, width = 124)
  1914.     draw_gauge(dx, dy, width, actor.hp_rate, hp_gauge_color1, hp_gauge_color2)
  1915.     change_color(system_color)
  1916.     cy = (Font.default_size - contents.font.size) / 2 + 1
  1917. #~     draw_text(dx+2, dy+cy, 30, line_height, Vocab::hp_a)
  1918.     draw_current_and_max_values(dx, dy+cy, width, actor.hp, actor.mhp,
  1919.       hp_color(actor), normal_color)
  1920.     end
  1921.  
  1922.   #--------------------------------------------------------------------------
  1923.   # overwrite method: draw_actor_mp
  1924.   #--------------------------------------------------------------------------
  1925.   def draw_actor_mp(actor, dx, dy, width = 124)
  1926.     draw_gauge(dx, dy, width, actor.mp_rate, mp_gauge_color1, mp_gauge_color2)
  1927.     change_color(system_color)
  1928.     cy = (Font.default_size - contents.font.size) / 2 + 1
  1929. #~     draw_text(dx+2, dy+cy, 30, line_height, Vocab::mp_a)
  1930.     draw_current_and_max_values(dx, dy+cy, width, actor.mp, actor.mmp,
  1931.       mp_color(actor), normal_color)
  1932.     end
  1933.  
  1934.   #--------------------------------------------------------------------------
  1935.   # overwrite method: draw_actor_tp
  1936.   #--------------------------------------------------------------------------
  1937.   def draw_actor_tp(actor, dx, dy, width = 124)
  1938.     draw_gauge(dx, dy, width, actor.tp_rate, tp_gauge_color1, tp_gauge_color2)
  1939.     change_color(system_color)
  1940.     cy = (Font.default_size - contents.font.size) / 2 + 1
  1941.     draw_text(dx+2, dy+cy, 30, line_height, Vocab::tp_a)
  1942.     change_color(tp_color(actor))
  1943.     draw_text(dx + width - 42, dy+cy, 42, line_height, actor.tp.to_i, 2)
  1944.   end
  1945.  
  1946. end # Window_BattleStatus
  1947.  
  1948. #==============================================================================
  1949. # ■ Window_BattleActor
  1950. #==============================================================================
  1951.  
  1952. class Window_BattleActor < Window_BattleStatus
  1953.  
  1954.   #--------------------------------------------------------------------------
  1955.   # overwrite method: show
  1956.   #--------------------------------------------------------------------------
  1957.   def show
  1958.     create_flags
  1959.     super
  1960.   end
  1961.  
  1962.   #--------------------------------------------------------------------------
  1963.   # new method: create_flags
  1964.   #--------------------------------------------------------------------------
  1965.   def create_flags
  1966.     set_select_flag(:any)
  1967.     select(0)
  1968.     return if $game_temp.battle_aid.nil?
  1969.     if $game_temp.battle_aid.need_selection?
  1970.       select(0)
  1971.       #set_select_flag(:dead) if $game_temp.battle_aid.for_dead_friend?
  1972.     elsif $game_temp.battle_aid.for_user?
  1973.       battler = BattleManager.actor
  1974.       id = battler.nil? ? 0 : $game_party.battle_members.index(battler)
  1975.       select(id)
  1976.       set_select_flag(:user)
  1977.     elsif $game_temp.battle_aid.for_all?
  1978.       select(0)
  1979.       set_select_flag(:all)
  1980.       set_select_flag(:all) if $game_temp.battle_aid.for_dead_friend?
  1981.       #set_select_flag(:all_dead) if $game_temp.battle_aid.for_dead_friend?
  1982.     elsif $game_temp.battle_aid.for_random?
  1983.       select(0)
  1984.       set_select_flag(:random) if $game_temp.battle_aid.for_random?
  1985.     end
  1986.   end
  1987.  
  1988.   #--------------------------------------------------------------------------
  1989.   # new method: set_flag
  1990.   #--------------------------------------------------------------------------
  1991.   def set_select_flag(flag)
  1992.     @select_flag = flag
  1993.     case @select_flag
  1994.     when :all, :all_dead, :random
  1995.       @cursor_all = true
  1996.     else
  1997.       @cursor_all = false
  1998.     end
  1999.   end
  2000.  
  2001.   #--------------------------------------------------------------------------
  2002.   # overwrite method: update_cursor
  2003.   #--------------------------------------------------------------------------
  2004.   def update_cursor
  2005.     if @cursor_all
  2006.       cursor_rect.set(0, 0, contents.width, contents.height)
  2007.       self.top_row = 0
  2008.     elsif @index < 0
  2009.       cursor_rect.empty
  2010.     else
  2011.       ensure_cursor_visible
  2012.       cursor_rect.set(item_rect(@index))
  2013.     end
  2014.   end
  2015.  
  2016.   #--------------------------------------------------------------------------
  2017.   # overwrite method: cursor_movable?
  2018.   #--------------------------------------------------------------------------
  2019.   def cursor_movable?
  2020.     return false if @select_flag == :user
  2021.     return super
  2022.   end
  2023.  
  2024.   #--------------------------------------------------------------------------
  2025.   # overwrite method: current_item_enabled?
  2026.   #--------------------------------------------------------------------------
  2027.   def current_item_enabled?
  2028.     return true if $game_temp.battle_aid.nil?
  2029.     if $game_temp.battle_aid.need_selection?
  2030.       member = $game_party.battle_members[@index]
  2031.       return true#member.dead? if $game_temp.battle_aid.for_dead_friend?
  2032.     elsif $game_temp.battle_aid.for_dead_friend?
  2033.       for member in $game_party.battle_members
  2034.         return true #if member.dead?
  2035.       end
  2036.       return false
  2037.     end
  2038.     return true
  2039.   end
  2040.  
  2041. end # Window_BattleActor
  2042.  
  2043. #==============================================================================
  2044. # ■ Window_BattleStatusAid
  2045. #==============================================================================
  2046.  
  2047. class Window_BattleStatusAid < Window_BattleStatus
  2048.  
  2049.   #--------------------------------------------------------------------------
  2050.   # public instance variables
  2051.   #--------------------------------------------------------------------------
  2052.   attr_accessor :status_window
  2053.  
  2054.   #--------------------------------------------------------------------------
  2055.   # overwrite method: initialize
  2056.   #--------------------------------------------------------------------------
  2057.   def initialize
  2058.     super
  2059.     self.visible = false
  2060.     self.openness = 255
  2061.   end
  2062.  
  2063.   #--------------------------------------------------------------------------
  2064.   # overwrite method: window_width
  2065.   #--------------------------------------------------------------------------
  2066.   def window_width; return 128; end
  2067.  
  2068.   #--------------------------------------------------------------------------
  2069.   # overwrite method: show
  2070.   #--------------------------------------------------------------------------
  2071.   def show
  2072.     super
  2073.     refresh
  2074.   end
  2075.  
  2076.   #--------------------------------------------------------------------------
  2077.   # overwrite method: refresh
  2078.   #--------------------------------------------------------------------------
  2079.   def refresh
  2080.     contents.clear
  2081.     return if @status_window.nil?
  2082.     draw_item(@status_window.index)
  2083.   end
  2084.  
  2085.   #--------------------------------------------------------------------------
  2086.   # overwrite method: item_rect
  2087.   #--------------------------------------------------------------------------
  2088.   def item_rect(index)
  2089.     return Rect.new(0, 0, contents.width, contents.height)
  2090.   end
  2091.  
  2092.   def draw_item(index)
  2093.     return if index.nil?
  2094.     clear_item(index)
  2095.     actor = battle_members[index]
  2096.     rect = item_rect(index)
  2097.     item_x = rect.x
  2098.     return if actor.nil?
  2099.     draw_actor_figure(actor, item_x + 18 , rect.y+2, actor.alive?)
  2100.     draw_actor_name(actor, item_x, rect.y, rect.width)
  2101.     draw_actor_icons(actor, item_x, line_height-5, rect.width)
  2102.     gx = YEA::BATTLE::BATTLESTATUS_HPGAUGE_Y_PLUS
  2103.     yadj = 10
  2104.     contents.font.size = YEA::BATTLE::BATTLESTATUS_TEXT_FONT_SIZE
  2105.     draw_actor_hp(actor, item_x+2, line_height*2+gx, rect.width)
  2106.     if draw_tp?(actor) && draw_mp?(actor)
  2107.       dw = rect.width/2-2-16
  2108.       dw += 1 if $imported["YEA-CoreEngine"] && YEA::CORE::GAUGE_OUTLINE
  2109.       draw_actor_tp(actor, item_x+2, line_height*3+gx-yadj+3, dw)
  2110.       dw = rect.width - rect.width/2 - 2-6
  2111.       draw_actor_mp(actor, item_x+rect.width/2-6, line_height*3+gx-yadj+3, dw)
  2112.     elsif draw_tp?(actor) && !draw_mp?(actor)
  2113.       draw_actor_tp(actor, item_x+2, line_height*3+gx-yadj+3, rect.width)
  2114.     else
  2115.       draw_actor_mp(actor, item_x+2, line_height*3+gx-yadj+3, rect.width)
  2116.     end
  2117.     draw_actor_action(actor, item_x, line_height*2+gx)
  2118.   end
  2119.  
  2120.   def draw_actor_icons(actor, x, y, width = 96)
  2121.     icons = (actor.state_icons + actor.buff_icons)[0, width / 24]
  2122.     icons.each_with_index {|n, i| draw_icon(n, x + 24 * i, y,false) }
  2123.   end
  2124.  
  2125.   def draw_actor_name(actor, dx, dy, dw = 112)
  2126.     reset_font_settings
  2127.     contents.font.size = YEA::BATTLE::BATTLESTATUS_NAME_FONT_SIZE
  2128.     change_color(hp_color(actor))
  2129.     draw_text(dx+24, dy, dw-24, line_height, actor.name)
  2130.   end
  2131.  
  2132.  
  2133. end # Window_BattleStatusAid
  2134.  
  2135. #==============================================================================
  2136. # ■ Window_BattleEnemy
  2137. #==============================================================================
  2138.  
  2139. class Window_BattleEnemy < Window_Selectable
  2140.   #--------------------------------------------------------------------------
  2141.   # overwrite method: initialize
  2142.   #--------------------------------------------------------------------------
  2143.   def initialize(info_viewport)
  2144.     super(0, Graphics.height, window_width, fitting_height(1))
  2145.     refresh
  2146.     self.visible = false
  2147.     @info_viewport = info_viewport
  2148.   end
  2149.  
  2150.   #--------------------------------------------------------------------------
  2151.   # overwrite method: col_max
  2152.   #--------------------------------------------------------------------------
  2153.   def col_max; return item_max; end
  2154.  
  2155.   #--------------------------------------------------------------------------
  2156.   # overwrite method: show
  2157.   #--------------------------------------------------------------------------
  2158.   def show
  2159.     create_flags
  2160.     super
  2161.   end
  2162.  
  2163.   #--------------------------------------------------------------------------
  2164.   # new method: create_flags
  2165.   #--------------------------------------------------------------------------
  2166.   def create_flags
  2167.     set_select_flag(:any)
  2168.     select(0)
  2169.     return if $game_temp.battle_aid.nil?
  2170.     if $game_temp.battle_aid.need_selection?
  2171.       select(0)
  2172.     elsif $game_temp.battle_aid.for_all?
  2173.       select(0)
  2174.       set_select_flag(:all)
  2175.     elsif $game_temp.battle_aid.for_random?
  2176.       select(0)
  2177.       set_select_flag(:random)
  2178.     end
  2179.   end
  2180.  
  2181.   #--------------------------------------------------------------------------
  2182.   # new method: set_flag
  2183.   #--------------------------------------------------------------------------
  2184.   def set_select_flag(flag)
  2185.     @select_flag = flag
  2186.     case @select_flag
  2187.     when :all, :random
  2188.       @cursor_all = true
  2189.     else
  2190.       @cursor_all = false
  2191.     end
  2192.   end
  2193.  
  2194.   #--------------------------------------------------------------------------
  2195.   # new method: select_all?
  2196.   #--------------------------------------------------------------------------
  2197.   def select_all?
  2198.     return true if @select_flag == :all
  2199.     return true if @select_flag == :random
  2200.     return false
  2201.   end
  2202.  
  2203.   #--------------------------------------------------------------------------
  2204.   # overwrite method: update_cursor
  2205.   #--------------------------------------------------------------------------
  2206.   def update_cursor
  2207.     if @cursor_all
  2208.       cursor_rect.set(0, 0, contents.width, contents.height)
  2209.       self.top_row = 0
  2210.     elsif @index < 0
  2211.       cursor_rect.empty
  2212.     else
  2213.       ensure_cursor_visible
  2214.       cursor_rect.set(item_rect(@index))
  2215.     end
  2216.   end
  2217.  
  2218.   #--------------------------------------------------------------------------
  2219.   # overwrite method: cursor_movable?
  2220.   #--------------------------------------------------------------------------
  2221.   def cursor_movable?
  2222.     return false if @select_flag == :user
  2223.     return super
  2224.   end
  2225.  
  2226.   #--------------------------------------------------------------------------
  2227.   # overwrite method: current_item_enabled?
  2228.   #--------------------------------------------------------------------------
  2229.   def current_item_enabled?
  2230.     return true if $game_temp.battle_aid.nil?
  2231.     if $game_temp.battle_aid.need_selection?
  2232.       member = $game_party.battle_members[@index]
  2233.       return true#member.dead? if $game_temp.battle_aid.for_dead_friend?
  2234.     elsif $game_temp.battle_aid.for_dead_friend?
  2235.       for member in $game_party.battle_members
  2236.         return true #if member.dead?
  2237.       end
  2238.       return false
  2239.     end
  2240.     return true
  2241.   end
  2242.  
  2243.   #--------------------------------------------------------------------------
  2244.   # overwrite method: enemy
  2245.   #--------------------------------------------------------------------------
  2246.   def enemy; @data[index]; end
  2247.  
  2248.   #--------------------------------------------------------------------------
  2249.   # overwrite method: refresh
  2250.   #--------------------------------------------------------------------------
  2251.   def refresh
  2252.     make_item_list
  2253.     create_contents
  2254.     draw_all_items
  2255.   end
  2256.  
  2257.   #--------------------------------------------------------------------------
  2258.   # overwrite method: make_item_list
  2259.   #--------------------------------------------------------------------------
  2260.   def make_item_list
  2261.     @data = $game_troop.alive_members
  2262.     @data.sort! { |a,b| a.screen_x <=> b.screen_x }
  2263.   end
  2264.  
  2265.   #--------------------------------------------------------------------------
  2266.   # overwrite method: draw_item
  2267.   #--------------------------------------------------------------------------
  2268.   def draw_item(index); return; end
  2269.  
  2270.   #--------------------------------------------------------------------------
  2271.   # overwrite method: update
  2272.   #--------------------------------------------------------------------------
  2273.   def update
  2274.     super
  2275.     return unless active
  2276.     enemy.sprite_effect_type = :whiten
  2277.     return unless select_all?
  2278.     for enemy in $game_troop.alive_members
  2279.       enemy.sprite_effect_type = :whiten
  2280.     end
  2281.   end
  2282.  
  2283. end # Window_BattleEnemy
  2284.  
  2285. #==============================================================================
  2286. # ■ Window_BattleHelp
  2287. #==============================================================================
  2288.  
  2289. class Window_BattleHelp < Window_Help
  2290.  
  2291.   #--------------------------------------------------------------------------
  2292.   # public instance variables
  2293.   #--------------------------------------------------------------------------
  2294.   attr_accessor :actor_window
  2295.   attr_accessor :enemy_window
  2296.  
  2297.   #--------------------------------------------------------------------------
  2298.   # update
  2299.   #--------------------------------------------------------------------------
  2300.   def update
  2301.     super
  2302.     if !self.visible and @text != ""
  2303.       @text = ""
  2304.       return refresh
  2305.     end
  2306.     update_battler_name
  2307.   end
  2308.  
  2309.   #--------------------------------------------------------------------------
  2310.   # update_battler_name
  2311.   #--------------------------------------------------------------------------
  2312.   def update_battler_name
  2313.     return unless @actor_window.active || @enemy_window.active
  2314.     if @actor_window.active
  2315.       battler = $game_party.battle_members[@actor_window.index]
  2316.     elsif @enemy_window.active
  2317.       battler = @enemy_window.enemy
  2318.     end
  2319.     if special_display?
  2320.       refresh_special_case(battler)
  2321.     else
  2322.       refresh_battler_name(battler) if battler_name(battler) != @text
  2323.     end
  2324.   end
  2325.  
  2326.   #--------------------------------------------------------------------------
  2327.   # battler_name
  2328.   #--------------------------------------------------------------------------
  2329.   def battler_name(battler)
  2330.     text = battler.name.clone
  2331.     return text
  2332.   end
  2333.  
  2334.   #--------------------------------------------------------------------------
  2335.   # refresh_battler_name
  2336.   #--------------------------------------------------------------------------
  2337.   def refresh_battler_name(battler)
  2338.     contents.clear
  2339.     reset_font_settings
  2340.     change_color(normal_color)
  2341.     @text = battler_name(battler)
  2342.     icons = battler.state_icons + battler.buff_icons
  2343.     dy = icons.size <= 0 ? line_height / 2 : 0
  2344.     draw_text(0, dy, contents.width, line_height, @text, 1)
  2345.     dx = (contents.width - (icons.size * 24)) / 2
  2346.     draw_actor_icons(battler, dx, line_height, contents.width)
  2347.   end
  2348.  
  2349.   #--------------------------------------------------------------------------
  2350.   # special_display?
  2351.   #--------------------------------------------------------------------------
  2352.   def special_display?
  2353.     return false if $game_temp.battle_aid.nil?
  2354.     return false if $game_temp.battle_aid.for_user?
  2355.     return !$game_temp.battle_aid.need_selection?
  2356.   end
  2357.  
  2358.   #--------------------------------------------------------------------------
  2359.   # refresh_special_case
  2360.   #--------------------------------------------------------------------------
  2361.   def refresh_special_case(battler)
  2362.     if $game_temp.battle_aid.for_opponent?
  2363.       if $game_temp.battle_aid.for_all?
  2364.         text = YEA::BATTLE::HELP_TEXT_ALL_FOES
  2365.       else
  2366.         case $game_temp.battle_aid.number_of_targets
  2367.         when 1
  2368.           text = YEA::BATTLE::HELP_TEXT_ONE_RANDOM_FOE
  2369.         else
  2370.           number = $game_temp.battle_aid.number_of_targets
  2371.           text = sprintf(YEA::BATTLE::HELP_TEXT_MANY_RANDOM_FOE, number)
  2372.         end
  2373.       end
  2374.     else # $game_temp.battle_aid.for_friend?
  2375.       if $game_temp.battle_aid.for_dead_friend?
  2376.         text = YEA::BATTLE::HELP_TEXT_ALL_DEAD_ALLIES
  2377.       elsif $game_temp.battle_aid.for_random?
  2378.         case $game_temp.battle_aid.number_of_targets
  2379.         when 1
  2380.           text = YEA::BATTLE::HELP_TEXT_ONE_RANDOM_ALLY
  2381.         else
  2382.           number = $game_temp.battle_aid.number_of_targets
  2383.           text = sprintf(YEA::BATTLE::HELP_TEXT_RANDOM_ALLIES, number)
  2384.         end
  2385.       else
  2386.         text = YEA::BATTLE::HELP_TEXT_ALL_ALLIES
  2387.       end
  2388.     end
  2389.     return if text == @text
  2390.     @text = text
  2391.     contents.clear
  2392.     reset_font_settings
  2393.     draw_text(0, 0, contents.width, line_height*2, @text, 1)
  2394.   end
  2395.  
  2396. end # Window_BattleHelp
  2397.  
  2398. #==============================================================================
  2399. # ■ Window_BattleLog
  2400. #==============================================================================
  2401.  
  2402. class Window_BattleLog < Window_Selectable
  2403.  
  2404.   #--------------------------------------------------------------------------
  2405.   # alias method: display_current_state
  2406.   #--------------------------------------------------------------------------
  2407.   alias window_battlelog_display_current_state_abe display_current_state
  2408.   def display_current_state(subject)
  2409.     subject.make_during_state_popup
  2410.     return unless YEA::BATTLE::MSG_CURRENT_STATE
  2411.     window_battlelog_display_current_state_abe(subject)
  2412.   end
  2413.  
  2414.   #--------------------------------------------------------------------------
  2415.   # alias method: display_use_item
  2416.   #--------------------------------------------------------------------------
  2417.   alias window_battlelog_display_use_item_abe display_use_item
  2418.   def display_use_item(subject, item)
  2419.     return unless YEA::BATTLE::MSG_CURRENT_ACTION
  2420.     window_battlelog_display_use_item_abe(subject, item)
  2421.   end
  2422.  
  2423.   #--------------------------------------------------------------------------
  2424.   # alias method: display_counter
  2425.   #--------------------------------------------------------------------------
  2426.   alias window_battlelog_display_counter_abe display_counter
  2427.   def display_counter(target, item)
  2428.     if YEA::BATTLE::MSG_COUNTERATTACK
  2429.       window_battlelog_display_counter_abe(target, item)
  2430.     else
  2431.       Sound.play_evasion
  2432.     end
  2433.   end
  2434.  
  2435.   #--------------------------------------------------------------------------
  2436.   # alias method: display_reflection
  2437.   #--------------------------------------------------------------------------
  2438.   alias window_battlelog_display_reflection_abe display_reflection
  2439.   def display_reflection(target, item)
  2440.     if YEA::BATTLE::MSG_REFLECT_MAGIC
  2441.       window_battlelog_display_reflection_abe(target, item)
  2442.     else
  2443.       Sound.play_reflection
  2444.     end
  2445.   end
  2446.  
  2447.   #--------------------------------------------------------------------------
  2448.   # alias method: display_substitute
  2449.   #--------------------------------------------------------------------------
  2450.   alias window_battlelog_display_substitute_abe display_substitute
  2451.   def display_substitute(substitute, target)
  2452.     return unless YEA::BATTLE::MSG_SUBSTITUTE_HIT
  2453.     window_battlelog_display_substitute_abe(substitute, target)
  2454.   end
  2455.  
  2456.   #--------------------------------------------------------------------------
  2457.   # alias method: display_failure
  2458.   #--------------------------------------------------------------------------
  2459.   alias window_battlelog_display_failure_abe display_failure
  2460.   def display_failure(target, item)
  2461.     return unless YEA::BATTLE::MSG_FAILURE_HIT
  2462.     window_battlelog_display_failure_abe(target, item)
  2463.   end
  2464.  
  2465.   #--------------------------------------------------------------------------
  2466.   # alias method: display_critical
  2467.   #--------------------------------------------------------------------------
  2468.   alias window_battlelog_display_critical_abe display_critical
  2469.   def display_critical(target, item)
  2470.     return unless YEA::BATTLE::MSG_CRITICAL_HIT
  2471.     window_battlelog_display_critical_abe(target, item)
  2472.   end
  2473.  
  2474.   #--------------------------------------------------------------------------
  2475.   # alias method: display_miss
  2476.   #--------------------------------------------------------------------------
  2477.   alias window_battlelog_display_miss_abe display_miss
  2478.   def display_miss(target, item)
  2479.     return unless YEA::BATTLE::MSG_HIT_MISSED
  2480.     window_battlelog_display_miss_abe(target, item)
  2481.   end
  2482.  
  2483.   #--------------------------------------------------------------------------
  2484.   # alias method: display_evasion
  2485.   #--------------------------------------------------------------------------
  2486.   alias window_battlelog_display_evasion_abe display_evasion
  2487.   def display_evasion(target, item)
  2488.     if YEA::BATTLE::MSG_EVASION
  2489.       window_battlelog_display_evasion_abe(target, item)
  2490.     else
  2491.       if !item || item.physical?
  2492.         Sound.play_evasion
  2493.       else
  2494.         Sound.play_magic_evasion
  2495.       end
  2496.     end
  2497.   end
  2498.  
  2499.   #--------------------------------------------------------------------------
  2500.   # overwrite method: display_hp_damage
  2501.   #--------------------------------------------------------------------------
  2502.   def display_hp_damage(target, item)
  2503.     return if target.result.hp_damage == 0 && item && !item.damage.to_hp?
  2504.     if target.result.hp_damage > 0 && target.result.hp_drain == 0
  2505.       target.perform_damage_effect
  2506.     end
  2507.     Sound.play_recovery if target.result.hp_damage < 0
  2508.     return unless YEA::BATTLE::MSG_HP_DAMAGE
  2509.     add_text(target.result.hp_damage_text)
  2510.     wait
  2511.   end
  2512.  
  2513.   #--------------------------------------------------------------------------
  2514.   # overwrite method: display_mp_damage
  2515.   #--------------------------------------------------------------------------
  2516.   def display_mp_damage(target, item)
  2517.     return if target.dead? || target.result.mp_damage == 0
  2518.     Sound.play_recovery if target.result.mp_damage < 0
  2519.     return unless YEA::BATTLE::MSG_MP_DAMAGE
  2520.     add_text(target.result.mp_damage_text)
  2521.     wait
  2522.   end
  2523.  
  2524.   #--------------------------------------------------------------------------
  2525.   # overwrite method: display_tp_damage
  2526.   #--------------------------------------------------------------------------
  2527.   def display_tp_damage(target, item)
  2528.     return if target.dead? || target.result.tp_damage == 0
  2529.     Sound.play_recovery if target.result.tp_damage < 0
  2530.     return unless YEA::BATTLE::MSG_TP_DAMAGE
  2531.     add_text(target.result.tp_damage_text)
  2532.     wait
  2533.   end
  2534.  
  2535.   #--------------------------------------------------------------------------
  2536.   # alias method: display_added_states
  2537.   #--------------------------------------------------------------------------
  2538.   alias window_battlelog_display_added_states_abe display_added_states
  2539.   def display_added_states(target)
  2540.     return unless YEA::BATTLE::MSG_ADDED_STATES
  2541.     window_battlelog_display_added_states_abe(target)
  2542.   end
  2543.  
  2544.   #--------------------------------------------------------------------------
  2545.   # alias method: display_removed_states
  2546.   #--------------------------------------------------------------------------
  2547.   alias window_battlelog_display_removed_states_abe display_removed_states
  2548.   def display_removed_states(target)
  2549.     return unless YEA::BATTLE::MSG_REMOVED_STATES
  2550.     window_battlelog_display_removed_states_abe(target)
  2551.   end
  2552.  
  2553.   #--------------------------------------------------------------------------
  2554.   # alias method: display_changed_buffs
  2555.   #--------------------------------------------------------------------------
  2556.   alias window_battlelog_display_changed_buffs_abe display_changed_buffs
  2557.   def display_changed_buffs(target)
  2558.     return unless YEA::BATTLE::MSG_CHANGED_BUFFS
  2559.     window_battlelog_display_changed_buffs_abe(target)
  2560.   end
  2561.  
  2562. end # Window_BattleLog
  2563.  
  2564. #==============================================================================
  2565. # ■ Window_SkillList
  2566. #==============================================================================
  2567.  
  2568. class Window_SkillList < Window_Selectable
  2569.  
  2570.   #--------------------------------------------------------------------------
  2571.   # overwrite method: spacing
  2572.   #--------------------------------------------------------------------------
  2573.   def spacing
  2574.     return 8 if $game_party.in_battle
  2575.     return super
  2576.   end
  2577.  
  2578. end # Window_SkillList
  2579.  
  2580. #==============================================================================
  2581. # ■ Window_ItemList
  2582. #==============================================================================
  2583.  
  2584. class Window_ItemList < Window_Selectable
  2585.  
  2586.   #--------------------------------------------------------------------------
  2587.   # overwrite method: spacing
  2588.   #--------------------------------------------------------------------------
  2589.   def spacing
  2590.     return 8 if $game_party.in_battle
  2591.     return super
  2592.   end
  2593.  
  2594. end # Window_ItemList
  2595.  
  2596. #==============================================================================
  2597. # ■ Scene_Battle
  2598. #==============================================================================
  2599.  
  2600. class Scene_Battle < Scene_Base
  2601.  
  2602.   #--------------------------------------------------------------------------
  2603.   # public instance variables
  2604.   #--------------------------------------------------------------------------
  2605.   attr_accessor :enemy_window
  2606.   attr_accessor :info_viewport
  2607.   attr_accessor :spriteset
  2608.   attr_accessor :status_window
  2609.   attr_accessor :status_aid_window
  2610.   attr_accessor :subject
  2611.  
  2612.   #--------------------------------------------------------------------------
  2613.   # alias method: create_spriteset
  2614.   #--------------------------------------------------------------------------
  2615.   alias scene_battle_create_spriteset_abe create_spriteset
  2616.   def create_spriteset
  2617.     BattleManager.init_battle_type
  2618.     scene_battle_create_spriteset_abe
  2619.   end
  2620.  
  2621.   #--------------------------------------------------------------------------
  2622.   # alias method: update_basic
  2623.   #--------------------------------------------------------------------------
  2624.   alias scene_battle_update_basic_abe update_basic
  2625.   def update_basic
  2626.     scene_battle_update_basic_abe
  2627.     update_debug
  2628.   end
  2629.  
  2630.   #--------------------------------------------------------------------------
  2631.   # new method: update_debug
  2632.   #--------------------------------------------------------------------------
  2633.   def update_debug
  2634.     return unless $TEST || $BTEST
  2635.     debug_heal_party if Input.trigger?(:F5)
  2636.     debug_damage_party if Input.trigger?(:F6)
  2637.     debug_fill_tp if Input.trigger?(:F7)
  2638.     debug_kill_all if Input.trigger?(:F8)
  2639.   end
  2640.  
  2641.   #--------------------------------------------------------------------------
  2642.   # new method: debug_heal_party
  2643.   #--------------------------------------------------------------------------
  2644.   def debug_heal_party
  2645.     Sound.play_recovery
  2646.     for member in $game_party.battle_members
  2647.       member.recover_all
  2648.     end
  2649.     @status_window.refresh
  2650.   end
  2651.  
  2652.   #--------------------------------------------------------------------------
  2653.   # new method: debug_damage_party
  2654.   #--------------------------------------------------------------------------
  2655.   def debug_damage_party
  2656.     Sound.play_actor_damage
  2657.     for member in $game_party.alive_members
  2658.       member.hp = 1
  2659.       member.mp = 0
  2660.       member.tp = 0
  2661.     end
  2662.     @status_window.refresh
  2663.   end
  2664.  
  2665.   #--------------------------------------------------------------------------
  2666.   # new method: debug_fill_tp
  2667.   #--------------------------------------------------------------------------
  2668.   def debug_fill_tp
  2669.     Sound.play_recovery
  2670.     for member in $game_party.alive_members
  2671.       member.tp = member.max_tp
  2672.     end
  2673.     @status_window.refresh
  2674.   end
  2675.  
  2676.   #--------------------------------------------------------------------------
  2677.   # new method: debug_kill_all
  2678.   #--------------------------------------------------------------------------
  2679.   def debug_kill_all
  2680.     for enemy in $game_troop.alive_members
  2681.       enemy.hp = 0
  2682.       enemy.perform_collapse_effect
  2683.     end
  2684.     BattleManager.judge_win_loss
  2685.     @log_window.wait
  2686.     @log_window.wait_for_effect
  2687.   end
  2688.  
  2689.   #--------------------------------------------------------------------------
  2690.   # alias method: create_all_windows
  2691.   #--------------------------------------------------------------------------
  2692.   alias scene_battle_create_all_windows_abe create_all_windows
  2693.   def create_all_windows
  2694.     scene_battle_create_all_windows_abe
  2695.     create_battle_status_aid_window
  2696.     set_help_window
  2697.   end
  2698.  
  2699.   #--------------------------------------------------------------------------
  2700.   # alias method: create_info_viewport
  2701.   #--------------------------------------------------------------------------
  2702.   alias scene_battle_create_info_viewport_abe create_info_viewport
  2703.   def create_info_viewport
  2704.     scene_battle_create_info_viewport_abe
  2705.     @status_window.refresh
  2706.   end
  2707.  
  2708.   #--------------------------------------------------------------------------
  2709.   # new method: create_battle_status_aid_window
  2710.   #--------------------------------------------------------------------------
  2711.   def create_battle_status_aid_window
  2712.     @status_aid_window = Window_BattleStatusAid.new
  2713.     @status_aid_window.status_window = @status_window
  2714.     @status_aid_window.x = Graphics.width - @status_aid_window.width
  2715.     @status_aid_window.y = Graphics.height - @status_aid_window.height
  2716.   end
  2717.  
  2718.   #--------------------------------------------------------------------------
  2719.   # overwrite method: create_help_window
  2720.   #--------------------------------------------------------------------------
  2721.   def create_help_window
  2722.     @help_window = Window_BattleHelp.new
  2723.     @help_window.hide
  2724.   end
  2725.  
  2726.   #--------------------------------------------------------------------------
  2727.   # new method: set_help_window
  2728.   #--------------------------------------------------------------------------
  2729.   def set_help_window
  2730.     @help_window.actor_window = @actor_window
  2731.     @help_window.enemy_window = @enemy_window
  2732.   end
  2733.  
  2734.   #--------------------------------------------------------------------------
  2735.   # alias method: create_party_command_window
  2736.   #--------------------------------------------------------------------------
  2737.   alias scene_battle_create_party_command_window_abe create_party_command_window
  2738.   def create_party_command_window
  2739.     scene_battle_create_party_command_window_abe
  2740.     @party_command_window.set_handler(:dir6, method(:command_fight))
  2741.   end
  2742.  
  2743.   #--------------------------------------------------------------------------
  2744.   # alias method: create_actor_command_window
  2745.   #--------------------------------------------------------------------------
  2746.   alias scene_battle_create_actor_command_window_abe create_actor_command_window
  2747.   def create_actor_command_window
  2748.     scene_battle_create_actor_command_window_abe
  2749.     @actor_command_window.set_handler(:dir4, method(:prior_command))
  2750.     @actor_command_window.set_handler(:dir6, method(:next_command))
  2751.   end
  2752.  
  2753.   #--------------------------------------------------------------------------
  2754.   # alias method: create_skill_window
  2755.   #--------------------------------------------------------------------------
  2756.   alias scene_battle_create_skill_window_abe create_skill_window
  2757.   def create_skill_window
  2758.     scene_battle_create_skill_window_abe
  2759.     @skill_window.height = @info_viewport.rect.height
  2760.     @skill_window.width = Graphics.width - @actor_command_window.width
  2761.     @skill_window.y = Graphics.height - @skill_window.height
  2762.   end
  2763.  
  2764.   #--------------------------------------------------------------------------
  2765.   # alias method: create_item_window
  2766.   #--------------------------------------------------------------------------
  2767.   alias scene_battle_create_item_window_abe create_item_window
  2768.   def create_item_window
  2769.     scene_battle_create_item_window_abe
  2770.     @item_window.height = @skill_window.height
  2771.     @item_window.width = @skill_window.width
  2772.     @item_window.y = Graphics.height - @item_window.height
  2773.   end
  2774.  
  2775.   #--------------------------------------------------------------------------
  2776.   # alias method: show_fast?
  2777.   #--------------------------------------------------------------------------
  2778.   alias scene_battle_show_fast_abe show_fast?
  2779.   def show_fast?
  2780.     return true if YEA::BATTLE::AUTO_FAST
  2781.     return scene_battle_show_fast_abe
  2782.   end
  2783.  
  2784.   #--------------------------------------------------------------------------
  2785.   # alias method: next_command
  2786.   #--------------------------------------------------------------------------
  2787.   alias scene_battle_next_command_abe next_command
  2788.   def next_command
  2789.     @status_window.show
  2790.     redraw_current_status
  2791.     @actor_command_window.show
  2792.     @status_aid_window.hide
  2793.     scene_battle_next_command_abe
  2794.   end
  2795.  
  2796.   #--------------------------------------------------------------------------
  2797.   # alias method: prior_command
  2798.   #--------------------------------------------------------------------------
  2799.   alias scene_battle_prior_command_abe prior_command
  2800.   def prior_command
  2801.     redraw_current_status
  2802.     scene_battle_prior_command_abe
  2803.   end
  2804.  
  2805.   #--------------------------------------------------------------------------
  2806.   # new method: redraw_current_status
  2807.   #--------------------------------------------------------------------------
  2808.   def redraw_current_status
  2809.     return if @status_window.index < 0
  2810.     @status_window.draw_item(@status_window.index)
  2811.   end
  2812.  
  2813.   #--------------------------------------------------------------------------
  2814.   # alias method: command_attack
  2815.   #--------------------------------------------------------------------------
  2816.   alias scene_battle_command_attack_abe command_attack
  2817.   def command_attack
  2818.     $game_temp.battle_aid = $data_skills[BattleManager.actor.attack_skill_id]
  2819.     scene_battle_command_attack_abe
  2820.   end
  2821.  
  2822.   #--------------------------------------------------------------------------
  2823.   # alias method: command_skill
  2824.   #--------------------------------------------------------------------------
  2825.   alias scene_battle_command_skill_abe command_skill
  2826.   def command_skill
  2827.     scene_battle_command_skill_abe
  2828.     @status_window.hide
  2829.     @actor_command_window.hide
  2830.     @status_aid_window.show
  2831.   end
  2832.  
  2833.   #--------------------------------------------------------------------------
  2834.   # alias method: command_item
  2835.   #--------------------------------------------------------------------------
  2836.   alias scene_battle_command_item_abe command_item
  2837.   def command_item
  2838.     scene_battle_command_item_abe
  2839.     @status_window.hide
  2840.     @actor_command_window.hide
  2841.     @status_aid_window.show
  2842.   end
  2843.  
  2844.   #--------------------------------------------------------------------------
  2845.   # overwrite method: on_skill_ok
  2846.   #--------------------------------------------------------------------------
  2847.   def on_skill_ok
  2848.     @skill = @skill_window.item
  2849.     $game_temp.battle_aid = @skill
  2850.     BattleManager.actor.input.set_skill(@skill.id)
  2851.     BattleManager.actor.last_skill.object = @skill
  2852.     if @skill.for_opponent?
  2853.       select_enemy_selection
  2854.     elsif @skill.for_friend?
  2855.       select_actor_selection
  2856.     else
  2857.       @skill_window.hide
  2858.       next_command
  2859.       $game_temp.battle_aid = nil
  2860.     end
  2861.   end
  2862.  
  2863.   #--------------------------------------------------------------------------
  2864.   # alias method: on_skill_cancel
  2865.   #--------------------------------------------------------------------------
  2866.   alias scene_battle_on_skill_cancel_abe on_skill_cancel
  2867.   def on_skill_cancel
  2868.     scene_battle_on_skill_cancel_abe
  2869.     @status_window.show
  2870.     @actor_command_window.show
  2871.     @status_aid_window.hide
  2872.   end
  2873.  
  2874.   #--------------------------------------------------------------------------
  2875.   # overwrite method: on_item_ok
  2876.   #--------------------------------------------------------------------------
  2877.   def on_item_ok
  2878.     @item = @item_window.item
  2879.     $game_temp.battle_aid = @item
  2880.     BattleManager.actor.input.set_item(@item.id)
  2881.     if @item.for_opponent?
  2882.       select_enemy_selection
  2883.     elsif @item.for_friend?
  2884.       select_actor_selection
  2885.     else
  2886.       @item_window.hide
  2887.       next_command
  2888.       $game_temp.battle_aid = nil
  2889.     end
  2890.     $game_party.last_item.object = @item
  2891.   end
  2892.  
  2893.   #--------------------------------------------------------------------------
  2894.   # alias method: on_item_cancel
  2895.   #--------------------------------------------------------------------------
  2896.   alias scene_battle_on_item_cancel_abe on_item_cancel
  2897.   def on_item_cancel
  2898.     scene_battle_on_item_cancel_abe
  2899.     @status_window.show
  2900.     @actor_command_window.show
  2901.     @status_aid_window.hide
  2902.   end
  2903.  
  2904.   #--------------------------------------------------------------------------
  2905.   # alias method: select_actor_selection
  2906.   #--------------------------------------------------------------------------
  2907.   alias scene_battle_select_actor_selection_abe select_actor_selection
  2908.   def select_actor_selection
  2909.     @status_aid_window.refresh
  2910.     scene_battle_select_actor_selection_abe
  2911.     @status_window.hide
  2912.     @skill_window.hide
  2913.     @item_window.hide
  2914.     @help_window.show
  2915.   end
  2916.  
  2917.   #--------------------------------------------------------------------------
  2918.   # alias method: on_actor_ok
  2919.   #--------------------------------------------------------------------------
  2920.   alias scene_battle_on_actor_ok_abe on_actor_ok
  2921.   def on_actor_ok
  2922.     $game_temp.battle_aid = nil
  2923.     scene_battle_on_actor_ok_abe
  2924.     @status_window.show
  2925.     if $imported["YEA-BattleCommandList"] && !@confirm_command_window.nil?
  2926.       @actor_command_window.visible = !@confirm_command_window.visible
  2927.     else
  2928.       @actor_command_window.show
  2929.     end
  2930.     @status_aid_window.hide
  2931.   end
  2932.  
  2933.   #--------------------------------------------------------------------------
  2934.   # alias method: on_actor_cancel
  2935.   #--------------------------------------------------------------------------
  2936.   alias scene_battle_on_actor_cancel_abe on_actor_cancel
  2937.   def on_actor_cancel
  2938.     BattleManager.actor.input.clear
  2939.     @status_aid_window.refresh
  2940.     $game_temp.battle_aid = nil
  2941.     scene_battle_on_actor_cancel_abe
  2942.     case @actor_command_window.current_symbol
  2943.     when :skill
  2944.       @skill_window.show
  2945.     when :item
  2946.       @item_window.show
  2947.     end
  2948.   end
  2949.  
  2950.   #--------------------------------------------------------------------------
  2951.   # alias method: select_enemy_selection
  2952.   #--------------------------------------------------------------------------
  2953.   alias scene_battle_select_enemy_selection_abe select_enemy_selection
  2954.   def select_enemy_selection
  2955.     @status_aid_window.refresh
  2956.     scene_battle_select_enemy_selection_abe
  2957.     @help_window.show
  2958.   end
  2959.   #--------------------------------------------------------------------------
  2960.   # alias method: on_enemy_ok
  2961.   #--------------------------------------------------------------------------
  2962.   alias scene_battle_on_enemy_ok_abe on_enemy_ok
  2963.   def on_enemy_ok
  2964.     $game_temp.battle_aid = nil
  2965.     scene_battle_on_enemy_ok_abe
  2966.   end
  2967.  
  2968.   #--------------------------------------------------------------------------
  2969.   # alias method: on_enemy_cancel
  2970.   #--------------------------------------------------------------------------
  2971.   alias scene_battle_on_enemy_cancel_abe on_enemy_cancel
  2972.   def on_enemy_cancel
  2973.     BattleManager.actor.input.clear
  2974.     @status_aid_window.refresh
  2975.     $game_temp.battle_aid = nil
  2976.     scene_battle_on_enemy_cancel_abe
  2977.     if @skill_window.visible || @item_window.visible
  2978.       @help_window.show
  2979.     else
  2980.       @help_window.hide
  2981.     end
  2982.   end
  2983.  
  2984.   #--------------------------------------------------------------------------
  2985.   # alias method: battle_start
  2986.   #--------------------------------------------------------------------------
  2987.   alias scene_battle_battle_start_abe battle_start
  2988.   def battle_start
  2989.     scene_battle_battle_start_abe
  2990.     return unless YEA::BATTLE::SKIP_PARTY_COMMAND
  2991.     @party_command_window.deactivate
  2992.     if BattleManager.input_start
  2993.       command_fight
  2994.     else
  2995.       turn_start
  2996.     end
  2997.   end
  2998.  
  2999.   #--------------------------------------------------------------------------
  3000.   # overwrite method: turn_end
  3001.   #--------------------------------------------------------------------------
  3002.   def turn_end
  3003.     all_battle_members.each do |battler|
  3004.       battler.on_turn_end
  3005.       status_redraw_target(battler)
  3006.       @log_window.display_auto_affected_status(battler)
  3007.       @log_window.wait_and_clear
  3008.     end
  3009.     update_party_cooldowns if $imported["YEA-CommandParty"]
  3010.     BattleManager.turn_end
  3011.     process_event
  3012.     start_party_command_selection
  3013.     return unless YEA::BATTLE::SKIP_PARTY_COMMAND
  3014.     if BattleManager.input_start
  3015.       @party_command_window.deactivate
  3016.       command_fight
  3017.     else
  3018.       @party_command_window.deactivate
  3019.       turn_start
  3020.     end
  3021.   end
  3022.  
  3023.   #--------------------------------------------------------------------------
  3024.   # overwrite method: execute_action
  3025.   #--------------------------------------------------------------------------
  3026.   def execute_action
  3027.     @subject.sprite_effect_type = :whiten if YEA::BATTLE::FLASH_WHITE_EFFECT
  3028.     use_item
  3029.     @log_window.wait_and_clear
  3030.   end
  3031.  
  3032.   #--------------------------------------------------------------------------
  3033.   # overwrite method: apply_item_effects
  3034.   #--------------------------------------------------------------------------
  3035.   def apply_item_effects(target, item)
  3036.     if $imported["YEA-LunaticObjects"]
  3037.       lunatic_object_effect(:prepare, item, @subject, target)
  3038.     end
  3039.     target.item_apply(@subject, item)
  3040.     status_redraw_target(@subject)
  3041.     status_redraw_target(target) unless target == @subject
  3042.     @log_window.display_action_results(target, item)
  3043.     if $imported["YEA-LunaticObjects"]
  3044.       lunatic_object_effect(:during, item, @subject, target)
  3045.     end
  3046.     perform_collapse_check(target)
  3047.   end
  3048.  
  3049.   #--------------------------------------------------------------------------
  3050.   # overwite method: invoke_counter_attack
  3051.   #--------------------------------------------------------------------------
  3052.   def invoke_counter_attack(target, item)
  3053.     @log_window.display_counter(target, item)
  3054.     attack_skill = $data_skills[target.attack_skill_id]
  3055.     @subject.item_apply(target, attack_skill)
  3056.     status_redraw_target(@subject)
  3057.     status_redraw_target(target) unless target == @subject
  3058.     @log_window.display_action_results(@subject, attack_skill)
  3059.     perform_collapse_check(target)
  3060.     perform_collapse_check(@subject)
  3061.   end
  3062.  
  3063.   #--------------------------------------------------------------------------
  3064.   # new method: perform_collapse_check
  3065.   #--------------------------------------------------------------------------
  3066.   def perform_collapse_check(target)
  3067.     return if YEA::BATTLE::MSG_ADDED_STATES
  3068.     target.perform_collapse_effect if target.can_collapse?
  3069.     @log_window.wait
  3070.     @log_window.wait_for_effect
  3071.   end
  3072.  
  3073.   #--------------------------------------------------------------------------
  3074.   # overwrite method: show_attack_animation
  3075.   #--------------------------------------------------------------------------
  3076.   def show_attack_animation(targets)
  3077.     show_normal_animation(targets, @subject.atk_animation_id1, false)
  3078.     wait_for_animation
  3079.     show_normal_animation(targets, @subject.atk_animation_id2, true)
  3080.   end
  3081.  
  3082.   #--------------------------------------------------------------------------
  3083.   # overwrite method: show_normal_animation
  3084.   #--------------------------------------------------------------------------
  3085.   def show_normal_animation(targets, animation_id, mirror = false)
  3086.     animation = $data_animations[animation_id]
  3087.     return if animation.nil?
  3088.     ani_check = false
  3089.     if targets != nil
  3090.     targets.each do |target|
  3091.       if ani_check && target.animation_id <= 0
  3092.         target.pseudo_ani_id = animation_id
  3093.       else
  3094.         target.animation_id = animation_id
  3095.       end
  3096.       target.animation_mirror = mirror
  3097.       ani_check = true if animation.to_screen?
  3098.     end
  3099.     end
  3100.   end
  3101.  
  3102.   #--------------------------------------------------------------------------
  3103.   # overwrite method: process_action_end
  3104.   #--------------------------------------------------------------------------
  3105.   def process_action_end
  3106.     @subject.on_action_end
  3107.     status_redraw_target(@subject)
  3108.     @log_window.display_auto_affected_status(@subject)
  3109.     @log_window.wait_and_clear
  3110.     @log_window.display_current_state(@subject)
  3111.     @log_window.wait_and_clear
  3112.     BattleManager.judge_win_loss
  3113.   end
  3114.  
  3115.   #--------------------------------------------------------------------------
  3116.   # overwrite method: use_item
  3117.   #--------------------------------------------------------------------------
  3118.   def use_item
  3119.     item = @subject.current_action.item
  3120.     @log_window.display_use_item(@subject, item)
  3121.     @subject.use_item(item)
  3122.     status_redraw_target(@subject)
  3123.     if $imported["YEA-LunaticObjects"]
  3124.       lunatic_object_effect(:before, item, @subject, @subject)
  3125.     end
  3126.     process_casting_animation if $imported["YEA-CastAnimations"]
  3127.     targets = @subject.current_action.make_targets.compact rescue []
  3128.     show_animation(targets, item.animation_id) if show_all_animation?(item)
  3129.     targets.each {|target|
  3130.       if $imported["YEA-TargetManager"]
  3131.         target = alive_random_target(target, item) if item.for_random?
  3132.       end
  3133.       item.repeats.times { invoke_item(target, item) } }
  3134.     if $imported["YEA-LunaticObjects"]
  3135.       lunatic_object_effect(:after, item, @subject, @subject)
  3136.     end
  3137.   end
  3138.  
  3139.   #--------------------------------------------------------------------------
  3140.   # alias method: invoke_item
  3141.   #--------------------------------------------------------------------------
  3142.   alias scene_battle_invoke_item_abe invoke_item
  3143.   def invoke_item(target, item)
  3144.     show_animation([target], item.animation_id) if separate_ani?(target, item)
  3145.     #if target.dead? != item.for_dead_friend?
  3146.     #  @subject.last_target_index = target.index
  3147.     #  return
  3148.     #end
  3149.     scene_battle_invoke_item_abe(target, item)
  3150.   end
  3151.  
  3152.   #--------------------------------------------------------------------------
  3153.   # new method: show_all_animation?
  3154.   #--------------------------------------------------------------------------
  3155.   def show_all_animation?(item)
  3156.     return true if item.one_animation
  3157.     return false if $data_animations[item.animation_id].nil?
  3158.     return false unless $data_animations[item.animation_id].to_screen?
  3159.     return true
  3160.   end
  3161.  
  3162.   #--------------------------------------------------------------------------
  3163.   # new method: separate_ani?
  3164.   #--------------------------------------------------------------------------
  3165.   def separate_ani?(target, item)
  3166.     #return false if item.one_animation
  3167.     #return false if $data_animations[item.animation_id].nil?
  3168.     #return false if $data_animations[item.animation_id].to_screen?
  3169.     #return target.dead? == item.for_dead_friend?
  3170.     return false
  3171.   end
  3172.  
  3173.   #--------------------------------------------------------------------------
  3174.   # new method: status_redraw_target
  3175.   #--------------------------------------------------------------------------
  3176.   def status_redraw_target(target)
  3177.     return unless target.actor?
  3178.     @status_window.draw_item($game_party.battle_members.index(target))
  3179.   end
  3180.  
  3181.   #--------------------------------------------------------------------------
  3182.   # alias method: start_party_command_selection
  3183.   #--------------------------------------------------------------------------
  3184.   alias start_party_command_selection_abe start_party_command_selection
  3185.   def start_party_command_selection
  3186.     @status_window.refresh unless scene_changing?
  3187.     start_party_command_selection_abe
  3188.   end
  3189.  
  3190.   #--------------------------------------------------------------------------
  3191.   # overwrite method: refresh_status
  3192.   #--------------------------------------------------------------------------
  3193.   def refresh_status; return; end
  3194.  
  3195.   #--------------------------------------------------------------------------
  3196.   # new method: refresh_autobattler_status_window
  3197.   #--------------------------------------------------------------------------
  3198.   def refresh_autobattler_status_window
  3199.     for member in $game_party.battle_members
  3200.       next unless member.auto_battle?
  3201.       @status_window.draw_item(member.index)
  3202.     end
  3203.   end
  3204.  
  3205.   #--------------------------------------------------------------------------
  3206.   # new method: hide_extra_gauges
  3207.   #--------------------------------------------------------------------------
  3208.   def hide_extra_gauges
  3209.     # Made for compatibility
  3210.   end
  3211.  
  3212.   #--------------------------------------------------------------------------
  3213.   # new method: show_extra_gauges
  3214.   #--------------------------------------------------------------------------
  3215.   def show_extra_gauges
  3216.     # Made for compatibility
  3217.   end
  3218.  
  3219. end # Scene_Battle
  3220.  
  3221. #==============================================================================
  3222. #
  3223. # ▼ End of File
  3224. #
  3225. #==============================================================================

  

点评

发现个新问题,就是buff的小图标,和攻击防御挤一块去了,能分成两行显示吗?  发表于 2013-8-24 17:32
可以满足需求,谢谢,我先去测试  发表于 2013-8-24 16:44
回复

使用道具 举报

Lv1.梦旅人

天才琪露诺

梦石
0
星屑
54
在线时间
276 小时
注册时间
2013-6-24
帖子
1741
3
发表于 2013-8-24 14:41:54 | 只看该作者
状态脸图如果要放下六个的话就要变窄了,
确定是要变窄么?

说人家是笨蛋的自己才是笨蛋,我最强了,最最最强!
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
171 小时
注册时间
2013-8-6
帖子
101
4
 楼主| 发表于 2013-8-24 15:48:06 | 只看该作者
八月桑 发表于 2013-8-24 14:41
状态脸图如果要放下六个的话就要变窄了,
确定是要变窄么?

确定啊,老大
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
171 小时
注册时间
2013-8-6
帖子
101
5
 楼主| 发表于 2013-8-24 15:48:33 | 只看该作者
喵呜喵5 发表于 2013-8-24 15:40
啧,画面真心难看……我再优化一下再发吧…………

加油,感谢  {:2_270:}
回复

使用道具 举报

Lv2.观梦者

梦石
0
星屑
465
在线时间
915 小时
注册时间
2011-5-11
帖子
438
6
发表于 2013-8-24 16:32:04 | 只看该作者
这个是采用滚动样式有兴趣的话就再帮你改一下

http://rpg.blue/static/image/smiley/yct/A059.gif中国字认识都不到一半,哪的心情学英语呀!
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
171 小时
注册时间
2013-8-6
帖子
101
7
 楼主| 发表于 2013-8-24 16:43:09 | 只看该作者
345912390 发表于 2013-8-24 16:32
这个是采用滚动样式有兴趣的话就再帮你改一下

用了鼠标脚本,滚动滚不了啊,老大
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
171 小时
注册时间
2013-8-6
帖子
101
8
 楼主| 发表于 2013-8-24 16:58:13 | 只看该作者
喵呜喵5 发表于 2013-8-24 15:40
脸图素材规格为65*96,边缘做成虚化的效果更好(图中就是虚化的效果)

相当拥挤啊,这样的战斗图没关系 ...


非常好啊,谢谢大神,有一个小问题,能帮忙美化下吗???
就是用技能和物品的时候,选择窗口贴边了。右边的脸图左右都不贴边,看这好别扭。
谢谢,麻烦你了

help2.JPG (18.37 KB, 下载次数: 1)

help2.JPG

点评

全部修改完毕,不需要改图了,用的都是同一张脸图了,脚本在3楼  发表于 2013-8-24 21:43
BUFF图标塞不进去啊!这豆腐块大的地方能放个P啊……  发表于 2013-8-24 21:28
点错,回复到你的另外一个帖子去了……  发表于 2013-8-24 18:13
回复

使用道具 举报

Lv5.捕梦者 (暗夜天使)

只有笨蛋才会看到

梦石
1
星屑
21040
在线时间
9340 小时
注册时间
2012-6-19
帖子
7107

开拓者短篇九导演组冠军

9
发表于 2013-8-24 17:37:12 | 只看该作者
请直接修改脸图哦
本来更改这个窗口的大小也是为了让脸图显示起来更好看的

点评

我晕又改脸图啊,改晕了,那不是一个角色要搞两个尺寸了?哭了。。。。居中不行么?  发表于 2013-8-24 18:28
那可以让两个窗口挨着,居中显示吗?谢谢。。。。  发表于 2013-8-24 17:42
回复

使用道具 举报

Lv5.捕梦者 (暗夜天使)

只有笨蛋才会看到

梦石
1
星屑
21040
在线时间
9340 小时
注册时间
2012-6-19
帖子
7107

开拓者短篇九导演组冠军

10
发表于 2013-8-24 20:49:09 | 只看该作者
longshili 发表于 2013-8-24 16:58
非常好啊,谢谢大神,有一个小问题,能帮忙美化下吗???
就是用技能和物品的时候,选择窗口贴边了。右 ...

1.一个角色确实需要两个尺寸
两个窗口挨着居中显示很麻烦,坐标什么的更新什么的,几千行的代码懒得看,
一个角色一个尺寸也可以啊,不过不好看就是了,你愿意的话可以自己去改,draw_figure那里改一下X就可以了

2.buff的小图标和攻击防御的图标截图一下给我看看

点评

那个BUFF的小图标还真不好截图。。。-_-!~  发表于 2013-8-24 21:56
回复

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-5-15 12:15

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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