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

Project1

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

[已经过期] 横版 角色受伤的数字没有显示在角色头上

[复制链接]

Lv3.寻梦者

梦石
0
星屑
2767
在线时间
675 小时
注册时间
2012-1-29
帖子
89
跳转到指定楼层
1
发表于 2012-9-9 00:56:48 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 小小小蚩尤 于 2012-9-9 00:58 编辑

希望可以调整到主角头上
图片在最下面
附上横版伤害效果管理脚本
  1. #==============================================================================
  2. #
  3. # ▼ Yanfly Engine Ace - Buff & State Manager v1.06
  4. # -- Last Updated: 2012.01.23
  5. # -- Level: Normal
  6. # -- Requires: n/a
  7. #
  8. #==============================================================================

  9. $imported = {} if $imported.nil?
  10. $imported["YEA-Buff&StateManager"] = false

  11. #==============================================================================
  12. # ▼ Updates
  13. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  14. # 2012.01.23 - Compatibility Update: Doppelganger
  15. # 2012.01.11 - Compatibility Update: Field State Effects
  16. # 2012.01.09 - Bug Fixed: Remaining turns weren't drawn properly again.
  17. # 2012.01.07 - Bug Fixed: Remaining turns weren't drawn properly.
  18. # 2011.12.30 - Bug Fixed: Decimals are no longer shown on states turns.
  19. # 2011.12.28 - Added <state x turn: +y> for actors, classes, weapons, armours,
  20. #              enemies, and states.
  21. # 2011.12.27 - Started Script and Finished.
  22. #
  23. #==============================================================================
  24. # ▼ Introduction
  25. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  26. # This script alters some of the basic mechanics revolving behind states,
  27. # buffs, and debuffs that aren't adjustable within RPG Maker VX Ace by default
  28. # such as being able to affect the turns remaining on a state, buff, or debuff
  29. # without affecting anything else or even adjusting how many times a buff (or
  30. # debuff) can be applied to an actor.
  31. #
  32. #==============================================================================
  33. # ▼ Instructions
  34. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  35. # To install this script, open up your script editor and copy/paste this script
  36. # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
  37. #
  38. # -----------------------------------------------------------------------------
  39. # Actor Notetags - These notetags go in the actors notebox in the database.
  40. # -----------------------------------------------------------------------------
  41. # <max buff stat: +x>
  42. # <max buff stat: -x>
  43. # Increases or decreases the maximum times that particular stat can be buffed
  44. # by x. Note that the max increase here is still limited by the module constant
  45. # MAXIMUM_BUFF_LIMIT. Replace "stat" with "MAXHP", "MAXMP", "ATK", "DEF",
  46. # "MAT", "MDF", "AGI", "LUK", or "ALL" for those respective stats.
  47. #
  48. # <max debuff stat: +x>
  49. # <max debuff stat: -x>
  50. # Increases or decreases the maximum times that particular stat can be debuffed
  51. # by x. Note that the max decrease here is still limited by the module constant
  52. # MAXIMUM_BUFF_LIMIT. Replace "stat" with "MAXHP", "MAXMP", "ATK", "DEF",
  53. # "MAT", "MDF", "AGI", "LUK", or "ALL" for those respective stats.
  54. #
  55. # <state x turn: +y>
  56. # <state x turn: -y>
  57. # When the battler is affected by state x, additional modifiers are made to the
  58. # number of turns remaining for state x by y amount. The modifiers cannot
  59. # reduce turns to under 0.
  60. #
  61. # -----------------------------------------------------------------------------
  62. # Class Notetags - These notetags go in the class notebox in the database.
  63. # -----------------------------------------------------------------------------
  64. # <max buff stat: +x>
  65. # <max buff stat: -x>
  66. # Increases or decreases the maximum times that particular stat can be buffed
  67. # by x. Note that the max increase here is still limited by the module constant
  68. # MAXIMUM_BUFF_LIMIT. Replace "stat" with "MAXHP", "MAXMP", "ATK", "DEF",
  69. # "MAT", "MDF", "AGI", "LUK", or "ALL" for those respective stats.
  70. #
  71. # <max debuff stat: +x>
  72. # <max debuff stat: -x>
  73. # Increases or decreases the maximum times that particular stat can be debuffed
  74. # by x. Note that the max decrease here is still limited by the module constant
  75. # MAXIMUM_BUFF_LIMIT. Replace "stat" with "MAXHP", "MAXMP", "ATK", "DEF",
  76. # "MAT", "MDF", "AGI", "LUK", or "ALL" for those respective stats.
  77. #
  78. # <state x turn: +y>
  79. # <state x turn: -y>
  80. # When the battler is affected by state x, additional modifiers are made to the
  81. # number of turns remaining for state x by y amount. The modifiers cannot
  82. # reduce turns to under 0.
  83. #
  84. # -----------------------------------------------------------------------------
  85. # Skill Notetags - These notetags go in the skill notebox in the database.
  86. # -----------------------------------------------------------------------------
  87. # <state x turn: +y>
  88. # <state x turn: -y>
  89. # If the target is affected by state x, this will alter the turns remaining on
  90. # that state by y turns if the state can be removed by turns. If the state goes
  91. # under 0 turns, the state will be removed.
  92. #
  93. # <buff stat turn: +x>
  94. # <buff stat turn: -x>
  95. # If the target's stat is buffed, this will alter the turns remaining on that
  96. # buff by x turns. If the buff's remaining turns go under 0, the buff will be
  97. # removed.
  98. #
  99. # <debuff stat turn: +x>
  100. # <debuff stat turn: -x>
  101. # If the target's stat is debuffed, this will alter the turns remaining on that
  102. # debuff by x turns. If the debuff's remaining turns go under 0, the debuff
  103. # will be removed.
  104. #
  105. # -----------------------------------------------------------------------------
  106. # Item Notetags - These notetags go in the item notebox in the database.
  107. # -----------------------------------------------------------------------------
  108. # <state x turn: +y>
  109. # <state x turn: -y>
  110. # If the target is affected by state x, this will alter the turns remaining on
  111. # that state by y turns if the state can be removed by turns. If the state goes
  112. # under 0 turns, the state will be removed.
  113. #
  114. # <buff stat turn: +x>
  115. # <buff stat turn: -x>
  116. # If the target's stat is buffed, this will alter the turns remaining on that
  117. # buff by x turns. If the buff's remaining turns go under 0, the buff will be
  118. # removed.
  119. #
  120. # <debuff stat turn: +x>
  121. # <debuff stat turn: -x>
  122. # If the target's stat is debuffed, this will alter the turns remaining on that
  123. # debuff by x turns. If the debuff's remaining turns go under 0, the debuff
  124. # will be removed.
  125. #
  126. # -----------------------------------------------------------------------------
  127. # Weapon Notetags - These notetags go in the weapons notebox in the database.
  128. # -----------------------------------------------------------------------------
  129. # <max buff stat: +x>
  130. # <max buff stat: -x>
  131. # Increases or decreases the maximum times that particular stat can be buffed
  132. # by x. Note that the max increase here is still limited by the module constant
  133. # MAXIMUM_BUFF_LIMIT. Replace "stat" with "MAXHP", "MAXMP", "ATK", "DEF",
  134. # "MAT", "MDF", "AGI", "LUK", or "ALL" for those respective stats.
  135. #
  136. # <max debuff stat: +x>
  137. # <max debuff stat: -x>
  138. # Increases or decreases the maximum times that particular stat can be debuffed
  139. # by x. Note that the max decrease here is still limited by the module constant
  140. # MAXIMUM_BUFF_LIMIT. Replace "stat" with "MAXHP", "MAXMP", "ATK", "DEF",
  141. # "MAT", "MDF", "AGI", "LUK", or "ALL" for those respective stats.
  142. #
  143. # <state x turn: +y>
  144. # <state x turn: -y>
  145. # When the battler is affected by state x, additional modifiers are made to the
  146. # number of turns remaining for state x by y amount. The modifiers cannot
  147. # reduce turns to under 0.
  148. #
  149. # -----------------------------------------------------------------------------
  150. # Armour Notetags - These notetags go in the armour notebox in the database.
  151. # -----------------------------------------------------------------------------
  152. # <max buff stat: +x>
  153. # <max buff stat: -x>
  154. # Increases or decreases the maximum times that particular stat can be buffed
  155. # by x. Note that the max increase here is still limited by the module constant
  156. # MAXIMUM_BUFF_LIMIT. Replace "stat" with "MAXHP", "MAXMP", "ATK", "DEF",
  157. # "MAT", "MDF", "AGI", "LUK", or "ALL" for those respective stats.
  158. #
  159. # <max debuff stat: +x>
  160. # <max debuff stat: -x>
  161. # Increases or decreases the maximum times that particular stat can be debuffed
  162. # by x. Note that the max decrease here is still limited by the module constant
  163. # MAXIMUM_BUFF_LIMIT. Replace "stat" with "MAXHP", "MAXMP", "ATK", "DEF",
  164. # "MAT", "MDF", "AGI", "LUK", or "ALL" for those respective stats.
  165. #
  166. # <state x turn: +y>
  167. # <state x turn: -y>
  168. # When the battler is affected by state x, additional modifiers are made to the
  169. # number of turns remaining for state x by y amount. The modifiers cannot
  170. # reduce turns to under 0.
  171. #
  172. # -----------------------------------------------------------------------------
  173. # Enemy Notetags - These notetags go in the enemies notebox in the database.
  174. # -----------------------------------------------------------------------------
  175. # <max buff stat: +x>
  176. # <max buff stat: -x>
  177. # Increases or decreases the maximum times that particular stat can be buffed
  178. # by x. Note that the max increase here is still limited by the module constant
  179. # MAXIMUM_BUFF_LIMIT. Replace "stat" with "MAXHP", "MAXMP", "ATK", "DEF",
  180. # "MAT", "MDF", "AGI", "LUK", or "ALL" for those respective stats.
  181. #
  182. # <max debuff stat: +x>
  183. # <max debuff stat: -x>
  184. # Increases or decreases the maximum times that particular stat can be debuffed
  185. # by x. Note that the max decrease here is still limited by the module constant
  186. # MAXIMUM_BUFF_LIMIT. Replace "stat" with "MAXHP", "MAXMP", "ATK", "DEF",
  187. # "MAT", "MDF", "AGI", "LUK", or "ALL" for those respective stats.
  188. #
  189. # <state x turn: +y>
  190. # <state x turn: -y>
  191. # When the battler is affected by state x, additional modifiers are made to the
  192. # number of turns remaining for state x by y amount. The modifiers cannot
  193. # reduce turns to under 0.
  194. #
  195. # -----------------------------------------------------------------------------
  196. # State Notetags - These notetags go in the states notebox in the database.
  197. # -----------------------------------------------------------------------------
  198. # <max buff stat: +x>
  199. # <max buff stat: -x>
  200. # Increases or decreases the maximum times that particular stat can be buffed
  201. # by x. Note that the max increase here is still limited by the module constant
  202. # MAXIMUM_BUFF_LIMIT. Replace "stat" with "MAXHP", "MAXMP", "ATK", "DEF",
  203. # "MAT", "MDF", "AGI", "LUK", or "ALL" for those respective stats.
  204. #
  205. # <max debuff stat: +x>
  206. # <max debuff stat: -x>
  207. # Increases or decreases the maximum times that particular stat can be debuffed
  208. # by x. Note that the max decrease here is still limited by the module constant
  209. # MAXIMUM_BUFF_LIMIT. Replace "stat" with "MAXHP", "MAXMP", "ATK", "DEF",
  210. # "MAT", "MDF", "AGI", "LUK", or "ALL" for those respective stats.
  211. #
  212. # <reapply ignore>
  213. # If this state is cast on a battler with the state already applied, turns
  214. # remaining will not be reset nor will turns be added on.
  215. #
  216. # <reapply reset>
  217. # If this state is cast on a battler with the state already applied, the turns
  218. # will be reset to the default amount of turns the state normally starts with.
  219. #
  220. # <reapply total>
  221. # If this state is cast on a battler with the state already applied, the turns
  222. # will be added on to the current amount of turns remaining giving the battler
  223. # a total of the remaining turns with the default turns for the state.
  224. #
  225. # <state x turn: +y>
  226. # <state x turn: -y>
  227. # When the battler is affected by state x, additional modifiers are made to the
  228. # number of turns remaining for state x by y amount. The modifiers cannot
  229. # reduce turns to under 0.
  230. #
  231. #==============================================================================
  232. # ▼ Compatibility
  233. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  234. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  235. # it will run with RPG Maker VX without adjusting.
  236. #
  237. #==============================================================================

  238. module YEA
  239.   module BUFF_STATE_MANAGER
  240.    
  241.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  242.     # - Draw Remaining Turns -
  243.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  244.     # This setting will cause the game to show the number of turns remaining
  245.     # for a state in battle (if the state will remove itself through turns).
  246.     # Adjust the settings below to change the font size and the y coordinate
  247.     # adjustment to where the turns remaining appear if you so desire.
  248.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  249.     SHOW_REMAINING_TURNS = true     # Show the turns remaining?
  250.     TURNS_REMAINING_SIZE = 18       # Font size used for turns remaining.
  251.     TURNS_REMAINING_Y    = -4       # Adjusts location of the text.
  252.    
  253.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  254.     # - Buff Settings -
  255.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  256.     # These settings adjust how buffs play out in your game and the way they
  257.     # modify a battler's stats such as the maximum times a stat can be buffed
  258.     # and the buff boost formula. Note that these maximums apply to both buffs
  259.     # and debuffs.
  260.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  261.     DEFAULT_BUFF_LIMIT = 4     # Normal times you can buff a stat. Default: 2
  262.     MAXIMUM_BUFF_LIMIT = 8     # Maximum times you can buff a stat. Default: 2
  263.    
  264.     # This is the formula used to apply the rate used for buffs and debuffs.
  265.     BUFF_BOOST_FORMULA = "buff_level(param_id) * 0.25 + 1.0"
  266.    
  267.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  268.     # - Reapplying State Settings -
  269.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  270.     # These settings adjust how the rules apply to states when they are
  271.     # reapplied onto an actor with the state already intact. If you wish to
  272.     # have specific states use different rules, use notetags to have them
  273.     # adjust turns differently.
  274.     #   0 - Ignored. Default VX setting.
  275.     #   1 - Turns reset back to existing turns. Default VX Ace Setting.
  276.     #   2 - Default turns added onto existing turns.
  277.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  278.     REAPPLY_STATE_RULES = 1
  279.    
  280.   end # BUFF_STATE_MANAGER
  281. end # YEA

  282. #==============================================================================
  283. # ▼ Editting anything past this point may potentially result in causing
  284. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  285. # halitosis so edit at your own risk.
  286. #==============================================================================

  287. module YEA
  288.   module REGEXP
  289.   module BASEITEM
  290.    
  291.     MAX_BUFF = /<(?:MAX_BUFF|max buff)[ ](.*):[ ]([\+\-]\d+)>/i
  292.     MAX_DEBUFF = /<(?:MAX_DEBUFF|max debuff)[ ](.*):[ ]([\+\-]\d+)>/i
  293.     CHANGE_STATE_TURN = /<(?:state)[ ](\d+)[ ](?:TURN|turns):[ ]([\+\-]\d+)>/i
  294.     STATE_REAPPLY_IGNORE = /<(?:REAPPLY_IGNORE|reapply ignore)>/i
  295.     STATE_REAPPLY_RESET = /<(?:REAPPLY_RESET|reapply reset)>/i
  296.     STATE_REAPPLY_TOTAL = /<(?:REAPPLY_TOTAL|reapply total)>/i
  297.    
  298.   end # BASEITEM
  299.   module USABLEITEM
  300.    
  301.     CHANGE_STATE_TURN = /<(?:state)[ ](\d+)[ ](?:TURN|turns):[ ]([\+\-]\d+)>/i
  302.     CHANGE_BUFF_TURN = /<(?:buff)[ ](.*)[ ](?:TURN|turns):[ ]([\+\-]\d+)>/i
  303.     CHANGE_DEBUFF_TURN = /<(?:debuff)[ ](.*)[ ](?:TURN|turns):[ ]([\+\-]\d+)>/i
  304.    
  305.   end # USABLEITEM
  306.   end # REGEXP
  307. end # YEA

  308. #==============================================================================
  309. # ■ DataManager
  310. #==============================================================================

  311. module DataManager
  312.   
  313.   #--------------------------------------------------------------------------
  314.   # alias method: load_database
  315.   #--------------------------------------------------------------------------
  316.   class <<self; alias load_database_bsm load_database; end
  317.   def self.load_database
  318.     load_database_bsm
  319.     load_notetags_bsm
  320.   end
  321.   
  322.   #--------------------------------------------------------------------------
  323.   # new method: load_notetags_bsm
  324.   #--------------------------------------------------------------------------
  325.   def self.load_notetags_bsm
  326.     groups = [$data_actors, $data_classes, $data_weapons, $data_armors,
  327.       $data_enemies, $data_states, $data_skills, $data_items]
  328.     for group in groups
  329.       for obj in group
  330.         next if obj.nil?
  331.         obj.load_notetags_bsm
  332.       end
  333.     end
  334.   end
  335.   
  336. end # DataManager

  337. #==============================================================================
  338. # ■ RPG::BaseItem
  339. #==============================================================================

  340. class RPG::BaseItem
  341.   
  342.   #--------------------------------------------------------------------------
  343.   # public instance variables
  344.   #--------------------------------------------------------------------------
  345.   attr_accessor :max_buff
  346.   attr_accessor :max_debuff
  347.   attr_accessor :change_state_turns
  348.   attr_accessor :state_reapply_rules
  349.   
  350.   #--------------------------------------------------------------------------
  351.   # common cache: load_notetags_bsm
  352.   #--------------------------------------------------------------------------
  353.   def load_notetags_bsm
  354.     @change_state_turns = {}
  355.     @max_buff = {
  356.       0 => 0, 1 => 0, 2 => 0, 3 => 0, 4 => 0, 5 => 0, 6 => 0, 7 => 0 }
  357.     @max_debuff = {
  358.       0 => 0, 1 => 0, 2 => 0, 3 => 0, 4 => 0, 5 => 0, 6 => 0, 7 => 0 }
  359.     if self.is_a?(RPG::State)
  360.       @state_reapply_rules = YEA::BUFF_STATE_MANAGER::REAPPLY_STATE_RULES
  361.     end
  362.     #---
  363.     self.note.split(/[\r\n]+/).each { |line|
  364.       case line
  365.       #---
  366.       when YEA::REGEXP::BASEITEM::MAX_BUFF
  367.         case $1.upcase
  368.         when "MAXHP", "MHP", "HP"
  369.           @max_buff[0] = $2.to_i
  370.         when "MAXMP", "MMP", "MP", "MAXSP", "SP", "MSP"
  371.           @max_buff[1] = $2.to_i
  372.         when "ATK"
  373.           @max_buff[2] = $2.to_i
  374.         when "DEF"
  375.           @max_buff[3] = $2.to_i
  376.         when "MAT", "INT", "SPI"
  377.           @max_buff[4] = $2.to_i
  378.         when "MDF", "RES"
  379.           @max_buff[5] = $2.to_i
  380.         when "AGI"
  381.           @max_buff[6] = $2.to_i
  382.         when "LUK"
  383.           @max_buff[7] = $2.to_i
  384.         when "ALL"
  385.           for i in 0...8; @max_buff[i] = $2.to_i; end
  386.         end
  387.       #---
  388.       when YEA::REGEXP::BASEITEM::MAX_DEBUFF
  389.         case $1.upcase
  390.         when "MAXHP", "MHP", "HP"
  391.           @max_debuff[0] = $2.to_i
  392.         when "MAXMP", "MMP", "MP", "MAXSP", "SP", "MSP"
  393.           @max_debuff[1] = $2.to_i
  394.         when "ATK"
  395.           @max_debuff[2] = $2.to_i
  396.         when "DEF"
  397.           @max_debuff[3] = $2.to_i
  398.         when "MAT", "INT", "SPI"
  399.           @max_debuff[4] = $2.to_i
  400.         when "MDF", "RES"
  401.           @max_debuff[5] = $2.to_i
  402.         when "AGI"
  403.           @max_debuff[6] = $2.to_i
  404.         when "LUK"
  405.           @max_debuff[7] = $2.to_i
  406.         when "ALL"
  407.           for i in 0...8; @max_debuff[i] = $2.to_i; end
  408.         end
  409.       #---
  410.       when YEA::REGEXP::BASEITEM::CHANGE_STATE_TURN
  411.         @change_state_turns[$1.to_i] = $2.to_i
  412.       #---
  413.       when YEA::REGEXP::BASEITEM::STATE_REAPPLY_IGNORE
  414.         next unless self.is_a?(RPG::State)
  415.         @state_reapply_rules = 0
  416.       when YEA::REGEXP::BASEITEM::STATE_REAPPLY_RESET
  417.         next unless self.is_a?(RPG::State)
  418.         @state_reapply_rules = 1
  419.       when YEA::REGEXP::BASEITEM::STATE_REAPPLY_TOTAL
  420.         next unless self.is_a?(RPG::State)
  421.         @state_reapply_rules = 2
  422.       #---
  423.       end
  424.     } # self.note.split
  425.     #---
  426.   end
  427.   
  428. end # RPG::BaseItem

  429. #==============================================================================
  430. # ■ RPG::UsableItem
  431. #==============================================================================

  432. class RPG::UsableItem < RPG::BaseItem
  433.   
  434.   #--------------------------------------------------------------------------
  435.   # public instance variables
  436.   #--------------------------------------------------------------------------
  437.   attr_accessor :change_state_turns
  438.   attr_accessor :change_buff_turns
  439.   attr_accessor :change_debuff_turns
  440.   
  441.   #--------------------------------------------------------------------------
  442.   # common cache: load_notetags_bsm
  443.   #--------------------------------------------------------------------------
  444.   def load_notetags_bsm
  445.     @change_state_turns = {}
  446.     @change_buff_turns = {}
  447.     @change_debuff_turns = {}
  448.     #---
  449.     self.note.split(/[\r\n]+/).each { |line|
  450.       case line
  451.       #---
  452.       when YEA::REGEXP::USABLEITEM::CHANGE_STATE_TURN
  453.         @change_state_turns[$1.to_i] = $2.to_i
  454.       when YEA::REGEXP::USABLEITEM::CHANGE_BUFF_TURN
  455.         case $1.upcase
  456.         when "MAXHP", "MHP", "HP"
  457.           @change_buff_turns[0] = $2.to_i
  458.         when "MAXMP", "MMP", "MP", "MAXSP", "SP", "MSP"
  459.           @change_buff_turns[1] = $2.to_i
  460.         when "ATK"
  461.           @change_buff_turns[2] = $2.to_i
  462.         when "DEF"
  463.           @change_buff_turns[3] = $2.to_i
  464.         when "MAT", "INT", "SPI"
  465.           @change_buff_turns[4] = $2.to_i
  466.         when "MDF", "RES"
  467.           @change_buff_turns[5] = $2.to_i
  468.         when "AGI"
  469.           @change_buff_turns[6] = $2.to_i
  470.         when "LUK"
  471.           @change_buff_turns[7] = $2.to_i
  472.         when "ALL"
  473.           for i in 0...8; @change_buff_turns[i] = $2.to_i; end
  474.         end
  475.       when YEA::REGEXP::USABLEITEM::CHANGE_DEBUFF_TURN
  476.         case $1.upcase
  477.         when "MAXHP", "MHP", "HP"
  478.           @change_debuff_turns[0] = $2.to_i
  479.         when "MAXMP", "MMP", "MP", "MAXSP", "SP", "MSP"
  480.           @change_debuff_turns[1] = $2.to_i
  481.         when "ATK"
  482.           @change_debuff_turns[2] = $2.to_i
  483.         when "DEF"
  484.           @change_debuff_turns[3] = $2.to_i
  485.         when "MAT", "INT", "SPI"
  486.           @change_debuff_turns[4] = $2.to_i
  487.         when "MDF", "RES"
  488.           @change_debuff_turns[5] = $2.to_i
  489.         when "AGI"
  490.           @change_debuff_turns[6] = $2.to_i
  491.         when "LUK"
  492.           @change_debuff_turns[7] = $2.to_i
  493.         when "ALL"
  494.           for i in 0...8; @change_debuff_turns[i] = $2.to_i; end
  495.         end
  496.       end
  497.     } # self.note.split
  498.     #---
  499.   end
  500.   
  501. end # class RPG::UsableItem

  502. #==============================================================================
  503. # ■ Game_BattlerBase
  504. #==============================================================================

  505. class Game_BattlerBase
  506.   
  507.   #--------------------------------------------------------------------------
  508.   # overwrite method: param_buff_rate
  509.   #--------------------------------------------------------------------------
  510.   def param_buff_rate(param_id)
  511.     return eval(YEA::BUFF_STATE_MANAGER::BUFF_BOOST_FORMULA)
  512.   end
  513.   
  514.   #--------------------------------------------------------------------------
  515.   # new method: max_buff_limit
  516.   #--------------------------------------------------------------------------
  517.   def max_buff_limit(param_id)
  518.     n = YEA::BUFF_STATE_MANAGER::DEFAULT_BUFF_LIMIT
  519.     if actor?
  520.       n += self.actor.max_buff[param_id]
  521.       n += self.class.max_buff[param_id]
  522.       for equip in equips
  523.         next if equip.nil?
  524.         n += equip.max_buff[param_id]
  525.       end
  526.     else
  527.       n += self.enemy.max_buff[param_id]
  528.       if $imported["YEA-Doppelganger"] && !self.class.nil?
  529.         n += self.class.max_buff[param_id]
  530.       end
  531.     end
  532.     for state in states
  533.       next if state.nil?
  534.       n += state.max_buff[param_id]
  535.     end
  536.     return [[n.to_i, 0].max, YEA::BUFF_STATE_MANAGER::MAXIMUM_BUFF_LIMIT].min
  537.   end
  538.   
  539.   #--------------------------------------------------------------------------
  540.   # new method: max_debuff_limit
  541.   #--------------------------------------------------------------------------
  542.   def max_debuff_limit(param_id)
  543.     n = YEA::BUFF_STATE_MANAGER::DEFAULT_BUFF_LIMIT
  544.     if actor?
  545.       n += self.actor.max_debuff[param_id]
  546.       n += self.class.max_debuff[param_id]
  547.       for equip in equips
  548.         next if equip.nil?
  549.         n += equip.max_debuff[param_id]
  550.       end
  551.     else
  552.       n += self.enemy.max_debuff[param_id]
  553.       if $imported["YEA-Doppelganger"] && !self.class.nil?
  554.         n += self.class.max_debuff[param_id]
  555.       end
  556.     end
  557.     for state in states
  558.       next if state.nil?
  559.       n += state.max_debuff[param_id]
  560.     end
  561.     return [[n.to_i, 0].max, YEA::BUFF_STATE_MANAGER::MAXIMUM_BUFF_LIMIT].min
  562.   end
  563.   
  564.   #--------------------------------------------------------------------------
  565.   # overwrite method: buff_icon_index
  566.   #--------------------------------------------------------------------------
  567.   def buff_icon_index(buff_level, param_id)
  568.     if buff_level > 0
  569.       return ICON_BUFF_START + ([buff_level - 1, 1].min) * 8 + param_id
  570.     elsif buff_level < 0
  571.       return ICON_DEBUFF_START + ([-buff_level - 1, -1].max) * 8 + param_id
  572.     else
  573.       return 0
  574.     end
  575.   end
  576.   
  577.   #--------------------------------------------------------------------------
  578.   # new method: buff_turns
  579.   #--------------------------------------------------------------------------
  580.   def buff_turns(param_id)
  581.     return @buff_turns.include?(param_id) ? @buff_turns[param_id] : 0
  582.   end
  583.   
  584.   #--------------------------------------------------------------------------
  585.   # new method: buff_level
  586.   #--------------------------------------------------------------------------
  587.   def buff_level(param_id)
  588.     return 0 if @buffs[param_id].nil?
  589.     buff_maximum = max_buff_limit(param_id)
  590.     debuff_maximum = max_debuff_limit(param_id)
  591.     return [[@buffs[param_id], buff_maximum].min, -debuff_maximum].max
  592.   end
  593.   
  594.   #--------------------------------------------------------------------------
  595.   # new method: buff_change_turns
  596.   #--------------------------------------------------------------------------
  597.   def buff_change_turns(param_id, value)
  598.     @buff_turns[param_id] = 0 if @buff_turns[param_id].nil?
  599.     @buff_turns[param_id] = [value, 0].max
  600.   end
  601.   
  602.   #--------------------------------------------------------------------------
  603.   # new method: state_turns
  604.   #--------------------------------------------------------------------------
  605.   def state_turns(state_id)
  606.     state_id = state_id.id if state_id.is_a?(RPG::State)
  607.     return @state_turns.include?(state_id) ? @state_turns[state_id] : 0
  608.   end
  609.   
  610.   #--------------------------------------------------------------------------
  611.   # new method: state_steps
  612.   #--------------------------------------------------------------------------
  613.   def state_steps(state_id)
  614.     state_id = state_id.id if state_id.is_a?(RPG::State)
  615.     return @state_steps.include?(state_id) ? @state_steps[state_id] : 0
  616.   end
  617.   
  618.   #--------------------------------------------------------------------------
  619.   # new method: state_change_turns
  620.   #--------------------------------------------------------------------------
  621.   def state_change_turns(state_id, value)
  622.     state_id = state_id.id if state_id.is_a?(RPG::State)
  623.     @state_turns[state_id] = 0 if @state_turns[state_id].nil?
  624.     @state_turns[state_id] = [value, 0].max
  625.   end
  626.   
  627.   #--------------------------------------------------------------------------
  628.   # new method: state_turn_mod
  629.   #--------------------------------------------------------------------------
  630.   def state_turn_mod(state_id)
  631.     return 0 if $data_states[state_id].nil?
  632.     state = $data_states[state_id]
  633.     n = state.min_turns + rand(1 + [state.max_turns - state.min_turns, 0].max)
  634.     if actor?
  635.       if self.actor.change_state_turns.include?(state_id)
  636.         n += self.actor.change_state_turns[state_id]
  637.       end
  638.       if self.class.change_state_turns.include?(state_id)
  639.         n += self.class.change_state_turns[state_id]
  640.       end
  641.       for equip in equips
  642.         next if equip.nil?
  643.         next unless equip.change_state_turns.include?(state_id)
  644.         n += equip.change_state_turns[state_id]
  645.       end
  646.     else
  647.       if self.enemy.change_state_turns.include?(state_id)
  648.         n += self.enemy.change_state_turns[state_id]
  649.       end
  650.       if $imported["YEA-Doppelganger"] && !self.class.nil?
  651.         if self.class.change_state_turns.include?(state_id)
  652.           n += self.class.change_state_turns[state_id]
  653.         end
  654.       end
  655.     end
  656.     for state in states
  657.       next if state.nil?
  658.       next unless state.change_state_turns.include?(state_id)
  659.       n += state.change_state_turns[state_id]
  660.     end
  661.     return [n, 0].max
  662.   end
  663.   
  664. end # Game_BattlerBase

  665. #==============================================================================
  666. # ■ Game_Battler
  667. #==============================================================================

  668. class Game_Battler < Game_BattlerBase
  669.   
  670.   #--------------------------------------------------------------------------
  671.   # overwrite method: buff_max?
  672.   #--------------------------------------------------------------------------
  673.   def buff_max?(param_id)
  674.     return @buffs[param_id] == max_buff_limit(param_id)
  675.   end
  676.   
  677.   #--------------------------------------------------------------------------
  678.   # overwrite method: debuff_max?
  679.   #--------------------------------------------------------------------------
  680.   def debuff_max?(param_id)
  681.     return @buffs[param_id] == -max_debuff_limit(param_id)
  682.   end
  683.   
  684.   #--------------------------------------------------------------------------
  685.   # overwrite method: add_state
  686.   #--------------------------------------------------------------------------
  687.   def add_state(state_id)
  688.     return if $data_states[state_id].nil?
  689.     state_rules = $data_states[state_id].state_reapply_rules
  690.     return if state_rules == 0 && state?(state_id)
  691.     if state_addable?(state_id)
  692.       add_new_state(state_id) unless state?(state_id)
  693.       reset_state_counts(state_id) if state_rules == 1
  694.       total_state_counts(state_id) if state_rules == 2
  695.       @result.added_states.push(state_id).uniq!
  696.     end
  697.   end
  698.   
  699.   #--------------------------------------------------------------------------
  700.   # overwrite method: state_removed?
  701.   #--------------------------------------------------------------------------
  702.   def state_removed?(state_id)
  703.     return false
  704.   end
  705.   
  706.   #--------------------------------------------------------------------------
  707.   # overwrite method: reset_state_counts
  708.   #--------------------------------------------------------------------------
  709.   def reset_state_counts(state_id)
  710.     state = $data_states[state_id]
  711.     @state_turns[state_id] = state_turn_mod(state_id)
  712.     @state_steps[state_id] = state.steps_to_remove
  713.   end
  714.   
  715.   #--------------------------------------------------------------------------
  716.   # new method: total_state_counts
  717.   #--------------------------------------------------------------------------
  718.   def total_state_counts(state_id)
  719.     state = $data_states[state_id]
  720.     value = state_turn_mod(state_id)
  721.     state_change_turns(state_id, value + state_turns(state_id))
  722.   end
  723.   
  724.   #--------------------------------------------------------------------------
  725.   # alias method: item_user_effect
  726.   #--------------------------------------------------------------------------
  727.   alias game_battler_item_user_effect_bsm item_user_effect
  728.   def item_user_effect(user, item)
  729.     game_battler_item_user_effect_bsm(user, item)
  730.     apply_state_turn_changes(user, item)
  731.     apply_buff_turn_changes(user, item)
  732.     apply_debuff_turn_changes(user, item)
  733.   end
  734.   
  735.   #--------------------------------------------------------------------------
  736.   # new method: apply_state_turn_changes
  737.   #--------------------------------------------------------------------------
  738.   def apply_state_turn_changes(user, item)
  739.     return if item.nil?
  740.     return unless $game_party.in_battle
  741.     for key in item.change_state_turns
  742.       state_id = key[0]
  743.       next if field_state?(state_id)
  744.       next unless state?(state_id)
  745.       next unless $data_states[state_id].auto_removal_timing > 0
  746.       state_change_turns(state_id, key[1] + state_turns(state_id))
  747.       remove_state(state_id) if state_turns(state_id) <= 0
  748.       @result.success = true
  749.     end
  750.   end
  751.   
  752.   #--------------------------------------------------------------------------
  753.   # new method: field_state?
  754.   #--------------------------------------------------------------------------
  755.   def field_state?(state_id)
  756.     return false unless $imported["YEA-FieldStateEffects"]
  757.     return false unless $game_party.in_battle
  758.     return false unless SceneManager.scene_is?(Scene_Battle)
  759.     return BattleManager.field_state?(state_id)
  760.   end
  761.   
  762.   #--------------------------------------------------------------------------
  763.   # new method: apply_buff_turn_changes
  764.   #--------------------------------------------------------------------------
  765.   def apply_buff_turn_changes(user, item)
  766.     return if item.nil?
  767.     return unless $game_party.in_battle
  768.     for key in item.change_buff_turns
  769.       param_id = key[0]
  770.       next unless buff?(param_id)
  771.       buff_change_turns(param_id, key[1] + buff_turns(param_id))
  772.       remove_buff(param_id) if buff_turns(param_id) < 0
  773.       @result.success = true
  774.     end
  775.   end
  776.   
  777.   #--------------------------------------------------------------------------
  778.   # new method: apply_debuff_turn_changes
  779.   #--------------------------------------------------------------------------
  780.   def apply_debuff_turn_changes(user, item)
  781.     return if item.nil?
  782.     return unless $game_party.in_battle
  783.     for key in item.change_debuff_turns
  784.       param_id = key[0]
  785.       next unless debuff?(param_id)
  786.       buff_change_turns(param_id, key[1] + buff_turns(param_id))
  787.       remove_buff(param_id) if buff_turns(param_id) < 0
  788.       @result.success = true
  789.     end
  790.   end
  791.   
  792. end # Game_Battler

  793. #==============================================================================
  794. # ■ Window_Base
  795. #==============================================================================

  796. class Window_Base < Window
  797.   
  798.   #--------------------------------------------------------------------------
  799.   # alias method: draw_actor_icons
  800.   #--------------------------------------------------------------------------
  801.   alias window_base_draw_actor_icons_bsm draw_actor_icons
  802.   def draw_actor_icons(actor, dx, dy, dw = 96)
  803.     window_base_draw_actor_icons_bsm(actor, dx, dy, dw)
  804.     draw_actor_icon_turns(actor, dx, dy, dw)
  805.   end
  806.   
  807.   #--------------------------------------------------------------------------
  808.   # new method: draw_actor_icon_turns
  809.   #--------------------------------------------------------------------------
  810.   def draw_actor_icon_turns(actor, dx, dy, dw)
  811.     return unless YEA::BUFF_STATE_MANAGER::SHOW_REMAINING_TURNS
  812.     return unless SceneManager.scene_is?(Scene_Battle)
  813.     reset_font_settings
  814.     contents.font.out_color.alpha = 255
  815.     contents.font.bold = true
  816.     contents.font.size = YEA::BUFF_STATE_MANAGER::TURNS_REMAINING_SIZE
  817.     dy += YEA::BUFF_STATE_MANAGER::TURNS_REMAINING_Y
  818.     #---
  819.     for state in actor.states
  820.       break if dx + 24 > dw + dx
  821.       next if state.icon_index <= 0
  822.       turns = actor.state_turns(state.id).to_i
  823.       if $imported["YEA-FieldStateEffects"] &&
  824.       BattleManager.field_state?(state.id)
  825.         turns = BattleManager.field_state_turns(state.id)
  826.       end
  827.       if state.auto_removal_timing > 0 && turns < 100
  828.         draw_text(dx, dy, 24, line_height, turns, 2)
  829.       end
  830.       dx += 24
  831.     end
  832.     #---
  833.     for i in 0...8
  834.       break if dx + 24 > dx + dw
  835.       next if actor.buff_icon_index(actor.buff_level(i), i) == 0
  836.       turns = actor.buff_turns(i).to_i
  837.       draw_text(dx, dy, 24, line_height, turns, 2) if turns < 100
  838.       dx += 24
  839.     end
  840.     #---
  841.     contents.font.out_color = Font.default_out_color
  842.     reset_font_settings
  843.   end
  844.   
  845. end # Window_Base

  846. #==============================================================================
  847. #
  848. # ▼ End of File
  849. #
  850. #==============================================================================
复制代码

搜狗截图_2012-09-09_00-53-08.PNG (364.08 KB, 下载次数: 34)

搜狗截图_2012-09-09_00-53-08.PNG

Lv2.观梦者

梦石
0
星屑
723
在线时间
530 小时
注册时间
2010-6-9
帖子
840
2
发表于 2012-9-9 21:11:54 | 只看该作者
这不是这个的脚本所致,目测你是用脚本合集是吗?是的话把--Yanfly Engine Ace - Ace Battle Engine v1.21--脚本删掉就可以了。不过有副作用。
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-11-16 18:55

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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