Compare commits
3 Commits
43af744569
...
e3853d453e
Author | SHA1 | Date |
---|---|---|
Shadow15510 | e3853d453e | |
Shadow15510 | b280dd80a7 | |
Shadow15510 | e5b2c7f5ff |
|
@ -1,142 +0,0 @@
|
|||
alfheim = (r"""
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~ ~~~~ ~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~ ~~~~~~ ## ~~~~~~~~~~~~ ~~~~~~~~ ~~~~~~~~~~~~~~~
|
||||
~~~~~ ~~~~~~~ #### ~~~~~~~ ## ~~~~~~~~
|
||||
~~~ ~~~~~ || ~~~~~~~ #### __ ## ~~~~~~~
|
||||
~~~ ~~~~~~~~ ## ~~~~~ ## || /[]\ #### ~~~~~
|
||||
~~~ ~~~~~~~~~~~~ #### ## ## #### ` ' |__| || __ ~~~
|
||||
~~~ ~~~~~~~~~~~~ ## || #### #### || ,' '.' / \ ~~~
|
||||
~~~ ~~~~~ ~~~~ #### || || ` ' __ '`' . ` |__| ~~
|
||||
~~~ ## ~~~ || '' /[]\ ' . ## ~~
|
||||
~~ #### ## _ _________________ |__| ## `.` #### ~~
|
||||
~~ || #### / \ / |]O[| |]O[| \ #### __ || ~~
|
||||
~~~~ || |_| /___________________\ ## ## || /[]\ ~~
|
||||
~~~~ ## _ |_/ \_/ _ \_/ \_| ## ## |__| ## ~~~~
|
||||
~~~~ #### / \ |_| |_|/^\|_| |_| __ #### ~~~~
|
||||
~~~~ || _ |_| ## ## / \ `' || ~~~~
|
||||
~~~~ / \ ### ### ## ## |__| . , ~~~~
|
||||
~~~~~~~~~ |_| _ ##### ##### `' `_ ,, , ~~~
|
||||
~~~~~~~~~ /o\ ### ### ' _ ``' / \ ~~~
|
||||
~~~~~~~~~~~ |_| /-\ /-\ , / \ |_| ~~~~ ~~~
|
||||
~~~~~~~~~~~~ ### ### ' ,|_| .' _ ~~~~~ ~~~
|
||||
~~~~~~ ~~~~~~~ ### ##### ` ##### . ` .,. / \ ~~~~~ ~~~
|
||||
~~~~~ ~~~~~~~ ##### ### ' ### _ ` , _ |_| _ ~~~~~~ ~~~
|
||||
~~~~~ __ ~~ ### /-\ /-\ ` / \ , /o\ / \ ~~~~~~~~~~
|
||||
~~~~~~ / \ /-\ ' . '``,'' |_|` |_| |_| ~~~~~~~~~~
|
||||
~~~~~~ |__| ,. ' .` ', ~~~~~~~~~~
|
||||
~~~~~~ __ ### ., _ . , _ ,. ~~~~~~~~~~
|
||||
~~~~~~~~ / \ ##### ### / \ ` ' /o\__ `. ~~~~~~~~~
|
||||
~~~~~~~~~ |__| ### ##### ### |_| . |_ o \==| .'`. ~~~~~~~
|
||||
~~~~~~~~~~~~ ### /-\ ### ##### ,.` ||^|__| | . . ~~~~~~~
|
||||
~~~~~~~~~~~~ ##### /-\ ### | .' ~~~~~~
|
||||
~~~~~~~~~~~~~ ##### ### /-\ ### ### | ,`','` '',, ~~~~~~
|
||||
~~~~~~~~~~~ ### ##### ### ##### ##### |==|==|==| ~~~~~
|
||||
~~~~~~~~~~ ### |_| ##### ##### ### ### _ ~~~~~
|
||||
~~~~~~~~~ ##### ### ##### /-\ /-\ ### _ / \ _ ~~~~
|
||||
~~~~~~~~~ ##### |_| ### ### ##### / \ |_| / \ ~~~~
|
||||
~~~~~~~~~ ### |_| ##### ### ### |_| |_| ~~~~
|
||||
~~~~~~~ |_| ~~~~~~~ ##### ##### /-\ _ ~~~~
|
||||
~~~~~~~ ~~~~~~~~~~~~~~~~~~ ### ##### / \ _ ~~~~
|
||||
~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~ |_| ### |_| / \ _ ~~~~
|
||||
~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~ |_| |_| / \ ~~~~
|
||||
~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~ |_| ~~~~
|
||||
~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~ ~~~
|
||||
~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~ ~~~~~~
|
||||
~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~
|
||||
~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~ #### #### ~~~~~~~~~~~~
|
||||
~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~ ### ### ~~~~~~~~~~~~
|
||||
~~~~~~~~~~ __ ~~~~~~~~~~~~~~~~~~~~ __ ### ## ## ~~~~~~~~~~~~
|
||||
~~~~~~~~~~ / \ ~~~~~~~~~~~~~~~~~~~~ / \ ##### ~~~~~~ ~~~~
|
||||
~~~~~~~~~~ |__| ~~~~~~~~~~~~~ |__| ##### ## ## ~~~~~ ~~~~
|
||||
~~~~~~~~~~ ### ~~~~~~~~ ### ### ### ~~ ~~~~
|
||||
~~~~~~~~~ ##### ,'' |_| #### #### ~~~
|
||||
~~~~~~~~ ##### ' ### ,,,. ### ~~~
|
||||
~~~~~~~~ ### ### ##### `,, ##### ~~~
|
||||
~~~~~~~ |_| . ##### ##### ',, __ ### ##### ~~~
|
||||
~~~~~~ ### ,##### ### ` / \ ### ##### ### ~~~
|
||||
~~~~~~ ##### ### , ### |_|`' ### |__| ##### ##### |_| ~~~
|
||||
~~~~~~ ##### #####``|_| ### ` ##### ##### ### ~~~
|
||||
~~~~~~ ### ##### ' ##### ##### ### |_| ### ~~~
|
||||
~~~~~~ |_| ### ,' ##### ### |_| ##### ~~~
|
||||
~~~~~~ ## |_| ` ### |_| ~~ ##### ~~~
|
||||
~~~~~ ## #### ` |_| ~~~~ ~~~~ ### ~~~
|
||||
~~~~ #### || . ~~~~~~~ ~~~~~~ ~~~~~~~~ |_| ~~~
|
||||
~~~~~ ## || ,` ' ~~~~~~~~~~~~~~~ ~~~~~~ ~~~~~~~~ ~~~
|
||||
~~~~ #### _ ~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~ ~~~~~~~~~~~ ~~~
|
||||
~~~~~ || /-\ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~ ~~~~
|
||||
~~~~~~ ~ |_| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~ ~~~~~
|
||||
~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~""",
|
||||
# Autres mondes (Alfheim = 2)
|
||||
(14, 68, 1, 28, 13), # Vanaheim
|
||||
|
||||
# Maisons
|
||||
(34, 16, 23, 25, 19),
|
||||
(52, 31, 24, 20, 19), # Librairie
|
||||
)
|
||||
|
||||
|
||||
h_23 = (r"""
|
||||
|==================|
|
||||
| |
|
||||
| _ _ |
|
||||
| / \ / \ |
|
||||
| \_/ \_/ |
|
||||
| |_| |_| |
|
||||
| |
|
||||
| _ _ |
|
||||
| / \ / \ |
|
||||
| \_/ \_/ |
|
||||
|===========| |_| |_| |===========|
|
||||
| |
|
||||
| |
|
||||
| _ _ |
|
||||
|__ __ / \ / \ __ __|
|
||||
/ \ / \ \_/ \_/ / \ / \
|
||||
\__/ \__/ |_| |_| \__/ \__/
|
||||
| | | | | | | |
|
||||
| | | | | | | |
|
||||
/ \______/ \_______|^|______/ \______/ \ """,
|
||||
(25, 19, 2, 34, 16))
|
||||
|
||||
|
||||
h_24 = (r"""
|
||||
|====|_|======| |=====|_|====|
|
||||
| /___\ | | /___\ |
|
||||
| |===| |===========| |===| |
|
||||
| | | |
|
||||
| +---+ | _ _ | +---+ |
|
||||
| | | | (~) (~) | | | |
|
||||
| | | | |_| |_| | | | |
|
||||
| | | | | |
|
||||
| +---+ +---+ |
|
||||
| | _ _ | |
|
||||
|=============| (~) (~) |============|
|
||||
| | |_| |_| | |
|
||||
| |
|
||||
| |
|
||||
| | _ _ | |
|
||||
|=============| (~) (~) |============|
|
||||
|=============| |_| |_| |============|
|
||||
| |
|
||||
|====| |====|
|
||||
|====|^|====| """,
|
||||
(20, 19, 2, 52, 31))
|
||||
|
||||
alfheim_entities = (
|
||||
[0, '?', 2, 34, 20, 'stand by'],
|
||||
["alfeim_charretier", '*', 2, 23, 17, 'stand by'],
|
||||
[0, '*', 2, 11, 4, 'stand by'],
|
||||
[0, '*', 2, 46, 6, 'stand by'],
|
||||
[0, '*', 2, 27, 54, 'stand by'],
|
||||
["Sagriel", '*', 23, 23, 5, 'stand by'],
|
||||
["Diomwar", '*', 24, 36, 12, 'stand by'],
|
||||
[0, '*', 24, 12, 3, 'stand by'],
|
||||
)
|
|
@ -1,467 +0,0 @@
|
|||
# Asci (1.8.2)
|
||||
|
||||
class Asci:
|
||||
def __init__(self, maps, entities, events_mapping, keys_mapping, behaviors=None, screen_width=21, screen_height=7):
|
||||
# Load maps and entities
|
||||
self.maps = [Map(*i) for i in maps]
|
||||
self.entities = {}
|
||||
entity_id = 0
|
||||
for i in entities:
|
||||
if not i[0]:
|
||||
i[0] = entity_id
|
||||
entity_id += 1
|
||||
|
||||
if i[0] in self.entities: raise KeyError("'{}' is already a registered entities".format(i[0]))
|
||||
else: self.entities[i[0]] = Entity(*i)
|
||||
|
||||
# Custom functions
|
||||
self._legend = list(events_mapping.keys())
|
||||
self._game_events_mapping = [events_mapping[i] for i in self._legend]
|
||||
self._game_keys_mapping = {key: keys_mapping[key] for key in keys_mapping if not key in (1, 2, 3, 5)}
|
||||
|
||||
# Custom entities behavior
|
||||
self._behaviors = {"permanent": permanent, "stand by": stand_by, "follow": follow, "walk between": walk_between, "walk to": walk_to, "follow by player": follow_by_player}
|
||||
if behaviors:
|
||||
for i in behaviors: self._behaviors[i] = behaviors[i]
|
||||
|
||||
# Screen initialisation
|
||||
self.screen = Screen(screen_width, screen_height)
|
||||
self.current_map = None
|
||||
|
||||
def _looked_case(self, direction):
|
||||
if direction == 1: # Left
|
||||
return self.data[2] - 1, self.data[3]
|
||||
|
||||
elif direction == 3: # Right
|
||||
return self.data[2] + 1, self.data[3]
|
||||
|
||||
elif direction == 5: # Up
|
||||
return self.data[2], self.data[3] - 1
|
||||
|
||||
elif direction == 2: # Down
|
||||
return self.data[2], self.data[3] + 1
|
||||
|
||||
return self.data[2], self.data[3]
|
||||
|
||||
def _cell_test(self, direction):
|
||||
if direction == 1:
|
||||
if self.data[2] - 1 < 0: return -1
|
||||
else: cell = self.screen.get_cell(self.data[2] - 1, self.data[3])
|
||||
if direction == 3:
|
||||
if self.data[2] + 1 >= self.map_width: return -1
|
||||
else: cell = self.screen.get_cell(self.data[2] + 1, self.data[3])
|
||||
if direction == 5:
|
||||
if self.data[3] - 1 < 0: return -1
|
||||
else: cell = self.screen.get_cell(self.data[2], self.data[3] - 1)
|
||||
if direction == 2:
|
||||
if self.data[3] + 1 >= self.map_height: return -1
|
||||
else: cell = self.screen.get_cell(self.data[2], self.data[3] + 1)
|
||||
|
||||
cell_patterns = self._legend
|
||||
for pattern_index in range(len(cell_patterns)):
|
||||
if cell in cell_patterns[pattern_index]: return pattern_index
|
||||
|
||||
return -1
|
||||
|
||||
def _keyboard(self, key, interaction=True):
|
||||
# Interaction while moving
|
||||
if key in (1, 3, 5, 2):
|
||||
cell_test = self._cell_test(key)
|
||||
|
||||
# Move
|
||||
if cell_test == len(self._legend) - 1:
|
||||
if key == 1: self.data[2] -= 1
|
||||
if key == 3: self.data[2] += 1
|
||||
if key == 5: self.data[3] -= 1
|
||||
if key == 2: self.data[3] += 1
|
||||
|
||||
# Change map
|
||||
elif interaction and cell_test == len(self._legend) - 2:
|
||||
new_map, self.data[2], self.data[3] = self._get_map(key)
|
||||
if self.data[1] != new_map: self._change_map(new_map)
|
||||
|
||||
# Interaction
|
||||
elif interaction and cell_test >= 0: self._interaction(key, cell_test)
|
||||
|
||||
# Custom functions
|
||||
elif key in self._game_keys_mapping:
|
||||
self.screen.clear()
|
||||
self._game_keys_mapping[key](self.data, self.stat)
|
||||
|
||||
def _get_map(self, direction):
|
||||
current_coords = self._looked_case(direction)
|
||||
|
||||
for coords in self.current_map.coords:
|
||||
if coords[:2] == current_coords:
|
||||
return coords[2], coords[3], coords[4]
|
||||
|
||||
return self.data[1], self.data[2], self.data[3]
|
||||
|
||||
def _change_map(self, new_map):
|
||||
# Update map id and data
|
||||
old_map, self.data[1] = self.data[1], new_map
|
||||
self.current_map = self.maps[self.data[1]]
|
||||
self.current_map.entities = {}
|
||||
|
||||
# Update entities
|
||||
for i in self.entities:
|
||||
entity = self.entities[i]
|
||||
if entity.map_id == old_map and entity.behavior == "follow":
|
||||
entity.pos_x = entity.pos_y = -1
|
||||
entity.map_id = new_map
|
||||
if entity.map_id == new_map: self.current_map.entities[i] = entity
|
||||
|
||||
# Update screen configuration
|
||||
self.screen.set_world(self.current_map.map_data)
|
||||
self.map_width, self.map_height = self.screen.get_map_size()
|
||||
|
||||
def _interaction(self, direction, cell_content):
|
||||
x, y = self._looked_case(direction)
|
||||
data_copy = [self.data[0], self.data[1], x, y, self.data[4]]
|
||||
|
||||
# Get the event
|
||||
event = self._game_events_mapping[cell_content](data_copy, self.stat, self.current_map.entities, self._get_entity_id(x, y))
|
||||
if type(event) == tuple:
|
||||
quest, event = event
|
||||
else:
|
||||
quest = "main"
|
||||
|
||||
# data modification
|
||||
self.data[0] = data_copy[0]
|
||||
if self.data[1] != data_copy[1]:
|
||||
self._change_map(data_copy[1])
|
||||
|
||||
if data_copy[2] != x: self.data[2] = data_copy[2]
|
||||
if data_copy[3] != y: self.data[3] = data_copy[3]
|
||||
|
||||
if not event: return
|
||||
event = read_event(self.data, event, quest)
|
||||
|
||||
# XP and stat modification
|
||||
self.data[0][quest] += event.xp
|
||||
for index, value in event.stat:
|
||||
self.stat[index] += value
|
||||
|
||||
# Display and get answer
|
||||
if event.text:
|
||||
answer_selected = convert(self.screen.display_text(event.text), True)
|
||||
if event.answer and (0 < answer_selected <= event.answer):
|
||||
self.data[0][quest] += answer_selected
|
||||
self._interaction(direction, cell_content)
|
||||
|
||||
def _get_entity_id(self, x, y):
|
||||
for entity in self.current_map.entities.values():
|
||||
if entity.pos_x == x and entity.pos_y == y:
|
||||
return entity.entity_id
|
||||
|
||||
# Mainloop
|
||||
def mainloop(self, end_game, stat=None, data=None, routine=None, low_bar=None, player="@", door="^", walkable=" ", exit_key=9, multi_move="."):
|
||||
if exit_key in self._game_keys_mapping:
|
||||
raise ValueError("'{}' is already assigned to a function.".format(exit_key))
|
||||
|
||||
# Load save ; data = [XP, map_id, x, y]
|
||||
if not stat or type(stat) != list: self.stat = [100]
|
||||
else: self.stat = stat
|
||||
|
||||
if not data: self.data = [{"main": 0}, 0, 0, 0, 0]
|
||||
else: self.data = [data[0], data[1], data[2], data[3], 0]
|
||||
|
||||
# Configuration
|
||||
self._legend.append(door)
|
||||
self._legend.append(walkable)
|
||||
self._change_map(self.data[1])
|
||||
self.screen.load_data(self.data)
|
||||
|
||||
key = 0
|
||||
|
||||
while key != exit_key and self.stat[0] > 0 and self.data[0]["main"] < end_game:
|
||||
# Update the map
|
||||
self.screen.set_screen()
|
||||
|
||||
# Compute the player's and entities' positions
|
||||
data_copy = self.data[:]
|
||||
for entity in self.current_map.entities.values():
|
||||
self._behaviors[entity.behavior](entity, data_copy, self.stat, self.screen, walkable)
|
||||
if entity.map_id == self.data[1] and (0 <= entity.pos_x - self.data[2] + 10 < self.screen.screen_width) and (0 <= entity.pos_y - self.data[3] + 3 < self.screen.screen_height):
|
||||
self.screen.set_cell(entity.pos_x, entity.pos_y, entity.symbol)
|
||||
|
||||
self.screen.set_cell(self.data[2], self.data[3], player)
|
||||
|
||||
# Display map, low bar, get the key and update key buffer
|
||||
if low_bar: bar = low_bar(self.data[:], self.stat[:])
|
||||
else: bar = None
|
||||
key = convert(self.screen.display(low_bar=bar))
|
||||
if not key: key = self.data[4]
|
||||
else: self.data[4] = key
|
||||
|
||||
# Multi-move and key gestion
|
||||
if type(key) == str and key[0] == multi_move:
|
||||
key = key[1:]
|
||||
for k, r in get_multi_move(key):
|
||||
for _ in range(r):
|
||||
self._keyboard(k, False)
|
||||
self.screen.set_screen()
|
||||
|
||||
self.data[4] = k
|
||||
else:
|
||||
self._keyboard(key)
|
||||
|
||||
# Launching the game routine
|
||||
if routine:
|
||||
data_copy = self.data[:]
|
||||
routine(data_copy, self.stat)
|
||||
|
||||
if self.stat[0] <= 0: self.stat[0] = 100
|
||||
return self.stat, self.data[:-1]
|
||||
|
||||
|
||||
# Classes used by Asci
|
||||
class Screen:
|
||||
def __init__(self, screen_width=21, screen_height=7):
|
||||
# Screen configuration
|
||||
self.screen_width = screen_width
|
||||
self.screen_height = screen_height
|
||||
self._on_screen = [[" " for _ in range(screen_width)] for _ in range(screen_height)]
|
||||
self._asci_data = []
|
||||
|
||||
def load_data(self, data):
|
||||
self._asci_data = data
|
||||
|
||||
def get_map_size(self):
|
||||
return self.map_width, self.map_height
|
||||
|
||||
def set_world(self, world):
|
||||
self._world = [[char for char in line] for line in world.split("\n")[1:]]
|
||||
self.map_width = max([len(line) for line in self._world])
|
||||
self.map_height = len(self._world)
|
||||
|
||||
def set_screen(self):
|
||||
x = self._asci_data[2] - 10 ; y = self._asci_data[3] - 3
|
||||
for x_map in range(x, x + self.screen_width):
|
||||
for y_map in range(y, y + self.screen_height):
|
||||
self._on_screen[y_map - y][x_map - x] = " "
|
||||
if 0 <= x_map < self.map_width and 0 <= y_map < self.map_height:
|
||||
try: self._on_screen[y_map - y][x_map - x] = self._world[y_map][x_map]
|
||||
except: pass
|
||||
|
||||
def display(self, return_input=True, low_bar=None):
|
||||
for line_no in range(len(self._on_screen)):
|
||||
line = "".join(self._on_screen[line_no])
|
||||
if line_no + 1 == self.screen_height and return_input:
|
||||
if not low_bar: line = line[:-6] + ">"
|
||||
else: line = low_bar + ">"
|
||||
print(line, end="")
|
||||
return input()
|
||||
else:
|
||||
print(line)
|
||||
|
||||
def clear(self):
|
||||
print("\n" * self.screen_height)
|
||||
|
||||
def display_text(self, string):
|
||||
paragraphs = [i for i in text_formater(string) if i]
|
||||
nb_par = len(paragraphs)
|
||||
for index in range(nb_par):
|
||||
self.clear()
|
||||
print(paragraphs[index])
|
||||
if index + 1 == nb_par: return input(">")
|
||||
else: input()
|
||||
|
||||
def set_cell(self, x, y, value):
|
||||
x = x - (self._asci_data[2] - 10)
|
||||
y = y - (self._asci_data[3] - 3)
|
||||
if 0 <= x < self.screen_width and 0 <= y < self.screen_height:
|
||||
self._on_screen[y][x] = value
|
||||
|
||||
def get_cell(self, x, y):
|
||||
x = x - (self._asci_data[2] - 10)
|
||||
y = y - (self._asci_data[3] - 3)
|
||||
if 0 <= x < self.screen_width and 0 <= y < self.screen_height:
|
||||
return self._on_screen[y][x]
|
||||
else: return " "
|
||||
|
||||
class Event:
|
||||
def __init__(self, xp, text, answer=0, *stat):
|
||||
self.xp = xp
|
||||
self.text = text
|
||||
self.answer = answer
|
||||
self.stat = stat
|
||||
|
||||
|
||||
class Map:
|
||||
def __init__(self, map_data, *coords):
|
||||
self.map_data = map_data
|
||||
self.coords = coords
|
||||
self.entities = {}
|
||||
|
||||
|
||||
class Entity:
|
||||
def __init__(self, entity_id, symbol, map_id, x, y, behavior, *args):
|
||||
self.entity_id = entity_id
|
||||
self.symbol = symbol
|
||||
self.map_id = map_id
|
||||
self.pos_x = x
|
||||
self.pos_y = y
|
||||
self.behavior = behavior
|
||||
self.args = list(args)
|
||||
|
||||
def change_behavior(self, new_behavior):
|
||||
if self.behavior != "permanent": self.behavior = new_behavior
|
||||
|
||||
def teleport(self, map_id, x, y):
|
||||
if self.behavio != "permanent": self.map_id, self.pos_x, self.pos_y = map_id, x, y
|
||||
|
||||
|
||||
# Functions used by Asci
|
||||
def convert(string, force_int=False):
|
||||
try: return int(string)
|
||||
except:
|
||||
if force_int: return 0
|
||||
else: return string
|
||||
|
||||
|
||||
def text_formater(string, screen_width=21, screen_height=6):
|
||||
|
||||
def line_formater(string, screen_width):
|
||||
string_result = ""
|
||||
while len(string) > screen_width:
|
||||
stop_index = screen_width
|
||||
while stop_index > 0 and not string[stop_index].isspace(): stop_index -= 1
|
||||
if not stop_index: stop_index = screen_width
|
||||
|
||||
string_result += string[:stop_index].strip() + "\n"
|
||||
string = string[stop_index:].strip()
|
||||
|
||||
return string_result + string
|
||||
|
||||
def paragraph_formater(lines, screen_height):
|
||||
paragraphs = ""
|
||||
while len(lines) >= screen_height:
|
||||
paragraphs += "\n".join(lines[:screen_height]) + "\n\n"
|
||||
lines = lines[screen_height:]
|
||||
|
||||
return paragraphs + "\n".join(lines)
|
||||
|
||||
lines = []
|
||||
for line in string.split("\n"):
|
||||
for formated_line in line_formater(line, screen_width).split("\n"):
|
||||
lines.append(formated_line)
|
||||
|
||||
return paragraph_formater(lines, screen_height).split("\n\n")
|
||||
|
||||
|
||||
def read_event(data, event, quest):
|
||||
if not quest in data[0]:
|
||||
data[0][quest] = 0
|
||||
|
||||
if type(event) == dict:
|
||||
if data[0][quest] in event: event = event[data[0][quest]]
|
||||
else: event = event["base"]
|
||||
|
||||
if type(event) != list:
|
||||
raise TypeError("event is of type {} instead of list".format(type(event)))
|
||||
|
||||
return Event(*event)
|
||||
|
||||
|
||||
def get_multi_move(key):
|
||||
if "," in key:
|
||||
result = []
|
||||
for k in key.split(","):
|
||||
if "*" in k:
|
||||
k = k.split("*")
|
||||
result.append((convert(k[0]), convert(k[1])))
|
||||
else:
|
||||
result.append((convert(k), 1))
|
||||
|
||||
return result
|
||||
|
||||
elif "*" in key:
|
||||
key = key.split("*")
|
||||
return [(convert(key[0]), convert(key[1]))]
|
||||
|
||||
else:
|
||||
return [(convert(k), 1) for k in key]
|
||||
|
||||
|
||||
|
||||
# Extra functions
|
||||
def print_text(text, min_value=0, max_value=0, default_value=0):
|
||||
paragraphs = [i for i in text_formater(text) if i]
|
||||
nb = len(paragraphs)
|
||||
for index in range(nb):
|
||||
print("\n" * 7)
|
||||
print(paragraphs[index])
|
||||
|
||||
if index + 1 == nb and (min_value or max_value or default_value) and min_value <= max_value:
|
||||
result = input(">")
|
||||
try: result = int(result)
|
||||
except: result = default_value
|
||||
if not (min_value <= result <= max_value): result = default_value
|
||||
|
||||
return result
|
||||
|
||||
else: input()
|
||||
|
||||
|
||||
def stand_by(entity, data, stat, screen, walkable):
|
||||
pass
|
||||
|
||||
def permanent(entity, data, stat, screen, walkable):
|
||||
pass
|
||||
|
||||
|
||||
def follow(entity, data, stat, screen, walkable):
|
||||
if entity.pos_x == entity.pos_y == -1:
|
||||
entity.pos_x, entity.pos_y = data[2], data[3]
|
||||
|
||||
elif data[4] in (1, 2, 3, 5):
|
||||
if entity.args: walkable += entity.args[0]
|
||||
cases = ((data[2] + 1, data[3]), (data[2], data[3] - 1), (data[2] - 1, data[3]), 0, (data[2], data[3] + 1))[data[4] - 1]
|
||||
if not (0 <= cases[0] < screen.map_width and 0 <= cases[1] < screen.map_height): entity.pos_x, entity.pos_y = data[2], data[3]
|
||||
elif screen.get_cell(cases[0], cases[1]) in walkable: entity.pos_x, entity.pos_y = cases
|
||||
|
||||
|
||||
def walk_between(entity, data, stat, screen, walkable):
|
||||
frame = (entity.args[0] + 1) % len(entity.args[1])
|
||||
new_x, new_y = _walk_engine(entity, frame)
|
||||
if screen.get_cell(new_x, new_y) in walkable:
|
||||
entity.pos_x, entity.pos_y = new_x, new_y
|
||||
entity.args[0] = frame
|
||||
|
||||
|
||||
def walk_to(entity, data, stat, screen, walkable):
|
||||
frame = entity.args[0]
|
||||
if len(entity.args[1]) == frame:
|
||||
entity.behavior = "stand by"
|
||||
entity.args = []
|
||||
return
|
||||
|
||||
new_x, new_y = _walk_engine(entity, frame)
|
||||
|
||||
if screen.get_cell(new_x, new_y) in walkable:
|
||||
entity.pos_x, entity.pos_y = new_x, new_y
|
||||
entity.args[0] += 1
|
||||
|
||||
|
||||
def follow_by_player(entity, data, stat, screen, walkable):
|
||||
frame = entity.args[0]
|
||||
if len(entity.args[1]) == frame:
|
||||
entity.behavior = "stand by"
|
||||
entity.args = []
|
||||
return
|
||||
|
||||
new_x, new_y = _walk_engine(entity, frame)
|
||||
|
||||
if abs(data[2] - new_x) < 5 and abs(data[3] - new_y) < 3 and screen.get_cell(new_x, new_y) in walkable:
|
||||
entity.pos_x, entity.pos_y = new_x, new_y
|
||||
if (new_x, new_y) == entity.args[1][frame]: entity.args[0] += 1
|
||||
|
||||
|
||||
def _walk_engine(entity, frame):
|
||||
delta_x, delta_y = list(map(lambda x,y: y - x, (entity.pos_x, entity.pos_y), entity.args[1][frame]))
|
||||
new_x = entity.pos_x
|
||||
new_y = entity.pos_y
|
||||
if delta_x: new_x += abs(delta_x) // delta_x
|
||||
if delta_y: new_y += abs(delta_y) // delta_y
|
||||
return new_x, new_y
|
|
@ -1,428 +0,0 @@
|
|||
asgard = (r"""
|
||||
/\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\
|
||||
/ \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \
|
||||
/\ / \ /\ / \ /\ / \ /\ / \ /\ / \ /\ / \ /\ / \ /\ / \ /\ / \ /\ / \ /\ / \ /\ / \ /\ / \ /\ / \ /\ / \
|
||||
\ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ /
|
||||
\ /\ / \ /\ / \ /\ / \ / \ / \ / \ /\ / \ /\ / \ /\ / \ /\ / \ / \ / \ / \ / \ /\ /
|
||||
/ \ / \ / \ / \ / \ / \ / \ \ / \ / \ / \ / / \
|
||||
/\ / \ /\ / \ /\ / \ /\ /\ / \ /\ / \ /\ / \ /\ / \ / \/ \/ \/ \/ /\ / \
|
||||
\ / \ / \ / / \ / \ _ / \ / \ / \ / / \ /
|
||||
\ / \ / \ / / \ /\ / \ /\ /o\ / \ / \ / \ / / \ /\ /
|
||||
\ / /\ \ / \ _______ / ~\ / \ |_| \ / \ / \ / ___________________________ / / \
|
||||
/ \ /\ /Glitnir\ /\ / ~~\ /\ / \ /\ /\ \/ \/ /___________________________\ \
|
||||
/ \ / \ |__|^|__| / \ ~~ / \ / \ / \ /\ /\ | Valaskjalf | /\ \
|
||||
/\ / \ /\ /\ / \ /\~/ \ /\ / \ /\ / \ / \ / \ /_______________________________\ / \
|
||||
/ \ / \ / \ / \~ \ \ \ \ \ / \ /\ / \ |_/ \_/ \_/ _ \_/ \_/ \_| /\ / \ /\
|
||||
/\ /\ / \ /\ / \ / \ / \~ / \ / \ \ / / \ /\ \ |_| |_| |_|/^\|_| |_| |_| / \ /
|
||||
/ \ / \ / \ / ~ \ / \ / \ / \ | | / \ /\ /
|
||||
/ \/ \ /\ / \ ### _ ~ _________ / /\ / \ /\ -|--|--|--|-/ | /\ / / \
|
||||
/ \ ##### ## /o\ ~ /Gladsheim\ / \ / \ / / / \ / \
|
||||
/\ / \ ### #### |_| ~~ ## |<o> _ <o>| ## / \ /\ / \ | |--|--|--|--|- /\ / \ /\ / /\\
|
||||
/ \~ /-\ ## ###### ------- #### |___|^|___| #### / / \ \ \ / \ / \ / \
|
||||
/\ / \~ #### ###### ###### ###### / \ /\ -|--|--|--|--| | / \ /\ / \ / \
|
||||
/ \ ~~ ###### #### ###### ###### / /\ / \ / / / \ \/ \
|
||||
/ \ /\ ~~ ### ###### || -------- #### #### /\ / \ \ | |--|--|--|--|- /\ / \ /\
|
||||
\ / \ ~~ ##### #### ## ~~~ || __ || / \ \ \ \ /\ / \ /\ \/ \
|
||||
\ /\ / \ ~~ ### || #### ~~~~ / \ ## / \ /\ -|--|--|--|--| | / \ /\ / \ \ /\
|
||||
/ \ ~~ /-\ ###### ~~~ |__| _ #### /\ / \ / / \ \ \ / \
|
||||
/ \ ~~ ### ###### ~~~~ / \ ###### /\ / \ \ /\ /\ / \ /\ / \
|
||||
## ## ~~ ##### #### ### ~~~~~~ |_| ###### _ / \ \ /\ / \ / \ /\ /\ / \ / \
|
||||
### #### ~~ ________ ### || ##### ~~~~~~ #### /o\ / \ / \ / / \ / \ /\ / \ /\ /
|
||||
#### ###### ~~ / Ydalir \ /-\ ### ~~~~~ || |_| / \ / \ / / \ /\/ \/ \ /
|
||||
#### ###### ~~~ /__________\ ### /-\ ~~~~~ / / \ / \ /
|
||||
### #### ~~ |_//^^\\_| ##### ~~~ ### _________ / \ /\ / \/
|
||||
|| ## || ~~ |_| |_| _ ### ### ~~~~~ | | ##### /Folkvangr\ / \ ~/\
|
||||
#### ~~~ |_| |_| /o\ /-\ ##### ~~~~~| | ### |<o> _ <o>| _ / \ ~~/ \
|
||||
###### _ ~~~ |_| ### ______ ~~| | /-\ |___|^|___| /o\ ~~~~~/
|
||||
###### /o\ ~~~ /-\ /Noatun\ | |~~ ### |_| _ ~~/\ /
|
||||
#### |_| ~~~~~~~~~~~~~~~~~ |_/^^\_| ### | |~~~~~~ ##### ##### /o\ ~~/ \
|
||||
|| ~~~~~~~~~~~~~~~~~~~~~~ | | ##### | ~~~~~ ### ### ######### |_| ~~/ \ /\
|
||||
## ___________ ~~~~~~~~| | ### ~~~~~ /-\ ##### _ #Landivi# ~/ \ /
|
||||
#### /Breidablik \ ~| |~~~~ /-\ ~~~~~~ ### /o\ ######### ~~~ /
|
||||
##### |o|o|o|o|o|o| ### | | ~~~~~~~~~~~~~ ~~~~~~ /-\ |_| ##### ~~~~ /\ /
|
||||
##### /_____________\ ##### ### ### ~~~~~~~~~~~~ ~~~~~~~~ |^| _ ~~~~~ / \ /\
|
||||
#### |_/ \_/ \_| ### ##### ##### ### ~~~~~~~~~~~~~~~~ ~~~~~~~~~ /o\ ~~~~ / \ / \
|
||||
|| |_| |^| |_| /-\ ### ### ### ##### ~~~~~~~~~~~~~~| |~~~~~~~~~~~~~~~ |_| ~~~~ / \ / \
|
||||
## /-\ /-\ ##### ### ~~~~~~~| |~~~~~~~~~~~~~~~~~~ ~~~~ / /
|
||||
#### ### ### /-\ ~~~~~~~~~~~~~ ~~~~~ /\ /
|
||||
###### ##### ### ### ### /-\ ### ___________ ~~~~~~~~~~ ~~~~~~ / \ /
|
||||
###### ### ##### ##### ##### ~~~ ##### /Thrymrheimr\ ~~~~~~~~~~~~~~~~~~ /\ / \ /
|
||||
#### _ ### /-\ ### ### ### ~(~)~ ### /_____________\ _ ~~~~~~~~~~~~~~ ### / \ \
|
||||
|| /o\ ##### /-\ /-\ /-\ /~(___)~\ /-\ |_/ \_/ \_| ### ### /o\ ~~~~~~~~~~~ ##### / \ /\
|
||||
## |_| ### \~~~~~~~/ |_| |^| |_| ##### ##### |_| ~~~~~~~~~~ ### / \ / \
|
||||
~ #### /-\ ### ### ### ~~~~~~~~~~ /|\ ### / \
|
||||
~###### ____________ #### #### ### /-\ /|\ ### ##### ~~~~~~~~~~ ### ##### /\ \
|
||||
~###### / Himinbjorg \ #### #### ##### ### ### ##### ### ~~~~~~~~ ##### ### / \
|
||||
~ #### /______________\ ### ### ### ##### ##### ### ### /|\ ~~~~~~~~~ _ ### /|\ / \ /
|
||||
~ || ### | ]O[ __ ]O[ | /-\ ### ### _ ##### _ /|\ ~~~~~~~~~ /o\ /|\ / \ /
|
||||
~ _ ##### |_____|^^|_____| ### ### ### /-\ /-\ ### /o\ ### /o\ ------------- |_| ### /
|
||||
~ /o\ ### ##### #### #### ##### |_| /|\ |_| ### ##### ###/
|
||||
~ |_| /-\ ### #### #### ### ### ##### ### #####
|
||||
~ /-\ ##### ### /-\ ### ### ------------- /|\ ###
|
||||
~~ ### ### _ ### ### ##### ##### /|\ ~~~~~~~ ### /|\ ###
|
||||
~~ ##### ##### ### ### ### /o\ /-\ ##### ### ### ### ~~~~~~~ ### ##### ####
|
||||
~~ ### ### ##### ##### ##### |_| ### ### /-\ ##### ### /|\ ### ~~~~~~ ### ##### ### ###
|
||||
~~ /-\ /-\ ### ### ### ___________ /-\ ##### ### ##### ##### ~~~~~ ##### ### /|\ /|\
|
||||
~~ |_| |_| |_| /Sokkvabekkr\ ### /|\ ### ### ~~~~~~ ### /|\ ###
|
||||
~~ /_____________\ /-\ ### /|\ /|\ ~~~~~~~ /|\ ### #####
|
||||
~~ ________ ### ### ### _ /_|_/__\_/__\_|_\ ##### ### ### ~~~~~~~~ ##### ###
|
||||
~~ /Alfheimr\ ##### ##### ##### /o\ |_| |^| |_| _ ### ##### ### ##### ~~~~~~~~ ### /|\
|
||||
~~~ |]O[__]O[| ### ### ### |_| /o\ /-\ ### ##### ### ~~~~~~~~~ _ /|\ ###
|
||||
~~~ |__|^^|__| |_| |_| |_| ##### ##### |_| /-\ ### /|\ ~~~~~~~~~~ _ /o\ #####
|
||||
~~~ ##### ##### /|\ ~~~~~~~~~~ /-\ |_| ### ~
|
||||
~~~ ~~~~~~~~~~~~ |_| /|\ ~~
|
||||
~~~~~ ~~~~~~~~~~~~~~~~~~~ ~~~~~~~~
|
||||
~~~~~~~~~~~ ~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~""",
|
||||
# Autres mondes (Asgard = 0)
|
||||
(126, 71, 3, 72, 6), # Midgard
|
||||
|
||||
# Maisons
|
||||
( 30, 11, 9, 15, 13), # Glitnir
|
||||
(116, 14, 10, 29, 23), # Valaskjalf
|
||||
( 70, 19, 11, 24, 19), # Gladsheim
|
||||
( 25, 31, 12, 24, 19), # Ydalir (1/2)
|
||||
( 26, 31, 12, 25, 19), # Ydalir (2/2)
|
||||
(110, 34, 13, 20, 14), # Folkvangr
|
||||
( 63, 36, 14, 14, 14), # Noatun (1/2)
|
||||
( 64, 36, 14, 15, 14), # Noatun (2/2)
|
||||
(120, 41, 15, 14, 14), # Landivi
|
||||
( 13, 43, 16, 29, 29), # Breidablik
|
||||
( 75, 50, 17, 24, 24), # Thrymrheimr
|
||||
( 27, 56, 18, 24, 24), # Himinbjorg (1/2)
|
||||
( 28, 56, 18, 25, 24), # Himinbjorg (2/2)
|
||||
( 57, 67, 19, 25, 14), # Sokkvabekkr
|
||||
( 10, 69, 20, 34, 24), # Alfheimr (1/2)
|
||||
( 11, 69, 20, 35, 24), # Alfheimr (2/2)
|
||||
)
|
||||
|
||||
|
||||
h_9 = (r"""
|
||||
|==========|
|
||||
|[===][===]|
|
||||
| |
|
||||
| |
|
||||
|=========| |=========|
|
||||
| |
|
||||
| _ _ _ _ |
|
||||
| |_| |_| |_| |_| |
|
||||
| |_| |_| |_| |_| |
|
||||
| |_| |_| |_| |_| |
|
||||
| |
|
||||
|============| |=============|
|
||||
| |
|
||||
||^|| """,
|
||||
(15, 13, 0, 30, 11))
|
||||
|
||||
|
||||
h_10 = (r"""
|
||||
|====================================================|
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |================\ /=================| |
|
||||
| | | |
|
||||
| | | |
|
||||
| \ __ / |
|
||||
| |<>| |
|
||||
| |__| |
|
||||
| /____\ \ |
|
||||
| / | |
|
||||
| | | |
|
||||
| | | |
|
||||
| |================/ \=================| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
|_______________________ _______________________|
|
||||
|__/ \__/ \__/ \__/ \__/ \__|
|
||||
|__| |__| |__| |__| |__| |__|
|
||||
|__| |__| |__| |__| |__| |__|
|
||||
|__| |__| |__| |__| |__| |__|
|
||||
/__\ /__\ /__\__^^__/__\ /__\ /__\ """,
|
||||
(29, 23, 0, 116, 14),
|
||||
(30, 23, 0, 116, 14))
|
||||
|
||||
|
||||
h_11 = (r"""
|
||||
|============================|
|
||||
| _ |
|
||||
| |o| |
|
||||
| /___\ |
|
||||
| (___ ___) |
|
||||
| (____ ____) |
|
||||
|=========| (_____ _____) |========|
|
||||
| |
|
||||
| |
|
||||
| __ ### __ |
|
||||
| |__| +-#####-+ |__| |
|
||||
| |__| | ### | |__| |
|
||||
| |__| | /|\ | |__| |
|
||||
| |__| +-------+ |__| |
|
||||
| |__| |__| |
|
||||
| |
|
||||
| |
|
||||
|======================| |======================|
|
||||
|=+<>+=+<>+=+<>+=+<>+==| |==+<>+=+<>+=+<>+=+<>+=|
|
||||
|^| """,
|
||||
(24, 19, 0, 70, 19))
|
||||
|
||||
|
||||
h_12 = (r"""
|
||||
|=-=-=-=-=-=-=-=-=-=-=-=-=-=-|
|
||||
| __ |
|
||||
| |()| |
|
||||
| |__| |
|
||||
| |====| |
|
||||
| |
|
||||
| ~~~~ |
|
||||
|=-=-=-=-=| ~~\/~~ |=-=-=-=-=|
|
||||
| [=====] /~~~||~~~\ [=====] |
|
||||
| [=====] [==========] [=====] |
|
||||
| _ _ |
|
||||
| (_) (_) |
|
||||
| _ /_\ /_\ _ |
|
||||
| (_) (_) |
|
||||
| /_\ ______ ______ /_\ |
|
||||
| \- - / \ - -/ |
|
||||
|-=-=-=-=-=-| - -| |- - |-=-=-=-=-=-|
|
||||
|=-=-=-=-=-=|- - | | - -|=-=-=-=-=-=|
|
||||
| - -| |- - |
|
||||
/- - \_____|^^|_____/ - -\ """,
|
||||
(24, 19, 0, 25, 31),
|
||||
(25, 19, 0, 26, 31))
|
||||
|
||||
|
||||
h_13 = (r"""
|
||||
||
|
||||
|===================================||==|
|
||||
|================|===o===o===o=====/ \=|
|
||||
|[==-==/ \==-==]| |__| |
|
||||
|[-===/ \==--]| _ |
|
||||
|[=-=/ \-==]| |o| __ |
|
||||
|[==/ \==]| (___) | | |
|
||||
| | |__| |
|
||||
|======/ \======| | | |
|
||||
| |__| |
|
||||
| | | |
|
||||
| |__| |
|
||||
| |
|
||||
|==================| |==================|
|
||||
|^| """,
|
||||
(20, 14, 0, 110, 34))
|
||||
|
||||
|
||||
h_14 = (r"""
|
||||
|=|\/|==|\/|=|\/|=|\/|==|\/|=|
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |================| |
|
||||
| | __ __ | |
|
||||
| | | | | | | |
|
||||
| | |__| |__| | |
|
||||
| | | |
|
||||
| |======\ /======| |
|
||||
|### ###|
|
||||
|### ###|
|
||||
||_| |_||
|
||||
|=|\/|==|\/|=| |=|\/|==|\/|=|
|
||||
|^^| """,
|
||||
(14, 14, 0, 63, 36),
|
||||
(15, 14, 0, 64, 36))
|
||||
|
||||
|
||||
h_15 = (r"""
|
||||
#########
|
||||
## [=====] ##
|
||||
# [=====] #
|
||||
# #
|
||||
#_ _#
|
||||
#(_) [] (_)#
|
||||
#|~| |__| |~|#
|
||||
# #
|
||||
# _ _ #
|
||||
# (_) (_) #
|
||||
#|~| |~|#
|
||||
## ##
|
||||
#### ####
|
||||
| |
|
||||
|^| """,
|
||||
(14, 14, 0, 120, 41))
|
||||
|
||||
|
||||
h_16 = (r"""
|
||||
|======================================|
|
||||
| |
|
||||
| |
|
||||
| ### ~~~~ ### |
|
||||
| ##### ~(~~)~ ##### |
|
||||
| ##### /~~~(____)~~~\ ##### |
|
||||
| ### \~~~~~~~~~~~~/ ### |
|
||||
| |=| |============| |=| |
|
||||
| |
|
||||
|========\ /========|
|
||||
|==================| |==================|
|
||||
| [=====][=====] | | [=====][=====] |
|
||||
| [=====][=====] _ _ [=====][=====] |
|
||||
| (_) (_) |
|
||||
| |=| |=| |
|
||||
| ___ ___ ___ ___ |
|
||||
| | | | | | | | | |
|
||||
| |___| |___| _ _ |___| |___| |
|
||||
| | | | | (_) (_) | | | | |
|
||||
| |___| |___| |=| |=| |___| |___| |
|
||||
| | | | | | | | | |
|
||||
| |___| |___| |___| |___| |
|
||||
| | | | | _ _ | | | | |
|
||||
| |___| |___| (_) (_) |___| |___| |
|
||||
| |=| |=| |
|
||||
| |
|
||||
| |======| |=======| |
|
||||
|===================| _ | | _ |===================|
|
||||
(_) | | (_)
|
||||
|=| |/^\| |=| """,
|
||||
(29, 29, 0, 13, 43))
|
||||
|
||||
|
||||
h_17 = (r"""
|
||||
### |============================| ###
|
||||
##### | | #####
|
||||
### | | ###
|
||||
|_| | ~~~~~~~~~~~~~~~~~~ | |_|
|
||||
| ~~~~~~~~~~~~~~~~~~~~ |
|
||||
### | ~~~~~~~~~~~~~~~~~~~~ | ###
|
||||
##### | ~~~~~~~~~~~~~~~~~~~~ | #####
|
||||
### | ~~~~~~~~~~~~~~~~~~ | ###
|
||||
|_| | | |_|
|
||||
| |
|
||||
|===================/ \===================|
|
||||
| |
|
||||
| _ _ _ _ |
|
||||
| (-) (-) (-) (-) |
|
||||
| |_| |_| |_| |_| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| _ _ _ _ |
|
||||
| (-) (-) (-) (-) |
|
||||
| |_| |_| |_| |_| |
|
||||
| |
|
||||
|======================| |=======================|
|
||||
|^| """,
|
||||
(24, 24, 0, 75, 50))
|
||||
|
||||
|
||||
h_18 = (r"""
|
||||
|================================================|
|
||||
|================================================|
|
||||
| |
|
||||
| |
|
||||
| __ __ |
|
||||
| (~~) (~~) |
|
||||
| |--| __ |--| |
|
||||
| | | |<>| | | |
|
||||
| | | |--| | | |
|
||||
| |__| |____| |__| |
|
||||
| |
|
||||
| |
|
||||
| __ __ |
|
||||
| (~~) ## (~~) |
|
||||
| |--| #### |--| |
|
||||
| | | #### | | |
|
||||
| | | ## | | |
|
||||
| |__| || |__| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
|=====================\| |/=====================|
|
||||
|=====================/| |\=====================|
|
||||
\| |/
|
||||
/|^^|\ """,
|
||||
(24, 24, 0, 27, 56),
|
||||
(25, 24, 0, 28, 56))
|
||||
|
||||
|
||||
h_19 = (r"""
|
||||
|================================================|
|
||||
| |
|
||||
| ########## |
|
||||
| ########## |
|
||||
| ###### ###### |
|
||||
| ###### __ |===[]===| __ ###### |
|
||||
| (__) | |__| | (__) |
|
||||
| |--| | | |--| |
|
||||
| |__| | | |__| |
|
||||
| ###### |==/ \==| ###### |
|
||||
| ###### ###### |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
|=======================|^|======================|""",
|
||||
(25, 14, 0, 57, 67))
|
||||
|
||||
|
||||
h_20 = (r"""
|
||||
|============================|
|
||||
| |
|
||||
| _ _ |
|
||||
|===================| (-) (-) |
|
||||
| | |_| __ |_| |
|
||||
| | |[]| |
|
||||
| ~~~ | | | |
|
||||
| ~~~(~)~~~ | _ |____| _ |
|
||||
| /~~(_____)~~\ | (-) (-) |
|
||||
| \___________/ | |_| |_| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| ~~~ | _ _ |
|
||||
| ~~~(~)~~~ | (-) (-) |
|
||||
| /~~(_____)~~\ | |_| |_| |
|
||||
| \___________/ | |
|
||||
| | |
|
||||
| | _ _ |
|
||||
|===================| (-) (-) |
|
||||
| |_| |_| |
|
||||
| |
|
||||
|============|^^|============|""",
|
||||
(34, 24, 0, 10, 69),
|
||||
(35, 24, 0, 11, 69))
|
||||
|
||||
asgard_entities = (
|
||||
[0, '?', 0, 120, 26, 'stand by'],
|
||||
[0, '?', 0, 51, 55, 'stand by'],
|
||||
[0, '*', 0, 34, 7, 'stand by'],
|
||||
[0, '*', 0, 121, 21, 'stand by'],
|
||||
[0, '*', 0, 117, 32, 'stand by'],
|
||||
[0, '*', 0, 29, 13, 'stand by'],
|
||||
[0, '*', 0, 19, 20, 'stand by'],
|
||||
[0, '*', 0, 28, 26, 'stand by'],
|
||||
[0, '*', 0, 46, 35, 'stand by'],
|
||||
[0, '*', 0, 57, 38, 'stand by'],
|
||||
[0, '*', 0, 82, 38, 'stand by'],
|
||||
[0, '*', 0, 22, 39, 'stand by'],
|
||||
[0, '*', 0, 8, 44, 'stand by'],
|
||||
[0, '*', 0, 58, 50, 'stand by'],
|
||||
[0, '*', 0, 83, 51, 'stand by'],
|
||||
[0, '*', 0, 32, 59, 'stand by'],
|
||||
[0, '*', 0, 104, 63, 'stand by'],
|
||||
[0, '*', 0, 46, 65, 'stand by'],
|
||||
[0, '*', 0, 16, 71, 'stand by'],
|
||||
[0, '*', 0, 138, 71, 'stand by'],
|
||||
["Forseti", '*', 9, 19, 4, 'stand by'],
|
||||
["Odin", '*', 10, 25, 11, 'stand by'],
|
||||
[0, '*', 11, 34, 7, 'stand by'],
|
||||
[0, '*', 12, 19, 4, 'stand by'],
|
||||
[0, '*', 13, 21, 8, 'stand by'],
|
||||
[0, '*', 14, 26, 2, 'stand by'],
|
||||
["Vidar", '*', 15, 10, 6, 'stand by'],
|
||||
[0, '*', 16, 50, 14, 'stand by'],
|
||||
[0, '*', 17, 36, 14, 'stand by'],
|
||||
[0, '*', 18, 30, 9, 'stand by'],
|
||||
[0, '*', 19, 28, 7, 'stand by'],
|
||||
[0, '*', 20, 39, 9, 'stand by'],
|
||||
)
|
|
@ -1,340 +0,0 @@
|
|||
from idk_lib import *
|
||||
|
||||
try:
|
||||
import dlc_hy_po as dlc
|
||||
spells = dlc.dlc_spells
|
||||
spells_level = dlc.dlc_spells_level
|
||||
spells_effect = dlc.dlc_spells_effect
|
||||
weapons = dlc.dlc_weapons
|
||||
armors = dlc.dlc_armors
|
||||
dlc_entities = dlc.dlc_entities
|
||||
except:
|
||||
dlc = None
|
||||
dlc_entities = ()
|
||||
|
||||
|
||||
|
||||
# Game
|
||||
def npc(data, stat, entities, identifiant):
|
||||
npc_data = (
|
||||
asgard_npc,
|
||||
vanaheim_npc,
|
||||
alfheim_npc,
|
||||
midgard_npc,
|
||||
niflheim_npc,
|
||||
jotunheim_npc,
|
||||
nidavellir_npc,
|
||||
muspellheim_npc,
|
||||
svartalfheim_npc,
|
||||
h_9_npc, h_10_npc, h_11_npc, h_12_npc, h_13_npc, h_14_npc, h_15_npc, h_16_npc, h_17_npc, h_18_npc, h_19_npc, h_20_npc,
|
||||
h_21_npc, h_22_npc,
|
||||
h_23_npc, h_24_npc,
|
||||
h_25_npc, h_26_npc, h_27_npc, h_28_npc,
|
||||
h_29_npc, h_30_npc,
|
||||
h_31_npc, h_32_npc, h_33_npc, h_34_npc, h_35_npc, h_36_npc,
|
||||
h_37_npc, h_38_npc, h_39_npc, h_40_npc, h_41_npc,
|
||||
h_42_npc, h_43_npc, h_44_npc,
|
||||
h_45_npc, h_46_npc, h_47_npc, h_48_npc)
|
||||
|
||||
|
||||
if dlc:
|
||||
event = dlc.dlc_npc(data, stat, entities, identifiant)
|
||||
if event: return "dlc", event
|
||||
|
||||
return npc_core(npc_data[data[1]], data, stat, entities, identifiant)
|
||||
|
||||
|
||||
def point_of_interest(data, stat, entities, identifiant):
|
||||
po_data = (
|
||||
asgard_po,
|
||||
vanaheim_po,
|
||||
alfheim_po,
|
||||
midgard_po,
|
||||
niflheim_po,
|
||||
jotunheim_po,
|
||||
nidavellir_po,
|
||||
muspellheim_po,
|
||||
svartalfheim_po
|
||||
)
|
||||
|
||||
coords = data[2], data[3]
|
||||
event = po_data[data[1]](coords, identifiant)
|
||||
|
||||
if not event: return [0, "Il n'y a rien à voir ici."]
|
||||
else: return event
|
||||
|
||||
|
||||
entities = asgard_entities + vanaheim_entities + alfheim_entities + midgard_entities + niflheim_entities + jotunheim_entities + nidavellir_entities + muspellheim_entities + svartalfheim_entities + dlc_entities
|
||||
|
||||
print(center("L'Hydromel Poétique", 21, " "))
|
||||
print("Entrez 'hy_po()' pour\nune nouvelle partie.")
|
||||
events = {"*": npc, "?": point_of_interest}
|
||||
keys = {4: display_stat, 7: spell, 8: misc_stat, 6: inventory, 9: sleep, "s": quick_save}
|
||||
|
||||
|
||||
def hy_po(save_code=None):
|
||||
# stat = [0 - PV, 1 - pièces d'or, 2 - [vitesse, agilité, attaque, defense, magie], 3 - [arme, armure], 4 - ticks, 5 - nom, 6 - classe, 7 - sorts connus : (id, level), 8 - sous-quêtes terminées]
|
||||
if not save_code:
|
||||
stat = init_stat()
|
||||
name = stat[5]
|
||||
data = [{"main": 0}, 3, 44, 66]
|
||||
|
||||
print_text("introduction")
|
||||
else:
|
||||
stat, data = decode_save(save_code)
|
||||
|
||||
idk_game = Asci(maps, entities, events, keys)
|
||||
stat, data = idk_game.mainloop(1, stat, data, routine=routine, low_bar=low_bar, door="^_", walkable=".,`' ", exit_key="q")
|
||||
if stat[9] != -1: data[0]["main"] -= stat[9]
|
||||
|
||||
if data[0]["main"] == 1:
|
||||
print_text("conclusion")
|
||||
else:
|
||||
print("hy_po(\"{}\")".format(encode_save(data, stat[:-1])))
|
||||
|
||||
|
||||
# Scenario
|
||||
def shop_interaction(data, stat, nb_choice, *events):
|
||||
for choice in range(nb_choice):
|
||||
if data[0]["main"] == stat[9] + choice + 1:
|
||||
stat[9] = -1
|
||||
if stat[1] < events[choice][0]: return events[choice][2], choice + 1
|
||||
else: return events[choice][1], choice + 1
|
||||
|
||||
|
||||
|
||||
# - - - Asgard - - - #
|
||||
def asgard_po(coords, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def asgard_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def h_9_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def h_10_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def h_11_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def h_12_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def h_13_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def h_14_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def h_15_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def h_16_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def h_17_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def h_18_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def h_19_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def h_20_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
# - - - Vanaheim - - - #
|
||||
def vanaheim_po(coords, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def vanaheim_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def h_22_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
# - - - Alfheim - - - #
|
||||
def alfheim_po(coords, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def alfheim_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def h_23_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def h_24_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
# - - - Midgard - - - #
|
||||
def midgard_po(coords, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def midgard_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def h_25_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def h_26_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def h_27_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def h_28_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
# - - - Niflheim - - - #
|
||||
def niflheim_po(coords, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def niflheim_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def h_29_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def h_30_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
# - - - Jotunheim - - - #
|
||||
def jotunheim_po(coords, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def jotunheim_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def h_31_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def h_32_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def h_33_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def h_34_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def h_35_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def h_36_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
# - - - Nidavellir - - - #
|
||||
def nidavellir_po(coords, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def nidavellir_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def h_37_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def h_38_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def h_39_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def h_40_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def h_41_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
# - - - Muspellheim - - - #
|
||||
def muspellheim_po(coords, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def muspellheim_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def h_42_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def h_43_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def h_44_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
# - - - Svartalfheim - - - #
|
||||
def svartalfheim_po(coords, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def svartalfheim_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def h_45_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def h_46_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def h_47_npc(data, stat, entites, identifiant):
|
||||
pass
|
||||
|
||||
|
||||
def h_48_npc(data, stat, entites, identifiant):
|
||||
pass
|
|
@ -1,523 +0,0 @@
|
|||
from asci import Asci, print_text
|
||||
from random import randint, choice
|
||||
from math import floor, ceil
|
||||
|
||||
from asgard import *
|
||||
from vanaheim import *
|
||||
from alfheim import *
|
||||
from midgard import *
|
||||
from niflheim import *
|
||||
from jotunheim import *
|
||||
from nidavellir import *
|
||||
from muspellheim import *
|
||||
from svartalfheim import *
|
||||
|
||||
maps = (
|
||||
asgard,
|
||||
vanaheim,
|
||||
alfheim,
|
||||
midgard,
|
||||
niflheim,
|
||||
jotunheim,
|
||||
nidavellir,
|
||||
muspellheim,
|
||||
svartalfheim,
|
||||
h_9, h_10, h_11, h_12, h_13, h_14, h_15, h_16, h_17, h_18, h_19, h_20,
|
||||
h_21, h_22,
|
||||
h_23, h_24,
|
||||
h_25, h_26, h_27, h_28,
|
||||
h_29, h_30,
|
||||
h_31, h_32, h_33, h_34, h_35, h_36,
|
||||
h_37, h_38, h_39, h_40, h_41,
|
||||
h_42, h_43, h_44,
|
||||
h_45, h_46, h_47, h_48
|
||||
)
|
||||
|
||||
spells = ("Soin", "Flammes", "Givre", "Etincelles", "Fatigue")
|
||||
spells_level = ("I", "II", "III", "IV", "V")
|
||||
spells_effect = ((4, 1, True), (4, -1, False), (4, -1, False), (4, -1, False), (0, -1, False)) # (capacity, factor, True on player; False on opponent)
|
||||
weapons = ("<aucune>", "Dague", "Marteau", "Masse", "Fleau", "Hache", "Epee", "Espadon", "Hache double")
|
||||
armors = ("<aucune>", "Rondache", "Pavois", "Cote de maille", "Broigne", "Harnois")
|
||||
|
||||
# Asci functions
|
||||
def npc_core(event_fn, data, stat, entities, identifiant):
|
||||
event = event_fn(data, stat, entities, identifiant)
|
||||
|
||||
if not event:
|
||||
msg = ("Hmm ?", "Besoin de quelque chose ?", "Vous cherchez quelqu'un ?", "Vous etes... ?", "Oui ?", "He ! Regarde ou tu vas.")
|
||||
sel_choice = print_text("{0}\n1. Attaquer\n2. Voler\n3. Ne rien faire".format(choice(msg)), 1, 3, 3)
|
||||
|
||||
if sel_choice == 1:
|
||||
opponent_stat = [randint(5, stat[2][i] + 5) for i in range(4)]
|
||||
opponent_stat.append(randint(50, 150))
|
||||
return launch_fight(data, stat, (opponent_stat, "Ennemi", randint(10, 30), 0))
|
||||
|
||||
elif sel_choice == 2:
|
||||
if stat_test(stat[2], 1)[0]:
|
||||
amount = randint(5, 25)
|
||||
return [0, "Vous avez reussi a voler {} PO.".format(amount), 0, (1, amount)]
|
||||
else:
|
||||
return [0, "Votre victime vous a vu et vous a mis une raclee.", 0, (0, -10)]
|
||||
|
||||
elif sel_choice == 3:
|
||||
return None
|
||||
|
||||
elif type(event) == tuple and len(event) > 2:
|
||||
if len(event) == 4: quest = "main"
|
||||
else: event, quest = event[:-1], event[-1]
|
||||
return launch_fight(data, stat, event, quest)
|
||||
|
||||
else:
|
||||
return event
|
||||
|
||||
|
||||
def launch_fight(data, stat, event, quest="main"):
|
||||
issue, stat[0] = fight(stat, event[0], event[1])
|
||||
|
||||
if issue == 0:
|
||||
stat[1] += event[2]
|
||||
if sum(stat[2][:-1]) >= 200: return [event[3], "Vous avez gagne le combat. [+{}PO]".format(event[2])]
|
||||
|
||||
print_text("Vous avez gagne le combat. [+{}PO]".format(event[2]))
|
||||
data[0][quest] += event[3]
|
||||
sel_choice = 0
|
||||
while not sel_choice:
|
||||
print("<o> Amelioration <o>")
|
||||
print(" |1. Vitesse |")
|
||||
print(" |2. Agilite |")
|
||||
print(" |3. Attaque |")
|
||||
print(" |4. Defense |")
|
||||
print("<o> ============= <o>")
|
||||
sel_choice = get_input()
|
||||
if (sel_choice < 0 or sel_choice > 4) and stat[2][sel_choice - 1] >= 50: sel_choice = 0
|
||||
|
||||
print_text("Vous gagnez 2 points {}".format(("de vitesse", "d'agilite", "d'attaque", "de defense")[sel_choice - 1]))
|
||||
stat[2][sel_choice - 1] += 2
|
||||
if stat[2][sel_choice -1] > 50: stat[2][sel_choice - 1] = 50
|
||||
|
||||
return None
|
||||
|
||||
elif issue == 1: return [0, "Vous etes mort."]
|
||||
elif issue == 2: return [0, "Vous avez fuit."]
|
||||
|
||||
|
||||
def routine(data, stat):
|
||||
stat[4] = (stat[4] + 1) % 1440
|
||||
|
||||
# Health regeneration
|
||||
if stat[0] < 100 and not (stat[4] % 60):
|
||||
stat[0] += 1
|
||||
if stat[0] > 999: stat[0] = 999
|
||||
|
||||
# Mana regeneration
|
||||
if stat[2][4] < stat[0] // 2 and not (stat[4] % 30):
|
||||
stat[2][4] += 1
|
||||
if stat[2][4] > 99: stat[2][4] = 99
|
||||
|
||||
|
||||
|
||||
|
||||
def low_bar(data, stat):
|
||||
h = stat[4] // 60
|
||||
m = stat[4] % 60
|
||||
if m < 10: m = "0" + str(m)
|
||||
return "{0}h|{2}PV|{3}PM ".format(h, m, stat[0], stat[2][4])
|
||||
|
||||
|
||||
# Game mecanics
|
||||
def fight(stat, opponent_stat, opponent_name):
|
||||
|
||||
def player_turn():
|
||||
end = False
|
||||
msg = "Tour de {}".format(stat[5])
|
||||
|
||||
if sel_choice == 1:
|
||||
damage = stat_test(player_stat, 2)[1] - opponent_stat[3]
|
||||
if damage < 0: damage = 0
|
||||
|
||||
if damage == 0:
|
||||
msg += "\n{} bloque l'attaque.".format(opponent_name)
|
||||
elif stat_test(opponent_stat[:-1], 1)[0]:
|
||||
msg += "\n{} esquive le coup.".format(opponent_name)
|
||||
else:
|
||||
opponent_stat[4] -= damage
|
||||
msg += "\n{0} perd {1} PV.".format(opponent_name, damage)
|
||||
|
||||
elif sel_choice == 2:
|
||||
if len(stat[7]) == 0:
|
||||
msg += "\nVous ne connaissez pas de sort."
|
||||
else:
|
||||
spell_choice = 0
|
||||
while not spell_choice:
|
||||
print("\n" * 6 + "Sort(s) connu(s) :")
|
||||
count = 0
|
||||
for spell_id, level in stat[7]:
|
||||
print("{0}. {1} {2}".format(count + 1, spells[spell_id], spells_level[level - 1]))
|
||||
count += 1
|
||||
spell_choice = get_input()
|
||||
if spell_choice < 0 or spell_choice > len(stat[7]): spell_choice = 0
|
||||
|
||||
spell_choice -= 1
|
||||
spell_id, level = stat[7][spell_choice][0], stat[7][spell_choice][1]
|
||||
|
||||
if stat[2][4] >= level * 10:
|
||||
msg += "\nVous lancez {0} de niveau {1} [-{2} PM].".format(spells[spell_id], spells_level[level - 1], level * 10)
|
||||
stat[2][4] -= level * 10
|
||||
pts = 12 * level + randint(-5, 5)
|
||||
|
||||
capacity, factor, apply_on_player = spells_effect[spell_id]
|
||||
|
||||
if apply_on_player:
|
||||
player_stat[capacity] += factor * pts
|
||||
msg += "\nVous {0} {1} points de {2}".format(("perdez", "gagnez")[factor > 0], pts, ("vitesse", "agilité", "attaque", "défense", "vie")[capacity])
|
||||
else:
|
||||
opponent_stat[capacity] += factor * pts
|
||||
msg += "\n{0} {1} {2} points de {3}".format(opponent_name, ("perd", "gagne")[factor > 0], pts, ("vitesse", "agilité", "attaque", "défense", "vie")[capacity])
|
||||
|
||||
else:
|
||||
msg += "\nVous ne parvenez pas a lancer le sort."
|
||||
|
||||
elif sel_choice == 3:
|
||||
if stat_test(player_stat, 1)[0] or not stat_test(opponent_stat, 1)[1]:
|
||||
end = True
|
||||
else:
|
||||
msg += "\nVotre tentative de fuite echoue."
|
||||
|
||||
print_text(msg)
|
||||
return end
|
||||
|
||||
def opponent_turn():
|
||||
msg = "Tour de {}".format(opponent_name)
|
||||
damage = stat_test(opponent_stat, 2)[1] - player_stat[3]
|
||||
if damage < 0: damage = 0
|
||||
|
||||
if damage == 0:
|
||||
msg += "\n{} bloque l'attaque.".format(stat[5])
|
||||
elif stat_test(player_stat, 1)[0]:
|
||||
msg += "\n{} esquive le coup.".format(stat[5])
|
||||
else:
|
||||
player_stat[4] -= damage
|
||||
msg += "\n{0} perd {1} PV.".format(stat[5], damage)
|
||||
|
||||
print_text(msg)
|
||||
|
||||
# opponent_stat = [vitesse, agilité, attaque, défense, vie]
|
||||
# player_stat = [vitesse, agilité, attaque, défense, vie]
|
||||
player_stat = [stat[2][0], stat[2][1], stat[2][2] + stat[3][0] * 5, stat[2][3] + stat[3][1] * 5, stat[0]]
|
||||
|
||||
end = False
|
||||
while not end:
|
||||
sel_choice = 0
|
||||
while not sel_choice:
|
||||
print("<o> Combat <o>")
|
||||
print(" | 1. Attaquer |")
|
||||
print(" | 2. Ensorceler |")
|
||||
print(" | 3. Fuir |")
|
||||
print(" | 4. Statistiques |")
|
||||
print("<o> ============= <o>")
|
||||
sel_choice = get_input()
|
||||
if sel_choice < 0 or sel_choice > 4: sel_choice = 0
|
||||
|
||||
if sel_choice == 4:
|
||||
p_capacities = ["{} ".format(i) if i < 10 else str(i) for i in player_stat]
|
||||
o_capacities = ["{} ".format(i) if i < 10 else str(i) for i in opponent_stat[:-1]]
|
||||
|
||||
p_health = str(player_stat[4]) + " " * (3 - len(str(player_stat[4])))
|
||||
o_health = str(opponent_stat[4]) + " " * (3 - len(str(opponent_stat[4])))
|
||||
|
||||
print(" Joueur | Ennemi")
|
||||
print("Vit: {0} | {1}".format(p_capacities[0], o_capacities[0]))
|
||||
print("Agi: {0} | {1}".format(p_capacities[1], o_capacities[1]))
|
||||
print("Att: {0} | {1}".format(p_capacities[2], o_capacities[2]))
|
||||
print("Def: {0} | {1}".format(p_capacities[3], o_capacities[3]))
|
||||
print("Vie: {0} | {1}".format(p_health, o_health))
|
||||
input()
|
||||
sel_choice = 0
|
||||
|
||||
# Who start
|
||||
player = opponent = False
|
||||
while player == False and opponent == False:
|
||||
player = stat_test(player_stat, 0)[0]
|
||||
opponent = stat_test(opponent_stat[:-1], 0)[0]
|
||||
|
||||
if player == True and opponent == True:
|
||||
if player_stat[0] < opponent_stat[0]: opponent = False
|
||||
else: player = False
|
||||
|
||||
# Fight
|
||||
if player > opponent:
|
||||
end = player_turn()
|
||||
if end: return 2
|
||||
if opponent_stat[4] <= 0: return 0, player_stat[4]
|
||||
opponent_turn()
|
||||
|
||||
else:
|
||||
opponent_turn()
|
||||
if player_stat[4] <= 0: return 1, player_stat[4]
|
||||
end = player_turn()
|
||||
|
||||
if opponent_stat[4] <= 0: return 0, player_stat[4]
|
||||
if player_stat[4] <= 0: return 1, player_stat[4]
|
||||
|
||||
return 2, player_stat[4]
|
||||
|
||||
|
||||
def misc_stat(data, stat):
|
||||
if data[1] < 9: place = ("Asgard", "Vanaheim", "Alfheim", "Midgard", "Niflheim", "Jotunheim", "Nidavellir", "Muspellheim", "Svartalfheim")[data[1]]
|
||||
elif data[1] == 27: place = "chez vous"
|
||||
else: place = "interieur"
|
||||
money, ticks, player_class = stat[1], stat[4], stat[6]
|
||||
|
||||
hours = ticks // 60
|
||||
if 4 <= hours <= 5:
|
||||
hours = " |aube - {}h".format(hours)
|
||||
elif 6 <= hours <= 12:
|
||||
hours = " |matin - {}h".format(hours)
|
||||
elif 13 <= hours <= 18:
|
||||
hours = " |apres-midi - {}h".format(hours)
|
||||
elif 19 <= hours <= 20:
|
||||
hours = " |crepuscule - {}h".format(hours)
|
||||
else:
|
||||
hours = " |nuit - {}h".format(hours)
|
||||
|
||||
player_class = (" |Guerrier", " |Voleur", " |Moine", " |Mage", " |Assassin")[player_class]
|
||||
|
||||
money = " |Argent: {} PO".format(money)
|
||||
|
||||
print("<o> Informations <o>")
|
||||
print(" |" + center(place, 17, " ") + "|")
|
||||
print(player_class + " " * (19 - len(player_class)) + "|")
|
||||
print(hours + " " * (19 - len(hours)) + "|")
|
||||
print(money + " " * (19 - len(money)) + "|")
|
||||
print("<o> ============= <o>")
|
||||
input()
|
||||
|
||||
|
||||
def display_stat(data, stat):
|
||||
capacities = ["{} ".format(i) if i < 10 else str(i) for i in stat[2]]
|
||||
|
||||
first_line = " |Vit : {0} Agi : {1}|".format(capacities[0], capacities[1])
|
||||
second_line = " |Att : {0} Def : {1}|".format(capacities[2], capacities[3])
|
||||
health = " |Vie : {} PV".format(stat[0])
|
||||
mana = " |Magie : {} PM".format(stat[2][4])
|
||||
|
||||
print("<o> {} <o>".format(center(stat[5], 13, " ")))
|
||||
print(first_line)
|
||||
print(second_line)
|
||||
print(mana + " " * (19 - len(mana)) + "|")
|
||||
print(health + " " * (19 - len(health)) + "|")
|
||||
print("<o> ============= <o>")
|
||||
input()
|
||||
|
||||
|
||||
def inventory(data, stat):
|
||||
weapon = weapons[stat[3][0]]
|
||||
shield = armors[stat[3][1]]
|
||||
|
||||
weapon = " |" + weapon + " " * (17 - len(weapon)) + "|"
|
||||
shield = " |" + shield + " " * (17 - len(shield)) + "|"
|
||||
|
||||
print("<o> Inventaire <o>")
|
||||
print(" |- Arme : |\n{}".format(weapon))
|
||||
print(" |- Armure : |\n{}".format(shield))
|
||||
print("<o> ============= <o>")
|
||||
input()
|
||||
|
||||
|
||||
def sleep(data, stat):
|
||||
sleep_hours = 0
|
||||
hours = "= {0} h ".format(stat[4] // 60)
|
||||
if stat[4] % 60 < 10: hours += "0{1} ="
|
||||
else: hours += "{1} ="
|
||||
|
||||
hours = center(hours.format(stat[4] // 60, stat[4] % 60), 21, " ")
|
||||
|
||||
while not sleep_hours:
|
||||
print(hours)
|
||||
print("Combien d'heures\nvoulez-vous dormir ?")
|
||||
sleep_hours = get_input() % 25
|
||||
if not sleep_hours or sleep_hours < 0: return
|
||||
|
||||
stat[4] += sleep_hours * 60
|
||||
if stat[0] < 100: stat[0] += sleep_hours // 2
|
||||
if stat[2][4] < 50: stat[2][4] += sleep_hours
|
||||
|
||||
|
||||
# If the player is at home
|
||||
if data[1] == 27:
|
||||
if stat[0] < 100: stat[0] += sleep_hours
|
||||
if stat[2][4] < 50: stat[2][4] += sleep_hours * 2
|
||||
|
||||
print_text("Vous vous reposez {0} heure{1}.".format(sleep_hours, ("", "s")[sleep_hours > 1]))
|
||||
|
||||
|
||||
def spell(data, stat):
|
||||
to_disp = "Magie : {} PM".format(stat[2][4])
|
||||
print("<o> Sorts <o>")
|
||||
print(" |" + to_disp + " " * (16 - len(to_disp)) + "|")
|
||||
for i in range(3):
|
||||
if i < len(stat[7]):
|
||||
spell_id, level = stat[7][i]
|
||||
if spell_id >= 0:
|
||||
to_disp = "{0} {1}".format(spells[spell_id], spells_level[level - 1])
|
||||
print(" |{}.".format(i + 1) + to_disp + " " * (14 - len(to_disp)) + "|")
|
||||
else:
|
||||
print(" |<aucun> |")
|
||||
|
||||
print("<o> ============ <o>")
|
||||
spell_choice = get_input()
|
||||
if not (1 <= spell_choice <= len(stat[7])): spell_choice = 0
|
||||
if spell_choice:
|
||||
spell_choice -= 1
|
||||
spell_id, level = stat[7][spell_choice][0], stat[7][spell_choice][1]
|
||||
capacity, factor, apply_on_player = spells_effect[spell_id]
|
||||
|
||||
if not apply_on_player:
|
||||
print_text("Vous ne pouvez pas lancer ce sort.")
|
||||
|
||||
elif stat[2][4] >= level * 10:
|
||||
msg = "".format()
|
||||
stat[2][4] -= level * 10
|
||||
pts = 12 * level + randint(-5, 5)
|
||||
|
||||
if capacity == 4:
|
||||
stat[0] += factor * pts
|
||||
else:
|
||||
stat[2][capacity] += factor * pts
|
||||
print_text("Vous lancez {0} de niveau {1} [-{2} PM] et {3} {4} points de {5}".format(spells[spell_id], spells_level[level - 1], level * 10, ("perdez", "gagnez")[factor > 0], pts, ("vitesse", "agilité", "attaque", "défense", "vie")[capacity]))
|
||||
|
||||
else:
|
||||
print_text("Vous n'avez plus assez de points de Magie.")
|
||||
|
||||
def quick_save(data, stat):
|
||||
data_copy = data[:]
|
||||
stat_copy = stat[:-1]
|
||||
print_text("\"{}\"".format(encode_save(data_copy, stat_copy)))
|
||||
|
||||
|
||||
# Misc functions
|
||||
def get_input(string=">"):
|
||||
string = input(string)
|
||||
try:
|
||||
return int(string)
|
||||
except:
|
||||
return 0
|
||||
|
||||
|
||||
def center(string, total_length, symbol):
|
||||
left = floor((total_length - len(string)) / 2)
|
||||
right = ceil((total_length - len(string)) / 2)
|
||||
|
||||
return left * symbol + string + right * symbol
|
||||
|
||||
|
||||
def stat_test(stat, test_id):
|
||||
score = (80 + randint(-20, 20)) * stat[test_id] / 50
|
||||
return randint(1, 100) <= score, floor(score)
|
||||
|
||||
|
||||
def init_stat():
|
||||
name = input("Entrez votre nom :\n>")
|
||||
while len(name) == 0 or len(name) > 13:
|
||||
print("Erreur : nom invalide.")
|
||||
name = input("Entrez votre nom :\n>")
|
||||
|
||||
player_class = 0
|
||||
while(not player_class):
|
||||
print("Choisissez une classe\n1. Guerrier\n2. Voleur\n3. Moine\n4. Mage\n5. Assassin")
|
||||
player_class = get_input()
|
||||
if player_class < 0 or player_class > 5: player_class = 0
|
||||
|
||||
if player_class == 1:
|
||||
stat = [6, 6, 10, 6, 6]
|
||||
elif player_class == 2:
|
||||
stat = [6, 10, 6, 6, 6]
|
||||
elif player_class == 3:
|
||||
stat = [6, 6, 6, 10, 6]
|
||||
elif player_class == 4:
|
||||
stat = [6, 6, 6, 6, 20]
|
||||
elif player_class == 5:
|
||||
stat = [10, 6, 6, 6, 6]
|
||||
|
||||
stat = [100, 10, stat, [0, 0], 360, name, player_class - 1, [], 1, -1]
|
||||
if player_class == 4:
|
||||
stat[7].append((1, 1))
|
||||
|
||||
return stat
|
||||
|
||||
|
||||
def encode_save(data, stat):
|
||||
xp = ["{0}-{1}".format(key, data[0][key]) for key in data[0] if key == "main" or data[0][key]]
|
||||
data = "{0},{1},{2},{3}".format(data[1], data[2], data[3], ",".join(xp))
|
||||
|
||||
stat[5] = 0
|
||||
if not stat[7]: stat[7] = 0
|
||||
else: stat[7] = ",".join(["{0}-{1}".format(i[0], i[1]) for i in stat[7]])
|
||||
|
||||
save_code = []
|
||||
for i in stat:
|
||||
if type(i) == list:
|
||||
for j in i: save_code.append(str(j))
|
||||
else: save_code.append(str(i))
|
||||
|
||||
return ",".join(save_code) + ".{}".format(data)
|
||||
|
||||
|
||||
def decode_save(save_code):
|
||||
stat, data = save_code.split(".")
|
||||
encoded_stat = stat.split(",")
|
||||
encoded_data = data.split(",")
|
||||
|
||||
encoded_stat = [encoded_stat[0], encoded_stat[1], encoded_stat[2: 7], encoded_stat[7: 9], encoded_stat[9], 0, encoded_stat[11], encoded_stat[12: -1], encoded_stat[-1], -1]
|
||||
|
||||
if encoded_stat[7] == ["0"]:
|
||||
encoded_stat[7] = []
|
||||
else:
|
||||
spells = []
|
||||
for spell in encoded_stat[7]:
|
||||
s_id, s_lv = spell.split("-")
|
||||
spells.append((s_id, s_lv))
|
||||
encoded_stat[7] = spells
|
||||
|
||||
stat = str_to_int(encoded_stat)
|
||||
|
||||
for i in range(len(stat[7])):
|
||||
stat[7][i] = tuple(stat[7][i])
|
||||
|
||||
# Money check
|
||||
if stat[1] < 0: stat[1] = 0
|
||||
if stat[1] > 100000: stat[1] = 100000
|
||||
|
||||
# Stat check
|
||||
for i in range(len(stat[2])):
|
||||
if stat[2][i] > 50: stat[2][i] = 50
|
||||
if stat[2][i] < 0: stat[2][i] = 0
|
||||
|
||||
# Player's class check
|
||||
if not (0 <= stat[6] <= 5):
|
||||
raise ValueError("classe du joueur inconnue")
|
||||
|
||||
# PLayer's name check
|
||||
name = input("Entrez votre nom :\n>")
|
||||
while len(name) == 0 or len(name) > 13:
|
||||
print("Erreur : Nom invalide")
|
||||
name = input("Entrez votre nom :\n>")
|
||||
stat[5] = name
|
||||
|
||||
xp = {}
|
||||
for quest in encoded_data[3:]:
|
||||
q_id, q_xp = quest.split("-")
|
||||
xp[q_id] = int(q_xp)
|
||||
data = [xp, int(encoded_data[0]), int(encoded_data[1]), int(encoded_data[2])]
|
||||
|
||||
return stat, data
|
||||
|
||||
|
||||
def str_to_int(data):
|
||||
result = []
|
||||
for i in data:
|
||||
if isinstance(i, (list, tuple)):
|
||||
result.append(str_to_int(i))
|
||||
else:
|
||||
result.append(int(i))
|
||||
return result
|
|
@ -1,322 +0,0 @@
|
|||
jotunheim = (r"""
|
||||
/\ /\ / / \ / \ /\ / \ ~~~~~~~~~~~~~~~~~~~~~~~
|
||||
/ \ / \ / / \ /\ / \ / \ /\ / \ /\ ~~~~~~~~~~~~~~~~~~
|
||||
/ \ /\ / \ /\ / / \ / \ / / / \ / \ / \ /\ ~~~~~~~~~~~~~~~~
|
||||
/ \ / \ /\ / \ / \ /\ / \ / \ /\ / / \ / /\ / / \ ~~~~~~~~~~~~~~
|
||||
/ /\ / / \ / / / \ / \ / \ /\ / / \ / \ / \ ~~~~~~~~~~~~
|
||||
/ \ / / \ / / \ /\ / / / \ / \ / \ /\ \ ~~~~~~~~~~
|
||||
/ \ / /\ / \ / / \ / \ / / \ /\ / \ / \ /\ \ ~~~~~~~~
|
||||
/ \ / \ /\ \ / \ / \ /\ / / \ / \ / / / \ ~~~~~
|
||||
/ / / \ ___ ### / \ / \ /\ / \ / \ /\ / / \ ~~~
|
||||
/\ / / \ /O O\ ##### / ### / / \ \ / \ / \ /\ / / \ /\ ~~
|
||||
/ \ /\ / / \ |_ | |=| ##### / / \ / ~/ / \ / \ / \ ~
|
||||
/ \ / ### \ |^|_| |=| / / \ ### ### ~/ / \ /\ / \ /\
|
||||
/ \ ##### ### / ### \ ##### ##### ~/ / \ / \ / \ / \
|
||||
\ / \ |=| ### ##### _______ ##### |=| |=| ~ / _ \ / \ /\ / /
|
||||
\ \ ##### |=| /[] []\ |=| ### ~~~~ __/o\ / ## \ / \ /\ / /
|
||||
\ /\ /\ |=| / \ ______ ##### ~~~~~ / | / #### / / \ / /
|
||||
~ \ / \ /\ / \ ### /___________\ ### / \ |=| ### ~~~~~ |____| ## / / \ /
|
||||
~~ / / \ / \ /\ ##### | | ##### /________\ ##### ~~~~~~ || / / \ /\
|
||||
~~ / / \ / \ / \ /\ |=| |[] |]O[| []| |=| |<o> <o>| ### |=| ~~~~~ / / \__
|
||||
~ / / \/ / / \ |___________| | __ | ##### ~~ _____ /\ / \
|
||||
~ / / / \ ### |__|__|__| |=| _ / \___ / \_ / \
|
||||
~~~ /\ / / \ /\ ### ##### __/o\ / \ / \ / \
|
||||
~~ / \__ / / \__ ##### |=| ### ### / o | /____________\ / \ ~
|
||||
~~~ / \ /\ / \ |=| ##### ### ##### |____| | O O O | _ /\ ~~~
|
||||
~~ / \ /\ / \__ / \ /\ ### |=| ##### |=| ## | _ | __/ \ / \_ ~~~
|
||||
~ / \/ \__ / \ \ / \ ##### |=| ## #### ## |__|^|_______| / | / \ ~~
|
||||
~ /\ / \ / \ /\ / \ |=| ## #### ## ## #### |____| / \ /\ ~~
|
||||
/ \__ / \ \ / \ / \ _ #### ## #### || ## ## ## / \_ ~
|
||||
/ \ / \ /\ /\ / \ __/ \ ## || ## || #### ## #### /\ / \ ~
|
||||
~~ \ / \ / \ \ /\ / | || || ## ## #### ## / \_ / \~
|
||||
~~ \ /\ / \ / \ / \ |____| ## ## #### ## || ## || / \ ~~
|
||||
~ /\ \/ \ /\ / \ \ /\ / \ #### #### ## #### || / \ /\ ~~~
|
||||
~ / \ / \ / \ /\ / \/ \ ## ## ## || ## ______ / \_ ~~
|
||||
/ \ / \ / \ / \ /\ / \ ## #### || || _ || / \ _ / \ ~~
|
||||
/ \ /\ /\ \ / \ / \ / _ \ #### ## / \ /________\ / \ /\ / \ ~~~~
|
||||
/\ / \ / \ / \ / \ / \ ## || ___ |_| |<o> <o>| |_| / \_ ~~~~
|
||||
/ \ / \ / \ / \ |_| || /[O]\ ___ | __ | /\ / \ /\ ~~
|
||||
/\ / \ / \ /\ | | /<o>\ |__|__|__| / \_ / \ / \_ ~~~
|
||||
\ \ /\ / \ ___ |___| | | / \ / \ ~~~
|
||||
\ /\ /\ / \ / \ / \ |___| / \ /\ \ ~~
|
||||
\ / \ / \ / \ / \ ______ |___| ______ _ /\ / \_ ~~
|
||||
/\ / \ \ /\ / \ / \ ______ / \ / \ / \_ / \ /\ ~
|
||||
/ \ \ \/ \ /________\ / \ /________\ |_| / \ / \ / \_ ~
|
||||
/ \ _ / \ | | _______________ /________\ |<o> <o>| / \ / \
|
||||
/ /\ \ / \ / \ | o o o o| / \ | [] [] | | _ | /\ /\ / /\ \
|
||||
/ \ |_| |________| / () () () () \ | | |__|^|___| / \_ / \_ / \_
|
||||
/ \ /\ /___________________\ |________| / _ \ / \ / \
|
||||
/ \/ \ ______ |_/ \_/ \_/ \_| / / \ \/ /\ \/ \
|
||||
/ \ _ / \ ### |I| |I| _ |I| |I| ______ |_| _/ \
|
||||
/ \ / \ /________\ ##### |I| |I|/_\|I| |I| / \ / \ /\
|
||||
/\ |_| ___ |<o> <o>| ### |I| |I|[^]|I| |I| ### /________\ _ \ _/ \
|
||||
/ \ /\ /<o>\ | | /-\ ##### ||]O[| | / \ /\ / \
|
||||
/ \ \ | | |________| ### ### ### | | |_| _/ \ / \
|
||||
/ \ \ /\ |___| ### ##### ##### /-\ |________| /\ / \ /\
|
||||
\/ \ ##### |=| |=| _/ \ / _/ \
|
||||
/\ / \ ~~~~~~~ ### ### / \ / \
|
||||
/ \ /\ / ~~~~~~~~~~|---- ### /-\ ### ### ### ##### / \ /\ / \ /\
|
||||
/ \ / \ ~~~~~~~~~~~~~~| ##### ##### ##### ##### ### _/ \ _/ \
|
||||
\/ \ ~~~~~~~~~~~~~~~| ### |=| |=| ### /-\ / \ /\ / \
|
||||
~~~ / \~~~~~~~~~~~~~~~|---- /-\ ### ~~~ /-\ / _/ \ / \
|
||||
~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~ ### ##### _~/~\~_ ### ___ / \
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ##### ### ### /~~|~|~~\ ##### /<o>\ /\ \
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ### ##### /-\ \_______/ ### | | /\ _/ \ /\ /\
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~ /-\ ### ### |=======| /-\ |___| _/ \ / \ _/ \ _/ \
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ /-\ ##### ### /~ \/ / \ / \
|
||||
~~~~~~~~~~~~~~~~~~~~ ### ### ### ##### /~ / \/ ## \
|
||||
~~~~~~~~~~~~~~~~ ##### ##### ### /-\ ___ ### ### ~~ ## ####
|
||||
~~~~~~~~~~~~ __ ### ### ##### /[O]\ ##### /-\ ~~ #### ## ######
|
||||
~~~~~~~~~~~ /()\ /-\ /-\ ### ___ | | ___ ___ ### ~~~ ###### #### ########
|
||||
~~~~~~~~~~ | =| /-\ /O O\ |___| /<o>\ /() \ /-\ ~~~ ######## ###### ## ######
|
||||
~~~~~~~~~ |= | ### | | | | | | ~~~~ ###### ######## #### ####
|
||||
~~~~~~~~ | =| ### ##### |___| |___| |___| ~~~~~~~ #### ###### ###### |--|
|
||||
~~~~~~ |= | ##### ### ___ ~~~~~~~~~~ ## |--| #### ########|--|
|
||||
~~~~~ /____\ ### /-\ /<o>\ ~~~~~~~~~~~~~~~~ #### |--| |--| ######
|
||||
~~~~~ ~~~~~~~~ /-\ | | ~~~~~~~~~~~~~~~~~ | ## ## ### |--| ## #### ##
|
||||
~~~~ ~~~~~~~~~~~~~~~~~ |___| ~~~~~~~~~~~~~~~~ | #### || ##### ## #### |--| ####
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~ ## ## | ## ##### #### ###### |--| ######
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~ ## #### #### | || ### ###### ######## ########
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | #### ## /\ /\ | ### |_| ######## ###### ######
|
||||
~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~ | /\ #### | ## ##### ###### #### ####
|
||||
~~~~~~~~~~~~~~ ### # |==| () /\ () | #### ##### #### |--| ## |--|
|
||||
~~~~~~~~~ ##### ### | /__\ __ /__\ | ## ### |--| |--| #### |--|
|
||||
~~~~~~ # ### # ##### | | |___/()\___| | | || |_| |--| ######
|
||||
~~~~~ ### __ |-| ### ### | ## |[]| [] [] |[]| | ### ### ######## ##
|
||||
~~~~ # ##### /()\ ##### |-| |#### | | __ | | | ##### ##### ## ###### ####
|
||||
~~~~ ### ### | \____ ### # | /\ |__|___|^^|___|__| ## | ##### ##### #### #### ######
|
||||
~~~~ ##### |-| | |]O[|\ |-| ### | #### | ### ### ###### ## |--| ########
|
||||
~~~~ ### | _ | ##### | /\ | |_| |_| ######## #### |--| ######
|
||||
~~~~~ |-| |____|^|_| # ### # | # # | ### ###### ###### ####
|
||||
~~~~~~ ### |-| ### |==|==|==|===| |=|==|==|==|==| ##### ## #### ######## |--|
|
||||
~~~~~~~~~ # ##### ##### ### ##### #### |--| ###### |--|
|
||||
~~~~~~~~~~~~ ### # ### ### # # ### ##### ### ###### |--| #### ##
|
||||
~~~~~~~~~~~~~ ##### ### |-| # |-| ### ### ##### ##### |_| ######## |--| ####
|
||||
~~~~~~~~~~~~~~ ### # ##### ### ##### ##### ##### ### ### ### ###### |--| ######
|
||||
~~~~~~~~~~~~~~~ |-| ### ### ##### ### ### ### ##### |_| ### ##### #### ## ## ########
|
||||
~~~~~~~~~~~~~~ ##### |-| ### |-| |-| |_| ##### ##### ##### |--| #### #### ######
|
||||
~~~~~~~~~~~~~ ### |-| ### ##### ### |--| ###### ###### ####
|
||||
~~~~~ ~~~~ |-| ~~~~~ # ### |_| ### ### |_| ######## ########|--|
|
||||
~~~~ ~~ ~~~~~~~ ~~~~~~~~~~ ### ##### ##### |_| ### ###### ###### |--|
|
||||
~~~ ~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~ # ##### ##### ##### ### ##### #### ## ####
|
||||
~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ### ### ### ### ### ##### ##### |--| #### |--|
|
||||
~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ##### |-| |_| ##### |_| ##### ### |--| ######|--|
|
||||
~~~ ~~~~~~~~~~~~~~ ~~~~~~~~~~ ### ##### ### |_| ######## ##
|
||||
~~~~ ~~~~~~~~~~~~ ~~~~~~~~ # |-| ### ### ### ### |_| ## ###### ####
|
||||
~~~~~ # ~~~~~ # ~~~~~~ ### ##### |_| ##### ##### #### #### ######
|
||||
~~~~~ ### # ~~ ### ~~~~~ ##### ##### ##### ##### ### ###### |--| ########
|
||||
~~~~ ##### ### ##### ### ### ### ### ##### ######## |--| ######
|
||||
~~~ ### ##### ### ### |-| ### |_| |_| |_| ##### ###### #### ##
|
||||
~~ |-| ### |-| ##### ##### ### ### ### #### ## |--| ####
|
||||
~~ |-| _ ##### ##### ##### |_| ##### |--| #### |--| ######
|
||||
~~ ## ## __/o\ ### ### ### ##### ### ##### |--| ###### ########
|
||||
~~~ #### #### / o | |_| |_| ### ##### ### ##### ### ######## ######
|
||||
~~~~~ ## ## |____| ### ########## ### |_| ##### |_| ###### ## #### ~
|
||||
~~~~~~~ || ___ || ## ##### ##### ### ##### ### ### ### #### #### |--| ~
|
||||
~~~~~~~~ /o o\ #### ##### ### |_| ##### |_|##### ##### |--| ###### |--| ~
|
||||
~~~~~~~~ |___| ~~~ ## ### ### ### |_| ### ##### ### ##### ## |--| ######## ~
|
||||
~~~~~ ~(~)~ || ## |_| ##### ##### ### |_| ### ### ##### ### #### ###### ~~
|
||||
~~~ (_____) #### ##### ##### ##### ##### |_| ##### |_| ###### ## #### ~~
|
||||
~~ _ |-----| ## ### ### ### ##### ### ##### ### ### ######## #### |--| ~~
|
||||
~~~ /-\ _ || ##### |_| |_| ### ### ##### ### ##### |_| ###### ###### |--| ~~
|
||||
~~~~ |^| __/o\ ~~~~ ##### ### ##### |_| ##### |_| ### ##### ### #### ######## ~~~~~~
|
||||
~~~~~~ / o | ~~~~~~~~~ ### ##### ##### ### ##### ### ##### |--| ###### ~~~~~~
|
||||
~~~~~~~~ |____| ~~~~~~~~~~~~~~ |_| ##### ### |_| ##### |_| ##### |--| #### ~~~~~~~~~~
|
||||
~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~ ### |_| ### ~~~~ ### |--| ~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|_| ~~~~~~~~~~~~~~~~|_| ~~~~~~~~~|_|~~~~~~~~~~~~|--|~~~~~~~~~~~~~~""",
|
||||
# Autres mondes (Jotunheim = 5)
|
||||
(11, 120, 1, 56, 42), # Vanaheim
|
||||
|
||||
# Maisons
|
||||
(29, 11, 31, 19, 14),
|
||||
(88, 25, 32, 14, 24),
|
||||
(89, 45, 33, 30, 24),
|
||||
(60, 50, 34, 34, 29), # Utgard
|
||||
(64, 85, 35, 24, 19), # Manoir du sud (1/2)
|
||||
(65, 85, 35, 25, 19), # Manoir du sud (2/2)
|
||||
(23, 88, 36, 19, 14), # Auberge
|
||||
)
|
||||
|
||||
|
||||
h_31 = (r"""
|
||||
|=====||=====|===========|======||=====|
|
||||
| /__\ | | /__\ |
|
||||
| |==| | _ | |==| |
|
||||
| (_) | |
|
||||
| |_| | __ |
|
||||
| ____ | | | |
|
||||
| |____| | |__| |
|
||||
| | _ | | | |
|
||||
|============| (_) | |__| |
|
||||
| | |_| | |
|
||||
| |=============|
|
||||
| | |
|
||||
| | |
|
||||
| | | |
|
||||
|============|====|^|====|=============|""",
|
||||
(19, 14, 5, 29, 11))
|
||||
|
||||
|
||||
h_32 = (r"""
|
||||
|=============================|
|
||||
|=============================|
|
||||
| |
|
||||
| |
|
||||
| |============================|
|
||||
| ____ ____ |=====____==========____=====|
|
||||
| \__/ \__/ \__/ \__/ |
|
||||
| | | | | | | | | |
|
||||
| | | | | | | | | |
|
||||
| |__| |__| |__| |__| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| ____ ____ ____ ____ |
|
||||
| \__/ \__/ \__/ \__/ |
|
||||
| | | | | | | | | |
|
||||
| | | | | | | | | |
|
||||
| |__| |__| |__| |__| |
|
||||
| |============================|
|
||||
| |============================|
|
||||
| |
|
||||
|============| |==============|
|
||||
|============|^|==============| """,
|
||||
(14, 24, 5, 88, 25))
|
||||
|
||||
|
||||
h_33 = (r"""
|
||||
|=======|---|=======| |=======|---|=======|
|
||||
|=======|---|=======| |=======|---|=======|
|
||||
| /_____\ | | /_____\ |
|
||||
| |=====| |===|]O[|==|]O[|===| |=====| |
|
||||
| |==================| |
|
||||
| _ _ |
|
||||
| (~) (~) |
|
||||
| __ __ |_| |_| __ __ |
|
||||
| | | | | | | | | |
|
||||
| |__| |__| |__| |__| |
|
||||
| | | | | | | | | |
|
||||
| |__| |__| _ _ |__| |__| |
|
||||
| | | | | (~) (~) | | | | |
|
||||
| |__| |__| |_| |_| |__| |__| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| _ _ _ _ |
|
||||
| (~) (~) (~) (~) |
|
||||
| |_| |_| |_| |_| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
|============================| |===========================|
|
||||
|=[]=[]=[]=[]=[]=[]=[]=[]=[]=|^|=[]=[]=[]=[]=[]=[]=[]=[]=[]|""",
|
||||
(30, 24, 5, 89, 45))
|
||||
|
||||
|
||||
h_34 = (r"""
|
||||
|======================| |======================|
|
||||
|======================| |======================|
|
||||
| | | |
|
||||
| | | |
|
||||
| |============| |
|
||||
| |============| |
|
||||
| ####### ####### |
|
||||
| ######### ######### |
|
||||
| ######### ######### |
|
||||
| ######### ######### |
|
||||
| ####### __ __ ####### |
|
||||
| (==) (==) |
|
||||
| |TT| |TT| |
|
||||
| |__| |__| |
|
||||
| ~~~ ~~~ |
|
||||
| ~~(~)~~ ~~(~)~~ |
|
||||
| /~~~T~~~\ /~~~T~~~\ |
|
||||
| \=======/ __ __ \=======/ |
|
||||
| (==) (==) |
|
||||
| |TT| |TT| |
|
||||
| |__| |__| |
|
||||
| ####### ####### |
|
||||
| ######### ######### |
|
||||
| ######### ######### |
|
||||
| ____######## ____ ____ ########____ |
|
||||
| |II|####### |II| |II| #######|II| |
|
||||
|==|II|================|II| |II|================|II|==|
|
||||
|==|II|================|II| |II|================|II|==|
|
||||
|II| |II| |II| |II|
|
||||
|II| |II|/|^=|\|II| |II| """,
|
||||
(34, 29, 5, 60, 50))
|
||||
|
||||
|
||||
h_35 = (r"""
|
||||
|================================================|
|
||||
|==|/\|=|/\|=|/\|=|/\|=|/\|=|/\|=|/\|=|/\|=|/\|==|
|
||||
| |
|
||||
| _ _ |
|
||||
| ### (~) (~) ### |
|
||||
| ##### |=| |=| ##### |
|
||||
| ### ### |
|
||||
| |=| |=| |
|
||||
| ### _ _ ### |
|
||||
| ##### (~) (~) ##### |
|
||||
| ### |=| |=| ### |
|
||||
| |=| |=| |
|
||||
| ### ### |
|
||||
| ##### _ _ ##### |
|
||||
| ### (~) (~) ### |
|
||||
| |=| |=| |=| |=| |
|
||||
| |
|
||||
| |
|
||||
|======================\ /======================|
|
||||
|==|/\|=|/\|=|/\|=|/\|=/^^\=|/\|=|/\|=|/\|=|/\|==|""",
|
||||
(24, 19, 5, 64, 85),
|
||||
(25, 19, 5, 65, 85))
|
||||
|
||||
|
||||
h_36 = (r"""
|
||||
|======================================|
|
||||
| |
|
||||
| _ _ _ _ |
|
||||
| (_) (_) (_) (_) |
|
||||
| |_| |_| |_| |_| |
|
||||
| |
|
||||
| |
|
||||
|=================| |====== =======|
|
||||
| | | [I] [I] |
|
||||
| +---+ +---+ | | /|\ /|\ |
|
||||
| | | | | | |
|
||||
| | | | | | |
|
||||
| +---+ +---+ | | [====] [====] |
|
||||
| | | [====] [====] |
|
||||
|=================|^^|=================|""",
|
||||
(19, 14, 5, 23, 88),
|
||||
(20, 14, 5, 23, 88))
|
||||
|
||||
jotunheim_entities = (
|
||||
[0, '?', 5, 60, 57, 'stand by'],
|
||||
[0, '?', 5, 23, 70, 'stand by'],
|
||||
[0, '?', 5, 60, 86, 'stand by'],
|
||||
["Utarg", '*', 5, 34, 56, 'stand by'],
|
||||
[0, '*', 5, 25, 10, 'stand by'],
|
||||
[0, '*', 5, 39, 20, 'stand by'],
|
||||
[0, '*', 5, 3, 28, 'stand by'],
|
||||
[0, '*', 5, 34, 45, 'stand by'],
|
||||
[0, '*', 5, 53, 49, 'stand by'],
|
||||
[0, '*', 5, 19, 51, 'stand by'],
|
||||
[0, '*', 5, 64, 64, 'stand by'],
|
||||
[0, '*', 5, 54, 70, 'stand by'],
|
||||
[0, '*', 5, 8, 72, 'stand by'],
|
||||
[0, '*', 5, 40, 75, 'stand by'],
|
||||
[0, '*', 5, 72, 87, 'stand by'],
|
||||
[0, '*', 5, 6, 98, 'stand by'],
|
||||
[0, '*', 31, 28, 4, 'stand by'],
|
||||
[0, '*', 32, 28, 6, 'stand by'],
|
||||
[0, '*', 33, 14, 7, 'stand by'],
|
||||
[0, '*', 33, 48, 5, 'stand by'],
|
||||
["Thrym", '*', 34, 26, 6, 'stand by'],
|
||||
["Gullveig", '*', 35, 17, 5, 'stand by'],
|
||||
["jotunheim_aubergiste", '*', 36, 27, 10, 'stand by'],
|
||||
[0, '*', 36, 0, 0, 'stand by'],
|
||||
[0, '*', 36, 0, 0, 'stand by'],
|
||||
)
|
|
@ -1,213 +0,0 @@
|
|||
midgard = (r"""
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~ ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~ ~~ ~~~~~~ ~~~ _ ~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~ ~~~ ~~~ ~~~ /-\ ~~~~~~~ ~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~ ~~~~~ ~~~ ~~~~ ~~~ |_| ~~~~~~~ ~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ ~~~~~~ ~~ ~~~~ ~~ ~~ ~~~~~ ~ ~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~ ~~~ ~ ~~~~~ ~~ ~~~ ~~~ ~~~~ ~~~~~ ~ ~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~ ~ ~~ ~~~~~ ~~~ ~~ ~~~~ ~~~ ~ ~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~ ~ ~~~~~ ~~~~ ~~~ ~~~ ~~ ~ ~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~ ~ ~ ~~~~~ ~~~~ ~~~~ ~~~ ~~~~ ~~ ~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~ ~ ~~~~~~ ~~~ ~~~~ ~~~ ~~~ ~ ~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~ ~ ~~ ~~ ~~~ ~~~ ~~~ ~~~~ ~ ~ ~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~ ~ ~~ ~~ ~~~ ~~~ ~~~~ ~~ ~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ ~ ## ~~~~ ~~~~ ~~~~~ ~ ~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /\ ~~ #### ~~~~~ ~~~ ~ ~~~ ~~ ~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ ~~ ~~~ / \ ## #### ~~ ~~ ~ ~~ ~ ~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~ ~ / \ ## #### ## ## ~ ~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~ ~ /\ #### #### ##|| #### ## ## ~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~ ~~~~ / \ ## #### ## #### ## #### #### #### ~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ ~ ~ \ #### ## || ######## ## ## #### ## #### ~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ /\ #### ##|| ## #### ##|| #### ## #### ## ~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~ / \ ## #### || ## #### #### ##|| #### ##|| ~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~ ~~~~~ / \ || #### || #### ## #### ## #### ~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ## ## || #### || #### ~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~ /\ || || ## ## ## ~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~ _/ \ /\ ## ||#### || ## ~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ / \ / \ #### ## #### #### ~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~ / /\ / \ ' . #### ## #### ## ## #### ~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~ ~~~ / \ ## #### #### ##|| #### ## ~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ /\ /\ / \ . || #### ## #### #### ##|| ~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~ / \ / \ /\ ## || #### ## #### ~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ / \ \ / \ . ' || ## || #### ~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~ ~~~~~~~~ / \ . || ## ~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~ ~ /\ ., ~~~ || ~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~ ~~ / \ . , ~(~)~ ### ~~~~~~~~~
|
||||
~~~~~~~~~~~ ~ ~~ ### / \ . /~(___)~\ ##### ~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~ ##### , . ### \~~~~~~~/ ### ~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~ ### ##### /-\ ### ~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~ ~~ /-\ ### . ### ##### ~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~ ~~ ~~ ##### , /-\ _____________ ### ~~~~~~~~~
|
||||
~~~~~~~~~~~~~ ~~ ~~~ ~~~ ### , ' / Midgard \ /-\ ~~~~~~~~~
|
||||
~~~~~~~~~~~~~ ~~~~~~~~~~~~ ~~~~~ /-\ . ' ' / \ ### ~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~ , , . ' /_ __ _ ___ _ __ _\ ##### ~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~ |_/ \_/ \_/ \_| ### ~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __ ### |_| |_| |_| |_| /-\ ~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ ### /[]\____ ##### ### ~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ ##### |_ o o \ ### _ ##### ~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~ ~~~~ ### |^|_____| /-\ _ /o\___ ### ~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~ /-\ /o\ |_ ]O[\ /-\ ~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ |_| |^|___| ~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ ### ' __ , ### _ ~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~ ##### / \ ##### / \ ~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~ ### ### ' |__| , ### |_| _ ~~~~~~
|
||||
~~~~~~~~ ##### /-\ ### /-\ /o\ ~~~~~~
|
||||
~~~~~~~~ _ ### ##### . , , |_| ~~~~~~
|
||||
~~~~~ /-\ ### /-\ ### . , . __ _ ~~~~~~
|
||||
~~~~~~~ |_| ##### /-\ ,. ' /[]\ / \ ~~~~~~~
|
||||
~~~~~~ ### ' . |__| |_| ~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~ /-\ . ' . __ _ ~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~ /<>\ _ /-\ ~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~ __ ' ' . |__| /o\ |_| ~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~ /<>\ ' ___ |_| _ ~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~ |__| / _\ .. /o\ ~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~ ' . |_|^| . _ _ |_| ~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~ ' /o\____/o\ ~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~ ' ' __ |==|==| o o |==|==| __ ~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~ ' /[]\ | | __ | | /<>\ ~~~~~
|
||||
~~~~~~~~~~~~~~~ ' |__| | |__|^^|__| | |__| ~~~~
|
||||
~~~~~~~~~~~~~~~~~ ___ | | ~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~ . /]O[\ | #### #### | ~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~ . |___| | #### #### | ~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~ ' , __ | #### #### | ~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~ / \ | | ~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~ . |__| | #### #### | ~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~ | #### #### | ~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~ | #### #### | ~~~~~~~~~~~~
|
||||
~~~~~~~ ### ### | | ~~~~~~~~~~~
|
||||
~~~~~~~~~ ### ##### ##### ### | + + | ~~~~~~~~~~~
|
||||
~~~~~~~~~ ##### ### ##### ##### |==|==|==| |==|==|==| ~~~~~~~~~~~
|
||||
~~~~~~~~~ ##### /|\ ### ### ### ~~~~~~~~~~
|
||||
~~~~~~~~~ ### ### /|\ ##### /|\ ~~~~~~~~~~
|
||||
~~~~~~~~ /|\ ##### ### ### ### ### ~~~~~~~~~
|
||||
~~~~~~~~ ##### ### /|\ ##### ##### ##### ### |--|--|--|~~~~
|
||||
~~~~~~~~~ ### ### ##### ##### ### ### ##### |~~~~
|
||||
~~~~~~~~~~ ##### /|\ ##### ### ### /|\ /|\ ### |~~~~
|
||||
~~~~~~~~~~~ ##### ### ##### /|\ /|\ |--|--|--|~~~~
|
||||
~~~~~~~~~~~~~ ### _ /|\ ##### ### ### ~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~ /|\ /-\ ### ### ##### ##### ~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~ |_| _ /|\ ##### ##### ##### ### ~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~ / \ _ ##### ### ### ### ##### ~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~ |_| / \ ### /|\ ##### /|\ ### ~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~ |_| /|\ ### /|\ ~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /|\ ~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~""",
|
||||
# Autres mondes (Migard = 3)
|
||||
(72, 6, 0, 126, 71), # Asgard
|
||||
(77, 62, 6, 93, 8), # Nidavellir
|
||||
(24, 90, 4, 78, 19), # Niflheim
|
||||
(10, 58, 1, 54, 29), # Vanaheim
|
||||
|
||||
# Maisons
|
||||
(42, 49, 25, 4, 16), # Ferme
|
||||
(76, 51, 26, 5, 11), # Auberge
|
||||
(44, 65, 27, 9, 16), # Maison du joueur
|
||||
(60, 69, 28, 24, 14), # Mesnie fortifiée (1/2)
|
||||
(61, 69, 28, 25, 14), # Mesnie fortifiée (2/2)
|
||||
)
|
||||
|
||||
|
||||
h_25 = (r"""
|
||||
|==|-|=======================|=========|
|
||||
|==|-|=======================|=========|
|
||||
| /-\ | | |
|
||||
| |___| | ______ | |
|
||||
| | |______| | |
|
||||
| | | |
|
||||
| | | |
|
||||
| |--| |--------| |--| |------|
|
||||
| |
|
||||
| |--| |--------| |--| |------|
|
||||
| | | |
|
||||
| | | |
|
||||
| | | |
|
||||
| | | |
|
||||
| |==============================|
|
||||
| |=|\/|=|\/|=|\/|=|\/|=|\/|=|\/||
|
||||
|\/|^|\/| """,
|
||||
(4, 16, 3, 42, 49))
|
||||
|
||||
|
||||
h_26 = (r"""
|
||||
|
||||
|---------|------------------|
|
||||
| | |
|
||||
| |==============[]==|
|
||||
| | |
|
||||
| | _ _ _ |
|
||||
| | |_| |_| |_| |
|
||||
| |_| |_| |_| |
|
||||
| |_| |_| |_| |
|
||||
| | |
|
||||
| |------------------|
|
||||
| |
|
||||
|---|^|---| """,
|
||||
(5, 12, 3, 76, 51))
|
||||
|
||||
|
||||
h_27 = (r"""
|
||||
|-----------------|
|
||||
|[====] | [====]|
|
||||
|[====] /_\ [====]|
|
||||
| |
|
||||
| + + |
|
||||
| | |=======|
|
||||
| | | |
|
||||
| | | |
|
||||
| | + |
|
||||
|=======| |
|
||||
| | + |
|
||||
| |- | | _ |
|
||||
| |_| + | |_| |
|
||||
| | |_| |
|
||||
| + | |_| |
|
||||
| | | |_| |
|
||||
|=======|^|=======| """,
|
||||
(9, 16, 3, 44, 65))
|
||||
|
||||
|
||||
h_28 = (r"""
|
||||
|__|
|
||||
|__|
|
||||
|------------| |--|__|--| |------------|
|
||||
| [===][===] | | /" "\ | | [===][===] |
|
||||
| [===][===] | | |____| | | [===][===] |
|
||||
| |------| |------| |
|
||||
| |
|
||||
| |
|
||||
| ______ ______ |
|
||||
| |\/||\/| |\/||\/| |
|
||||
| | | | | |
|
||||
|____________| | | |____________|
|
||||
|\/|=|\/|=|\/| | | |\/|=|\/|=|\/|
|
||||
|__+ +__|
|
||||
|\/|^^|\/| """,
|
||||
(24, 14, 3, 60, 69),
|
||||
(25, 14, 3, 61, 69))
|
||||
|
||||
midgard_entities = (
|
||||
[0, '?', 3, 29, 9, 'stand by'],
|
||||
[0, '?', 3, 53, 24, 'stand by'],
|
||||
[0, '?', 3, 66, 45, 'stand by'],
|
||||
[0, '?', 3, 52, 79, 'stand by'],
|
||||
["midgard_charretier", '*', 3, 39, 49, 'stand by'],
|
||||
[0, '*', 3, 8, 59, 'stand by'],
|
||||
[0, '*', 3, 66, 56, "stand by"],
|
||||
[0, '*', 3, 67, 46, 'stand by'],
|
||||
[0, '*', 3, 66, 56, 'stand by'],
|
||||
[0, '*', 3, 68, 71, 'stand by'],
|
||||
[0, '*', 3, 94, 85, 'stand by'],
|
||||
["Rosahil Green", '*', 26, 27, 6, 'stand by'],
|
||||
[0, '*', 26, 17, 7, 'stand by'],
|
||||
[0, '*', 26, 22, 7, 'stand by'],
|
||||
[0, '*', 26, 17, 8, 'stand by'],
|
||||
[0, '*', 26, 27, 8, 'stand by'],
|
||||
[0, '*', 28, 27, 6, 'stand by'],
|
||||
)
|
|
@ -1,219 +0,0 @@
|
|||
muspellheim = (r"""
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~
|
||||
~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ _ ~~~~~~
|
||||
~~~~~~~~ _ ### ~~~~~~~~~~~~~~~~~~~~~~~~~~~ /o\ ~~~~~
|
||||
~~~~~~~ /o\ ##### ~~~~~~~~~~~~~~~~~~~~~ ### /_|_\ ~~~~
|
||||
~~~~~~~ /_|_\ ### ~~~~~~~~~~~~~ ##### ~~~~~
|
||||
~~~~~~~~ /_\ ### ### ### _ _ _ ~~~~~
|
||||
~~~~~~~~~ ##### /_\ ##### / \__ /o\ /-\ ~~~~
|
||||
~~~~~~~~~ _ ### _ ### | <>\ /_|_\ |^| ~~~~
|
||||
~~~~~~~~ _ /o\ /_\ / \__ ### ### /_\ |____| ~~~~~
|
||||
~~~~ /o\ /_|_\ | <>\ ##### ##### _ ~~~~~~
|
||||
~~~ /_|_\ ### |____| ### ### ### /o\__ ~~~~~~
|
||||
~~~ ### ##### ##### /_\ /_\ ` |_ \ ~~~~~~
|
||||
~~~##### ### ##### ### `,.` , |^|__| ~~~~~~
|
||||
~~~############ ### ### ` /_\ ',` `, ~~~~~~
|
||||
~~~ ### ##### |=|### ##### , ' ` ' . ' ,, ` ```,'' . ~~~~~~
|
||||
~~~ |=| ### ##### ### ##### `' ., ` ' ','., ,`.. ,,`,,` ,`'. ` `` ~~~~~~~
|
||||
~~~ |=|### ########### ### , . ` ,.. ' ` ~~~~~~~~
|
||||
### ##### ### ##### |=|. ` ### `,. ### ~~~~~~~~~
|
||||
##### ### ##### |=| ### ### ##### ` ### ### ##### ~~~~~~~~~
|
||||
##### ##### ### |=| ` ' ##### ### ##### ### ##### ##### ### ##### ~~~~~~~~~
|
||||
### ##### |=| ### ,` ` ##### ##### ### ##### ### ##### ##### ##### ### ~~~~~~~~~
|
||||
|=| ### ### ##### , , ' ### ##### |=| ##### ##### ### ### ##### |=| ~~~~~~~~
|
||||
|=|##### ### ###### ' `. ` |=| ### ### ##### |=| |=| ### ### ~~~~~
|
||||
########### ### ,,,,. `.,''. |=| |=| ### ', |=| ##### ###
|
||||
### ##### |=| ' `' ### `, |=| .''` ### . ##### #####
|
||||
|=| ### ### ##### . ### ### ` ##### `'`. ### #####
|
||||
|=| ##### ### ##### ### ##### ##### ### ,##### ' . |=| ###
|
||||
### `,., ##### ##### ### ` ##### ### ##### ##### ##### ### ' |=|
|
||||
### #####` ` ,,. ### ##### |=| ##### ##### ### ### ##### ,|=| ` ,. . `` ,
|
||||
###### ### ######. '.` |=| ### .,` ### ##### |=| |=| ### ` . .,, ' ###
|
||||
########### ### .. |=| ' ### |=| ' ### |=| '. ', ### #####
|
||||
### ##### |=| '` ### ### ` ##### |=| ### ` ` ##### ### #####
|
||||
|=| ### ### `. ##### ##### ### ##### ### ##### '' ##### ##### ###
|
||||
|=|##### ### ,##### ##### ##### ### ' , ##### ### ##### `' `` ### ##### |=|
|
||||
##### ##### '### ### ##### |=| ,', ##### ##### ### ,`` ``,.' |=| ### ~~
|
||||
### ##### '|=| |=| ### `.`' ### ##### |=| , ' |=| ~~~~
|
||||
|=| ### |=| ### . ' . |=| ### .,` ### ~~~~~~
|
||||
### |=| , ### ##### `` ' |=| ,''. ### ##### ~~~~~~
|
||||
##### , ##### ### ##### ,,' `.,'. ##### ### ##### ~~~~~~~
|
||||
# ########## .,` ##### ##### ### `. , ` .,'. ##### ##### ### ~~~~~~~~~
|
||||
####### ### ` ` . ` ### ##### |=| ` , , ,` , ` ### ##### |=| ~~~~~~~~~
|
||||
##### |=| ... . ' ' |=| ### . ' ' `' `' |=| ### ~~~~~~~~~
|
||||
### ., |=| , . .' '' ., |=| ### ~~~~~~~~~
|
||||
|=| .` . `' ,'``,, ,,. , ,` ### ##### ~~~~~~~~~
|
||||
,, '' ',,, '` `,.` , ' '` ` ..` ##### ### ~~~~~~~~~
|
||||
### .'. .'` `'. ,' ' ,`,, ' , `'.. ### ### /_\ ~~~~~~~~~
|
||||
##### ### ` .'' ... `' . '` ### `,, /_\ ##### ~~~~~~~~
|
||||
/\ ### ##### ### .` ` ##### ',' . ### ~~~~~~~~
|
||||
/ \_ /_\ ### ##### .' ' ### ### ` `, ### /_\ ~~~~~~~~~
|
||||
/ \ /_\ ### ### `.` ,, __ #####/_\ .`,, `, ##### ~~~~~~~~~~
|
||||
/ \ /\ ##### /_ ` ### /o_\ ### ,.`,' ### ### ~~~~~~~~~~~~
|
||||
/ \_ ### .,. ##### |_^| /_\ ### .``,.` /_\ ##### ~~~~~~~~~~~~~
|
||||
\ / \ /_\ '' ### ### ##### .`` ### ~~~~~~~~~~~~~
|
||||
\ /\ / \ /\ '` /_\ ### ##### ### . ### /_\ ~~~~~~~~~~~~
|
||||
/ \_ / \_ ,,' ##### ### /_\ ,'' ##### ### ~~~~~~~~~
|
||||
/ \ / \ ` ### /_\ ### `.''. ### ##### ### ~~~~~~~~
|
||||
/ \ /\ / \ /\ '. /_\ ##### .'.', /_\ ### ##### ~~~~~~~
|
||||
/ \_ / \_ `' ### ### ,.. '` /_\ ### ~~~~~~~
|
||||
/ \ / \ `.'. ### ##### /_\ .` ',, ', /_\ ### ~~~~~
|
||||
/\ / \ /\ / \ ' . ##### ### `. ' ,` ### ##### ~~~
|
||||
/ \_ / \_ , '' , ., ### /_\ ### ' . ,` ##### ### ~~~
|
||||
/ \ / \ ,, '...`, , /_\ ##### . . ### ### /_\ ~~
|
||||
/ \ /\ / \ /\ . ,.`` ### ### ,. ` /_\ ##### ### ~~
|
||||
/ \_ / \_ .., ' ### ### /_\ ##### `` `' ### ##### ~~~~
|
||||
\ / \ / \ .,,##### ##### ### .`.``''` ### /_\ ### ~~~~~
|
||||
\ /\ / \ /\ / \ /\ . ,### ### /_\ '',. ##### ### /_\~~~~~~
|
||||
/ \_ / \_ / \_ ' /_\ /_\ ### , '` ### ##### ~~~~~~~
|
||||
/ \ / \ / \ '.. ### ##### ### ' ` /_\ ### ~~~~~~~
|
||||
/ \ /\ / \ /\ / ',' \ ,`''##### ### ##### '.,,` ,' /_\ ~~ ~~~~
|
||||
/ \_ / \_ ` .,'`'.,' `### /_\ ### , ',,,. ### ~~ ~~~~
|
||||
\ / \ / \ ',`. , `,,/_\ ### /_\ ',,`. ##### ~~ ~~~~
|
||||
\ /\ / \ /\ / \ /\ ' `. ` ', ##### '' ### ### ~~~~~ ~~~~
|
||||
/ \_ / \_ / \_ ` `., ### , ##### /_\ ~~~~~~ ~~~~
|
||||
/ \ / \ / \ .' /_\ ### ,` ### ~~~~ ~~~~
|
||||
/ \ /\ / \ /\ / \ /\ .. ##### ### `,' ### /_\ ### ~~~~~ ~~~~
|
||||
/ \_ / \_ / \_ ### ##### ` ##### #####~~~~~ ~~~~
|
||||
\ / \ / \ / \ ,. /_\ ### , ### ### ~~~ ~~~~
|
||||
\ /\ / \ /\ / \ /\ / \ . /_\ /_\ /_\ ~~~ ~~~~
|
||||
/ \_ / \_ / \_ .. ` .' ,' ~~~ ~~~~
|
||||
/ \ / \ / \ . .'''. ''`. ` `````..', ' ,..,, , . ~~~~ ~~~~
|
||||
/ \ /\ / \ /\ / \ /\ .,. . _ ,' ..,` ,', _ ` ~~~~ ~~~~
|
||||
/ \_ / \_ / \_ . (_) (_) ., ~~~~~ ~~~
|
||||
\ / \ / \ / \ |=|==|==|==|==||==|==|==|==|=| , ~~~~ ~~~
|
||||
\ /\ / \ /\ / \ /\ / \ /\ | () () | ~~~~~~ ~~~
|
||||
/ \_ / \_ / \_ / \_ | /__\ __ /__\ | . ~~~~~~ ~~~
|
||||
/ \ / \ / \ / \ | |o |__/()\__| o| | ~~~~~ ~~~~
|
||||
/ \ /\ / \ /\ / \ /\ / \ | | o|[] __ []|o | | `. ~~~~ ~~~~
|
||||
~~ / \_ / \_ / \_ | |__|__|^^|__|__| | , ~~~~~~~
|
||||
~~~~ / \ / \ / \ __ | | ~~~~~~~
|
||||
~~~~~ / \ / \ / \ /o \ | #### #### | .`' ~~~~~
|
||||
~~~~~~~ __ |__| | #### #### | `. ~~~~
|
||||
~~~~~~~ __ / \ __ | #### #### | , '` ~~~
|
||||
~~~~~~~ /()\|__| /<>\ | | ,,', ~~~
|
||||
~~~~~~~~ ~~~ |__| |__| |_ _ _ _| ` .'` ~~~
|
||||
~~~~~~~~~ ~~~~~~~~~~~ ~~~ (_) oo (_) (_) oo (_) . , ~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ',.. |=|==||==|=| '` |=|==||==|=| ', ~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ` ..` . . ` .'' ~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ` '` '' . . ` ``.` ~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ ', ''', ',. , , , ` ,.' ` ~~
|
||||
~~~~~~~~~~~~~~~~~~~ ~~~~~~~~ ~~~ ` . ' , ', ~~
|
||||
~~~~~~~~~~~~~~~~~ ~~~~~ __ ' ' , ~~
|
||||
~~~~~~~~~~~~~~~~~~~~ ~~~~~~ / o\ ### , ~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~ |__| ` ##### ~~~~ ,, ~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~ `' ### ~~~~~~~~~ .` ~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~ |_| ~~~~~~~~~~~ . . ' ~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~ ~~~~~~~~~~ ,, ,` ~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~ ' , ' ~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ . . ` ` ~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ' . ` ~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~ ~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~ ~~~~~~~~~ ~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~ ~~~~~~~~~~~~~ ~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~ ~~~~~~~~~~~~~ ~~~~~~~~~~~~~~ ~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~""",
|
||||
# Autres mondes (Muspellheim = 7)
|
||||
(92, 9, 6, 9, 57), # Nidavellir
|
||||
|
||||
# Maisons
|
||||
(87, 14, 42, 16, 14), # Auberge
|
||||
(47, 53, 43, 32, 14), # Armurerie
|
||||
(67, 89, 44, 24, 24),
|
||||
(68, 89, 44, 25, 24),
|
||||
)
|
||||
|
||||
|
||||
h_42 = (r"""
|
||||
|===================|
|
||||
| |
|
||||
|--[]---------------|
|
||||
| |
|
||||
| |
|
||||
| |=============|
|
||||
| |
|
||||
| |
|
||||
| +------+ +------+ +------+ |
|
||||
| | | | | | | |
|
||||
| | | | | | | |
|
||||
| +------+ +------+ +------+ |
|
||||
| |
|
||||
| |
|
||||
|==============|^|================|""",
|
||||
(16, 14, 7, 87, 14))
|
||||
|
||||
|
||||
h_43 = (r"""
|
||||
|====|--|============|--|=========|
|
||||
|====|--|============|--|=========|
|
||||
| /____\ /____\ |
|
||||
| |====| |====| |
|
||||
| |
|
||||
| |
|
||||
| +----+ +----+ +----+ |
|
||||
| | | | | | | |
|
||||
| +----+ +----+ +----+ |
|
||||
| |
|
||||
|=============================| |
|
||||
|=============================| |
|
||||
| |
|
||||
| |
|
||||
|[^]|""",
|
||||
(32, 14, 7, 47, 53))
|
||||
|
||||
|
||||
h_44 = (r"""
|
||||
|==|==|==|==|==|==|==|==|==|==|==|
|
||||
| |
|
||||
| ### ### |
|
||||
| ##### ##### |
|
||||
| ### ### |
|
||||
| ### |_| |_| ### |
|
||||
| ##### ##### |
|
||||
| ### ### |
|
||||
| |_| |_| |
|
||||
| |
|
||||
|=|/\|==|/\|=|/\|=| |=|/\|=|/\|==|/\|=|
|
||||
|=|\/|==|\/|=|\/|=| |=|\/|=|\/|==|\/|=|
|
||||
| |
|
||||
| ___ ___ ___ ___ |
|
||||
| | | | | | | | | |
|
||||
| |___| |___| |___| |___| |
|
||||
| | | | | | | | | |
|
||||
| |___| |___| |___| |___| |
|
||||
| |
|
||||
| [I] [I] |
|
||||
| /|\ /|\ |
|
||||
| [========] [========] |
|
||||
| [========] [========] |
|
||||
|=|/\|==|/\|=|/\|=|/\|=| |=|/\|=|/\|=|/\|==|/\|=|
|
||||
|=|\/|==|\/|=|\/|=|\/|=|^^|=|\/|=|\/|=|\/|==|\/|=|""",
|
||||
(24, 24, 7, 67, 89),
|
||||
(25, 24, 7, 68, 89))
|
||||
|
||||
muspellheim_entities = (
|
||||
[0, '?', 7, 66, 8, 'stand by'],
|
||||
[0, '?', 7, 65, 97, 'stand by'],
|
||||
[0, '*', 7, 20, 12, 'stand by'],
|
||||
[0, '*', 7, 78, 14, 'stand by'],
|
||||
[0, '*', 7, 54, 80, 'stand by'],
|
||||
[0, '*', 7, 59, 91, 'stand by'],
|
||||
[0, '*', 7, 39, 94, 'stand by'],
|
||||
[0, '*', 7, 29, 113, 'stand by'],
|
||||
["muspellheim_aubergiste", '*', 42, 6, 7, 'stand by'],
|
||||
[0, '*', 42, 14, 1, 'stand by'],
|
||||
[0, '*', 42, 11, 5, 'stand by'],
|
||||
[0, '*', 42, 2, 11, 'stand by'],
|
||||
[0, '*', 42, 31, 9, 'stand by'],
|
||||
["Berfrid", '*', 43, 24, 4, 'stand by'],
|
||||
[0, '*', 43, 13, 9, 'stand by'],
|
||||
[0, '*', 43, 6, 5, 'stand by'],
|
||||
[0, '*', 44, 13, 20, 'stand by'],
|
||||
[0, '*', 44, 13, 2, 'stand by'],
|
||||
)
|
|
@ -1,221 +0,0 @@
|
|||
nidavellir = (r"""
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~
|
||||
~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~
|
||||
~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~ _ ~~
|
||||
~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~ /-\ ~
|
||||
~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~ |^| ~
|
||||
/\ ~~~~~~~ /\ ~~~~~~~~~~~~~~~ `.
|
||||
\ /\ ~~~~~~ / \ /\ ~~~~~~~~ /\ ,. . ,, /\ /\
|
||||
\ / \ ~~~~~ / \ / \ /\ / \ /\ '` ,` / \ / \
|
||||
/ \ ~~~~ / / \ / \ / \ / \ /\ `, , / \ /
|
||||
/ ~~~~~ / / / \ /\ / / \ / \ / \ /
|
||||
/ ~~~~~ /\ / / \ / \ /\ / / / \ /\ / \ /\ /
|
||||
~~~~ / \ /\ / \ / \ / \ /\ / / \ / \ / \
|
||||
/\ ~~~~ / \ / \ / / \ / \ / \ / \ / \
|
||||
/ \ /\ ~~~~ / / /^\\ /_ / / \ / \ / \
|
||||
\ / \ ~~~ / / \ /-\ / / \ / \ / \
|
||||
/ ~~~~~ / \ |^| / \ /\ /\
|
||||
/ ~~~~~~ /\ / \ /\ / \ /\
|
||||
/ ~~~~~~ / \ /\ / \ / \ /\ / \ / \ /\
|
||||
/\ ~~~ / \ / \ /\ /\ / / \ / \ / / \ / \
|
||||
/ \ /\ ~~~ / / \ / \ / \ /\ / / / \/ / / \
|
||||
\ / \ /\ ~~~~ / / \ //^\ \ / \ /\ / /\ / \ / / \
|
||||
/ \ / \ ~~~~~ / / \ / / \ / \ / \ /\ \ / \
|
||||
/ / \ ~~~~~~ / / / / \ / /^\\ / \ /\
|
||||
/ / \ ~~~~~~~~~~ ## / / \ / / \ / \
|
||||
/\ / ## \ ~~~~~~~~~ #### / \ / / / \ /\
|
||||
/ \ /\ #### ## ~~~~~~~ ## / ## / \ \ /\
|
||||
\ / \ ## #### ~~~~~~~ || /\ #### / ## \ \ / \ /\
|
||||
//^\ \ || ## ~~~~~~~ / \ /\ ## #### / \ / \
|
||||
/ \ || ~~~~~~ /^\ \ / \ /\ || ## / /
|
||||
/ \ /\ ~~~~ / / \ / \ || / /
|
||||
\ /\ / \ /\ ~~~~~~ / / / \ ## /\ /
|
||||
\ / \ /\ //^\ \ / \ /\ ~~~~ / / \ #### / \ /\
|
||||
/ \ / \ / / \ / \ ~~~~ / \ ## / \ / \ /\
|
||||
/ / \ / / / \ ------ || / / \ / \
|
||||
/ / \ / / /^\ \ /\ ## / / /
|
||||
/ \ / \ -------- / \ /\ #### / /
|
||||
\ /\ /\ ~~~~ / \ / \ /\ ## /\ /
|
||||
\ / \ /\ / \ /\ ~~~ / / \ / \ || / \ /\
|
||||
/ \ / \ / /^\\ / \ /\ ~~~ / / / /^\ / \ / \ /\
|
||||
/ / \ / / \ / \ ~~~~~ / / \ / / \ / \
|
||||
/ / \ / / / \ ~~~~~~ /\ / \ / / /
|
||||
/ \ / / \ ~~~~~ / \ /\ ## / /
|
||||
\ /\ / \ ~~~~ / \ / \ /\ #### /\ /
|
||||
\ / \ /\ ~~~ / / \ / \ ## ## / \ /\
|
||||
/ \ / \ /\ ~~~ / / / \ #### || / \ / \ /\
|
||||
/ /^\ \ //^\ /\ ~~~~ / / \ ## . / / \ / \
|
||||
/ / \ / \ / \ /\ ~~~~~~~~~~ / \ || .'' / / /
|
||||
/ ~~/ /^\ \ / \ ~~~~~~~~~~~~ , / /
|
||||
\ /\ ~~ / / \ /\ ~~~~~~~~~~~~ . /\ /
|
||||
\ / \ /\ ~~~~~ / / \ / \ /\ ~~~~~~~~~~~~~~~~ .'` / \ /\
|
||||
/ \ / \ ~~~~) / \/ \ / \ /\ ~~~~~~~~~~~~~~ `.` / \ / \
|
||||
/ /_ \ (~~~~~ / / \ / \ ~~~~~~ ` / / \ /
|
||||
/ //-\ \ ~~~/ / / \ /\ ~~~~ . / / /
|
||||
/ |^| \ ~~~~~~~/ / \ / \ /\ ~~~~ ' / /
|
||||
\ /\ /\ ~~~~ / / \ / \ /\ ~~~~ , /
|
||||
\ / \ /\ / \ /\ ~~~~~~~ / / \ / \ ~~~~~ . /\
|
||||
/ \ / \ / \ / \ /\ ~~~~~~ / / \ ~~~~ / \
|
||||
/ / \ / / \ / \ , ~~~~ / / ~~ \ ~~~~ .' / \ /
|
||||
/ / \ / / / /^\\ ` ~~~~~~ / ~~ \ ~~~~ / /
|
||||
/ \ / / \ .,` (~~~~~~~~~~~~~~~~ ~~~~ ~~~~ .`, / /
|
||||
\ /\ / \ . ~~~~~~~~~~~~~~~ . /
|
||||
\ / \ /\ /\ ~~)/\ , ' ,, (~~~~~ ` /\
|
||||
/ \ / \ / \ /\ ~~ / \ /\ ,, / \
|
||||
/ / \ / \ / \ /\ ~~~ / \ / \ /\ /\ ~~) '., / \ /
|
||||
/ / \ / / \ / \~ / / \ / \ / \~~ /\ ` / /
|
||||
/\ / \/ / / \ / / / \ / \ / \ /\ /\ / /
|
||||
/ \ /\ / / \ / / \ / / \ / \ / \ /\ /
|
||||
/ \ / \ /\ /\ / \ / \/ / / \ / \ / \ /\
|
||||
/ \ / \ / \ /\ /\ / / \ / / \ / \
|
||||
/ / \ / \ / \ /\ / \ /\ / \/ / /
|
||||
/ / \ / / \ / \/ \ / \ /\ / / """,
|
||||
# Autres mondes (Nidavellir = 6)
|
||||
(93, 8, 3, 77, 62), # Midgard
|
||||
(9, 57, 7, 92, 9), # Muspellheim
|
||||
(39, 19, 8, 109, 66), # Svartalfheim
|
||||
|
||||
# Maisons
|
||||
(69, 26, 37, 15, 14), # Auberge
|
||||
( 7, 31, 38, 15, 14),
|
||||
(35, 38, 39, 14, 14), # Forge
|
||||
(22, 42, 40, 12, 14),
|
||||
(23, 51, 41, 10, 19),
|
||||
|
||||
|
||||
# Mines
|
||||
(27, 17, 6, 45, 24),
|
||||
(45, 24, 6, 27, 17),
|
||||
(23, 35, 6, 36, 62),
|
||||
(36, 62, 6, 23, 35),
|
||||
(51, 32, 6, 19, 49),
|
||||
(19, 49, 6, 51, 32),
|
||||
(72, 42, 6, 9, 49),
|
||||
(9, 49, 6, 72, 42),
|
||||
)
|
||||
|
||||
|
||||
h_37 = (r"""
|
||||
|============|===|===========|
|
||||
| | | |
|
||||
| +---+ |
|
||||
| | | |
|
||||
| | | | | |
|
||||
| +---+ | |===========|
|
||||
| | | |
|
||||
|============| | +---+ |
|
||||
| | | | | |
|
||||
| __ | | | | |
|
||||
| | | +---+ |
|
||||
| | | |
|
||||
| |__| | | |
|
||||
| | | |
|
||||
|=============|^|============|""",
|
||||
(15, 14, 6, 69, 26))
|
||||
|
||||
|
||||
h_38 = (r"""
|
||||
|=========|
|
||||
| [=====] |
|
||||
| |
|
||||
| +---+ |
|
||||
| | | |
|
||||
|=========| +---+ |========|
|
||||
| [====] [====] |
|
||||
| _ |
|
||||
| (_) |
|
||||
| |_| |
|
||||
|=========| |========|
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
|===|^|===| """,
|
||||
(15, 14, 6, 7, 31))
|
||||
|
||||
|
||||
h_39 = (r"""
|
||||
|===================|---|====|
|
||||
| /_____\ |
|
||||
| +---+ |=====| |
|
||||
| | | |
|
||||
| | | |
|
||||
| +---+ +------+ |
|
||||
| | | |
|
||||
| +------+ |
|
||||
| |
|
||||
| |
|
||||
| _ _ |
|
||||
| (O) (O) |
|
||||
| |_| |_| |
|
||||
| |
|
||||
|=|/\|=|/\|==|^|===|/\|=|/\|=|""",
|
||||
(14, 14, 6, 35, 38))
|
||||
|
||||
|
||||
h_40 = (r"""
|
||||
|=======|-|==================|
|
||||
|=======|-|==================|
|
||||
| /___\ |
|
||||
| |===| +------+ |
|
||||
| | | |
|
||||
| | | |
|
||||
| | | |
|
||||
| +------+ |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
|=========| |==============|
|
||||
|==========|^|===============|""",
|
||||
(12, 14, 6, 22, 22))
|
||||
|
||||
|
||||
h_41 = (r"""
|
||||
|==|==|==||==|==|==|
|
||||
| |
|
||||
| ### ### |
|
||||
| ##### #####|
|
||||
| ### ### |
|
||||
| /|\ /|\ |
|
||||
|==| |============|
|
||||
| _ [I] [I] |
|
||||
| (_) / \ /|\ |
|
||||
| |_| |
|
||||
| __ |
|
||||
| _ | | |
|
||||
| (_) |__| |
|
||||
| |_| | | |
|
||||
| |__| |
|
||||
| _ |
|
||||
| (_) [I] |
|
||||
| |_| /|\ |
|
||||
| |
|
||||
|========|^|=======|""",
|
||||
(10, 19, 6, 23, 51))
|
||||
|
||||
nidavellir_entities = (
|
||||
[0, '?', 6, 65, 7, 'stand by'],
|
||||
[0, '?', 6, 66, 58, 'stand by'],
|
||||
[0, '*', 6, 49, 21, 'stand by'],
|
||||
[0, '*', 6, 25, 31, 'stand by'],
|
||||
[0, '*', 6, 74, 46, 'stand by'],
|
||||
[0, '*', 6, 16, 55, 'stand by'],
|
||||
[0, '*', 6, 77, 61, 'stand by'],
|
||||
["Muin", '*', 37, 2, 1, 'stand by'],
|
||||
[0, '*', 37, 26, 1, 'stand by'],
|
||||
[0, '*', 37, 10, 5, 'stand by'],
|
||||
[0, '*', 37, 4, 10, 'stand by'],
|
||||
[0, '*', 37, 27, 8, 'stand by'],
|
||||
[0, '*', 38, 12, 3, 'stand by'],
|
||||
[0, '*', 38, 19, 7, 'stand by'],
|
||||
[0, '*', 39, 9, 2, 'stand by'],
|
||||
[0, '*', 39, 9, 4, "stand by"],
|
||||
[0, '*', 40, 14, 5, 'stand by'],
|
||||
[0, '*', 41, 10, 8, 'stand by'],
|
||||
[0, '*', 41, 12, 2, 'stand by'],
|
||||
)
|
|
@ -1,139 +0,0 @@
|
|||
niflheim = (r"""
|
||||
## ##### ##### ##### ##### ### ### ##### ##### ##### ### ### ### ### #####
|
||||
### ### ##### ### ##### /_\ ##### ##### ### ##### ##### ##### ##### ##### #####
|
||||
### /_\ ### /_\ ### ### ##### ### /_\ ### ### ### ##### ### ##### ##### ##### ###
|
||||
## /_\ ###/_\ ##### ### /_\ #####/_\##### ### ##### ### ### ### ### ### ### /_\
|
||||
_\ ### ##### ### ##### /_\ ### ##### ##### /_\ ##### /_\ /_\#####/_\##### ##### ###
|
||||
### ##### ########## ### ### ##### ### ### ### ### ### ### ##### ##### ##### #####
|
||||
##### ##### ### ##### /_\ ########## /_\ ### /_\##### ### /_\##### ##### ### ### ### ### ### #####
|
||||
##### ### /_\ ### ##### ### ### ##### ########## ##### ### ##### /_\#####/_\#####/_\ ###
|
||||
### ### /_\ ### /_\ ### /_\##### ##### ### ##### ### ##### ### ##### ##### /_\
|
||||
/_\##### ##### _ /_\ ##### ### /_\ ### /_\ ##### /_\ ### ### ###
|
||||
### ##### ### ##### _ |+| ### ### ### /_\ /_\ ### /_\ _ /_\ ##### ###
|
||||
#### ### ##### ### |+| |_| ##### /_\##### /_\ |+| #########
|
||||
#### /_\ ##### /_\ |_| ##### ##### _ |_| ### ####
|
||||
### ### ### ### |+| ___ ### /_\ ###
|
||||
/_\ /_\ _ /_\ /_\ |_| / \ ##### /_\
|
||||
### ### |+| |___| ##### ###
|
||||
##### ##### ' ' |_| ___ _ ### #####
|
||||
##### ##### __ / \ ` ' _ |+| /_\ #####
|
||||
### ### _ .' ,` /()\ |___| /-\ |_| ### ###
|
||||
/_\ /_\ |+| .` | |____ |^| _ ##### /_\
|
||||
### ### |_| '' |_ () \ _ `' ` |+| #####
|
||||
#### ##### ,, |^|_____| |+| ___ , |_| ###
|
||||
#### ##### , `` |_| / \ , ,., /_\ ###
|
||||
### ### ,` ` |___| ,, #####
|
||||
/_\ /_\ _ ' .` _ , _ #####
|
||||
### |+| _ , |+| .., |+| ###
|
||||
##### |_| _ |+| , |_| __ __ . |_| /_\
|
||||
##### |+| |_| . `, /<>\ ____ /<>\ ` ###
|
||||
### |_| , , ' | |____/O O\____| | ' _ ##### ###
|
||||
/_\ '' ' |[]| [] | | [] |[]| , |+| ##### ####
|
||||
### ___ `` '' | | | __ | | | ,'. |_| ### ### ####
|
||||
##### ### / \ ` . |__|____|/^^\|____|__| ,`` #####/_\ ###
|
||||
# ########## _ |___| ' ',, ` , ##### /_\
|
||||
## ### ##### |+| '` ` `' , ###
|
||||
## /_\ ### |_| `` _ ` _ .. _ ` /_\ ###
|
||||
# /_\ |+| . (o) ',',, (o) ``` _ ### #####
|
||||
\ ### '` . |_| ` /-\ ., /-\ , |+| ##### #####
|
||||
### ##### _ ,,, ` ` , , . |_| ##### ###
|
||||
##### ##### |+| ` ,` , '' . ` ` ` . ### /_\
|
||||
##### ### |_| _ _ ' .' _ ,'., ,, /_\ #
|
||||
### /_\ . |+| ___ (o) . (o) .`. ___ ### ##
|
||||
/_\ ### ` |_| / \ /-\ '', /-\ ', , / \ ##### ##
|
||||
##### ### , |___| , |___| ##### #
|
||||
##### ##### , ___ _ . _ `,.,`. ### /
|
||||
### #### ##### .`.` , , / \ (o) ' (o) ' . /_\ ###
|
||||
##### /_\ ### ', , |___| /-\ ,.` /-\ .. ___ _ #####
|
||||
##### /_\ _ `, ','. , `. / \ ` |+| #####
|
||||
### ### |+| '' _ ___ . . ` |___| ` |_| ###
|
||||
/_\ ##### |_| ' |+| / \ , , ___ ... ### /_\
|
||||
### ##### _ ', |_| |___| ', / \ ', ,''`' #####
|
||||
##### ### ___ |+| , |___| ` #####
|
||||
##### /_\ ___ / \ |_| '.` '` _ , ###
|
||||
### / \ |___| ,. ` ' ``', , |+| , ### /_\###
|
||||
## /_\ ### |___| _ . _ ` _ |_| . ##### #####
|
||||
### ##### , ___ |+| _ |+| . |+| ##### #####
|
||||
### ##### ., / \ |_| ' |+| |_| . |_| , ### ###
|
||||
## ### ., |___| _ ' |_| .`,` . /_\ /_\
|
||||
_\ /_\ ### ', |+| ___ ' '. ``,..' '.`.``` ,`..`'' ,, ###
|
||||
### ##### , |_| / \ `.`` ' ,..' ``'` .' ` , . ##### ###
|
||||
##### ##### . , |___| ' _ _ ##########
|
||||
##### ### '`` ,` |+| |+| ### ### #####
|
||||
### ### /_\ , ,' `` _ |_| |_| ### ##### /_\ ###
|
||||
/_\##### '. '``, ,.. ``, |+| ##### ##### ### /_\
|
||||
##### ### ### |_| ### ##### ### ##### ###
|
||||
### ##### ##### ##### ### /_\ ##### #####
|
||||
/_\ ##### ### ##### ### ### ##### /_\ ### #####
|
||||
### ### ##### ### ### ### ### ##### ##### ### ### /_\ ### ###
|
||||
##### /_\ ##### /_\ ##### ##### ##### ##### ##### ##### /_\ ### ### #####/_\
|
||||
##### ### ### ### ##### ##### ##### ### ### ### ##### ##### ##### #####
|
||||
### ##### /_\ ##### ### ### ### ### /_\ ### /_\ ##### ### ### ##### ### ##### ### ###
|
||||
/_\ ##### ### ##### /_\ ### /_\ ### /_\##### ##### ### ##### ### /_\ ##### ### ##### ### #####/_\
|
||||
### ### ##### ### ##### ##### ##### ##### ##### ### ##### ### ##### /_\ ##### /_\ #####
|
||||
### /_\ ##### ##### /_\ ##### ##### ### ### ### ##### /_\ ##### ##### ### ### ###
|
||||
##### ##### ### ### ### /_\ /_\##### ### ### ##### /_\ /_\ /_\
|
||||
##### ### /_\ /_\ /_\ ##### /_\ /_\ ### """,
|
||||
# Autres monde (Niflheim = 4)
|
||||
(78, 19, 3, 24, 90), # Midgard
|
||||
|
||||
# Maisons
|
||||
(38, 21, 29, 15, 14), # Librairie
|
||||
(70, 31, 30, 24, 19),
|
||||
(71, 31, 30, 25, 19),
|
||||
)
|
||||
|
||||
|
||||
h_29 = (r"""
|
||||
|============================|
|
||||
| [===][=--==/ \==-=-][===] |
|
||||
| [=-=][===-/ \==--][--=] |
|
||||
| [==-][=-=/ \-==][==-] |
|
||||
| |
|
||||
| |
|
||||
| [I] [I] [I] [I] |
|
||||
| /|\ /|\ /|\ /|\ |
|
||||
| |
|
||||
| |
|
||||
| [=--] [==-] [-=] [==-] |
|
||||
| [-==] [--=] [==] [--=] |
|
||||
| [===] [=-=] [==] [-==] |
|
||||
| |
|
||||
|=============|^|============|""",
|
||||
(15, 14, 4, 38, 21))
|
||||
|
||||
|
||||
h_30 = (r"""
|
||||
|======|----|=======| |=======|----|======|
|
||||
| /______\ | | /______\ |
|
||||
| | | |========| | | |
|
||||
| |======| |======| |
|
||||
| _ _ |
|
||||
| (_) (_) |
|
||||
| __ __ |_| |_| __ __ |
|
||||
| | | | | | | | | |
|
||||
| |__| |__| |__| |__| |
|
||||
| | | | | _ _ | | | | |
|
||||
| |__| |__| (_) (_) |__| |__| |
|
||||
| |_| |_| |
|
||||
| |
|
||||
| __ __ |
|
||||
| | | _ _ | | |
|
||||
| |__| (_) (_) |__| |
|
||||
| | | |_| |_| | | |
|
||||
| |__| |__| |
|
||||
| |========| |========| |
|
||||
|=============| |^^| |=============|""",
|
||||
(24, 19, 4, 70, 31),
|
||||
(25, 19, 4, 71, 31))
|
||||
|
||||
niflheim_entities = (
|
||||
[0, '?', 4, 88, 32, 'stand by'],
|
||||
[0, '*', 4, 95, 30, 'stand by'],
|
||||
[0, '*', 4, 57, 31, 'stand by'],
|
||||
[0, '*', 4, 39, 60, 'stand by'],
|
||||
[0, '*', 4, 108, 67, 'stand by'],
|
||||
["Merath", '*', 29, 5, 5, 'stand by'],
|
||||
["Hel", '*', 30, 37, 4, 'stand by'],
|
||||
[0, '*', 30, 17, 6, 'stand by'],
|
||||
)
|
|
@ -1,178 +0,0 @@
|
|||
svartalfheim = (r"""
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~ __ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~ /<>\ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __ ~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~ ## |__| ## ## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /<>\ ~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~ #### ## |__| #### ## #### ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |__| ~~~~~~~~~~~
|
||||
~~~~~~~~~~~ #### #### |__| #### #### #### ~~~~~~~~~~~~~~~~~~~~~~~~~ ## |__| ~~~~~~~~~~
|
||||
~~~~~~~~~ ## #### ## #### ## /\ __ ## #### |__| ~~~~~~~~
|
||||
~~~~~~~~ || ## ## || ## || / \ /\ /<>\ #### #### ## ## ~~~~~~~
|
||||
~~~~~~~ ## || #### || /\ / \ /\ / \ |__| #### ## #### #### ~~~~~~
|
||||
~~~~~~ #### ## #### ## ## / \ / \ \ /\ |__| ## || #### #### ## ~~~~~~
|
||||
~~~~~ #### #### ## ## #### #### / \ /\ / /\ / \ |__| __ || __ ## ## #### ~~~~~
|
||||
~~~~ ## ## #### #### || #### #### / \ / \ / \ ## /<>\ /<>\ || ## || #### ~~~~
|
||||
~~~ #### || ## ## #### ## ## / \ /\ \ /\ #### |__|_____|__| #### ## ~~~
|
||||
~~~ #### #### || ## ## || || /\_ / \ / \ #### |__|O _ O|__| ## #### ## || ~~~
|
||||
~~~ ## #### || #### /\_ / \ / \ /\ \ ## ## |__|_|^|_|__| #### ## #### ~~~
|
||||
~~~ || ## #### / \ / \ / \ || #### #### || #### ## ~~~
|
||||
~~ ## || ## ## / \ /\ / \ /\ #### ~~~~~~ ## ## #### ~~~
|
||||
~~ #### #### || /\ / \ ~~~~~ / \ ## ~~~~~~ || || #### ~~~~
|
||||
~~ #### #### ## ## / \ \ /\ ~~~ / \ ## || ## ~~~~ ## ~~~ ## ~~~~~
|
||||
~~ __ ## ## ## #### #### / \ /\ / \ ~~ #### #### #### ##~~~~ __ || ~~~~~~
|
||||
~~ /<>\ || #### || #### #### /\_ /\ / \ /\ ~~~ #### #### ## ######## ~~~ /<>\ ~~~~~~~~~
|
||||
~~ |__| #### ## ## / \ / \ \ / \ ~~~~ ## ## #### ## ## #### ~~~ |__| ~~~~~~~~~~~
|
||||
~~~ |__| ## || ## || / \ /\/ \ /\ / \ /\ ~~~~~ || || #### #### || ## ~~ |__| ~~~~~~~~~~~
|
||||
~~~~ |^_| || ## #### / \ / \ / \ ~~~~~~~ ## #### || ~~~ |__| ~~~~~~~~~~~~
|
||||
~~~~~ #### #### /\ / \ /\/ \ / \ ~~~~~~~ || ## ~~~~~~ ~~~~~~~~~~~~~
|
||||
~~~~~~~ ### #### ## / \ / \ ~ ~~~~~~ || ~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~
|
||||
~~~~~~~~ ##### ## || / \ /\ / \ /\ ~~~ ~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~ ### || ### / \ / \ ~~~~ ~~~~~~~~ ~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~ /-\ ##### /\_ / \ /\ / \ /\ ~~~~~ __ |==|~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~ ### / \ / \ / \ ### ### /<>\___ | |~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~ ### /-\ / \ / \ /\ / \ /\_ ##### ##### | <o>\ | | ~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~ ##### ### /\ / \ / \ ### ### |_ | ~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~ ### ##### ### / \ / \ /\ / \ ### /|\ /|\ |^|____| ~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~~~~~~ /-\ ### ##### / \ /\ / \ ##### ### ~~~~~ ~~~~~~~~~
|
||||
~~~~~~~~~~~~ ### /-\ ### / \ ~ / \ /\_ ### ### ##### ~~ ~~~~~~~~
|
||||
~~~~~~~~~~~~ ### ##### /-\ /\_ / \ ~~~ / \ /|\ ##### ### ~~~~~~~
|
||||
~~~~~~~~~~~~ ##### ### ### / \ ~~~ / \ ### /|\ ### ~~~~~~
|
||||
~~~~~~~~~~~ ### /-\ ##### / \ /\_ ~~~ ### /|\ ##### ### __ ~~~~~
|
||||
~~~~~~~~~~ /-\ ### / \ ~~~ ##### ### ##### /<>\ ~~~~~
|
||||
~~~~~~~~~ ### /-\ /\_ / \ ~~ ### /|\ ### |__| ~~~~~~
|
||||
~~~~ __ ##### / \ /\ ~~~~~~ /|\ ~~~~~~~~~ /|\ |__| ~~~~~~~
|
||||
~~~ /<>\ ### ### /\ / \ /\_ / \ ~~~~~~~~~~~~~ ~~~~~~~~ |__| ~~~~~~~~~
|
||||
~~~ |__| ### /-\ #####/ \ / \ /\ ~~~~~~~~~~~~~~~ ~~~~~~~~~~~
|
||||
~~~ |__| ##### ### /\ / \ / \ ### ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~ |__| ### /-\ /\ / \ /\ /\ ##### ### ~~~~~~~~~~~~~~~~~~~~~
|
||||
~~~~~~ /-\ _ __ / \ / \ /\ / \ ####### ##### ~~~~~~~~~~~~~
|
||||
~~~~~~~~~ / \ / \ /\ /\ / \ #|-|# ### ### ### __ ~~~~~~~~~~~~
|
||||
~~~~~~~~~ ## |_| |__| / \ /\ / \ ### ### |_| ##### /-\ ### ##### /<>\ ~~~~|==|~~~
|
||||
~~~~~~~~~~ #### ## / \ ## ##### ##### ####### ### ##### ### |__| ~~~~| |~~~
|
||||
~~~~~~~~~~~ _ #### #### ####### ####### #|-|# ##### ### ### /-\ |__| ~~~~ | |~~~
|
||||
~~~~~~~~~~~ ## __ / \ _ __ ## #|-|# #|-|# |_| ### ##### /-\ |__| ~~~~~~ ~~~
|
||||
~~~~~~~~~~ #### / \ |_| / \ / \ #### |_| |_| ### /-\ ### ~~~~~~~ ~~~
|
||||
~~~~~~~ ## |__| ## |_| |__| ##### /-\ ### ~~~~~~~~~~~ ~~~
|
||||
~~~~~~ #### #### ####### ##### ~~~~~~~~~~~~ ~~~
|
||||
~~~~ _ __ ## ___________________ #|-|# ### ~~~~~~~~~~~~ ~~~
|
||||
~~~ ## __ / \ / \ #### /_|]O[|_|]O[|_|]O[|_\ |_| ### ### /-\ ~~~~~~~~~~ ### ~~~
|
||||
~~~ __ #### / \ |_| |__| /_____________________\ ##### ##### __ ~~~~~~~~~ ##### ~~~~
|
||||
~~ /<>\ |__| __ |_/___\_/___\_/___\_| ####### ### /<>\ ~~~~~~~~~~ ### ~~~~~
|
||||
~~~ |__| / \ |_| |_|/^\|_| |_| #|-|# /-\ |__| ~~~~~~~~~~ /-\ ~~~~~
|
||||
~~~ |__| __ |__| |_| ### |__| ~~~~~~~ ### ~~~~~
|
||||
~~~~~ |__| ## ## / \ _ ##### ### |__| ~~~~~~ ##### ~~~~~
|
||||
~~~~~~~ #### #### |__| ## ### / \ ### ### ##### ~~~~~~~ ### ### ~~~~~
|
||||
~~~~~~~~~~~~~ #### ##### |_| ##### /-\ ### ~~~~~~~~~~ /-\ ##### ~~~~
|
||||
~~~~~~~~~~~~~~~ ## ####### ####### /-\ ~~~~~~~~~~ _ ### ~~~
|
||||
~~~~~~~~~~~~~~~~~ #### __ #|-|# ### __ #|-|# ### ~~~~~~~~~~ /-\ /-\ ~~
|
||||
~~~~~~~~~~~~~~~~~ /<>\ |_| ##### /<>\ |_| ##### ~~~~~~~~~~~ |^| ~~
|
||||
~~~~~~~~~~~~~~~~~~ |__| ####### ### |__| ####### ~~~~~~~~~~~~ ### ~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~ |__| ~~~~ #|-|# ##### |__| #|-|# ~~~~~~~~~~~~ ##### ~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~ |__| ~~~~~~ |_| ####### |__| ~~~ |_| ~~~~~~~~~~~ ### ### ~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~ #|-|# ~~~~~~~~~ ~~~~~~~~~~~~~ ##### /-\ ~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ |_| ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~ ### ~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~ ~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~ /-\ ~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~""",
|
||||
# Autres mondes (Svartalfheim = 8)
|
||||
(109, 66, 6, 39, 19), # Nidavellir
|
||||
|
||||
# Maisons
|
||||
(90, 15, 45, 24, 19), # Manoir au Nord
|
||||
( 6, 24, 46, 9, 9), # Tour de guet
|
||||
(91, 33, 47, 1, 14), # Mesnie à côté du quai
|
||||
(57, 59, 48, 19, 14), # Palais des Elfes noirs
|
||||
)
|
||||
|
||||
|
||||
h_45 = (r"""
|
||||
|
||||
|=================| |==================|
|
||||
| | | |
|
||||
| |===========| |
|
||||
| __ __ |
|
||||
| | | | | |
|
||||
| |__| [O] [O] |__| |
|
||||
| | | |_| |_| | | |
|
||||
| |__| |__| |
|
||||
| |
|
||||
| [O] [O] |
|
||||
| __ |_| |_| __ |
|
||||
| | | | | |
|
||||
| |__| |__| |
|
||||
| | | [O] [O] | | |
|
||||
| |__| |_| |_| |__| |
|
||||
| |
|
||||
| |====| |====| |
|
||||
|=================| | | |==================|
|
||||
|^| """,
|
||||
(24, 19, 8, 90, 15))
|
||||
|
||||
|
||||
h_46 = (r"""
|
||||
|===||=============|
|
||||
| /__\ |
|
||||
| |==| +--+ |
|
||||
| | | |
|
||||
| | | |
|
||||
| | | |
|
||||
| +--+ |
|
||||
| |
|
||||
| |
|
||||
|=======|^|========|""",
|
||||
(9, 9, 8, 6, 24))
|
||||
|
||||
|
||||
h_47 = (r"""
|
||||
|=========|
|
||||
| [-=-==] |
|
||||
| [===--] |
|
||||
| |
|
||||
| |==================|
|
||||
| |
|
||||
| __ __ |
|
||||
| | | | | |
|
||||
| |__| |__| |
|
||||
| | | | | |
|
||||
| |__| |__| |
|
||||
| | | | | |
|
||||
| |__| |__| |
|
||||
| |
|
||||
|^|==========================|""",
|
||||
(1, 14, 8, 91, 33))
|
||||
|
||||
|
||||
h_48 = (r"""
|
||||
|======================================|
|
||||
| |
|
||||
| |
|
||||
| ~~~~ |
|
||||
| __ ~~(~~)~~ __ |
|
||||
| | | ~(______)~ | | |
|
||||
| |__| (__________) |__| |
|
||||
| | | | | |
|
||||
| |__| |__| |
|
||||
| |
|
||||
| |
|
||||
| |
|
||||
| \__/ \__/ \__/ \__/ |
|
||||
|==| |======| |=| |=| |======| |==|
|
||||
| | | | |^=| | | | | """,
|
||||
(19, 14, 8, 57, 59))
|
||||
|
||||
svartalfheim_entities = (
|
||||
[0, '?', 8, 113, 37, 'stand by'],
|
||||
[0, '*', 8, 104, 30, 'stand by'], [0, '*', 8, 120, 49, 'stand by'],
|
||||
[0, '*', 8, 105, 46, 'stand by'],
|
||||
[0, '*', 8, 22, 50, 'stand by'],
|
||||
[0, '*', 8, 15, 54, 'stand by'],
|
||||
[0, '*', 8, 25, 61, 'stand by'],
|
||||
[0, '*', 8, 121, 68, 'stand by'],
|
||||
[0, '*', 45, 15, 4, 'stand by'],
|
||||
[0, '*', 46, 13, 2, 'stand by'],
|
||||
[0, '*', 46, 13, 4, 'stand by'],
|
||||
[0, '*', 47, 3, 4, 'stand by'],
|
||||
[0, '*', 47, 15, 8, 'stand by'],
|
||||
[0, '*', 48, 34, 5, 'stand by'],
|
||||
[0, '*', 48, 29, 8, 'stand by'],
|
||||
)
|
|
@ -1,113 +0,0 @@
|
|||
vanaheim = (r"""
|
||||
/ \ / \ /\ / \ / \ /\ /
|
||||
/\ / \ / \ / \ /\ / \ / \ / \ /
|
||||
/ \ / \ /\ / \ / \ / \ / /\ / \
|
||||
/ \ /\ / \ / /\ / \ / \ / \
|
||||
/\ / \ / \ / \ / \ / /\ \ /\/ \
|
||||
/ \ / \ / \ /\ / \ / \ / \ /\ /
|
||||
/ \ / \ / \ / / \ / / \ /\ /\ /
|
||||
/ \ /\ /\ / \ / \ / \/ \ / \ /
|
||||
/ \ / \ / \ _ / / \ \ /\ /
|
||||
/\ / \ / \ / \_ / / \
|
||||
/ \ / \ /\ / \ __ |_ o\ /\ / \
|
||||
/ \ / \ _ /<>\ |^|_| / \
|
||||
/ \ /\ / \ /o\ |__| / \ /\
|
||||
/ \ / \ |_| _ / \ / \
|
||||
/\ / \ /\ ### . ###### ###### /o\ /\ /
|
||||
\ / / \ ##### ### ###### ###### |_| / \ /
|
||||
\ /\ / \ ### '. ##### ##### ##### / \ /\
|
||||
\ / \ / \ /|\ ` ### #### #### ### / \ / \
|
||||
/ \ __ /|\ ##### /\ / \
|
||||
/\ / \ /\ / \ .`' #### #### ### / \ /
|
||||
/ \ / \ |__| ##### ##### /|\ / \
|
||||
\ / \ ,' . `` ###### ###### / \ /\
|
||||
\ /\ / \ /\ '`'., ###### ###### ### / \
|
||||
/ \ / \ ### ``' ##### / \ /
|
||||
/\ / \ / \ ##### _ __ ### /\ / \ /
|
||||
\ / \ /\ / ### / \ ' /<>\ ` /|\ / \ /
|
||||
\ / \ /|\ |_| . |__| .' / \ /\ /
|
||||
\ /\ / \ ` ``' ### , _ / \ / \
|
||||
/ \ / \ /\ _ ##### ', /-\ / \
|
||||
/ \ / \ . / \ ### , |_| /\ \ /
|
||||
/ \ /\ / \ |_| /|\ , ` / \ /
|
||||
/ \ / \ ,. _ ',` '' / \ /\
|
||||
/ \ ### _/ \ ### _____ ' / \ / \
|
||||
/ \ /\ ##### /o | ##### /_____\ `' /\ / \
|
||||
/\ / \ ### `'.|___| ### |<>_<>| / \ /
|
||||
/ \ / \ /|\ '',., /|\ |_|^|_| , / \
|
||||
/ \ /\ / \ __ `,'.``` .', .``' ` / \ /\
|
||||
/ \ / \ /<>\ ### ,,.' / \
|
||||
/ \ |__| ##### ### / \
|
||||
/\ / \ /\ ' ### ##### /\ \
|
||||
/ \ / \ ` /|\ _ ### _ / \
|
||||
/ \ / \ /\ .. /o\ ./|\ /o\ / \ /\
|
||||
/ \ /\ / \ / \ .'' |_| ,'`' ',` |_| /\ / \ /
|
||||
/ \ / \ ,., .,`, /\ ', ,` / \ /
|
||||
/\ / \ /\ / \ /\ / \ / \ /\ /
|
||||
/ \ / \ / \ / \ /\ / \ /\ / \ / \
|
||||
/ \ / \ / \ / \ /\ / / \ /\ / \
|
||||
/ \ / \ /\ / / \ / \ / \ / \ / \
|
||||
/ \ / / \ / / \
|
||||
/ \ / \ / \ """,
|
||||
# Autres mondes (Vanaheim = 1)
|
||||
(28, 13, 2, 14, 68), # Alfheim
|
||||
(54, 29, 3, 10, 58), # Midgard
|
||||
(56, 42, 5, 11, 120), # Jotunheim
|
||||
|
||||
# Maisons
|
||||
(44, 11, 21, 5, 9), # Auberge
|
||||
(52, 35, 22, 20, 19),
|
||||
)
|
||||
|
||||
|
||||
|
||||
h_21 = (r"""
|
||||
|=======================|
|
||||
| | |
|
||||
| |-------------|
|
||||
| |
|
||||
| +--+ +--+ +--+ |
|
||||
| | | | | | | |
|
||||
| +--+ +--+ +--+ |
|
||||
| |
|
||||
| |
|
||||
|===|^|=================|""",
|
||||
(5, 9, 1, 44, 11))
|
||||
|
||||
|
||||
h_22 = (r"""
|
||||
|=======================|==============|
|
||||
|=======================|==============|
|
||||
| | |
|
||||
| _ _ | __ |
|
||||
| (_) (_) | |__| |
|
||||
| |=| |=| | |__| |
|
||||
| |_| |_| | |__| |
|
||||
| | |
|
||||
| | |
|
||||
| |=] [|] [==========|
|
||||
| _ _ | |
|
||||
| (_) (_) | |
|
||||
| |=| |=| | |=======[]=======|
|
||||
| |_| |_| | | |
|
||||
| | | |
|
||||
| | | |
|
||||
| | | |
|
||||
| | | |
|
||||
|/\=/\=/\=/\=/\=/\=| |=/\=/\=/\=/\=/\==|
|
||||
|\/=\/=\/=\/=\/=\/=]^[=\/=\/=\/=\/=\/==|""",
|
||||
(20, 19, 1, 52, 35))
|
||||
|
||||
vanaheim_entities = (
|
||||
[0, '?', 1, 42, 20, 'stand by'],
|
||||
[0, '?', 1, 26, 29, 'stand by'],
|
||||
["vanaheim_charretier", '*', 1, 45, 39, 'stand by'],
|
||||
[0, '*', 1, 31, 12, 'stand by'],
|
||||
[0, '*', 1, 41, 45, 'stand by'],
|
||||
[0, '*', 1, 52, 22, 'stand by'],
|
||||
[0, '*', 1, 52, 30, 'stand by'],
|
||||
["vanaheim_aubergiste", '*', 21, 8, 1, 'stand by'],
|
||||
[0, '*', 21, 21, 6, 'stand by'],
|
||||
["Freyja", '*', 22, 2, 8, 'stand by'],
|
||||
["Freyr", '*', 22, 36, 3, 'stand by'],
|
||||
)
|
|
@ -132,7 +132,7 @@ h_24 = (r"""
|
|||
|
||||
alfheim_entities = (
|
||||
[0, '?', 2, 34, 20, 'stand by'],
|
||||
["alfeim_charretier", '*', 2, 23, 17, 'stand by'],
|
||||
[0, '*', 2, 23, 17, 'stand by'],
|
||||
[0, '*', 2, 11, 4, 'stand by'],
|
||||
[0, '*', 2, 46, 6, 'stand by'],
|
||||
[0, '*', 2, 27, 54, 'stand by'],
|
||||
|
|
58
idk/asci.py
58
idk/asci.py
|
@ -1,4 +1,6 @@
|
|||
# Asci (1.8.3)
|
||||
# Asci (1.9.0)
|
||||
from math import floor, ceil
|
||||
|
||||
|
||||
class Asci:
|
||||
def __init__(self, maps, entities, events_mapping, keys_mapping, behaviors=None, screen_width=21, screen_height=7):
|
||||
|
@ -386,29 +388,11 @@ def get_multi_move(key):
|
|||
return [(convert(k), 1) for k in key]
|
||||
|
||||
|
||||
|
||||
# Extra functions
|
||||
def print_text(text, min_value=0, max_value=0, default_value=0, screen_width=21, screen_height=7):
|
||||
paragraphs = [i for i in text_formater(text, screen_width, screen_height) if i]
|
||||
nb = len(paragraphs)
|
||||
for index in range(nb):
|
||||
print("\n" * 7)
|
||||
print(paragraphs[index])
|
||||
|
||||
if index + 1 == nb and (min_value or max_value or default_value) and min_value <= max_value:
|
||||
result = input(">")
|
||||
try: result = int(result)
|
||||
except: result = default_value
|
||||
if not (min_value <= result <= max_value): result = default_value
|
||||
|
||||
return result
|
||||
|
||||
else: input()
|
||||
|
||||
|
||||
# Motions functions
|
||||
def stand_by(entity, data, stat, screen, walkable):
|
||||
pass
|
||||
|
||||
|
||||
def permanent(entity, data, stat, screen, walkable):
|
||||
pass
|
||||
|
||||
|
@ -466,4 +450,34 @@ def _walk_engine(entity, frame):
|
|||
new_y = entity.pos_y
|
||||
if delta_x: new_x += abs(delta_x) // delta_x
|
||||
if delta_y: new_y += abs(delta_y) // delta_y
|
||||
return new_x, new_y
|
||||
return new_x, new_y
|
||||
|
||||
|
||||
# Extra functions
|
||||
def print_text(text, min_value=0, max_value=0, default_value=0, screen_width=21, screen_height=7):
|
||||
paragraphs = [i for i in text_formater(text, screen_width, screen_height) if i]
|
||||
nb = len(paragraphs)
|
||||
for index in range(nb):
|
||||
print("\n" * 7)
|
||||
print(paragraphs[index])
|
||||
|
||||
if index + 1 == nb and (min_value or max_value or default_value) and min_value <= max_value:
|
||||
result = input(">")
|
||||
try: result = int(result)
|
||||
except: result = default_value
|
||||
if not (min_value <= result <= max_value): result = default_value
|
||||
|
||||
return result
|
||||
|
||||
else: input()
|
||||
|
||||
|
||||
def center(string, total_length, symbol):
|
||||
left = floor((total_length - len(string)) / 2)
|
||||
right = ceil((total_length - len(string)) / 2)
|
||||
|
||||
return left * symbol + string + right * symbol
|
||||
|
||||
|
||||
def enumerate(data):
|
||||
return [(i, data[i]) for i in range(len(data))]
|
259
idk/idk.py
259
idk/idk.py
|
@ -100,13 +100,6 @@ def idk(save_code=None):
|
|||
|
||||
|
||||
# Scenario
|
||||
def shop_interaction(data, stat, nb_choice, *events):
|
||||
for choice in range(nb_choice):
|
||||
if data[0]["main"] == stat[9] + choice + 1:
|
||||
stat[9] = -1
|
||||
if stat[1] < events[choice][0]: return events[choice][2], choice + 1
|
||||
else: return events[choice][1], choice + 1
|
||||
|
||||
|
||||
# - - - Asgard - - - #
|
||||
def asgard_po(coords, identifiant):
|
||||
|
@ -340,7 +333,7 @@ def vanaheim_npc(data, stat, entites, identifiant):
|
|||
|
||||
else: return [0, "Riethas, simple paysan. Que Nerthus vous garde !"]
|
||||
|
||||
if coords == (41, 45):
|
||||
elif coords == (41, 45):
|
||||
if "riethas" in data[0]:
|
||||
if data[0]["riethas"] == 5: return [20, 20, 20, 20, 100], "Kamuel", 50, 1, "riethas"
|
||||
else: return "riethas", {
|
||||
|
@ -349,7 +342,7 @@ def vanaheim_npc(data, stat, entites, identifiant):
|
|||
4: [2, "Bien sur, voila. [+50 PO]", 0, (1, 50)],
|
||||
}
|
||||
|
||||
if identifiant == "vanaheim_charretier":
|
||||
elif coords == (45, 39):
|
||||
if stat[9] == -1 or data[0]["main"] == stat[9]:
|
||||
stat[9] = data[0]["main"]
|
||||
return [0, "[LE CONDUCTEUR DE LA CHARRETTE SE TOURNA VERS VOUS] Ou voulez-vous aller ? Je vous emmene pour 5 pieces.\n1. Midgard\n2. Jotunheim\n3. Alfheim", 3]
|
||||
|
@ -370,16 +363,10 @@ def h_21_npc(data, stat, entites, identifiant):
|
|||
coords = data[2], data[3]
|
||||
|
||||
if identifiant == "vanaheim_aubergiste":
|
||||
if stat[9] == -1 or data[0]["main"] == stat[9]:
|
||||
stat[9] = data[0]["main"]
|
||||
return [0, "Cher client bonjour ! Que puis-je faire pour vous ?\n1. Manger [5 PO]\n2. Boire [2 PO]\n3. Dormir [10 PO]", 3]
|
||||
else:
|
||||
event, _ = shop_interaction(data, stat, 3,
|
||||
(5, [-1, "Et un plat chaud, un ! [VOUS VOUS ASSEYEZ DEVANT UN TRANCHOIR DE PAIN ET UNE ASSIETTE DE SOUPE EPAISSE.]", 0, (0, 5), (1, -5)], [-1, "Tsst, quand on ne peut pas payer, on ne rentre pas."]),
|
||||
(2, [-2, "Et voila ! [L'AUBERGISTE PLACA DEVANT VOUS UNE CHOPE DE BIERE]", 0, (0, 2), (1, -2)], [-2, "La maison ne fait pas credit."]),
|
||||
(10, [-3, "Votre chambre est a l'etage.\n[VOUS MONTEZ A L'ETAGE ET VOUS ENDORMEZ SANS DIFFICULTES.]", 0, (0, 10), (1, -10), (4, 480)], [-3, "Allez donc voir ailleurs."]))
|
||||
|
||||
return event
|
||||
return inn_interaction(data, stat, 3, "Cher client bonjour ! Que puis-je faire pour vous ?\n1. Manger [5 PO]\n2. Boire [2 PO]\n3. Dormir [10 PO]",
|
||||
(5, [0, "Et un plat chaud, un ! [VOUS VOUS ASSEYEZ DEVANT UN TRANCHOIR DE PAIN ET UNE ASSIETTE DE SOUPE EPAISSE.]", 0, (0, 5), (1, -5)], [0, "Tsst, quand on ne peut pas payer, on ne rentre pas."]),
|
||||
(2, [0, "Et voila ! [L'AUBERGISTE PLACA DEVANT VOUS UNE CHOPE DE BIERE]", 0, (0, 2), (1, -2)], [0, "La maison ne fait pas credit."]),
|
||||
(10, [0, "Votre chambre est a l'etage.\n[VOUS MONTEZ A L'ETAGE ET VOUS ENDORMEZ SANS DIFFICULTES.]", 0, (0, 10), (1, -10), (4, 480)], [0, "Allez donc voir ailleurs."]))[0]
|
||||
|
||||
# Utarg
|
||||
elif coords == (21, 6): return {
|
||||
|
@ -490,7 +477,8 @@ def alfheim_npc(data, stat, entites, identifiant):
|
|||
# * : (46; 6)
|
||||
# * : (23; 17)
|
||||
# * : (27; 54)
|
||||
if identifiant == "alfheim_charretier":
|
||||
coords = data[2], data[3]
|
||||
if coords == (23, 17):
|
||||
if stat[9] == -1 or data[0]["main"] == stat[9]:
|
||||
stat[9] = data[0]["main"]
|
||||
return [0, "[LE CONDUCTEUR DE LA CHARRETTE SE TOURNA VERS VOUS] Ou voulez-vous aller ? Je vous emmene pour 5 pieces.\n1. Midgard\n2. Asgard\n3. Vanaheim\n4. Svartalfheim", 4]
|
||||
|
@ -527,62 +515,21 @@ def h_24_npc(data, stat, entites, identifiant):
|
|||
if not (480 <= stat[4] <= 1140): return [0, "Excusez-moi, nous sommes fermes."]
|
||||
|
||||
if coords == (12, 3):
|
||||
if not stat[7]: return [0, "Je ne peux pas vous faire oublier ce que vous ne connaissez pas."]
|
||||
|
||||
if stat[9] == -1 or data[0]["main"] == stat[9]:
|
||||
stat[9] = data[0]["main"]
|
||||
return [0, "Quel sort souhaitez-vous oublier ?\n" + "\n".join(["{0}. {1} {2}".format(nb + 1, spells[stat[7][nb][0]], spells_level[stat[7][nb][1] - 1]) for nb in range(len(stat[7]))]), len(stat[7])]
|
||||
|
||||
else:
|
||||
for i in range(1, len(stat[7]) + 1):
|
||||
if data[0]["main"] == stat[9] + i:
|
||||
stat[9] = -1
|
||||
stat[7].pop(i - 1)
|
||||
pts = (20 * stat[0]) // 100
|
||||
return [-i, "Asseyez-vous, je vais vous faire oublier ce sort. [UN PUISSANT MAL DE TETE VOUS PRIT, LES MURS SEMBLERENT TANGUER TANDIS QUE VOTRE VUE DEVINT FLOUE. LE VERTIGE S'ESTOMPA PROGRESSIVEMENT.] Et voila ! [-{} PV]".format(pts), 0, (0, -pts)]
|
||||
|
||||
if coords == (36, 12):
|
||||
if len(stat[7]) >= 3: return [0, "Je suis desole, vous ne pouvez pas apprendre plus de trois sorts."]
|
||||
|
||||
spells_sale = []
|
||||
formated_spells = ""
|
||||
while len(spells_sale) < 3:
|
||||
sp_id = randint(0, len(spells) - 1)
|
||||
sp_lvl = randint(1, len(spells_level))
|
||||
|
||||
check = True
|
||||
for sp in spells_sale:
|
||||
if sp[0] == sp_id and sp[1] == sp_lvl:
|
||||
check = False
|
||||
break
|
||||
|
||||
if check:
|
||||
spells_sale.append((sp_id, sp_lvl))
|
||||
formated_spells += "{0}. {1} {2}\n".format(len(spells_sale), spells[sp_id], spells_level[sp_lvl - 1])
|
||||
|
||||
spell_choice = print_text("Diomwar, pour vous servir. Quel sort voulez-vous acheter ?\n{}".format(formated_spells), 1, 3, 0)
|
||||
|
||||
if not spell_choice: return [0, "Hmm ?"]
|
||||
|
||||
spell_sel = spells_sale[spell_choice - 1]
|
||||
if stat[1] < 10 * spell_sel[1]: return [0, "Vous n'avez pas les moyens, desole."]
|
||||
|
||||
spell_id = -1
|
||||
for sp_id in range(len(stat[7])):
|
||||
sp = stat[7][sp_id]
|
||||
if spell_sel[0] == sp[0]:
|
||||
if spells_sel[1] <= sp[1]: return [0, "Vous connaissez deja ce sort."]
|
||||
else:
|
||||
spell_id = sp_id
|
||||
break
|
||||
|
||||
if spell_id == -1:
|
||||
stat[7].append(spell_sel)
|
||||
else:
|
||||
stat[7][spell_id] = spell_sel
|
||||
|
||||
return [0, "[DIOMWAR OUVRIT UN LIVRE RELIE DE CUIR NOIR, ET TRACA DU DOIGT DES SIGNES CABALISTIQUES SUR LE SOL. LES RUNES BRILLERENT PUISSAMMENT AVANT DE S'ETEINDRE.]", 0, (1, -10 * spell_sel[1])]
|
||||
health_cost = (20 * stat[0]) // 100
|
||||
return spell_deletion(data, stat,
|
||||
"Quel sort souhaitez-vous oublier ?",
|
||||
"Asseyez-vous, je vais vous faire oublier ce sort. [UN PUISSANT MAL DE TETE VOUS PRIT, LES MURS SEMBLERENT TANGUER TANDIS QUE VOTRE VUE DEVINT FLOUE. LE VERTIGE S'ESTOMPA PROGRESSIVEMENT.] Et voila ! [-{} PV]".format(health_cost),
|
||||
"Je ne peux pas vous faire oublier ce que vous ne connaissez pas.",
|
||||
health_cost)
|
||||
|
||||
if coords == (36, 12):
|
||||
return spell_purchase(data, stat,
|
||||
"Diomwar, pour vous servir. Quel sort voulez-vous acheter ?",
|
||||
"[DIOMWAR OUVRIT UN LIVRE RELIE DE CUIR NOIR, ET TRACA DU DOIGT DES SIGNES CABALISTIQUES SUR LE SOL. LES RUNES BRILLERENT PUISSAMMENT AVANT DE S'ETEINDRE.]",
|
||||
"Vous connaissez deja ce sort.",
|
||||
"Vous n'avez pas les moyens, desole.",
|
||||
"Je suis desole, vous ne pouvez pas apprendre plus de trois sorts.")
|
||||
|
||||
|
||||
# - - - Midgard - - - #
|
||||
def midgard_po(coords, identifiant):
|
||||
|
@ -670,7 +617,7 @@ def midgard_npc(data, stat, entites, identifiant):
|
|||
55: [-4, "C'est bien, passez. [ALORS QUE VOUS PASSIEZ A COTE DE IROB, UNE VIVE DOULEUR VOUS PRIT L'ABDOMEN, LE SANG ET LES CHAIRS SE REPANDIRENT SUR VOS MAINS ET VOTRE INCOMPREHENSION.]"],
|
||||
}
|
||||
|
||||
elif identifiant == "midgard_charretier":
|
||||
elif coords == (39, 49):
|
||||
if stat[9] == -1 or data[0]["main"] == stat[9]:
|
||||
stat[9] = data[0]["main"]
|
||||
return [0, "[LE CONDUCTEUR DE LA CHARRETTE SE TOURNA VERS VOUS] Ou voulez-vous aller ? Je vous emmene pour 5 pieces.\n1. Vanaheim\n2. Asgard\n3. Nidavellir\n4. Niflheim", 4]
|
||||
|
@ -701,15 +648,12 @@ def h_26_npc(data, stat, entites, identifiant):
|
|||
if identifiant == "Rosahil Green":
|
||||
if stat[4] >= 1320 or stat[4] <= 340: return [0, "Je suis desolee, nous sommes fermes. Revenez plus tard !"]
|
||||
|
||||
if stat[9] == -1 or data[0]["main"] == stat[9]:
|
||||
stat[9] = data[0]["main"]
|
||||
return [0, "Rosahil Green, tenanciere de cette auberge. Vous desirez quelque chose ?\n1.De quoi manger s'il vous plait. [-5 PO]\n2.Je voudrais une chambre pour la nuit. [-10 PO]", 2]
|
||||
else:
|
||||
event, choice = shop_interaction(data, stat, 2,
|
||||
(5, [-1, "Et voila pour vous ! [ROSAHIL POSA UNE ASSIETTE DE RAGOUT CHAUD DEVANT VOUS.]", 0, (0, 5), (1, -5)], [-1, "Reviens quand tu auras assez de pieces d'or."]),
|
||||
(10, [-2, "Suivez-moi, je vais vous montrer votre chambre. [VOUS SUIVEZ ROSAHIL DANS L'AUBERGE, LA NUIT PASSA.]", 0, (0, 10), (1, -10), (4, 480)], [-2, "Je suis desolee, tu n'as pas assez !"]))
|
||||
event, choice = inn_interaction(data, stat, 2, "Rosahil Green, tenanciere de cette auberge. Vous desirez quelque chose ?\n1.De quoi manger s'il vous plait. [-5 PO]\n2.Je voudrais une chambre pour la nuit. [-10 PO]",
|
||||
(5, [0, "Et voila pour vous ! [ROSAHIL POSA UNE ASSIETTE DE RAGOUT CHAUD DEVANT VOUS.]", 0, (0, 5), (1, -5)], [0, "Reviens quand tu auras assez de pieces d'or."]),
|
||||
(10, [0, "Suivez-moi, je vais vous montrer votre chambre. [VOUS SUIVEZ ROSAHIL DANS L'AUBERGE, LA NUIT PASSA.]", 0, (0, 10), (1, -10), (4, 480)], [0, "Je suis desolee, tu n'as pas assez !"]))
|
||||
|
||||
if choice == 2 and 360 < stat[4] < 1140: return [-2, "Il est trop tot, revenez vers 19h."]
|
||||
if choice == 2 and 360 < stat[4] < 1140: return [0, "Il est trop tot, revenez vers 19h."]
|
||||
else: return event
|
||||
|
||||
elif coords == (17, 7):
|
||||
|
@ -813,7 +757,7 @@ def h_30_npc(data, stat, entites, identifiant):
|
|||
if identifiant == "Hel": return {
|
||||
"base": [0, "Hel, deesse de la mort, tu veux quelque chose ?"],
|
||||
|
||||
35: [2, "Une guerre contre les Vanes ? Les guerriers du Valhalla vont enfin sortir affronter ceux du Folkvangr. Je m'occupe du Valhalla, retourne voir Odin. Voici quelques pieces pour ta commission. [+10 PO]", 0, (1, 10)],
|
||||
35: [2, "Une guerre contre les Vanes ? Les guerriers du Valhalla vont enfin sortir affronter ceux du Folkvangr. Je m'en occupe, retourne voir Odin. Voici quelques pieces pour ta commission. [+10 PO]", 0, (1, 10)],
|
||||
}
|
||||
|
||||
|
||||
|
@ -892,17 +836,12 @@ def h_36_npc(data, stat, entites, identifiant):
|
|||
if identifiant == "jotunheim_aubergiste":
|
||||
if not (300 <= stat[4] <= 1380): return [0, "Je suis desole, nous somme ferme la nuit."]
|
||||
|
||||
if stat[9] == -1 or data[0]["main"] == stat[9]:
|
||||
stat[9] = data[0]["main"]
|
||||
return [0, "Vous voulez quelque-chose ?\n1. Je mangerai bien un truc [-4 PO]\n2. Il vous reste une chambre ? [-12 PO]", 2]
|
||||
|
||||
else:
|
||||
event, choice = shop_interaction(data, stat, 2,
|
||||
(4, [-1, "Et voila ! [LE TAVERNIER POSA UNE ASSIETTE FUMANTE DEVANT VOUS ET UN VERRE DE VIN]", 0, (0, 5), (1, -4)], [-1, "Reviens quand tu auras de quoi me payer."]),
|
||||
(12, [-2, "Oui, au premier etage, au bout du couloir sur votre droite. [VOUS SUIVEZ LES INDICATIONS DU TAVERNIER ET TROUVEZ VOTRE CHAMBRE. VOUS SOMBREZ DANS LES BRAS DE NOTT.]", 0, (0, 15), (1, -12), (4, 480)], [-2, "Tu n'as pas assez."]))
|
||||
|
||||
if choice == 2 and 360 < stat[4] < 1140: return [-2, "Il est trop tot, reviens vers 19h."]
|
||||
else: return event
|
||||
event, choice = inn_interaction(data, stat, 2, "Vous voulez quelque-chose ?\n1. Je mangerai bien un truc [-4 PO]\n2. Il vous reste une chambre ? [-12 PO]",
|
||||
(4, [0, "Et voila ! [LE TAVERNIER POSA UNE ASSIETTE FUMANTE DEVANT VOUS ET UN VERRE DE VIN]", 0, (0, 5), (1, -4)], [0, "Reviens quand tu auras de quoi me payer."]),
|
||||
(12, [0, "Oui, au premier etage, au bout du couloir sur votre droite. [VOUS SUIVEZ LES INDICATIONS DU TAVERNIER ET TROUVEZ VOTRE CHAMBRE. VOUS SOMBREZ DANS LES BRAS DE NOTT.]", 0, (0, 15), (1, -12), (4, 480)], [0, "Tu n'as pas assez."]))
|
||||
|
||||
if choice == 2 and 360 < stat[4] < 1120: return [-2, "Il est trop tot, reviens vers 19h."]
|
||||
else: return event
|
||||
|
||||
|
||||
# - - - Nidavellir - - - #
|
||||
|
@ -933,18 +872,13 @@ def h_37_npc(data, stat, entites, identifiant):
|
|||
if identifiant == "Muin":
|
||||
if not (340 <= stat[4] <= 1380): return [0, "Nous sommes ouverts de 5 heures a 23."]
|
||||
|
||||
if stat[9] == -1 or data[0]["main"] == stat[9]:
|
||||
stat[9] = data[0]["main"]
|
||||
return [0, "Bonjour, Muin pour vous servir.\n1. Bonjour je voudrais manger. [-5 PO]\n2. Vous reste-t-il des chambres ? [-15 PO]\n3. A boire ! [-3 PO]", 3]
|
||||
|
||||
else:
|
||||
event, choice = shop_interaction(data, stat, 3,
|
||||
(5, [-1, "Pas de probleme ! [MUIN REVINT QUELQUES MINUTES PLUS TARD, ET POSA UNE ASSIETTE FUMANTE DEVANT VOUS.]", 0, (0, 5), (1, -5)], [-1, "Hey la ! Reviens quand tu pourras me payer."]),
|
||||
(15, [-2, "Bien sur ! Suivez-moi. [VOUS SUIVEZ MUIN DANS UNE PIECE TROGLODYTE MUNIE D'UN LIT ET D'UN COFFRE. VOUS VOUS ENDORMEZ RAPIDEMENT.]", 0, (0, 15), (1, -15), (4, 480)], [-2, "Desole, je n'ai plus une seule chambre de libre."]),
|
||||
(3, [-3, "[MUIN POSA UNE CHOPPE DE BIERE MOUSSEUSE DEVANT VOUS.]", 0, (0, 3), (1, -3)], [-3, "Allez donc voir un autre etablissement, nous ne servons pas gratuitement."]))
|
||||
|
||||
if choice == 2 and 360 < stat[4] < 1140: return [-2, "Une chambre !? Il n'est que {} heures. Reviens dans la soiree.".format(stat[4] // 60)]
|
||||
else: return event
|
||||
event, choice = inn_interaction(data, stat, 3, "Bonjour, Muin pour vous servir.\n1. Bonjour je voudrais manger. [-5 PO]\n2. Vous reste-t-il des chambres ? [-15 PO]\n3. A boire ! [-3 PO]",
|
||||
(5, [0, "Pas de probleme ! [MUIN REVINT QUELQUES MINUTES PLUS TARD, ET POSA UNE ASSIETTE FUMANTE DEVANT VOUS.]", 0, (0, 5), (1, -5)], [0, "Hey la ! Reviens quand tu pourras me payer."]),
|
||||
(15, [0, "Bien sur ! Suivez-moi. [VOUS SUIVEZ MUIN DANS UNE PIECE TROGLODYTE MUNIE D'UN LIT ET D'UN COFFRE. VOUS VOUS ENDORMEZ RAPIDEMENT.]", 0, (0, 15), (1, -15), (4, 480)], [0, "Desole, je n'ai plus une seule chambre de libre."]),
|
||||
(3, [0, "[MUIN POSA UNE CHOPPE DE BIERE MOUSSEUSE DEVANT VOUS.]", 0, (0, 3), (1, -3)], [0, "Allez donc voir un autre etablissement, nous ne servons pas gratuitement."]))
|
||||
|
||||
if choice == 2 and 360 < stat[4] < 1140: return [-2, "Une chambre !? Il n'est que {} heures. Reviens dans la soiree.".format(stat[4] // 60)]
|
||||
else: return event
|
||||
|
||||
return [0, "Hmm ?"]
|
||||
|
||||
|
@ -959,40 +893,20 @@ def h_39_npc(data, stat, entites, identifiant):
|
|||
if not (480 <= stat[4] <= 1140): return [0, "La forge de Nidavellir est ouverte de 8 heures a 18 heures."]
|
||||
|
||||
if coords == (9, 2):
|
||||
if stat[3][0]: return [0, "Vous avez deja une arme. Allez voir mon confrere si vous voulez la vendre et revenez me voir."]
|
||||
|
||||
weapons_sale = []
|
||||
formated_wpn = ""
|
||||
while len(weapons_sale) < 4:
|
||||
wpn = randint(1, len(weapons) - 1)
|
||||
if not wpn in weapons_sale:
|
||||
weapons_sale.append(wpn)
|
||||
formated_wpn += "{0}. {1} [-{2} PO]\n".format(len(weapons_sale), weapons[wpn], 10 * wpn)
|
||||
|
||||
wpn_choice = print_text("Bienvenue a la forge de Nidavellir ! Vous desirez une piece particuliere ?\n{}".format(formated_wpn), 1, 4, 0)
|
||||
if not wpn_choice: return [0, "Hmm ?"]
|
||||
|
||||
wpn = weapons_sale[wpn_choice - 1]
|
||||
if stat[1] < 10 * wpn: return [0, "Vous n'avez pas assez."]
|
||||
stat[3][0] = wpn
|
||||
return [0, "Tres bon choix ! [LE NAIN DECROCHA L'ARME DU RATELIER ET VOUS LA TENDIT.]", 0, (1, -10 * wpn)]
|
||||
return weapon_purchase(data, stat,
|
||||
"Bienvenue a la forge de Nidavellir ! Vous desirez une piece particuliere ?",
|
||||
"Tres bon choix ! [LE NAIN DECROCHA L'ARME DU RATELIER ET VOUS LA TENDIT.]",
|
||||
"Vous avez deja une arme. Allez voir mon confrere si vous voulez la vendre et revenez me voir.",
|
||||
"Vous n'avez pas assez.")
|
||||
|
||||
elif coords == (9, 4):
|
||||
if stat[3][0] == 0: return [0, "Vous n'avez pas d'arme a me vendre. Allez voir mon collegue pour en acheter une."]
|
||||
|
||||
if stat[9] == -1 or data[0]["main"] == stat[9]:
|
||||
stat[9] = data[0]["main"]
|
||||
return [0, "Bienvenue dans notre forge. Vous souhaitez me vendre votre arme ?\n1. Oui\n2. Non", 2]
|
||||
|
||||
elif data[0]["main"] == stat[9] + 1:
|
||||
stat[9] = -1
|
||||
cost = stat[3][0] * 8
|
||||
stat[3][0] = 0
|
||||
return [-1, "Marche conclu ! [+{} PO]".format(cost), 0, (1, cost)]
|
||||
|
||||
elif data[0]["main"] == stat[9] + 2:
|
||||
stat[9] = -1
|
||||
return [-2, "A votre guise, revenez quand vous voulez !"]
|
||||
price = 8 * stat[3][0]
|
||||
return weapon_sale(data, stat,
|
||||
"Bienvenue dans notre forge. Vous souhaitez me vendre votre arme ?",
|
||||
"Marche conclu ! [+{} PO]".format(price),
|
||||
"A votre guise, revenez quand vous voulez !",
|
||||
"Vous n'avez pas d'arme a me vendre. Allez voir mon collegue pour en acheter une.",
|
||||
price)
|
||||
|
||||
|
||||
def h_40_npc(data, stat, entites, identifiant):
|
||||
|
@ -1029,16 +943,10 @@ def h_42_npc(data, stat, entites, identifiant):
|
|||
if identifiant == "muspellheim_aubergiste":
|
||||
if not (300 <= stat[4] <= 1380): return [0, "Nous sommes ouverts de 5 a 23 heures."]
|
||||
|
||||
if stat[9] == -1 or data[0]["main"] == stat[9]:
|
||||
stat[9] = data[0]["main"]
|
||||
return [0, "Besoin de quelque chose messire ?\n1. Hum, oui, j'aimerais manger. [-5 PO]\n2. Je voudrais dormir [-10 PO]", 2]
|
||||
return inn_interaction(data, stat, 2, "Besoin de quelque chose messire ?\n1. Hum, oui, j'aimerais manger. [-5 PO]\n2. Je voudrais dormir [-10 PO]",
|
||||
(5, [0, "Et voila pour vous !", 0, (0, 5), (1, -5)], [0, "Je regrette, vous n'avez pas assez."]),
|
||||
(10, [0, "Bien sur, si vous voulez bien me suivre. [VOUS VOUS ALLONGEZ SUR LE LIT ET VOUS ENDORMEZ RAPIDEMENT.]", 0, (0, 10), (1, -10), (4, 480)], [0, "Nous ne pouvons pas nous permettre de faire credit."]))[0]
|
||||
|
||||
else:
|
||||
event, _ = shop_interaction(data, stat, 2,
|
||||
(5, [-1, "Et voila pour vous !", 0, (0, 5), (1, -5)], [-1, "Je regrette, vous n'avez pas assez."]),
|
||||
(10, [-2, "Bien sur, si vous voulez bien me suivre. [VOUS VOUS ALLONGEZ SUR LE LIT ET VOUS ENDORMEZ RAPIDEMENT.]", 0, (0, 10), (1, -10), (4, 480)], [-2, "Nous ne pouvons pas nous permettre de faire credit."]))
|
||||
|
||||
return event
|
||||
|
||||
def h_43_npc(data, stat, entites, identifiant):
|
||||
coords = data[2], data[3]
|
||||
|
@ -1046,36 +954,20 @@ def h_43_npc(data, stat, entites, identifiant):
|
|||
if not (480 <= stat[4] <= 1140): return [0, "L'armurerie est ouverte de 8 heures a 18 heures."]
|
||||
|
||||
if identifiant == "Bertfrid":
|
||||
if stat[3][1]: return [0, "Vous portez deja une armure, allez voir mon confrere."]
|
||||
|
||||
if stat[9] == -1 or data[0]["main"] == stat[9]:
|
||||
stat[9] = data[0]["main"]
|
||||
return [0, "Bienvenue, dans mon armurerie ! Je suis Bertfrid, besoin d'une armure ?\n1. Oui, d'une rondache. [-10 PO]\n2. d'un pavois [-20 PO]\n3. d'une cotte de mailles [-30 PO]\n4. d'une broigne [-40 PO]\n5. d'un harnois [-50 PO]", 5]
|
||||
|
||||
else:
|
||||
shields = ("UNE RONDACHE", "UN PAVOIS", "UNE COTTE DE MAILLES", "UNE BROIGNE", "UN HARNOIS")
|
||||
for i in range(1, 6):
|
||||
if data[0]["main"] == stat[9] + i:
|
||||
stat[9] = -1
|
||||
if stat[1] < i * 10: return [-i, "Vous n'avez pas assez."]
|
||||
stat[3][1] = i
|
||||
return [-i, "C'est un bon achat. [BERTFRID DECROCHA {}]".format(shields[i - 1]), 0, (1, -i * 10)]
|
||||
return armor_purchase(data, stat,
|
||||
"Bienvenue, dans mon armurerie ! Je suis Bertfrid, vous cherchez quoi exactement ?",
|
||||
"C'est un bon achat. [BERTFRID DECROCHA LA PIECE D'ARMURE ET VOUS LA TENDIT.]",
|
||||
"Vous portez deja une armure, allez voir mon confrere.",
|
||||
"Vous n'avez pas assez.")
|
||||
|
||||
elif coords == (13, 9):
|
||||
if stat[3][1] == 0: return [0, "J'achete, je ne vend pas ! Allez voir Bertfrid du cote du four a metaux, elle vous renseignera"]
|
||||
|
||||
if stat[9] == -1 or data[0]["main"] == stat[9]:
|
||||
stat[9] = data[0]["main"]
|
||||
return [0, "Vous voulez vendre votre piece d'armure ?\n1. Oui\n2. Non", 2]
|
||||
|
||||
elif data[0]["main"] == stat[9] + 1:
|
||||
stat[9] = -1
|
||||
cost = stat[3][1] * 8
|
||||
return [-1, "C'est une affaire ! [+{} PO]".format(cost), 0, (1, cost)]
|
||||
|
||||
elif data[0]["main"] == stat[9] + 2:
|
||||
stat[9] = -1
|
||||
return [-2, "Revenez quand vous voulez !"]
|
||||
price = 8 * stat[3][1]
|
||||
return armor_sale(data, stat,
|
||||
"Vous voulez vendre votre piece d'armure pour {} PO ?".format(price),
|
||||
"C'est une affaire ! [+{} PO]".format(price),
|
||||
"Revenez quand vous vous serez decide !",
|
||||
"J'achete, je ne vend pas ! Allez voir Bertfrid du cote du four a metaux, elle vous renseignera.",
|
||||
price)
|
||||
|
||||
elif coords == (6, 5):
|
||||
return [0, "Je ne suis qu'apprenti monseigneur. Adressez-vous plutot a Bertfrid. Vous la trouverez pres du four."]
|
||||
|
@ -1108,21 +1000,16 @@ def svartalfheim_npc(data, stat, entites, identifiant):
|
|||
if coords == (120, 49) or coords == (104, 30):
|
||||
if not (360 <= stat[4] <= 1200): return [0, "Hmm, hein ? Quoi ? Zavez pas vu l'heure ??"]
|
||||
|
||||
if stat[9] == -1 or data[0]["main"] == stat[9]:
|
||||
stat[9] = data[0]["main"]
|
||||
return [0, "Hey, toi ! Tu veux traverser ?\n1. Traverser [2 PO]\n2. Ne pas traverser", 2]
|
||||
choice = print_text("Hey, toi ! Tu veux traverser ?\n1. Traverser [2 PO]\n2. Ne pas traverser", 1, 2, 0)
|
||||
|
||||
elif data[0]["main"] == stat[9] + 1:
|
||||
stat[9] = -1
|
||||
if stat[1] < 2: return [-1, "Reviens quand tu auras de quoi me payer."]
|
||||
if choice == 1:
|
||||
if stat[1] < 2: return [0, "Reviens quand tu auras de quoi me payer."]
|
||||
|
||||
if coords == (104, 30): data[2], data[3] = 119, 49
|
||||
else: data[2], data[3] = 103, 30
|
||||
|
||||
return [-1, "C'est parti !", 0, (1, -2)]
|
||||
return [0, "C'est parti !", 0, (1, -2)]
|
||||
|
||||
elif data[0]["main"] == stat[9] + 2:
|
||||
stat[9] = -1
|
||||
else:
|
||||
return [0, "Reviens quand tu voudras traverser."]
|
||||
|
||||
elif coords == (10, 24):
|
||||
|
|
141
idk/idk_lib.py
141
idk/idk_lib.py
|
@ -1,6 +1,5 @@
|
|||
from asci import Asci, print_text
|
||||
from asci import Asci, print_text, center, enumerate
|
||||
from random import randint, choice
|
||||
from math import floor, ceil
|
||||
|
||||
from asgard import *
|
||||
from vanaheim import *
|
||||
|
@ -39,6 +38,129 @@ spells_effect = ((4, 1, True), (4, -1, False), (4, -1, False), (4, -1, False), (
|
|||
weapons = ("<aucune>", "Dague", "Marteau", "Masse", "Fleau", "Hache", "Epee", "Espadon", "Hache double")
|
||||
armors = ("<aucune>", "Rondache", "Pavois", "Cote de maille", "Broigne", "Harnois")
|
||||
|
||||
|
||||
# Shop functions
|
||||
def inn_interaction(data, stat, nb_choice, text, *events):
|
||||
choice = print_text(text, 1, nb_choice, 0) - 1
|
||||
if choice == -1: return [0, None], choice
|
||||
if stat[1] < events[choice][0]: return events[choice][2], choice + 1
|
||||
else: return events[choice][1], choice + 1
|
||||
|
||||
|
||||
def spell_selection(text, spells_to_display):
|
||||
message = text + "\n" + "\n".join(["{0}. {1} {2}".format(nb + 1, spells[spells_to_display[nb][0]], spells_level[spells_to_display[nb][1] - 1]) for nb in range(len(spells_to_display))])
|
||||
return print_text(message, 1, len(spells_to_display), 0) - 1
|
||||
|
||||
|
||||
def spell_purchase(data, stat, text, spell_purchased, already_known, not_enough_money, too_many_spell):
|
||||
spells_sale = []
|
||||
while len(spells_sale) < 3:
|
||||
sp_id = randint(0, len(spells) - 1)
|
||||
sp_lvl = randint(1, len(spells_level))
|
||||
|
||||
check = True
|
||||
for sp in spells_sale:
|
||||
if sp == (sp_id, sp_lvl):
|
||||
check = False
|
||||
break
|
||||
|
||||
if check: spells_sale.append((sp_id, sp_lvl))
|
||||
|
||||
choice = spell_selection(text, spells_sale)
|
||||
if choice == -1: return [0, ""]
|
||||
spell_selected = spells_sale[choice]
|
||||
|
||||
if stat[1] < 10 * spell_selected[1]: return [0, not_enough_money]
|
||||
|
||||
for spell in stat[7]:
|
||||
if spell_selected[0] == spell[0]:
|
||||
if spell_selected[1] <= spell[1]: return [0, already_known]
|
||||
else: stat[7].remove(spell)
|
||||
|
||||
if len(stat[7]) >= 3: return [0, too_many_spell]
|
||||
|
||||
stat[7].append(spell_selected)
|
||||
return [0, spell_purchased, 0, (1, -10 * spell_selected[1])]
|
||||
|
||||
|
||||
def spell_deletion(data, stat, text, spell_deleted, no_spell_known, health_cost, not_enough_health=""):
|
||||
if not stat[7]: return [0, no_spell_known]
|
||||
choice = spell_selection(text, stat[7])
|
||||
if choice == -1: return [0, ""]
|
||||
|
||||
if stat[0] <= health_cost: return [0, not_enough_health]
|
||||
stat[7].remove(stat[7][choice])
|
||||
return [0, spell_deleted, 0, (0, -health_cost)]
|
||||
|
||||
|
||||
def weapon_selection(text, weapons_to_display):
|
||||
message = text + "\n" + "\n".join(["{0}. {1} [-{2} PO]".format(i + 1, weapons[wpn_index], 10 * wpn_index) for i, wpn_index in enumerate(weapons_to_display)])
|
||||
return print_text(message, 1, len(weapons_to_display), 0) - 1
|
||||
|
||||
|
||||
def weapon_purchase(data, stat, text, weapon_purchased, already_have_one, not_enough_money):
|
||||
if stat[3][0]: return [0, already_have_one]
|
||||
|
||||
weapons_sale = []
|
||||
while len(weapons_sale) < 3:
|
||||
wpn_id = randint(1, len(weapons) - 1)
|
||||
if not wpn_id in weapons_sale: weapons_sale.append(wpn_id)
|
||||
|
||||
choice = weapon_selection(text, weapons_sale)
|
||||
if choice == -1: return [0, ""]
|
||||
|
||||
weapon_selected = weapons_sale[choice]
|
||||
if stat[1] < 10 * weapon_selected: return [0, not_enough_money]
|
||||
stat[3][0] = weapon_selected
|
||||
return [0, weapon_purchased, 0, (1, -10 * weapon_selected)]
|
||||
|
||||
|
||||
def weapon_sale(data, stat, text, weapon_sold, sale_aborted, no_weapon_owned, price):
|
||||
if not stat[3][0]: return [0, no_weapon_owned]
|
||||
|
||||
choice = print_text(text + "\n1. Oui\n2. Non", 1, 2, 0)
|
||||
|
||||
if choice == 0: return [0, ""]
|
||||
elif choice == 1:
|
||||
stat[3][0] = 0
|
||||
return [0, weapon_sold, 0, (1, price)]
|
||||
else: return [0, sale_aborted]
|
||||
|
||||
|
||||
def armor_selection(text, armors_to_display):
|
||||
message = text + "\n" + "\n".join(["{0}. {1} [-{2} PO]".format(i + 1, armors[arm_index], 10 * arm_index) for i, arm_index in enumerate(armors_to_display)])
|
||||
return print_text(message, 1, len(armors_to_display), 0) - 1
|
||||
|
||||
|
||||
def armor_purchase(data, stat, text, armor_purchased, already_have_one, not_enough_money):
|
||||
if stat[3][1]: return [0, already_have_one]
|
||||
|
||||
armors_sale = []
|
||||
while len(armors_sale) < 3:
|
||||
arm_id = randint(1, len(armors) - 1)
|
||||
if not arm_id in armors_sale: armors_sale.append(arm_id)
|
||||
|
||||
choice = armor_selection(text, armors_sale)
|
||||
if choice == -1: return [0, ""]
|
||||
|
||||
armor_selected = armors_sale[choice]
|
||||
if stat[1] < 10 * armor_selected: return [0, not_enough_money]
|
||||
stat[3][1] = armor_selected
|
||||
return [0, armor_purchased, 0, (1, -10 * armor_selected)]
|
||||
|
||||
|
||||
def armor_sale(data, stat, text, armor_sold, sale_aborted, no_armor_owned, price):
|
||||
if not stat[3][1]: return [0, no_armor_owned]
|
||||
|
||||
choice = print_text(text + "\n1. Oui\n2. Non", 1, 2, 0)
|
||||
|
||||
if choice == 0: return [0, ""]
|
||||
elif choice == 1:
|
||||
stat[3][1] = 0
|
||||
return [0, armor_sold, 0, (1, price)]
|
||||
else: return [0, sale_aborted]
|
||||
|
||||
|
||||
# Asci functions
|
||||
def npc_core(event_fn, data, stat, entities, identifiant):
|
||||
event = event_fn(data, stat, entities, identifiant)
|
||||
|
@ -265,7 +387,7 @@ def fight(stat, opponent_stat, opponent_name):
|
|||
def misc_stat(data, stat):
|
||||
if data[1] < 9: place = ("Asgard", "Vanaheim", "Alfheim", "Midgard", "Niflheim", "Jotunheim", "Nidavellir", "Muspellheim", "Svartalfheim")[data[1]]
|
||||
elif data[1] == 27: place = "chez vous"
|
||||
else: place = "interieur"
|
||||
else: place = "interieur"
|
||||
money, ticks, player_class = stat[1], stat[4], stat[6]
|
||||
|
||||
hours = ticks // 60
|
||||
|
@ -312,14 +434,14 @@ def display_stat(data, stat):
|
|||
|
||||
def inventory(data, stat):
|
||||
weapon = weapons[stat[3][0]]
|
||||
shield = armors[stat[3][1]]
|
||||
armor = armors[stat[3][1]]
|
||||
|
||||
weapon = " |" + weapon + " " * (17 - len(weapon)) + "|"
|
||||
shield = " |" + shield + " " * (17 - len(shield)) + "|"
|
||||
armor = " |" + armor + " " * (17 - len(armor)) + "|"
|
||||
|
||||
print("<o> Inventaire <o>")
|
||||
print(" |- Arme : |\n{}".format(weapon))
|
||||
print(" |- Armure : |\n{}".format(shield))
|
||||
print(" |- Armure : |\n{}".format(armor))
|
||||
print("<o> ============= <o>")
|
||||
input()
|
||||
|
||||
|
@ -404,13 +526,6 @@ def get_input(string=">"):
|
|||
return 0
|
||||
|
||||
|
||||
def center(string, total_length, symbol):
|
||||
left = floor((total_length - len(string)) / 2)
|
||||
right = ceil((total_length - len(string)) / 2)
|
||||
|
||||
return left * symbol + string + right * symbol
|
||||
|
||||
|
||||
def stat_test(stat, test_id):
|
||||
score = (80 + randint(-20, 20)) * stat[test_id] / 50
|
||||
return randint(1, 100) <= score, floor(score)
|
||||
|
|
|
@ -197,7 +197,7 @@ midgard_entities = (
|
|||
[0, '?', 3, 53, 24, 'stand by'],
|
||||
[0, '?', 3, 66, 45, 'stand by'],
|
||||
[0, '?', 3, 52, 79, 'stand by'],
|
||||
["midgard_charretier", '*', 3, 39, 49, 'stand by'],
|
||||
[0, '*', 3, 39, 49, 'stand by'],
|
||||
[0, '*', 3, 8, 59, 'stand by'],
|
||||
[0, '*', 3, 66, 56, "stand by"],
|
||||
[0, '*', 3, 67, 46, 'stand by'],
|
||||
|
|
|
@ -211,7 +211,7 @@ muspellheim_entities = (
|
|||
[0, '*', 42, 11, 5, 'stand by'],
|
||||
[0, '*', 42, 2, 11, 'stand by'],
|
||||
[0, '*', 42, 31, 9, 'stand by'],
|
||||
["Berfrid", '*', 43, 24, 4, 'stand by'],
|
||||
["Bertfrid", '*', 43, 24, 4, 'stand by'],
|
||||
[0, '*', 43, 13, 9, 'stand by'],
|
||||
[0, '*', 43, 6, 5, 'stand by'],
|
||||
[0, '*', 44, 13, 20, 'stand by'],
|
||||
|
|
|
@ -101,7 +101,7 @@ h_22 = (r"""
|
|||
vanaheim_entities = (
|
||||
[0, '?', 1, 42, 20, 'stand by'],
|
||||
[0, '?', 1, 26, 29, 'stand by'],
|
||||
["vanaheim_charretier", '*', 1, 45, 39, 'stand by'],
|
||||
[0, '*', 1, 45, 39, 'stand by'],
|
||||
[0, '*', 1, 31, 12, 'stand by'],
|
||||
[0, '*', 1, 41, 45, 'stand by'],
|
||||
[0, '*', 1, 52, 22, 'stand by'],
|
||||
|
|
Loading…
Reference in New Issue