Advertisement
Dekita

dev spds v1.1

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