Advertisement
Dekita

eviv

Apr 19th, 2014
702
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 47.99 KB | None | 0 0
  1. if true # << Make true to use this script, false to disable.
  2. #===============================================================================
  3. #
  4. # ☆ $D13x - EVIV Stats
  5. # -- Author : Dekita
  6. # -- Version : 1.1
  7. # -- Level : Hard / Extreme
  8. # -- Requires : $D13x Core v2.7
  9. # -- Engine : RPG Maker VX Ace.
  10. #
  11. #===============================================================================
  12. # ☆ Import
  13. #-------------------------------------------------------------------------------
  14. $D13x={}if$D13x==nil
  15. $D13x[:EVIV_Stats]=true
  16. #===============================================================================
  17. # ☆ Updates
  18. #-------------------------------------------------------------------------------
  19. # D /M /Y
  20. # 19/o4/2o14 - Finished,
  21. # ??/o4/2o14 - Released Test / Beta Version to some friends,
  22. # o4/o4/2o14 - Started
  23. #
  24. #===============================================================================
  25. # ☆ Introduction
  26. #-------------------------------------------------------------------------------
  27. # This script replicates the Ev / Iv feature from the pokemon game series.
  28. # For those that do not know here is a short explanation...
  29. #
  30. # When each Actor / Enemy is initialized it gains a random IV value for
  31. # each of its stats. Enemies EV values are also randomized.
  32. # Each time you defeat an enemy, it will give you some Ev points - based on the
  33. # type of enemy.
  34. # These new Ev and Iv values are then used to dramatically alter the 'base stat'
  35. # value. ('base stat' is your original param value.)
  36. #
  37. # Obviously, cause I could, I enabled this feature for EVERY SINGLE STAT!!
  38. # - including all stats created by my scripts.
  39. # This means the stats you can now control using Ev / Iv values are...
  40. # Params - Only requires $D13x - Core Script
  41. # xParams - Requires Statistic Control
  42. # sParams - Requires Statistic Control
  43. # Atk Ele - Requires Elements Control
  44. # Def Ele - Requires Elements Control
  45. # Parent stats - Requires ISPDS
  46. # Atk Lvl - Requires Atk | Def Levels
  47. # Def Lvl - Requires Atk | Def Levels
  48. # Max TP - Requires Max TP Control
  49. #
  50. # You can use various script calls / notetags to change EV values.
  51. #
  52. # You can use all new variables in stat formula's / Conditional branches and
  53. # things like that..
  54. #
  55. # And finally...
  56. # You can FULLY CUSTOMIZE EVERY SINGLE EV/IV CALCULATION - this means...
  57. # you can easily create your own custom stat calculation for all stats without
  58. # any coding knowledge at all!!
  59. #
  60. # #ImSoPro-DidntYouKnow?
  61. #
  62. #===============================================================================
  63. # ★☆★☆★☆★☆★☆★☆★☆★ TERMS AND CONDITIONS: ☆★☆★☆★☆★☆★☆★☆★☆★☆
  64. #===============================================================================
  65. # 1. You MUST give credit to "Dekita" !!
  66. # 2. You are NOT allowed to repost this script.(or modified versions)
  67. # 3. You are NOT allowed to convert this script.
  68. # 4. You are NOT allowed to use this script for Commercial games.
  69. # 5. ENJOY!
  70. #
  71. # "FINE PRINT"
  72. # By using this script you hereby agree to the above terms and conditions,
  73. # if any violation of the above terms occurs "legal action" may be taken.
  74. # Not understanding the above terms and conditions does NOT mean that
  75. # they do not apply to you.
  76. # If you wish to discuss the terms and conditions in further detail you can
  77. # contact me at http://dekitarpg.wordpress.com/
  78. #
  79. #===============================================================================
  80. # ☆ Instructions
  81. #-------------------------------------------------------------------------------
  82. # Place Below " ▼ Materials " and Above " ▼ Main " in your script editor.
  83. #
  84. #===============================================================================
  85. # ☆ Script Calls
  86. #-------------------------------------------------------------------------------
  87. # ACTOR.param_ev_gain(id,gain)
  88. # ACTOR.xparam_ev_gain(id,gain)
  89. # ACTOR.sparam_ev_gain(id,gain)
  90. # ACTOR.atk_ele_ev_gain(id,gain)
  91. # ACTOR.def_ele_ev_gain(id,gain)
  92. # ACTOR.atl_dfl_ev_gain(id,gain)
  93. # ACTOR.spds_stat_ev_gain(id,gain)
  94. # ACTOR.max_tp_ev_gain(gain)
  95. # ^- use these script calls to gain EV stats equal to gain for id.
  96. #
  97. # ACTOR.can_param_eviv_mod(stat_id)
  98. # ACTOR.can_xparam_eviv_mod(stat_id)
  99. # ACTOR.can_sparam_eviv_mod(stat_id)
  100. # ACTOR.can_atk_ele_eviv_mod(stat_id)
  101. # ACTOR.can_def_ele_eviv_mod(stat_id)
  102. # ACTOR.can_atl_dfl_eviv_mod(stat_id)
  103. # ACTOR.can_spds_stat_eviv_mod(stat_id)
  104. # ACTOR.can_max_tp_eviv_mod
  105. # ^- use these script calls to check if the actor uses ev/iv stat mods for stat_id
  106. #
  107. # ACTOR = $game_actors[ID] or $game_party.leader or whatever...
  108. #
  109. # NOW...
  110. # Here is a list of variables that your actors / enemies now have;
  111. #
  112. # iv_param
  113. # iv_xparam
  114. # iv_sparam
  115. # iv_atk_ele
  116. # iv_def_ele
  117. # iv_atl_dfl
  118. # iv_spds_stats
  119. # iv_max_tp
  120. # ev_param
  121. # ev_xparam
  122. # ev_sparam
  123. # ev_atk_ele
  124. # ev_def_ele
  125. # ev_atl_dfl
  126. # ev_spds_stats
  127. # ev_max_tp
  128. # ev_param_rate
  129. # ev_xparam_rate
  130. # ev_sparam_rate
  131. # ev_atk_ele_rate
  132. # ev_def_ele_rate
  133. # ev_atl_dfl_rate
  134. # ev_spds_stats_rate
  135. # ev_max_tp_rate
  136. #
  137. # You can use these in conditional branch checks and whatever else, you must
  138. # also reference the id of the stat you want to check / modify, like so...
  139. # $game_actors[ID].iv_param[0]
  140. # This would check actor Id's iv param for param id 0 - mhp.
  141. #
  142. # If you dont understand this, please disregard it. I do not have the time to
  143. # sit and explain how to script...
  144. #
  145. #===============================================================================
  146. # ☆ Notetags ( default )
  147. #-------------------------------------------------------------------------------
  148. # <par ev: ID, VALUE>
  149. # <xpar ev: ID, VALUE>
  150. # <spar ev: ID, VALUE>
  151. # <atkele ev: ID, VALUE>
  152. # <defele ev: ID, VALUE>
  153. # <atldfl ev: ID, VALUE>
  154. # <spds ev: ID, VALUE>
  155. # <max tp ev: VALUE>
  156. # <all ev: VALUE>
  157. # The above notetags should be given to enemies to determine how many ev pts
  158. # should be gained from it upon death.
  159. #
  160. # <no par eviv mod: ID>
  161. # <no xpar eviv mod: ID>
  162. # <no spar eviv mod: ID>
  163. # <no atk ele eviv mod: ID>
  164. # <no def ele eviv mod: ID>
  165. # <no atl dfl eviv mod: ID>
  166. # <no spds eviv mod: ID>
  167. # <no max tp eviv mod>
  168. # <no eviv mod>
  169. # These notetags should be used for actors / enemies who's stats are not modified
  170. # by their EV / IV values.
  171. #
  172. #===============================================================================
  173. # ☆ HELP
  174. #-------------------------------------------------------------------------------
  175. # N/A
  176. #
  177. #===============================================================================
  178. module EVIV
  179. #===============================================================================
  180. #-----------------------------------------------------------------------------
  181. # :stat => [id 0, id 1, id 2, id 3, id 4, id 5... ]
  182. #-----------------------------------------------------------------------------
  183. Max_Iv_Value = {
  184. :param => [32,32,32,32,32,32,32,32],
  185. :xparam => [32,32,32,32,32,32,32,32,32,32,32],
  186. :sparam => [32,32,32,32,32,32,32,32,32,32,32],
  187. :atk_ele => [32,32,32,32,32,32,32,32,32,32,32],
  188. :def_ele => [32,32,32,32,32,32,32,32,32,32,32],
  189. :atl_dfl => [32,32],
  190. :spds_stat => [32,32,32,32,32,32,32,32,32,32],
  191. :max_tp => 32,
  192. } # << Max_Iv_Value
  193. #-----------------------------------------------------------------------------
  194. # :stat => [id 0, id 1, id 2, id 3, id 4, id 5... ]
  195. #-----------------------------------------------------------------------------
  196. Max_Ev_Value = {
  197. :param => [256,256,256,256,256,256,256,256],
  198. :xparam => [256,256,256,256,256,256,256,256,256,256,256],
  199. :sparam => [256,256,256,256,256,256,256,256,256,256,256],
  200. :atk_ele => [256,256,256,256,256,256,256,256,256,256,256],
  201. :def_ele => [256,256,256,256,256,256,256,256,256,256,256],
  202. :atl_dfl => [256,256],
  203. :spds_stat => [256,256,256,256,256,256,256,256,256,256],
  204. :max_tp => 256,
  205. } # << Max_Ev_Value
  206. #-----------------------------------------------------------------------------
  207. # :stat => total max ev value for all stats of this type.
  208. #-----------------------------------------------------------------------------
  209. Total_Max_Ev_Value = {
  210. :param => 510,
  211. :xparam => 510,
  212. :sparam => 510,
  213. :atk_ele => 510,
  214. :def_ele => 510,
  215. :atl_dfl => 510,
  216. :spds_stat => 510,
  217. :max_tp => 510,
  218. } # << Max_Ev_Value
  219. #-----------------------------------------------------------------------------
  220. # param stat modification - this is setup to calculate the way the pokemon
  221. # game series calculated its Ev and Iv stats...
  222. #-----------------------------------------------------------------------------
  223. def self.param_plus(bas,battler,stat_id)
  224. return bas unless battler.can_param_eviv_mod(stat_id)
  225. ivs = battler.iv_param[stat_id]
  226. evs = battler.ev_param[stat_id]
  227. lvl = battler.level.nil? ? 1 : battler.level
  228. case stat_id
  229. when 0, 1 then return (((ivs+2*bas+(evs/4))*lvl/100)+10+lvl)
  230. else ; return (((ivs+2*bas+(evs/4))*lvl/100)+5)
  231. end
  232. end
  233. #-----------------------------------------------------------------------------
  234. #
  235. #-----------------------------------------------------------------------------
  236. def self.xparam_plus(bas,battler,stat_id)
  237. return bas unless battler.can_xparam_eviv_mod(stat_id)
  238. return bas
  239. end
  240. #-----------------------------------------------------------------------------
  241. #
  242. #-----------------------------------------------------------------------------
  243. def self.sparam_plus(bas,battler,stat_id)
  244. return bas unless battler.can_sparam_eviv_mod(stat_id)
  245. return bas
  246. end
  247. #-----------------------------------------------------------------------------
  248. #
  249. #-----------------------------------------------------------------------------
  250. def self.def_ele_plus(bas,battler,stat_id)
  251. return bas unless battler.can_def_ele_eviv_mod(stat_id)
  252. return bas
  253. end
  254. #-----------------------------------------------------------------------------
  255. #
  256. #-----------------------------------------------------------------------------
  257. def self.atk_ele_plus(bas,battler,stat_id)
  258. return bas unless battler.can_atk_ele_eviv_mod(stat_id)
  259. return bas
  260. end
  261. #-----------------------------------------------------------------------------
  262. #
  263. #-----------------------------------------------------------------------------
  264. def self.atl_dfl_plus(bas,battler,stat_id)
  265. return bas unless battler.can_atl_dfl_eviv_mod(stat_id)
  266. return bas
  267. end
  268. #-----------------------------------------------------------------------------
  269. #
  270. #-----------------------------------------------------------------------------
  271. def self.spds_plus(bas,battler,stat_id)
  272. return bas unless battler.can_spds_stat_eviv_mod(stat_id)
  273. return bas
  274. end
  275. #-----------------------------------------------------------------------------
  276. #
  277. #-----------------------------------------------------------------------------
  278. def self.max_tp_plus(bas,battler)
  279. return bas unless battler.can_max_tp_eviv_mod
  280. return bas
  281. end
  282. #-----------------------------------------------------------------------------
  283. #
  284. #-----------------------------------------------------------------------------
  285. Notes={
  286. :param => /<par ev:(.*),(.*)>/i,
  287. :xparam => /<xpar ev:(.*),(.*)>/i,
  288. :sparam => /<spar ev:(.*),(.*)>/i,
  289. :atk_ele => /<atkele ev:(.*),(.*)>/i,
  290. :def_ele => /<defele ev:(.*),(.*)>/i,
  291. :atl_dfl => /<atldfl ev:(.*),(.*)>/i,
  292. :spds => /<spds ev:(.*),(.*)>/i,
  293. :max_tp => /<max tp ev:(.*)>/i,
  294. :all => /<all ev:(.*)>/i,
  295. # --
  296. :can_param => /<no par eviv mod:(.*)>/i,
  297. :can_xparam => /<no xpar eviv mod:(.*)>/i,
  298. :can_sparam => /<no spar eviv mod:(.*)>/i,
  299. :can_atk_ele => /<no atk ele eviv mod:(.*)>/i,
  300. :can_def_ele => /<no def ele eviv mod:(.*)>/i,
  301. :can_atl_dfl => /<no atl dfl eviv mod:(.*)>/i,
  302. :can_spds => /<no spds eviv mod:(.*)>/i,
  303. :can_max_tp => /<no max tp eviv mod>/i,
  304. :can_all => /<no eviv mod>/i,
  305. }
  306. #-----------------------------------------------------------------------------
  307. # :leader
  308. # :all_members
  309. # :battle_members
  310. # :alive_members
  311. #-----------------------------------------------------------------------------
  312. EV_Distribution_Type = :alive_members
  313. #-----------------------------------------------------------------------------
  314. # self.get_ev_dysto_membs # Do Not Remove this Method.
  315. #-----------------------------------------------------------------------------
  316. def self.get_ev_dysto_membs
  317. case EV_Distribution_Type
  318. when :leader then return [$game_party.leader]
  319. when :all_members then return $game_party.members
  320. when :battle_members then return $game_party.battle_members
  321. when :alive_members then return $game_party.alive_battle_members
  322. when :custom then return # // Your code here..
  323. end #####################
  324. end # CUSTOMISATION END #
  325. end #####################
  326. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
  327. # #
  328. # http://dekitarpg.wordpress.com/ #
  329. # #
  330. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
  331. #===============================================================================#
  332. # ARE YOU MODIFYING BEYOND THIS POINT? \.\. #
  333. # YES?\.\. #
  334. # OMG, REALLY? \| #
  335. # WELL SLAP MY FACE AND CALL ME A DRAGONITE.\..\.. #
  336. # I REALLY DIDN'T THINK YOU HAD IT IN YOU.\..\.. #
  337. #===============================================================================#
  338. module EVIV
  339. #===============================================================================
  340. #-----------------------------------------------------------------------------
  341. #
  342. #-----------------------------------------------------------------------------
  343. Max_Iv_Value[:atk_ele][-1] = 0
  344. Max_Iv_Value[:def_ele][-1] = 0
  345. #-----------------------------------------------------------------------------
  346. #
  347. #-----------------------------------------------------------------------------
  348. Max_Ev_Value[:atk_ele][-1] = 0
  349. Max_Ev_Value[:def_ele][-1] = 0
  350. end
  351. #===============================================================================
  352. module DataManager
  353. #===============================================================================
  354. #-----------------------------------------------------------------------------
  355. #
  356. #-----------------------------------------------------------------------------
  357. class << self
  358. alias :load_database_EVIV :load_database
  359. end
  360. #-----------------------------------------------------------------------------
  361. #
  362. #-----------------------------------------------------------------------------
  363. def self.load_database
  364. load_database_EVIV
  365. load_notetags_EVIV
  366. end
  367. #-----------------------------------------------------------------------------
  368. #
  369. #-----------------------------------------------------------------------------
  370. def self.load_notetags_EVIV
  371. groups = [$data_enemies,$data_actors]#, $data_weapons, $data_armors, $data_states]
  372. for group in groups
  373. for obj in group
  374. next if obj.nil?
  375. obj.load_EVIV
  376. end
  377. end
  378. end
  379. end
  380. #===============================================================================
  381. module EVIV_DATA
  382. #===============================================================================
  383. #-----------------------------------------------------------------------------
  384. #
  385. #-----------------------------------------------------------------------------
  386. attr_accessor :can_param_eviv_mod
  387. attr_accessor :can_xparam_eviv_mod
  388. attr_accessor :can_sparam_eviv_mod
  389. attr_accessor :can_atk_ele_eviv_mod
  390. attr_accessor :can_def_ele_eviv_mod
  391. attr_accessor :can_atl_dfl_eviv_mod
  392. attr_accessor :can_spds_stats_eviv_mod
  393. attr_accessor :can_max_tp_eviv_mod
  394. attr_accessor :dist_par_ev
  395. attr_accessor :dist_xpar_ev
  396. attr_accessor :dist_spar_ev
  397. attr_accessor :dist_atkele_ev
  398. attr_accessor :dist_defele_ev
  399. attr_accessor :dist_atldfl_ev
  400. attr_accessor :dist_spds_ev
  401. attr_accessor :dist_max_tp_ev
  402. #-----------------------------------------------------------------------------
  403. #
  404. #-----------------------------------------------------------------------------
  405. def init_EVIV_variables
  406. init_can_stat_eviv_mod(true)
  407. init_dist_stat_eviv_mod( 0 )
  408. end
  409. #-----------------------------------------------------------------------------
  410. #
  411. #-----------------------------------------------------------------------------
  412. def init_can_stat_eviv_mod(val)
  413. @can_param_eviv_mod = [val] * 8
  414. @can_xparam_eviv_mod = [val] * 10
  415. @can_sparam_eviv_mod = [val] * 10
  416. @can_atk_ele_eviv_mod = [val] * $data_system.elements.size
  417. @can_def_ele_eviv_mod = [val] * $data_system.elements.size
  418. @can_atl_dfl_eviv_mod = [val] * 2
  419. @can_spds_stats_eviv_mod = [val] * 8
  420. @can_spds_stats_eviv_mod = [val] * SPDS::Commands.size if $D13x[:ISPDS]
  421. @can_max_tp_eviv_mod = val
  422. end
  423. #-----------------------------------------------------------------------------
  424. #
  425. #-----------------------------------------------------------------------------
  426. def init_dist_stat_eviv_mod(val)
  427. @dist_par_ev = [val] * 8
  428. @dist_xpar_ev = [val] * 10
  429. @dist_spar_ev = [val] * 10
  430. @dist_atkele_ev = [val] * $data_system.elements.size
  431. @dist_defele_ev = [val] * $data_system.elements.size
  432. @dist_atldfl_ev = [val] * 2
  433. @dist_spds_ev = [val] * 8
  434. @dist_spds_ev = [val] * SPDS::Commands.size if $D13x[:ISPDS]
  435. @dist_max_tp_ev = val
  436. end
  437. #-----------------------------------------------------------------------------
  438. #
  439. #-----------------------------------------------------------------------------
  440. def load_EVIV_notetags
  441. self.note.split(/[\r\n]+/).each do |line|
  442. case line
  443. when EVIV::Notes[:can_param] then @can_param_eviv_mod[$1.to_i] = false
  444. when EVIV::Notes[:can_xparam] then @can_xparam_eviv_mod[$1.to_i] = false
  445. when EVIV::Notes[:can_sparam] then @can_sparam_eviv_mod[$1.to_i] = false
  446. when EVIV::Notes[:can_atk_ele] then @can_atk_ele_eviv_mod[$1.to_i] = false
  447. when EVIV::Notes[:can_def_ele] then @can_def_ele_eviv_mod[$1.to_i] = false
  448. when EVIV::Notes[:can_atl_dfl] then @can_atl_dfl_eviv_mod[$1.to_i] = false
  449. when EVIV::Notes[:can_spds] then @can_spds_stats_eviv_mod[$1.to_i] = false
  450. when EVIV::Notes[:can_max_tp] then @can_max_tp_eviv_mod = false
  451. when EVIV::Notes[:can_all] then init_can_stat_eviv_mod(false)
  452. when EVIV::Notes[:param] then @dist_par_ev[$1.to_i] += $2.to_i
  453. when EVIV::Notes[:xparam] then @dist_xpar_ev[$1.to_i] += $2.to_i
  454. when EVIV::Notes[:sparam] then @dist_spar_ev[$1.to_i] += $2.to_i
  455. when EVIV::Notes[:atk_ele] then @dist_atkele_ev[$1.to_i] += $2.to_i
  456. when EVIV::Notes[:def_ele] then @dist_defele_ev[$1.to_i] += $2.to_i
  457. when EVIV::Notes[:atl_dfl] then @dist_atldfl_ev[$1.to_i] += $2.to_i
  458. when EVIV::Notes[:spds] then @dist_spds_ev[$1.to_i] += $2.to_i
  459. when EVIV::Notes[:max_tp] then @dist_max_tp_ev += $1.to_i
  460. when EVIV::Notes[:all] then init_dist_stat_eviv_mod($1.to_i)
  461. end
  462. end
  463. end
  464. end
  465. #===============================================================================
  466. class RPG::BaseItem
  467. #===============================================================================
  468. #-----------------------------------------------------------------------------
  469. #
  470. #-----------------------------------------------------------------------------
  471. include EVIV_DATA
  472. #-----------------------------------------------------------------------------
  473. #
  474. #-----------------------------------------------------------------------------
  475. def load_EVIV
  476. init_EVIV_variables
  477. load_EVIV_notetags
  478. end
  479. end
  480. #===============================================================================
  481. module BattleManager
  482. #===============================================================================
  483. #-----------------------------------------------------------------------------
  484. #
  485. #-----------------------------------------------------------------------------
  486. class << self
  487. alias :bmde_EVIV :gain_exp
  488. end
  489. #-----------------------------------------------------------------------------
  490. #
  491. #-----------------------------------------------------------------------------
  492. def self.gain_exp
  493. gain_all_evs
  494. bmde_EVIV
  495. end
  496. #-----------------------------------------------------------------------------
  497. #
  498. #-----------------------------------------------------------------------------
  499. def self.gain_all_evs
  500. for m in EVIV.get_ev_dysto_membs
  501. 8.times { |i| m.param_ev_gain(i, $game_troop.par_ev_total(i)) }
  502. 10.times { |i| m.xparam_ev_gain(i,$game_troop.xpar_ev_total(i)) }
  503. 10.times { |i| m.sparam_ev_gain(i,$game_troop.spar_ev_total(i)) }
  504. $data_system.elements.size.times do |i|
  505. m.atk_ele_ev_gain(i,$game_troop.atk_ele_ev_total(i))
  506. m.def_ele_ev_gain(i,$game_troop.def_ele_ev_total(i))
  507. end
  508. 2.times {|i| m.atl_dfl_ev_gain(i,$game_troop.atldfl_ev_total(i)) }
  509. if $D13x[:ISPDS]
  510. SPDS::Commands.size.times do |i|
  511. m.spds_stat_ev_gain(i,$game_troop.spds_ev_total(i))
  512. end
  513. end
  514. m.max_tp_ev_gain($game_troop.max_tp_ev_total)
  515. end
  516. end
  517. end
  518. #===============================================================================
  519. module Game_Battler_EVIV
  520. #===============================================================================
  521. #-----------------------------------------------------------------------------
  522. #
  523. #-----------------------------------------------------------------------------
  524. attr_accessor :iv_param
  525. attr_accessor :iv_xparam
  526. attr_accessor :iv_sparam
  527. attr_accessor :iv_atk_ele
  528. attr_accessor :iv_def_ele
  529. attr_accessor :iv_atl_dfl
  530. attr_accessor :iv_spds_stats
  531. attr_accessor :iv_max_tp
  532. attr_accessor :ev_param
  533. attr_accessor :ev_xparam
  534. attr_accessor :ev_sparam
  535. attr_accessor :ev_atk_ele
  536. attr_accessor :ev_def_ele
  537. attr_accessor :ev_atl_dfl
  538. attr_accessor :ev_spds_stats
  539. attr_accessor :ev_max_tp
  540. attr_accessor :ev_param_rate
  541. attr_accessor :ev_xparam_rate
  542. attr_accessor :ev_sparam_rate
  543. attr_accessor :ev_atk_ele_rate
  544. attr_accessor :ev_def_ele_rate
  545. attr_accessor :ev_atl_dfl_rate
  546. attr_accessor :ev_spds_stats_rate
  547. attr_accessor :ev_max_tp_rate
  548. #-----------------------------------------------------------------------------
  549. #
  550. #-----------------------------------------------------------------------------
  551. def initialize_EVIV
  552. init_ivs
  553. init_evs
  554. init_iv_rand
  555. init_ev_rate
  556. end
  557. #-----------------------------------------------------------------------------
  558. #
  559. #-----------------------------------------------------------------------------
  560. def init_ivs
  561. @iv_param = [0] * 8
  562. @iv_xparam = [0] * 10
  563. @iv_sparam = [0] * 10
  564. @iv_atk_ele = [0] * $data_system.elements.size
  565. @iv_def_ele = [0] * $data_system.elements.size
  566. @iv_atl_dfl = [0] * 2
  567. @iv_spds_stats = [0] * 8
  568. @iv_spds_stats = [0] * SPDS::Commands.size if $D13x[:ISPDS]
  569. @iv_max_tp = 0
  570. end
  571. #-----------------------------------------------------------------------------
  572. #
  573. #-----------------------------------------------------------------------------
  574. def init_evs
  575. @ev_param = [0] * 8
  576. @ev_xparam = [0] * 10
  577. @ev_sparam = [0] * 10
  578. @ev_atk_ele = [0] * $data_system.elements.size
  579. @ev_def_ele = [0] * $data_system.elements.size
  580. @ev_atl_dfl = [0] * 2
  581. @ev_spds_stats = [0] * 8
  582. @ev_spds_stats = [0] * SPDS::Commands.size if $D13x[:ISPDS]
  583. @ev_max_tp = 0
  584. end
  585. #-----------------------------------------------------------------------------
  586. #
  587. #-----------------------------------------------------------------------------
  588. def init_iv_rand
  589. 8.times { |i| @iv_param[i] = rand(EVIV::Max_Iv_Value[:param][i]).to_i }
  590. 10.times do |i|
  591. @iv_xparam[i] = rand(EVIV::Max_Iv_Value[:xparam][i]).to_i
  592. @iv_sparam[i] = rand(EVIV::Max_Iv_Value[:sparam][i]).to_i
  593. end
  594. $data_system.elements.size.times do |i|
  595. @iv_atk_ele[i] = rand(EVIV::Max_Iv_Value[:atk_ele][i]).to_i
  596. @iv_def_ele[i] = rand(EVIV::Max_Iv_Value[:def_ele][i]).to_i
  597. end
  598. 2.times { |i| @iv_atl_dfl[i] = rand(EVIV::Max_Iv_Value[:atl_dfl][i]).to_i }
  599. if $D13x[:ISPDS]
  600. SPDS::Commands.size.times do |i|
  601. @iv_spds_stats[i] = rand(EVIV::Max_Iv_Value[:spds_stat][i]).to_i
  602. end
  603. end
  604. @iv_max_tp = rand(EVIV::Max_Iv_Value[:max_tp]).to_i
  605. end
  606. #-----------------------------------------------------------------------------
  607. #
  608. #-----------------------------------------------------------------------------
  609. def init_ev_rand
  610. 8.times { |i| param_ev_gain(i,rand(EVIV::Max_Ev_Value[:param][i]).to_i )}
  611. 10.times do |i|
  612. xparam_ev_gain(i,rand(EVIV::Max_Ev_Value[:xparam][i]).to_i)
  613. sparam_ev_gain(i,rand(EVIV::Max_Ev_Value[:sparam][i]).to_i)
  614. end
  615. $data_system.elements.size.times do |i|
  616. atk_ele_ev_gain(i,rand(EVIV::Max_Ev_Value[:atk_ele][i]).to_i)
  617. def_ele_ev_gain(i,rand(EVIV::Max_Ev_Value[:def_ele][i]).to_i)
  618. end
  619. 2.times { |i| atl_dfl_ev_gain(i,rand(EVIV::Max_Ev_Value[:atl_dfl][i]).to_i)}
  620. if $D13x[:ISPDS]
  621. SPDS::Commands.size.times do |i|
  622. spds_stat_ev_gain(i,rand(EVIV::Max_Ev_Value[:spds_stat][i]).to_i)
  623. end
  624. end
  625. max_tp_ev_gain(rand(EVIV::Max_Ev_Value[:max_tp]).to_i)
  626. end
  627. #-----------------------------------------------------------------------------
  628. #
  629. #-----------------------------------------------------------------------------
  630. def init_ev_rate
  631. @ev_param_rate = [1.0] * 8
  632. @ev_xparam_rate = [1.0] * 10
  633. @ev_sparam_rate = [1.0] * 10
  634. @ev_atk_ele_rate = [1.0] * $data_system.elements.size
  635. @ev_def_ele_rate = [1.0] * $data_system.elements.size
  636. @ev_atl_dfl_rate = [1.0] * 2
  637. @ev_spds_stats_rate = [1.0] * 8
  638. @ev_spds_stats_rate = [1.0] * SPDS::Commands.size if $D13x[:ISPDS]
  639. @ev_max_tp_rate = 1.0
  640. end
  641. #-----------------------------------------------------------------------------
  642. #
  643. #-----------------------------------------------------------------------------
  644. def max_total_ev(type)
  645. EVIV::Total_Max_Ev_Value[type]
  646. end
  647. #-----------------------------------------------------------------------------
  648. #
  649. #-----------------------------------------------------------------------------
  650. def count_all_ev(type)
  651. case type
  652. when :param then return @ev_param.inject(0) {|r, i| r + i }
  653. when :xparam then return @ev_xparam.inject(0) {|r, i| r + i }
  654. when :sparam then return @ev_sparam.inject(0) {|r, i| r + i }
  655. when :atk_ele then return @ev_atk_ele.inject(0) {|r, i| r + i }
  656. when :def_ele then return @ev_def_ele.inject(0) {|r, i| r + i }
  657. when :atl_dfl then return @ev_atl_dfl.inject(0) {|r, i| r + i }
  658. when :spds_stat then return @ev_spds_stats.inject(0) {|r, i| r + i }
  659. when :max_tp then return @ev_max_tp
  660. end
  661. end
  662. #-----------------------------------------------------------------------------
  663. #
  664. #-----------------------------------------------------------------------------
  665. def count_total_ev
  666. total = 0
  667. [:param,:xparam,:sparam,:atk_ele,:def_ele,:atl_dfl,:spds,:max_tp].each do |i|
  668. total += count_all_ev(i)
  669. end
  670. return total
  671. end
  672. #-----------------------------------------------------------------------------
  673. #
  674. #-----------------------------------------------------------------------------
  675. def param_ev_gain(id,gain)
  676. return if count_all_ev(:param) >= max_total_ev(:param)
  677. value = EVIV::Max_Ev_Value[:param][id]
  678. @ev_param[id] += (gain*@ev_param_rate[id]).to_i
  679. @ev_param[id] = value-1 if @ev_param[id] >= value-1
  680. end
  681. #-----------------------------------------------------------------------------
  682. #
  683. #-----------------------------------------------------------------------------
  684. def xparam_ev_gain(id,gain)
  685. return if count_all_ev(:xparam) >= max_total_ev(:xparam)
  686. value = EVIV::Max_Ev_Value[:xparam][id]
  687. @ev_xparam[id] += (gain*@ev_xparam_rate[id]).to_i
  688. @ev_xparam[id] = value-1 if @ev_xparam[id] >= value-1
  689. end
  690. #-----------------------------------------------------------------------------
  691. #
  692. #-----------------------------------------------------------------------------
  693. def sparam_ev_gain(id,gain)
  694. return if count_all_ev(:sparam) >= max_total_ev(:sparam)
  695. value = EVIV::Max_Ev_Value[:sparam][id]
  696. @ev_sparam[id] += (gain*@ev_sparam_rate[id]).to_i
  697. @ev_sparam[id] = value-1 if @ev_sparam[id] >= value-1
  698. end
  699. #-----------------------------------------------------------------------------
  700. #
  701. #-----------------------------------------------------------------------------
  702. def atk_ele_ev_gain(id,gain)
  703. return if count_all_ev(:atk_ele) >= max_total_ev(:atk_ele)
  704. value = EVIV::Max_Ev_Value[:atk_ele][id]
  705. @ev_atk_ele[id] += (gain*@ev_atk_ele_rate[id]).to_i
  706. @ev_atk_ele[id] = value-1 if @ev_atk_ele[id] >= value-1
  707. end
  708. #-----------------------------------------------------------------------------
  709. #
  710. #-----------------------------------------------------------------------------
  711. def def_ele_ev_gain(id,gain)
  712. return if count_all_ev(:def_ele) >= max_total_ev(:def_ele)
  713. value = EVIV::Max_Ev_Value[:def_ele][id]
  714. @ev_def_ele[id] += (gain*@ev_def_ele_rate[id]).to_i
  715. @ev_def_ele[id] = value-1 if @ev_def_ele[id] >= value-1
  716. end
  717. #-----------------------------------------------------------------------------
  718. #
  719. #-----------------------------------------------------------------------------
  720. def atl_dfl_ev_gain(id,gain)
  721. return if count_all_ev(:atl_dfl) >= max_total_ev(:atl_dfl)
  722. value = EVIV::Max_Ev_Value[:atl_dfl][id]
  723. @ev_atl_dfl[id] += (gain*@ev_atl_dfl_rate[id]).to_i
  724. @ev_atl_dfl[id] = value-1 if @ev_atl_dfl[id] >= value-1
  725. end
  726. #-----------------------------------------------------------------------------
  727. #
  728. #-----------------------------------------------------------------------------
  729. def spds_stat_ev_gain(id,gain)
  730. return if count_all_ev(:spds_stat) >= max_total_ev(:spds_stat)
  731. value = EVIV::Max_Ev_Value[:spds_stat][id]
  732. @ev_spds_stats[id] += (gain*@ev_spds_stats_rate[id]).to_i
  733. @ev_spds_stats[id] = value-1 if @ev_spds_stats[id] >= value-1
  734. end
  735. #-----------------------------------------------------------------------------
  736. #
  737. #-----------------------------------------------------------------------------
  738. def max_tp_ev_gain(gain)
  739. return if count_all_ev(:max_tp) >= max_total_ev(:max_tp)
  740. value = EVIV::Max_Ev_Value[:max_tp]
  741. @ev_max_tp += (gain*@ev_max_tp_rate).to_i
  742. @ev_max_tp = value-1 if @ev_max_tp >= value-1
  743. end
  744. end
  745. #===============================================================================
  746. class Game_Actor < Game_Battler
  747. #===============================================================================
  748. #-----------------------------------------------------------------------------
  749. #
  750. #-----------------------------------------------------------------------------
  751. include Game_Battler_EVIV
  752. #-----------------------------------------------------------------------------
  753. #
  754. #-----------------------------------------------------------------------------
  755. alias :setup_EVIV :setup
  756. alias :parp_EVIV :param_plus
  757. alias :xpar_EVIV :xparam_plus if $D13x[:Stats_Control]
  758. alias :spar_EVIV :sparam_plus if $D13x[:Stats_Control]
  759. alias :atke_EVIV :atk_ele_plus if $D13x[:Elems_Control]
  760. alias :defe_EVIV :def_ele_plus if $D13x[:Elems_Control]
  761. alias :atdf_EVIV :atl_dfl_plus if $D13x[:Atk_Def_Lvs]
  762. alias :spds_EVIV :spds_plus if $D13x[:ISPDS]
  763. alias :max_tp_EVIV :max_tp_plus if $D13x[:TP_Control]
  764. #-----------------------------------------------------------------------------
  765. #
  766. #-----------------------------------------------------------------------------
  767. def setup(actor_id)
  768. initialize_EVIV
  769. setup_EVIV(actor_id)
  770. set_init_eviv
  771. end
  772. #-----------------------------------------------------------------------------
  773. #
  774. #-----------------------------------------------------------------------------
  775. def set_init_eviv
  776. return #unless actor.
  777. end
  778. #-----------------------------------------------------------------------------
  779. #
  780. #-----------------------------------------------------------------------------
  781. def can_param_eviv_mod(id)
  782. return actor.can_param_eviv_mod[id]
  783. end
  784. #-----------------------------------------------------------------------------
  785. #
  786. #-----------------------------------------------------------------------------
  787. def can_xparam_eviv_mod(id)
  788. return actor.can_xparam_eviv_mod[id]
  789. end
  790. #-----------------------------------------------------------------------------
  791. #
  792. #-----------------------------------------------------------------------------
  793. def can_sparam_eviv_mod(id)
  794. return actor.can_sparam_eviv_mod[id]
  795. end
  796. #-----------------------------------------------------------------------------
  797. #
  798. #-----------------------------------------------------------------------------
  799. def can_atk_ele_eviv_mod(id)
  800. return actor.can_atk_ele_eviv_mod[id]
  801. end
  802. #-----------------------------------------------------------------------------
  803. #
  804. #-----------------------------------------------------------------------------
  805. def can_def_ele_eviv_mod(id)
  806. return actor.can_def_ele_eviv_mod[id]
  807. end
  808. #-----------------------------------------------------------------------------
  809. #
  810. #-----------------------------------------------------------------------------
  811. def can_atl_dfl_eviv_mod(id)
  812. return actor.can_atl_dfl_eviv_mod[id]
  813. end
  814. #-----------------------------------------------------------------------------
  815. #
  816. #-----------------------------------------------------------------------------
  817. def can_spds_stat_eviv_mod(id)
  818. return actor.can_spds_stats_eviv_mod[id]
  819. end
  820. #-----------------------------------------------------------------------------
  821. #
  822. #-----------------------------------------------------------------------------
  823. def can_max_tp_eviv_mod
  824. return actor.can_max_tp_eviv_mod
  825. end
  826. #-----------------------------------------------------------------------------
  827. # Get Added Value of Parameter
  828. #-----------------------------------------------------------------------------
  829. def param_plus(param_id)
  830. EVIV.param_plus(parp_EVIV(param_id),self,param_id).to_i
  831. end
  832. if $D13x[:Stats_Control]
  833. #---------------------------------------------------------------------------
  834. # Get Added Value of x-Parameter
  835. #---------------------------------------------------------------------------
  836. def xparam_plus(xparam_id)
  837. EVIV.xparam_plus(xpar_EVIV(xparam_id),self,xparam_id).to_f
  838. end
  839. #---------------------------------------------------------------------------
  840. # Get Added Value of s-Parameter
  841. #---------------------------------------------------------------------------
  842. def sparam_plus(sparam_id)
  843. EVIV.sparam_plus(spar_EVIV(sparam_id),self,sparam_id).to_f
  844. end
  845. end # if $D13x[:Stats_Control]
  846. if $D13x[:Elems_Control]
  847. #---------------------------------------------------------------------------
  848. # Get Added Value of def-Element
  849. #---------------------------------------------------------------------------
  850. def def_ele_plus(element_id)
  851. EVIV.def_ele_plus(defe_EVIV(element_id),self,element_id).to_f
  852. end
  853. #---------------------------------------------------------------------------
  854. # Get Added Value of atk-Element
  855. #---------------------------------------------------------------------------
  856. def atk_ele_plus(element_id)
  857. EVIV.atk_ele_plus(atke_EVIV(element_id),self,element_id).to_f
  858. end
  859. end # if $D13x[:Elems_Control]
  860. if $D13x[:Atk_Def_Lvs]
  861. #---------------------------------------------------------------------------
  862. # Atk Lv | Def Lv ++
  863. #---------------------------------------------------------------------------
  864. def atl_dfl_plus(id)
  865. EVIV.atl_dfl_plus(atdf_EVIV(id),self,id).to_i
  866. end
  867. end # if $D13x[:Atk_Def_Lvs]
  868. if $D13x[:ISPDS]
  869. #---------------------------------------------------------------------------
  870. # Get SPDS Stats Plus
  871. #---------------------------------------------------------------------------
  872. def spds_plus(id)
  873. EVIV.spds_plus(spds_EVIV(id),self,id).to_i
  874. end
  875. end # if $D13x[:ISPDS]
  876. if $D13x[:TP_Control]
  877. #---------------------------------------------------------------------------
  878. # Atk Lv | Def Lv ++
  879. #---------------------------------------------------------------------------
  880. def max_tp_plus
  881. EVIV.max_tp_plus(max_tp_EVIV,self).to_i
  882. end
  883. end # if $D13x[:TP_Control]
  884. end
  885. #===============================================================================
  886. class Game_Enemy < Game_Battler
  887. #===============================================================================
  888. #-----------------------------------------------------------------------------
  889. #
  890. #-----------------------------------------------------------------------------
  891. include Game_Battler_EVIV
  892. #-----------------------------------------------------------------------------
  893. #
  894. #-----------------------------------------------------------------------------
  895. alias :setup_EVIV :initialize
  896. alias :parp_EVIV :param_plus
  897. alias :xpar_EVIV :xparam_plus if $D13x[:Stats_Control]
  898. alias :spar_EVIV :sparam_plus if $D13x[:Stats_Control]
  899. alias :atke_EVIV :atk_ele_plus if $D13x[:Elems_Control]
  900. alias :defe_EVIV :def_ele_plus if $D13x[:Elems_Control]
  901. alias :atdf_EVIV :atl_dfl_plus if $D13x[:Atk_Def_Lvs]
  902. alias :spds_EVIV :spds_plus if $D13x[:ISPDS]
  903. alias :max_tp_EVIV :max_tp_plus if $D13x[:TP_Control]
  904. #-----------------------------------------------------------------------------
  905. #
  906. #-----------------------------------------------------------------------------
  907. def initialize(index,enemy_id)
  908. initialize_EVIV
  909. init_ev_rand
  910. setup_EVIV(index,enemy_id)
  911. end
  912. #-----------------------------------------------------------------------------
  913. #
  914. #-----------------------------------------------------------------------------
  915. def can_param_eviv_mod(id)
  916. return enemy.can_param_eviv_mod[id]
  917. end
  918. #-----------------------------------------------------------------------------
  919. #
  920. #-----------------------------------------------------------------------------
  921. def can_xparam_eviv_mod(id)
  922. return enemy.can_xparam_eviv_mod[id]
  923. end
  924. #-----------------------------------------------------------------------------
  925. #
  926. #-----------------------------------------------------------------------------
  927. def can_sparam_eviv_mod(id)
  928. return enemy.can_sparam_eviv_mod[id]
  929. end
  930. #-----------------------------------------------------------------------------
  931. #
  932. #-----------------------------------------------------------------------------
  933. def can_atk_ele_eviv_mod(id)
  934. return enemy.can_atk_ele_eviv_mod[id]
  935. end
  936. #-----------------------------------------------------------------------------
  937. #
  938. #-----------------------------------------------------------------------------
  939. def can_def_ele_eviv_mod(id)
  940. return enemy.can_def_ele_eviv_mod[id]
  941. end
  942. #-----------------------------------------------------------------------------
  943. #
  944. #-----------------------------------------------------------------------------
  945. def can_atl_dfl_eviv_mod(id)
  946. return enemy.can_atl_dfl_eviv_mod[id]
  947. end
  948. #-----------------------------------------------------------------------------
  949. #
  950. #-----------------------------------------------------------------------------
  951. def can_spds_stat_eviv_mod(id)
  952. return enemy.can_spds_stats_eviv_mod[id]
  953. end
  954. #-----------------------------------------------------------------------------
  955. #
  956. #-----------------------------------------------------------------------------
  957. def can_max_tp_eviv_mod
  958. return enemy.can_max_tp_eviv_mod
  959. end
  960. #-----------------------------------------------------------------------------
  961. # Get Added Value of Parameter
  962. #-----------------------------------------------------------------------------
  963. def param_plus(param_id)
  964. EVIV.param_plus(parp_EVIV(param_id),self,param_id).to_i
  965. end
  966. if $D13x[:Stats_Control]
  967. #---------------------------------------------------------------------------
  968. # Get Added Value of x-Parameter
  969. #---------------------------------------------------------------------------
  970. def xparam_plus(xparam_id)
  971. EVIV.xparam_plus(xpar_EVIV(xparam_id),self,xparam_id).to_f
  972. end
  973. #---------------------------------------------------------------------------
  974. # Get Added Value of s-Parameter
  975. #---------------------------------------------------------------------------
  976. def sparam_plus(sparam_id)
  977. EVIV.sparam_plus(spar_EVIV(sparam_id),self,sparam_id).to_f
  978. end
  979. end # if $D13x[:Stats_Control]
  980. if $D13x[:Elems_Control]
  981. #---------------------------------------------------------------------------
  982. # Get Added Value of def-Element
  983. #---------------------------------------------------------------------------
  984. def def_ele_plus(element_id)
  985. EVIV.def_ele_plus(defe_EVIV(element_id),self,element_id).to_f
  986. end
  987. #---------------------------------------------------------------------------
  988. # Get Added Value of atk-Element
  989. #---------------------------------------------------------------------------
  990. def atk_ele_plus(element_id)
  991. EVIV.atk_ele_plus(atke_EVIV(element_id),self,element_id).to_f
  992. end
  993. end # if $D13x[:Elems_Control]
  994. if $D13x[:Atk_Def_Lvs]
  995. #---------------------------------------------------------------------------
  996. # Atk Lv | Def Lv ++
  997. #---------------------------------------------------------------------------
  998. def atl_dfl_plus(id)
  999. EVIV.atl_dfl_plus(atdf_EVIV(id),self,id).to_i
  1000. end
  1001. end # if $D13x[:Atk_Def_Lvs]
  1002. if $D13x[:ISPDS]
  1003. #---------------------------------------------------------------------------
  1004. # Get SPDS Stats Plus
  1005. #---------------------------------------------------------------------------
  1006. def spds_plus(id)
  1007. EVIV.spds_plus(spds_EVIV(id),self,id).to_i
  1008. end
  1009. end # if $D13x[:ISPDS]
  1010. if $D13x[:TP_Control]
  1011. #---------------------------------------------------------------------------
  1012. # Atk Lv | Def Lv ++
  1013. #---------------------------------------------------------------------------
  1014. def max_tp_plus
  1015. EVIV.max_tp_plus(max_tp_EVIV,self).to_i
  1016. end
  1017. end # if $D13x[:TP_Control]
  1018. #-----------------------------------------------------------------------------
  1019. #
  1020. #-----------------------------------------------------------------------------
  1021. def param_ev(id)
  1022. return enemy.dist_par_ev[id]
  1023. end
  1024. #-----------------------------------------------------------------------------
  1025. #
  1026. #-----------------------------------------------------------------------------
  1027. def xparam_ev(id)
  1028. return enemy.dist_xpar_ev[id]
  1029. end
  1030. #-----------------------------------------------------------------------------
  1031. #
  1032. #-----------------------------------------------------------------------------
  1033. def sparam_ev(id)
  1034. return enemy.dist_spar_ev[id]
  1035. end
  1036. #-----------------------------------------------------------------------------
  1037. #
  1038. #-----------------------------------------------------------------------------
  1039. def atk_ele_ev(id)
  1040. return enemy.dist_atkele_ev[id]
  1041. end
  1042. #-----------------------------------------------------------------------------
  1043. #
  1044. #-----------------------------------------------------------------------------
  1045. def def_ele_ev(id)
  1046. return enemy.dist_defele_ev[id]
  1047. end
  1048. #-----------------------------------------------------------------------------
  1049. #
  1050. #-----------------------------------------------------------------------------
  1051. def atldfl_ev(id)
  1052. return enemy.dist_atldfl_ev[id]
  1053. end
  1054. #-----------------------------------------------------------------------------
  1055. #
  1056. #-----------------------------------------------------------------------------
  1057. def spds_ev(id)
  1058. return enemy.dist_spds_ev[id]
  1059. end
  1060. #-----------------------------------------------------------------------------
  1061. #
  1062. #-----------------------------------------------------------------------------
  1063. def max_tp_ev
  1064. return enemy.dist_max_tp_ev
  1065. end
  1066. end
  1067. #===============================================================================
  1068. class Game_Troop < Game_Unit
  1069. #===============================================================================
  1070. #-----------------------------------------------------------------------------
  1071. #
  1072. #-----------------------------------------------------------------------------
  1073. def par_ev_total(id)
  1074. dead_members.inject(0) {|r,e| r += e.param_ev(id) }
  1075. end
  1076. #-----------------------------------------------------------------------------
  1077. #
  1078. #-----------------------------------------------------------------------------
  1079. def xpar_ev_total(id)
  1080. dead_members.inject(0) {|r,e| r += e.xparam_ev(id) }
  1081. end
  1082. #-----------------------------------------------------------------------------
  1083. #
  1084. #-----------------------------------------------------------------------------
  1085. def spar_ev_total(id)
  1086. dead_members.inject(0) {|r,e| r += e.sparam_ev(id) }
  1087. end
  1088. #-----------------------------------------------------------------------------
  1089. #
  1090. #-----------------------------------------------------------------------------
  1091. def atk_ele_ev_total(id)
  1092. dead_members.inject(0) {|r,e| r += e.atk_ele_ev(id) }
  1093. end
  1094. #-----------------------------------------------------------------------------
  1095. #
  1096. #-----------------------------------------------------------------------------
  1097. def def_ele_ev_total(id)
  1098. dead_members.inject(0) {|r,e| r += e.def_ele_ev(id) }
  1099. end
  1100. #-----------------------------------------------------------------------------
  1101. #
  1102. #-----------------------------------------------------------------------------
  1103. def atldfl_ev_total(id)
  1104. dead_members.inject(0) {|r,e| r += e.atldfl_ev(id) }
  1105. end
  1106. #-----------------------------------------------------------------------------
  1107. #
  1108. #-----------------------------------------------------------------------------
  1109. def spds_ev_total(id)
  1110. dead_members.inject(0) {|r,e| r += e.spds_ev(id) }
  1111. end
  1112. #-----------------------------------------------------------------------------
  1113. #
  1114. #-----------------------------------------------------------------------------
  1115. def max_tp_ev_total
  1116. dead_members.inject(0) {|r,e| r += e.max_tp_ev }
  1117. end
  1118. end
  1119. #==============================================================================#
  1120. # http://dekitarpg.wordpress.com/ #
  1121. #==============================================================================#
  1122. end # if true # << Make true to use this script, false to disable.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement