10-24-2010, 10:37 PM
Error on line 90.
Code:
#--------------------------------------------------------------------------
# * Applying Normal Attack Effects
# attacker : battler
#--------------------------------------------------------------------------
def attack_effect(attacker)
# Clear critical flag
self.critical = false
# First hit detection
hit_result = ((rand(100)) < ((50 + (self.agi + self.dex) - (attacker.dex + attacker.int))
hit = self.cant_evade? ? 100 : hit
# If hit occurs
if hit_result == true
# Calculate basic damage
min = [attacker.atk + attacker.str + attacker.int]
max = [attacker.atk + attacker.str + attacker.str]
atk = (rand(max - min) + min)
self.damage = atk
# Element correction
self.damage *= elements_correct(attacker.element_set)
self.damage /= 100
# If damage value is strictly positive
if self.damage > 0
# Critical correction
if rand(100) < (attacker.agi + attacker.int)
self.damage *= (((attacker.str + attacker.int + attacker.agi)/100)+1)
self.critical = true
end
# Guard correction
if self.guarding?
self.damage /= 2
end
end
end
# If hit occurs
if hit_result == true
# State Removed by Shock
remove_states_shock
# Substract damage from HP
self.hp -= self.damage
# State change
@state_changed = false
states_plus(attacker.plus_state_set)
states_minus(attacker.minus_state_set)
# When missing
else
# Set damage to "Miss"
self.damage = "Miss"
# Clear critical flag
self.critical = false
end
# End Method
return true
end