module Poison_Setup
#--------------------------------------------------------------------------
# * Posion Damage Formulas
# - syntax: state_id => string
# - Note: see Game_Battler 1 for variables for (stat) based damage
#--------------------------------------------------------------------------
Formula = {
}
#--------------------------------------------------------------------------
# * Default Formula (10% Max Hp)
#--------------------------------------------------------------------------
Formula.default = 'self.maxhp / 10'
#--------------------------------------------------------------------------
# * Variance
# - syntax: state_id => variance
#--------------------------------------------------------------------------
Variance = {
}
#--------------------------------------------------------------------------
# * Default Variance
#--------------------------------------------------------------------------
Variance.default = 15
end
class Game_Battler
#--------------------------------------------------------------------------
# * Application of Slip Damage Effects
#--------------------------------------------------------------------------
def slip_damage_effect
# Declare State ID a local variable
state_id = 0
# Run Through and if slip damage break
@states.each {|state_id| break if $data_states[state_id].slip_damage}
# Set damage
self.damage = eval(Poison_Setup::Formula[state_id]).to_i
# Dispersion
if self.damage.abs > 0
variance = Poison_Setup::Variance[state_id].to_i
amp = [self.damage.abs * variance / 100, 1].max
self.damage += rand(amp+1) + rand(amp+1) - amp
end
# Subtract damage from HP
self.hp -= self.damage
# End Method
return true
end
end