Advertisement
Dekita

$D13x Statistic Level Up Control v1.0

Mar 14th, 2013
546
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.47 KB | None | 0 0
  1. #===============================================================================
  2. #
  3. # ☆ $D13x - Statistic Level Up Control
  4. # -- Author : Dekita
  5. # -- Version : 1.0
  6. # -- Level : Easy / Normal
  7. # -- Requires : $D13x - Statistic Control
  8. # -- Engine : RPG Maker VX Ace.
  9. #
  10. #===============================================================================
  11. # ☆ Import
  12. #-------------------------------------------------------------------------------
  13. $D13x={}if$D13x==nil
  14. $D13x[:Actor]={}if$D13x[:Actor]==nil
  15. $D13x[:Actor]['par lvl dist'] = true
  16. #===============================================================================
  17. # ☆ Updates
  18. #-------------------------------------------------------------------------------
  19. # D /M /Y
  20. # 12/o3/2o13 - Finished,
  21. # 1o/o3/2o13 - Started
  22. #
  23. #===============================================================================
  24. # ☆ Introduction
  25. #-------------------------------------------------------------------------------
  26. # This Script allows for regular/x/s-Params to be increased by a set value
  27. # for each level, just like params are done in the database, but for x/s-params.
  28. # It Also offers a substantial increase in the control Dev's have over their
  29. # actors / classes statistic increases.
  30. #
  31. # Obviously you are able to set the params to go way above the normal
  32. # limits for each level, as well as provide ways to increase/decrease
  33. # stats that are not normally changable from level.
  34. #
  35. # You can also have all stats decrease upon level down. (not normally possible)
  36. #
  37. # The Database' Parameter curve feature will still be used, to turn this off
  38. # make all stats lv 1-99 the same value, ie. 1
  39. #
  40. # Plug - Customise - Play
  41. #
  42. #===============================================================================
  43. # ★☆★☆★☆★☆★☆★☆★☆★ TERMS AND CONDITIONS: ☆★☆★☆★☆★☆★☆★☆★☆★☆
  44. #===============================================================================
  45. # 1. You MUST give credit to "Dekita" !!
  46. # 2. You are NOT allowed to repost this script.(or modified versions)
  47. # 3. You are NOT allowed to convert this script.
  48. # 4. You are NOT allowed to use this script for Commercial games.
  49. # 5. ENJOY!
  50. #
  51. # "FINE PRINT"
  52. # By using this script you hereby agree to the above terms and conditions,
  53. # if any violation of the above terms occurs "legal action" may be taken.
  54. # Not understanding the above terms and conditions does NOT mean that
  55. # they do not apply to you.
  56. # If you wish to discuss the terms and conditions in further detail you can
  57. # contact me at http://dekitarpg.wordpress.com/
  58. #
  59. #===============================================================================
  60. # ☆ Instructions
  61. #-------------------------------------------------------------------------------
  62. # Place Below " ▼ Materials " and Above " ▼ Main " in your script editor.
  63. # Place Under My $D13x - Statistic Control Script.
  64. #
  65. #===============================================================================
  66. # ☆ Notetags ( default )
  67. # For use with Actors / Classes
  68. #-------------------------------------------------------------------------------
  69. # <stat set: ID>
  70. # <dyst set: ID>
  71. # ID = the id of the Stat_Set(or Dyst_Set) you wish to use for this
  72. # actor / class
  73. # All Stat_Set and Dyst_Set settings are defined below
  74. # Actor Notes will take priority over Class Notes !
  75. #
  76. #===============================================================================
  77. # ☆ HELP
  78. #-------------------------------------------------------------------------------
  79. # PARAMS # XPARAMS # SPARAMS #
  80. # mhp # hit # tgr #
  81. # mmp # eva # grd #
  82. # atk # cri # rec #
  83. # def # cev # pha #
  84. # mat # mev # mcr #
  85. # mdf # mrf # tcr #
  86. # agi # cnt # pdr #
  87. # luk # hrg # mdr #
  88. # # mrg # fdr #
  89. # # trg # exr #
  90. #-------------------------------------------------------------------------------
  91. # Remember :
  92. # All Params work with integer values, eg. 1, 5, 123, 653, 198123
  93. # All x/s-Params work with float values, eg. 1.0, 0.5, 0.1, 0.05, 0.01
  94. # 1.0 = 100%, 0.01 = 1%,
  95. #
  96. #===============================================================================
  97. module Actor_Stat_Inc
  98. Stat_Set=[]# << Keep
  99. Dyst_Set=[]# << Keep
  100.  
  101. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  102. # ☆ General Settings
  103. #--------------------------------------------------------------------------
  104. Level_Down_Removes_Stats = true
  105. Norm_Notetag = /<stat set:(.*)>/i
  106. Dyst_Notetag = /<dyst set:(.*)>/i
  107.  
  108. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  109. # ☆ Stat increase Set - Settings
  110. #--------------------------------------------------------------------------
  111. # This is a fixed stat increase per level setting.
  112. Stat_Set[0]={
  113. # stat => change,
  114. :mhp => 20 ,
  115. :mmp => 20 ,
  116. :atk => 2 ,
  117. :def => 2 ,
  118. :mat => 3 ,
  119. :mdf => 3 ,
  120. :agi => 1 ,
  121. :luk => 1 ,
  122. :hit => 0.01 ,
  123. :eva => 0.01 ,
  124. :cri => 0.01 ,
  125. # Insert other regular/x/s-param codes here (codes found above)
  126. # Rememer to put a comma , after each line.
  127. }# << End Stat_Set[0]
  128.  
  129. Stat_Set[1]={
  130. # stat => change,
  131. :hit => 0.01 ,
  132. :cri => 0.01 ,
  133. # Insert other x/s-param codes here (codes found above)
  134. # Rememer to put a comma , after each line.
  135. }# << End Stat_Set[1]
  136.  
  137. # << Add more Stat_Set[id] By Following The Same Method As Above,
  138. # Remember [id] is The id Of The Stat Set The Actor/Class Will Have.
  139. # Also, You Can Change All Stats / Increases(or decreases)
  140. # Within the hash.
  141.  
  142. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  143. # ☆ Dynamic Stat Increase Settings
  144. #--------------------------------------------------------------------------
  145. # This is a more flexible stat set type, by allowing for each level
  146. # to have its own unique stat increase.
  147. Dyst_Set[0]={ # << Initialize Dynamic Stat Set id [0]
  148. # As the most level increases are small i just shortened the
  149. # space between each stat change. (to save space obviously)
  150. 1 => {}, # << End Lv 1 ( initial level must be kept. )
  151. # Stat Changes for when actor turns level 2 (triggered after level)
  152. 2 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 2 (remember comma)
  153. # Stat Changes for when actor turns level 3 (triggered after level)
  154. 3 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 3 (remember comma)
  155. 4 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 4 (remember comma)
  156. 5 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 5 (remember comma)
  157. 6 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 6
  158. 7 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 7
  159. 8 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 8
  160. 9 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 9
  161. 10 => {
  162. :hit => 0.01 ,
  163. :cri => 0.01 ,
  164. :eva => 0.01 ,
  165. :cev => 0.01 ,
  166. :mrf => 0.01 ,
  167. :rec => 0.01 ,
  168. :mcr => -0.01 ,
  169. }, # << End Lv 10 (remember comma)
  170. 11 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 11
  171. 12 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 12
  172. 13 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 13
  173. 14 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 14
  174. 15 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 15
  175. 16 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 16
  176. 17 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 17
  177. 18 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 18
  178. 19 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 19
  179. 20 => {
  180. :hit => 0.01 ,
  181. :cri => 0.01 ,
  182. :eva => 0.01 ,
  183. :cev => 0.01 ,
  184. :mrf => 0.01 ,
  185. :rec => 0.01 ,
  186. :mcr => -0.01 ,
  187. }, # << End Lv 20 (remember comma)
  188. 21 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 21
  189. 22 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 22
  190. 23 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 23
  191. 24 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 24
  192. 25 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 25
  193. 26 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 26
  194. 27 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 27
  195. 28 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 28
  196. 29 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 29
  197. 30 => {
  198. :hit => 0.01 ,
  199. :cri => 0.01 ,
  200. :eva => 0.01 ,
  201. :cev => 0.01 ,
  202. :mrf => 0.01 ,
  203. :rec => 0.01 ,
  204. :mcr => -0.01 ,
  205. }, # << End Lv 30 (remember comma)
  206. 31 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 31
  207. 32 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 32
  208. 33 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 33
  209. 34 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 34
  210. 35 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 35
  211. 36 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 36
  212. 37 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 37
  213. 38 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 38
  214. 39 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 39
  215. 40 => {
  216. :hit => 0.01 ,
  217. :cri => 0.01 ,
  218. :eva => 0.01 ,
  219. :cev => 0.01 ,
  220. :mrf => 0.01 ,
  221. :rec => 0.01 ,
  222. :mcr => -0.01 ,
  223. }, # << End Lv 40 (remember comma)
  224. 41 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 41
  225. 42 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 42
  226. 43 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 43
  227. 44 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 44
  228. 45 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 45
  229. 46 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 46
  230. 47 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 47
  231. 48 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 48
  232. 49 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 49
  233. 50 => {
  234. :hit => 0.01 ,
  235. :cri => 0.01 ,
  236. :eva => 0.01 ,
  237. :cev => 0.01 ,
  238. :mrf => 0.01 ,
  239. :rec => 0.01 ,
  240. :mcr => -0.01 ,
  241. }, # << End Lv 50 (remember comma)
  242. 51 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 51
  243. 52 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 52
  244. 53 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 53
  245. 54 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 54
  246. 55 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 55
  247. 56 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 56
  248. 57 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 57
  249. 58 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 58
  250. 59 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 59
  251. 60 => {
  252. :hit => 0.01 ,
  253. :cri => 0.01 ,
  254. :eva => 0.01 ,
  255. :cev => 0.01 ,
  256. :mrf => 0.01 ,
  257. :rec => 0.01 ,
  258. :mcr => -0.01 ,
  259. }, # << End Lv 60 (remember comma)
  260. 71 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 71
  261. 72 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 72
  262. 73 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 73
  263. 74 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 74
  264. 75 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 75
  265. 76 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 76
  266. 77 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 77
  267. 78 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 78
  268. 79 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 79
  269. 80 => {
  270. :hit => 0.01 ,
  271. :cri => 0.01 ,
  272. :eva => 0.01 ,
  273. :cev => 0.01 ,
  274. :mrf => 0.01 ,
  275. :rec => 0.01 ,
  276. :mcr => -0.01 ,
  277. }, # << End Lv 80 (remember comma)
  278. 81 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 81
  279. 82 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 82
  280. 83 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 83
  281. 84 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 84
  282. 85 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 85
  283. 86 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 86
  284. 87 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 87
  285. 88 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 88
  286. 89 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 89
  287. 90 => {
  288. :hit => 0.01 ,
  289. :cri => 0.01 ,
  290. :eva => 0.01 ,
  291. :cev => 0.01 ,
  292. :mrf => 0.01 ,
  293. :rec => 0.01 ,
  294. :mcr => -0.01 ,
  295. }, # << End Lv 90 (remember comma)
  296. 91 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 91
  297. 92 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 92
  298. 93 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 93
  299. 94 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 94
  300. 95 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 95
  301. 96 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 96
  302. 97 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 97
  303. 98 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 98
  304. 99 => { :hit => 0.001 , :cri => 0.001 }, # << End Lv 99
  305. # Stat Changes for when actor turns level 100 (if you can reach it :p )
  306. 100 => {
  307. :hit => 0.10 ,
  308. :cri => 0.10 ,
  309. :eva => 0.10 ,
  310. :cev => 0.10 ,
  311. :mrf => 0.10 ,
  312. :rec => 0.10 ,
  313. :mcr => -0.10 ,
  314. }, # << End Lv 100 (remember comma)
  315. # If for some reason you can reach more than level 100
  316. # insert more stat changes for each possible level to avoid errors.
  317.  
  318. } # << End Dynamic Stat Set id [0]
  319.  
  320. # << Add More Dynamic Stat Sets Below This Point.
  321. # Simply Copy The Code From Above And Change The
  322. # Id Number And Stats To Suit Your Needs.
  323.  
  324. #####################
  325. # CUSTOMISATION END #
  326. end #####################
  327. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
  328. # #
  329. # http://dekitarpg.wordpress.com/ #
  330. # #
  331. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
  332. # The following code is protected under the 2013 Dekita Data Protection Act. #
  333. # Ie. The “Do Not Fucking Look” Law. #
  334. # Breaking This One And Only Rule WILL Result in ERECTILE DYSFUNCTION. #
  335. # That is all ! #
  336. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
  337.  
  338. if !$D13x[:CORE]
  339. #===============================================================================
  340. module DataManager
  341. #===============================================================================
  342. #---------------------------------------------------------------------------
  343. # Alias List
  344. #---------------------------------------------------------------------------
  345. class << self
  346. alias :lbd_unique_lv_up_stat :load_database
  347. end
  348. #---------------------------------------------------------------------------
  349. # Load Database (alias)
  350. #---------------------------------------------------------------------------
  351. def self.load_database
  352. lbd_unique_lv_up_stat
  353. loa_unique_lv_up_stat
  354. end
  355. #---------------------------------------------------------------------------
  356. # Load Unique Shit
  357. #---------------------------------------------------------------------------
  358. def self.loa_unique_lv_up_stat
  359. gr = [$data_actors,$data_classes]
  360. for g in gr
  361. for o in g
  362. next if nme == nil
  363. o.load__lv_up_stat
  364. end
  365. end
  366. end
  367.  
  368. end # DataManager
  369. end # if $D13x[:CORE]
  370.  
  371. #==============================================================================
  372. class RPG::Actor < RPG::BaseItem
  373. #==============================================================================
  374. #---------------------------------------------------------------------------
  375. # Alias List
  376. #---------------------------------------------------------------------------
  377. alias :deki_lvupstats :load_unique_shit if $D13x[:CORE]
  378. #---------------------------------------------------------------------------
  379. # Pi Variables
  380. #---------------------------------------------------------------------------
  381. attr_accessor :stat_set_id
  382. #---------------------------------------------------------------------------
  383. # load unique shit
  384. #---------------------------------------------------------------------------
  385. def load_unique_shit
  386. deki_lvupstats if $D13x[:CORE]
  387. load__lv_up_stat
  388. end
  389. #---------------------------------------------------------------------------
  390. # Load Level Stat Notes
  391. #---------------------------------------------------------------------------
  392. def load__lv_up_stat
  393. @stat_set_id = [nil,nil]
  394. self.note.split(/[\r\n]+/).each do |line|
  395. case line
  396. when Actor_Stat_Inc::Norm_Notetag then @stat_set_id = [:steady , $1.to_i]
  397. when Actor_Stat_Inc::Dyst_Notetag then @stat_set_id = [:dynamic, $1.to_i]
  398. end
  399. end
  400. end
  401.  
  402. end
  403.  
  404. #==============================================================================
  405. class RPG::Class < RPG::BaseItem
  406. #==============================================================================
  407. #---------------------------------------------------------------------------
  408. # Alias List
  409. #---------------------------------------------------------------------------
  410. alias :deki_lvupstats :load_unique_shit if $D13x[:CORE]
  411. #---------------------------------------------------------------------------
  412. # Pi Variables
  413. #---------------------------------------------------------------------------
  414. attr_accessor :stat_set_id
  415. #---------------------------------------------------------------------------
  416. # load unique shit
  417. #---------------------------------------------------------------------------
  418. def load_unique_shit
  419. deki_lvupstats if $D13x[:CORE]
  420. load__lv_up_stat
  421. end
  422. #---------------------------------------------------------------------------
  423. # Load Level Stat Notes
  424. #---------------------------------------------------------------------------
  425. def load__lv_up_stat
  426. @stat_set_id = [nil,nil]
  427. self.note.split(/[\r\n]+/).each do |line|
  428. case line
  429. when Actor_Stat_Inc::Norm_Notetag then @stat_set_id = [:steady , $1.to_i]
  430. when Actor_Stat_Inc::Dyst_Notetag then @stat_set_id = [:dynamic, $1.to_i]
  431. end
  432. end
  433. end
  434.  
  435. end
  436.  
  437. #==============================================================================
  438. class Game_Actor < Game_Battler
  439. #==============================================================================
  440. #---------------------------------------------------------------------------
  441. # Get Stat Increase Type (and do it)
  442. #---------------------------------------------------------------------------
  443. def determine_stat_inc_type
  444. type = stat_set_type
  445. id = stat_set_id
  446. case type
  447. when :steady then doda_stat_inc(Actor_Stat_Inc::Stat_Set[id])
  448. when :dynamic then doda_stat_inc(Actor_Stat_Inc::Dyst_Set[id][@level])
  449. end
  450. end
  451. #---------------------------------------------------------------------------
  452. # Do Stat Increase
  453. #---------------------------------------------------------------------------
  454. def doda_stat_inc(type)
  455. return if type == nil
  456. type.each do |stat|
  457. case stat[0]
  458. when :mhp then add_param(0, stat[1], false)
  459. when :mmp then add_param(1, stat[1], false)
  460. when :atk then add_param(2, stat[1], false)
  461. when :def then add_param(3, stat[1], false)
  462. when :mat then add_param(4, stat[1], false)
  463. when :mdf then add_param(5, stat[1], false)
  464. when :agi then add_param(6, stat[1], false)
  465. when :luk then add_param(7, stat[1], false)
  466. when :hit then add_xparam(0, stat[1], false)
  467. when :eva then add_xparam(1, stat[1], false)
  468. when :cri then add_xparam(2, stat[1], false)
  469. when :cev then add_xparam(3, stat[1], false)
  470. when :mev then add_xparam(4, stat[1], false)
  471. when :mrf then add_xparam(5, stat[1], false)
  472. when :cnt then add_xparam(6, stat[1], false)
  473. when :hrg then add_xparam(7, stat[1], false)
  474. when :mrg then add_xparam(8, stat[1], false)
  475. when :trg then add_xparam(9, stat[1], false)
  476. when :tgr then add_sparam(0, stat[1], false)
  477. when :grd then add_sparam(1, stat[1], false)
  478. when :rec then add_sparam(2, stat[1], false)
  479. when :pha then add_sparam(3, stat[1], false)
  480. when :mcr then add_sparam(4, stat[1], false)
  481. when :tcr then add_sparam(5, stat[1], false)
  482. when :pdr then add_sparam(6, stat[1], false)
  483. when :mdr then add_sparam(7, stat[1], false)
  484. when :fdr then add_sparam(8, stat[1], false)
  485. when :exr then add_sparam(9, stat[1], false)
  486. end
  487. end
  488. refresh
  489. end
  490. #--------------------------------------------------------------------------
  491. # Level Down Extra Shit
  492. #--------------------------------------------------------------------------
  493. alias :lv_down_rem_stats_sD13x :lv_down_extra
  494. def lv_down_extra
  495. lv_down_rem_stats_sD13x
  496. determine_stat_dec_type
  497. end
  498. #---------------------------------------------------------------------------
  499. # Get Stat Increase Type (and do it)
  500. #---------------------------------------------------------------------------
  501. def determine_stat_dec_type
  502. return unless Actor_Stat_Inc::Level_Down_Removes_Stats
  503. type = stat_set_type
  504. id = stat_set_id
  505. case type
  506. when :steady then doda_stat_dec(Actor_Stat_Inc::Stat_Set[id])
  507. when :dynamic then doda_stat_dec(Actor_Stat_Inc::Dyst_Set[id][@level])
  508. end
  509. end
  510. #---------------------------------------------------------------------------
  511. # Do Stat Decrease
  512. #---------------------------------------------------------------------------
  513. def doda_stat_dec(type)
  514. return if type == nil
  515. type.each do |stat|
  516. case stat[0]
  517. when :mhp then sub_param(0, stat[1], false)
  518. when :mmp then sub_param(1, stat[1], false)
  519. when :atk then sub_param(2, stat[1], false)
  520. when :def then sub_param(3, stat[1], false)
  521. when :mat then sub_param(4, stat[1], false)
  522. when :mdf then sub_param(5, stat[1], false)
  523. when :agi then sub_param(6, stat[1], false)
  524. when :luk then sub_param(7, stat[1], false)
  525. when :hit then sub_xparam(0, stat[1], false)
  526. when :eva then sub_xparam(1, stat[1], false)
  527. when :cri then sub_xparam(2, stat[1], false)
  528. when :cev then sub_xparam(3, stat[1], false)
  529. when :mev then sub_xparam(4, stat[1], false)
  530. when :mrf then sub_xparam(5, stat[1], false)
  531. when :cnt then sub_xparam(6, stat[1], false)
  532. when :hrg then sub_xparam(7, stat[1], false)
  533. when :mrg then sub_xparam(8, stat[1], false)
  534. when :trg then sub_xparam(9, stat[1], false)
  535. when :tgr then sub_sparam(0, stat[1], false)
  536. when :grd then sub_sparam(1, stat[1], false)
  537. when :rec then sub_sparam(2, stat[1], false)
  538. when :pha then sub_sparam(3, stat[1], false)
  539. when :mcr then sub_sparam(4, stat[1], false)
  540. when :tcr then sub_sparam(5, stat[1], false)
  541. when :pdr then sub_sparam(6, stat[1], false)
  542. when :mdr then sub_sparam(7, stat[1], false)
  543. when :fdr then sub_sparam(8, stat[1], false)
  544. when :exr then sub_sparam(9, stat[1], false)
  545. end
  546. end
  547. refresh
  548. end
  549. #---------------------------------------------------------------------------
  550. # Get Stat Increase Type
  551. #---------------------------------------------------------------------------
  552. def stat_set_type
  553. set = self.class.stat_set_id[0]
  554. if actor.stat_set_id[0] != nil
  555. set = actor.stat_set_id[0]
  556. end
  557. set
  558. end
  559. #---------------------------------------------------------------------------
  560. # Get Stat Increase ID
  561. #---------------------------------------------------------------------------
  562. def stat_set_id
  563. set = self.class.stat_set_id[1]
  564. if actor.stat_set_id[1] != nil
  565. set = actor.stat_set_id[1]
  566. end
  567. set
  568. end
  569.  
  570. end
  571.  
  572. #==============================================================================#
  573. # http://dekitarpg.wordpress.com/ #
  574. #==============================================================================#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement