Browse Source

3.141592653589793238462643383279502884197169399375

sql_version 424a9cdf0d
BARRAUX Arthur 2 years ago
parent
commit
424a9cdf0d
  1. BIN
      bdd.db
  2. 10
      cli.py
  3. 7
      main.py

BIN
bdd.db

Binary file not shown.

10
cli.py

@ -1,6 +1,7 @@
import os
import platform
import shutil
import time
""" ANSI color codes """
@ -131,3 +132,12 @@ class Layer():
self.cli.screen[self.y+i][self.x+j] = ' '
except:
pass
if __name__ == '__main__':
"""Exemple d'affichage de Hello World"""
gui = Cli()
gui.draw("Hello World", 10, 5, color="YELLOW")
time.sleep(1)
Layer(15, 5, ["World"]).refresh()
gui.display()

7
main.py

@ -270,7 +270,7 @@ class App:
ennemi = random.randint(0, 3)
cat = ['guerrier', 'elfe', 'magicien', 'voleur']
self.opponent[ennemi].__init__(self.opponent[ennemi].nom, 120, 5, cat[ennemi], random.randint(max(1, self.character.xp - 2), self.character.xp+1, True))
self.opponent[ennemi].__init__(self.opponent[ennemi].nom, 120, 5, cat[ennemi], random.randint(max(1, self.character.xp - 2), self.character.xp+1), True)
self.opponent[ennemi].change_max_pdv(20 + 5 * (self.opponent[ennemi].xp-1))
self.opponent[ennemi].change_pdv(self.opponent[ennemi].max_pdv - self.opponent[ennemi].pdv)
self.opponent[ennemi].move(-40, 0, 4)
@ -295,9 +295,10 @@ class App:
self.character.add_potion()
ennemi = random.randint(0, 3)
self.opponent[ennemi].__init__(self.opponent[ennemi].nom, 120, 5, random.randint(max(self.character.xp - 3, 1), self.character.xp+1), True)
cat = ['guerrier', 'elfe', 'magicien', 'voleur']
self.opponent[ennemi].__init__(self.opponent[ennemi].nom, 120, 5, cat[ennemi], random.randint(max(self.character.xp - 3, 1), self.character.xp+1), True)
self.opponent[ennemi].change_max_pdv(20 + 5 * (self.opponent[ennemi].xp-1))
self.opponent[ennemi].change_pdv(self.opponent[ennemi].max_pdv - self.opponent[ennemi].max_pdv)
self.opponent[ennemi].change_pdv(self.opponent[ennemi].max_pdv - self.opponent[ennemi].pdv)
self.opponent[ennemi].move(-40, 0, 4)
return ennemi
else:

Loading…
Cancel
Save