=begin
#==============================================================================
** Feature: Skill Power Modifier
Author: Hime
Date: Oct 13, 2012
------------------------------------------------------------------------------
** Change log
Oct 13, 2012
- initial release
------------------------------------------------------------------------------
** Terms of Use
* Free to use in non-commercial projects
* Contact me for commercial use
* No real support. The script is provided as-is
* Will do bug fixes, but no compatibility patches
* Features may be requested but no guarantees, especially if it is non-trivial
* Preserve this header
------------------------------------------------------------------------------
** Required
-Feature Manager
(http://xtsukihime.wordpress.com/2012/10/13/feature-manager/)
-Core: Damage Processing
(http://xtsukihime.wordpress.com/2012/10/13/core-damage-processing/)
------------------------------------------------------------------------------
Allows you to increase the damage of a specific skill by some percentage
when an item is equipped
Tag your equip with
<ft: skill_power skill_id mod>
Where
skill_id is the ID of the skill
mod is the damage modifier
0 is no increase
0.1 is a 10% increase
-0.1 is a 10% decrease
If you have multiple skill power multipliers, they are additive.
For example, if one equip increases Blaze by 10% and another equip
increases Blaze by 30%, then the total increase is 40%
#==============================================================================
=end
$imported = {} if $imported.nil?
$imported["Feature_SkillPower"] = true
#==============================================================================
# ** Rest of the script
#==============================================================================
module Features
module Skill_Power
FeatureManager.register(:skill_power)
end
end
class RPG::EquipItem
def add_feature_skill_power(code, data_id, args)
data_id = args[0].to_i
value = args[1].to_f
add_feature(code, data_id, value)
end
end
class Game_Battler < Game_BattlerBase
alias :ft_skill_power_dmg_mods :apply_damage_modifiers
def apply_damage_modifiers(user, item, value)
value *= apply_skill_power_modifier(user, item, value) if item.is_a?(RPG::Skill)
return ft_skill_power_dmg_mods(user, item, value)
end
def apply_skill_power_modifier(user, item, value)
mult = user.features_sum(:skill_power, item.id) + 1
return mult
end
end