vindaca510

V's State Evolutions v0.2

Dec 17th, 2013
353
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 5.74 KB | None | 0 0
  1. #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
  2. #                                                                              #
  3. #                             V's State Evolutions                             #
  4. #                                 Version  0.2                                 #
  5. #                                                                              #
  6. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  7. #                                Written By:  V                                #
  8. #                         Last Edited:  January 6, 2013                        #
  9. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  10. #                                                                              #
  11. #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
  12.  
  13.  
  14. #==============================================================================#
  15. #------------------------------------------------------------------------------#
  16. # ** Disclaimer                                                                #
  17. #------------------------------------------------------------------------------#
  18. #                                                                              #
  19. # This script was intended for Non-commercial use only, if you wish to use     #
  20. # this script in a commercial game please PM me at which ever site you found   #
  21. # this script. Either way please give me credit in your game script as the     #
  22. # writer of this script, and send me a PM abuot the release of the game/demo.  #
  23. #                                                                              #
  24. #------------------------------------------------------------------------------#
  25. # ** How To Use                                                                #
  26. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  27. #                                                                              #
  28. # * This script is Plug & Play.                                                #
  29. #                                                                              #
  30. # * Add this tag to any state notebox that you want to evolve.                 #
  31. #                                                                              #
  32. #   <Evolution State: state_id >                                               #
  33. #                                                                              #
  34. #------------------------------------------------------------------------------#
  35. # ** Description                                                               #
  36. #------------------------------------------------------------------------------#
  37. #                                                                              #
  38. #  v0.1                                                                        #
  39. # ~=~=~=~                                                                      #
  40. #  * This script automatically adds a state evolution feat. Let's say a zombie #
  41. #    bit you well at first your just 'Scarred' then after one turn the state   #
  42. #    is removed automatically, and a new one is added. Now your 'Feverish'     #
  43. #    and so on until your 'One of Them'. Or lets say you have a transform      #
  44. #    system based on states. Now when you are done with your 'Werewolf Form'   #
  45. #    three turn killing spree, it is removed and now you are back to           #
  46. #    'Human Form'. You can even use the 'Death' state.                         #
  47. #                                                                              #
  48. #  v0.2                                                                        #
  49. # ~=~=~=~                                                                      #
  50. #  * States now evolve with the "Steps Taken Removal Method."                  #
  51. #                                                                              #
  52. #------------------------------------------------------------------------------#
  53. #==============================================================================#
  54. #==============================================================================
  55. # ** V's State Evolutions
  56. #==============================================================================
  57.  
  58. #==============================================================================
  59. # ** Game_Battler
  60. #------------------------------------------------------------------------------
  61. #  A battler class with methods for sprites and actions added. This class
  62. # is used as a super class of the Game_Actor class and Game_Enemy class.
  63. #==============================================================================
  64.  
  65. class Game_Battler < Game_BattlerBase
  66.  
  67.   #--------------------------------------------------------------------------
  68.   # * Aliasing Method: Object Initialization
  69.   #--------------------------------------------------------------------------
  70.   alias :bgrs4520453270060780 :remove_state
  71.  
  72.   #--------------------------------------------------------------------------
  73.   # * Automatically Remove States
  74.   #     timing:  Timing (1: End of action 2: End of turn)
  75.   #--------------------------------------------------------------------------
  76.   def remove_state(state_id)
  77.     bgrs4520453270060780(state_id)
  78.     evolve_current_state(state_id)
  79.   end
  80.  
  81.   #--------------------------------------------------------------------------
  82.   # * Evolve Current State
  83.   #--------------------------------------------------------------------------
  84.   def evolve_current_state(state_id)
  85.     note = /<Evolution State:\s*(\d*)\s*>/i
  86.     data = $data_states[state_id].note.scan(note)
  87.     if data != []
  88.       new_state = $1.to_i
  89.       add_state(new_state)
  90.     end
  91.   end
  92.  
  93. end
Advertisement
Add Comment
Please, Sign In to add comment