Advertisement
FlipelyFlip

YEA - Lunatic States Animations-Fix

May 26th, 2024 (edited)
328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 24.61 KB | None | 0 0
  1. #==============================================================================
  2. #
  3. # ▼ Yanfly Engine Ace - Lunatic States v1.02
  4. # -- Last Updated: 2012.01.30
  5. # -- Level: Lunatic
  6. # -- Requires: n/a
  7. #
  8. #==============================================================================
  9.  
  10. $imported = {} if $imported.nil?
  11. $imported["YEA-LunaticStates"] = true
  12.  
  13. #==============================================================================
  14. # ▼ Updates
  15. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  16. # 2012.01.30 - Compatibility Update: Ace Battle Engine
  17. # 2011.12.19 - Fixed Death State stacking error.
  18. # 2011.12.15 - Started Script and Finished.
  19. #
  20. #==============================================================================
  21. # ▼ Introduction
  22. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  23. # Lunatic mode effects have always been a core part of Yanfly Engine scripts.
  24. # They exist to provide more effects for those who want more power and control
  25. # for their items, skills, status effects, etc., but the users must be able to
  26. # add them in themselves.
  27. #
  28. # This script provides the base setup for state lunatic effects. These effects
  29. # will occur under certain conditions, which can include when a state is
  30. # applied, erased, leaves naturally, before taking damage, after taking damage,
  31. # at the start of a turn, while an action finishes, and at the end of a turn.
  32. #
  33. #==============================================================================
  34. # ▼ Instructions
  35. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  36. # To install this script, open up your script editor and copy/paste this script
  37. # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
  38. #
  39. #==============================================================================
  40. # ▼ Compatibility
  41. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  42. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  43. # it will run with RPG Maker VX without adjusting.
  44. #
  45. #==============================================================================
  46.  
  47. class Game_BattlerBase
  48.  
  49.   #--------------------------------------------------------------------------
  50.   # ● Welcome to Lunatic Mode
  51.   # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  52.   # Lunatic States allow allow states to trigger various scripted functions
  53.   # throughout certain set periods of times or when certain conditions
  54.   # trigger. These effects can occur when a state is applied, when a state is
  55.   # erased, when a state leaves naturally, before damage is taken, after
  56.   # damage is taken, at the beginning of a turn, while the turn is occuring,
  57.   # and at the closing of a turn. These effects are separated by these eight
  58.   # different notetags.
  59.   #
  60.   #     <apply effect: string>     - Occurs when state is applied.
  61.   #     <erase effect: string>     - Occurs when state is removed.
  62.   #     <leave effect: string>     - Occurs when state timer hits 0.
  63.   #     <react effect: string>     - Occurs before taking damage.
  64.   #     <shock effect: string>     - Occurs after taking damage.
  65.   #     <begin effect: string>     - Occurs at the start of each turn.
  66.   #     <while effect: string>     - Occurs after performing an action.
  67.   #     <close effect: string>     - Occurs at the end of a turn.
  68.   #
  69.   # If multiple tags of the same type are used in the same skill/item's
  70.   # notebox, then the effects will occur in that order. Replace "string" in
  71.   # the tags with the appropriate flag for the method below to search for.
  72.   # Note that unlike the previous versions, these are all upcase.
  73.   #
  74.   # Should you choose to use multiple lunatic effects for a single state, you
  75.   # may use these notetags in place of the ones shown above.
  76.   #
  77.   #     <apply effect>      <erase effect>      <leave effect>
  78.   #      string              string              string
  79.   #      string              string              string
  80.   #     </apply effect>     </erase effect>     </leave effect>
  81.   #
  82.   #                <react effect>      <shock effect>
  83.   #                 string              string
  84.   #                 string              string
  85.   #                </react effect>     </shock effect>
  86.   #
  87.   #     <begin effect>      <while effect>      <close effect>
  88.   #      string              string              string
  89.   #      string              string              string
  90.   #     </begin effect>     </while effect>     </close effect>
  91.   #
  92.   # All of the string information in between those two notetags will be
  93.   # stored the same way as the notetags shown before those. There is no
  94.   # difference between using either.
  95.   #--------------------------------------------------------------------------
  96.   def lunatic_state_effect(type, state, user)
  97.     return unless SceneManager.scene_is?(Scene_Battle)
  98.     return if state.nil?
  99.     case type
  100.     when :apply; effects = state.apply_effects
  101.     when :erase; effects = state.erase_effects
  102.     when :leave; effects = state.leave_effects
  103.     when :react; effects = state.react_effects
  104.     when :shock; effects = state.shock_effects
  105.     when :begin; effects = state.begin_effects
  106.     when :while; effects = state.while_effects
  107.     when :close; effects = state.close_effects
  108.     else; return
  109.     end
  110.     log_window = SceneManager.scene.log_window
  111.     state_origin = state_origin?(state.id)
  112.     for effect in effects
  113.       case effect.upcase
  114.       #----------------------------------------------------------------------
  115.       # Common Effect: Apply
  116.       # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  117.       # This is a common effect that runs whenever a state is refreshly added
  118.       # to the battler's state pool. There is no need to modify this unless
  119.       # you see fit.
  120.       #----------------------------------------------------------------------
  121.       when /COMMON APPLY/i
  122.         # No common apply effects added.
  123.        
  124.       #----------------------------------------------------------------------
  125.       # Common Effect: Erase
  126.       # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  127.       # This is a common effect that runs whenever a state is removed from
  128.       # the battler's state pool. There is no need to modify this unless you
  129.       # see fit.
  130.       #----------------------------------------------------------------------
  131.       when /COMMON ERASE/i
  132.         # No common erase effects added.
  133.        
  134.       #----------------------------------------------------------------------
  135.       # Common Effect: Leave
  136.       # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  137.       # This is a common effect that runs whenever a state's turns reach 0
  138.       # and leaves the battler's state pool. There is no need to modify this
  139.       # unless you see fit.
  140.       #----------------------------------------------------------------------
  141.       when /COMMON LEAVE/i
  142.         # No common leave effects added.
  143.        
  144.       #----------------------------------------------------------------------
  145.       # Common Effect: React
  146.       # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  147.       # This is a common effect that runs right before the battler is about
  148.       # to take damage. There is no need to modify this unless you see fit.
  149.       #----------------------------------------------------------------------
  150.       when /COMMON REACT/i
  151.         # No common react effects added.
  152.        
  153.       #----------------------------------------------------------------------
  154.       # Common Effect: Shock
  155.       # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  156.       # This is a common effect that runs right after the battler has taken
  157.       # damage. There is no need to modify this unless you see fit.
  158.       #----------------------------------------------------------------------
  159.       when /COMMON SHOCK/i
  160.         # No common shock effects added.
  161.        
  162.       #----------------------------------------------------------------------
  163.       # Common Effect: Begin
  164.       # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  165.       # This is a common effect that runs at the start of the party's turn.
  166.       # There is no need to modify this unless you see fit.
  167.       #----------------------------------------------------------------------
  168.       when /COMMON BEGIN/i
  169.         # No common begin effects added.
  170.        
  171.       #----------------------------------------------------------------------
  172.       # Common Effect: While
  173.       # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  174.       # This is a common effect that runs at the end of the battler's turn.
  175.       # There is no need to modify this unless you see fit.
  176.       #----------------------------------------------------------------------
  177.       when /COMMON WHILE/i
  178.         # No common while effects added.
  179.        
  180.       #----------------------------------------------------------------------
  181.       # Common Effect: Close
  182.       # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  183.       # This is a common effect that runs at the end of the party's turn.
  184.       # There is no need to modify this unless you see fit.
  185.       #----------------------------------------------------------------------
  186.       when /COMMON CLOSE/i
  187.         # No common close effects added.
  188.      
  189.       when /SILENT/i
  190.         if (self.actions != [] && self.actions[0].item.hit_type==2)
  191.           self.setup_instant_reset
  192.           self.cast_pose = ""
  193.           user.atb_clear
  194.         end
  195.                  
  196.       #----------------------------------------------------------------------
  197.       # Stop editting past this point.
  198.       #----------------------------------------------------------------------
  199.       else
  200.         lunatic_state_extension(effect, state, user, state_origin, log_window)
  201.       end
  202.     end # for effect in effects
  203.   end # lunatic_object_effect
  204.  
  205. end # Game_BattlerBase
  206.  
  207. #==============================================================================
  208. # ▼ Editting anything past this point may potentially result in causing
  209. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  210. # halitosis so edit at your own risk.
  211. #==============================================================================
  212.  
  213. module YEA
  214.   module REGEXP
  215.   module STATE
  216.    
  217.     APPLY_EFFECT_STR = /<(?:APPLY_EFFECT|apply effect):[ ](.*)>/i
  218.     APPLY_EFFECT_ON  = /<(?:APPLY_EFFECT|apply effect)>/i
  219.     APPLY_EFFECT_OFF = /<\/(?:APPLY_EFFECT|apply effect)>/i
  220.    
  221.     ERASE_EFFECT_STR = /<(?:ERASE_EFFECT|erase effect):[ ](.*)>/i
  222.     ERASE_EFFECT_ON  = /<(?:ERASE_EFFECT|erase effect)>/i
  223.     ERASE_EFFECT_OFF = /<\/(?:ERASE_EFFECT|erase effect)>/i
  224.    
  225.     LEAVE_EFFECT_STR = /<(?:LEAVE_EFFECT|leave effect):[ ](.*)>/i
  226.     LEAVE_EFFECT_ON  = /<(?:LEAVE_EFFECT|leave effect)>/i
  227.     LEAVE_EFFECT_OFF = /<\/(?:LEAVE_EFFECT|leave effect)>/i
  228.    
  229.     REACT_EFFECT_STR = /<(?:REACT_EFFECT|react effect):[ ](.*)>/i
  230.     REACT_EFFECT_ON  = /<(?:REACT_EFFECT|react effect)>/i
  231.     REACT_EFFECT_OFF = /<\/(?:REACT_EFFECT|react effect)>/i
  232.    
  233.     SHOCK_EFFECT_STR = /<(?:SHOCK_EFFECT|shock effect):[ ](.*)>/i
  234.     SHOCK_EFFECT_ON  = /<(?:SHOCK_EFFECT|shock effect)>/i
  235.     SHOCK_EFFECT_OFF = /<\/(?:SHOCK_EFFECT|shock effect)>/i
  236.    
  237.     BEGIN_EFFECT_STR = /<(?:BEGIN_EFFECT|begin effect):[ ](.*)>/i
  238.     BEGIN_EFFECT_ON  = /<(?:BEGIN_EFFECT|begin effect)>/i
  239.     BEGIN_EFFECT_OFF = /<\/(?:BEGIN_EFFECT|begin effect)>/i
  240.    
  241.     WHILE_EFFECT_STR = /<(?:WHILE_EFFECT|while effect):[ ](.*)>/i
  242.     WHILE_EFFECT_ON  = /<(?:WHILE_EFFECT|while effect)>/i
  243.     WHILE_EFFECT_OFF = /<\/(?:WHILE_EFFECT|while effect)>/i
  244.    
  245.     CLOSE_EFFECT_STR = /<(?:CLOSE_EFFECT|close effect):[ ](.*)>/i
  246.     CLOSE_EFFECT_ON  = /<(?:CLOSE_EFFECT|close effect)>/i
  247.     CLOSE_EFFECT_OFF = /<\/(?:CLOSE_EFFECT|close effect)>/i
  248.    
  249.   end # STATE
  250.   end # REGEXP
  251. end # YEA
  252.  
  253. #==============================================================================
  254. # ■ DataManager
  255. #==============================================================================
  256.  
  257. module DataManager
  258.  
  259.   #--------------------------------------------------------------------------
  260.   # alias method: load_database
  261.   #--------------------------------------------------------------------------
  262.   class <<self; alias load_database_lsta load_database; end
  263.   def self.load_database
  264.     load_database_lsta
  265.     load_notetags_lsta
  266.   end
  267.  
  268.   #--------------------------------------------------------------------------
  269.   # new method: load_notetags_lsta
  270.   #--------------------------------------------------------------------------
  271.   def self.load_notetags_lsta
  272.     for state in $data_states
  273.       next if state.nil?
  274.       state.load_notetags_lsta
  275.     end
  276.   end
  277.  
  278. end # DataManager
  279.  
  280. #==============================================================================
  281. # ■ RPG::State
  282. #==============================================================================
  283.  
  284. class RPG::State < RPG::BaseItem
  285.  
  286.   #--------------------------------------------------------------------------
  287.   # public instance variables
  288.   #--------------------------------------------------------------------------
  289.   attr_accessor :apply_effects
  290.   attr_accessor :erase_effects
  291.   attr_accessor :leave_effects
  292.   attr_accessor :react_effects
  293.   attr_accessor :shock_effects
  294.   attr_accessor :begin_effects
  295.   attr_accessor :while_effects
  296.   attr_accessor :close_effects
  297.  
  298.   #--------------------------------------------------------------------------
  299.   # common cache: load_notetags_lsta
  300.   #--------------------------------------------------------------------------
  301.   def load_notetags_lsta
  302.     @apply_effects = ["COMMON APPLY"]
  303.     @erase_effects = ["COMMON ERASE"]
  304.     @leave_effects = ["COMMON LEAVE"]
  305.     @react_effects = ["COMMON REACT"]
  306.     @shock_effects = ["COMMON SHOCK"]
  307.     @begin_effects = ["COMMON BEGIN"]
  308.     @while_effects = ["COMMON WHILE"]
  309.     @close_effects = ["COMMON CLOSE"]
  310.     @apply_effects_on = false
  311.     @erase_effects_on = false
  312.     @leave_effects_on = false
  313.     @react_effects_on = false
  314.     @shock_effects_on = false
  315.     @begin_effects_on = false
  316.     @while_effects_on = false
  317.     @close_effects_on = false
  318.     #---
  319.     self.note.split(/[\r\n]+/).each { |line|
  320.       case line
  321.       #---
  322.       when YEA::REGEXP::STATE::APPLY_EFFECT_STR
  323.         @apply_effects.push($1.to_s)
  324.       when YEA::REGEXP::STATE::ERASE_EFFECT_STR
  325.         @erase_effects.push($1.to_s)
  326.       when YEA::REGEXP::STATE::LEAVE_EFFECT_STR
  327.         @leave_effects.push($1.to_s)
  328.       when YEA::REGEXP::STATE::REACT_EFFECT_STR
  329.         @react_effects.push($1.to_s)
  330.       when YEA::REGEXP::STATE::SHOCK_EFFECT_STR
  331.         @shock_effects.push($1.to_s)
  332.       when YEA::REGEXP::STATE::BEGIN_EFFECT_STR
  333.         @begin_effects.push($1.to_s)
  334.       when YEA::REGEXP::STATE::WHILE_EFFECT_STR
  335.         @while_effects.push($1.to_s)
  336.       when YEA::REGEXP::STATE::CLOSE_EFFECT_STR
  337.         @close_effects.push($1.to_s)
  338.       #---
  339.       when YEA::REGEXP::STATE::APPLY_EFFECT_ON
  340.         @apply_effects_on = true
  341.       when YEA::REGEXP::STATE::ERASE_EFFECT_ON
  342.         @erase_effects_on = true
  343.       when YEA::REGEXP::STATE::LEAVE_EFFECT_ON
  344.         @leave_effects_on = true
  345.       when YEA::REGEXP::STATE::REACT_EFFECT_ON
  346.         @react_effects_on = true
  347.       when YEA::REGEXP::STATE::SHOCK_EFFECT_ON
  348.         @shock_effects_on = true
  349.       when YEA::REGEXP::STATE::BEGIN_EFFECT_ON
  350.         @begin_effects_on = true
  351.       when YEA::REGEXP::STATE::WHILE_EFFECT_ON
  352.         @while_effects_on = true
  353.       when YEA::REGEXP::STATE::CLOSE_EFFECT_ON
  354.         @close_effects_on = true
  355.       #---
  356.       when YEA::REGEXP::STATE::APPLY_EFFECT_OFF
  357.         @apply_effects_on = false
  358.       when YEA::REGEXP::STATE::ERASE_EFFECT_OFF
  359.         @erase_effects_on = false
  360.       when YEA::REGEXP::STATE::LEAVE_EFFECT_OFF
  361.         @leave_effects_on = false
  362.       when YEA::REGEXP::STATE::REACT_EFFECT_OFF
  363.         @react_effects_on = false
  364.       when YEA::REGEXP::STATE::SHOCK_EFFECT_OFF
  365.         @shock_effects_on = false
  366.       when YEA::REGEXP::STATE::BEGIN_EFFECT_OFF
  367.         @begin_effects_on = false
  368.       when YEA::REGEXP::STATE::WHILE_EFFECT_OFF
  369.         @while_effects_on = false
  370.       when YEA::REGEXP::STATE::CLOSE_EFFECT_OFF
  371.         @close_effects_on = false
  372.       #---
  373.       else
  374.         @apply_effects.push(line.to_s) if @after_effects_on
  375.         @erase_effects.push(line.to_s) if @erase_effects_on
  376.         @leave_effects.push(line.to_s) if @leave_effects_on
  377.         @react_effects.push(line.to_s) if @react_effects_on
  378.         @shock_effects.push(line.to_s) if @shock_effects_on
  379.         @begin_effects.push(line.to_s) if @begin_effects_on
  380.         @while_effects.push(line.to_s) if @while_effects_on
  381.         @close_effects.push(line.to_s) if @close_effects_on
  382.       end
  383.     } # self.note.split
  384.     #---
  385.   end
  386.  
  387. end # RPG::State
  388.  
  389. #==============================================================================
  390. # ■ Game_BattlerBase
  391. #==============================================================================
  392.  
  393. class Game_BattlerBase
  394.  
  395.   #--------------------------------------------------------------------------
  396.   # alias method: clear_states
  397.   #--------------------------------------------------------------------------
  398.   alias game_battlerbase_clear_states_lsta clear_states
  399.   def clear_states
  400.     game_battlerbase_clear_states_lsta
  401.     clear_state_origins
  402.   end
  403.  
  404.   #--------------------------------------------------------------------------
  405.   # alias method: erase_state
  406.   #--------------------------------------------------------------------------
  407.   alias game_battlerbase_erase_state_lsta erase_state
  408.   def erase_state(state_id)
  409.     lunatic_state_effect(:erase, $data_states[state_id], self)
  410.     change_state_origin(:erase)
  411.     game_battlerbase_erase_state_lsta(state_id)
  412.   end
  413.  
  414.   #--------------------------------------------------------------------------
  415.   # new method: clear_state_origins
  416.   #--------------------------------------------------------------------------
  417.   def clear_state_origins
  418.     @state_origins = {}
  419.   end
  420.  
  421.   #--------------------------------------------------------------------------
  422.   # new method: change_state_origin
  423.   #--------------------------------------------------------------------------
  424.   def change_state_origin(state_id, type = :apply)
  425.     return unless $game_party.in_battle
  426.     return if state_id == death_state_id
  427.     if :apply && SceneManager.scene_is?(Scene_Battle)
  428.       subject = SceneManager.scene.subject
  429.       clear_state_origins if @state_origins.nil?
  430.       if subject.nil?
  431.         @state_origins[state_id] = [:actor, self.id] if self.actor?
  432.         @state_origins[state_id] = [:enemy, self.index] unless self.actor?
  433.       elsif subject.actor?
  434.         @state_origins[state_id] = [:actor, subject.id]
  435.       else
  436.         @state_origins[state_id] = [:enemy, subject.index]
  437.       end
  438.     else # :erase
  439.       @state_origins[state_id] = nil
  440.     end
  441.   end
  442.  
  443.   #--------------------------------------------------------------------------
  444.   # new method: state_origin?
  445.   #--------------------------------------------------------------------------
  446.   def state_origin?(state_id)
  447.     return self unless $game_party.in_battle
  448.     return self if @state_origins[state_id].nil?
  449.     team = @state_origins[state_id][0]
  450.     subject = @state_origins[state_id][1]
  451.     if team == :actor
  452.       return $game_actors[subject]
  453.     else # :enemy
  454.       return $game_troop.members[subject]
  455.     end
  456.   end
  457.  
  458. end # Game_BattlerBase
  459.  
  460. #==============================================================================
  461. # ■ Game_Battler
  462. #==============================================================================
  463.  
  464. class Game_Battler < Game_BattlerBase
  465.  
  466.   #--------------------------------------------------------------------------
  467.   # alias method: on_battle_start
  468.   #--------------------------------------------------------------------------
  469.   alias game_battler_on_battle_start_lsta on_battle_start
  470.   def on_battle_start
  471.     game_battler_on_battle_start_lsta
  472.     clear_state_origins
  473.   end
  474.  
  475.   #--------------------------------------------------------------------------
  476.   # alias method: on_battle_end
  477.   #--------------------------------------------------------------------------
  478.   alias game_battler_on_battle_end_lsta on_battle_end
  479.   def on_battle_end
  480.     game_battler_on_battle_end_lsta
  481.     clear_state_origins
  482.   end
  483.  
  484.   #--------------------------------------------------------------------------
  485.   # alias method: add_new_state
  486.   #--------------------------------------------------------------------------
  487.   alias game_battler_add_new_state_lsta add_new_state
  488.   def add_new_state(state_id)
  489.     change_state_origin(state_id, :apply)
  490.     lunatic_state_effect(:apply, $data_states[state_id], self)
  491.     game_battler_add_new_state_lsta(state_id)
  492.   end
  493.  
  494.   #--------------------------------------------------------------------------
  495.   # alias method: remove_states_auto
  496.   #--------------------------------------------------------------------------
  497.   alias game_battler_remove_states_auto_lsta remove_states_auto
  498.   def remove_states_auto(timing)
  499.     states.each do |state|
  500.       if @state_turns[state.id] == 0 && state.auto_removal_timing == timing
  501.         lunatic_state_effect(:leave, state, self)
  502.       end
  503.     end
  504.     game_battler_remove_states_auto_lsta(timing)
  505.   end
  506.  
  507.   #--------------------------------------------------------------------------
  508.   # alias method: execute_damage
  509.   #--------------------------------------------------------------------------
  510.   alias game_battler_execute_damage_lsta execute_damage
  511.   def execute_damage(user)
  512.     for state in states; run_lunatic_states(:react); end
  513.     game_battler_execute_damage_lsta(user)
  514.     @result.restore_damage if $imported["YEA-BattleEngine"]
  515.     for state in states; run_lunatic_states(:shock); end
  516.     return unless $imported["YEA-BattleEngine"]
  517.     @result.store_damage
  518.     @result.clear_damage_values
  519.   end
  520.  
  521.   #--------------------------------------------------------------------------
  522.   # new method: run_lunatic_states
  523.   #--------------------------------------------------------------------------
  524.   def run_lunatic_states(type)
  525.     for state in states; lunatic_state_effect(type, state, self); end
  526.   end
  527.  
  528. end # Game_Battler
  529.  
  530. #==============================================================================
  531. # ■ Scene_Battle
  532. #==============================================================================
  533.  
  534. class Scene_Battle < Scene_Base
  535.  
  536.   #--------------------------------------------------------------------------
  537.   # public instance variables
  538.   #--------------------------------------------------------------------------
  539.   attr_accessor :log_window
  540.   attr_accessor :subject
  541.  
  542.   #--------------------------------------------------------------------------
  543.   # alias method: turn_start
  544.   #--------------------------------------------------------------------------
  545.   alias scene_battle_turn_start_lsta turn_start
  546.   def turn_start
  547.     scene_battle_turn_start_lsta
  548.     for member in all_battle_members; member.run_lunatic_states(:begin); end
  549.   end
  550.  
  551.   #--------------------------------------------------------------------------
  552.   # alias method: turn_end
  553.   #--------------------------------------------------------------------------
  554.   alias scene_battle_turn_end_lsta turn_end
  555.   def turn_end
  556.     for member in all_battle_members; member.run_lunatic_states(:close); end
  557.     scene_battle_turn_end_lsta
  558.   end
  559.  
  560.   #--------------------------------------------------------------------------
  561.   # alias method: execute_action
  562.   #--------------------------------------------------------------------------
  563.   alias scene_battle_execute_action_lsta execute_action
  564.   def execute_action
  565.     scene_battle_execute_action_lsta
  566.     @subject.run_lunatic_states(:while)
  567.   end
  568.  
  569. end # Scene_Battle
  570.  
  571. #==============================================================================
  572. # ■ Game_BattlerBase
  573. #==============================================================================
  574.  
  575. class Game_BattlerBase
  576.  
  577.   #--------------------------------------------------------------------------
  578.   # new method: lunatic_state_extension
  579.   #--------------------------------------------------------------------------
  580.   def lunatic_state_extension(effect, state, user, state_origin, log_window)
  581.     # Reserved for future Add-ons.
  582.   end
  583.  
  584. end # Game_BattlerBase
  585.  
  586. #==============================================================================
  587. #
  588. # ▼ End of File
  589. #
  590. #==============================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement