This commit is contained in:
mibi88 2023-01-06 23:38:48 +01:00
parent 6df1c8129f
commit 4bec33fb39
1 changed files with 82 additions and 0 deletions

82
SCIITEST.py Normal file
View File

@ -0,0 +1,82 @@
from LIBSCII import *
map0 = """
########################################################
# ________ \|/ #
# | ) | _|_ #
# |_)____| \_/ ______ #
# ^ [==-==-] _ #
# <=> [-===-=] // #
# / \ [==-==-] <=// #
# | || #
########################################################
"""
def npc_collision(self, npc):
if npc["name"] == "lephenixnoir":
self.show_text("""C'est moi, Lephe',
Je suis aussi dans le jeu !""")
if npc["name"] == "massena":
txt = self.ask_choice("""T'as besoin d'aide pour des pixel arts ?""", ["Oui", "Non"])
if txt == 1:
self.show_text("""Merci !""")
else:
self.show_text("""Dommage""")
world = {
"dmode": STICKY,
"map_num": 0,
"maps": [
{
"layers": [
{
"data": map0,
"transp_char": None
}
],
"jumps": [
{
"x": 4,
"y": 4,
"to_x": 1,
"to_y": 1,
"to_map": 0,
"isactive": 1
}
]
}
],
"npc": [
{
"x": 35,
"y": 1,
"isvisible": 1,
"collision_check": 1,
"layer": 0,
"map": 0,
"char": '&',
"name": "massena"
},
{
"x": 35,
"y": 6,
"isvisible": 1,
"collision_check": 1,
"layer": 0,
"map": 0,
"char": '&',
"name": "lephenixnoir"
}
]
}
player = {
"x": 3,
"y": 4,
"isvisible": 1,
"collision_check": 1,
"layer": 0,
"playerc": '@'
}
scii = Scii(world, player, npc_collision)
scii.mainloop()