Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- # ** Game_BattlerBase
- #------------------------------------------------------------------------------
- # This base class handles battlers. It mainly contains methods for calculating
- # parameters. It is used as a super class of the Game_Battler class.
- #==============================================================================
- class Game_BattlerBase
- #--------------------------------------------------------------------------
- # * Get Rate of Change Due to Parameter Buff/Debuff
- #--------------------------------------------------------------------------
- def additive_buff_rate(param_id)
- @buffs[param_id] * 0.25
- end
- #--------------------------------------------------------------------------
- # * Get Rate of Parameter Change
- #--------------------------------------------------------------------------
- def additive_param_rate(param_id)
- features_with_id(FEATURE_PARAM, param_id).inject(0.0) {|r, ft| r += (ft.value - 1.0) }
- end
- #--------------------------------------------------------------------------
- # * Get Parameter
- #--------------------------------------------------------------------------
- def param(param_id)
- value = param_base(param_id) + param_plus(param_id)
- value += param_base(param_id) * additive_param_rate(param_id)
- value += param_base(param_id) * additive_buff_rate(param_id)
- [[value, param_max(param_id)].min, param_min(param_id)].max.to_i
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement