Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if true # << Make true to use this script, false to disable.
- #===============================================================================
- #
- # ☆ $D13x - Statistic Control
- # -- Author : Dekita
- # -- Version : 1.8
- # -- Level : Easy / Normal
- # -- Requires : N/A
- # -- Engine : RPG Maker VX Ace.
- #
- #===============================================================================
- # ☆ Import
- #-------------------------------------------------------------------------------
- $D13x={}if$D13x==nil
- $D13x[:Stats_Control]=true
- #===============================================================================
- # ☆ Updates
- #-------------------------------------------------------------------------------
- # D /M /Y
- # 29/o5/2o14 - Improved Code for Add-on's,
- # ??/o3/2o14 - Small change to code,
- # 31/o5/2o13 - Added More Help Info For Script Calls.
- # 19/o4/2o13 - Small bugfixx, (<stat limit:X> notetag)
- # 12/o4/2o13 - Small Bugfix, (require :Dev_SLUD)
- # 28/o3/2o13 - Small Efficiency Update,
- # 25/o3/2o13 - Compatibility, (Elements Control)
- # 23/o3/2o13 - Fixed Bug, (default equip params)
- # 2o/o3/2o13 - Compatibility - Skill Levels
- # 13/o3/2o13 - updated import method,
- # 12/o3/2o13 - Finished,
- # 1o/o3/2o13 - Started
- #
- #===============================================================================
- # ☆ Introduction
- #-------------------------------------------------------------------------------
- # This Script 'fixes' actor statistics, ie. params / xparams / sparams
- # and allows the stats to be increased/decreased by a steady value rather
- # than a percentage of the current value as it offers more control and
- # flexibility, also I prefer it this way.
- # It also adds min and max limits for x/s-params and gives control over these
- # new limitations, as well as the standard params.
- #
- # You are allowed the use of some new ways to control these stats
- # using actors/classes/enemies/weapons/armors/states/skills notetags
- # and some script calls.
- # e.g
- # an actor knowing a certain skill can controls statistics (using notetags).
- # you can use script calls to decrease/increase/multiply/divide x/s-params.
- #
- # Note :
- # x/s-Params still work with percentage values, ie 0.01 is 1%, 1.0 is 100%
- #
- # This Script also overwrites the default level up/down method to be a little
- # more flexible.
- # It does the same to the learn skill and initialize skill methods.
- # And also acts as a base for some other actor related scripts of mine.
- #
- # in short : this is a limiter / limit-breaker script with bonuses :p
- #
- #===============================================================================
- # ★☆★☆★☆★☆★☆★☆★☆★ TERMS AND CONDITIONS: ☆★☆★☆★☆★☆★☆★☆★☆★☆
- #===============================================================================
- # 1. You MUST give credit to "Dekita" !!
- # 2. You are NOT allowed to repost this script.(or modified versions)
- # 3. You are NOT allowed to convert this script.
- # 4. You are NOT allowed to use this script for Commercial games.
- # 5. ENJOY!
- #
- # "FINE PRINT"
- # By using this script you hereby agree to the above terms and conditions,
- # if any violation of the above terms occurs "legal action" may be taken.
- # Not understanding the above terms and conditions does NOT mean that
- # they do not apply to you.
- # If you wish to discuss the terms and conditions in further detail you can
- # contact me at http://dekitarpg.wordpress.com/
- #
- #===============================================================================
- # ☆ Instructions
- #-------------------------------------------------------------------------------
- # Place Below " ▼ Materials " and Above " ▼ Main " in your script editor.
- # Place Under My $D13x - Core Script. (if used)
- #
- #===============================================================================
- # ☆ Notetags ( default )
- # For use with Weapons / Armors / Enemies / Actors / Classes / States / Skills
- #-------------------------------------------------------------------------------
- # <stat: value>
- # stat = mhp, mmp, agi, luk, cri ect...
- # value = the value for that equip/enemy/skill/state/whatever..
- # e.g
- # <agi: 4> would add 4 agility onto the notetagged item
- # <cri: 0.04> would add 4% crit rate onto the notetagged item
- # Also, value can be negative e.g <stat: -0.05>
- #
- # <stat limit: max>
- # Used to modify the stat maximum limit
- # stat limit = hit, atk, pha, def, exr ect...
- # max = the value for that equip/enemy/ect
- #
- #-------------------------------------------------------------------------------
- # IMPORTANT :
- # The settings below are the default settings, ie. the base settings.
- # If you want to have a lower max stat than the default, you must make
- # the notetags value for that actor (or whatever) be negative, ie. reduced
- # from the default stat settings.
- # If you want to increase simply use the notetag and the value will be added
- # onto the default value.
- # This is the same for all note-taggable items.
- #
- # All Increases and Decreases are stacked, using the following calculation ..
- # Base + Actor(or Enemy) + Class(if actor) + Equipment(if actor) + States +
- # Skills that modify stats or max stats (ie passive skills)
- #
- #===============================================================================
- # ☆ Script Calls
- #-------------------------------------------------------------------------------
- # $game_actors[id].add_param(param_id, value) << From Default Engine .
- # $game_actors[id].sub_param(param_id, value)
- # $game_actors[id].div_param(param_id, value)
- # $game_actors[id].mul_param(param_id, value)
- # $game_actors[id].mod_param(param_id, value)
- #
- # $game_actors[id].add_xparam(xparam_id, value)
- # $game_actors[id].sub_xparam(xparam_id, value)
- # $game_actors[id].div_xparam(xparam_id, value)
- # $game_actors[id].mul_xparam(xparam_id, value)
- # $game_actors[id].mod_xparam(xparam_id, value)
- #
- # $game_actors[id].add_sparam(xparam_id, value)
- # $game_actors[id].sub_sparam(xparam_id, value)
- # $game_actors[id].div_sparam(xparam_id, value)
- # $game_actors[id].mul_sparam(xparam_id, value)
- # $game_actors[id].mod_sparam(xparam_id, value)
- #
- # these are the calculatons for each control type
- # add : current stat += value
- # sub : current stat -= value
- # div : current stat /= value
- # mul : current stat *= value
- # mod : current stat %= value
- #
- # These script calls modify the Actor value, other items remain in the same order.
- #
- # There is also a third arguement for all the above script calls,
- # it is a boolean arguement to determine if the player should be refreshed.
- # eg.. $game_actors[1].add_param(0, 50, false)
- # this is very helpfull for maintaining FPS when adding LOTS of stats..
- # The default to this arguemet is true.
- # If you don't understand what this mean, just disregard this information :)
- #
- #===============================================================================
- # ☆ HELP
- #-------------------------------------------------------------------------------
- # PARAMS : # XPARAMS : # SPARAMS : #
- # stat = id # stat = id # stat = id #
- # mhp = 0 # hit = 0 # tgr = 0 #
- # mmp = 1 # eva = 1 # grd = 1 #
- # atk = 2 # cri = 2 # rec = 2 #
- # def = 3 # cev = 3 # pha = 3 #
- # mat = 4 # mev = 4 # mcr = 4 #
- # mdf = 5 # mrf = 5 # tcr = 5 #
- # agi = 6 # cnt = 6 # pdr = 6 #
- # luk = 7 # hrg = 7 # mdr = 7 #
- # # mrg = 8 # fdr = 8 #
- # # trg = 9 # exr = 9 #
- #-------------------------------------------------------------------------------
- # Remember :
- # All Params work with integer values, eg. 1, 5, 123, 653, 198123
- # All x/s-Params work with float values, eg. 1.0, 0.5, 0.1, 0.05, 0.01
- # 1.0 = 100%, 0.01 = 1%,
- #
- #===============================================================================
- # ☆ For Scripters
- #-------------------------------------------------------------------------------
- # This script creates new params ( Pi Variables ) and uses them (when possible)
- # to modify the base params (the VX Ace default engine ones)
- # These new params are :
- # pars = [0] * 8
- # xpars = [0] * 10
- # spars = [0] * 10
- # max_pars = [0] * 8
- # max_xpars = [0] * 10
- # max_spars = [0] * 10
- # They are the same for all classes.
- #
- #===============================================================================
- module Par_Fixx
- #===============================================================================
- Notes={}# << Keep
- Stats={}# << Keep
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- # ☆ Display Settings
- #--------------------------------------------------------------------------
- # Make this false if you do not wish to display text when an actor levels down
- Show_Level_Down = true
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- # ☆ Statistics Settings
- #--------------------------------------------------------------------------
- # This is where you adjust the settings for the base min and max values
- # used for actors / enemies.
- #--------------------------------------------------------------------------
- # Stats[:id]= [ min , max ]
- # Params
- Stats[:mhp] = [ 0 , 99999 ]
- Stats[:mmp] = [ 0 , 99999 ]
- Stats[:atk] = [ 1 , 9999 ]
- Stats[:def] = [ 1 , 9999 ]
- Stats[:mat] = [ 1 , 9999 ]
- Stats[:mdf] = [ 1 , 9999 ]
- Stats[:agi] = [ 1 , 9999 ]
- Stats[:luk] = [ 1 , 9999 ]
- # x-Params
- Stats[:hit] = [ 0.0 , 0.99 ]
- Stats[:eva] = [ 0.0 , 0.99 ]
- Stats[:cri] = [ 0.0 , 0.99 ]
- Stats[:cev] = [ 0.0 , 0.99 ]
- Stats[:mev] = [ 0.0 , 0.99 ]
- Stats[:mrf] = [ 0.0 , 0.99 ]
- Stats[:cnt] = [ 0.0 , 0.99 ]
- Stats[:hrg] = [-0.99 , 0.99 ]
- Stats[:mrg] = [-0.99 , 0.99 ]
- Stats[:trg] = [-0.99 , 0.99 ]
- # s-Params
- Stats[:tgr] = [ 0.0 , 2.0 ]
- Stats[:grd] = [ 0.0 , 2.0 ]
- Stats[:rec] = [ 0.0 , 2.0 ]
- Stats[:pha] = [ 0.0 , 2.0 ]
- Stats[:mcr] = [ 0.0 , 2.0 ]
- Stats[:tcr] = [ 0.0 , 2.0 ]
- Stats[:pdr] = [ 0.0 , 2.0 ]
- Stats[:mdr] = [ 0.0 , 2.0 ]
- Stats[:fdr] = [ 0.0 , 2.0 ]
- Stats[:exr] = [ 0.0 , 2.0 ]
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # ☆ Notetag Settings
- #-----------------------------------------------------------------------------
- # This is where you adjust the settings for the notetags used in all
- # notetaggable items.
- # Only modify this if you understand how to.
- #-----------------------------------------------------------------------------
- # Notes[:id]= [ <stat: value> , <stat limit: max> ]
- # Params :
- Notes[:mhp] = [ /<mhp:(.*)>/i , /<mhp limit:(.*)>/i ]
- Notes[:mmp] = [ /<mmp:(.*)>/i , /<mmp limit:(.*)>/i ]
- Notes[:atk] = [ /<atk:(.*)>/i , /<atk limit:(.*)>/i ]
- Notes[:def] = [ /<def:(.*)>/i , /<def limit:(.*)>/i ]
- Notes[:mat] = [ /<mat:(.*)>/i , /<mat limit:(.*)>/i ]
- Notes[:mdf] = [ /<mdf:(.*)>/i , /<mdf limit:(.*)>/i ]
- Notes[:agi] = [ /<agi:(.*)>/i , /<agi limit:(.*)>/i ]
- Notes[:luk] = [ /<luk:(.*)>/i , /<luk limit:(.*)>/i ]
- # x-Params :
- Notes[:hit] = [ /<hit:(.*)>/i , /<hit limit:(.*)>/i ]
- Notes[:eva] = [ /<eva:(.*)>/i , /<eva limit:(.*)>/i ]
- Notes[:cri] = [ /<cri:(.*)>/i , /<cri limit:(.*)>/i ]
- Notes[:cev] = [ /<cev:(.*)>/i , /<cev limit:(.*)>/i ]
- Notes[:mev] = [ /<mev:(.*)>/i , /<mev limit:(.*)>/i ]
- Notes[:mrf] = [ /<mrf:(.*)>/i , /<mrf limit:(.*)>/i ]
- Notes[:cnt] = [ /<cnt:(.*)>/i , /<cnt limit:(.*)>/i ]
- Notes[:hrg] = [ /<hrg:(.*)>/i , /<hrg limit:(.*)>/i ]
- Notes[:mrg] = [ /<mrg:(.*)>/i , /<mrg limit:(.*)>/i ]
- Notes[:trg] = [ /<trg:(.*)>/i , /<trg limit:(.*)>/i ]
- # s-Params :
- Notes[:tgr] = [ /<tgr:(.*)>/i , /<tgr limit:(.*)>/i ]
- Notes[:grd] = [ /<grd:(.*)>/i , /<grd limit:(.*)>/i ]
- Notes[:rec] = [ /<rec:(.*)>/i , /<rec limit:(.*)>/i ]
- Notes[:pha] = [ /<pha:(.*)>/i , /<pha limit:(.*)>/i ]
- Notes[:mcr] = [ /<mcr:(.*)>/i , /<mcr limit:(.*)>/i ]
- Notes[:tcr] = [ /<tcr:(.*)>/i , /<tcr limit:(.*)>/i ]
- Notes[:pdr] = [ /<pdr:(.*)>/i , /<pdr limit:(.*)>/i ]
- Notes[:mdr] = [ /<mdr:(.*)>/i , /<mdr limit:(.*)>/i ]
- Notes[:fdr] = [ /<fdr:(.*)>/i , /<fdr limit:(.*)>/i ]
- Notes[:exr] = [ /<exr:(.*)>/i , /<exr limit:(.*)>/i ]
- end#<< Keep
- module Vocab#<< Keep
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # ☆ Vocab Settings
- #-----------------------------------------------------------------------------
- # This is where you change the text shown when actors level down or
- # forget skills, sprintf format.
- LevelDown = "%s has fell back to %s %s!"
- ForgetSkill = "%s's requirements are no longer met!"
- #####################
- # CUSTOMISATION END #
- end #####################
- #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
- # #
- # http://dekitarpg.wordpress.com/ #
- # #
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
- # The following code is protected under the 2013 Dekita Data Protection Act. #
- # Ie. The “Do Not Fucking Look” Law. #
- # Breaking This One And Only Rule WILL Result in Me Raping Your USB Port. #
- # That is all ! #
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
- #===============================================================================#
- module DataManager
- #===============================================================================
- #-----------------------------------------------------------------------------
- # Alias List
- #-----------------------------------------------------------------------------
- class << self
- alias :lbd_unique_stats :load_database
- end
- #-----------------------------------------------------------------------------
- # Load Database (alias)
- #-----------------------------------------------------------------------------
- def self.load_database
- lbd_unique_stats
- loa_unique_stats
- end
- #-----------------------------------------------------------------------------
- # Load Unique Shit
- #-----------------------------------------------------------------------------
- def self.loa_unique_stats
- #~ classes = [$data_weapons, $data_armors , $data_items , $data_skills ,
- #~ $data_actors , $data_classes, $data_enemies, $data_states ]
- #~ for g in classes
- #~ for o in g
- #~ next if o == nil
- #~ o.load_stat_control
- #~ end
- #~ end
- database = $data_weapons + $data_armors + $data_skills + $data_items +
- $data_classes + $data_actors + $data_states + $data_enemies
- database.compact.each { |item| item.load_stat_control }
- end
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- end # DataManager
- #===============================================================================
- class RPG::BaseItem
- #===============================================================================
- #-----------------------------------------------------------------------------
- # Pi Variables
- #-----------------------------------------------------------------------------
- attr_accessor :pars
- attr_accessor :xpars
- attr_accessor :spars
- attr_accessor :max_pars
- attr_accessor :max_spars
- attr_accessor :max_xpars
- #-----------------------------------------------------------------------------
- # Load Stat Control
- #-----------------------------------------------------------------------------
- def load_stat_control
- @pars = [0] * 8
- @xpars = [0] * 10
- @spars = [0] * 10
- @max_pars = [0] * 8
- @max_xpars = [0] * 10
- @max_spars = [0] * 10
- check_parfixx_notetags
- end
- #-----------------------------------------------------------------------------
- # Parse Notes
- #-----------------------------------------------------------------------------
- def check_parfixx_notetags
- self.note.split(/[\r\n]+/).each do |line|
- case line
- when Par_Fixx::Notes[:mhp][0] then @pars[0] = $1.to_i
- when Par_Fixx::Notes[:mmp][0] then @pars[1] = $1.to_i
- when Par_Fixx::Notes[:atk][0] then @pars[2] = $1.to_i
- when Par_Fixx::Notes[:def][0] then @pars[3] = $1.to_i
- when Par_Fixx::Notes[:mat][0] then @pars[4] = $1.to_i
- when Par_Fixx::Notes[:mdf][0] then @pars[5] = $1.to_i
- when Par_Fixx::Notes[:agi][0] then @pars[6] = $1.to_i
- when Par_Fixx::Notes[:luk][0] then @pars[7] = $1.to_i
- when Par_Fixx::Notes[:hit][0] then @xpars[0] = $1.to_f
- when Par_Fixx::Notes[:eva][0] then @xpars[1] = $1.to_f
- when Par_Fixx::Notes[:cri][0] then @xpars[2] = $1.to_f
- when Par_Fixx::Notes[:cev][0] then @xpars[3] = $1.to_f
- when Par_Fixx::Notes[:mev][0] then @xpars[4] = $1.to_f
- when Par_Fixx::Notes[:mrf][0] then @xpars[5] = $1.to_f
- when Par_Fixx::Notes[:cnt][0] then @xpars[6] = $1.to_f
- when Par_Fixx::Notes[:hrg][0] then @xpars[7] = $1.to_f
- when Par_Fixx::Notes[:mrg][0] then @xpars[8] = $1.to_f
- when Par_Fixx::Notes[:trg][0] then @xpars[9] = $1.to_f
- when Par_Fixx::Notes[:tgr][0] then @spars[0] = $1.to_f
- when Par_Fixx::Notes[:grd][0] then @spars[1] = $1.to_f
- when Par_Fixx::Notes[:rec][0] then @spars[2] = $1.to_f
- when Par_Fixx::Notes[:pha][0] then @spars[3] = $1.to_f
- when Par_Fixx::Notes[:mcr][0] then @spars[4] = $1.to_f
- when Par_Fixx::Notes[:tcr][0] then @spars[5] = $1.to_f
- when Par_Fixx::Notes[:pdr][0] then @spars[6] = $1.to_f
- when Par_Fixx::Notes[:mdr][0] then @spars[7] = $1.to_f
- when Par_Fixx::Notes[:fdr][0] then @spars[8] = $1.to_f
- when Par_Fixx::Notes[:exr][0] then @spars[9] = $1.to_f
- when Par_Fixx::Notes[:mhp][1] then @max_pars[0] = $1.to_i
- when Par_Fixx::Notes[:mmp][1] then @max_pars[1] = $1.to_i
- when Par_Fixx::Notes[:atk][1] then @max_pars[2] = $1.to_i
- when Par_Fixx::Notes[:def][1] then @max_pars[3] = $1.to_i
- when Par_Fixx::Notes[:mat][1] then @max_pars[4] = $1.to_i
- when Par_Fixx::Notes[:mdf][1] then @max_pars[5] = $1.to_i
- when Par_Fixx::Notes[:agi][1] then @max_pars[6] = $1.to_i
- when Par_Fixx::Notes[:luk][1] then @max_pars[7] = $1.to_i
- when Par_Fixx::Notes[:hit][1] then @max_xpars[0] = $1.to_f
- when Par_Fixx::Notes[:eva][1] then @max_xpars[1] = $1.to_f
- when Par_Fixx::Notes[:cri][1] then @max_xpars[2] = $1.to_f
- when Par_Fixx::Notes[:cev][1] then @max_xpars[3] = $1.to_f
- when Par_Fixx::Notes[:mev][1] then @max_xpars[4] = $1.to_f
- when Par_Fixx::Notes[:mrf][1] then @max_xpars[5] = $1.to_f
- when Par_Fixx::Notes[:cnt][1] then @max_xpars[6] = $1.to_f
- when Par_Fixx::Notes[:hrg][1] then @max_xpars[7] = $1.to_f
- when Par_Fixx::Notes[:mrg][1] then @max_xpars[8] = $1.to_f
- when Par_Fixx::Notes[:trg][1] then @max_xpars[9] = $1.to_f
- when Par_Fixx::Notes[:tgr][1] then @max_spars[0] = $1.to_f
- when Par_Fixx::Notes[:grd][1] then @max_spars[1] = $1.to_f
- when Par_Fixx::Notes[:rec][1] then @max_spars[2] = $1.to_f
- when Par_Fixx::Notes[:pha][1] then @max_spars[3] = $1.to_f
- when Par_Fixx::Notes[:mcr][1] then @max_spars[4] = $1.to_f
- when Par_Fixx::Notes[:tcr][1] then @max_spars[5] = $1.to_f
- when Par_Fixx::Notes[:pdr][1] then @max_spars[6] = $1.to_f
- when Par_Fixx::Notes[:mdr][1] then @max_spars[7] = $1.to_f
- when Par_Fixx::Notes[:fdr][1] then @max_spars[8] = $1.to_f
- when Par_Fixx::Notes[:exr][1] then @max_spars[9] = $1.to_f
- end
- end
- end
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- end # << RPG::BaseItem
- #===============================================================================
- class Game_BattlerBase
- #===============================================================================
- #-----------------------------------------------------------------------------
- # Alias List
- #-----------------------------------------------------------------------------
- alias :sd13x_GB_init :initialize
- #-----------------------------------------------------------------------------
- # Initialize Data
- #-----------------------------------------------------------------------------
- def initialize(*a,&b)
- clear_xparam_plus
- clear_sparam_plus
- sd13x_GB_init(*a,&b)
- end
- #-----------------------------------------------------------------------------
- # Get Reduced Value of Parameter
- #-----------------------------------------------------------------------------
- def param_min(param_id)
- case param_id
- when 0 then return Par_Fixx::Stats[:mhp][0]
- when 1 then return Par_Fixx::Stats[:mmp][0]
- when 2 then return Par_Fixx::Stats[:atk][0]
- when 3 then return Par_Fixx::Stats[:def][0]
- when 4 then return Par_Fixx::Stats[:mat][0]
- when 5 then return Par_Fixx::Stats[:mdf][0]
- when 6 then return Par_Fixx::Stats[:agi][0]
- when 7 then return Par_Fixx::Stats[:luk][0]
- end
- end
- #-----------------------------------------------------------------------------
- # Get Maximum Value of Parameter
- #-----------------------------------------------------------------------------
- def param_max(param_id)
- case param_id
- when 0 then return Par_Fixx::Stats[:mhp][1]
- when 1 then return Par_Fixx::Stats[:mmp][1]
- when 2 then return Par_Fixx::Stats[:atk][1]
- when 3 then return Par_Fixx::Stats[:def][1]
- when 4 then return Par_Fixx::Stats[:mat][1]
- when 5 then return Par_Fixx::Stats[:mdf][1]
- when 6 then return Par_Fixx::Stats[:agi][1]
- when 7 then return Par_Fixx::Stats[:luk][1]
- end
- end
- #-----------------------------------------------------------------------------
- # Add To Parameter
- #-----------------------------------------------------------------------------
- def add_param(param_id, value, ref = true)
- @param_plus[param_id] += value
- refresh if ref
- end
- #-----------------------------------------------------------------------------
- # Subtract from Parameter
- #-----------------------------------------------------------------------------
- def sub_param(param_id, value, ref = true)
- @param_plus[param_id] -= value
- refresh if ref
- end
- #-----------------------------------------------------------------------------
- # Divide Parameter By Value
- #-----------------------------------------------------------------------------
- def div_param(param_id, value, ref = true)
- @param_plus[param_id] /= value
- refresh if ref
- end
- #-----------------------------------------------------------------------------
- # Multiply Parameter By Value
- #-----------------------------------------------------------------------------
- def mul_param(param_id, value, ref = true)
- @param_plus[param_id] *= value
- refresh if ref
- end
- #-----------------------------------------------------------------------------
- # Divide Parameter By Value
- #-----------------------------------------------------------------------------
- def mod_param(param_id, value, ref = true)
- @param_plus[param_id] %= value
- refresh if ref
- end
- #-----------------------------------------------------------------------------
- # Get Min Value of xParameter
- #-----------------------------------------------------------------------------
- def xparam_min(xparam_id)
- case xparam_id
- when 0 then return Par_Fixx::Stats[:hit][0]
- when 1 then return Par_Fixx::Stats[:eva][0]
- when 2 then return Par_Fixx::Stats[:cri][0]
- when 3 then return Par_Fixx::Stats[:cev][0]
- when 4 then return Par_Fixx::Stats[:mev][0]
- when 5 then return Par_Fixx::Stats[:mrf][0]
- when 6 then return Par_Fixx::Stats[:cnt][0]
- when 7 then return Par_Fixx::Stats[:hrg][0]
- when 8 then return Par_Fixx::Stats[:mrg][0]
- when 9 then return Par_Fixx::Stats[:trg][0]
- end
- end
- #-----------------------------------------------------------------------------
- # Get Maximum Value of xParameter
- #-----------------------------------------------------------------------------
- def xparam_max(xparam_id)
- case xparam_id
- when 0 then return Par_Fixx::Stats[:hit][1]
- when 1 then return Par_Fixx::Stats[:eva][1]
- when 2 then return Par_Fixx::Stats[:cri][1]
- when 3 then return Par_Fixx::Stats[:cev][1]
- when 4 then return Par_Fixx::Stats[:mev][1]
- when 5 then return Par_Fixx::Stats[:mrf][1]
- when 6 then return Par_Fixx::Stats[:cnt][1]
- when 7 then return Par_Fixx::Stats[:hrg][1]
- when 8 then return Par_Fixx::Stats[:mrg][1]
- when 9 then return Par_Fixx::Stats[:trg][1]
- end
- end
- #-----------------------------------------------------------------------------
- # Get Base xParam Value (from features)
- #-----------------------------------------------------------------------------
- def xparam_base(xparam_id)
- features_sum(FEATURE_XPARAM, xparam_id)
- end
- #-----------------------------------------------------------------------------
- # Get Real xParam Value
- #-----------------------------------------------------------------------------
- def xparam(xpar_id)
- val = (xparam_base(xpar_id) + xparam_plus(xpar_id))
- [[val, xparam_max(xpar_id)].min, xparam_min(xpar_id)].max.to_f
- end
- #-----------------------------------------------------------------------------
- # xParam Plus
- #-----------------------------------------------------------------------------
- def xparam_plus(xparam_id)
- @xparam_plus[xparam_id]
- end
- #-----------------------------------------------------------------------------
- # Clear xParam Plus
- #-----------------------------------------------------------------------------
- def clear_xparam_plus
- @xparam_plus = [0] * 10
- end
- #-----------------------------------------------------------------------------
- # Add xParam
- #-----------------------------------------------------------------------------
- def add_xparam(xparam_id, value, ref = true)
- @xparam_plus[xparam_id] += value
- refresh if ref
- end
- #-----------------------------------------------------------------------------
- # Sub xParam
- #-----------------------------------------------------------------------------
- def sub_xparam(xparam_id, value, ref = true)
- @xparam_plus[xparam_id] -= value
- refresh if ref
- end
- #-----------------------------------------------------------------------------
- # Div xParam
- #-----------------------------------------------------------------------------
- def div_xparam(xparam_id, value, ref = true)
- @xparam_plus[xparam_id] /= value
- refresh if ref
- end
- #-----------------------------------------------------------------------------
- # Mul xParam
- #-----------------------------------------------------------------------------
- def mul_xparam(xparam_id, value, ref = true)
- @xparam_plus[xparam_id] *= value
- refresh if ref
- end
- #-----------------------------------------------------------------------------
- # Mod xParam
- #-----------------------------------------------------------------------------
- def mod_xparam(xparam_id, value, ref = true)
- @xparam_plus[xparam_id] %= value
- refresh if ref
- end
- #-----------------------------------------------------------------------------
- # Get Min Value of sParameter
- #-----------------------------------------------------------------------------
- def sparam_min(sparam_id)
- case sparam_id
- when 0 then return Par_Fixx::Stats[:tgr][0]
- when 1 then return Par_Fixx::Stats[:grd][0]
- when 2 then return Par_Fixx::Stats[:rec][0]
- when 3 then return Par_Fixx::Stats[:pha][0]
- when 4 then return Par_Fixx::Stats[:mcr][0]
- when 5 then return Par_Fixx::Stats[:tcr][0]
- when 6 then return Par_Fixx::Stats[:pdr][0]
- when 7 then return Par_Fixx::Stats[:mdr][0]
- when 8 then return Par_Fixx::Stats[:fdr][0]
- when 9 then return Par_Fixx::Stats[:exr][0]
- end
- end
- #-----------------------------------------------------------------------------
- # Get Maximum Value of xParameter
- #-----------------------------------------------------------------------------
- def sparam_max(sparam_id)
- case sparam_id
- when 0 then return Par_Fixx::Stats[:tgr][1]
- when 1 then return Par_Fixx::Stats[:grd][1]
- when 2 then return Par_Fixx::Stats[:rec][1]
- when 3 then return Par_Fixx::Stats[:pha][1]
- when 4 then return Par_Fixx::Stats[:mcr][1]
- when 5 then return Par_Fixx::Stats[:tcr][1]
- when 6 then return Par_Fixx::Stats[:pdr][1]
- when 7 then return Par_Fixx::Stats[:mdr][1]
- when 8 then return Par_Fixx::Stats[:fdr][1]
- when 9 then return Par_Fixx::Stats[:exr][1]
- end
- end
- #-----------------------------------------------------------------------------
- # Get Base sParam Value (from features)
- #-----------------------------------------------------------------------------
- def sparam_base(sparam_id)
- features_pi(FEATURE_SPARAM, sparam_id)
- end
- #-----------------------------------------------------------------------------
- # Get Real sParam Value
- #-----------------------------------------------------------------------------
- def sparam(spar_id)
- val = (sparam_base(spar_id) + sparam_plus(spar_id))
- [[val, sparam_max(spar_id)].min, sparam_min(spar_id)].max.to_f
- end
- #-----------------------------------------------------------------------------
- # sParam Plus
- #-----------------------------------------------------------------------------
- def sparam_plus(sparam_id)
- @sparam_plus[sparam_id]
- end
- #-----------------------------------------------------------------------------
- # Clear sParam Plus
- #-----------------------------------------------------------------------------
- def clear_sparam_plus
- @sparam_plus = [0] * 10
- end
- #-----------------------------------------------------------------------------
- # Add sParam Plus
- #-----------------------------------------------------------------------------
- def add_sparam(sparam_id, value, ref = true)
- @sparam_plus[sparam_id] += value
- refresh if ref
- end
- #-----------------------------------------------------------------------------
- # Sub sParam
- #-----------------------------------------------------------------------------
- def sub_sparam(sparam_id, value, ref = true)
- @sparam_plus[sparam_id] -= value
- refresh if ref
- end
- #-----------------------------------------------------------------------------
- # Div sParam
- #-----------------------------------------------------------------------------
- def div_sparam(sparam_id, value, ref = true)
- @sparam_plus[sparam_id] /= value
- refresh if ref
- end
- #-----------------------------------------------------------------------------
- # Mul sParam
- #-----------------------------------------------------------------------------
- def mul_sparam(sparam_id, value, ref = true)
- @sparam_plus[sparam_id] *= value
- refresh if ref
- end
- #-----------------------------------------------------------------------------
- # Mod sParam
- #-----------------------------------------------------------------------------
- def mod_sparam(sparam_id, value, ref = true)
- @sparam_plus[sparam_id] %= value
- refresh if ref
- end
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- end # << Game_BattlerBase
- #===============================================================================
- class Game_Actor < Game_Battler
- #===============================================================================
- #-----------------------------------------------------------------------------
- # Alias List
- #-----------------------------------------------------------------------------
- alias :change_exp_sD13x :change_exp
- #-----------------------------------------------------------------------------
- # Change Experience | show : Level up display flag
- #-----------------------------------------------------------------------------
- def change_exp(exp, show)
- inf = [@level, skills]
- change_exp_sD13x(exp, show)
- deki_change_exp(inf)
- end
- #-----------------------------------------------------------------------------
- # Change Experience | (Level Down display)
- #-----------------------------------------------------------------------------
- def deki_change_exp(i)
- return unless Par_Fixx::Show_Level_Down
- return unless i[0] > @level
- display_level_down( i[1] - skills )
- refresh
- end
- #-----------------------------------------------------------------------------
- # * Show Level Down Message | old_skills : Array of forgotten skills
- #-----------------------------------------------------------------------------
- def display_level_down(old_skills)
- $game_message.new_page
- $game_message.add(sprintf(Vocab::LevelDown, @name, Vocab::level, @level))
- old_skills.each do |skill|
- $game_message.add(sprintf(Vocab::ForgetSkill, skill.name))
- end
- end
- #-----------------------------------------------------------------------------
- # Level Up (overwrite)
- #-----------------------------------------------------------------------------
- def level_up
- increase_level
- determine_stat_inc_type if $D13x[:Dev_SLUD]
- lv_up_learn_skill
- end
- #-----------------------------------------------------------------------------
- # Increase level
- #-----------------------------------------------------------------------------
- def increase_level
- @level += 1
- end
- #-----------------------------------------------------------------------------
- # Initialize Skills
- #-----------------------------------------------------------------------------
- def init_skills
- @skills = []
- @skills_list = []
- self.class.learnings.each do |lning|
- learn_skill(lning.skill_id) if learn_skill_conditions_met?(lning)
- end
- end
- #-----------------------------------------------------------------------------
- # Level Up Learn Skill
- #-----------------------------------------------------------------------------
- def lv_up_learn_skill
- self.class.learnings.each do |lning|
- learn_skill(lning.skill_id) if learn_skill_conditions_met?(lning)
- end
- end
- #-----------------------------------------------------------------------------
- # Level Down (overwrite)
- #-----------------------------------------------------------------------------
- def level_down
- reduce_level
- lv_down_extra
- end
- #-----------------------------------------------------------------------------
- # Reduce Level
- #-----------------------------------------------------------------------------
- def reduce_level
- @level -= 1
- end
- #-----------------------------------------------------------------------------
- # Level Down Extra Shit
- #-----------------------------------------------------------------------------
- def lv_down_extra
- end
- #-----------------------------------------------------------------------------
- # Get Learning Skill Conditions
- #-----------------------------------------------------------------------------
- def learn_skill_conditions_met?(learning, mult = 1.0)
- return false if @level < (learning.level * mult).to_i
- return false if @skills_list.include?(learning.skill_id)
- return true
- end
- #-----------------------------------------------------------------------------
- # Param Max
- #-----------------------------------------------------------------------------
- def param_max(param_id)
- base = super
- base += param_max_actor_max_pars(param_id)
- base += param_max_self_class_max_pars(param_id)
- base += param_max_equips_max_pars(param_id)
- base += param_max_states_max_pars(param_id)
- base += param_max_skills_max_pars(param_id)
- base
- end
- #-----------------------------------------------------------------------------
- # Param Max [actor]
- #-----------------------------------------------------------------------------
- def param_max_actor_max_pars(param_id)
- actor.max_pars[param_id]
- end
- #-----------------------------------------------------------------------------
- # Param Max [class]
- #-----------------------------------------------------------------------------
- def param_max_self_class_max_pars(param_id)
- self.class.max_pars[param_id]
- end
- #-----------------------------------------------------------------------------
- # Param Max [equips]
- #-----------------------------------------------------------------------------
- def param_max_equips_max_pars(param_id)
- equips.compact.inject(0) {|r, i| r += i.max_pars[param_id] }
- end
- #-----------------------------------------------------------------------------
- # Param Max [states]
- #-----------------------------------------------------------------------------
- def param_max_states_max_pars(param_id)
- states.compact.inject(0) {|r, i| r += i.max_pars[param_id] }
- end
- #-----------------------------------------------------------------------------
- # Param Max [skills]
- #-----------------------------------------------------------------------------
- def param_max_skills_max_pars(param_id)
- if $D13x[:Skill_Lv]
- skills.compact.inject(0) {|r, i| r += (i.max_pars[param_id]*
- Skill_Levels::Exp_Set[i.exp_set][@skills_lv[i.id]][2] ).to_i}
- else
- skills.compact.inject(0) {|r, i| r += i.max_pars[param_id] }
- end
- end
- #-----------------------------------------------------------------------------
- # Param Plus
- #-----------------------------------------------------------------------------
- def param_plus(param_id)
- base = super
- base += param_plus_actor_pars(param_id)
- base += param_plus_self_class_pars(param_id)
- base += param_plus_equips_pars(param_id)
- base += param_plus_states_pars(param_id)
- base += param_plus_skills_pars(param_id)
- base
- end
- #-----------------------------------------------------------------------------
- # Param Plus [actor]
- #-----------------------------------------------------------------------------
- def param_plus_actor_pars(param_id)
- actor.pars[param_id]
- end
- #-----------------------------------------------------------------------------
- # Param Plus [class]
- #-----------------------------------------------------------------------------
- def param_plus_self_class_pars(param_id)
- self.class.pars[param_id]
- end
- #-----------------------------------------------------------------------------
- # Param Plus [equips]
- #-----------------------------------------------------------------------------
- def param_plus_equips_pars(param_id)
- equips.compact.inject(0) {|r, i| r += i.pars[param_id] }
- end
- #-----------------------------------------------------------------------------
- # Param Plus [states]
- #-----------------------------------------------------------------------------
- def param_plus_states_pars(param_id)
- states.compact.inject(0) {|r, i| r += i.pars[param_id] }
- end
- #-----------------------------------------------------------------------------
- # Param Plus [skills]
- #-----------------------------------------------------------------------------
- def param_plus_skills_pars(param_id)
- if $D13x[:Skill_Lv]
- skills.compact.inject(0) {|r, i| r += (i.pars[param_id]*
- Skill_Levels::Exp_Set[i.exp_set][@skills_lv[i.id]][2] ).to_i}
- else
- skills.compact.inject(0) {|r, i| r += i.pars[param_id] }
- end
- end
- #-----------------------------------------------------------------------------
- # xParam Max
- #-----------------------------------------------------------------------------
- def xparam_max(xparam_id)
- base = super
- base += xparam_max_actor_max_pars(xparam_id)
- base += xparam_max_self_class_max_pars(xparam_id)
- base += xparam_max_equips_max_pars(xparam_id)
- base += xparam_max_states_max_pars(xparam_id)
- base += xparam_max_skills_max_pars(xparam_id)
- base
- end
- #-----------------------------------------------------------------------------
- # xParam Max [actor]
- #-----------------------------------------------------------------------------
- def xparam_max_actor_max_pars(xparam_id)
- actor.max_xpars[xparam_id]
- end
- #-----------------------------------------------------------------------------
- # xParam Max [class]
- #-----------------------------------------------------------------------------
- def xparam_max_self_class_max_pars(xparam_id)
- self.class.max_xpars[xparam_id]
- end
- #-----------------------------------------------------------------------------
- # xParam Max [equips]
- #-----------------------------------------------------------------------------
- def xparam_max_equips_max_pars(xparam_id)
- equips.compact.inject(0) {|r, i| r += i.max_xpars[xparam_id] }
- end
- #-----------------------------------------------------------------------------
- # xParam Max [states]
- #-----------------------------------------------------------------------------
- def xparam_max_states_max_pars(xparam_id)
- states.compact.inject(0) {|r, i| r += i.max_xpars[xparam_id] }
- end
- #-----------------------------------------------------------------------------
- # xParam Max [skills]
- #-----------------------------------------------------------------------------
- def xparam_max_skills_max_pars(xparam_id)
- if $D13x[:Skill_Lv]
- skills.compact.inject(0) {|r, i| r += (i.max_xpars[xparam_id]*
- Skill_Levels::Exp_Set[i.exp_set][@skills_lv[i.id]][2] ).to_i}
- else
- skills.compact.inject(0) {|r, i| r += i.max_xpars[xparam_id] }
- end
- end
- #-----------------------------------------------------------------------------
- # xParam Plus
- #-----------------------------------------------------------------------------
- def xparam_plus(xparam_id)
- base = super
- base += xparam_plus_actor_pars(xparam_id)
- base += xparam_plus_self_class_pars(xparam_id)
- base += xparam_plus_equips_pars(xparam_id)
- base += xparam_plus_states_pars(xparam_id)
- base += xparam_plus_skills_pars(xparam_id)
- base
- end
- #-----------------------------------------------------------------------------
- # xParam Plus [actor]
- #-----------------------------------------------------------------------------
- def xparam_plus_actor_pars(xparam_id)
- actor.xpars[xparam_id]
- end
- #-----------------------------------------------------------------------------
- # xParam Plus [class]
- #-----------------------------------------------------------------------------
- def xparam_plus_self_class_pars(xparam_id)
- self.class.xpars[xparam_id]
- end
- #-----------------------------------------------------------------------------
- # xParam Plus [equips]
- #-----------------------------------------------------------------------------
- def xparam_plus_equips_pars(xparam_id)
- equips.compact.inject(0) {|r, i| r += i.xpars[xparam_id] }
- end
- #-----------------------------------------------------------------------------
- # xParam Plus [states]
- #-----------------------------------------------------------------------------
- def xparam_plus_states_pars(xparam_id)
- states.compact.inject(0) {|r, i| r += i.xpars[xparam_id] }
- end
- #-----------------------------------------------------------------------------
- # xParam Plus [skills]
- #-----------------------------------------------------------------------------
- def xparam_plus_skills_pars(xparam_id)
- if $D13x[:Skill_Lv]
- skills.compact.inject(0) {|r, i| r += (i.xpars[xparam_id]*
- Skill_Levels::Exp_Set[i.exp_set][@skills_lv[i.id]][2] ).to_i}
- else
- skills.compact.inject(0) {|r, i| r += i.xpars[xparam_id] }
- end
- end
- #-----------------------------------------------------------------------------
- # sParam Max
- #-----------------------------------------------------------------------------
- def sparam_max(sparam_id)
- base = super
- base += sparam_max_actor_max_pars(sparam_id)
- base += sparam_max_self_class_max_pars(sparam_id)
- base += sparam_max_equips_max_pars(sparam_id)
- base += sparam_max_states_max_pars(sparam_id)
- base += sparam_max_skills_max_pars(sparam_id)
- base
- end
- #-----------------------------------------------------------------------------
- # sParam Max [actor]
- #-----------------------------------------------------------------------------
- def sparam_max_actor_max_pars(sparam_id)
- actor.max_spars[sparam_id]
- end
- #-----------------------------------------------------------------------------
- # sParam Max [class]
- #-----------------------------------------------------------------------------
- def sparam_max_self_class_max_pars(sparam_id)
- self.class.max_spars[sparam_id]
- end
- #-----------------------------------------------------------------------------
- # sParam Max [equips]
- #-----------------------------------------------------------------------------
- def sparam_max_equips_max_pars(sparam_id)
- equips.compact.inject(0) {|r, i| r += i.max_spars[sparam_id] }
- end
- #-----------------------------------------------------------------------------
- # sParam Max [states]
- #-----------------------------------------------------------------------------
- def sparam_max_states_max_pars(sparam_id)
- states.compact.inject(0) {|r, i| r += i.max_spars[sparam_id] }
- end
- #-----------------------------------------------------------------------------
- # sParam Max [skills]
- #-----------------------------------------------------------------------------
- def sparam_max_skills_max_pars(sparam_id)
- if $D13x[:Skill_Lv]
- skills.compact.inject(0) {|r, i| r += (i.max_spars[sparam_id]*
- Skill_Levels::Exp_Set[i.exp_set][@skills_lv[i.id]][2] ).to_i}
- else
- skills.compact.inject(0) {|r, i| r += i.max_spars[sparam_id] }
- end
- end
- #-----------------------------------------------------------------------------
- # sParam Plus
- #-----------------------------------------------------------------------------
- def sparam_plus(sparam_id)
- base = super
- base += sparam_plus_actor_pars(sparam_id)
- base += sparam_plus_self_class_pars(sparam_id)
- base += sparam_plus_equips_pars(sparam_id)
- base += sparam_plus_states_pars(sparam_id)
- base += sparam_plus_skills_pars(sparam_id)
- base
- end
- #-----------------------------------------------------------------------------
- # sParam Plus [actor]
- #-----------------------------------------------------------------------------
- def sparam_plus_actor_pars(sparam_id)
- actor.spars[sparam_id]
- end
- #-----------------------------------------------------------------------------
- # sParam Plus [class]
- #-----------------------------------------------------------------------------
- def sparam_plus_self_class_pars(sparam_id)
- self.class.spars[sparam_id]
- end
- #-----------------------------------------------------------------------------
- # sParam Plus [equips]
- #-----------------------------------------------------------------------------
- def sparam_plus_equips_pars(sparam_id)
- equips.compact.inject(0) {|r, i| r += i.spars[sparam_id] }
- end
- #-----------------------------------------------------------------------------
- # sParam Plus [states]
- #-----------------------------------------------------------------------------
- def sparam_plus_states_pars(sparam_id)
- states.compact.inject(0) {|r, i| r += i.spars[sparam_id] }
- end
- #-----------------------------------------------------------------------------
- # sParam Plus [skills]
- #-----------------------------------------------------------------------------
- def sparam_plus_skills_pars(sparam_id)
- if $D13x[:Skill_Lv]
- skills.compact.inject(0) {|r, i| r += (i.spars[sparam_id]*
- Skill_Levels::Exp_Set[i.exp_set][@skills_lv[i.id]][2] ).to_i}
- else
- skills.compact.inject(0) {|r, i| r += i.spars[sparam_id] }
- end
- end
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- end # << Game_Actor
- #===============================================================================
- class Game_Enemy < Game_Battler
- #===============================================================================
- #-----------------------------------------------------------------------------
- # Param Max
- #-----------------------------------------------------------------------------
- def param_max(param_id)
- base = super
- base += param_max_enemy_pars(param_id)
- base += param_max_state_pars(param_id)
- base
- end
- #-----------------------------------------------------------------------------
- # Param Max [enemy]
- #-----------------------------------------------------------------------------
- def param_max_enemy_pars(param_id)
- enemy.max_pars[param_id]
- end
- #-----------------------------------------------------------------------------
- # Param Max [states]
- #-----------------------------------------------------------------------------
- def param_max_state_pars(param_id)
- states.compact.inject(0) {|r, i| r += i.max_pars[param_id] }
- end
- #-----------------------------------------------------------------------------
- # Param Plus
- #-----------------------------------------------------------------------------
- def param_plus(param_id)
- base = super
- base += param_plus_enemy_pars(param_id)
- base += param_plus_state_pars(param_id)
- base
- end
- #-----------------------------------------------------------------------------
- # Param Max [enemy]
- #-----------------------------------------------------------------------------
- def param_plus_enemy_pars(param_id)
- enemy.pars[param_id]
- end
- #-----------------------------------------------------------------------------
- # Param Max [states]
- #-----------------------------------------------------------------------------
- def param_plus_state_pars(param_id)
- states.compact.inject(0) {|r, i| r += i.pars[param_id] }
- end
- #-----------------------------------------------------------------------------
- # xParam Max
- #-----------------------------------------------------------------------------
- def xparam_max(xparam_id)
- base = super
- base += xparam_max_enemy_pars(xparam_id)
- base += xparam_max_state_pars(xparam_id)
- base
- end
- #-----------------------------------------------------------------------------
- # xParam Max [enemy]
- #-----------------------------------------------------------------------------
- def xparam_max_enemy_pars(xparam_id)
- enemy.max_xpars[xparam_id]
- end
- #-----------------------------------------------------------------------------
- # xParam Max [states]
- #-----------------------------------------------------------------------------
- def xparam_max_state_pars(xparam_id)
- states.compact.inject(0) {|r, i| r += i.max_xpars[xparam_id] }
- end
- #-----------------------------------------------------------------------------
- # xParam Plus
- #-----------------------------------------------------------------------------
- def xparam_plus(xparam_id)
- base = super
- base += xparam_plus_enemy_pars(xparam_id)
- base += xparam_plus_state_pars(xparam_id)
- base
- end
- #-----------------------------------------------------------------------------
- # xParam Plus [enemy]
- #-----------------------------------------------------------------------------
- def xparam_plus_enemy_pars(xparam_id)
- enemy.pars[xparam_id]
- end
- #-----------------------------------------------------------------------------
- # xParam Plus [states]
- #-----------------------------------------------------------------------------
- def xparam_plus_state_pars(xparam_id)
- states.compact.inject(0) {|r, i| r += i.xpars[xparam_id] }
- end
- #-----------------------------------------------------------------------------
- # sParam Max
- #-----------------------------------------------------------------------------
- def sparam_max(sparam_id)
- base = super
- base += sparam_max_enemy_pars(sparam_id)
- base += sparam_max_state_pars(sparam_id)
- base
- end
- #-----------------------------------------------------------------------------
- # sParam Max [enemy]
- #-----------------------------------------------------------------------------
- def sparam_max_enemy_pars(sparam_id)
- enemy.max_spars[sparam_id]
- end
- #-----------------------------------------------------------------------------
- # sParam Max [states]
- #-----------------------------------------------------------------------------
- def sparam_max_state_pars(sparam_id)
- states.compact.inject(0) {|r, i| r += i.max_spars[sparam_id] }
- end
- #-----------------------------------------------------------------------------
- # sParam Plus
- #-----------------------------------------------------------------------------
- def sparam_plus(sparam_id)
- base = super
- base += enemy.spars[sparam_id]
- base += states.compact.inject(0) {|r, i| r += i.spars[sparam_id] }
- base
- end
- #-----------------------------------------------------------------------------
- # sParam Max [enemy]
- #-----------------------------------------------------------------------------
- def sparam_plus_enemy_pars(sparam_id)
- enemy.spars[sparam_id]
- end
- #-----------------------------------------------------------------------------
- # sParam Max [states]
- #-----------------------------------------------------------------------------
- def sparam_plus_state_pars(sparam_id)
- states.compact.inject(0) {|r, i| r += i.spars[sparam_id] }
- end
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- end # << Game_Enemy
- #==============================================================================#
- # http://dekitarpg.wordpress.com/ #
- #==============================================================================#
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement