Started by akkrin, September 19, 2008, 02:23:45 pm
Quote from: Kukulkan on September 19, 2008, 06:39:57 pmScript request are to be posted on the script requests forum.
Quote from: akkrin on September 20, 2008, 11:33:19 amThanks but there is one problem I can't find that piece of code, is it in one of blizzard's scripts or is it just in the original ones and I just can't find it for some reason?
def attack_effect(attacker) # Clear critical flag self.critical = false # First hit detection hit_result = (rand(100) < attacker.hit) # If hit occurs if hit_result == true # Calculate basic damage atk = [attacker.atk - self.pdef / 2, 0].max self.damage = atk * (20 + attacker.str) / 20 # Element correction self.damage *= elements_correct(attacker.element_set) self.damage /= 100 # If damage value is strictly positive if self.damage > 0
self.damage = atk * (20 + attacker.str) / 20
self.damage = (atk + 1) * (20 + attacker.str) / 20
Quote from: akkrin on September 20, 2008, 12:34:11 pmwhat exactly do you mean by save. i'm not exactly sure. Kind of a noob when it comes to scripting.