Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #===============================================================================
- #
- # ☆ $D13x - Elemental Control
- # -- Author : Dekita
- # -- Version : 1.0
- # -- Level : Easy / Normal
- # -- Requires : N/A
- # -- Engine : RPG Maker VX Ace.
- #
- #===============================================================================
- # ☆ Import
- #-------------------------------------------------------------------------------
- $D13x={}if$D13x==nil
- $D13x[:Elems_Control]=true
- #===============================================================================
- # ☆ Updates
- #-------------------------------------------------------------------------------
- # D /M /Y
- # 26/o3/2o13 - Finished,
- # 23/o3/2o13 - Started,
- #
- #===============================================================================
- # ☆ Introduction
- #-------------------------------------------------------------------------------
- # This script is the Elemental Equivalent of my Statistic Control Script
- # This script 'fixes' elements, ie. differentiates between attack and defence
- # element types.
- # This script also allows Dev's control over elements that would not normally
- # be available, such as various script calls to modify the element value
- # using simple arithmatic (add/subtract/divide/multiply/modulo),
- # As well as actors/classes/enemies/weapons/armors/states/skills notetags.
- #
- # It also adds Max and Min limits for all elements and gives control over these
- # new limitations for both attack and defence.
- #
- # It also provides new ways of handling the elemental damage modification.
- # ie, allows for multiple element damage variances, rather than 1.
- #
- # Note :
- # Elements still work with percentage values, ie 0.01 is 1%, 1.0 is 100%
- #
- #===============================================================================
- # ★☆★☆★☆★☆★☆★☆★☆★ 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.
- #
- #===============================================================================
- # ☆ Script Calls
- #-------------------------------------------------------------------------------
- # $game_actor[id].add_def_ele(element_id, value)
- # $game_actor[id].sub_def_ele(element_id, value)
- # $game_actor[id].mul_def_ele(element_id, value)
- # $game_actor[id].div_def_ele(element_id, value)
- # $game_actor[id].mod_def_ele(element_id, value)
- #
- # $game_actor[id].add_atk_ele(element_id, value)
- # $game_actor[id].sub_atk_ele(element_id, value)
- # $game_actor[id].mul_atk_ele(element_id, value)
- # $game_actor[id].div_atk_ele(element_id, value)
- # $game_actor[id].mod_atk_ele(element_id, value)
- #
- # id = the actors database id
- # element_id = the elements database id
- # value = the value you with to modify the element with
- #
- # 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.
- #
- # BIG NOTE ::
- # By default in Vx Ace the starting element defence is 1.0, this is because the
- # calculation is 1.0 * element defence (eg 1.0) which makes the damage normal
- # (normal = no resist or weakness) this means, if your elemental defence is 2.0
- # you will take 2.0* the damage from elements.
- # This means in order to INCREASE your resistance towards a peticular element
- # you must REDUCE the defencive element.
- # eg.
- # add = more elemental damage intake
- # sub = less elemental damage intake
- #
- # Attack elements work as you would expect.
- # eg.
- # add = more elemental attack value
- # sub = less elemental attack value
- #
- #===============================================================================
- # ☆ Notetags ( default )
- # For use with Weapons / Armors / Enemies / Actors / Classes / States / Skills
- #-------------------------------------------------------------------------------
- # <atk ele: element_id, value>
- # <def ele: element_id, value>
- # <max atk ele: element_id, value>
- # <max def ele: element_id, value>
- #
- # element_id = The Element ID from the database
- # value = the value you wish to change the element by
- #
- #-------------------------------------------------------------------------------
- # For Skills / Items
- #-------------------------------------------------------------------------------
- # <no ele mod>
- # Will make the skill / item have no elemental modification when used.
- #
- #===============================================================================
- # ☆ HELP
- #-------------------------------------------------------------------------------
- # Remember :
- # All Elemental Values work with float values, eg. 1.0, 0.5, 0.1, 0.05, 0.01
- # 1.0 = 100%, 0.01 = 1%,
- #
- # Also, element id numbers can be found in the database.
- #
- #===============================================================================
- module Ele_Fixx
- #===============================================================================
- Element={0=>{:atk_ele=>[0,1],:def_ele=>[0,1]}}# << KEEP !!
- Notes={}# << Keep
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- # ☆ Calculation Settings
- #--------------------------------------------------------------------------
- # This is where you set how the script calculates elemental damage
- # Types :
- # 0 = Will take the max element modifier as the damage multiplication
- # This is also the Vx Ace Default Calculation.
- # This will make even the smallest attack elemental modifier count as full
- # elemental attack.
- #
- # 1 = Will calculate only weak and resisted elements, then adds/subtracts
- # Them accordingly and adds them onto the default attack for a total
- # calculation. (positive or negative)
- # RECOMMENDED TYPE.
- #
- # 2 = Will add each elemental modifier together for the damage multiplication
- # This Is An Experimental Calculation ;p
- #
- # 3 = Will take the average modifier for the damage calculation
- # This Is Another Experimental Calculation ;p
- #--------------------------------------------------------------------------
- DMG_Type = 1
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- # ☆ Limit Settings
- #--------------------------------------------------------------------------
- # This is where you adjust the settings for the base min and max values
- # used for actors / enemies.
- #--------------------------------------------------------------------------
- #Element[id]={ :atk_ele => [ Min , Max ], :def_ele => [ Min , Max ]}
- Element[1] = { :atk_ele => [ -2.0 , 2.0 ], :def_ele => [ -2.0 , 2.0 ]}
- Element[2] = { :atk_ele => [ -2.0 , 2.0 ], :def_ele => [ -2.0 , 2.0 ]}
- Element[3] = { :atk_ele => [ -2.0 , 2.0 ], :def_ele => [ -2.0 , 2.0 ]}
- Element[4] = { :atk_ele => [ -2.0 , 2.0 ], :def_ele => [ -2.0 , 2.0 ]}
- Element[5] = { :atk_ele => [ -2.0 , 2.0 ], :def_ele => [ -2.0 , 2.0 ]}
- Element[6] = { :atk_ele => [ -2.0 , 2.0 ], :def_ele => [ -2.0 , 2.0 ]}
- Element[7] = { :atk_ele => [ -2.0 , 2.0 ], :def_ele => [ -2.0 , 2.0 ]}
- Element[8] = { :atk_ele => [ -2.0 , 2.0 ], :def_ele => [ -2.0 , 2.0 ]}
- Element[9] = { :atk_ele => [ -2.0 , 2.0 ], :def_ele => [ -2.0 , 2.0 ]}
- Element[10]= { :atk_ele => [ -2.0 , 2.0 ], :def_ele => [ -2.0 , 2.0 ]}
- # << Add more rows here if you have more than 10
- # Follow the same format as above, ie Element[ id ] = [ Min , Max ]
- # elements in your project :)
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- # ☆ Notetag Settings
- #--------------------------------------------------------------------------
- # This is where you adjust the settings for the notetags used in all
- # notetaggable items.
- # Only modify these if you understand how to.
- #--------------------------------------------------------------------------
- Notes[:atk_ele] = /<atk ele:(.*),(.*)>/i
- Notes[:def_ele] = /<def ele:(.*),(.*)>/i
- Notes[:max_atk_ele] = /<max atk ele:(.*),(.*)>/i
- Notes[:max_def_ele] = /<max def ele:(.*),(.*)>/i
- Notes[:no_element] = /<no ele mod>/i
- end #####################
- # CUSTOMISATION END #
- #####################
- #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
- # #
- # http://dekitarpg.wordpress.com/ #
- # #
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
- #===============================================================================#
- # ARE YOU MODIFYING BEYOND THIS POINT? \.\. #
- # YES?\.\. #
- # OMG, REALLY? \| #
- # WELL SLAP MY FACE AND CALL ME A DRAGONITE.\..\.. #
- # I REALLY DIDN'T THINK YOU HAD IT IN YOU.\..\.. #
- #===============================================================================#
- if !$D13x[:CORE]
- #===============================================================================
- module DataManager
- #===============================================================================
- #---------------------------------------------------------------------------
- # Alias List
- #---------------------------------------------------------------------------
- class << self
- alias :lbd_unique_element :load_database
- end
- #---------------------------------------------------------------------------
- # Load Database (alias)
- #---------------------------------------------------------------------------
- def self.load_database
- lbd_unique_element
- loa_unique_element
- end
- #---------------------------------------------------------------------------
- # Load Unique Elemental Shit
- #---------------------------------------------------------------------------
- def self.loa_unique_element
- 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_element_control
- end
- end
- end
- end # DataManager
- end # if $D13x[:CORE]
- #===============================================================================
- class RPG::BaseItem
- #===============================================================================
- #---------------------------------------------------------------------------
- # Alias List
- #---------------------------------------------------------------------------
- alias :deki_elemfixx :load_unique_shit if $D13x[:CORE]
- #---------------------------------------------------------------------------
- # Pi Variables
- #---------------------------------------------------------------------------
- attr_accessor :atk_ele
- attr_accessor :def_ele
- attr_accessor :max_atk_ele
- attr_accessor :max_def_ele
- #---------------------------------------------------------------------------
- # load unique shit
- #---------------------------------------------------------------------------
- def load_unique_shit
- deki_elemfixx if $D13x[:CORE]
- load_elemental_control
- end
- #---------------------------------------------------------------------------
- # Load Elemental Control
- #---------------------------------------------------------------------------
- def load_elemental_control
- @atk_ele = [0] * $data_system.elements.size
- @def_ele = [0] * $data_system.elements.size
- @max_atk_ele = [0] * $data_system.elements.size
- @max_def_ele = [0] * $data_system.elements.size
- check_elefixx_notetags
- end
- #---------------------------------------------------------------------------
- # Parse Notes
- #---------------------------------------------------------------------------
- def check_elefixx_notetags
- self.note.split(/[\r\n]+/).each do |line|
- case line
- when Ele_Fixx::Notes[:atk_ele] then @atk_ele[$1.to_i] = $2.to_f
- when Ele_Fixx::Notes[:def_ele] then @def_ele[$1.to_i] = $2.to_f
- when Ele_Fixx::Notes[:max_atk_ele] then @max_atk_ele[$1.to_i] = $2.to_f
- when Ele_Fixx::Notes[:max_def_ele] then @max_def_ele[$1.to_i] = $2.to_f
- end
- end
- end
- end # << RPG::BaseItem
- #===============================================================================
- class RPG::UsableItem < RPG::BaseItem
- #===============================================================================
- #---------------------------------------------------------------------------
- # Pi Variables
- #---------------------------------------------------------------------------
- attr_accessor :no_ele_mod
- #---------------------------------------------------------------------------
- # Load Elemental Control
- #---------------------------------------------------------------------------
- def load_elemental_control
- super
- @no_ele_mod = false
- check_elefixx_notetags
- end
- #---------------------------------------------------------------------------
- # Parse Notes
- #---------------------------------------------------------------------------
- def check_elefixx_notetags
- super
- self.note.split(/[\r\n]+/).each do |line|
- case line
- when Ele_Fixx::Notes[:no_element]
- @no_ele_mod = true
- end
- end
- end
- end # << RPG::BaseItem
- #===============================================================================
- class Game_BattlerBase
- #===============================================================================
- #--------------------------------------------------------------------------
- # Alias List
- #--------------------------------------------------------------------------
- alias :sd13x_GB_elems :initialize
- #--------------------------------------------------------------------------
- # Initialize Data
- #--------------------------------------------------------------------------
- def initialize(*a,&b)
- clear_def_ele_plus
- clear_atk_ele_plus
- sd13x_GB_elems(*a,&b)
- end
- #--------------------------------------------------------------------------
- # Get Attack Element
- #--------------------------------------------------------------------------
- def atk_elements
- a = []
- $data_system.elements.size.times do |i|
- e = atk_element_rate(i)
- a << i if e != 0.0
- end
- a
- # features_set(FEATURE_ATK_ELEMENT) << Old Method
- end
- #--------------------------------------------------------------------------
- # Get Min Value of Defencive Elements
- #--------------------------------------------------------------------------
- def def_ele_min(element_id)
- return Ele_Fixx::Element[element_id][:def_ele][0]
- end
- #--------------------------------------------------------------------------
- # Get Maximum Value of Defencive Elements
- #--------------------------------------------------------------------------
- def def_ele_max(element_id)
- return Ele_Fixx::Element[element_id][:def_ele][1]
- end
- #--------------------------------------------------------------------------
- # Get Base Element Rate
- #--------------------------------------------------------------------------
- def def_ele_base(element_id)
- features_pi(FEATURE_ELEMENT_RATE, element_id)
- end
- #--------------------------------------------------------------------------
- # Get Real Defencive Element Rate
- #--------------------------------------------------------------------------
- def element_rate(element_id)
- val = ( def_ele_base(element_id) + def_ele_plus(element_id) )
- [[val, def_ele_max(element_id)].min, def_ele_min(element_id)].max.to_f
- end
- #--------------------------------------------------------------------------
- # Defencive Elements Plus
- #--------------------------------------------------------------------------
- def def_ele_plus(element_id)
- @def_ele_plus[element_id]
- end
- #--------------------------------------------------------------------------
- # Clear Defencive Elements Plus
- #--------------------------------------------------------------------------
- def clear_def_ele_plus
- @def_ele_plus = [0] * $data_system.elements.size
- end
- #--------------------------------------------------------------------------
- # Add Defencive Elements
- #--------------------------------------------------------------------------
- def add_def_ele(element_id, value, ref = true)
- @def_ele_plus[element_id] += value
- refresh if ref
- end
- #--------------------------------------------------------------------------
- # Sub Defencive Elements
- #--------------------------------------------------------------------------
- def sub_def_ele(element_id, value, ref = true)
- @def_ele_plus[element_id] -= value
- refresh if ref
- end
- #--------------------------------------------------------------------------
- # Div Defencive Elements
- #--------------------------------------------------------------------------
- def div_def_ele(element_id, value, ref = true)
- @def_ele_plus[element_id] /= value
- refresh if ref
- end
- #--------------------------------------------------------------------------
- # Mul Defencive Elements
- #--------------------------------------------------------------------------
- def mul_def_ele(element_id, value, ref = true)
- @def_ele_plus[element_id] *= value
- refresh if ref
- end
- #--------------------------------------------------------------------------
- # Mod Defencive Elements
- #--------------------------------------------------------------------------
- def mod_def_ele(element_id, value, ref = true)
- @def_ele_plus[element_id] %= value
- refresh if ref
- end
- #--------------------------------------------------------------------------
- # Get Min Value of Attack Elements
- #--------------------------------------------------------------------------
- def atk_ele_min(element_id)
- return Ele_Fixx::Element[element_id][:atk_ele][0]
- end
- #--------------------------------------------------------------------------
- # Get Maximum Value of Attack Elements
- #--------------------------------------------------------------------------
- def atk_ele_max(element_id)
- return Ele_Fixx::Element[element_id][:atk_ele][1]
- end
- #--------------------------------------------------------------------------
- # Get Base Attack Element Rate
- #--------------------------------------------------------------------------
- def atk_ele_base(element_id)
- features_sum(FEATURE_ATK_ELEMENT, element_id)
- end
- #--------------------------------------------------------------------------
- # Get Real Attack Elements Rate
- #--------------------------------------------------------------------------
- def atk_element_rate(element_id)
- val = ( atk_ele_base(element_id) + atk_ele_plus(element_id) )
- [[val, atk_ele_max(element_id)].min, atk_ele_min(element_id)].max.to_f
- end
- #--------------------------------------------------------------------------
- # Attack Elements Plus
- #--------------------------------------------------------------------------
- def atk_ele_plus(element_id)
- @atk_ele_plus[element_id]
- end
- #--------------------------------------------------------------------------
- # Clear Attack Elements Plus
- #--------------------------------------------------------------------------
- def clear_atk_ele_plus
- @atk_ele_plus = [0] * $data_system.elements.size
- end
- #--------------------------------------------------------------------------
- # Add Attack Elements
- #--------------------------------------------------------------------------
- def add_atk_ele(element_id, value, ref = true)
- @atk_ele_plus[element_id] += value
- refresh if ref
- end
- #--------------------------------------------------------------------------
- # Sub Attack Elements
- #--------------------------------------------------------------------------
- def sub_atk_ele(element_id, value, ref = true)
- @atk_ele_plus[element_id] -= value
- refresh if ref
- end
- #--------------------------------------------------------------------------
- # Div Attack Elements
- #--------------------------------------------------------------------------
- def div_atk_ele(element_id, value, ref = true)
- @atk_ele_plus[element_id] /= value
- refresh if ref
- end
- #--------------------------------------------------------------------------
- # Mul Attack Elements
- #--------------------------------------------------------------------------
- def mul_atk_ele(element_id, value, ref = true)
- @atk_ele_plus[element_id] *= value
- refresh if ref
- end
- #--------------------------------------------------------------------------
- # Mod Attack Elements
- #--------------------------------------------------------------------------
- def mod_atk_ele(element_id, value, ref = true)
- @atk_ele_plus[element_id] %= value
- refresh if ref
- end
- end # << Game_BattlerBase
- #===============================================================================
- class Game_Battler < Game_BattlerBase
- #===============================================================================
- #--------------------------------------------------------------------------
- # Get Element Modifier for Skill/Item
- #--------------------------------------------------------------------------
- def item_element_rate(user, item)
- return 1.0 if user.atk_elements.empty?
- return 1.0 if item.no_ele_mod
- case Ele_Fixx::DMG_Type
- when 0 # Default Type
- var = elements_max_rate(user.atk_elements)
- when 1 # $D13x Type
- var = sD13x_element_rate(user,user.atk_elements)
- when 2 # Adding Type
- var = elements_add_rate(user.atk_elements)
- when 3 # Average Type
- var = elements_ave_rate(user.atk_elements)
- end
- p "[ #{user.name} ] << attacker | element rate is = #{var}"
- return var
- end
- #--------------------------------------------------------------------------
- # Elements Max Rate (For Reference)
- #--------------------------------------------------------------------------
- # def elements_max_rate(elements)
- # elements.inject([0.0]) {|r, i| r.push(element_rate(i)) }.max
- # end
- #--------------------------------------------------------------------------
- # $D13x Element Rate
- #--------------------------------------------------------------------------
- def sD13x_element_rate(user,elements)
- rate = 1.0
- elements.each do |i|
- erate = element_rate(i)
- if erate > 1.0
- rate += user.atk_element_rate(i) * erate
- elsif erate < 0.0
- rate -= user.atk_element_rate(i) * (1.0-erate)
- end
- end
- rate
- end
- #--------------------------------------------------------------------------
- # Elements Add Rate
- #--------------------------------------------------------------------------
- def elements_add_rate(elements)
- elements.inject(1.0) {|r, i| r += element_rate(i) - (1.0) }
- end
- #--------------------------------------------------------------------------
- # Elements Average Rate
- #--------------------------------------------------------------------------
- def elements_ave_rate(elements)
- data = elements.inject(0.0) {|r, i| r += element_rate(i) }
- (data / (elements.size)).to_f
- end
- end
- #===============================================================================
- class Game_Actor < Game_Battler
- #===============================================================================
- #--------------------------------------------------------------------------
- # Defence Element Max
- #--------------------------------------------------------------------------
- def def_ele_max(element_id)
- base = super
- base += actor.max_def_ele[element_id]
- base += self.class.max_def_ele[element_id]
- base += equips.compact.inject(0) {|r, i| r += i.max_def_ele[element_id] }
- base += states.compact.inject(0) {|r, i| r += i.max_def_ele[element_id] }
- if $D13x[:Skill_Lv]
- base += skills.compact.inject(0) {|r, i| r += (i.max_def_ele[element_id]*
- Skill_Levels::Exp_Set[i.exp_set][@skills_lv[i.id]][2] ).to_f}
- else
- base += skills.compact.inject(0) {|r, i| r += i.max_def_ele[element_id] }
- end
- base
- end
- #--------------------------------------------------------------------------
- # Defence Element Plus
- #--------------------------------------------------------------------------
- def def_ele_plus(element_id)
- base = super
- base += actor.def_ele[element_id]
- base += self.class.def_ele[element_id]
- base += equips.compact.inject(0) {|r, i| r += (i.def_ele[element_id])}
- base += states.compact.inject(0) {|r, i| r += i.def_ele[element_id] }
- if $D13x[:Skill_Lv]
- base += skills.compact.inject(0) {|r, i| r += (i.def_ele[element_id]*
- Skill_Levels::Exp_Set[i.exp_set][@skills_lv[i.id]][2] ).to_f}
- else
- base += skills.compact.inject(0) {|r, i| r += i.def_ele[element_id] }
- end
- base
- end
- #--------------------------------------------------------------------------
- # Attack Element Max
- #--------------------------------------------------------------------------
- def atk_ele_max(element_id)
- base = super
- base += actor.max_atk_ele[element_id]
- base += self.class.max_atk_ele[element_id]
- base += equips.compact.inject(0) {|r, i| r += i.max_atk_ele[element_id] }
- base += states.compact.inject(0) {|r, i| r += i.max_atk_ele[element_id] }
- if $D13x[:Skill_Lv]
- base += skills.compact.inject(0) {|r, i| r += (i.max_atk_ele[element_id]*
- Skill_Levels::Exp_Set[i.exp_set][@skills_lv[i.id]][2] ).to_f}
- else
- base += skills.compact.inject(0) {|r, i| r += i.max_atk_ele[element_id] }
- end
- base
- end
- #--------------------------------------------------------------------------
- # Attack Element Plus
- #--------------------------------------------------------------------------
- def atk_ele_plus(element_id)
- base = super
- base += actor.atk_ele[element_id]
- base += self.class.atk_ele[element_id]
- base += equips.compact.inject(0) {|r, i| r += (i.atk_ele[element_id])}
- base += states.compact.inject(0) {|r, i| r += i.atk_ele[element_id] }
- if $D13x[:Skill_Lv]
- base += skills.compact.inject(0) {|r, i| r += (i.atk_ele[element_id]*
- Skill_Levels::Exp_Set[i.exp_set][@skills_lv[i.id]][2] ).to_f}
- else
- base += skills.compact.inject(0) {|r, i| r += i.atk_ele[element_id] }
- end
- base
- end
- end # << Game_Actor
- #===============================================================================
- class Game_Enemy < Game_Battler
- #===============================================================================
- #--------------------------------------------------------------------------
- # Defence Element Max
- #--------------------------------------------------------------------------
- def def_ele_max(element_id)
- base = super
- base += enemy.max_def_ele[element_id]
- base += states.compact.inject(0) {|r, i| r += i.max_def_ele[element_id] }
- base
- end
- #--------------------------------------------------------------------------
- # Defence Element Plus
- #--------------------------------------------------------------------------
- def def_ele_plus(element_id)
- base = super
- base += enemy.def_ele[element_id]
- base += states.compact.inject(0) {|r, i| r += i.def_ele[element_id] }
- base
- end
- #--------------------------------------------------------------------------
- # Attack Element Max
- #--------------------------------------------------------------------------
- def def_ele_max(element_id)
- base = super
- base += enemy.max_atk_ele[element_id]
- base += states.compact.inject(0) {|r, i| r += i.max_atk_ele[element_id] }
- base
- end
- #--------------------------------------------------------------------------
- # Attack Element Plus
- #--------------------------------------------------------------------------
- def atk_ele_plus(element_id)
- base = super
- base += enemy.atk_ele[element_id]
- base += states.compact.inject(0) {|r, i| r += i.atk_ele[element_id] }
- base
- end
- end # << Game_Enemy
- #==============================================================================#
- # http://dekitarpg.wordpress.com/ #
- #==============================================================================#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement