Advertisement
Dekita

$D13x Dev SLUD 1.5

May 21st, 2013
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.97 KB | None | 0 0
  1. if true # << Make true to use this script, false to disable.
  2. #===============================================================================
  3. #
  4. # ☆ $D13x - Statistic Level Up Distribution
  5. # -- Author : Dekita
  6. # -- Version : 1.5
  7. # -- Level : Easy / Normal
  8. # -- Requires : $D13x - Statistic Control
  9. # -- Engine : RPG Maker VX Ace.
  10. #
  11. #===============================================================================
  12. # ☆ Import
  13. #-------------------------------------------------------------------------------
  14. $D13x={}if$D13x==nil
  15. $D13x[:Dev_SLUD]=true
  16. #===============================================================================
  17. # ☆ Updates
  18. #-------------------------------------------------------------------------------
  19. # D /M /Y
  20. # 21/o5/2o13 - Compatability, ($D13x ISPDS)
  21. # 2o/o5/2o13 - Compatability, ($D13x Atk & Def Lvs)
  22. # 17/o5/2o13 - Small Update,
  23. # 25/o3/2o13 - Compatibility, (Elements Control)
  24. # - Improved Efficiency,
  25. # 13/o3/2o13 - Improved Import Method,
  26. # 12/o3/2o13 - Finished,
  27. # 1o/o3/2o13 - Started
  28. #
  29. #===============================================================================
  30. # ☆ Introduction
  31. #-------------------------------------------------------------------------------
  32. # This Script allows for regular/x/s-Params to be increased by a set value
  33. # for each level, just like params are done in the database, but for x/s-params.
  34. # It Also offers a substantial increase in the control Dev's have over their
  35. # actors / classes statistic increases.
  36. #
  37. # Obviously you are able to set the params to go way above the normal
  38. # limits for each level, as well as provide ways to increase/decrease
  39. # stats that are not normally changable from level.
  40. #
  41. # You can also have all stats decrease upon level down. (not normally possible)
  42. #
  43. # The Database' Parameter curve feature will still be used, to turn this off
  44. # make all stats lv 1-99 the same value, ie. 1
  45. #
  46. # NOTICE :
  47. # v1.2+ allows for Elemental values to be increased / decreased upon level
  48. # (attack and defence values) IF used in conjunction with my
  49. # $D13x Elements Control Script :p
  50. #
  51. # Plug - Customise - Play
  52. #
  53. #===============================================================================
  54. # ★☆★☆★☆★☆★☆★☆★☆★ TERMS AND CONDITIONS: ☆★☆★☆★☆★☆★☆★☆★☆★☆
  55. #===============================================================================
  56. # 1. You MUST give credit to "Dekita" !!
  57. # 2. You are NOT allowed to repost this script.(or modified versions)
  58. # 3. You are NOT allowed to convert this script.
  59. # 4. You are NOT allowed to use this script for Commercial games.
  60. # 5. ENJOY!
  61. #
  62. # "FINE PRINT"
  63. # By using this script you hereby agree to the above terms and conditions,
  64. # if any violation of the above terms occurs "legal action" may be taken.
  65. # Not understanding the above terms and conditions does NOT mean that
  66. # they do not apply to you.
  67. # If you wish to discuss the terms and conditions in further detail you can
  68. # contact me at http://dekitarpg.wordpress.com/
  69. #
  70. #===============================================================================
  71. # ☆ Instructions
  72. #-------------------------------------------------------------------------------
  73. # Place Below " ▼ Materials " and Above " ▼ Main " in your script editor.
  74. # Place Under My $D13x - Statistic Control Script.
  75. #
  76. #===============================================================================
  77. # ☆ Notetags ( default )
  78. # For use with Actors / Classes
  79. #-------------------------------------------------------------------------------
  80. # <stat set: ID>
  81. # <dyst set: ID>
  82. # ID = the id of the Stat_Set(or Dyst_Set) you wish to use for this
  83. # actor / class
  84. # All Stat_Set and Dyst_Set settings are defined below
  85. # Actor Notes will take priority over Class Notes !
  86. #
  87. #===============================================================================
  88. # ☆ HELP
  89. #-------------------------------------------------------------------------------
  90. # PARAMS : # XPARAMS : # SPARAMS : #
  91. # stat = id # stat = id # stat = id #
  92. # mhp = 0 # hit = 0 # tgr = 0 #
  93. # mmp = 1 # eva = 1 # grd = 1 #
  94. # atk = 2 # cri = 2 # rec = 2 #
  95. # def = 3 # cev = 3 # pha = 3 #
  96. # mat = 4 # mev = 4 # mcr = 4 #
  97. # mdf = 5 # mrf = 5 # tcr = 5 #
  98. # agi = 6 # cnt = 6 # pdr = 6 #
  99. # luk = 7 # hrg = 7 # mdr = 7 #
  100. # # mrg = 8 # fdr = 8 #
  101. # # trg = 9 # exr = 9 #
  102. #-------------------------------------------------------------------------------
  103. # Remember :
  104. # All Params work with integer values, eg. 1, 5, 123, 653, 198123
  105. # All x/s-Params work with float values, eg. 1.0, 0.5, 0.1, 0.05, 0.01
  106. # 1.0 = 100%, 0.01 = 1%,
  107. #
  108. #===============================================================================
  109. module Actor_Stat_Inc
  110. Stat_Set=[]# << Keep
  111. Dyst_Set=[]# << Keep
  112.  
  113. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  114. # ☆ General Settings
  115. #--------------------------------------------------------------------------
  116. Level_Down_Removes_Stats = true
  117. Norm_Notetag = /<stat set:(.*)>/i
  118. Dyst_Notetag = /<dyst set:(.*)>/i
  119.  
  120. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  121. # ☆ Stat increase Set - Settings
  122. #--------------------------------------------------------------------------
  123. # This is a fixed stat increase per level setting.
  124. # can be any of the following stat types :
  125. # [:param , id, change],
  126. # [:x_param , id, change],
  127. # [:s_param , id, change],
  128. # [:atk_ele , id, change],
  129. # [:def_ele , id, change],
  130. # [:atk_lvl , change],
  131. # [:def_lvl , change],
  132. # [:spds_stat , id, change]
  133. Stat_Set[0]=[
  134. # [stat_type, id, change],
  135. [:atk_lvl , 10],
  136. [:def_lvl , 10],
  137. [:param , 0, 20],
  138. [:param , 1, 20],
  139. [:param , 2, 2],
  140. [:param , 3, 2],
  141. [:param , 4, 2],
  142. [:param , 5, 2],
  143. [:param , 6, 2],
  144. [:param , 7, 2],
  145. [:x_param , 0, 0.01],
  146. [:x_param , 1, 0.01],
  147. [:x_param , 2, 0.01],
  148. [:atk_ele , 4, 0.01],
  149. [:def_ele , 4, -0.01],
  150. [:spds_stat , 0, 1]
  151. [:spds_stat , 1, 1]
  152. [:spds_stat , 2, 1]
  153. [:spds_stat , 3, 1]
  154. # Insert other regular/x/s-param codes here (codes found above)
  155. # Rememer to put a comma , after each line.
  156. ]# << End Stat_Set[0]
  157.  
  158. Stat_Set[1]=[
  159. # [stat_type, id, change]
  160. [:param , 0, 20],
  161. [:param , 1, 20],
  162. [:param , 2, 2],
  163. [:param , 3, 2],
  164. [:param , 4, 2],
  165. [:param , 5, 2],
  166. [:param , 6, 2],
  167. [:param , 7, 2],
  168. [:x_param , 0, 0.01],
  169. [:x_param , 1, 0.01],
  170. [:x_param , 2, 0.01],
  171. [:atk_ele , 4, 0.01],
  172. [:def_ele , 4, -0.11],
  173. # Insert other x/s-param codes here (codes found above)
  174. # Rememer to put a comma , after each line.
  175. ]# << End Stat_Set[1]
  176.  
  177. # << Add more Stat_Set[id] By Following The Same Method As Above,
  178. # Remember [id] is The id Of The Stat Set The Actor/Class Will Have.
  179. # Also, You Can Change All Stats / Increases(or decreases)
  180. # Within the hash.
  181.  
  182. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  183. # ☆ Dynamic Stat Increase Settings
  184. #--------------------------------------------------------------------------
  185. # This is a more flexible stat set type, by allowing for each level
  186. # to have its own unique stat increase.
  187. # NOTE: I could not be bothered thinking up loads of various stat growth types,
  188. # so i barley filled out these settings, you should cusomtize these to suit
  189. # your needs before use.
  190. Dyst_Set[0]={ # << Initialize Dynamic Stat Set id [0]
  191. 1 =>[], # << End Lv 1 (inital level must be kept)
  192. 2 =>[
  193. # [stat_type, id, change]
  194. [:param , 0, 20],
  195. [:x_param , 0, 0.01],
  196. [:s_param , 2, 0.01],
  197. [:atk_ele , 4, 0.01],
  198. [:def_ele , 4, -0.11],
  199. ], # << End Lv 2
  200. 3 =>[
  201. # [stat_type, id, change]
  202. [:param , 0, 20],
  203. [:x_param , 0, 0.01],
  204. [:s_param , 2, 0.01],
  205. [:atk_ele , 4, 0.01],
  206. [:def_ele , 4, -0.11],
  207. ], # << End Lv 3
  208. 4 =>[
  209. # Stats go here
  210. ], # << End Lv 4
  211. 5 =>[
  212. # Stats go here
  213. ], # << End Lv 5
  214. 6 =>[
  215. # Stats go here
  216. ], # << End Lv 6
  217. 7 =>[
  218. # Stats go here
  219. ], # << End Lv 7
  220. 8 =>[
  221. # Stats go here
  222. ], # << End Lv 8
  223. 9 =>[
  224. # Stats go here
  225. ], # << End Lv 9
  226. 10 =>[
  227. # [stat_type, id, change]
  228. [:param , 0, 20],
  229. [:x_param , 0, 0.01],
  230. [:s_param , 2, 0.01],
  231. [:atk_ele , 4, 0.01],
  232. [:def_ele , 4, -0.11],
  233. ], # << End Lv 10
  234. 11 =>[
  235. # Stats go here
  236. ],
  237. 12 =>[
  238. # Stats go here
  239. ],
  240. 13 =>[
  241. # Stats go here
  242. ],
  243. 14 =>[
  244. # Stats go here
  245. ],
  246. 15 =>[
  247. # Stats go here
  248. ],
  249. 16 =>[
  250. # Stats go here
  251. ],
  252. 17 =>[
  253. # Stats go here
  254. ],
  255. 18 =>[
  256. # Stats go here
  257. ],
  258. 19 =>[
  259. # Stats go here
  260. ],
  261. 20 =>[
  262. # [stat_type, id, change]
  263. [:param , 0, 20],
  264. [:x_param , 0, 0.01],
  265. [:s_param , 2, 0.01],
  266. [:atk_ele , 4, 0.01],
  267. [:def_ele , 4, -0.11],
  268. ],
  269. 21 =>[
  270. # Stats go here
  271. ],
  272. 22 =>[
  273. # Stats go here
  274. ],
  275. 23 =>[
  276. # Stats go here
  277. ],
  278. 24 =>[
  279. # Stats go here
  280. ],
  281. 25 =>[
  282. # Stats go here
  283. ],
  284. 26 =>[
  285. # Stats go here
  286. ],
  287. 27 =>[
  288. # Stats go here
  289. ],
  290. 28 =>[
  291. # Stats go here
  292. ],
  293. 29 =>[
  294. # Stats go here
  295. ],
  296. 30 =>[
  297. # [stat_type, id, change]
  298. [:param , 0, 20],
  299. [:x_param , 0, 0.01],
  300. [:s_param , 2, 0.01],
  301. [:atk_ele , 4, 0.01],
  302. [:def_ele , 4, -0.11],
  303. ],
  304. 31 =>[
  305. # Stats go here
  306. ],
  307. 32 =>[
  308. # Stats go here
  309. ],
  310. 33 =>[
  311. # Stats go here
  312. ],
  313. 34 =>[
  314. # Stats go here
  315. ],
  316. 35 =>[
  317. # Stats go here
  318. ],
  319. 36 =>[
  320. # Stats go here
  321. ],
  322. 37 =>[
  323. # Stats go here
  324. ],
  325. 38 =>[
  326. # Stats go here
  327. ],
  328. 39 =>[
  329. # Stats go here
  330. ],
  331. 40 =>[
  332. # [stat_type, id, change]
  333. [:param , 0, 20],
  334. [:x_param , 0, 0.01],
  335. [:s_param , 2, 0.01],
  336. [:atk_ele , 4, 0.01],
  337. [:def_ele , 4, -0.11],
  338. ],
  339. 41 =>[
  340. # Stats go here
  341. ],
  342. 42 =>[
  343. # Stats go here
  344. ],
  345. 43 =>[
  346. # Stats go here
  347. ],
  348. 44 =>[
  349. # Stats go here
  350. ],
  351. 45 =>[
  352. # Stats go here
  353. ],
  354. 46 =>[
  355. # Stats go here
  356. ],
  357. 47 =>[
  358. # Stats go here
  359. ],
  360. 48 =>[
  361. # Stats go here
  362. ],
  363. 49 =>[
  364. # Stats go here
  365. ],
  366. 50 =>[
  367. # [stat_type, id, change]
  368. [:param , 0, 20],
  369. [:x_param , 0, 0.01],
  370. [:s_param , 2, 0.01],
  371. [:atk_ele , 4, 0.01],
  372. [:def_ele , 4, -0.11],
  373. ],
  374. 51 =>[
  375. # Stats go here
  376. ],
  377. 52 =>[
  378. # Stats go here
  379. ],
  380. 53 =>[
  381. # Stats go here
  382. ],
  383. 54 =>[
  384. # Stats go here
  385. ],
  386. 55 =>[
  387. # Stats go here
  388. ],
  389. 56 =>[
  390. # Stats go here
  391. ],
  392. 57 =>[
  393. # Stats go here
  394. ],
  395. 58 =>[
  396. # Stats go here
  397. ],
  398. 59 =>[
  399. # Stats go here
  400. ],
  401. 60 =>[
  402. # [stat_type, id, change]
  403. [:param , 0, 20],
  404. [:x_param , 0, 0.01],
  405. [:s_param , 2, 0.01],
  406. [:atk_ele , 4, 0.01],
  407. [:def_ele , 4, -0.11],
  408. ],
  409. 61 =>[
  410. # Stats go here
  411. ],
  412. 62 =>[
  413. # Stats go here
  414. ],
  415. 63 =>[
  416. # Stats go here
  417. ],
  418. 64 =>[
  419. # Stats go here
  420. ],
  421. 65 =>[
  422. # Stats go here
  423. ],
  424. 66 =>[
  425. # Stats go here
  426. ],
  427. 67 =>[
  428. # Stats go here
  429. ],
  430. 68 =>[
  431. # Stats go here
  432. ],
  433. 69 =>[
  434. # Stats go here
  435. ],
  436. 70 =>[
  437. # [stat_type, id, change]
  438. [:param , 0, 20],
  439. [:x_param , 0, 0.01],
  440. [:s_param , 2, 0.01],
  441. [:atk_ele , 4, 0.01],
  442. [:def_ele , 4, -0.11],
  443. ],
  444. 71 =>[
  445. # Stats go here
  446. ],
  447. 72 =>[
  448. # Stats go here
  449. ],
  450. 73 =>[
  451. # Stats go here
  452. ],
  453. 74 =>[
  454. # Stats go here
  455. ],
  456. 75 =>[
  457. # Stats go here
  458. ],
  459. 76 =>[
  460. # Stats go here
  461. ],
  462. 77 =>[
  463. # Stats go here
  464. ],
  465. 78 =>[
  466. # Stats go here
  467. ],
  468. 79 =>[
  469. # Stats go here
  470. ],
  471. 80 =>[
  472. # [stat_type, id, change]
  473. [:param , 0, 20],
  474. [:x_param , 0, 0.01],
  475. [:s_param , 2, 0.01],
  476. [:atk_ele , 4, 0.01],
  477. [:def_ele , 4, -0.11],
  478. ],
  479. 81 =>[
  480. # Stats go here
  481. ],
  482. 82 =>[
  483. # Stats go here
  484. ],
  485. 83 =>[
  486. # Stats go here
  487. ],
  488. 84 =>[
  489. # Stats go here
  490. ],
  491. 85 =>[
  492. # Stats go here
  493. ],
  494. 86 =>[
  495. # Stats go here
  496. ],
  497. 87 =>[
  498. # Stats go here
  499. ],
  500. 88 =>[
  501. # Stats go here
  502. ],
  503. 89 =>[
  504. # Stats go here
  505. ],
  506. 90 =>[
  507. # [stat_type, id, change]
  508. [:param , 0, 20],
  509. [:x_param , 0, 0.01],
  510. [:s_param , 2, 0.01],
  511. [:atk_ele , 4, 0.01],
  512. [:def_ele , 4, -0.11],
  513. ],
  514. 91 =>[
  515. # Stats go here
  516. ],
  517. 92 =>[
  518. # Stats go here
  519. ],
  520. 93 =>[
  521. # Stats go here
  522. ],
  523. 94 =>[
  524. # Stats go here
  525. ],
  526. 95 =>[
  527. # Stats go here
  528. ],
  529. 96 =>[
  530. # Stats go here
  531. ],
  532. 97 =>[
  533. # Stats go here
  534. ],
  535. 98 =>[
  536. # Stats go here
  537. ],
  538. 99 =>[
  539. # Stats go here
  540. ],
  541. 100 =>[
  542. # [stat_type, id, change]
  543. [:param , 0, 20],
  544. [:x_param , 0, 0.01],
  545. [:s_param , 2, 0.01],
  546. [:atk_ele , 4, 0.01],
  547. [:def_ele , 4, -0.11],
  548. ],
  549. # If for some reason you can reach more than level 100
  550. # insert more stat changes for each possible level to avoid errors.
  551. } # << End Dynamic Stat Set id [0] << KEEP !!
  552.  
  553. # << Add More Dynamic Stat Sets Below This Point.
  554. # Simply Copy The Code From Above And Change The
  555. # Id Number And Stats To Suit Your Needs.
  556.  
  557. #####################
  558. # CUSTOMISATION END #
  559. end #####################
  560. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
  561. # #
  562. # http://dekitarpg.wordpress.com/ #
  563. # #
  564. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
  565. # The following code is protected under the 2013 Dekita Data Protection Act. #
  566. # Ie. The “Do Not Fucking Look” Law. #
  567. # Breaking This One And Only Rule WILL Result in ERECTILE DYSFUNCTION. #
  568. # That is all ! #
  569. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
  570. #===============================================================================#
  571. module DataManager
  572. #===============================================================================
  573. #---------------------------------------------------------------------------
  574. # Alias List
  575. #---------------------------------------------------------------------------
  576. class << self
  577. alias :lbd_unique_lv_up_stat :load_database
  578. end
  579. #---------------------------------------------------------------------------
  580. # Load Database (alias)
  581. #---------------------------------------------------------------------------
  582. def self.load_database
  583. lbd_unique_lv_up_stat
  584. loa_unique_lv_up_stat
  585. end
  586. #---------------------------------------------------------------------------
  587. # Load Unique Shit
  588. #---------------------------------------------------------------------------
  589. def self.loa_unique_lv_up_stat
  590. gr = [$data_actors,$data_classes]
  591. for g in gr
  592. for o in g
  593. next if o == nil
  594. o.load__lv_up_stat
  595. end
  596. end
  597. end
  598.  
  599. end # DataManager
  600.  
  601. #===============================================================================
  602. class RPG::Actor < RPG::BaseItem
  603. #===============================================================================
  604. #---------------------------------------------------------------------------
  605. # Pi Variables
  606. #---------------------------------------------------------------------------
  607. attr_accessor :stat_set_id
  608. #---------------------------------------------------------------------------
  609. # Load Level Stat Notes
  610. #---------------------------------------------------------------------------
  611. def load__lv_up_stat
  612. @stat_set_id = [ nil , nil ]
  613. self.note.split(/[\r\n]+/).each do |line|
  614. case line
  615. when Actor_Stat_Inc::Norm_Notetag then @stat_set_id = [:steady , $1.to_i]
  616. when Actor_Stat_Inc::Dyst_Notetag then @stat_set_id = [:dynamic, $1.to_i]
  617. end
  618. end
  619. end
  620.  
  621. end
  622.  
  623. #===============================================================================
  624. class RPG::Class < RPG::BaseItem
  625. #===============================================================================
  626. #---------------------------------------------------------------------------
  627. # Alias List
  628. #---------------------------------------------------------------------------
  629. alias :deki_lvupstats :load_unique_shit if $D13x[:CORE]
  630. #---------------------------------------------------------------------------
  631. # Pi Variables
  632. #---------------------------------------------------------------------------
  633. attr_accessor :stat_set_id
  634. #---------------------------------------------------------------------------
  635. # load unique shit
  636. #---------------------------------------------------------------------------
  637. def load_unique_shit
  638. deki_lvupstats if $D13x[:CORE]
  639. load__lv_up_stat
  640. end
  641. #---------------------------------------------------------------------------
  642. # Load Level Stat Notes
  643. #---------------------------------------------------------------------------
  644. def load__lv_up_stat
  645. @stat_set_id = [ nil , nil ]
  646. self.note.split(/[\r\n]+/).each do |line|
  647. case line
  648. when Actor_Stat_Inc::Norm_Notetag then @stat_set_id = [:steady , $1.to_i]
  649. when Actor_Stat_Inc::Dyst_Notetag then @stat_set_id = [:dynamic, $1.to_i]
  650. end
  651. end
  652. end
  653.  
  654. end
  655.  
  656. #===============================================================================
  657. class Game_Actor < Game_Battler
  658. #===============================================================================
  659. #---------------------------------------------------------------------------
  660. # Alias List
  661. #---------------------------------------------------------------------------
  662. alias :lv_down_rem_stats_sD13x :lv_down_extra
  663. #---------------------------------------------------------------------------
  664. # Get Stat Increase Type (and do it)
  665. #---------------------------------------------------------------------------
  666. def determine_stat_inc_type
  667. type = stat_set_type
  668. id = stat_set_id
  669. case type
  670. when :steady then doda_stat_inc(Actor_Stat_Inc::Stat_Set[id])
  671. when :dynamic then doda_stat_inc(Actor_Stat_Inc::Dyst_Set[id][@level])
  672. end
  673. end
  674. #---------------------------------------------------------------------------
  675. # Do Stat Increase
  676. #---------------------------------------------------------------------------
  677. def doda_stat_inc(type)
  678. return if type == nil
  679. type.each do |stat|
  680. case stat[0]
  681. when :param
  682. next unless $D13x[:Stats_Control]
  683. add_param(stat[1], stat[2], false)
  684. when :x_param
  685. next unless $D13x[:Stats_Control]
  686. add_xparam(stat[1], stat[2], false)
  687. when :s_param
  688. next unless $D13x[:Stats_Control]
  689. add_sparam(stat[1], stat[2], false)
  690. when :atk_ele
  691. next unless $D13x[:Elems_Control]
  692. add_atk_ele(stat[1], stat[2], false)
  693. when :def_ele
  694. next unless $D13x[:Elems_Control]
  695. add_def_ele(stat[1], stat[2], false)
  696. when :atk_lvl
  697. next unless $D13x[:Atk_Def_Lvs]
  698. add_atl(stat[1],false)
  699. when :def_lvl
  700. next unless $D13x[:Atk_Def_Lvs]
  701. add_dfl(stat[1],false)
  702. when :spds_stat
  703. next unless $D13x[:ISPDS]
  704. add_spds_stats(stat[1],stat[2],false)
  705. end
  706. end
  707. refresh
  708. end
  709. #--------------------------------------------------------------------------
  710. # Level Down Extra Shit
  711. #--------------------------------------------------------------------------
  712. def lv_down_extra
  713. lv_down_rem_stats_sD13x
  714. determine_stat_dec_type
  715. end
  716. #---------------------------------------------------------------------------
  717. # Get Stat Increase Type (and do it)
  718. #---------------------------------------------------------------------------
  719. def determine_stat_dec_type
  720. return unless Actor_Stat_Inc::Level_Down_Removes_Stats
  721. type = stat_set_type
  722. id = stat_set_id
  723. case type
  724. when :steady then doda_stat_dec(Actor_Stat_Inc::Stat_Set[id])
  725. when :dynamic then doda_stat_dec(Actor_Stat_Inc::Dyst_Set[id][@level])
  726. end
  727. end
  728. #---------------------------------------------------------------------------
  729. # Do Stat Decrease
  730. #---------------------------------------------------------------------------
  731. def doda_stat_dec(type)
  732. return if type == nil
  733. type.each do |stat|
  734. case stat[0]
  735. when :param
  736. next unless $D13x[:Stats_Control]
  737. sub_param(stat[1], stat[2], false)
  738. when :x_param
  739. next unless $D13x[:Stats_Control]
  740. sub_xparam(stat[1], stat[2], false)
  741. when :s_param
  742. next unless $D13x[:Stats_Control]
  743. sub_sparam(stat[1], stat[2], false)
  744. when :atk_ele
  745. next unless $D13x[:Elems_Control]
  746. sub_atk_ele(stat[1], stat[2], false)
  747. when :def_ele
  748. next unless $D13x[:Elems_Control]
  749. sub_def_ele(stat[1], stat[2], false)
  750. when :atk_lvl
  751. next unless $D13x[:Atk_Def_Lvs]
  752. sub_atl(stat[1],false)
  753. when :def_lvl
  754. next unless $D13x[:Atk_Def_Lvs]
  755. sub_dfl(stat[1],false)
  756. when :spds_stat
  757. next unless $D13x[:ISPDS]
  758. sub_spds_stats(stat[1],stat[2],false)
  759. end
  760. end
  761. refresh
  762. end
  763. #---------------------------------------------------------------------------
  764. # Get Stat Increase Type
  765. #---------------------------------------------------------------------------
  766. def stat_set_type
  767. set = self.class.stat_set_id[0]
  768. if actor.stat_set_id[0] != nil
  769. set = actor.stat_set_id[0]
  770. end
  771. set
  772. end
  773. #---------------------------------------------------------------------------
  774. # Get Stat Increase ID
  775. #---------------------------------------------------------------------------
  776. def stat_set_id
  777. set = self.class.stat_set_id[1]
  778. if actor.stat_set_id[1] != nil
  779. set = actor.stat_set_id[1]
  780. end
  781. set
  782. end
  783.  
  784. end
  785.  
  786. #==============================================================================#
  787. # http://dekitarpg.wordpress.com/ #
  788. #==============================================================================#
  789. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement