Asci/rpg_maker/sample.py

63 lines
1.9 KiB
Python
Raw Normal View History

2021-08-13 17:32:55 +02:00
from asci_lib import *
maps = (
r"""
__
/ \___ ### *
|<> \ ##### _
|^|____| ### / \
/_\ |^| *
__ __
## / \___/ \ ##
#### |<> <>| ####
## |___|^|___| ##
|| ||""",
(r"""
+------------------------------+
| |
| |
| * |
2021-08-13 17:32:55 +02:00
| |
| |
2021-08-13 23:57:43 +02:00
+--|^|-------------------------+
""", (1, 3), (4, 6))
2021-08-13 17:32:55 +02:00
)
2021-08-13 22:32:36 +02:00
def get_dialogue(xp, pv, current_map, x, y, stat):
coords = (x, y)
2021-08-13 17:32:55 +02:00
2021-08-13 22:32:36 +02:00
if current_map == 0:
if coords == (16, 1): return {
2021-08-14 12:36:59 +02:00
0: [1, "Hey, bienvenue dans la map de test d'Asci !", False],
1: [0, "Comment vas-tu aujourd'hui ? 1. Tres bien, merci ! Et vous-meme ? 2. La ferme le vieux ! ", True],
2: [4, "Je vais bien ^.^", False],
3: [0, "Oh, insultant personnage !", False],
2021-08-13 17:32:55 +02:00
2021-08-14 12:36:59 +02:00
6: [0, "Belle journée, n'est-ce pas ?", False],
2021-08-13 22:32:36 +02:00
2021-08-14 12:36:59 +02:00
"base": [0, "Bonjour, besoin d'aide ?", False],
2021-08-13 22:32:36 +02:00
}
2021-08-13 17:32:55 +02:00
2021-08-13 23:57:43 +02:00
elif coords == (24, 4):
2021-08-14 12:36:59 +02:00
if pv >= 100: return [0, "Tsst, est-ce que je tape sur des gens moi ? Bah alors ? J'ai panse tes plaies, mais fait gaffe a toi...", False, 50]
else: return [0, "Tu es en pleine forme !", False]
2021-08-13 23:57:43 +02:00
2021-08-13 22:32:36 +02:00
elif current_map == 1:
2021-08-13 23:57:43 +02:00
if coords == (4, 3): return {
2021-08-14 12:36:59 +02:00
3: [0, "Tsst, tu as encore insulte quelqu'un ? 1. Oui... 2. Hein ? Quoi ?", True],
4: [0, "C'est pas tres malin, tu sais ?", False],
5: [0, "Je n'aime pas les menteurs. Sort de chez moi.", False],
2021-08-13 17:32:55 +02:00
2021-08-14 12:36:59 +02:00
"base": [0, "Oui ?", False]
2021-08-13 22:32:36 +02:00
}
2021-08-13 17:32:55 +02:00
2021-08-14 12:36:59 +02:00
return [0, "Hmmm ?", False]
2021-08-13 22:32:36 +02:00
2021-08-13 17:32:55 +02:00
def start():
2021-08-13 22:32:36 +02:00
my_game = Asci(maps, get_dialogue, 10, 0)
2021-08-13 17:32:55 +02:00
my_game.mainloop()