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

Project1

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

[已经过期] 請大大幫我看下這範例,為何戰鬥中揮刀動畫沒出現??

[复制链接]

Lv2.观梦者

梦石
0
星屑
567
在线时间
465 小时
注册时间
2009-10-11
帖子
407
跳转到指定楼层
1
发表于 2015-6-10 19:13:53 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 a000b1745 于 2015-6-15 10:40 编辑

已經附上範例~不知技能129 "Threatening Strike" 的備註要怎樣設定才能讓BattleSymphony-HB產生揮刀動作??

求大大說明一下技能的備註欄裡,BattleSymphony-HB(Kecin使用的戰鬥圖類型) 動作的指令 (移動、揮刀、施放技能等...)要看哪裡去寫??
才能讓角色Kecin接近怪物時做出揮刀動作...

P.S 不用顧慮改了後Ralph的表現...之後會都把戰鬥圖改成HB的,不會用BattleSymphony-8D這類型的。
      雖然不知具體寫法...不過估計是在範例中的" Yami Engine Symphony - Battle Symphony" 這個腳本做修正吧?

順便附上腳本Yami Engine Symphony - Battle Symphony...求大大們幫忙看一下了...要找BattleSymphony-HB類別的動作指令...
(腳本有兩種類型.一個7z.一個普通壓縮檔rar. 都是一樣的內容)

希望有大大能幫忙看下腳本了~"~

Battle Symphony v1.16c2.rar

1004.23 KB, 下载次数: 22

腳本

Yami Engine Symphony - Battle Symphony.7z

17.59 KB, 下载次数: 21

Yami Engine Symphony - Battle Symphony.rar

18.8 KB, 下载次数: 23

因为现实太残酷、所以我们都在打造虚幻的天堂。如果现实不再残酷,也是因为有这快乐的天堂。

Lv2.观梦者

梦石
0
星屑
567
在线时间
465 小时
注册时间
2009-10-11
帖子
407
2
 楼主| 发表于 2015-6-10 23:01:16 | 只看该作者
這邊直接貼上腳本,實在有點長...↓
  1. #==============================================================================
  2. #
  3. # ▼ Yami Engine Symphony - Battle Symphony
  4. # -- Version: 1.15 (2013.03.04)
  5. # -- Level: Easy, Normal, Hard, Very Hard
  6. # -- Requires: n/a
  7. #
  8. #==============================================================================

  9. $imported = {} if $imported.nil?
  10. $imported["YES-BattleSymphony"] = true

  11. #==============================================================================
  12. # ▼ Updates
  13. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  14. # 2013.03.04 - Release Build 1.15.
  15. # 2013.02.07 - Release Build 1.14.
  16. # 2013.02.01 - Release Build 1.13.
  17. # 2013.01.12 - Release Build 1.12.
  18. # 2013.01.09 - Release Build 1.11.
  19. # 2013.01.03 - Release Build 1.10.
  20. # 2012.11.29 - Release Build 1.09.
  21. # 2012.11.29 - Release Build 1.08.
  22. # 2012.11.28 - Release Build 1.07.
  23. # 2012.11.25 - Release Build 1.06.
  24. # 2012.11.24 - Release Build 1.05.
  25. # 2012.11.16 - Release Build 1.04.
  26. # 2012.11.15 - Release Build 1.03.
  27. # 2012.11.12 - Release Build 1.02.
  28. # 2012.11.08 - Release Build 1.01.
  29. # 2012.10.20 - Finished Script.
  30. # 2012.07.01 - Started Script.
  31. #
  32. #==============================================================================
  33. # ▼ Introduction
  34. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  35. # Core Engine of Symphony. This script provides a complicated visual battle
  36. # which can be customized and many add-on awaited in the future.
  37. # -----------------------------------------------------------------------------
  38. # There are 8 Sections of Script:
  39. #
  40. # Section I. Basic Settings (S-01)
  41. # Section II. Default Actions (S-02)
  42. # Section III. AutoSymphony (S-03)
  43. # Section IV. Default Symphony Tags (S-04)
  44. # Section V. Imports Symphony Tags (S-05)
  45. # Section VI. Sprites Initialization (S-06)
  46. # Section VII. Icons Sprites Initialization (S-07)
  47. # Section VIII. Core Script (S-08)
  48. #
  49. # You can search these sections by the code next to them (S-xx).
  50. #
  51. #==============================================================================
  52. # ▼ Compatibility
  53. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  54. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  55. # it will run with RPG Maker VX without adjusting.
  56. #
  57. # To make this script work correctly with YEA - Battle Engine Ace, you have to
  58. # put this script under YEA - Battle Engine Ace.
  59. #
  60. #==============================================================================
  61. # ▼ Credits
  62. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  63. # Symphony Tags: Yanfly (From his Melody Tags).
  64. # Inspired: Yanfly, Nessiah, EvilEagles.
  65. # Testers: Many Guys in RPG Maker Community.
  66. # Many Descriptions: Yanfly (From his Yanfly Engine Melody)
  67. #
  68. #==============================================================================

  69. #==============================================================================
  70. # Section I. Basic Settings (S-01)
  71. # -----------------------------------------------------------------------------
  72. # These are all basic requirements for running Battle Engine Symphony.
  73. # Please pay attention to those settings before you touch and read next
  74. # sections and add-ons.
  75. #==============================================================================
  76. module SYMPHONY
  77.   module View
  78.     # Set this to false to set Battle View to Empty.
  79.     # All Sprites of actors as well as Icon (Weapon, Item...) will be hide.
  80.     # All other Symphony Tags are still available.   
  81.     EMPTY_VIEW = false
  82.    
  83.     # Set Party default Direction. For Number of Direction, check NumPad on the
  84.     # Keyboard. Troop Direction will be opposited with Party Direction.
  85.     PARTY_DIRECTION = 4
  86.    
  87.     # Set Party default Location. If You have more than 4 Actors in Battle, You
  88.     # have to add more index in the hash below.
  89.     # For example: If you have 5 Actors, You will have to add default Location
  90.     # for 5th Actor by adding: 4 => [Location X, Location Y],
  91.     # (Don't forget the comma at the end of each line)
  92.     ACTORS_POSITION = { # Begin.
  93.       0 =>  [438, 190],
  94.       1 =>  [457, 210],
  95.       2 =>  [432, 240],
  96.       3 =>  [482, 270],
  97.       3 =>  [482, 270],
  98.     } # End.
  99.   end # View
  100.   module Visual
  101.     # Set this to false to disable Weapon Icon creating for non-charset Battlers.
  102.     # Recommend not to enable this, unless You use a Battler which doesn't show
  103.     # its own weapon in the Battler-set.
  104.     WEAPON_ICON_NON_CHARSET = false
  105.    
  106.     # Set this to true to disable auto Move Posing. When set this to false,
  107.     # You can let the actor to change to any pose while moving.
  108.     DISABLE_AUTO_MOVE_POSE = true
  109.    
  110.     # Set this to true to enable shadow beneath battler.
  111.     BATTLER_SHADOW = false
  112.    
  113.     # Enemies default attack animation ID.
  114.     # First Attack Animation and Second Attack Animation can be defined by
  115.     # notetags <atk ani 1: x> and <atk ani 2: x> respectively.
  116.     ENEMY_ATTACK_ANIMATION = 1
  117.   end # Visual
  118.   module Fixes
  119.     # Set this to false to disable auto turn-off the immortal flag. Many people
  120.     # forgot to turn-off immortal flag in an actions sequence, so the targets
  121.     # remain alive even their HP reach zero.
  122.     # Auto Turn-off Immortal will be push to Finish Actions.
  123.     AUTO_IMMORTAL_OFF = true
  124.   end # Fixes
  125. end # SYMPHONY

  126. #==============================================================================
  127. # Section II. Default Actions (S-02)
  128. # -----------------------------------------------------------------------------
  129. # These are all Default Actions of Symphony. There are Magic Action,
  130. # Physical Action, Item Action and some Misc Actions. If You are really
  131. # good at Symphony Tags and want to customize all of these actions, please
  132. # pay attention here.
  133. # Note: You can use Symphony Tags in each skills so You don't have to check
  134. # this if these actions settings are good for You.
  135. #==============================================================================
  136. module SYMPHONY
  137.   module DEFAULT_ACTIONS
  138.       
  139.     #==========================================================================
  140.     # Default Magic Actions
  141.     # -------------------------------------------------------------------------
  142.     # These are the default magic actions for all Magic Skills as well as Certain
  143.     # hit Skills. Battlers will play these actions when use a Magic/Certain Hit
  144.     # Skill unless You customize it with Symphony Tags.
  145.     #==========================================================================
  146.     MAGIC_SETUP =[
  147.       ["MESSAGE"],
  148.       ["MOVE USER", ["FORWARD", "WAIT"]],
  149.       ["POSE", ["USER", "CAST"]],
  150.       ["STANCE", ["USER", "CAST"]],
  151.     ] # Do not remove this.
  152.     MAGIC_WHOLE =[
  153.       ["IMMORTAL", ["TARGETS", "TRUE"]],
  154.       ["AUTO SYMPHONY", ["SKILL FULL"]],
  155.     ] # Do not remove this.
  156.     MAGIC_TARGET =[
  157.     ] # Do not remove this.
  158.     MAGIC_FOLLOW =[
  159.       ["WAIT FOR MOVE"],
  160.     ] # Do not remove this.
  161.     MAGIC_FINISH =[
  162.       ["IMMORTAL", ["TARGETS", "FALSE"]],
  163.       ["AUTO SYMPHONY", ["RETURN ORIGIN"]],
  164.       ["WAIT FOR MOVE"],
  165.       ["WAIT", ["12", "SKIP"]],
  166.     ] # Do not remove this.
  167.       
  168.     #==========================================================================
  169.     # Default Physical Actions
  170.     # -------------------------------------------------------------------------
  171.     # These are the default physical actions for all Physical Skills as well as
  172.     # Normal Attack. Battlers will play these actions when use a Physical
  173.     # Skill unless You customize it with Symphony Tags.
  174.     #==========================================================================
  175.     PHYSICAL_SETUP =[
  176.       ["MESSAGE"],
  177.       ["MOVE USER", ["FORWARD", "WAIT"]],
  178.     ] # Do not remove this.
  179.     PHYSICAL_WHOLE =[
  180.     ] # Do not remove this.
  181.     PHYSICAL_TARGET =[
  182.       ["IMMORTAL", ["TARGETS", "TRUE"]],
  183.       ["POSE", ["USER", "FORWARD"]],
  184.       ["STANCE", ["USER", "FORWARD"]],
  185.       ["MOVE USER", ["TARGET", "CENTER2", "WAIT"]],
  186.       ["AUTO SYMPHONY", ["SINGLE SWING"]],
  187.       ["AUTO SYMPHONY", ["SKILL FULL", "unless attack"]],
  188.       ["AUTO SYMPHONY", ["ATTACK FULL", "if attack"]],
  189.     ] # Do not remove this.
  190.     PHYSICAL_FOLLOW =[
  191.       ["WAIT FOR MOVE"],
  192.     ] # Do not remove this.
  193.     PHYSICAL_FINISH =[
  194.       ["IMMORTAL", ["TARGETS", "FALSE"]],
  195.       ["ICON DELETE", ["USER", "WEAPON"]],
  196.       ["AUTO SYMPHONY", ["RETURN ORIGIN"]],
  197.       ["WAIT FOR MOVE"],
  198.       ["WAIT", ["12", "SKIP"]],
  199.     ] # Do not remove this.
  200.    
  201.     #==========================================================================
  202.     # Default Item Actions
  203.     # -------------------------------------------------------------------------
  204.     # These are the default item actions for all Items. Battlers will play these
  205.     # actions when use an Item unless You customize it with Symphony Tags.
  206.     #==========================================================================
  207.     ITEM_SETUP =[
  208.       ["MESSAGE"],
  209.       ["MOVE USER", ["FORWARD", "WAIT"]],
  210.       ["AUTO SYMPHONY", ["ITEM FLOAT"]],
  211.     ] # Do not remove this.
  212.     ITEM_WHOLE =[
  213.       ["IMMORTAL", ["TARGETS", "TRUE"]],
  214.       ["AUTO SYMPHONY", ["ITEM FULL"]],
  215.     ] # Do not remove this.
  216.     ITEM_TARGET =[
  217.     ] # Do not remove this.
  218.     ITEM_FOLLOW =[
  219.       ["WAIT FOR MOVE"],
  220.     ] # Do not remove this.
  221.     ITEM_FINISH =[
  222.       ["IMMORTAL", ["TARGETS", "FALSE"]],
  223.       ["AUTO SYMPHONY", ["RETURN ORIGIN"]],
  224.       ["WAIT FOR MOVE"],
  225.       ["WAIT", ["12", "SKIP"]],
  226.     ] # Do not remove this.
  227.    
  228.     #==========================================================================
  229.     # Critical Action
  230.     # -------------------------------------------------------------------------
  231.     # This is the critical action. This action will be played when a battler
  232.     # scores a critical hit.
  233.     #==========================================================================
  234.     CRITICAL_ACTIONS =[
  235.       ["SCREEN", ["FLASH", "30", "255", "255", "255"]],
  236.     ] # Do not remove this.
  237.    
  238.     #==========================================================================
  239.     # Miss Action
  240.     # -------------------------------------------------------------------------
  241.     # This is the miss action. This action will be played when a battler attacks
  242.     # miss.
  243.     #==========================================================================
  244.     MISS_ACTIONS =[
  245.       ["POSE", ["TARGET", "EVADE"]],
  246.     ] # Do not remove this.
  247.    
  248.     #==========================================================================
  249.     # Evade Action
  250.     # -------------------------------------------------------------------------
  251.     # This is the evade action. This action will be played when a battler evades.
  252.     #==========================================================================
  253.     EVADE_ACTIONS =[
  254.       ["POSE", ["TARGET", "EVADE"]],
  255.     ] # Do not remove this.

  256.     #==========================================================================
  257.     # Fail Action
  258.     # -------------------------------------------------------------------------
  259.     # This is the fail action. This action will be played when a battler fails
  260.     # on casting skill.
  261.     #==========================================================================
  262.     FAIL_ACTIONS =[
  263.    
  264.     ] # Do not remove this.
  265.       
  266.     #==========================================================================
  267.     # Damaged Action
  268.     # -------------------------------------------------------------------------
  269.     # This is the damaged action. This action will be played when a battler is
  270.     # damaged.
  271.     #==========================================================================
  272.     DAMAGED_ACTION = [
  273.       ["POSE", ["TARGET", "DAMAGE"]],
  274.       ["STANCE", ["TARGET", "STRUCK"]],
  275.     ] # Do not remove this.
  276.       
  277.     #==========================================================================
  278.     # Counter Action
  279.     # -------------------------------------------------------------------------
  280.     # This is the counter action. This action will be played when a battler
  281.     # counters an attack.
  282.     #==========================================================================
  283.     COUNTER_ACTION = [
  284.       ["MOVE COUNTER SUBJECT", ["FORWARD", "WAIT"]],
  285.       ["AUTO SYMPHONY", ["SINGLE SWING COUNTER"]],
  286.       ["AUTO SYMPHONY", ["SKILL FULL COUNTER"]],
  287.       ["ICON DELETE", ["COUNTER SUBJECT", "WEAPON"]],
  288.       ["POSE", ["COUNTER SUBJECT", "BREAK"]],
  289.       ["STANCE", ["COUNTER SUBJECT", "BREAK"]],
  290.     ] # Do not remove this.
  291.       
  292.     #==========================================================================
  293.     # Reflect Action
  294.     # -------------------------------------------------------------------------
  295.     # This is the reflect action. This action will be played when a battler
  296.     # reflects a magic.
  297.     #==========================================================================
  298.     REFLECT_ACTION = [
  299.       ["MOVE REFLECT SUBJECT", ["FORWARD", "WAIT"]],
  300.       ["POSE", ["REFLECT SUBJECT", "CAST"]],
  301.       ["STANCE", ["REFLECT SUBJECT", "CAST"]],
  302.       ["AUTO SYMPHONY", ["SKILL FULL COUNTER"]],
  303.       ["POSE", ["REFLECT SUBJECT", "BREAK"]],
  304.       ["STANCE", ["REFLECT SUBJECT", "BREAK"]],
  305.     ] # Do not remove this.
  306.    
  307.   end # DEFAULT_ACTIONS
  308. end # SYMPHONY

  309. #==============================================================================
  310. # Section III. AutoSymphony (S-03)
  311. # -----------------------------------------------------------------------------
  312. # These are all Settings of AutoSymphony. You can make a sequence of Actions
  313. # and Symphony Tags and reuse it with a single tag: AutoSymphony.
  314. #==============================================================================
  315. module SYMPHONY
  316.   AUTO_SYMPHONY = { # Start
  317.     # "Key" => [Symphony Sequence],
  318.    
  319.     #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  320.     # autosymphony: return origin
  321.     # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  322.     # This AutoSymphony returns the active battler and all of its targets back
  323.     # to their original locations. Used often at the end of a skill, item,
  324.     # or any other action sequence.
  325.     # --- WARNING --- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  326.     # This is a default-used AutoSymphony. Do not remove this.
  327.     #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  328.     "RETURN ORIGIN" => [
  329.       ["STANCE", ["USER", "ORIGIN"]],
  330.       ["MOVE USER", ["ORIGIN", "WAIT"]],
  331.       ["POSE", ["USER", "BREAK"]],
  332.       ["MOVE EVERYTHING", ["ORIGIN"]],
  333.     ], # end RETURN ORIGIN
  334.      
  335.     #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  336.     # autosymphony: single swing
  337.     # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  338.     # This causes the active battler to perform a single-handed weapon swing
  339.     # downwards.
  340.     # --- WARNING --- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  341.     # This is a default-used AutoSymphony. Do not remove this.
  342.     #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  343.     "SINGLE SWING" => [
  344.       ["ICON CREATE", ["USER", "WEAPON"]],
  345.       ["ICON", ["USER", "WEAPON", "SWING"]],
  346.       ["POSE", ["USER", "2H SWING"]],
  347.       ["STANCE", ["USER", "ATTACK"]],
  348.     ], # end SINGLE SWING
  349.       
  350.     #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  351.     # autosymphony: single swing counter
  352.     # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  353.     # This causes the countering battler to perform a single-handed weapon
  354.     # swing downwards.
  355.     # --- WARNING --- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  356.     # This is a default-used AutoSymphony. Do not remove this.
  357.     #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  358.     "SINGLE SWING COUNTER" => [
  359.       ["ICON CREATE", ["COUNTER SUBJECT", "WEAPON"]],
  360.       ["ICON", ["COUNTER SUBJECT", "WEAPON", "SWING"]],
  361.       ["POSE", ["COUNTER SUBJECT", "2H SWING"]],
  362.       ["STANCE", ["USER", "ATTACK"]],
  363.     ], # end SINGLE SWING COUNTER
  364.             
  365.     #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  366.     # autosymphony: item float
  367.     # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  368.     # This causes the active battler to enter a "Cast" stance to make the
  369.     # active battler appear to throw the item upward. The icon of the item
  370.     # is then created and floats upward.
  371.     # --- WARNING --- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  372.     # This is a default-used AutoSymphony. Do not remove this.
  373.     #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  374.     "ITEM FLOAT" => [
  375.       ["POSE", ["USER", "CAST"]],
  376.       ["STANCE", ["USER", "ITEM"]],
  377.       ["ICON CREATE", ["USER", "ITEM"]],
  378.       ["ICON", ["USER", "ITEM", "FLOAT", "WAIT"]],
  379.     ], # end ITEM FLOAT
  380.       
  381.     #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  382.     # autosymphony: attack full
  383.     # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  384.     # This triggers the full course for an attack effect. Attack's animation
  385.     # plays and waits until it ends. The damage, status changes, and anything
  386.     # else the attack may do to the target. Once the attack effect is over,
  387.     # the target is sent sliding backwards a little bit.
  388.     # --- WARNING --- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  389.     # This is a default-used AutoSymphony. Do not remove this.
  390.     #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  391.     "ATTACK FULL" => [
  392.       ["ATTACK EFFECT", ["COUNTER CHECK"]],
  393.       ["ATTACK ANIMATION", ["WAIT"]],
  394.       ["ATTACK EFFECT", ["WHOLE"]],
  395.       ["MOVE TARGETS", ["BACKWARD"]],
  396.     ], # end ATTACK FULL
  397.       
  398.     #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  399.     # autosymphony: skill full
  400.     # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  401.     # This trigger the full course for a skill's effect. The skill animation
  402.     # plays and waits to the end. The damage, status changes, and anything
  403.     # else the skill may do to the target. Once the skill effect is over, the
  404.     # target is sent sliding backwards a little bit.
  405.     # --- WARNING --- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  406.     # This is a default-used AutoSymphony. Do not remove this.
  407.     #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  408.     "SKILL FULL" => [
  409.       ["SKILL EFFECT", ["COUNTER CHECK"]],
  410.       ["SKILL EFFECT", ["REFLECT CHECK"]],
  411.       ["SKILL ANIMATION", ["WAIT"]],
  412.       ["SKILL EFFECT", ["WHOLE"]],
  413.       ["MOVE TARGETS", ["BACKWARD", "unless skill.for_friend?"]],
  414.     ], # end SKILL FULL
  415.       
  416.     #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  417.     # autosymphony: skill full counter
  418.     # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  419.     # This trigger the full course for a skill's effect. The skill animation
  420.     # plays and waits to the end. The damage, status changes, and anything
  421.     # else the skill may do to the target. Once the skill effect is over, the
  422.     # target is sent sliding backwards a little bit.
  423.     # This trigger is used in countering/reflecting skill.
  424.     # --- WARNING --- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  425.     # This is a default-used AutoSymphony. Do not remove this.
  426.     #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  427.     "SKILL FULL COUNTER" => [
  428.       ["ATTACK ANIMATION", ["TARGETS", "WAIT", "if attack"]],
  429.       ["SKILL ANIMATION", ["TARGETS", "WAIT", "unless attack"]],
  430.       ["SKILL EFFECT", ["WHOLE"]],
  431.       ["MOVE TARGETS", ["BACKWARD", "unless skill.for_friend?"]],
  432.     ], # end SKILL FULL COUNTER
  433.    
  434.     #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  435.     # autosymphony: item full
  436.     # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  437.     # This triggers the full course for an item's effect. The item animation
  438.     # plays and waits to the end. The damage, status changes, and anything
  439.     # else the item may do to the target. Once the skill effect is over, the
  440.     # target is sent sliding backwards a little bit.
  441.     # --- WARNING --- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  442.     # This is a default-used AutoSymphony. Do not remove this.
  443.     #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  444.     "ITEM FULL" => [
  445.       ["SKILL EFFECT", ["COUNTER CHECK"]],
  446.       ["SKILL EFFECT", ["REFLECT CHECK", "unless skill.for_all?"]],
  447.       ["SKILL ANIMATION", ["WAIT"]],
  448.       ["ICON", ["USER", "ITEM", "FADE OUT", "WAIT"]],
  449.       ["ICON DELETE", ["USER", "ITEM"]],
  450.       ["SKILL EFFECT", ["WHOLE"]],
  451.       ["MOVE TARGETS", ["BACKWARD", "unless item.for_friend?"]],
  452.     ], # end ITEM FULL
  453.    
  454.   } # Do not remove this.
  455. end # SYMPHONY

  456. #==============================================================================
  457. # Section IV. Default Symphony Tags (S-04)
  458. # -----------------------------------------------------------------------------
  459. # These are all Default Symphony Tags. They define actions that will be played
  460. # when the tags are called. All these tags are optimized for the best
  461. # performance through testings.
  462. # -----------------------------------------------------------------------------
  463. # Do not edit anything below here unless You have read carefully the Tutorial
  464. # at Creating and Editing Symphony Tags.
  465. #==============================================================================
  466. #==============================================================================
  467. # ■ Scene_Battle - Defines Tags Names
  468. #==============================================================================
  469. class Scene_Battle < Scene_Base
  470.   
  471.   #--------------------------------------------------------------------------
  472.   # new method: perform_actions_list
  473.   #--------------------------------------------------------------------------
  474.   def perform_actions_list(actions, targets)
  475.     #--- Create Formers ---
  476.     former_action = @action
  477.     former_values = (@action_values != nil) ? @action_values.clone : nil
  478.     former_targets = (@action_targets != nil) ? @action_targets.clone : nil
  479.     former_item = (@scene_item != nil) ? @scene_item.clone : nil
  480.     #--- Create Current ---
  481.     @action_targets = targets
  482.     actions.each { |action|
  483.       @action = action[0].upcase; @action_values = action[1]
  484.       @action_values.each { |s| s.upcase! if s.is_a?(String) } if @action_values
  485.       break unless SceneManager.scene_is?(Scene_Battle)
  486.       break if @subject && @subject.dead?
  487.       next unless action_condition_met
  488.       case @action.upcase
  489.       
  490.         when /ANIMATION[ ](\d+)|SKILL ANIMATION|ATTACK ANIMATION|ANIMATION/i
  491.           action_animation
  492.       
  493.         when /ATTACK EFFECT|SKILL EFFECT/i
  494.           action_skill_effect
  495.          
  496.         when /AUTO SYMPHONY|AUTOSYMPHONY/i
  497.           action_autosymphony
  498.          
  499.         when /ICON CREATE|CREATE ICON/i
  500.           action_create_icon
  501.          
  502.         when /ICON DELETE|DELETE ICON/i
  503.           action_delete_icon
  504.          
  505.         when "ICON", "ICON EFFECT"
  506.           action_icon_effect
  507.          
  508.         when /ICON THROW[ ](.*)/i
  509.           action_icon_throw
  510.          
  511.         when /IF[ ](.+)/i
  512.           action_condition
  513.          
  514.         when /JUMP[ ](.*)/i
  515.           action_move
  516.                     
  517.         when /MESSAGE/i
  518.           action_message
  519.          
  520.         when /MOVE[ ](.*)/i
  521.           action_move
  522.          
  523.         when /IMMORTAL/i
  524.           action_immortal
  525.          
  526.         when /POSE/i
  527.           action_pose
  528.          
  529.         when /STANCE/i
  530.           action_stance
  531.          
  532.         when /UNLESS[ ](.+)/i
  533.           action_condition
  534.          
  535.         when /TELEPORT[ ](.*)/i
  536.           action_move
  537.          
  538.         when "WAIT", "WAIT SKIP", "WAIT FOR ANIMATION", "WAIT FOR MOVE",
  539.           "WAIT FOR MOVEMENT", "ANI WAIT"
  540.           action_wait
  541.          
  542.         else
  543.           imported_symphony
  544.       end
  545.     }
  546.     #--- Release Formers ---
  547.     @action = former_action
  548.     @action_values = former_values
  549.     @action_targets = former_targets
  550.     @scene_item = former_item
  551.   end
  552.   
  553. end # Scene_Battle
  554. #==============================================================================
  555. # ■ Scene_Battle - Defines Tags Actions
  556. #==============================================================================
  557. class Scene_Battle < Scene_Base
  558.   
  559.   #--------------------------------------------------------------------------
  560.   # new method: action_condition_met
  561.   #--------------------------------------------------------------------------
  562.   def action_condition_met
  563.     target = @action_targets[0]
  564.     targets = @action_targets
  565.     user = @subject
  566.     skill = item = @scene_item
  567.     attack = false
  568.     if @counter_subject || (user.current_action && user.current_action.attack?)
  569.       attack = true
  570.     end
  571.     weapons = user.weapons if user.actor?
  572.     @action_condition ||= []
  573.     @action_condition.pop if @action.upcase == "END"
  574.     if @action_condition.size > 0
  575.       @action_condition.each { |action_condition|
  576.         action_condition =~ /(IF|UNLESS)[ ](.+)/i
  577.         condition_type = $1.upcase
  578.         condition_value = $2.downcase
  579.         #---
  580.         if condition_type == "IF"
  581.           return false unless eval(condition_value)
  582.         elsif condition_type == "UNLESS"
  583.           return false if eval(condition_value)
  584.         end
  585.       }
  586.     end
  587.     if @action_values
  588.       @action_values.each { |value|
  589.         case value
  590.         when /IF[ ](.*)/i
  591.           eval("return false unless " + $1.to_s.downcase)
  592.         when /UNLESS[ ](.*)/i
  593.           eval("return false if " + $1.to_s.downcase)
  594.         end
  595.       }
  596.     end
  597.     return true
  598.   end
  599.   
  600.   #--------------------------------------------------------------------------
  601.   # new method: get_action_mains
  602.   #--------------------------------------------------------------------------
  603.   def get_action_mains
  604.     result = []
  605.     case @action.upcase
  606.     when /(?:USER)/i
  607.       result.push(@subject) if @subject
  608.     when /(?:TARGET|TARGETS)/i
  609.       result = @action_targets
  610.     when /(?:COUNTER SUBJECT)/i
  611.       result = [@counter_subject]
  612.     when /(?:REFLECT SUBJECT)/i
  613.       result = [@reflect_subject]
  614.     when /(?:ACTORS|PARTY|ACTORS LIVING)/i
  615.       result = $game_party.alive_members
  616.     when /(?:ALL ACTORS|ACTORS ALL)/i
  617.       result = $game_party.battle_members
  618.     when /(?:ACTORS NOT USER|PARTY NOT USER)/i
  619.       result = $game_party.alive_members
  620.       result.delete(@subject) if @subject
  621.     when /(?:ENEMIES|TROOP|ENEMIES LIVING)/i
  622.       result = $game_troop.alive_members
  623.     when /(?:ALL ENEMIES|ENEMIES ALL)/i
  624.       result = $game_troop.battle_members
  625.     when /(?:ENEMIES NOT USER|ENEMIES NOT USER)/i
  626.       result = $game_troop.alive_members
  627.       result.delete(@subject) if @subject
  628.     when /ACTOR[ ](\d+)/i
  629.       result.push($game_party.battle_members[$1.to_i])
  630.     when /ENEMY[ ](\d+)/i
  631.       result.push($game_troop.battle_members[$1.to_i])
  632.     when /(?:EVERYTHING|EVERYBODY)/i
  633.       result = $game_party.alive_members + $game_troop.alive_members
  634.     when /(?:EVERYTHING NOT USER|EVERYBODY NOT USER)/i
  635.       result = $game_party.alive_members + $game_troop.alive_members
  636.       result.delete(@subject) if @subject
  637.     when /(?:ALLIES|FRIENDS)/i
  638.       result = @subject.friends_unit.alive_members if @subject
  639.     when /(?:OPPONENTS|RIVALS)/i
  640.       result = @subject.opponents_unit.alive_members if @subject
  641.     when /(?:FRIENDS NOT USER)/i
  642.       if @subject
  643.         result = @subject.friends_unit.alive_members
  644.         result.delete(@subject)
  645.       end
  646.     when /(?:FOCUS)/i
  647.       result = @action_targets
  648.       result.push(@subject) if @subject
  649.     when /(?:NOT FOCUS|NON FOCUS)/i
  650.       result = $game_party.alive_members + $game_troop.alive_members
  651.       result -= @action_targets
  652.       result.delete(@subject) if @subject
  653.     else;
  654.     end
  655.     return result.compact
  656.   end
  657.   
  658.   #--------------------------------------------------------------------------
  659.   # new method: get_action_targets
  660.   #--------------------------------------------------------------------------
  661.   def get_action_targets
  662.     result = []
  663.     @action_values.reverse.each { |value|
  664.       next if value.nil?
  665.       case value.upcase
  666.       when /(?:USER)/i
  667.         result.push(@subject) if @subject
  668.       when /(?:TARGET|TARGETS)/i
  669.         result = @action_targets
  670.       when /(?:COUNTER SUBJECT)/i
  671.         result = [@counter_subject]
  672.       when /(?:REFLECT SUBJECT)/i
  673.         result = [@reflect_subject]
  674.       when /(?:ACTORS|PARTY|ACTORS LIVING)/i
  675.         result = $game_party.alive_members
  676.       when /(?:ALL ACTORS|ACTORS ALL)/i
  677.         result = $game_party.battle_members
  678.       when /(?:ACTORS NOT USER|PARTY NOT USER)/i
  679.         result = $game_party.alive_members
  680.         result.delete(@subject) if @subject
  681.       when /(?:ENEMIES|TROOP|ENEMIES LIVING)/i
  682.         result = $game_troop.alive_members
  683.       when /(?:ALL ENEMIES|ENEMIES ALL)/i
  684.         result = $game_troop.battle_members
  685.       when /(?:ENEMIES NOT USER|ENEMIES NOT USER)/i
  686.         result = $game_troop.alive_members
  687.         result.delete(@subject) if @subject
  688.       when /ACTOR[ ](\d+)/i
  689.         result.push($game_party.battle_members[$1.to_i])
  690.       when /ENEMY[ ](\d+)/i
  691.         result.push($game_troop.battle_members[$1.to_i])
  692.       when /(?:EVERYTHING|EVERYBODY)/i
  693.         result = $game_party.alive_members + $game_troop.alive_members
  694.       when /(?:EVERYTHING NOT USER|EVERYBODY NOT USER)/i
  695.         result = $game_party.alive_members + $game_troop.alive_members
  696.         result.delete(@subject) if @subject
  697.       when /(?:ALLIES|FRIENDS)/i
  698.         result = @subject.friends_unit.alive_members if @subject
  699.       when /(?:OPPONENTS|RIVALS)/i
  700.         result = @subject.opponents_unit.alive_members if @subject
  701.       when /(?:FRIENDS NOT USER)/i
  702.         if @subject
  703.           result = @subject.friends_unit.alive_members
  704.           result.delete(@subject)
  705.         end
  706.       when /(?:NOT FOCUS|NON FOCUS)/i
  707.         result = $game_party.alive_members + $game_troop.alive_members
  708.         result -= @action_targets
  709.         result.delete(@subject)
  710.       when /(?:FOCUS)/i
  711.         result = @action_targets
  712.         result.push(@subject) if @subject
  713.       else;
  714.       end
  715.     }
  716.     return result.compact
  717.   end
  718.   
  719.   #--------------------------------------------------------------------------
  720.   # new method: action_animation
  721.   #--------------------------------------------------------------------------
  722.   def action_animation
  723.     targets = get_action_targets
  724.     targets = @action_targets if ["SKILL ANIMATION", "ATTACK ANIMATION"].include?(@action.upcase)
  725.     return if targets.size == 0
  726.     #---
  727.     case @action.upcase
  728.     when /ANIMATION[ ](\d+)/i
  729.       animation_id = [$1.to_i]
  730.     when "SKILL ANIMATION", "ANIMATION"
  731.       return unless @subject.current_action.item
  732.       animation_id = [@subject.current_action.item.animation_id]
  733.     when "ATTACK ANIMATION"
  734.       animation_id = [@subject.atk_animation_id1]
  735.       animation_id = [@subject.atk_animation_id2] if @subject.atk_animation_id2 > 0 && @action_values[1].to_i == 2
  736.     when "LAST ANIMATION"
  737.       animation_id = [@last_animation_id]
  738.     end
  739.     mirror = true if @action_values.include?("MIRROR")
  740.     #---
  741.     animation_id = [@subject.atk_animation_id1] if animation_id == [-1]
  742.     #---
  743.     ani_count = 0
  744.     animation_id.each { |id|
  745.       wait_for_animation if ani_count > 0
  746.       mirror = !mirror if ani_count > 0
  747.       animation = $data_animations[id]
  748.       #---
  749.       return unless animation
  750.       if animation.to_screen?; targets[0].animation_id = id; end
  751.       if !animation.to_screen?
  752.         targets.each {|target| target.animation_id = id}
  753.       end
  754.       targets.each {|target| target.animation_mirror = mirror}
  755.       ani_count += 1
  756.     }
  757.     @last_animation_id = animation_id[0]
  758.     return unless @action_values.include?("WAIT")
  759.     wait_for_animation
  760.   end
  761.   
  762.   #--------------------------------------------------------------------------
  763.   # new method: action_skill_effect
  764.   #--------------------------------------------------------------------------
  765.   def action_skill_effect
  766.     return unless @subject
  767.     return unless @subject.alive?
  768.     return unless @subject.current_action.item
  769.     targets = @action_targets.uniq
  770.     item = @subject.current_action.item
  771.     #---
  772.     if @action_values.include?("CLEAR")
  773.       targets.each { |target| target.result.set_calc; target.result.clear }
  774.       return
  775.     end
  776.     #---
  777.     if @action_values.include?("COUNTER CHECK")
  778.       targets.each { |target| target.result.set_counter }
  779.       return
  780.     elsif @action_values.include?("REFLECT CHECK")
  781.       targets.each { |target| target.result.set_reflection }
  782.       return
  783.     end
  784.     #---
  785.     array = []
  786.     array.push("calc") if @action_values.include?("CALC")
  787.     array = ["perfect"] if @action_values.include?("PERFECT")
  788.     @action_values.each {|value| array.push(value.downcase) unless ["PERFECT", "CALC"].include?(value)}
  789.     array = ["calc", "dmg", "effect"] if @action_values.include?("WHOLE") || @action_values.size == 0
  790.     #---
  791.     targets.each {|target|
  792.       target.result.clear_bes_flag
  793.       array.each {|value| str = "target.result.set_#{value}"; eval(str)}
  794.       item.repeats.times { invoke_item(target, item) }
  795.       target.result.clear_change_target
  796.     }
  797.   end
  798.   
  799.   #--------------------------------------------------------------------------
  800.   # new method: action_autosymphony
  801.   #--------------------------------------------------------------------------
  802.   def action_autosymphony
  803.     key = @action_values[0].to_s.upcase
  804.     return unless SYMPHONY::AUTO_SYMPHONY.include?(key)
  805.     actions_list = SYMPHONY::AUTO_SYMPHONY[key]
  806.     perform_actions_list(actions_list, @action_targets)
  807.   end
  808.   
  809.   #--------------------------------------------------------------------------
  810.   # new method: action_create_icon
  811.   #--------------------------------------------------------------------------
  812.   def action_create_icon
  813.     targets = get_action_targets
  814.     return if targets.size == 0
  815.     return if SYMPHONY::View::EMPTY_VIEW
  816.     #---
  817.     case @action_values[1]
  818.     when "WEAPON", "WEAPON1"
  819.       symbol = :weapon1
  820.       attachment = :hand1
  821.     when "WEAPON2"
  822.       symbol = :weapon2
  823.       attachment = :hand2
  824.     when "SHIELD"
  825.       symbol = :shield
  826.       attachment = :shield
  827.     when "ITEM"
  828.       symbol = :item
  829.       attachment = :middle
  830.     else
  831.       symbol = @action_values[1]
  832.       attachment = :middle
  833.     end
  834.     #---
  835.     case @action_values[2]
  836.     when "HAND", "HAND1"
  837.       attachment = :hand1
  838.     when "HAND2", "SHIELD"
  839.       attachment = :hand2
  840.     when "ITEM"
  841.       attachment = :item
  842.     when "MIDDLE", "BODY"
  843.       attachment = :middle
  844.     when "TOP", "HEAD"
  845.       attachment = :top
  846.     when "BOTTOM", "FEET", "BASE"
  847.       attachment = :base
  848.     end
  849.     #---
  850.     targets.each { |target|
  851.       next if target.sprite.nil?
  852.       next if !target.use_charset? && !SYMPHONY::Visual::WEAPON_ICON_NON_CHARSET && [:weapon1, :weapon2].include?(symbol)
  853.       target.create_icon(symbol, @action_values[3].to_i)
  854.       next if target.icons[symbol].nil?
  855.       target.icons[symbol].set_origin(attachment)
  856.     }
  857.   end
  858.   
  859.   #--------------------------------------------------------------------------
  860.   # new method: action_delete_icon
  861.   #--------------------------------------------------------------------------
  862.   def action_delete_icon
  863.     targets = get_action_targets
  864.     return if targets.size == 0
  865.     #---
  866.     case @action_values[1]
  867.     when "WEAPON", "WEAPON1"
  868.       symbol = :weapon1
  869.     when "WEAPON2"
  870.       symbol = :weapon2
  871.     when "SHIELD"
  872.       symbol = :shield
  873.     when "ITEM"
  874.       symbol = :item
  875.     else
  876.       symbol = @action_values[1]
  877.     end
  878.     #---
  879.     targets.each { |target| target.delete_icon(symbol) }
  880.   end
  881.   
  882.   #--------------------------------------------------------------------------
  883.   # new method: action_icon_effect
  884.   #--------------------------------------------------------------------------
  885.   def action_icon_effect
  886.     targets = get_action_targets
  887.     return if targets.size == 0
  888.     #---
  889.     case @action_values[1]
  890.     when "WEAPON", "WEAPON1"
  891.       symbol = :weapon1
  892.     when "WEAPON2"
  893.       symbol = :weapon2
  894.     when "SHIELD"
  895.       symbol = :shield
  896.     when "ITEM"
  897.       symbol = :item
  898.     else
  899.       symbol = @action_values[1]
  900.     end
  901.     #---
  902.     targets.each { |target|
  903.       icon = target.icons[symbol]
  904.       next if icon.nil?
  905.       total_frames = 8
  906.       case @action_values[2]
  907.       when "ANGLE"
  908.         angle = @action_values[3].to_i
  909.         icon.set_angle(angle)
  910.       when "ROTATE", "REROTATE"
  911.         angle = @action_values[3].to_i
  912.         angle = -angle if @action_values[2] == "REROTATE"
  913.         total_frames = @action_values[4].to_i
  914.         total_frames = 8 if total_frames == 0
  915.         icon.create_angle(angle, total_frames)
  916.       when /ANIMATION[ ](\d+)/i
  917.         animation = $1.to_i
  918.         if $data_animations[animation].nil?; return; end
  919.         total_frames = $data_animations[animation].frame_max
  920.         total_frames *= 4 unless $imported["YEA-CoreEngine"]
  921.         total_frames *= YEA::CORE::ANIMATION_RATE if $imported["YEA-CoreEngine"]
  922.         icon.start_animation($data_animations[animation])
  923.       when /MOVE_X[ ](\d+)/i
  924.         move_x = $1.to_i
  925.         total_frames = @action_values[3].to_i
  926.         total_frames = 8 if total_frames == 0
  927.         icon.create_movement(move_x, icon.y, total_frames)
  928.       when /MOVE_Y[ ](\d+)/i
  929.         move_y = $1.to_i
  930.         total_frames = @action_values[3].to_i
  931.         total_frames = 8 if total_frames == 0
  932.         icon.create_movement(icon.x, move_y, total_frames)
  933.       when /CUR_X[ ]([\-]?\d+)/i
  934.         move_x = icon.x + $1.to_i
  935.         total_frames = @action_values[3].to_i
  936.         total_frames = 8 if total_frames == 0
  937.         icon.create_movement(move_x, icon.y, total_frames)
  938.       when /CUR_Y[ ]([\-]?\d+)/i
  939.         move_y = icon.y + $1.to_i
  940.         total_frames = @action_values[3].to_i
  941.         total_frames = 8 if total_frames == 0
  942.         icon.create_movement(icon.x, move_y, total_frames)
  943.       when "FADE IN"
  944.         total_frames = @action_values[3].to_i
  945.         total_frames = 8 if total_frames == 0
  946.         rate = Integer(256.0/total_frames)
  947.         icon.set_fade(rate)
  948.       when "FADE OUT"
  949.         total_frames = @action_values[3].to_i
  950.         total_frames = 8 if total_frames == 0
  951.         rate = Integer(256.0/total_frames)
  952.         icon.set_fade(-rate)
  953.       when "FLOAT"
  954.         total_frames = @action_values[3].to_i
  955.         total_frames = 24 if total_frames == 0
  956.         icon.create_move_direction(8, total_frames, total_frames)
  957.       when "SWING"
  958.         total_frames = 10
  959.         icon.set_angle(0)
  960.         icon.create_angle(90, total_frames)
  961.       when "UPSWING"
  962.         total_frames = 10
  963.         icon.set_angle(90)
  964.         icon.create_angle(0, total_frames)
  965.       when "STAB", "THRUST"
  966.         total_frames = 8
  967.         direction = Direction.direction(target.pose)
  968.         direction = Direction.opposite(direction) if target.sprite.mirror
  969.         case direction
  970.         when 8
  971.           icon_direction = 8
  972.           icon.set_angle(-45)
  973.         when 4
  974.           icon_direction = 4
  975.           icon.set_angle(45)
  976.         when 6
  977.           icon_direction = 6
  978.           icon.set_angle(-135)
  979.         when 2
  980.           icon_direction = 2
  981.           icon.set_angle(135)
  982.         end
  983.         icon.create_move_direction(Direction.opposite(icon_direction), 40, 1)
  984.         icon.update
  985.         icon.create_move_direction(icon_direction, 32, total_frames)
  986.       when "CLAW"
  987.         total_frames = 8
  988.         direction = Direction.direction(target.pose)
  989.         direction = Direction.opposite(direction) if target.sprite.mirror
  990.         case direction
  991.         when 8
  992.           icon_direction = 7
  993.           back_direction = 3
  994.         when 4
  995.           icon_direction = 1
  996.           back_direction = 9
  997.         when 6
  998.           icon_direction = 3
  999.           back_direction = 7
  1000.         when 2
  1001.           icon_direction = 9
  1002.           back_direction = 1
  1003.         end
  1004.         icon.create_move_direction(back_direction, 32, 1)
  1005.         icon.update
  1006.         icon.create_move_direction(icon_direction, 52, total_frames)
  1007.       end
  1008.       #---
  1009.       if @action_values.include?("WAIT")
  1010.         update_basic while icon.effecting?
  1011.       end
  1012.     }
  1013.   end
  1014.   
  1015.   #--------------------------------------------------------------------------
  1016.   # new method: action_icon_throw
  1017.   #--------------------------------------------------------------------------
  1018.   def action_icon_throw
  1019.     mains = get_action_mains
  1020.     targets = get_action_targets
  1021.     return if mains.size == 0
  1022.     #---
  1023.     case @action_values[1]
  1024.     when "WEAPON", "WEAPON1"
  1025.       symbol = :weapon1
  1026.     when "WEAPON2"
  1027.       symbol = :weapon2
  1028.     when "SHIELD"
  1029.       symbol = :shield
  1030.     when "ITEM"
  1031.       symbol = :item
  1032.     else
  1033.       symbol = @action_values[1]
  1034.     end
  1035.     #---
  1036.     mains.each { |main|
  1037.       icon = main.icons[symbol]
  1038.       next if icon.nil?
  1039.       total_frames = @action_values[3].to_i
  1040.       total_frames = 12 if total_frames <= 0
  1041.       arc = @action_values[2].to_f
  1042.       #---
  1043.       targets.each { |target|
  1044.         move_x = target.screen_x
  1045.         move_y = target.screen_y - target.sprite.height / 2
  1046.         icon.create_movement(move_x, move_y, total_frames)
  1047.         icon.create_arc(arc)
  1048.         if @action_values.include?("WAIT")
  1049.           update_basic while icon.effecting?
  1050.         end
  1051.       }
  1052.     }
  1053.   end
  1054.   
  1055.   #--------------------------------------------------------------------------
  1056.   # new method: action_condition
  1057.   #--------------------------------------------------------------------------
  1058.   def action_condition
  1059.     @action_condition ||= []
  1060.     @action_condition.push(@action.dup)
  1061.   end
  1062.   
  1063.   #--------------------------------------------------------------------------
  1064.   # new method: action_message
  1065.   #--------------------------------------------------------------------------
  1066.   def action_message
  1067.     user = @subject
  1068.     return unless user
  1069.     item = @subject.current_action.item
  1070.     return unless item
  1071.     @log_window.display_use_item(@subject, item)
  1072.   end
  1073.   
  1074.   #--------------------------------------------------------------------------
  1075.   # new method: action_move
  1076.   #--------------------------------------------------------------------------
  1077.   def action_move
  1078.     movers = get_action_mains
  1079.     return unless movers.size > 0
  1080.     return if SYMPHONY::View::EMPTY_VIEW
  1081.     #--- Get Location ---
  1082.     case @action_values[0]
  1083.     #---
  1084.     when "FORWARD", "BACKWARD"
  1085.       distance = @action_values[1].to_i
  1086.       distance = @action_values[0] == "FORWARD" ? 16 : 8 if distance <= 0
  1087.       frames = @action_values[2].to_i
  1088.       frames = 8 if frames <= 0
  1089.       movers.each { |mover|
  1090.         next unless mover.exist?
  1091.         direction = mover.direction
  1092.         destination_x = mover.screen_x
  1093.         destination_y = mover.screen_y
  1094.         case direction
  1095.         when 1; move_x = distance / -2; move_y = distance /  2
  1096.         when 2; move_x = distance *  0; move_y = distance *  1
  1097.         when 3; move_x = distance / -2; move_y = distance /  2
  1098.         when 4; move_x = distance * -1; move_y = distance *  0
  1099.         when 6; move_x = distance *  1; move_y = distance *  0
  1100.         when 7; move_x = distance / -2; move_y = distance / -2
  1101.         when 8; move_x = distance *  0; move_y = distance * -1
  1102.         when 9; move_x = distance /  2; move_y = distance / -2
  1103.         else; return
  1104.         end
  1105.         destination_x += @action_values[0] == "FORWARD" ? move_x : - move_x
  1106.         destination_y += @action_values[0] == "FORWARD" ? move_y : - move_y
  1107.         mover.face_coordinate(destination_x, destination_y) unless @action_values[0] == "BACKWARD"
  1108.         mover.create_movement(destination_x, destination_y, frames)
  1109.         case @action.upcase
  1110.         when /JUMP[ ](.*)/i
  1111.           arc_scan = $1.scan(/(?:ARC)[ ](\d+)/i)
  1112.           arc = $1.to_i
  1113.           mover.create_jump(arc)
  1114.         end
  1115.       }
  1116.     #---
  1117.     when "ORIGIN", "RETURN"
  1118.       frames = @action_values[1].to_i
  1119.       frames = 20 if frames <= 0
  1120.       movers.each { |mover|
  1121.         next unless mover.exist?
  1122.         destination_x = mover.origin_x
  1123.         destination_y = mover.origin_y
  1124.         next if destination_x == mover.screen_x && destination_y == mover.screen_y
  1125.         if @action_values[0] == "ORIGIN"
  1126.           mover.face_coordinate(destination_x, destination_y)
  1127.         end
  1128.         mover.create_movement(destination_x, destination_y, frames)
  1129.         case @action.upcase
  1130.         when /JUMP[ ](.*)/i
  1131.           arc_scan = $1.scan(/(?:ARC)[ ](\d+)/i)
  1132.           arc = $1.to_i
  1133.           mover.create_jump(arc)
  1134.         end
  1135.       }
  1136.     #---
  1137.     when "TARGET", "TARGETS", "USER"
  1138.       frames = @action_values[2].to_i
  1139.       frames = 20 if frames <= 0
  1140.       #---
  1141.       case @action_values[0]
  1142.       when "USER"
  1143.         targets = [@subject]
  1144.       when "TARGET", "TARGETS"
  1145.         targets = @action_targets
  1146.       end
  1147.       #---
  1148.       destination_x = destination_y = 0
  1149.       case @action_values[1]
  1150.       when "BASE", "FOOT", "FEET"
  1151.         targets.each { |target|
  1152.           destination_x += target.screen_x; destination_y += target.screen_y
  1153.           side_l = target.screen_x - target.sprite.width/2
  1154.           side_r = target.screen_x + target.sprite.width/2
  1155.           side_u = target.screen_y - target.sprite.height
  1156.           side_d = target.screen_y
  1157.           movers.each { |mover|
  1158.             next unless mover.exist?
  1159.             if side_l > mover.origin_x
  1160.               destination_x -= target.sprite.width/2
  1161.               destination_x -= mover.sprite.width/2
  1162.             elsif side_r < mover.origin_x
  1163.               destination_x += target.sprite.width/2
  1164.               destination_x += mover.sprite.width/2
  1165.             elsif side_u > mover.origin_y - mover.sprite.height
  1166.               destination_y -= target.sprite.height
  1167.             elsif side_d < mover.origin_y - mover.sprite.height
  1168.               destination_y += mover.sprite.height
  1169.             end
  1170.           }
  1171.         }
  1172.       #---
  1173.       when "BODY", "MIDDLE", "MID"
  1174.         targets.each { |target|
  1175.           destination_x += target.screen_x
  1176.           destination_y += target.screen_y - target.sprite.height / 2
  1177.           side_l = target.screen_x - target.sprite.width/2
  1178.           side_r = target.screen_x + target.sprite.width/2
  1179.           side_u = target.screen_y - target.sprite.height
  1180.           side_d = target.screen_y
  1181.           movers.each { |mover|
  1182.             next unless mover.exist?
  1183.             if side_l > mover.origin_x
  1184.               destination_x -= target.sprite.width/2
  1185.               destination_x -= mover.sprite.width/2
  1186.             elsif side_r < mover.origin_x
  1187.               destination_x += target.sprite.width/2
  1188.               destination_x += mover.sprite.width/2
  1189.             elsif side_u > mover.origin_y - mover.sprite.height
  1190.               destination_y -= target.sprite.height
  1191.             elsif side_d < mover.origin_y - mover.sprite.height
  1192.               destination_y += mover.sprite.height
  1193.             end
  1194.             destination_y += mover.sprite.height
  1195.             destination_y -= mover.sprite.height/2
  1196.             if $imported["BattleSymphony-8D"] && $imported["BattleSymphony-HB"]
  1197.               destination_y += mover.sprite.height if mover.use_8d? && target.use_hb?
  1198.               destination_y -= mover.sprite.height/4 if mover.use_hb? && target.use_8d?
  1199.             end
  1200.           }
  1201.         }
  1202.       #---此處更改敵方與我方戰鬥時肢體接觸的距離
  1203.       when "CENTER2"
  1204.         targets.each { |target|
  1205.           destination_x += target.screen_x * 1.1
  1206.           destination_y += target.screen_y - target.sprite.height / 2
  1207.           side_l = target.screen_x - target.sprite.width / 2
  1208.           side_r = target.screen_x + target.sprite.width / 2
  1209.           side_u = target.screen_y - target.sprite.height
  1210.           side_d = target.screen_y
  1211.           movers.each { |mover|
  1212.             next unless mover.exist?
  1213.             if side_l > mover.origin_x #--敵人對我方進行攻擊
  1214.               destination_x -= target.sprite.width/2.5
  1215.               destination_x -= mover.sprite.width/2.5
  1216.             elsif side_r < mover.origin_x #--我方對敵人進行攻擊
  1217.               destination_x += target.sprite.width/3.7 - 15
  1218.               destination_x += mover.sprite.width/3.7 - 15
  1219.             elsif side_u > mover.origin_y - mover.sprite.height
  1220.               destination_y -= target.sprite.height
  1221.             elsif side_d < mover.origin_y - mover.sprite.height
  1222.               destination_y += mover.sprite.height
  1223.             end
  1224.             destination_y += mover.sprite.height
  1225.             destination_y -= mover.sprite.height/2
  1226.             if $imported["BattleSymphony-8D"] && $imported["BattleSymphony-HB"]
  1227.               destination_y += mover.sprite.height if mover.use_8d? && target.use_hb?
  1228.               destination_y -= mover.sprite.height/4 if mover.use_hb? && target.use_8d?
  1229.             end
  1230.           }
  1231.         }
  1232.       #---
  1233.       when "CENTER"
  1234.         targets.each { |target|
  1235.           destination_x += target.screen_x
  1236.           destination_y += target.screen_y - target.sprite.height/2
  1237.         }
  1238.       #---
  1239.       when "HEAD", "TOP"
  1240.         targets.each { |target|
  1241.           destination_x += target.screen_x
  1242.           destination_y += target.screen_y - target.sprite.height
  1243.           side_l = target.screen_x - target.sprite.width/2
  1244.           side_r = target.screen_x + target.sprite.width/2
  1245.           side_u = target.screen_y - target.sprite.height
  1246.           side_d = target.screen_y
  1247.           movers.each { |mover|
  1248.             next unless mover.exist?
  1249.             if side_l > mover.origin_x
  1250.               destination_x -= target.sprite.width/2
  1251.               destination_x -= mover.sprite.width/2
  1252.             elsif side_r < mover.origin_x
  1253.               destination_x += target.sprite.width/2
  1254.               destination_x += mover.sprite.width/2
  1255.             elsif side_u > mover.origin_y - mover.sprite.height
  1256.               destination_y -= target.sprite.height
  1257.             elsif side_d < mover.origin_y - mover.sprite.height
  1258.               destination_y += mover.sprite.height
  1259.             end
  1260.             destination_y += mover.sprite.height
  1261.             destination_y -= mover.sprite.height/2
  1262.             if $imported["BattleSymphony-8D"] && $imported["BattleSymphony-HB"]
  1263.               destination_y += mover.sprite.height if mover.use_8d? && target.use_hb?
  1264.               destination_y -= mover.sprite.height/4 if mover.use_hb? && target.use_8d?
  1265.             end
  1266.           }
  1267.         }
  1268.       #---
  1269.       when "BACK"
  1270.         targets.each { |target|
  1271.           destination_x += target.screen_x
  1272.           destination_y += target.screen_y - target.sprite.height
  1273.           side_l = target.screen_x - target.sprite.width/2
  1274.           side_r = target.screen_x + target.sprite.width/2
  1275.           side_u = target.screen_y - target.sprite.height
  1276.           side_d = target.screen_y
  1277.           movers.each { |mover|
  1278.             next unless mover.exist?
  1279.             if side_l > mover.origin_x
  1280.               destination_x += target.sprite.width/2
  1281.               destination_x += mover.sprite.width/2
  1282.             elsif side_r < mover.origin_x
  1283.               destination_x -= target.sprite.width/2
  1284.               destination_x -= mover.sprite.width/2
  1285.             elsif side_u > mover.origin_y - mover.sprite.height
  1286.               destination_y -= target.sprite.height
  1287.             elsif side_d < mover.origin_y - mover.sprite.height
  1288.               destination_y += mover.sprite.height
  1289.             end
  1290.             destination_y += mover.sprite.height
  1291.             destination_y -= mover.sprite.height/2
  1292.             if $imported["BattleSymphony-8D"] && $imported["BattleSymphony-HB"]
  1293.               destination_y += mover.sprite.height if mover.use_8d? && target.use_hb?
  1294.               destination_y -= mover.sprite.height/4 if mover.use_hb? && target.use_8d?
  1295.             end
  1296.           }
  1297.         }
  1298.       #---
  1299.       else
  1300.         targets.each { |target|
  1301.           destination_x += target.screen_x
  1302.           destination_y += target.screen_y
  1303.         }
  1304.       end
  1305.       #---
  1306.       destination_x /= targets.size
  1307.       destination_y /= targets.size
  1308.       movers.each { |mover|
  1309.         next unless mover.exist?
  1310.         next if mover.screen_x == destination_x && mover.screen_y == destination_y
  1311.         case @action.upcase
  1312.         when /MOVE[ ](.*)/i
  1313.           mover.face_coordinate(destination_x, destination_y)
  1314.           mover.create_movement(destination_x, destination_y, frames)
  1315.         when /TELEPORT[ ](.*)/i
  1316.           mover.screen_x = destination_x
  1317.           mover.screen_y = destination_y
  1318.         when /JUMP[ ](.*)/i
  1319.           arc_scan = $1.scan(/(?:ARC)[ ](\d+)/i)
  1320.           arc = $1.to_i
  1321.           mover.face_coordinate(destination_x, destination_y)
  1322.           mover.create_movement(destination_x, destination_y, frames)
  1323.           mover.create_jump(arc)
  1324.         end
  1325.       }
  1326.     #---
  1327.     end
  1328.     #---
  1329.     return unless @action_values.include?("WAIT")
  1330.     wait_for_move
  1331.   end
  1332.   
  1333.   #--------------------------------------------------------------------------
  1334.   # new method: action_immortal
  1335.   #--------------------------------------------------------------------------
  1336.   def action_immortal
  1337.     targets = get_action_targets
  1338.     return unless targets.size > 0
  1339.     targets.each { |target|
  1340.       next unless target.alive?
  1341.       case @action_values[1].upcase
  1342.       when "TRUE", "ON", "ENABLE"
  1343.         target.immortal = true
  1344.       when "OFF", "FALSE", "DISABLE"
  1345.         target.immortal = false
  1346.         target.refresh
  1347.         perform_collapse_check(target)
  1348.       end
  1349.     }
  1350.   end
  1351.   
  1352.   #--------------------------------------------------------------------------
  1353.   # new method: action_pose
  1354.   #--------------------------------------------------------------------------
  1355.   def action_pose
  1356.     targets = get_action_targets
  1357.     return unless targets.size > 0
  1358.     #---
  1359.     case @action_values[1]
  1360.     when "BREAK", "CANCEL", "RESET", "NORMAL"
  1361.       targets.each { |target| target.break_pose }
  1362.       return
  1363.     when "IDLE", "READY"
  1364.       pose_key = :ready
  1365.     when "DAMAGE", "DMG"
  1366.       pose_key = :damage
  1367.     when "PIYORI", "CRITICAL", "DAZED", "DAZE", "DIZZY"
  1368.       pose_key = :critical
  1369.     when "MARCH", "FORWARD"
  1370.       pose_key = :marching
  1371.     when "VICTORY", "POSE"
  1372.       pose_key = :victory
  1373.     when "EVADE", "DODGE"
  1374.       pose_key = :dodge
  1375.     when "DOWN", "DOWNED", "FALLEN"
  1376.       pose_key = :fallen
  1377.     when "2H", "2H SWING"
  1378.       pose_key = :swing2h
  1379.     when "1H", "1H SWING"
  1380.       pose_key = :swing1h
  1381.     when "2H REVERSE", "2H SWING REVERSE"
  1382.       pose_key = :r2hswing
  1383.       reverse_pose = true
  1384.     when "1H REVERSE", "1H SWING REVERSE"
  1385.       pose_key = :r1hswing
  1386.       reverse_pose = true
  1387.     when "CAST", "INVOKE", "ITEM", "MAGIC"
  1388.       pose_key = :cast
  1389.     when "CHANT", "CHANNEL", "CHARGE"
  1390.       pose_key = :channeling
  1391.     else; return
  1392.     end
  1393.     #---
  1394.     return unless $imported["BattleSymphony-8D"]
  1395.     #---
  1396.     targets.each { |target|
  1397.       next unless target.exist?
  1398.       next unless target.use_8d?
  1399.       target.pose = pose_key
  1400.       target.force_pose = true
  1401.       target.reverse_pose = reverse_pose
  1402.     }
  1403.   end
  1404.   
  1405.   #--------------------------------------------------------------------------
  1406.   # new method: action_stance
  1407.   #--------------------------------------------------------------------------
  1408.   def action_stance
  1409.     targets = get_action_targets
  1410.     return unless targets.size > 0
  1411.     #---
  1412.     case @action_values[1]
  1413.     when "BREAK", "CANCEL", "RESET", "NORMAL"
  1414.       targets.each { |target| target.break_pose }
  1415.       return
  1416.     when "IDLE", "READY"
  1417.       pose_key = :idle
  1418.     when "DAMAGE", "DMG", "STRUCK"
  1419.       pose_key = :struck
  1420.     when "PIYORI", "CRITICAL", "DAZED", "DAZE", "DIZZY", "WOOZY"
  1421.       pose_key = :woozy
  1422.     when "VICTORY"
  1423.       pose_key = :victory
  1424.     when "EVADE", "DODGE", "DEFEND"
  1425.       pose_key = :defend
  1426.     when "DOWN", "DOWNED", "FALLEN", "DEAD"
  1427.       pose_key = :dead
  1428.     when "SWING", "ATTACK", "SLASH"
  1429.       pose_key = :attack
  1430.     when "CAST", "INVOKE", "MAGIC"
  1431.       pose_key = :magic
  1432.     when "ITEM"
  1433.       pose_key = :item
  1434.     when "SKILL", "PHYSICAL"
  1435.       pose_key = :skill
  1436.     when "FORWARD", "MOVE", "TARGET"
  1437.       pose_key = :advance
  1438.     when "ORIGIN", "BACK", "RETREAT"
  1439.       pose_key = :retreat
  1440.     else; return
  1441.     end
  1442.     #---
  1443.     return unless $imported["BattleSymphony-HB"]
  1444.     #---
  1445.     targets.each { |target|
  1446.       next unless target.exist?
  1447.       next unless target.use_hb?
  1448.       target.pose = pose_key
  1449.       target.force_pose = true
  1450.     }
  1451.   end
  1452.   
  1453.   #--------------------------------------------------------------------------
  1454.   # action_wait
  1455.   #--------------------------------------------------------------------------
  1456.   def action_wait
  1457.     case @action
  1458.     when "WAIT FOR ANIMATION"
  1459.       wait_for_animation
  1460.       return
  1461.     when "WAIT FOR MOVE", "WAIT FOR MOVEMENT"
  1462.       wait_for_move
  1463.       return
  1464.     end
  1465.     frames = @action_values[0].to_i
  1466.     frames *= $imported["YEA-CoreEngine"] ? YEA::CORE::ANIMATION_RATE : 4 if @action == "ANI WAIT"
  1467.     skip = @action_values.include?("SKIP")
  1468.     skip = true if @action == "WAIT SKIP"
  1469.     skip ? wait(frames) : abs_wait(frames)
  1470.   end
  1471.   
  1472. end # Scene_Battle

  1473. #==============================================================================
  1474. # Section V. Imports Symphony Tags (S-05)
  1475. # -----------------------------------------------------------------------------
  1476. # This section is the field for You to create your own Symphony Tags. Please
  1477. # read carefully the Tutorial at Creating Symphony Tags before touching this.
  1478. #==============================================================================
  1479. #==============================================================================
  1480. # ■ Scene_Battle - Imported Symphony Configuration
  1481. #==============================================================================
  1482. class Scene_Battle < Scene_Base

  1483.   #--------------------------------------------------------------------------
  1484.   # new method: imported_symphony
  1485.   #--------------------------------------------------------------------------
  1486.   def imported_symphony
  1487.     case @action.upcase
  1488.       
  1489.       #--- Start Importing ---
  1490.       
  1491.       #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  1492.       # sample symphony
  1493.       # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  1494.       # This is the most basic sample, it will put a line which contains
  1495.       # action name and action values in Console.
  1496.       #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  1497.       when /SAMPLE SYMPHONY/i
  1498.         action_sample_symphony
  1499.       
  1500.       #--- End Importing ---
  1501.       else
  1502.         if SYMPHONY::AUTO_SYMPHONY.include?(@action.upcase)
  1503.           @action_values = [@action.upcase]
  1504.           @action = "AUTO SYMPHONY"
  1505.           action_autosymphony
  1506.         end
  1507.     end
  1508.   end

  1509. end # Scene_Battle
  1510. #==============================================================================
  1511. # ■ Scene_Battle - Imported Symphony Actions
  1512. #==============================================================================
  1513. class Scene_Battle < Scene_Base
  1514.   
  1515.   #--------------------------------------------------------------------------
  1516.   # new method: action_sample_symphony
  1517.   #--------------------------------------------------------------------------
  1518.   def action_sample_symphony
  1519.     str = "#{@action.upcase}: "
  1520.     @action_values.each {|value| str += "#{value} "}
  1521.     puts str
  1522.   end
  1523.   
  1524. end # Scene_Battle

  1525. #==============================================================================
  1526. # Section VI. Sprites Initialization (S-06)
  1527. # -----------------------------------------------------------------------------
  1528. # This section is the first section of core script. It will Initializes and
  1529. # Creates Sprites for all Battlers and Maintains them.
  1530. # -----------------------------------------------------------------------------
  1531. # Do not touch below script unless You know what You do and How it works.
  1532. #==============================================================================
  1533. #==============================================================================
  1534. # ■ Game_Battler
  1535. #==============================================================================

  1536. class Game_Battler < Game_BattlerBase
  1537.   
  1538.   #--------------------------------------------------------------------------
  1539.   # * Public Instance Variables
  1540.   #--------------------------------------------------------------------------
  1541.   attr_accessor :origin_x
  1542.   attr_accessor :origin_y
  1543.   attr_accessor :screen_x
  1544.   attr_accessor :screen_y
  1545.   attr_accessor :pose
  1546.   attr_accessor :immortal
  1547.   attr_accessor :icons
  1548.   attr_accessor :direction
  1549.   attr_accessor :force_pose
  1550.   attr_accessor :reverse_pose
  1551.   
  1552.   #--------------------------------------------------------------------------
  1553.   # alias method: initialize
  1554.   #--------------------------------------------------------------------------
  1555.   alias bes_initialize initialize
  1556.   def initialize
  1557.     bes_initialize
  1558.     @screen_x = 0
  1559.     @screen_y = 0
  1560.     #---
  1561.     @move_x_rate = 0
  1562.     @move_y_rate = 0
  1563.     #---
  1564.     @immortal = false
  1565.     #---
  1566.     @icons = {}
  1567.     @force_pose = false
  1568.     @reverse_pose = false
  1569.     #---
  1570.     @hp = 1 # Fix Change Party in Battle.
  1571.     #---
  1572.     @arc = 0
  1573.     @parabola = {}
  1574.     @f = 0
  1575.     @arc_y = 0
  1576.   end
  1577.   
  1578.   #--------------------------------------------------------------------------
  1579.   # new method: use_charset?
  1580.   #--------------------------------------------------------------------------
  1581.   def use_charset?
  1582.     return false
  1583.   end  
  1584.   
  1585.   #--------------------------------------------------------------------------
  1586.   # new method: emptyview?
  1587.   #--------------------------------------------------------------------------
  1588.   def emptyview?
  1589.     return SYMPHONY::View::EMPTY_VIEW
  1590.   end
  1591.   
  1592.   #--------------------------------------------------------------------------
  1593.   # new method: battler
  1594.   #--------------------------------------------------------------------------
  1595.   def battler
  1596.     self.actor? ? self.actor : self.enemy
  1597.   end
  1598.   
  1599.   #--------------------------------------------------------------------------
  1600.   # new method: use_custom_charset?
  1601.   #--------------------------------------------------------------------------
  1602.   def use_custom_charset?
  1603.     if $imported["BattleSymphony-8D"]; return true if use_8d?; end
  1604.     if $imported["BattleSymphony-HB"]; return true if use_hb?; end
  1605.     return false
  1606.   end
  1607.   
  1608.   #--------------------------------------------------------------------------
  1609.   # new method: screen_z
  1610.   #--------------------------------------------------------------------------
  1611.   def screen_z
  1612.     return 100
  1613.   end
  1614.   
  1615.   #--------------------------------------------------------------------------
  1616.   # alias method: on_battle_start
  1617.   #--------------------------------------------------------------------------
  1618.   alias bes_on_battle_start on_battle_start
  1619.   def on_battle_start
  1620.     reset_position
  1621.     #---
  1622.     bes_on_battle_start
  1623.     #---
  1624.     return if self.actor? && !$game_party.battle_members.include?(self)
  1625.     set_default_position
  1626.   end
  1627.   
  1628.   #--------------------------------------------------------------------------
  1629.   # new method: set_default_position
  1630.   #--------------------------------------------------------------------------
  1631.   def set_default_position
  1632.     @move_rate_x = 0
  1633.     @move_rate_y = 0
  1634.     #---
  1635.     @destination_x = self.screen_x
  1636.     @destination_y = self.screen_y
  1637.   end
  1638.   
  1639.   #--------------------------------------------------------------------------
  1640.   # new method: correct_origin_position
  1641.   #--------------------------------------------------------------------------
  1642.   def correct_origin_position
  1643.     # Compatible
  1644.   end
  1645.   
  1646.   #--------------------------------------------------------------------------
  1647.   # new method: reset_position
  1648.   #--------------------------------------------------------------------------
  1649.   def reset_position
  1650.     break_pose
  1651.   end
  1652.   
  1653.   #--------------------------------------------------------------------------
  1654.   # new method: break_pose
  1655.   #--------------------------------------------------------------------------
  1656.   def break_pose
  1657.     @direction = SYMPHONY::View::PARTY_DIRECTION
  1658.     @direction = Direction.opposite(@direction) if self.enemy?
  1659.     #---
  1660.     @pose = Direction.pose(@direction)
  1661.     #---
  1662.     @force_pose = false
  1663.     @reverse_pose = false
  1664.   end
  1665.   
  1666.   #--------------------------------------------------------------------------
  1667.   # new method: pose=
  1668.   #--------------------------------------------------------------------------
  1669.   def pose=(pose)
  1670.     @pose = pose
  1671.     return if self.actor? && !$game_party.battle_members.include?(self)
  1672.     self.sprite.correct_change_pose if SceneManager.scene.spriteset
  1673.   end
  1674.   
  1675.   #--------------------------------------------------------------------------
  1676.   # new method: can_collapse?
  1677.   #--------------------------------------------------------------------------
  1678.   def can_collapse?
  1679.     return false unless dead?
  1680.     unless actor?
  1681.       return false unless sprite.battler_visible
  1682.       array = [:collapse, :boss_collapse, :instant_collapse]
  1683.       return false if array.include?(sprite.effect_type)
  1684.     end
  1685.     return true
  1686.   end
  1687.   
  1688.   #--------------------------------------------------------------------------
  1689.   # new method: weapons
  1690.   #--------------------------------------------------------------------------
  1691.   def weapons
  1692.     return []
  1693.   end
  1694.   
  1695.   #--------------------------------------------------------------------------
  1696.   # new method: equips
  1697.   #--------------------------------------------------------------------------
  1698.   def equips
  1699.     return []
  1700.   end
  1701.   
  1702.   #--------------------------------------------------------------------------
  1703.   # alias method: add_state
  1704.   #--------------------------------------------------------------------------
  1705.   alias bes_add_state add_state
  1706.   def add_state(state_id)
  1707.     bes_add_state(state_id)
  1708.     #--- Fix Death pose ---
  1709.     return unless SceneManager.scene_is?(Scene_Battle)
  1710.     break_pose if state_id == death_state_id
  1711.   end
  1712.   
  1713. end # Game_Battler

  1714. #==============================================================================
  1715. # ■ Game_Actor
  1716. #==============================================================================

  1717. class Game_Actor < Game_Battler
  1718.   
  1719.   #--------------------------------------------------------------------------
  1720.   # overwrite method: use_sprite?
  1721.   #--------------------------------------------------------------------------
  1722.   def use_sprite?
  1723.     return true
  1724.   end
  1725.   
  1726.   #--------------------------------------------------------------------------
  1727.   # new method: use_charset?
  1728.   #--------------------------------------------------------------------------
  1729.   def use_charset?
  1730.     return true
  1731.   end
  1732.   
  1733.   #--------------------------------------------------------------------------
  1734.   # new method: set_default_position
  1735.   #--------------------------------------------------------------------------
  1736.   def set_default_position
  1737.     super
  1738.     return if @origin_x && @origin_y
  1739.     return unless $game_party.battle_members.include?(self)
  1740.     @origin_x = @screen_x = @destination_x = SYMPHONY::View::ACTORS_POSITION[index][0]
  1741.     @origin_y = @screen_y = @destination_y = SYMPHONY::View::ACTORS_POSITION[index][1]
  1742.     return unless emptyview?
  1743.     @origin_x = @screen_x = @destination_x = self.screen_x
  1744.     @origin_y = @screen_y = @destination_y = self.screen_y
  1745.   end
  1746.   
  1747.   #--------------------------------------------------------------------------
  1748.   # new method: reset_position
  1749.   #--------------------------------------------------------------------------
  1750.   def reset_position
  1751.     super
  1752.     @origin_x = @origin_y = nil
  1753.   end
  1754.   
  1755.   #--------------------------------------------------------------------------
  1756.   # alias method: screen_x
  1757.   #--------------------------------------------------------------------------
  1758.   alias bes_screen_x screen_x
  1759.   def screen_x
  1760.     emptyview? ? bes_screen_x : @screen_x
  1761.   end
  1762.   
  1763.   #--------------------------------------------------------------------------
  1764.   # alias method: screen_y
  1765.   #--------------------------------------------------------------------------
  1766.   alias bes_screen_y screen_y
  1767.   def screen_y
  1768.     emptyview? ? bes_screen_y : @screen_y
  1769.   end
  1770.   
  1771.   #--------------------------------------------------------------------------
  1772.   # new method: correct_origin_position
  1773.   #--------------------------------------------------------------------------
  1774.   def correct_origin_position
  1775.     return if @origin_x && @origin_y
  1776.     @origin_x = @screen_x = SYMPHONY::View::ACTORS_POSITION[index][0]
  1777.     @origin_y = @screen_y = SYMPHONY::View::ACTORS_POSITION[index][1]
  1778.     return unless emptyview?
  1779.     @origin_x = @screen_x = @destination_x = self.screen_x
  1780.     @origin_y = @screen_y = @destination_y = self.screen_y
  1781.   end
  1782.   
  1783.   #--------------------------------------------------------------------------
  1784.   # new method: sprite
  1785.   #--------------------------------------------------------------------------
  1786.   def sprite
  1787.     index = $game_party.battle_members.index(self)
  1788.     return nil unless index
  1789.     return nil unless SceneManager.scene_is?(Scene_Battle)
  1790.     return SceneManager.scene.spriteset.actor_sprites[index]
  1791.   end
  1792.   
  1793.   #--------------------------------------------------------------------------
  1794.   # overwrite method: perform_collapse_effect
  1795.   #--------------------------------------------------------------------------
  1796.   def perform_collapse_effect
  1797.     if $game_party.in_battle
  1798.       @sprite_effect_type = :collapse unless self.use_custom_charset?
  1799.       Sound.play_actor_collapse
  1800.     end
  1801.   end
  1802.    
  1803. end # Game_Actor

  1804. #==============================================================================
  1805. # ■ Game_Enemy
  1806. #==============================================================================

  1807. class Game_Enemy < Game_Battler
  1808.   
  1809.   #--------------------------------------------------------------------------
  1810.   # new method: correct_origin_position
  1811.   #--------------------------------------------------------------------------
  1812.   def correct_origin_position
  1813.     @origin_x ||= @screen_x
  1814.     @origin_y ||= @screen_y
  1815.   end
  1816.   
  1817.   #--------------------------------------------------------------------------
  1818.   # new method: use_charset?
  1819.   #--------------------------------------------------------------------------
  1820.   def use_charset?
  1821.     return super
  1822.   end  
  1823.   
  1824.   #--------------------------------------------------------------------------
  1825.   # new method: sprite
  1826.   #--------------------------------------------------------------------------
  1827.   def sprite
  1828.     return nil unless SceneManager.scene_is?(Scene_Battle)
  1829.     return SceneManager.scene.spriteset.enemy_sprites.reverse[self.index]
  1830.   end
  1831.   
  1832.   #--------------------------------------------------------------------------
  1833.   # new method: atk_animation_id1
  1834.   #--------------------------------------------------------------------------
  1835.   def atk_animation_id1
  1836.     return enemy.atk_animation_id1
  1837.   end
  1838.   
  1839.   #--------------------------------------------------------------------------
  1840.   # new method: atk_animation_id2
  1841.   #--------------------------------------------------------------------------
  1842.   def atk_animation_id2
  1843.     return enemy.atk_animation_id2
  1844.   end
  1845.   
  1846. end # Game_Enemy

  1847. #==============================================================================
  1848. # ■ Sprite_Battler
  1849. #==============================================================================

  1850. class Sprite_Battler < Sprite_Base
  1851.   
  1852.   #--------------------------------------------------------------------------
  1853.   # * Public Instance Variables
  1854.   #--------------------------------------------------------------------------
  1855.   attr_accessor :effect_type
  1856.   attr_accessor :battler_visible
  1857.   
  1858.   #--------------------------------------------------------------------------
  1859.   # new method: pose
  1860.   #--------------------------------------------------------------------------
  1861.   alias bes_initialize initialize
  1862.   def initialize(viewport, battler = nil)
  1863.     bes_initialize(viewport, battler)
  1864.     correct_change_pose if @battler
  1865.     #---
  1866.     self.visible = false if SYMPHONY::View::EMPTY_VIEW && (@battler.nil? || @battler.actor?)
  1867.     #---
  1868.     return if SYMPHONY::View::EMPTY_VIEW
  1869.     #---
  1870.     return unless SYMPHONY::Visual::BATTLER_SHADOW
  1871.     #---
  1872.     @charset_shadow = Sprite.new(viewport)
  1873.     @charset_shadow.bitmap = Cache.system("Shadow")
  1874.     @charset_shadow.ox = @charset_shadow.width / 2
  1875.     @charset_shadow.oy = @charset_shadow.height
  1876.   end
  1877.   
  1878.   #--------------------------------------------------------------------------
  1879.   # new method: pose
  1880.   #--------------------------------------------------------------------------
  1881.   def pose
  1882.     @battler.pose
  1883.   end
  1884.   
  1885.   #--------------------------------------------------------------------------
  1886.   # alias method: update
  1887.   #--------------------------------------------------------------------------
  1888.   alias bes_update update
  1889.   def update
  1890.     bes_update
  1891.     #---
  1892.     return if SYMPHONY::View::EMPTY_VIEW
  1893.     #---
  1894.     return unless SYMPHONY::Visual::BATTLER_SHADOW
  1895.     #---
  1896.     @charset_shadow.opacity = self.opacity
  1897.     @charset_shadow.visible = self.visible
  1898.     @charset_shadow.x = self.x + (self.mirror ? 0 : - 2)
  1899.     @charset_shadow.y = self.y + 2
  1900.     @charset_shadow.z = self.z - 1
  1901.     #---
  1902.     @charset_shadow.opacity = 0 if @battler.nil?
  1903.   end
  1904.   
  1905.   #--------------------------------------------------------------------------
  1906.   # alias method: update_bitmap
  1907.   #--------------------------------------------------------------------------
  1908.   alias bes_update_bitmap update_bitmap
  1909.   def update_bitmap
  1910.     correct_change_pose if @timer.nil?
  1911.     @battler.use_charset? ? update_charset : bes_update_bitmap
  1912.   end
  1913.   
  1914.   #--------------------------------------------------------------------------
  1915.   # alias method: update_origin
  1916.   #--------------------------------------------------------------------------
  1917.   alias bes_update_origin update_origin
  1918.   def update_origin
  1919.     @battler.update_visual
  1920.     @battler.use_charset? ? update_charset_origin : bes_update_origin
  1921.   end
  1922.   
  1923.   #--------------------------------------------------------------------------
  1924.   # new method: update_charset
  1925.   #--------------------------------------------------------------------------
  1926.   def update_charset
  1927.     @battler.set_default_position unless pose
  1928.     #---
  1929.     update_charset_bitmap
  1930.     update_src_rect
  1931.   end
  1932.   
  1933.   #--------------------------------------------------------------------------
  1934.   # new method: correct_change_pose
  1935.   #--------------------------------------------------------------------------
  1936.   def correct_change_pose
  1937.     @pattern = 1
  1938.     @timer = 15
  1939.     @back_step = false
  1940.     @last_pose = pose
  1941.   end
  1942.   
  1943.   #--------------------------------------------------------------------------
  1944.   # new method: update_charset_origin
  1945.   #--------------------------------------------------------------------------
  1946.   def update_charset_origin
  1947.     if bitmap
  1948.       self.ox = @cw / 2
  1949.       self.oy = @ch
  1950.     end
  1951.   end
  1952.   
  1953.   #--------------------------------------------------------------------------
  1954.   # new method: graphic_changed?
  1955.   #--------------------------------------------------------------------------
  1956.   def graphic_changed?
  1957.     self.bitmap.nil? || @character_name != @battler.character_name ||
  1958.     @character_index != @battler.character_index
  1959.   end
  1960.   
  1961.   #--------------------------------------------------------------------------
  1962.   # new method: set_character_bitmap
  1963.   #--------------------------------------------------------------------------
  1964.   def set_character_bitmap
  1965.     self.bitmap = Cache.character(@character_name)
  1966.     sign = @character_name[/^[\!\$]./]
  1967.     if sign && sign.include?(')
  1968.       @cw = bitmap.width / 3
  1969.       @ch = bitmap.height / 4
  1970.     else
  1971.       @cw = bitmap.width / 12
  1972.       @ch = bitmap.height / 8
  1973.     end
  1974.   end
  1975.   
  1976.   #--------------------------------------------------------------------------
  1977.   # new method: update_charset_bitmap
  1978.   #--------------------------------------------------------------------------
  1979.   def update_charset_bitmap
  1980.     if graphic_changed?
  1981.       @character_name = @battler.character_name
  1982.       @character_index = @battler.character_index
  1983.       set_character_bitmap
  1984.     end
  1985.   end
  1986.   
  1987.   #--------------------------------------------------------------------------
  1988.   # new method: update_src_rect
  1989.   #--------------------------------------------------------------------------
  1990.   def update_src_rect
  1991.     @timer -= 1
  1992.     if @battler.force_pose
  1993.       array = []
  1994.       array = Direction.index_8d(pose) if $imported["BattleSymphony-8D"] && @battler.use_8d?
  1995.       if [email protected]_pose && @pattern < 2 && @timer <= 0
  1996.         @pattern += 1
  1997.         @timer = array[2].nil? ? 15 : array[2]
  1998.       elsif @battler.reverse_pose && @pattern > 0 && @timer <= 0
  1999.         @pattern -= 1
  2000.         @timer = array[2].nil? ? 15 : array[2]
  2001.       end
  2002.     else
  2003.       #--- Quick Fix
  2004.       @pattern = 2 if @pattern > 2
  2005.       @pattern = 0 if @pattern < 0
  2006.       #--- End
  2007.       if @timer <= 0
  2008.         @pattern += @back_step ? -1 : 1
  2009.         @back_step = true if @pattern >= 2
  2010.         @back_step = false if @pattern <= 0
  2011.         @timer = 15
  2012.       end
  2013.     end
  2014.     #---
  2015.     @battler.break_pose unless pose
  2016.     direction = Direction.direction(pose)
  2017.     character_index = @character_index
  2018.     #---
  2019.     if $imported["BattleSymphony-8D"] && @battler.use_8d?
  2020.       array = Direction.index_8d(pose)
  2021.       character_index = array[0]
  2022.       direction = array[1]
  2023.     end
  2024.     sx = (character_index % 4 * 3 + @pattern) * @cw
  2025.     sy = (character_index / 4 * 4 + (direction - 2) / 2) * @ch
  2026.     self.src_rect.set(sx, sy, @cw, @ch)
  2027.   end
  2028.   
  2029.   #--------------------------------------------------------------------------
  2030.   # overwrite method: revert_to_normal
  2031.   #--------------------------------------------------------------------------
  2032.   def revert_to_normal
  2033.     self.blend_type = 0
  2034.     self.color.set(0, 0, 0, 0)
  2035.     self.opacity = 255
  2036.   end
  2037.   
  2038.   #--------------------------------------------------------------------------
  2039.   # alias method: animation_set_sprites
  2040.   # Make Animation Opacity independent of Sprite Opacity
  2041.   #--------------------------------------------------------------------------
  2042.   alias bes_animation_set_sprites animation_set_sprites
  2043.   def animation_set_sprites(frame)
  2044.     bes_animation_set_sprites(frame)
  2045.     cell_data = frame.cell_data
  2046.     @ani_sprites.each_with_index do |sprite, i|
  2047.       next unless sprite
  2048.       pattern = cell_data[i, 0]
  2049.       if !pattern || pattern < 0
  2050.         sprite.visible = false
  2051.         next
  2052.       end
  2053.       sprite.opacity = cell_data[i, 6]
  2054.     end
  2055.   end
  2056.   
  2057. end # Sprite_Battler

  2058. #==============================================================================
  2059. # ■ Spriteset_Battle
  2060. #==============================================================================

  2061. class Spriteset_Battle
  2062.   
  2063.   #--------------------------------------------------------------------------
  2064.   # public instance variables
  2065.   #--------------------------------------------------------------------------
  2066.   attr_accessor :actor_sprites
  2067.   attr_accessor :enemy_sprites
  2068.   
  2069.   #--------------------------------------------------------------------------
  2070.   # overwrite method: create_actors
  2071.   # Fixed Large Party.
  2072.   #--------------------------------------------------------------------------
  2073.   def create_actors
  2074.     max_members = $game_party.max_battle_members
  2075.     @actor_sprites = Array.new(max_members) { Sprite_Battler.new(@viewport1) }
  2076.   end
  2077.   
  2078.   #--------------------------------------------------------------------------
  2079.   # overwrite method: update_actors
  2080.   # Fixed Change Party.
  2081.   #--------------------------------------------------------------------------
  2082.   def update_actors
  2083.     @actor_sprites.each_with_index do |sprite, i|
  2084.       party_member = $game_party.battle_members[i]
  2085.       if party_member != sprite.battler
  2086.         sprite.battler = $game_party.battle_members[i]
  2087.         #---
  2088.         if party_member
  2089.           party_member.reset_position
  2090.           party_member.correct_origin_position
  2091.           party_member.break_pose if party_member.dead?
  2092.         end
  2093.         sprite.init_visibility if sprite.battler && !sprite.battler.use_custom_charset?
  2094.       end
  2095.       sprite.update
  2096.     end
  2097.   end
  2098.   
  2099. end # Spriteset_Battle

  2100. #==============================================================================
  2101. # Section VII. Icons Sprites Initialization (S-07)
  2102. # -----------------------------------------------------------------------------
  2103. # This section is the second section of core script. It will Initializes and
  2104. # Creates Sprites for all Object like Weapons, Items and Maintains them.
  2105. # -----------------------------------------------------------------------------
  2106. # Do not touch below script unless You know what You do and How it works.
  2107. #==============================================================================
  2108. #==============================================================================
  2109. # ■ Sprite_Object
  2110. #==============================================================================

  2111. class Sprite_Object < Sprite_Base
  2112.   
  2113.   #--------------------------------------------------------------------------
  2114.   # initialize
  2115.   #--------------------------------------------------------------------------
  2116.   def initialize(viewport = nil)
  2117.     super(viewport)
  2118.     #---
  2119.     @dest_angle = 0
  2120.     @dest_x = 0
  2121.     @dest_y = 0
  2122.     #---
  2123.     @angle_rate = 0
  2124.     @move_x_rate = 0
  2125.     @move_y_rate = 0
  2126.     @fade_rate = 0
  2127.     #---
  2128.     @arc = 0
  2129.     @parabola = {}
  2130.     @f = 0
  2131.     @arc_y = 0
  2132.     #---
  2133.     @battler = nil
  2134.     @offset_x = 0
  2135.     @offset_y = 0
  2136.     @offset_z = 0
  2137.     @attach_x = 0
  2138.     @attach_y = 0
  2139.     @attachment = :middle
  2140.   end
  2141.   
  2142.   #--------------------------------------------------------------------------
  2143.   # set_battler
  2144.   #--------------------------------------------------------------------------
  2145.   def set_battler(battler = nil)
  2146.     @battler = battler
  2147.     update
  2148.   end
  2149.   
  2150.   #--------------------------------------------------------------------------
  2151.   # set_position
  2152.   #--------------------------------------------------------------------------
  2153.   def set_position(x, y)
  2154.     @dest_x = self.x = x
  2155.     @dest_y = self.y = y
  2156.   end
  2157.   
  2158.   #--------------------------------------------------------------------------
  2159.   # set_angle
  2160.   #--------------------------------------------------------------------------
  2161.   def set_angle(angle)
  2162.     @dest_angle = self.angle = angle
  2163.     @dest_angle = self.angle = -angle if mirror_battler?
  2164.   end
  2165.   
  2166.   #--------------------------------------------------------------------------
  2167.   # set_icon
  2168.   #--------------------------------------------------------------------------
  2169.   def set_icon(index)
  2170.     return if index <= 0
  2171.     bitmap = Cache.system("Iconset")
  2172.     self.bitmap ||= bitmap
  2173.     self.src_rect.set(index % 16 * 24, index / 16 * 24, 24, 24)
  2174.     self.ox = self.oy = 12
  2175.   end
  2176.   
  2177.   #--------------------------------------------------------------------------
  2178.   # set_origin
  2179.   #--------------------------------------------------------------------------
  2180.   def set_origin(type)
  2181.     @offset_z = 2
  2182.     @attachment = type
  2183.     case type
  2184.     when :item
  2185.       self.ox = 12
  2186.       self.oy = 12
  2187.       @offset_y = [email protected]
  2188.       @offset_x = [email protected] / 2
  2189.     when :hand1
  2190.       self.ox = 24
  2191.       self.oy = 24
  2192.       @attach_y = [email protected]/3
  2193.       @attach_x = [email protected]/5
  2194.     when :hand2
  2195.       self.ox = 24
  2196.       self.oy = 24
  2197.       @attach_y = [email protected]/3
  2198.       @attach_x = @battler.sprite.width/5
  2199.     when :middle
  2200.       self.ox = 12
  2201.       self.oy = 12
  2202.       @offset_y = [email protected]/2
  2203.     when :top
  2204.       self.ox = 12
  2205.       self.oy = 24
  2206.       @offset_y = [email protected]
  2207.     when :base
  2208.       self.ox = 12
  2209.       self.oy = 24
  2210.     end
  2211.     self.y = @battler.screen_y + @attach_y + @offset_y + @arc_y
  2212.   end
  2213.   
  2214.   #--------------------------------------------------------------------------
  2215.   # set_fade
  2216.   #--------------------------------------------------------------------------
  2217.   def set_fade(rate)
  2218.     @fade_rate = rate
  2219.   end
  2220.   
  2221.   #--------------------------------------------------------------------------
  2222.   # create_angle
  2223.   #--------------------------------------------------------------------------
  2224.   def create_angle(angle, frames = 8)
  2225.     return if angle == self.angle
  2226.     @dest_angle = angle
  2227.     @dest_angle = - @dest_angle if mirror_battler?
  2228.     frames = [frames, 1].max
  2229.     @angle_rate = [(self.angle - @dest_angle).abs / frames, 2].max
  2230.   end
  2231.   
  2232.   #--------------------------------------------------------------------------
  2233.   # create_arc
  2234.   #--------------------------------------------------------------------------
  2235.   def create_arc(arc)
  2236.     @arc = arc
  2237.     @parabola[:x] = 0
  2238.     @parabola[:y0] = 0
  2239.     @parabola[:y1] = @dest_y - self.y
  2240.     @parabola[:h]  = - (@parabola[:y0] + @arc * 5)
  2241.     @parabola[:d]  = (self.x - @dest_x).abs
  2242.   end
  2243.   
  2244.   #--------------------------------------------------------------------------
  2245.   # create_movement
  2246.   #--------------------------------------------------------------------------
  2247.   def create_movement(destination_x, destination_y, frames = 12)
  2248.     return if self.x == destination_x && self.y == destination_y
  2249.     @arc = 0
  2250.     @dest_x = destination_x
  2251.     @dest_y = destination_y
  2252.     frames = [frames, 1].max
  2253.     @f = frames.to_f / 2
  2254.     @move_x_rate = [(self.x - @dest_x).abs / frames, 2].max
  2255.     @move_y_rate = [(self.y - @dest_y).abs / frames, 2].max
  2256.   end
  2257.   
  2258.   #--------------------------------------------------------------------------
  2259.   # create_move_direction
  2260.   #--------------------------------------------------------------------------
  2261.   def create_move_direction(direction, distance, frames = 12)
  2262.     case direction
  2263.     when 1; move_x = distance / -2; move_y = distance /  2
  2264.     when 2; move_x = distance *  0; move_y = distance *  1
  2265.     when 3; move_x = distance / -2; move_y = distance /  2
  2266.     when 4; move_x = distance * -1; move_y = distance *  0
  2267.     when 6; move_x = distance *  1; move_y = distance *  0
  2268.     when 7; move_x = distance / -2; move_y = distance / -2
  2269.     when 8; move_x = distance *  0; move_y = distance * -1
  2270.     when 9; move_x = distance /  2; move_y = distance / -2
  2271.     else; return
  2272.     end
  2273.     #---
  2274.     move_x += self.x
  2275.     move_y += self.y
  2276.     #---
  2277.     create_movement(move_x, move_y, frames)
  2278.   end
  2279.   
  2280.   #--------------------------------------------------------------------------
  2281.   # update
  2282.   #--------------------------------------------------------------------------
  2283.   def update
  2284.     super
  2285.     update_angle
  2286.     @arc == 0 ? update_movement : update_arc
  2287.     update_position
  2288.     update_opacity
  2289.   end
  2290.   
  2291.   #--------------------------------------------------------------------------
  2292.   # update_angle
  2293.   #--------------------------------------------------------------------------
  2294.   def update_angle
  2295.     return if @angle_rate == 0
  2296.     @angle_rate = 0 if self.angle == @dest_angle
  2297.     value = [(self.angle - @dest_angle).abs, @angle_rate].min
  2298.     self.angle += (@dest_angle > self.angle) ? value : -value
  2299.   end
  2300.   
  2301.   #--------------------------------------------------------------------------
  2302.   # update_arc
  2303.   #--------------------------------------------------------------------------
  2304.   def update_arc
  2305.     return unless [@move_x_rate, @move_y_rate].any? { |x| x != 0 }
  2306.     #---
  2307.     value = [(self.x - @dest_x).abs, @move_x_rate].min
  2308.     @offset_x += (@dest_x > self.x) ? value : -value
  2309.     @parabola[:x] += value
  2310.     #---
  2311.     if @dest_x == self.x
  2312.       self.y = @dest_y
  2313.     else
  2314.       a = (2*(@parabola[:y0]+@parabola[:y1])-4*@parabola[:h])/(@parabola[:d]**2)
  2315.       b = (@parabola[:y1]-@parabola[:y0]-a*(@parabola[:d]**2))/@parabola[:d]
  2316.       @arc_y = a * @parabola[:x] * @parabola[:x] + b * @parabola[:x] + @parabola[:y0]
  2317.     end
  2318.     #---
  2319.     @move_x_rate = 0 if self.x == @dest_x
  2320.     @move_y_rate = 0 if self.y == @dest_y
  2321.   end
  2322.   
  2323.   #--------------------------------------------------------------------------
  2324.   # update_movement
  2325.   #--------------------------------------------------------------------------
  2326.   def update_movement
  2327.     return unless [@move_x_rate, @move_y_rate].any? { |x| x != 0 }
  2328.     @move_x_rate = 0 if self.x == @dest_x
  2329.     @move_y_rate = 0 if self.y == @dest_y
  2330.     value = [(self.x - @dest_x).abs, @move_x_rate].min
  2331.     @offset_x += (@dest_x > self.x) ? value : -value
  2332.     value = [(self.y - @dest_y).abs, @move_y_rate].min
  2333.     @offset_y += (@dest_y > self.y) ? value : -value
  2334.   end
  2335.   
  2336.   #--------------------------------------------------------------------------
  2337.   # update_position
  2338.   #--------------------------------------------------------------------------
  2339.   def update_position
  2340.     if @battler != nil
  2341.       self.mirror = mirror_battler?
  2342.       update_attachment(self.mirror)
  2343.       attach_x = self.mirror ? -@attach_x : @attach_x
  2344.       self.x = @battler.screen_x + attach_x + @offset_x
  2345.       self.y = @battler.screen_y + @attach_y + @offset_y + @arc_y
  2346.       self.z = @battler.screen_z + @offset_z
  2347.     else
  2348.       self.x = @offset_x
  2349.       self.y = @offset_y
  2350.       self.z = @offset_z
  2351.     end
  2352.   end
  2353.   
  2354.   #--------------------------------------------------------------------------
  2355.   # update_attachment
  2356.   #--------------------------------------------------------------------------
  2357.   def update_attachment(mirror = false)
  2358.     case @attachment
  2359.     when :hand1
  2360.       self.ox = mirror ? 0 : 24
  2361.       self.oy = 24
  2362.       @attach_y = [email protected]/3
  2363.       @attach_x = [email protected]/5
  2364.     when :hand2
  2365.       self.ox = mirror ? 0 : 24
  2366.       self.oy = 24
  2367.       @attach_y = [email protected]/3
  2368.       @attach_x = @battler.sprite.width/5
  2369.     else
  2370.       @attach_x = 0
  2371.       @attach_y = 0
  2372.     end
  2373.   end
  2374.   
  2375.   #--------------------------------------------------------------------------
  2376.   # update_attachment
  2377.   #--------------------------------------------------------------------------
  2378.   def update_opacity
  2379.     self.opacity += @fade_rate
  2380.   end
  2381.   
  2382.   #--------------------------------------------------------------------------
  2383.   # mirror_battler?
  2384.   #--------------------------------------------------------------------------
  2385.   def mirror_battler?
  2386.     return false if @battler.sprite == nil
  2387.     direction = Direction.direction(@battler.pose)
  2388.     return true if [9, 6, 3].include?(direction)
  2389.     return true if @battler.sprite.mirror
  2390.     return false
  2391.   end
  2392.   
  2393.   #--------------------------------------------------------------------------
  2394.   # effecting?
  2395.   #--------------------------------------------------------------------------
  2396.   def effecting?
  2397.     [@angle_rate,@move_y_rate,@move_x_rate,@fade_rate].any? { |x| x > 0 }
  2398.   end
  2399.   
  2400. end # Sprite_Object

  2401. #==============================================================================
  2402. # Section VIII. Core Script (S-08)
  2403. # -----------------------------------------------------------------------------
  2404. # This section is the most important section of Core SCript. It will Initialize
  2405. # Database as well as Symphony Tags and put them in actions.
  2406. # -----------------------------------------------------------------------------
  2407. # Do not touch below script unless You know what You do and How it works.
  2408. #==============================================================================
  2409. #==============================================================================
  2410. # ■ Regular Expression
  2411. #==============================================================================

  2412. module REGEXP
  2413.   module SYMPHONY
  2414.     SETUP_ANI_ON   = /<(?:SETUP_ACTION|setup action|setup)>/i
  2415.     SETUP_ANI_OFF  = /<\/(?:SETUP_ACTION|setup action|setup)>/i
  2416.     WHOLE_ANI_ON   = /<(?:WHOLE_ACTION|whole action|whole)>/i
  2417.     WHOLE_ANI_OFF  = /<\/(?:WHOLE_ACTION|whole action|whole)>/i
  2418.     TARGET_ANI_ON  = /<(?:TARGET_ACTION|target action|target)>/i
  2419.     TARGET_ANI_OFF = /<\/(?:TARGET_ACTION|target action|target)>/i
  2420.     FOLLOW_ANI_ON  = /<(?:FOLLOW_ACTION|follow action|follow)>/i
  2421.     FOLLOW_ANI_OFF = /<\/(?:FOLLOW_ACTION|follow action|follow)>/i
  2422.     FINISH_ANI_ON  = /<(?:FINISH_ACTION|finish action|finish)>/i
  2423.     FINISH_ANI_OFF = /<\/(?:FINISH_ACTION|finish action|finish)>/i
  2424.    
  2425.     SYMPHONY_TAG_NONE = /[ ]*(.*)/i
  2426.     SYMPHONY_TAG_VALUES = /[ ]*(.*):[ ]*(.*)/i
  2427.    
  2428.     ATK_ANI1 = /<(?:ATK_ANI_1|atk ani 1):[ ]*(\d+)>/i
  2429.     ATK_ANI2 = /<(?:ATK_ANI_2|atk ani 2):[ ]*(\d+)>/i

  2430.   end
  2431. end

  2432. # Scan values: /\w+[\s*\w+]*/i

  2433. #==============================================================================
  2434. # ■ DataManager
  2435. #==============================================================================

  2436. module DataManager
  2437.   
  2438.   #--------------------------------------------------------------------------
  2439.   # alias method: load_database
  2440.   #--------------------------------------------------------------------------
  2441.   class <<self; alias load_database_bes load_database; end
  2442.   def self.load_database
  2443.     load_database_bes
  2444.     load_notetags_bes
  2445.   end
  2446.   
  2447.   #--------------------------------------------------------------------------
  2448.   # new method: load_notetags_bes
  2449.   #--------------------------------------------------------------------------
  2450.   def self.load_notetags_bes
  2451.     groups = [$data_skills, $data_items, $data_weapons, $data_enemies]
  2452.     groups.each { |group|
  2453.       group.each { |obj|
  2454.         next if obj.nil?
  2455.         obj.battle_symphony_initialize
  2456.       }
  2457.     }
  2458.   end
  2459.   
  2460. end # DataManager

  2461. #==============================================================================
  2462. # ■ RPG::BaseItem
  2463. #==============================================================================

  2464. class RPG::BaseItem
  2465.   
  2466.   #--------------------------------------------------------------------------
  2467.   # * Public Instance Variables
  2468.   #--------------------------------------------------------------------------
  2469.   attr_accessor :setup_actions_list
  2470.   attr_accessor :whole_actions_list
  2471.   attr_accessor :target_actions_list
  2472.   attr_accessor :follow_actions_list
  2473.   attr_accessor :finish_actions_list
  2474.   attr_accessor :atk_animation_id1
  2475.   attr_accessor :atk_animation_id2
  2476.   
  2477.   #--------------------------------------------------------------------------
  2478.   # new method: battle_symphony_initialize
  2479.   #--------------------------------------------------------------------------
  2480.   def battle_symphony_initialize
  2481.     create_default_animation
  2482.     create_default_symphony
  2483.     create_tags_symphony
  2484.   end
  2485.   
  2486.   #--------------------------------------------------------------------------
  2487.   # new method: create_default_animation
  2488.   #--------------------------------------------------------------------------
  2489.   def create_default_animation
  2490.     @atk_animation_id1 = SYMPHONY::Visual::ENEMY_ATTACK_ANIMATION
  2491.     @atk_animation_id2 = 0
  2492.     self.note.split(/[\r\n]+/).each { |line|
  2493.       case line
  2494.       when REGEXP::SYMPHONY::ATK_ANI1
  2495.         @atk_animation_id1 = $1.to_i
  2496.       when REGEXP::SYMPHONY::ATK_ANI2
  2497.         @atk_animation_id2 = $1.to_i
  2498.       end
  2499.     }
  2500.   end
  2501.   
  2502.   #--------------------------------------------------------------------------
  2503.   # new method: create_default_symphony
  2504.   #--------------------------------------------------------------------------
  2505.   def create_default_symphony
  2506.     @setup_actions_list = []; @finish_actions_list = []
  2507.     @whole_actions_list = []; @target_actions_list = []
  2508.     @follow_actions_list = []
  2509.     #---
  2510.     if self.is_a?(RPG::Skill) and !self.physical?
  2511.       @setup_actions_list = SYMPHONY::DEFAULT_ACTIONS::MAGIC_SETUP
  2512.       @whole_actions_list = SYMPHONY::DEFAULT_ACTIONS::MAGIC_WHOLE
  2513.       @target_actions_list = SYMPHONY::DEFAULT_ACTIONS::MAGIC_TARGET
  2514.       @follow_actions_list = SYMPHONY::DEFAULT_ACTIONS::MAGIC_FOLLOW
  2515.       @finish_actions_list = SYMPHONY::DEFAULT_ACTIONS::MAGIC_FINISH
  2516.       return
  2517.     elsif self.is_a?(RPG::Skill) and self.physical?
  2518.       @setup_actions_list = SYMPHONY::DEFAULT_ACTIONS::PHYSICAL_SETUP
  2519.       @whole_actions_list = SYMPHONY::DEFAULT_ACTIONS::PHYSICAL_WHOLE
  2520.       @target_actions_list = SYMPHONY::DEFAULT_ACTIONS::PHYSICAL_TARGET
  2521.       @follow_actions_list = SYMPHONY::DEFAULT_ACTIONS::PHYSICAL_FOLLOW
  2522.       @finish_actions_list = SYMPHONY::DEFAULT_ACTIONS::PHYSICAL_FINISH
  2523.       return
  2524.     elsif self.is_a?(RPG::Item)
  2525.       @setup_actions_list = SYMPHONY::DEFAULT_ACTIONS::ITEM_SETUP
  2526.       @whole_actions_list = SYMPHONY::DEFAULT_ACTIONS::ITEM_WHOLE
  2527.       @target_actions_list = SYMPHONY::DEFAULT_ACTIONS::ITEM_TARGET
  2528.       @follow_actions_list = SYMPHONY::DEFAULT_ACTIONS::ITEM_FOLLOW
  2529.       @finish_actions_list = SYMPHONY::DEFAULT_ACTIONS::ITEM_FINISH
  2530.       return
  2531.     end
  2532.   end
  2533.   
  2534.   #--------------------------------------------------------------------------
  2535.   # new method: create_tags_symphony
  2536.   #--------------------------------------------------------------------------
  2537.   def create_tags_symphony
  2538.     self.note.split(/[\r\n]+/).each { |line|
  2539.       case line
  2540.       when REGEXP::SYMPHONY::SETUP_ANI_ON
  2541.         @symphony_tag = true
  2542.         @setup_actions_list = []
  2543.         @setup_action_flag = true
  2544.       when REGEXP::SYMPHONY::SETUP_ANI_OFF
  2545.         @symphony_tag = false
  2546.         @setup_action_flag = false
  2547.       when REGEXP::SYMPHONY::WHOLE_ANI_ON
  2548.         @symphony_tag = true
  2549.         @whole_actions_list = []
  2550.         @whole_action_flag = true
  2551.       when REGEXP::SYMPHONY::WHOLE_ANI_OFF
  2552.         @symphony_tag = false
  2553.         @whole_action_flag = false
  2554.       when REGEXP::SYMPHONY::TARGET_ANI_ON
  2555.         @symphony_tag = true
  2556.         @target_actions_list = []
  2557.         @target_action_flag = true
  2558.       when REGEXP::SYMPHONY::TARGET_ANI_OFF
  2559.         @symphony_tag = false
  2560.         @target_action_flag = false
  2561.       when REGEXP::SYMPHONY::FOLLOW_ANI_ON
  2562.         @symphony_tag = true
  2563.         @follow_actions_list = []
  2564.         @follow_action_flag = true
  2565.       when REGEXP::SYMPHONY::FOLLOW_ANI_OFF
  2566.         @symphony_tag = false
  2567.         @follow_action_flag = false
  2568.       when REGEXP::SYMPHONY::FINISH_ANI_ON
  2569.         @symphony_tag = true
  2570.         @finish_actions_list = []
  2571.         @finish_action_flag = true
  2572.       when REGEXP::SYMPHONY::FINISH_ANI_OFF
  2573.         @symphony_tag = false
  2574.         @finish_action_flag = false
  2575.       #---
  2576.       else
  2577.         next unless @symphony_tag
  2578.         case line
  2579.         when REGEXP::SYMPHONY::SYMPHONY_TAG_VALUES
  2580.           action = $1
  2581.           value = $2.scan(/[^, ]+[^,]*/i)
  2582.         when REGEXP::SYMPHONY::SYMPHONY_TAG_NONE
  2583.           action = $1
  2584.           value = [nil]
  2585.         else; next
  2586.         end
  2587.         array = [action, value]
  2588.         if @setup_action_flag
  2589.           @setup_actions_list.push(array)
  2590.         elsif @whole_action_flag
  2591.           @whole_actions_list.push(array)
  2592.         elsif @target_action_flag
  2593.           @target_actions_list.push(array)
  2594.         elsif @follow_action_flag
  2595.           @follow_actions_list.push(array)
  2596.         elsif @finish_action_flag
  2597.           @finish_actions_list.push(array)
  2598.         end
  2599.       end
  2600.     }
  2601.   end
  2602.   
  2603.   #--------------------------------------------------------------------------
  2604.   # new method: valid_actions?
  2605.   #--------------------------------------------------------------------------
  2606.   def valid_actions?(phase)
  2607.     case phase
  2608.     when :setup
  2609.       return @setup_actions_list.size > 0
  2610.     when :whole
  2611.       return @whole_actions_list.size > 0
  2612.     when :target
  2613.       return @target_actions_list.size > 0
  2614.     when :follow
  2615.       return @follow_actions_list.size > 0
  2616.     when :finish
  2617.       return @finish_actions_list.size > 0
  2618.     end
  2619.   end
  2620.   
  2621. end # RPG::BaseItem

  2622. #==============================================================================
  2623. # ■ Direction
  2624. #==============================================================================

  2625. module Direction
  2626.   
  2627.   #--------------------------------------------------------------------------
  2628.   # self.pose
  2629.   #--------------------------------------------------------------------------
  2630.   def self.pose(direction)
  2631.     case direction
  2632.     when 4; return :left
  2633.     when 6; return :right
  2634.     when 8; return :up
  2635.     when 2; return :down
  2636.     when 7; return :left
  2637.     when 1; return :left
  2638.     when 9; return :right
  2639.     when 3; return :right
  2640.     end
  2641.   end
  2642.   
  2643.   #--------------------------------------------------------------------------
  2644.   # self.non8d_pose
  2645.   #--------------------------------------------------------------------------
  2646.   def self.non8d_pose(pose)
  2647.     case pose
  2648.     when :down_l; return :left
  2649.     when :down_r; return :right
  2650.     when :up_l; return :left
  2651.     when :up_r; return :right
  2652.     end
  2653.   end
  2654.   
  2655.   #--------------------------------------------------------------------------
  2656.   # self.pose
  2657.   #--------------------------------------------------------------------------
  2658.   def self.direction(pose)
  2659.     case pose
  2660.     when :left; return 4
  2661.     when :right; return 6
  2662.     when :up; return 8
  2663.     when :down; return 2
  2664.     end
  2665.   end
  2666.   
  2667.   #--------------------------------------------------------------------------
  2668.   # self.opposite
  2669.   #--------------------------------------------------------------------------
  2670.   def self.opposite(direction)
  2671.     case direction
  2672.     when 1; return 9
  2673.     when 2; return 8
  2674.     when 3; return 7
  2675.     when 4; return 6
  2676.     when 6; return 4
  2677.     when 7; return 3
  2678.     when 8; return 2
  2679.     when 9; return 1
  2680.     else; return direction
  2681.     end
  2682.   end
  2683.   
  2684.   #--------------------------------------------------------------------------
  2685.   # self.face_coordinate
  2686.   #--------------------------------------------------------------------------
  2687.   def self.face_coordinate(screen_x, screen_y, destination_x, destination_y)
  2688.     x1 = Integer(screen_x)
  2689.     x2 = Integer(destination_x)
  2690.     y1 = Graphics.height - Integer(screen_y)
  2691.     y2 = Graphics.height - Integer(destination_y)
  2692.     return if x1 == x2 and y1 == y2
  2693.     #---
  2694.     angle = Integer(Math.atan2((y2-y1),(x2-x1)) * 1800 / Math::PI)
  2695.     if (0..225) === angle or (-225..0) === angle
  2696.       direction = 6
  2697.     elsif (226..675) === angle
  2698.       direction = 9
  2699.     elsif (676..1125) === angle
  2700.       direction = 8
  2701.     elsif (1126..1575) === angle
  2702.       direction = 7
  2703.     elsif (1576..1800) === angle or (-1800..-1576) === angle
  2704.       direction = 4
  2705.     elsif (-1575..-1126) === angle
  2706.       direction = 1
  2707.     elsif (-1125..-676) === angle
  2708.       direction = 2
  2709.     elsif (-675..-226) === angle
  2710.       direction = 3
  2711.     end
  2712.     return direction
  2713.   end
  2714.   
  2715. end # Direction

  2716. #==============================================================================
  2717. # ■ Game_ActionResult
  2718. #==============================================================================

  2719. class Game_ActionResult
  2720.   
  2721.   #--------------------------------------------------------------------------
  2722.   # alias method: clear_hit_flags
  2723.   #--------------------------------------------------------------------------
  2724.   alias bes_clear_hit_flags clear_hit_flags
  2725.   def clear_hit_flags
  2726.     return unless @calc
  2727.     bes_clear_hit_flags
  2728.     @temp_missed = @temp_evaded = @temp_critical = nil
  2729.   end
  2730.   
  2731.   #--------------------------------------------------------------------------
  2732.   # new method: clear_bes_flag
  2733.   #--------------------------------------------------------------------------
  2734.   def clear_bes_flag
  2735.     @perfect_hit = false
  2736.     @calc = false
  2737.     @dmg = false
  2738.     @effect = false
  2739.   end
  2740.   
  2741.   #--------------------------------------------------------------------------
  2742.   # new method: clear_change_target
  2743.   #--------------------------------------------------------------------------
  2744.   def clear_change_target
  2745.     @check_counter = false
  2746.     @check_reflection = false
  2747.   end
  2748.   
  2749.   #--------------------------------------------------------------------------
  2750.   # new method: set_perfect
  2751.   #--------------------------------------------------------------------------
  2752.   def set_perfect
  2753.     @perfect_hit = true
  2754.   end
  2755.   
  2756.   #--------------------------------------------------------------------------
  2757.   # new method: set_calc
  2758.   #--------------------------------------------------------------------------
  2759.   def set_calc
  2760.     @calc = true
  2761.   end
  2762.   
  2763.   #--------------------------------------------------------------------------
  2764.   # new method: set_dmg
  2765.   #--------------------------------------------------------------------------
  2766.   def set_dmg
  2767.     @dmg = true
  2768.   end
  2769.   
  2770.   #--------------------------------------------------------------------------
  2771.   # new method: set_effect
  2772.   #--------------------------------------------------------------------------
  2773.   def set_effect
  2774.     @effect = true
  2775.   end
  2776.   
  2777.   #--------------------------------------------------------------------------
  2778.   # new method: set_counter
  2779.   #--------------------------------------------------------------------------
  2780.   def set_counter
  2781.     @check_counter = true
  2782.   end
  2783.   
  2784.   #--------------------------------------------------------------------------
  2785.   # new method: set_reflection
  2786.   #--------------------------------------------------------------------------
  2787.   def set_reflection
  2788.     @check_reflection = true
  2789.   end
  2790.   
  2791.   #--------------------------------------------------------------------------
  2792.   # new method: used=
  2793.   #--------------------------------------------------------------------------
  2794.   def evaded=(flag)
  2795.     @evaded = @temp_evaded.nil? ? flag : @temp_evaded
  2796.   end
  2797.   
  2798.   #--------------------------------------------------------------------------
  2799.   # new method: used=
  2800.   #--------------------------------------------------------------------------
  2801.   def critical=(flag)
  2802.     @critical = @temp_critical.nil? ? flag : @temp_critical
  2803.   end
  2804.   
  2805.   #--------------------------------------------------------------------------
  2806.   # new method: used=
  2807.   #--------------------------------------------------------------------------
  2808.   def misssed=(flag)
  2809.     @missed = @temp_missed.nil? ? flag : @temp_missed
  2810.   end
  2811.   
  2812.   #--------------------------------------------------------------------------
  2813.   # alias method: hit?
  2814.   #--------------------------------------------------------------------------
  2815.   alias bes_hit? hit?
  2816.   def hit?
  2817.     bes_hit? || (@used && @perfect_hit)
  2818.   end
  2819.   
  2820.   #--------------------------------------------------------------------------
  2821.   # new method: dmg?
  2822.   #--------------------------------------------------------------------------
  2823.   def dmg?
  2824.     @dmg || !SceneManager.scene_is?(Scene_Battle)
  2825.   end
  2826.   
  2827.   #--------------------------------------------------------------------------
  2828.   # new method: effect?
  2829.   #--------------------------------------------------------------------------
  2830.   def effect?
  2831.     @effect || !SceneManager.scene_is?(Scene_Battle)
  2832.   end
  2833.   
  2834.   #--------------------------------------------------------------------------
  2835.   # new method: has_damage?
  2836.   #--------------------------------------------------------------------------
  2837.   def has_damage?
  2838.     [@hp_damage, @mp_damage, @tp_damage].any? { |x| x > 0 }
  2839.   end
  2840.   
  2841.   #--------------------------------------------------------------------------
  2842.   # new method: check_counter?
  2843.   #--------------------------------------------------------------------------
  2844.   def check_counter?
  2845.     @check_counter
  2846.   end
  2847.   
  2848.   #--------------------------------------------------------------------------
  2849.   # new method: check_reflection?
  2850.   #--------------------------------------------------------------------------
  2851.   def check_reflection?
  2852.     @check_reflection
  2853.   end
  2854.   
  2855. end # Game_ActionResult

  2856. #==============================================================================
  2857. # ■ Game_Battler
  2858. #==============================================================================

  2859. class Game_Battler < Game_BattlerBase
  2860.   
  2861.   #--------------------------------------------------------------------------
  2862.   # new method: backup_actions
  2863.   #--------------------------------------------------------------------------
  2864.   def backup_actions
  2865.     @backup_actions = @actions.dup if @actions
  2866.   end
  2867.   
  2868.   #--------------------------------------------------------------------------
  2869.   # new method: restore_actions
  2870.   #--------------------------------------------------------------------------
  2871.   def restore_actions
  2872.     @actions = @backup_actions.dup if @backup_actions
  2873.     @backup_actions.clear
  2874.     @backup_actions = nil
  2875.   end
  2876.   
  2877.   #--------------------------------------------------------------------------
  2878.   # alias method: item_cnt
  2879.   #--------------------------------------------------------------------------
  2880.   alias bes_item_cnt item_cnt
  2881.   def item_cnt(user, item)
  2882.     return 0 unless @result.check_counter?
  2883.     return bes_item_cnt(user, item)
  2884.   end
  2885.   
  2886.   #--------------------------------------------------------------------------
  2887.   # alias method: item_mrf
  2888.   #--------------------------------------------------------------------------
  2889.   alias bes_item_mrf item_mrf
  2890.   def item_mrf(user, item)
  2891.     return 0 unless @result.check_reflection?
  2892.     return 0 if @magic_reflection
  2893.     return bes_item_mrf(user, item)
  2894.   end
  2895.   
  2896.   #--------------------------------------------------------------------------
  2897.   # alias method: state_resist_set
  2898.   #--------------------------------------------------------------------------
  2899.   alias bes_state_resist_set state_resist_set
  2900.   def state_resist_set
  2901.     result = bes_state_resist_set
  2902.     result += [death_state_id] if @immortal
  2903.     result
  2904.   end
  2905.   
  2906.   #--------------------------------------------------------------------------
  2907.   # alias method: execute_damage
  2908.   #--------------------------------------------------------------------------
  2909.   alias bes_execute_damage execute_damage
  2910.   def execute_damage(user)
  2911.     return unless @result.dmg?
  2912.     bes_execute_damage(user)
  2913.   end
  2914.   
  2915.   #--------------------------------------------------------------------------
  2916.   # alias method: make_damage_value
  2917.   #--------------------------------------------------------------------------
  2918.   alias bes_make_damage_value make_damage_value
  2919.   def make_damage_value(user, item)
  2920.     return unless @result.dmg?
  2921.     bes_make_damage_value(user, item)
  2922.   end
  2923.   
  2924.   #--------------------------------------------------------------------------
  2925.   # alias method: item_effect_apply
  2926.   #--------------------------------------------------------------------------
  2927.   alias bes_item_effect_apply item_effect_apply
  2928.   def item_effect_apply(user, item, effect)
  2929.     return unless @result.effect?
  2930.     bes_item_effect_apply(user, item, effect)
  2931.   end
  2932.   
  2933.   #--------------------------------------------------------------------------
  2934.   # alias method: item_user_effect
  2935.   #--------------------------------------------------------------------------
  2936.   alias bes_item_user_effect item_user_effect
  2937.   def item_user_effect(user, item)
  2938.     return unless @result.effect?
  2939.     bes_item_user_effect(user, item)
  2940.   end
  2941.   
  2942.   #--------------------------------------------------------------------------
  2943.   # alias method: make_miss_popups
  2944.   #--------------------------------------------------------------------------
  2945.   if $imported["YEA-BattleEngine"]
  2946.   alias bes_make_miss_popups make_miss_popups
  2947.   def make_miss_popups(user, item)
  2948.     @result.restore_damage unless @result.effect?
  2949.     bes_make_miss_popups(user, item)
  2950.     unless @result.effect?
  2951.       @result.store_damage
  2952.       @result.clear_damage_values
  2953.     end
  2954.   end
  2955.   end
  2956.   
  2957.   #--------------------------------------------------------------------------
  2958.   # new method: face_coordinate
  2959.   #--------------------------------------------------------------------------
  2960.   def face_coordinate(destination_x, destination_y)
  2961.     direction = Direction.face_coordinate(self.screen_x, self.screen_y, destination_x, destination_y)
  2962.     #direction = Direction.opposite(direction) if self.sprite.mirror
  2963.     @direction = direction
  2964.     return if $imported["BattleSymphony-HB"] && self.use_hb?
  2965.     return if SYMPHONY::Visual::DISABLE_AUTO_MOVE_POSE && self.use_custom_charset?
  2966.     @pose = Direction.pose(direction)
  2967.   end
  2968.   
  2969.   #--------------------------------------------------------------------------
  2970.   # new method: create_movement
  2971.   #--------------------------------------------------------------------------
  2972.   def create_movement(destination_x, destination_y, frames = 12)
  2973.     return if @screen_x == destination_x && @screen_y == destination_y
  2974.     @destination_x = destination_x
  2975.     @destination_y = destination_y
  2976.     frames = [frames, 1].max
  2977.     @f = frames.to_f / 2
  2978.     @move_x_rate = [(@screen_x - @destination_x).abs / frames, 2].max
  2979.     @move_y_rate = [(@screen_y - @destination_y).abs / frames, 2].max
  2980.   end
  2981.   
  2982.   #--------------------------------------------------------------------------
  2983.   # new method: create_jump
  2984.   #--------------------------------------------------------------------------
  2985.   def create_jump(arc)
  2986.     @arc = arc
  2987.     @parabola[:x] = 0
  2988.     @parabola[:y0] = 0
  2989.     @parabola[:y1] = @destination_y - @screen_y
  2990.     @parabola[:h]  = - (@parabola[:y0] + @arc * 5)
  2991.     @parabola[:d]  = (@screen_x - @destination_x).abs
  2992.   end
  2993.   
  2994.   #--------------------------------------------------------------------------
  2995.   # new method: create_icon
  2996.   #--------------------------------------------------------------------------
  2997.   def create_icon(symbol, icon_id = 0)
  2998.     delete_icon(symbol)
  2999.     #---
  3000.     icon = Sprite_Object.new(self.sprite.viewport)
  3001.     case symbol
  3002.     when :weapon1
  3003.       object = self.weapons[0]
  3004.       icon_id = object.nil? ? nil : object.icon_index
  3005.     when :weapon2
  3006.       object = dual_wield? ? self.weapons[1] : nil
  3007.       icon_id = object.nil? ? nil : object.icon_index
  3008.     when :shield
  3009.       object = dual_wield? ? nil : self.equips[1]
  3010.       icon_id = object.nil? ? nil : object.icon_index
  3011.     when :item
  3012.       object = self.current_action.item
  3013.       icon_id = object.nil? ? nil : object.icon_index
  3014.     else; end
  3015.     return if icon_id.nil? || icon_id <= 0
  3016.     icon.set_icon(icon_id)
  3017.     icon.set_battler(self)
  3018.     #---
  3019.     @icons[symbol] = icon
  3020.   end
  3021.    
  3022.   #--------------------------------------------------------------------------
  3023.   # new method: delete_icon
  3024.   #--------------------------------------------------------------------------
  3025.   def delete_icon(symbol)
  3026.     return unless @icons[symbol]
  3027.     @icons[symbol].dispose
  3028.     @icons.delete(symbol)
  3029.   end
  3030.   
  3031.   #--------------------------------------------------------------------------
  3032.   # new method: clear_icons
  3033.   #--------------------------------------------------------------------------
  3034.   def clear_icons
  3035.     @icons.each { |key, value|
  3036.       value.dispose
  3037.       @icons.delete(key)
  3038.     }
  3039.   end
  3040.   
  3041.   #--------------------------------------------------------------------------
  3042.   # new method: update_movement
  3043.   #--------------------------------------------------------------------------
  3044.   def update_movement
  3045.     return unless self.is_moving?
  3046.     @move_x_rate = 0 if @screen_x == @destination_x || @move_x_rate.nil?
  3047.     @move_y_rate = 0 if @screen_y == @destination_y || @move_y_rate.nil?
  3048.     value = [(@screen_x - @destination_x).abs, @move_x_rate].min
  3049.     @screen_x += (@destination_x > @screen_x) ? value : -value
  3050.     value = [(@screen_y - @destination_y).abs, @move_y_rate].min
  3051.     @screen_y += (@destination_y > @screen_y) ? value : -value
  3052.   end
  3053.   
  3054.   #--------------------------------------------------------------------------
  3055.   # new method: update_jump
  3056.   #--------------------------------------------------------------------------
  3057.   def update_jump
  3058.     return unless self.is_moving?
  3059.     #---
  3060.     value = [(@screen_x - @destination_x).abs, @move_x_rate].min
  3061.     @screen_x += (@destination_x > @screen_x) ? value : -value
  3062.     @parabola[:x] += value
  3063.     @screen_y -= @arc_y
  3064.     #---
  3065.     if @destination_x == @screen_x
  3066.       @screen_y = @destination_y
  3067.       @arc_y = 0
  3068.       @arc = 0
  3069.     else
  3070.       a = (2.0*(@parabola[:y0]+@parabola[:y1])-4*@parabola[:h])/(@parabola[:d]**2)
  3071.       b = (@parabola[:y1]-@parabola[:y0]-a*(@parabola[:d]**2))/@parabola[:d]
  3072.       @arc_y = a * @parabola[:x] * @parabola[:x] + b * @parabola[:x] + @parabola[:y0]
  3073.     end
  3074.     #---
  3075.     @screen_y += @arc_y
  3076.     @move_x_rate = 0 if @screen_x == @destination_x
  3077.     @move_y_rate = 0 if @screen_y == @destination_y
  3078.   end
  3079.   
  3080.   #--------------------------------------------------------------------------
  3081.   # new method: update_icons
  3082.   #--------------------------------------------------------------------------
  3083.   def update_icons
  3084.     @icons ||= {}
  3085.     @icons.each_value { |value| value.update }
  3086.   end
  3087.   
  3088.   #--------------------------------------------------------------------------
  3089.   # new method: update_visual
  3090.   #--------------------------------------------------------------------------
  3091.   def update_visual
  3092.     return unless SceneManager.scene_is?(Scene_Battle)
  3093.     return unless SceneManager.scene.spriteset
  3094.     correct_origin_position
  3095.     #---
  3096.     @arc == 0 ? update_movement : update_jump
  3097.     update_icons
  3098.   end
  3099.   
  3100.   #--------------------------------------------------------------------------
  3101.   # new method: is_moving?
  3102.   #--------------------------------------------------------------------------
  3103.   def is_moving?
  3104.     [@move_x_rate, @move_y_rate].any? { |x| x != 0 }
  3105.   end
  3106.   
  3107.   #--------------------------------------------------------------------------
  3108.   # new method: is_moving?
  3109.   #--------------------------------------------------------------------------
  3110.   def dual_attack?
  3111.     self.actor? && self.current_action.attack? && self.dual_wield? && self.weapons.size > 1
  3112.   end
  3113.   
  3114. end # Game_Battler

  3115. #==============================================================================
  3116. # ■ Sprite_Battler
  3117. #==============================================================================

  3118. class Sprite_Battler < Sprite_Base
  3119.   
  3120.   #--------------------------------------------------------------------------
  3121.   # new method: is_moving?
  3122.   #--------------------------------------------------------------------------
  3123.   def is_moving?
  3124.     return unless @battler
  3125.     @battler.is_moving?
  3126.   end
  3127.   
  3128. end # Sprite_Battler

  3129. #==============================================================================
  3130. # ■ Spriteset_Battle
  3131. #==============================================================================

  3132. class Spriteset_Battle
  3133.   
  3134.   #--------------------------------------------------------------------------
  3135.   # new method: is_moving?
  3136.   #--------------------------------------------------------------------------
  3137.   def is_moving?
  3138.     self.battler_sprites.any? { |sprite| sprite.is_moving? }
  3139.   end
  3140.   
  3141. end # Spriteset_Battle

  3142. #==============================================================================
  3143. # ■ Window_BattleLog
  3144. #==============================================================================

  3145. class Window_BattleLog < Window_Selectable
  3146.   
  3147.   
  3148.   
  3149. end # Window_BattleLog

  3150. #==============================================================================
  3151. # ■ Scene_Battle
  3152. #==============================================================================

  3153. class Scene_Battle < Scene_Base
  3154.   
  3155.   #--------------------------------------------------------------------------
  3156.   # overwrite method: use_item
  3157.   #--------------------------------------------------------------------------
  3158.   def use_item
  3159.     @scene_item = item = @subject.current_action.item
  3160.     targets = @subject.current_action.make_targets.compact
  3161.     #---
  3162.     attack = @subject.current_action.attack?
  3163.     weapon = @subject.weapons[0]
  3164.     w_action = attack && weapon
  3165.     #---
  3166.     targets = targets * 2 if attack && @subject.dual_attack?
  3167.     #--- Setup Actions ---
  3168.     actions_list = item.setup_actions_list
  3169.     actions_list = weapon.setup_actions_list if w_action && weapon.valid_actions?(:setup)
  3170.     perform_actions_list(actions_list, targets)
  3171.     #--- Item Costs ---
  3172.     @subject.use_item(item)
  3173.     refresh_status
  3174.     #--- YEA - Cast Animation
  3175.     process_casting_animation if $imported["YEA-CastAnimations"]
  3176.     #--- YEA - Lunatic Object
  3177.     if $imported["YEA-LunaticObjects"]
  3178.       lunatic_object_effect(:before, item, @subject, @subject)
  3179.     end
  3180.     #--- Whole Actions ---
  3181.     actions_list = item.whole_actions_list
  3182.     actions_list = weapon.whole_actions_list if w_action && weapon.valid_actions?(:whole)
  3183.     perform_actions_list(actions_list, targets)
  3184.     #--- Target Actions ---
  3185.     actions_list = item.target_actions_list
  3186.     actions_list = weapon.target_actions_list if w_action && weapon.valid_actions?(:target)
  3187.     targets.each { |target|
  3188.       next if target.dead?
  3189.       perform_actions_list(actions_list, [target])
  3190.     }
  3191.     #--- Follow Actions ---
  3192.     actions_list = item.follow_actions_list
  3193.     actions_list = weapon.follow_actions_list if w_action && weapon.valid_actions?(:follow)
  3194.     perform_actions_list(actions_list, targets)
  3195.     #--- Finish Actions ---
  3196.     actions_list = item.finish_actions_list
  3197.     actions_list = weapon.finish_actions_list if w_action && weapon.valid_actions?(:finish)
  3198.     immortal_flag = ["IMMORTAL", ["TARGETS", "FALSE"]]
  3199.     if !actions_list.include?(immortal_flag)
  3200.       if SYMPHONY::Fixes::AUTO_IMMORTAL_OFF
  3201.         actions_list = [immortal_flag] + actions_list
  3202.       end
  3203.     end
  3204.     perform_actions_list(actions_list, targets)
  3205.     #--- YEA - Lunatic Object
  3206.     if $imported["YEA-LunaticObjects"]
  3207.       lunatic_object_effect(:after, item, @subject, @subject)
  3208.     end
  3209.     targets.each { |target|
  3210.       next unless target.actor?
  3211.       @status_window.draw_item(target.index)
  3212.     }
  3213.   end
  3214.   
  3215.   #--------------------------------------------------------------------------
  3216.   # alias method: invoke_item
  3217.   #--------------------------------------------------------------------------
  3218.   alias bes_invoke_item invoke_item
  3219.   def invoke_item(target, item)
  3220.     if $imported["YEA-TargetManager"]
  3221.       target = alive_random_target(target, item) if item.for_random?
  3222.     end
  3223.     bes_invoke_item(target, item)
  3224.     #--- Critical Actions ---
  3225.     actions_list = SYMPHONY::DEFAULT_ACTIONS::CRITICAL_ACTIONS
  3226.     perform_actions_list(actions_list, [target]) if target.result.critical
  3227.     #--- Miss Actions ---
  3228.     actions_list = SYMPHONY::DEFAULT_ACTIONS::MISS_ACTIONS
  3229.     perform_actions_list(actions_list, [target]) if target.result.missed
  3230.     #--- Evade Actions ---
  3231.     actions_list = SYMPHONY::DEFAULT_ACTIONS::EVADE_ACTIONS
  3232.     perform_actions_list(actions_list, [target]) if target.result.evaded
  3233.     #--- Fail Actions ---
  3234.     actions_list = SYMPHONY::DEFAULT_ACTIONS::FAIL_ACTIONS
  3235.     perform_actions_list(actions_list, [target]) if !target.result.success
  3236.     #--- Damaged Actions
  3237.     actions_list = SYMPHONY::DEFAULT_ACTIONS::DAMAGED_ACTION
  3238.     perform_actions_list(actions_list, [target]) if target.result.has_damage?
  3239.   end
  3240.   
  3241.   #--------------------------------------------------------------------------
  3242.   # alias method: execute_action
  3243.   #--------------------------------------------------------------------------
  3244.   alias bes_execute_action execute_action
  3245.   def execute_action
  3246.     bes_execute_action
  3247.     #--- Reset Flags ---
  3248.     ($game_party.battle_members + $game_troop.members).each { |battler|
  3249.       battler.result.set_calc; battler.result.clear
  3250.       battler.clear_icons
  3251.       battler.set_default_position
  3252.       battler.break_pose
  3253.     }
  3254.     $game_troop.screen.clear_bes_ve if $imported["BattleSymphony-VisualEffect"]
  3255.     @status_window.draw_item(@status_window.index)
  3256.   end
  3257.   
  3258.   #--------------------------------------------------------------------------
  3259.   # overwrite method: invoke_counter_attack
  3260.   #--------------------------------------------------------------------------
  3261.   def invoke_counter_attack(target, item)
  3262.     @log_window.display_counter(target, item)
  3263.     last_subject = @subject
  3264.     @counter_subject = target
  3265.     @subject = target
  3266.     #---
  3267.     @subject.backup_actions
  3268.     #---
  3269.     @subject.make_actions
  3270.     @subject.current_action.set_attack
  3271.     #---
  3272.     actions_list = SYMPHONY::DEFAULT_ACTIONS::COUNTER_ACTION
  3273.     perform_actions_list(actions_list, [last_subject])
  3274.     #---
  3275.     @subject.clear_actions
  3276.     @subject = last_subject
  3277.     #---
  3278.     @counter_subject.restore_actions
  3279.     #---
  3280.     @counter_subject = nil
  3281.     @log_window.display_action_results(@subject, item)
  3282.     refresh_status
  3283.     perform_collapse_check(@subject)
  3284.     perform_collapse_check(target)
  3285.   end
  3286.   
  3287.   #--------------------------------------------------------------------------
  3288.   # overwrite method: invoke_magic_reflection
  3289.   #--------------------------------------------------------------------------
  3290.   def invoke_magic_reflection(target, item)
  3291.     @subject.magic_reflection = true
  3292.     @log_window.display_reflection(target, item)
  3293.     last_subject = @subject
  3294.     @reflect_subject = target
  3295.     @subject = target
  3296.     #---
  3297.     @subject.backup_actions
  3298.     #---
  3299.     @subject.make_actions
  3300.     if item.is_a?(RPG::Skill); @subject.current_action.set_skill(item.id)
  3301.       else; @subject.current_action.set_item(item.id); end
  3302.     #---
  3303.     actions_list = SYMPHONY::DEFAULT_ACTIONS::REFLECT_ACTION
  3304.     perform_actions_list(actions_list, [last_subject])
  3305.     #---
  3306.     @subject.clear_actions
  3307.     @subject = last_subject
  3308.     #---
  3309.     @reflect_subject.restore_actions
  3310.     #---
  3311.     @reflect_subject = nil
  3312.     @log_window.display_action_results(@subject, item)
  3313.     refresh_status
  3314.     perform_collapse_check(@subject)
  3315.     perform_collapse_check(target)
  3316.     @subject.magic_reflection = false
  3317.   end
  3318.    
  3319.   #--------------------------------------------------------------------------
  3320.   # new method: wait_for_move
  3321.   #--------------------------------------------------------------------------
  3322.   def wait_for_move
  3323.     update_for_wait
  3324.     update_for_wait while @spriteset.is_moving?
  3325.   end
  3326.   
  3327.   #--------------------------------------------------------------------------
  3328.   # new method: spriteset
  3329.   #--------------------------------------------------------------------------
  3330.   def spriteset
  3331.     @spriteset
  3332.   end
  3333.   
  3334.   #--------------------------------------------------------------------------
  3335.   # compatible overwrite method: separate_ani?
  3336.   #--------------------------------------------------------------------------
  3337.   if $imported["YEA-BattleEngine"]
  3338.   def separate_ani?(target, item)
  3339.     return false
  3340.   end
  3341.   end

  3342.   #--------------------------------------------------------------------------
  3343.   # new method: perform_collapse_check
  3344.   #--------------------------------------------------------------------------
  3345.   def perform_collapse_check(target)
  3346.     target.perform_collapse_effect if target.can_collapse?
  3347.     @log_window.wait_for_effect
  3348.   end
  3349.   
  3350.   #--------------------------------------------------------------------------
  3351.   # overwrite method: create_log_window
  3352.   #--------------------------------------------------------------------------
  3353. #~   def create_log_window
  3354. #~     @log_window = Window_BattleLog.new
  3355. #~   end
  3356.   
  3357. end # Scene_Battle

  3358. #===============================================================================
  3359. #
  3360. # END OF FILE
  3361. #
  3362. #===============================================================================
复制代码
因为现实太残酷、所以我们都在打造虚幻的天堂。如果现实不再残酷,也是因为有这快乐的天堂。
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
567
在线时间
465 小时
注册时间
2009-10-11
帖子
407
3
 楼主| 发表于 2015-6-12 14:52:58 | 只看该作者
隔了二日再度求助......
因为现实太残酷、所以我们都在打造虚幻的天堂。如果现实不再残酷,也是因为有这快乐的天堂。
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
567
在线时间
465 小时
注册时间
2009-10-11
帖子
407
4
 楼主| 发表于 2015-6-15 18:59:26 | 只看该作者
頂一個...希望有大大能幫忙看下腳本內的動作指令
因为现实太残酷、所以我们都在打造虚幻的天堂。如果现实不再残酷,也是因为有这快乐的天堂。
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-11-16 06:39

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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