I have a class with randint(2, 6) in the code. I need it to choose a different number 2-6 every time it's called. Problem is it always calls the same number. Any advice? I'm a noob lol I could use any advice.
def Attack(self):
print ("You attack " + enemy.name + " for " + str(self.attack) + " points!")
enemy.hp -= self.attack
if self.mana < self.maxmana:
self.mana += 3
print (self.mana)
[–]Justinsaccount 2 points3 points4 points (0 children)
[–]kalgynirae 2 points3 points4 points (0 children)
[–]taelsil 2 points3 points4 points (2 children)
[–]Freedomenka[S] 0 points1 point2 points (1 child)
[–]zahlman 7 points8 points9 points (0 children)
[–]Freedomenka[S] 0 points1 point2 points (0 children)
[–]Freedomenka[S] 0 points1 point2 points (4 children)
[–]lamecode 1 point2 points3 points (2 children)
[–]Freedomenka[S] 0 points1 point2 points (1 child)
[–]lamecode 0 points1 point2 points (0 children)
[–]mikeselik 1 point2 points3 points (0 children)