#-----------------------------Aperion_System----------------------------------#
#Questo script crea un limite ai danni massimi e crea la possibilità di rompere
#questo limite equipaggiando delle armi.
#Il limite non viene imposto ai nemici.
#Lo stesso vale con gli Hp e gli Sp con le armature.
#Script creato da Valentino Avon, se lo utilizzate creditatemi ;)
#---------------------------Configurazione------------------------------------
#danno massimo senza danni aperion
LIMIT_DAMAGE = 9999
#danno massimo possibile (anche con i danni aperion)
MAX_DAMAGE = 99999
#id delle weapon che infliggono danni aperion
W_DANNI_APERION = [1]
#id delle armature che permettono di rompere il limite di vita massima
A_HP_APERION = [1]
#id delle armature che permettono di rompere il limite di Sp massimi
A_SP_APERION = [5]
#Hp massimi senza Hp aperion
LIMIT_HP = 9999
#Hp massimi possibili (anche con Hp aperion)
MAX_HP = 99999
#Sp massimi senza Sp aperion
LIMIT_SP = 999
#Sp massimi possibili (anche con Sp aperion)
MAX_SP = 9999
#-------------------------------Script-------------------------------------
class Game_Battler
alias vale_attack attack_effect
def attack_effect(attacker)
vale_attack(attacker)
if self.damage.is_a?(Numeric)
if attacker.is_a?(Game_Actor) and attacker.weapon_id != nil
unless W_DANNI_APERION.include?(attacker.weapon_id)
self.damage = LIMIT_DAMAGE if self.damage > LIMIT_DAMAGE
end
elsif attacker.is_a?(Game_Actor) and attacker.weapon_id == nil
if self.damage > LIMIT_DAMAGE
self.damage = LIMIT_DAMAGE
end
end
self.damage = MAX_DAMAGE if self.damage > MAX_DAMAGE
end
end
alias vale_skill skill_effect
def skill_effect(user, skill)
vale_skill(user, skill)
if self.damage.is_a?(Numeric)
if user.is_a?(Game_Actor) and user.weapon_id != nil
unless W_DANNI_APERION.include?(user.weapon_id)
self.damage = LIMIT_DAMAGE if self.damage > LIMIT_DAMAGE
end
elsif user.is_a?(Game_Actor) and user.weapon_id == nil
if self.damage > LIMIT_DAMAGE
self.damage = LIMIT_DAMAGE
end
end
self.damage = MAX_DAMAGE if self.damage > MAX_DAMAGE
end
end
end
class Game_Actor
def maxhp
n = [[base_maxhp + @maxhp_plus, 1].max, MAX_HP].min
for i in @states
n *= $data_states[i].maxhp_rate / 100.0
end
@aperion_hp = false
armor = [@armor1_id, @armor2_id, @armor3_id, @armor4_id]
for id in armor
if A_HP_APERION.include?(id)
@aperion_hp = true
end
end
n = [[Integer(n), 1].max, MAX_HP].min if @aperion_hp
n = [[Integer(n), 1].max, LIMIT_HP].min unless @aperion_hp
return n
end
def maxsp
n = [[base_maxsp + @maxsp_plus, 0].max, MAX_SP].min
for i in @states
n *= $data_states[i].maxsp_rate / 100.0
end
@aperion_sp = false
armor = [@armor1_id, @armor2_id, @armor3_id, @armor4_id]
for id in armor
if A_SP_APERION.include?(id)
@aperion_sp = true
end
end
n = [[Integer(n), 1].max, MAX_SP].min if @aperion_sp
n = [[Integer(n), 1].max, LIMIT_SP].min unless @aperion_sp
return n
end
end