Advertisement
Dekita

$D13x Dev SLUD 1.2

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