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 - Proficiency (skills)
- # -- Author : Dekita
- # -- Version : 1.1
- # -- Level : Easy
- # -- Requires : $D13x - Statistic Control
- # -- Engine : RPG Maker VX Ace.
- #
- #===============================================================================
- # ☆ Import
- #-------------------------------------------------------------------------------
- $D13x={}if$D13x==nil
- $D13x[:Proficiency]=true
- #===============================================================================
- # ☆ Updates
- #-------------------------------------------------------------------------------
- # D /M /Y
- # o3/o3/2o14 - Bugfixx, (Damage Item Crashing Game)
- # 2o/o3/2o13 - Started && Finished,
- #
- #===============================================================================
- # ☆ Introduction
- #-------------------------------------------------------------------------------
- # This script simply allows the creation of "proficiency skills"
- # This means that you can create skills that increase the Damage you deal
- # when using a certain weapon, a skill with a certain element
- # or a skill with a certain type.
- # eg.
- # Axe Mastery Skill, increases Axe Weapon Damage by 0.10 (10%)
- # Sword Mastery Skill, increase sword damage by 0.50 (50%)
- # Fire Mastery Skill, increase all fire skill damage by 0.1365 (13.65%)
- # Magic Mastery Skill, increase all Magic Type Skills Damage...
- #
- # If using the $D13x - skill levels script, the "proficiency value"
- # that the skill has been given will be the base value,
- # multiplied by the skills level DMG Multi.
- #
- # These "Proficiency Skills" DO NOT effect Enemies.
- #
- #===============================================================================
- # ★☆★☆★☆★☆★☆★☆★☆★ 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 Below my " $D13x - Statistic Control " Script
- #
- #===============================================================================
- # ☆ Notetags ( default )
- # For Use in Skill Noteboxes.
- #-------------------------------------------------------------------------------
- # <wep prof: weapon_type_id, bonus_damage>
- # weapon_type_id = the id of the weapon type, eg 1 = Axe (default)
- # bonus_damage = the extra percentage of damage that will be dealt when
- # using a weapon that matches the weapon_type_id.
- #
- # <ele prof: element_id, bonus_damage>
- # element_id = the id of the element, eg 3 = Fire (default)
- # bonus_damage = the extra percentage of damage that will be dealt when
- # using a skill that matches the element_id
- #
- # <skl prof: skill_type_id, bonus_damage>
- # skill_type_id = the id of the skill type, eg 1 = Special (default)
- # bonus_damage = the extra percentage of damage that will be dealt when
- # using a skill that matches the skill_type_id.
- #
- # ALL the above notetags work with percentage values.
- # eg. 0.10 means 10% extra damage, 1.0 means 100% extra damage
- #
- #===============================================================================
- # ☆ Notes
- #-------------------------------------------------------------------------------
- # Skills Are Limited to 1 of each damage modifier,
- # if more than 1 notetag is used, it will use the one lowest down in the list.
- #
- #===============================================================================
- module Proficiency
- #===============================================================================
- Notes = {
- :skill_t => /<skl prof:(.*),(.*)>/i, # Skill Type Notetag
- :element => /<ele prof:(.*),(.*)>/i, # Element Type Notetag
- :weapons => /<wep prof:(.*),(.*)>/i, # Weapon Type Notetag
- } # << Keep
- #####################
- # CUSTOMISATION END #
- end #####################
- #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
- # #
- # http://dekitarpg.wordpress.com/ #
- # #
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
- # you light up another cigarette and i pour the wine..... #
- # its 4 o'clock in the morning and it's starting to get ligghtttttt.... #
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
- #===============================================================================
- class RPG::Skill < RPG::UsableItem
- #===============================================================================
- #---------------------------------------------------------------------------
- # Alias List
- #---------------------------------------------------------------------------
- alias :deki_weap_prof :load_stat_control
- #---------------------------------------------------------------------------
- # Pi Variables
- #---------------------------------------------------------------------------
- attr_accessor :weap_prof
- attr_accessor :elem_prof
- attr_accessor :styp_prof
- #---------------------------------------------------------------------------
- # Load Stat Control
- #---------------------------------------------------------------------------
- def load_stat_control
- deki_weap_prof
- @weap_prof = [nil, 0.0]
- @elem_prof = [nil, 0.0]
- @styp_prof = [nil, 0.0]
- self.note.split(/[\r\n]+/).each do |line|
- case line
- when Proficiency::Notes[:weapons] then @weap_prof = [$1.to_i, $2.to_f]
- when Proficiency::Notes[:element] then @elem_prof = [$1.to_i, $2.to_f]
- when Proficiency::Notes[:skill_t] then @styp_prof = [$1.to_i, $2.to_f]
- end
- end
- end
- end
- #===============================================================================
- class Game_Battler < Game_BattlerBase
- #===============================================================================
- #--------------------------------------------------------------------------
- # Alias List
- #--------------------------------------------------------------------------
- alias :_MDV__profic :make_damage_value
- alias :_APV__profic :apply_variance
- #--------------------------------------------------------------------------
- # M.D.V
- #--------------------------------------------------------------------------
- def make_damage_value(user, item)
- @wep_prof_user = user
- @wep_prof_item = item
- _MDV__profic(user, item)
- end
- #--------------------------------------------------------------------------
- # Apply Variance Mod
- #--------------------------------------------------------------------------
- def apply_variance(damage, variance)
- usar = @wep_prof_user
- itum = @wep_prof_item
- neww = _APV__profic(damage, variance)
- neww *= apply_skill_t_profic(itum,usar)
- p "DMG After Skill Profic [:type] = #{neww.to_i}"
- neww *= apply_element_profic(itum,usar)
- p "DMG After Skill Profic [:elem] = #{neww.to_i}"
- neww *= apply_weapon_profic(itum,usar)
- p "DMG After Skill Profic [:weap] = #{neww.to_i}"
- neww
- end
- #--------------------------------------------------------------------------
- # Apply Skill_Type Proficiency Mod
- #--------------------------------------------------------------------------
- def apply_skill_t_profic(item,user)
- return 1.0 unless user.is_a?(Game_Actor)
- return 1.0 unless item.is_a?(RPG::Skill)
- prof = 1.0
- user.skills.each do |skill|
- next unless skill != nil
- next unless skill.styp_prof[0] != 0
- next unless item.stype_id == skill.styp_prof[0]
- if $D13x[:Skill_Lv]
- mult = Skill_Levels::Exp_Set[skill.exp_set][user.skills_lv(skill.id)][2]
- prof += (skill.styp_prof[1] * mult)
- else
- prof += skill.styp_prof[1]
- end
- end
- return prof
- end
- #--------------------------------------------------------------------------
- # Apply Element Proficiency Mod
- #--------------------------------------------------------------------------
- def apply_element_profic(item,user)
- return 1.0 unless user.is_a?(Game_Actor)
- prof = 1.0
- user.skills.each do |skill|
- next unless skill != nil
- next unless skill.elem_prof[0] != 0
- next unless item.damage.element_id == skill.elem_prof[0]
- if $D13x[:Skill_Lv]
- mult = Skill_Levels::Exp_Set[skill.exp_set][user.skills_lv(skill.id)][2]
- prof += (skill.elem_prof[1] * mult)
- else
- prof += skill.elem_prof[1]
- end
- end
- return prof
- end
- #--------------------------------------------------------------------------
- # Apply Weapon Proficiency Mod
- #--------------------------------------------------------------------------
- def apply_weapon_profic(item,user)
- return 1.0 unless user.is_a?(Game_Actor)
- return 1.0 unless item.is_a?(RPG::Skill)
- prof = 1.0
- user.skills.each do |skill|
- next unless skill != nil
- next unless skill.weap_prof[0] != 0
- user.weapons.each do |wep|
- next unless wep != nil
- next unless skill.weap_prof[0] == wep.wtype_id
- if $D13x[:Skill_Lv]
- mult = Skill_Levels::Exp_Set[skill.exp_set][user.skills_lv(skill.id)][2]
- prof += (skill.weap_prof[1] * mult)
- else
- prof += skill.weap_prof[1]
- end
- end
- end
- return prof
- end
- end
- #==============================================================================#
- # http://dekitarpg.wordpress.com/ #
- #==============================================================================#
- end # if true # << Make true to use this script, false to disable.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement