And I see this:
atk = [attacker.atk - self.pdef / 2, 0].max
I understand the formula except for the last part of it, what does the 0 means?
what does the max means?
Next are those two things:
# Dispersion
if self.damage.abs > 0
amp = [self.damage.abs * 15 / 100, 1].max
self.damage += rand(amp+1) + rand(amp+1) - amp
end
# Second hit detection
eva = 8 * self.agi / attacker.dex + self.eva
hit = self.damage < 0 ? 100 : 100 - eva
hit = self.cant_evade? ? 100 : hit
hit_result = (rand(100) < hit)
What is disperson?
And does "second hit" calculate whether the hit missed or not?
atk = [attacker.atk - self.pdef / 2, 0].max
I understand the formula except for the last part of it, what does the 0 means?
what does the max means?
Next are those two things:
# Dispersion
if self.damage.abs > 0
amp = [self.damage.abs * 15 / 100, 1].max
self.damage += rand(amp+1) + rand(amp+1) - amp
end
# Second hit detection
eva = 8 * self.agi / attacker.dex + self.eva
hit = self.damage < 0 ? 100 : 100 - eva
hit = self.cant_evade? ? 100 : hit
hit_result = (rand(100) < hit)
What is disperson?
And does "second hit" calculate whether the hit missed or not?