IDK/demo/muspellheim.py

288 lines
18 KiB
Python

muspellheim = (r"""
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~
~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ _ ~~~~~~
~~~~~~~~ _ ### ~~~~~~~~~~~~~~~~~~~~~~~~~~~ /o\ ~~~~~
~~~~~~~ /o\ ##### ~~~~~~~~~~~~~~~~~~~~~ ### /_|_\ ~~~~
~~~~~~~ /_|_\ ### ~~~~~~~~~~~~~ ##### ~~~~~
~~~~~~~~ /_\ ### ### ### _ _ _ ~~~~~
~~~~~~~~~ ##### /_\ ##### ? / \__ /o\ /-\ ~~~~
~~~~~~~~~ _ ### _ ### | <>\ /_|_\ |_| ~~~~
~~~~~~~~ _ /o\ /_\ / \__ ### ### /_\ |____| ~~~~~
~~~~ /o\ /_|_\ | <>\ ##### ##### _ ~~~~~~
~~~ /_|_\ ### * |____| ### ### ### /o\__ ~~~~~~
~~~ ### ##### ##### /_\ /_\ ` |_ \ ~~~~~~
~~~##### ### ##### ### `,.` , * |^|__| ~~~~~~
~~~############ ### ### ` /_\ ',` `, ~~~~~~
~~~ ### ##### |=|### ##### , ' ` ' . ' ,, ` ```,'' . ~~~~~~
~~~ |=| ### ##### ### ##### `' ., ` ' ','., ,`.. ,,`,,` ,`'. ` `` ~~~~~~~
~~~ |=|### ########### ### , . ` ,.. ' ` ~~~~~~~~
### ##### ### ##### |=|. ` ### `,. ### ~~~~~~~~~
##### ### ##### |=| ### ### ##### ` ### ### ##### ~~~~~~~~~
##### ##### ### |=| ` ' ##### ### ##### ### ##### ##### ### ##### ~~~~~~~~~
### ##### |=| ### ,` ` ##### ##### ### ##### ### ##### ##### ##### ### ~~~~~~~~~
|=| ### ### ##### , , ' ### ##### |=| ##### ##### ### ### ##### |=| ~~~~~~~~
|=|##### ### ###### ' `. ` |=| ### ### ##### |=| |=| ### ### ~~~~~
########### ### ,. `.,''. |=| |=| ### ', |=| ##### ###
### ##### |=| ' `' ### `, |=| .''` ### . ##### #####
|=| ### ### ##### . ### ### ` ##### `'`. ### #####
|=| ##### ### ##### ### ##### ##### ### ,##### ' . |=| ###
### `,., ##### ##### ### ` ##### ### ##### ##### ##### ### ' |=|
### #####` ### ##### |=| ##### ##### ### ### ##### ,|=| ` ,. . `` , #
###### ### ######. .` |=| ### .,` ### ##### |=| |=| ### ` . .,, ' ###
########### ### . |=| ' ### |=| ' ### |=| '. ', ### #####
### ##### |=| ### ### ` ##### |=| ### ` ` ##### ### #####
|=| ### ### `. ##### ##### ### ##### ### ##### '' ##### ##### ###
|=|##### ### ,##### ##### ##### ### ' , ##### ### ##### `' `` ### ##### |=|
##### ##### '### ### ##### |=| ,', ##### ##### ### ,`` ` |=| ### ~~
### ##### '|=| |=| ### `.`' ### ##### |=| , ' |=| ~~~~
|=| ### |=| ### . ' . |=| ### .,` ### ~~~~~~
### |=| , ### ##### `` ' |=| , . ### ##### ~~~~~~
##### , ##### ### ##### ,,' ##### ### ##### ~~~~~~~
##### .,` ##### ##### ### `. , ` .,'. ##### ##### ### ~~~~~~~~~
### ` ` . ` ### ##### |=| ` , , ,` , ` ### ##### |=| ~~~~~~~~~
|=| ' |=| ### . ' ' `' `' |=| ### ~~~~~~~~~
### ., |=| , . .' '' ., |=| ### ~~~~~~~~~
##### .` . ### ##### ~~~~~~~~~
|=| ,, '' '` `,.` , ' '` ` ..` ##### ### ~~~~~~~~~
### .'. .'` ' ,`,, ' , `'.. ### ### /_\ ~~~~~~~~~
##### ### ` .'' ... `' . '` ### `,, /_\ ##### ~~~~~~~~
/\ ### ##### ### .` ` ##### ',' . ### ~~~~~~~~
/ \_ /_\ ### ##### .' ' ### ### ` `, ### /_\ ~~~~~~~~~
/ \ /_\ ### ### `.` ,, __ #####/_\ .`,, `, ##### ~~~~~~~~~~
/ \ /\ ##### /_ ` ### /o_\ ### ,.`,' ### ### ~~~~~~~~~~~~
/ \_ ### .,. ##### |_^| /_\ ### .``,.` /_\ ##### ~~~~~~~~~~~~~
\ / \ /_\ '' ### ### ##### .`` ### ~~~~~~~~~~~~~
\ /\ / \ /\ '` /_\ ### ##### ### . ### /_\ ~~~~~~~~~~~~
/ \_ / \_ ,,' ##### ### /_\ ,'' ##### ### ~~~~~~~~~
/ \ / \ ` ### /_\ ### `.''. ### ##### ### ~~~~~~~~
/ \ /\ / \ /\ '. /_\ ##### .'.', /_\ ### ##### ~~~~~~~
/ \_ / \_ `' ### ### ,.. '` /_\ ### ~~~~~~~
/ \ / \ `.'. ### ##### /_\ .` ',, ', /_\ ### ~~~~~
/\ / \ /\ / \ ' . ##### ### `. ' ,` ### ##### ~~~
/ \_ / \_ , '' , ., ### /_\ ### ' . ,` ##### ### ~~~
/ \ / \ ,, '...`, , /_\ ##### . . ### ### /_\ ~~
/ \ /\ / \ /\ . ,.`` ### ### ,. ` /_\ ##### ### ~~
/ \_ / \_ .., ' ### ### /_\ ##### `` `' ### ##### ~~~~
\ / \ / \ .,,##### ##### ### .`.``''` ### /_\ ### ~~~~~
\ /\ / \ /\ / \ /\ . ,### ### /_\ '',. ##### ### /_\~~~~~~
/ \_ / \_ / \_ ' /_\ /_\ ### , '` ### ##### ~~~~~~~
/ \ / \ / \ '.. ### ##### ### ' ` /_\ ### ~~~~~~~
/ \ /\ / \ /\ / ',' \ ,`''##### ### ##### '.,,` ,' /_\ ~~ ~~~~
/ \_ / \_ ` .,'`'.,' `### /_\ ### , ',,,. ### ~~ ~~~~
\ / \ / \ ',`. , `,,/_\ ### /_\ ',,`. ##### ~~ ~~~~
\ /\ / \ /\ / \ /\ ' `. ` ', ##### '' ### ### ~~~~~ ~~~~
/ \_ / \_ / \_ ` `., ### , ##### /_\ ~~~~~~ ~~~~
/ \ / \ / \ .' /_\ ### ,` ### ~~~~ ~~~~
/ \ /\ / \ /\ / \ /\ .. ##### ### `,' ### /_\ ### ~~~~~ ~~~~
/ \_ / \_ / \_ ### ##### ` ##### #####~~~~~ ~~~~
\ / \ / \ / \ ,. /_\ ### , ### ### ~~~ ~~~~
\ /\ / \ /\ / \ /\ / \ . /_\ /_\ /_\ ~~~ ~~~~
/ \_ / \_ / \_ .. * ` .' ,' ~~~ ~~~~
/ \ / \ / \ . .'''. ''`. ` `````..', ' ,..,, , . ~~~~ ~~~~
/ \ /\ / \ /\ / \ /\ .,. . _ ,' ..,` ,', _ ` ~~~~ ~~~~
/ \_ / \_ / \_ . (_) (_) ., ~~~~~ ~~~
\ / \ / \ / \ |=|==|==|==|==||==|==|==|==|=| , ~~~~ ~~~
\ /\ / \ /\ / \ /\ / \ /\ | () () | ~~~~~~ ~~~
/ \_ / \_ / \_ / \_ | /__\ __ /__\ | . ~~~~~~ ~~~
/ \ / \ / \ / \ | |o |__/()\__| o| | ~~~~~ ~~~~
/ \ /\ / \ /\ / \ /\ / \ | | o|[] __ []|o | | `. ~~~~ ~~~~
~~ / \_ / \_ / \_ | |__|__|^^|__|__| | , ~~~~~~~
~~~~ / \ / \ / \ __ | | ~~~~~~~
~~~~~ / \ / \ / \ /o \ | * #### #### | .`' ~~~~~
~~~~~~~ __ |__| | #### #### | `. ~~~~
~~~~~~~ __ / \ __ | #### #### | , '` ~~~
~~~~~~~ /()\|__| * /<>\ | | ,,', ~~~
~~~~~~~~ ~~~ |__| |__| |_ _ _ _| ` .'` ~~~
~~~~~~~~~ ~~~~~~~~~~~ ~~~ (_) oo (_) (_) oo (_) . , ~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ',.. |=|==||==|=|?'` |=|==||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~~~~~~~~~~ ~~~~~~~~~~~~~~ ~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~""",
# 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),
)
# * : (20, 12)
# * : (78, 14)
# * : (54, 80)
# * : (59, 91)
# * : (39, 94)
# * : (29, 113)
def muspellheim_po(coords):
if coords == (66, 8): return [0, "La mer s'etendait, calme. Bosquets et maisons peuplaient la cote, dont plusieurs petite tentes."]
elif coords == (64, 97): return [0, "La cloture de la propriete etait ouvragee, le manoir aussi. Constitue d'un corps de ferme rehabilite et entoure de deux tours decoratives, l'ensemble conservait un air propre et entretenu. Le jardin taille en temoigne."]
def muspellheim_npc(data, stat):
pass
h_42 = (r"""
|===================|
| * |
|--[]---------------|
| |
| |
| * |=============|
| |
| * |
| +------+ +------+ +------+ |
| | | | | | |* |
| | | | | | | |
| *+------+ +------+ +------+ |
| |
| |
|==============|^|================|""",
(16, 14, 7, 87, 14)) # * : (11, 5) * : (6, 7) * : (31, 9) * : (2, 11)
def h_42_npc(data, stat):
coords = data[2], data[3]
if coords == (6, 7):
if not (300 <= stat[4] <= 1380): return [0, "Nous sommes ouverts de 5 a 23 heures."]
if stat[9] == -1 or data[0] == stat[9]:
stat[9] = data[0]
return [0, "Besoin de quelque chose messire ?\n1. Hum, oui, j'aimerais manger. [-5 PO]\n2. Je voudrais dormir [-10 PO]", 2]
elif data[0] == stat[9] + 1:
stat[9] = -1
if stat[1] < 5: return [-1, "Je regrette, vous n'avez pas assez."]
return [-1, "Et voila pour vous !", 0, (0, 5), (1, -5)]
elif data[0] == stat[9] + 2:
stat[9] = -1
if stat[1] < 10: return [-2, "Nous ne pouvons pas nous permettre de faire credit."]
stat[4] = 360
return [-2, "Bien sur, si vous voulez bien me suivre. [VOUS VOUS ALLONGEZ SUR LE LIT ET VOUS ENDORMEZ RAPIDEMENT.]", 0, (0, 10), (1, -10)]
h_43 = (r"""
|====|--|============|--|=========|
|====|--|============|--|=========|
| /____\ /____\ |
| |====| |====| |
| * |
| * |
| +----+ +----+ +----+ |
| | | | | | | |
| +----+ +----+ +----+ |
| * |
|=============================| |
|=============================| |
| |
| |
|[^]|""",
(32, 14, 7, 47, 53)) # * : (24, 4) * : (6, 5) * : (13, 9)
def h_43_npc(data, stat):
coords = data[2], data[3]
if not (480 <= stat[4] <= 1140): return [0, "L'armurerie est ouverte de 8 heures a 18 heures."]
if coords == (24, 4):
if stat[3][1]: return [0, "Vous portez deja une armure, allez voir mon confrere."]
if stat[9] == -1 or data[0] == stat[9]:
stat[9] = data[0]
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]"]
else:
shields = ("UNE RONDACHE", "UN PAVOIS", "UNE COTTE DE MAILLES", "UNE BROIGNE", "UN HARNOIS")
for i in range(1, 6):
if data[0] == stat[9] + i:
stat[9] = -1
if stat[1] < (i + 1) * 10: return [-i, "Vous n'avez pas assez."]
stat[3][1] = i + 1
return [-i, "C'est un bon achat. [BERTFRID DECROCHA {}]".format(shields[i - 1]), 0, (1, -(i + 1) * 10)]
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] == stat[9]:
stat[9] = data[0]
return [0, "Vous voulez vendre votre piece d'armure ?\n1. Oui\n2. Non", 2]
elif data[0] == 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] == stat[9] + 2:
stat[9] = -1
return [-2, "Revenez quand vous voulez !"]
elif coords == (6, 5):
return [0, "Je ne suis qu'apprenti monseigneur. Adressez-vous plutot a Bertfrid."]
h_44 = (r"""
|==|==|==|==|==|==|==|==|==|==|==|
| |
| * ### ### |
| ##### ##### |
| ### ### |
| ### |_| |_| ### |
| ##### ##### |
| ### ### |
| |_| |_| |
| |
|=|/\|==|/\|=|/\|=| |=|/\|=|/\|==|/\|=|
|=|\/|==|\/|=|\/|=| |=|\/|=|\/|==|\/|=|
| |
| ___ ___ ___ ___ |
| | | | | | | | | |
| |___| |___| |___| |___| |
| | | | | | | | | |
| |___| |___| |___| |___| |
| |
| [I] [I] |
| * /|\ /|\ |
| [========] [========] |
| [========] [========] |
|=|/\|==|/\|=|/\|=|/\|=| |=|/\|=|/\|=|/\|==|/\|=|
|=|\/|==|\/|=|\/|=|\/|=|^^|=|\/|=|\/|=|\/|==|\/|=|""",
(24, 24, 7, 67, 89),
(25, 24, 7, 68, 89)) # * : (13, 2) * : (13, 20)
def h_44_npc(data, stat):
pass