2022-01-02 17:43:38 +01:00
|
|
|
from asci import *
|
2021-08-14 17:13:34 +02:00
|
|
|
|
2021-10-31 21:28:48 +01:00
|
|
|
carte_monde = ((
|
2021-08-14 17:13:34 +02:00
|
|
|
r"""
|
|
|
|
_ ###
|
|
|
|
/o\__ #####
|
|
|
|
| <>\ ###
|
|
|
|
|____| /_\
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
|
2021-10-31 21:28:48 +01:00
|
|
|
|==|==|==|==|==|==|==|""",),)
|
|
|
|
|
2021-08-14 17:13:34 +02:00
|
|
|
|
|
|
|
|
2021-08-30 14:51:24 +02:00
|
|
|
def pnj(data, stat):
|
|
|
|
xp, carte_actuelle, x, y = data
|
2021-08-14 17:13:34 +02:00
|
|
|
coords = (x, y)
|
|
|
|
|
|
|
|
if carte_actuelle == 0:
|
|
|
|
if coords == (2, 5): return {
|
|
|
|
0: [0, "Mon bon monsieur, vous n'auriez pas quelques sous pour moi ? 1. He non mon brave... 2. Mais si, bien sur, tenez.", 2],
|
|
|
|
1: [2, "Radin !"],
|
2021-08-30 15:38:11 +02:00
|
|
|
# 0 réponse possibles, -1 Argent
|
2021-08-30 15:52:19 +02:00
|
|
|
2: [1, "Merci !", 0, (1, -1)],
|
2021-08-14 17:13:34 +02:00
|
|
|
|
|
|
|
"base": [0, "Hmm ?"]
|
|
|
|
}
|
|
|
|
|
|
|
|
return [0, "Hmm ?"]
|
|
|
|
|
|
|
|
|
2021-10-31 21:28:48 +01:00
|
|
|
def affichage_stat(data, stat):
|
2021-11-01 09:36:13 +01:00
|
|
|
pv, argent = stat
|
2021-08-14 17:13:34 +02:00
|
|
|
print("Statistiques")
|
|
|
|
print("PV : {}".format(pv))
|
|
|
|
print("Argent : {}".format(argent))
|
2021-08-25 22:56:21 +02:00
|
|
|
input()
|
2021-08-14 17:13:34 +02:00
|
|
|
|
2021-08-25 22:56:21 +02:00
|
|
|
|
|
|
|
evenements = {"*": pnj}
|
|
|
|
touche = {6: affichage_stat}
|
2021-08-15 17:27:58 +02:00
|
|
|
|
2021-08-14 17:13:34 +02:00
|
|
|
|
|
|
|
def mon_jeu():
|
2021-08-25 22:56:21 +02:00
|
|
|
rpg_python = Asci(carte_monde, evenements, touche)
|
2021-11-01 09:36:13 +01:00
|
|
|
rpg_python.mainloop(4, stat=[100, 5])
|