-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtiles.py
1343 lines (1201 loc) · 47 KB
/
tiles.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
from ansi.colour.rgb import rgb256
from ansi.colour.fx import reset
from random import choices, choice
import monsters
from playerInventory import identifierDict
from monsters import mobDict, Mob
#Use this later for handling the tile if statements?
black = "\u001b[30m"
red = "\u001b[31m"
green = rgb256(0x00, 0xff, 0x09)
yellow = "\u001b[93m"
orange = rgb256(0xff, 0x73, 0x00)
gold = rgb256(0xe6, 0xcb, 0x02)
silver = rgb256(0xbf, 0xbf, 0xbf)
blue = "\u001b[34m"
magenta = "\u001b[95m"
cyan = rgb256(0x61, 0xff, 0xf4)
purple = rgb256(0xbe, 0x03, 0xfc)
white = "\u001b[37m"
bold = "\u001b[1m"
underline = "\u001b[4m"
italic = "\u001b[3m"
class Merchant:
def __init__(self,
name,
shopName,
flavorText,
faction,
buyDict,
sellDict={},
dialogue="",
discounts=""):
self.name = name
self.shopName = shopName
self.flavorText = flavorText
self.faction = faction
self.buyDict = buyDict
self.sellDict = sellDict
self.dialogue = dialogue
self.discounts = discounts
def __str__(self):
return rgb256(0x4a, 0xff, 0xa1) + self.shopName + ", " + self.name
def getName(self):
return self.name
def getShopName(self):
return self.shopName
def getFlavorText(self):
return self.flavorText
def getFaction(self):
return self.faction
def getBuyDict(self):
return self.buyDict
def getDiscounts(self):
return self.discounts
def getDialogue(self):
return self.dialogue
def getShopItems(self):
return self.buyDict
def getSellItems(self):
return self.sellDict
def getItemPrice(self, val):
return self.sellDict[val]
def printBuyItems(self):
for key, value in self.buyDict.items():
print(
str(identifierDict[key]) + blue + " Cost: " + silver +
str(value))
def printSellItems(self):
myString = ""
for key, value in self.sellDict.items():
myString += str(identifierDict[key]
) + blue + " Price: " + gold + str(value) + "\n"
return myString
def checkForItemInBuy(self, itemName):
for key in self.buyDict.keys():
if itemName == key:
return True
return False
def checkForItemInSell(self, itemName):
for key in self.sellDict.keys():
if itemName == key:
return True
return False
class Dialogue:
def __init__(self,
greeting={},
goodbye={},
metBefore=False,
dialogueRounds={},
faction="",
npcName=""):
self.greeting = greeting
self.goodbye = goodbye
self.dialogueRounds = dialogueRounds
self.metBefore = metBefore
self.faction = faction
self.npcName = npcName
def getFaction(self):
return self.faction
def getMetBefore(self):
return self.metBefore
def setMetBefore(self, value):
self.metBefore = value
def getNPCName(self):
return self.npcName
def getGreeting(self, turn, questDict):
for key, value in self.greeting.items():
key = key.split(" ")
if key[0] == "Starter":
print(value)
elif key[0] == "Turns":
if key[1] == "<" and self.metBefore:
if turn < int(key[2]):
return value
elif key[1] == "<=" and self.metBefore:
if turn <= int(key[2]):
return value
elif key[1] == ">" and self.metBefore:
if key > int(key[2]):
return value
elif key[1] == ">=" and self.metBefore:
if key >= int(key[2]):
return value
else:
return ""
#Make another conditional that accepts Quests for dialogues.
def getGoodbye(self, turn):
for key, value in self.goodbye.items():
key = key.split(" ")
if key[0] == "Starter":
print(value)
elif key[0] == "Turns":
if key[1] == "<" and self.metBefore:
if turn < int(key[2]):
return value
elif key[1] == "<=" and self.metBefore:
if turn <= int(key[2]):
return value
elif key[1] == ">" and self.metBefore:
if key > int(key[2]):
return value
elif key[1] == ">=" and self.metBefore:
if key >= int(key[2]):
return value
return ""
def getOneFurtherDialogue(self, key):
return "".join(
list(
filter(lambda a: a not in ("@", "*", "#", "`"),
self.dialogueRounds[key])))
def getFurtherDialogueDict(self):
return self.dialogueRounds
class Interactible:
def __init__(self,
type,
interactText,
dialogue="",
tileID=0,
toTileID=0,
recipes={},
lootTable={},
gatherMod="",
merchants="",
craftingType="",
multiDialogueLink={}):
self.type = type
self.interactText = interactText
self.dialogue = dialogue
self.tileID = tileID
self.toTileID = toTileID
self.recipes = recipes
self.lootTable = lootTable
self.gatherMod = gatherMod
self.merchants = merchants
self.craftingType = craftingType
self.multiDialogueLink = multiDialogueLink
try:
self.originalNothing = lootTable["Nothing"]
except KeyError:
self.originalNothing = 0
def resetNothing(self):
self.lootTable["Nothing"] = self.originalNothing
def resetNothings(self):
if self.lootTable["Nothing"] < 0:
self.lootTable["Nothing"] = 0
def getType(self):
return self.type
def getInteractText(self):
return self.interactText
def getDialogue(self):
return self.dialogue
def getTileID(self):
return self.tileID
def getToTileID(self):
return self.toTileID
def getGatherMod(self):
return self.gatherMod
def getRecipes(self):
return self.recipes
def getCraftingType(self):
return self.craftingType
def getLoot(self, stat):
returnList = []
listKeys = []
listValues = []
modifiedLootTable = self.lootTable
nothingVal = modifiedLootTable["Nothing"]
modifiedLootTable["Nothing"] -= stat
if modifiedLootTable["Nothing"] < 0:
modifiedLootTable = 0
for key, value in self.lootTable.items():
listKeys.append(key)
listValues.append(value)
del listKeys[0]
del listValues[0]
returnList = choices(listKeys, listValues, k=self.lootTable["Rolls"])
modifiedLootTable[
"Nothing"] = nothingVal #Reset nothing value so that it doesn't just allow you to get infinite resources by spamming the interation.
return returnList
def setLootTableModifier(self, setModStat):
#Subtrat mod from "nothing"
self.lootTable["Nothing"] -= setModStat
#Modifier set and finished.
def getMerchants(self):
return self.merchants
def getDialogueLink(self):
return self.multiDialogueLink
dialogue1 = Dialogue(
greeting={
"Starter": "\"Hail the Moons!\"",
"Turns < 200": "\"You new here?\"",
"Turns > 200": "\"I'm glad to see you again!\"",
"Turns > 700":
"\"Ah, it's you again. How long has it been, this time?\""
},
goodbye={"Starter": "\"I wish you luck on your journey!\""},
metBefore=False,
dialogueRounds={
"f)Ask about the fortress.|nMet 0&Round 1 $MetBefore":
"\"The Moonreach Fortress is pretty much the center of the Hertolfan forest, the hub of trade in this region.\nThe guild pays no little amount of gold to its adventurers who go out and protect citizens like me.\nAnd, I get to be paid when they buy my goods!\"",
"b)Ask the traveler why he didn't join the Guild.|&Round 2^f@":
"\"Well, uh, I'm not that brave of a guy, haha.\"",
"g)Goodbye.|&Round 1": "",
"g)Goodbye.|&Round 2": ""
},
faction="Moonreach Guild", npcName="Traveller Hervald")
dialogue2 = Dialogue(
greeting={
"Starter": "\"Anything you like?\"",
"Turns > 50": "\"How you doing?\""
},
goodbye={
"Starter": "\"Thank you for your business!\"",
"Turns > 50": "\"See you 'round!'\""
},
metBefore=False,
dialogueRounds={
"i)Say that the food smells great.@|&Round 1":
"\"Glad ya like it! Why don't you have a taste?\"",
"c)Ask for his recipe.#@|Turns > 100&Round 1":
"\"Haha, I'd be throwin' away my business if I told you!\"",
"g)Goodbye.|&Round 1": ""
},
faction="Moonreach Guild", npcName="Peddler Jonas")
dialogue3 = Dialogue(
greeting={"Starter": "\"Is there something you need?\""},
goodbye={"Starter": "\"My best wishes for your travels. Now, if you'll excuse me...\""},
metBefore=False,
dialogueRounds={"a)Ask about the current state of Moonreach and its place in the forests.@|nQuest Siege of Wroburg 1&Round 1":"\"I am sure the librarian would be happy to lecture you on our history, though right now, our Guild hasn't many issues.\nThat is, aside from the vermin that still run around rampant in our sewage.\"", "w)Ask about who he is.@|&Round 1":"\"I am Chrys Sanguinis, this Guild's master. Perhaps you may have heard of me as the Torch of Perst.\nProbably not. It was likely ahead of your time.\"", "g)Goodbye.|&Round 1":""},
faction="Moonreach Guild", npcName="Chrys Sanguinis")
merchant1 = Merchant(
"Peddler Jonas",
"The Roasting Spit",
"As you approach the stand, you smell an intensely enticing aroma, as the smell of cooked meat lathered in sauce caresses your nostrils.",
"Moonreach Guild", {
"Roast Meat Skewer": 8,
"Roast Mushroom Skewer": 5
},
discounts=1,
dialogue=dialogue2)
merchant2 = Merchant(
"Smith Barro", "The Hammer and Plate",
"A sign with a black-headed hammer over a silver-colored chestplate hangs over a medium-sized shop, where heavy banging of metal upon metal sounds from within.",
"Moonreach Guild", {
"Leather Tunic": 24,
"Leather Pants": 22,
"Skull Cap": 20,
"Studded Leather Tunic": 40,
"Studded Leather Pants": 36
})
interact1 = Interactible(
"Dungeon Entrance",
"You enter the cave, walking into the yawning, dirty, stone.",
toTileID=-1)
interact2 = Interactible(
"Dungeon Entrance",
"You exit the cave, as your eyes slowly adjust to the light of the outside.",
toTileID=9)
interact3 = Interactible("Dialogue",
"You approach another traveler entering the gates.",
dialogue=dialogue1)
interact4 = Interactible("Merchant",
"You approach the stalls.",
merchants=(merchant1, merchant2))
interact5 = Interactible(
"Dialogue",
"The demon raises his horned head, a chiseled face with a pair of darkened eyes looking at you in question, wordlessly asking for you to quickly go on and tell him what it was that troubled you so to enter the room.\nHis assistant raises her head to observe you for a moment, before dipping her head back down to her work.",
)
crafting1 = Interactible(
"Crafting",
"You enter the house radiating of strange fumes, as you smell odd smells that fill the air of this house of hissing and puffing magical machinery.",
craftingType="Alchemy")
resource1 = Interactible(
"Resource",
"You attempt to capture one of the fish swimming in these waters.",
tileID=7,
lootTable={
"Rolls": 1,
"Fresh Perch|Fishing|3": 4,
"Nothing": 96
},
gatherMod="Fishing")
moonreachQuestHall = Interactible(
"Quest Hall",
"The Moonreach Quest Hall displays a wall of parchment papers that write a multitude of tasks open for you."
)
class Tile:
#Input nearbyTiles as a dictionary! Put in indices as "North," "South," "East," or "West." Use a string to use as text for a tile that isn't there.
def __init__(self,
flavorText,
searchText,
thisTileID,
nearbyTiles,
tileNotFoundText=(gold + "Area not made yet, sorry."),
interactible=False,
climbable=False,
upTileID=0,
downTileID=0,
climbText="",
climbFailText="",
climbFailDamage=0,
climbRequirement=0,
encounter=False,
encounterChance=0,
findNoEncounterText="",
repNoEncounterText="",
noMoreMobsText="",
entryEncounter=False,
lootTable={},
statModifiers={},
questFlavorText={},
questSearchText={},
questEncounters={},
questEntryEncounter=False):
self.thisTileID = thisTileID
self.flavorText = flavorText
self.nearbyTiles = nearbyTiles
self.searchText = searchText
self.tileNotFoundText = tileNotFoundText
self.climbText = climbText
self.climbFailText = climbFailText
self.climbRequirement = climbRequirement
self.climbFailDamage = climbFailDamage
self.interactible = interactible
self.lootTable = lootTable
self.climbable = climbable
self.upTileID = upTileID
self.downTileID = downTileID
self.encounter = encounter
self.entryEncounter = entryEncounter
self.encounterChance = encounterChance
self.findNoEncounterText = findNoEncounterText
self.repNoEncounterText = repNoEncounterText
self.noMoreMobsText = noMoreMobsText
self.statModifiers = statModifiers
try:
self.originalNothing = lootTable["Nothing"]
except KeyError:
self.originalNothing = 0
self.questFlavorText = questFlavorText
self.questSearchText = questSearchText
self.questEncounters = questEncounters
self.questEntryEncounter = questEntryEncounter
def resetNothing(self):
self.lootTable["Nothing"] = self.originalNothing
def getReferenceName(self):
if self.thisTileID > 0:
return "Tile " + str(self.thisTileID)
else:
return "Dungeon Tile " + str(self.thisTileID -
(2 * self.thisTileID))
def getTileID(self):
return self.thisTileID
def getNearbyTiles(self):
return self.nearbyTiles
def getLoot(self):
returnList = []
listKeys = []
listValues = []
for key, value in self.lootTable.items():
listKeys.append(key)
listValues.append(value)
del listKeys[0]
del listValues[0]
returnList = choices(listKeys, listValues, k=self.lootTable["Rolls"])
return returnList
def resetNothings(self):
if self.lootTable["Nothing"] < 0:
self.lootTable["Nothing"] = 0
def getInteractible(self):
return self.interactible
def getTileNotFound(self):
return self.tileNotFoundText
def getFlavorText(self):
return self.flavorText
def getSearchText(self):
return self.searchText
def getLootTable(self):
return self.lootTable
def getClimbable(self):
return self.climbable
def getUpTile(self):
return self.upTileID
def getClimbFailDamage(self):
return self.climbFailDamage
def getDownTile(self):
return self.downTileID
def getEncounter(self):
if type(self.encounter) == list:
return choice(self.encounter)
return self.encounter
def setInteractible(self, value):
self.interactible = value
def getNoFindText(self):
return self.findNoEncounterText
def getNoRepText(self):
return self.repNoEncounterText
def getNoMoreMobsText(self):
return self.noMoreMobsText
def getStatModifiers(self):
return self.statModifiers
def getClimbText(self):
return self.climbText
def getClimbFailText(self):
return self.climbFailText
def getQuestEntryEncounter(self):
return self.questEntryEncounter
def getQuestFlavorText(self, questProgress):
st = ""
for key, value in self.questFlavorText.items():
ph = key.split("|")
if questProgress[ph[0]] == int(ph[1]):
st += self.questFlavorText[key]
st += "\n"
st = st.strip()
return st
def getQuestSearchText(self, questProgress):
st = ""
for key, value in self.questSearchText.items():
ph = key.split("|")
if questProgress[ph[0]] == int(ph[1]):
st += self.questSearchText[key]
st += "\n"
st = st.strip()
return st
def randomSetInteractible(self, weight):
self.interactible = choices((True, False), (weight, 100 - weight),
k=1)[0]
print(self.interactible)
def resetInteractible(self):
self.interactible = "Random"
def encounterTest(self, tileMobs, reputation="None"):
if reputation != "None":
if self.encounter != False:
if choices(
("meet", "no meet"),
(self.encounterChance, 100 - self.encounterChance)
) == [
"meet"
] and tileMobs > 0 and reputation < self.encounter.getEncounterThreshold(
):
return True
else:
return False
else:
return False
else:
if self.encounter != False:
if choices(
("meet", "no meet"),
(self.encounterChance,
100 - self.encounterChance)) == ["meet"] and tileMobs > 0:
return True
else:
return False
else:
return False
def encounterOnEnter(self, mobAmount):
if choices(("meet", "no meet"),
(mobAmount, 100 - mobAmount)) == ["meet"]:
return True
else:
return False
def setLootTableModifier(self, setModStat):
#Subtrat mod from "nothing"
self.lootTable["Nothing"] -= setModStat
self.resetNothings()
#Modifier set and finished.
def checkClimb(self, modifierStat: int) -> bool:
if choices(("success", "fail"),
(modifierStat, self.climbRequirement)) == ["success"]:
print(blue + self.climbText, reset)
return True
else:
print(red + self.climbFailText, reset)
return False
def checkQuestEncounters(self, key: str, value: int) -> bool:
for k, v in self.questEncounters.items():
k = k.split("|")
if k[0] == key and int(k[1]) == value and v[1] > 0:
return True
return False
def isQuestEncounter(self, questProgress: dict) -> bool:
success = [
key for key, value in questProgress.items()
if self.checkQuestEncounters(key, int(value))
]
if len(success) > 0:
return True
else:
return False
def getQuestEncounter(self, questProgress: dict):
success = {
key: value
for key, value in questProgress.items()
if self.checkQuestEncounters(key, int(value))
}
if len(success) == 0:
return False
k = list(success)[0] #First valid quest name
return self.questEncounters[k + "|" + str(
success[k])][0], k + "|" + str(success[k])
# mob, and key
def questEncounterWin(self, value: str) -> None:
self.questEncounters[value][1] -= 1
def getAmountEncounters(self, value: str) -> int:
return self.questEncounters[value][1]
tile1 = Tile((reset + "You awaken in a forest of pines"), (
"The trees stretch tall and thick, as piles of pine needles and small herbs cling to the ground."
),
1, {
"North": 2,
"South": 5,
"East": 3,
"West": 4
},
lootTable={
"Rolls": 1,
"Pine Twig": 1,
"Nothing": 30
})
tile2 = Tile((reset + "A burbling brook sounds off ahead."),
("You spot the outline of a building off to the northwest."), 2, {
"North": 29,
"South": 1,
"West": 6,
"East": 7
})
tile3 = Tile(
(reset +
"A very large tree stands before you, its crown scraping the sky."),
("The tree rises, as clouds float through its needles."),
3, {
"North": 7,
"South": 30,
"West": 1
},
lootTable={
"Rolls": 1,
"Mushroom": 1,
"Nothing": 35
}) #Make this climbable eventually
tile4 = Tile((
reset + "The trees give way to a dirt road cutting through the wilderness."
), ("A serene road stretches through the forest, and off to the north, lies a fortress sitting atop a hill."
), 4, {
"North": 6,
"South": 8,
"East": 1
})
tile5 = Tile((
reset + "The leaves wave in the wind. A damp draft curls around your feet."
), ("You spot a cave, further down south, its entrance covered slightly by vegetation."
), 5, {
"North": 1,
"South": 9,
"East": 30
})
tile6 = Tile((
reset +
"A hill rises, a mound that rises slowly above the ground.\nAtop which lies a fortress of stone."
), ("While climbing the hill, the clamor of those within the fortress grows louder and louder."
), 6, {
"North": 10,
"South": 4,
"East": 2
})
tile7 = Tile((
reset +
"A river rushes before you, running through the forest, over gathered stones and rarely interrupted by a small form darting through its waters."
), ("You spot fish swimming in these shallows."),
7, {
"South": 3,
"West": 2
},
interactible=resource1)
tile8 = Tile((
reset +
"The trees come very close to the well-travelled road.\nRoots frame the sides of the road, branches towering over a road that flashes of points of light dancing as the shadows of pine needles move."
), ("You spot a curve in the road as it goes south, where it turns to the east."
), 8, {
"North": 4,
"West": 9,
"South": 28
})
tile9 = Tile(
(reset +
"A yawning cave opening is before you, as small sticks are strewn about.its entrance."
), ("The ground is damp, the dirt cool and watered."),
9, {
"North": 5,
"South": 37,
"East": 33,
"West": 28
},
interactible=interact1,
repNoEncounterText=(
"The animals reluctantly welcome your presence in their homes."),
findNoEncounterText=(
"You feel like you are being watched by a few creatures nearby."),
noMoreMobsText=
(reset +
"All that's left here, are the stones that line the entrance, and the trees around it.\nIt's quite quiet here."
),
encounter=mobDict["Hungry Wolf"],
encounterChance=20)
tile10 = Tile((
reset +
"You arrive at the gates of the fortress, guarded by armored humans hefting long, crescent-tipped pikes.\nAll the while, a rare person walks down the path to enter the fortress."
), ("The guards look at you strangely as you search around the hill before the fortress gates.\nThis fortress was certainly a structure built for war, as you spot intricate, durable, masonry,\n with the little telltale holes of arrow slits by the sides of the gateway, a heavy iron gate raised above this vaunted corridor."
),
10, {
"North": 11,
"South": 6
},
tileNotFoundText=(
gold + "There's no point in trying to walk through walls."),
interactible="Random",
entryEncounter=True,
encounterChance=100)
tile11 = Tile((
reset +
"A large courtyard, bustling with people moving every which way around the fortress-city on the hill."
), "On the road further north, you spot a sloping street leading upward to a grand keep, of beautifully stained windows and stonework, flying purple and white banners of the guild, depicting a crescent moon.",
11, {
"North": 13,
"South": 10,
"East": 14,
"West": 12
})
tile12 = Tile((
reset +
"You find a long, stretching, road, its cobblestones obscured by the encroaching stands of merchants, and the clamor of the citizens."
), ("Warrens of alleyways and buildings make up the land around these shops, and in this hill fortress."
),
12, {
"North": 17,
"South": 15,
"East": 11,
"West": 16
},
interactible=interact4)
tile13 = Tile(
(reset +
"The northern road leads to the main guildhall, where stone gargoyles stare downward over two massive wooden doors."
),
("You spot that various colorful depictions of the adventurers of old are painted into the stained glass."
),
13, {
"North": 18,
"South": 11,
"West": 17
},
tileNotFoundText=
(gold +
"The walls of the arena do not present an entrance for you to go through."
))
tile14 = Tile((
reset +
"The eastern road leads to a massive circular stone building, the walls of this edifice engraved with depictions of battle."
), ("You see that this place is called the Arena, where glorious battle could be done between you and other powerful opponents, without any risk of death."
),
14, {
"North": 19,
"West": 11
},
tileNotFoundText=(
gold +
"You find that you cannot walk through the walls of houses."
))
tile15 = Tile(
(reset +
"There is a large tower here, that stands tall and flies the banners of the Moonreach Guild."
),
"The tower's doors are locked.",
15, {"North": 12},
tileNotFoundText=
"It doesn't seem like the other buildings here are for you to intrude upon."
)
tile16 = Tile(
(reset +
"Further down the market road, there lies a collection of buildings that house open facilities for crafters."
),
("Two such buildings stand here, a forge radiating of heat and an apothecary smelling of magical fumes."
),
16, {"East": 12},
tileNotFoundText=
"It doesn't seem like the other buildings here are for you to intrude upon.",
interactible=crafting1)
tile17 = Tile(
(reset +
"North of the market road, lies a group of shops more lavish than those south of them, having their own buildings to themselves."
), ("Each of these buildings caters to the richer sort of adventurer."),
17, {
"South": 12,
"East": 13
},
tileNotFoundText=
"It doesn't seem like the other buildings here are for you to intrude upon."
)
tile18 = Tile((
reset +
"The main keep of the fortress is right before you, a pair of stone gargoyles grinning over the heads of a pair of heavily-armored guardsmen."
), ("The heavy wooden doors open wide into a long, vaunted, hall, a carpet of scarlet red stretching and branching off into the cathedral-like interior of the castle keep."
), 18, {
"North": 20,
"South": 13
})
tile19 = Tile(
(reset +
"Even the arena's entrance gate is a grand sight, as effigies of past champions stand vigil in poses of victory, as plaques detail their exploits."
),
("You read the plaques: \nHaerclus Asmitheus, the Lord of Hunger, who ate his opponents alive when they failed.\nRevei Kroni, the Red Baron, who crushed his enemies with his unwavering will.\nGarth Karnis, the Champion of Steel, who had never been injured in a single match.\nEir Goromir, the Bone-Crusher, who turned his enemies to dust under his hammer larger than boulders.\nBead Tyrhall, the Ash Harpy, who burnt her enemies to piles of ash.\nGiorkkos, the Cloudy Day, who slew a full arena of fighters with a single spell."
),
19, {"South": 14},
tileNotFoundText=
(gold +
"You don't find it a good idea to walk over open air, not knowing how to fly."
)
) #Add the Arena interactible here. May have an arena shop merchant who has random stuff in their sell dictionary.
tile20 = Tile((
reset +
"The grand chamber of the main guild-hall branches off into many rooms through halls on its eastern and western walls."
), ("Painted murals of past victories, of adventurer-heroes of old who slew grotesque monsters are depicted hanging on the walls."
), 20, {
"North": 24,
"South": 18,
"East": 21,
"West": 23
})
tile21 = Tile((
reset +
"Past a statue of a winged man, lies a large hall,\nwith a floor of stone tiling leading up to a room lit to display a wall with papers tacked all over its surface."
), ("You spot that the tiles on the floor are inscribed with the names of all those who had fallen, and died during their quests."
),
21, {
"West": 20,
"East": 22
},
tileNotFoundText=(gold + "The walls are in your way."),
interactible=moonreachQuestHall) #Quest Hall interactible
tile22 = Tile((
reset +
"A desk with a brightly-smiling woman that greets all who enter the hall lies before you."
), ("A stack of parchment and an feather pen and inkwell are placed upon the table."
),
22, {"West": 21},
tileNotFoundText=(gold + "The walls are in your way."))
tile23 = Tile((
reset +
"Past a statue of a thin, reedy, man in a businesslike suit, lies an open common plaza, with doorways opening off to numerous personal residences."
), ("You spot a perfect model of a mirror-like lake at the bottom of a group of rocky crags."
),
23, {"East": 20},
tileNotFoundText=(
gold +
"These other residences are not for you to intrude upon."))
tile24 = Tile((
reset +
"The hall stretches for quite the long way, the vaunted ceiling draped with the purple and silver colors of the Moonreach Guild, a grand and ornate site to display awe upon the visitor."
), ("You spot an ornate door leading off to a kingly chamber past the end of this great hall."
), 24, {
"North": 27,
"South": 20,
"East": 25,
"West": 26
})
tile25 = Tile(
(reset +
"Past a statue of a lady with three eyes, lies a pair of closed doors, where beyond lies a room of absolute quiet."
),
("Stacks of books that stretch and span the room, an interior lit by spiraling magic circles that fly in the sky, as a serene room of study spans outward around you."
),
25, {"West": 24},
tileNotFoundText=
(gold +
"The walls of books and shelves lead you round and round, till you return right where you began."
)) #Library interactible.
tile26 = Tile((
reset +
"An empty-ceiling room lies here, a single man dressed in loose robes standing in its center. He seems to be engrossed in a series of artful strikes against an invisible opponent."
), ("The room opens into the clear sky above, sunny light shining down on fluffy clouds that float through the towers of the guild hall roof."
), 26, {"East": 24}) #Yin Nagata NPC, may challenge player.
tile27 = Tile(
(reset +
"Past a statue of a spear-wielding lady with a prideful smile, lies a spacious office, with a horned Demon and his assistant working together, poring over stacks upon stacks of parchment laid across their beautifully carved wooden table."
),
("There lie a multitude of tapestries and varied trophies hanging on the walls and meticulously shelved, ever-more displaying this guild as that of hunters, hunters who hunted the big game of the wild."
),
27, {"South": 24},
tileNotFoundText=(
gold +
"You cannot find yourself walking through the walls of this office."),
interactible=interact5) #Guildmaster Chrys NPC
tile28 = Tile(
(reset +
"The road, stretching far from the north to the south, carved by the passage of foot and wagon, over many years of traveling."
),
("Being further from civilization, this segment of the road is significantly more overgrown with weeds than that of the north."
),
28, {
"North": 8,
"South": 36,
"East": 9,
"West": 34
},
questFlavorText={
"Bandits|1":
(reset +
"You come upon a wrecked wagon, with its drawing oxen slain with arrows in their eyes, and a wagon wheel crushed against the dirt."
),
"Bandits|2":
(reset +
"You come upon a wrecked wagon, with its drawing oxen slain with arrows in their eyes, and a wagon wheel crushed against the dirt."
)
},
questSearchText={
"Bandits|2":
(reset +
"It's clear what happened here. The caravan was ambushed, with human tracks of at least three men that lead off into the west."
)
})
tile29 = Tile((
reset +
"Water runs over smoothened river stones, clear water reflecting the light of day in your eyes, as moss covered stones wall its sides in verdant green."
), ("You spot a wooden bridge going over the stream, crossing the water and crafted of logs tied by water-soaked rope."
), 29, {"South": 2
}) #Tilenotfound should be being blocked by fortress walls.
tile30 = Tile((
reset +
"A fallen log lies here, the bough of an elder tree long dead, overgrown with smaller plants and mushrooms hidden beneath."
), ("You spot a rabbit hole nearly hidden beneath the rotting log."), 30, {
"North": 3,
"South": 33,
"East": 31,
"West": 5
})
tile31 = Tile(