2023-01-06 23:38:48 +01:00
|
|
|
from LIBSCII import *
|
|
|
|
|
|
|
|
map0 = """
|
|
|
|
########################################################
|
|
|
|
# ________ \|/ #
|
|
|
|
# | ) | _|_ #
|
|
|
|
# |_)____| \_/ ______ #
|
|
|
|
# ^ [==-==-] _ #
|
|
|
|
# <=> [-===-=] // #
|
|
|
|
# / \ [==-==-] <=// #
|
|
|
|
# | || #
|
|
|
|
########################################################
|
|
|
|
"""
|
|
|
|
|
2023-01-07 20:05:11 +01:00
|
|
|
portrait = """
|
|
|
|
___
|
|
|
|
/\\/\\\\
|
|
|
|
\\. ./
|
|
|
|
/ \\
|
|
|
|
"""
|
|
|
|
|
2023-01-08 12:20:03 +01:00
|
|
|
animations = {
|
|
|
|
"replace_animations": {
|
|
|
|
'-': {
|
|
|
|
"frames": ['=', '-'],
|
|
|
|
"animation_frame": 0
|
|
|
|
},
|
|
|
|
'=': {
|
|
|
|
"frames": ['-', '='],
|
|
|
|
"animation_frame": 0
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"coords_animations": {
|
|
|
|
"4, 4": {
|
|
|
|
"frames": ['^', ' '],
|
|
|
|
"animation_frame": 0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-06 23:38:48 +01:00
|
|
|
def npc_collision(self, npc):
|
2023-01-07 20:05:11 +01:00
|
|
|
global portrait
|
2023-01-06 23:38:48 +01:00
|
|
|
if npc["name"] == "lephenixnoir":
|
|
|
|
self.show_text("""C'est moi, Lephe',
|
2023-01-07 20:05:11 +01:00
|
|
|
Je suis aussi dans le jeu !""", portrait)
|
2023-01-06 23:38:48 +01:00
|
|
|
if npc["name"] == "massena":
|
2023-01-07 20:05:11 +01:00
|
|
|
txt = self.ask_choice("T'as besoin d'aide pour des pixel arts ?", ["Oui", "Non"])
|
2023-01-06 23:38:48 +01:00
|
|
|
if txt == 1:
|
2023-01-07 20:05:11 +01:00
|
|
|
self.show_text("Merci !")
|
2023-01-06 23:38:48 +01:00
|
|
|
else:
|
2023-01-07 20:05:11 +01:00
|
|
|
self.show_text("Dommage")
|
2023-01-06 23:38:48 +01:00
|
|
|
|
|
|
|
world = {
|
|
|
|
"dmode": STICKY,
|
|
|
|
"map_num": 0,
|
|
|
|
"maps": [
|
|
|
|
{
|
|
|
|
"layers": [
|
|
|
|
{
|
|
|
|
"data": map0,
|
2023-01-08 12:20:03 +01:00
|
|
|
"transp_char": None,
|
|
|
|
"animations": animations
|
2023-01-06 23:38:48 +01:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"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()
|