Advertisement
Guest User

Untitled

a guest
Aug 19th, 2017
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 318.88 KB | None | 0 0
  1. # -*- coding: cp437 -*--
  2. from random import randint
  3. import time
  4. import msvcrt
  5. from msvcrt import getch
  6. import os
  7. import sys
  8.  
  9. global current_position
  10. global current_face
  11. global current_floor
  12. global current_map
  13. global face
  14. global step
  15.  
  16. global party_hero
  17. global party_hero_length
  18. global party_enemy
  19. global party_enemy_length
  20. global battle_loop
  21. global battle_loop1
  22. global items_length
  23. global boss
  24. global battle_exp
  25.  
  26. battle_exp = 0
  27. party_hero = ['Dwarf1','Elf1','Halfling1','Human1']
  28. party_enemy = []
  29. items_list = ['Potion','Potion','Potion','Potion','Potion','Potion','Potion','Potion']
  30. command_list = ['Attack','Inventory','Escape']
  31. battle_loop = 'false'
  32. boss = 'false'
  33. stats_names = ['FGT','STR','DEF','HIT','current HP','max HP']
  34.  
  35. hit = [
  36. [63,50,50,38,38,25,13,6,0,0],
  37. [63,63,50,50,38,38,25,13,6,0],
  38. [75,63,63,50,50,38,38,25,13,6],
  39. [75,75,63,63,50,50,38,38,25,13],
  40. [87,75,75,63,63,50,50,38,38,25],
  41. [87,87,75,75,63,63,50,50,38,38],
  42. [99,87,87,75,75,63,63,50,50,38],
  43. [99,99,87,87,75,75,63,63,50,50],
  44. [99,99,99,87,87,75,75,63,63,50],
  45. [99,99,99,99,87,87,75,75,63,63],
  46. [99,99,99,99,99,87,87,75,75,63]
  47. ]
  48.  
  49. charadict_enemy = {
  50. 'Giant ant': [0,2,4,1,2,2,'GIANT ANT',2],
  51. 'Badger': [0,2,3,3,1,1,'BADGER',1],
  52. 'Fire beetle': [0,1,3,1,1,1,'FIRE BEETLE',1],
  53. 'Manes demon': [0,1,2,3,1,1,'MANES DEMON',1],
  54. 'Dwarf': [0,1,3,1,1,1,'DWARF',1],
  55. 'Ear seeker': [0,1,1,1,1,1,'EAR SEEKER',1],
  56. 'Elf': [0,1,3,1,1,1,'ELF',1],
  57. 'Gnome': [0,2,4,1,3,3,'GNOME',3],
  58. 'Goblin': [0,1,2,1,1,1,'GOBLIN',1],
  59. 'Halfling': [0,1,2,1,1,1,'HALFLING',1],
  60. 'Hobgoblin': [0,1,3,1,2,2,'HOBGOBLIN',2],
  61. 'Human bandit': [0,1,1,1,1,1,'HUMAN BANDIT',1],
  62. 'Human berserker': [0,1,1,1,1,1,'HUMAN BERSERKER',1],
  63. 'Human brigand': [0,1,1,1,1,1,'HUMAN BRIGAND',1],
  64. 'Kobold': [0,1,2,1,1,1,'KOBOLD',1],
  65. 'Orc': [0,1,2,1,1,1,'ORC',1],
  66. 'Piercer': [0,1,4,1,1,1,'PIERCER',1],
  67. 'Giant rat': [0,1,2,1,1,1,'GIANT RAT',1],
  68. 'Rot grub': [0,1,1,1,1,1,'ROT GRUB',1],
  69. 'Shrieker': [0,1,2,1,3,3,'SHRIEKER',1],
  70. 'Skeleton': [0,1,2,1,1,1,'SKELETON',1],
  71. 'Zombie': [0,2,1,1,2,2,'ZOMBIE',2],
  72. 'Giant badger': [0,2,3,3,3,3,'GIANT BADGER',3],
  73. 'Giant centipede': [0,1,1,1,1,1,'GIANT CENTIPEDE',1],
  74. 'Lemure devil': [0,2,2,1,3,3,'LEMURE DEVIL',3],
  75. 'Gas spore': [0,1,1,1,1,1,'GAS SPORE',1],
  76. 'Gnoll': [0,2,3,1,2,2,'GNOLL',2],
  77. 'Stirge': [0,1,1,1,1,1,'STIRGE',1],
  78. 'Giant toad': [0,2,2,1,2,2,'GIANT TOAD',2],
  79. 'Troglodyte': [0,2,3,1,3,3,'TROGLODYTE',3],
  80. 'Boring beetle': [0,3,4,1,5,5,'BORING BEETLE',5],
  81. 'Bugbear': [0,2,3,1,3,3,'BUGBEAR',3,],
  82. 'Very young dragon': [0,7,4,3,8,8,'VERY YOUNG DRAGON',8],
  83. 'Young dragon': [0,7,4,3,10,10,'YOUNG DRAGON',10],
  84. 'Young adult dragon': [0,8,5,3,13,13,'YOUNG ADULT DRAGON',13],
  85. 'Adult dragon': [0,9,6,3,14,14,'ADULT DRAGON',14],
  86. 'Old dragon': [0,10,7,3,16,16,'OLD DRAGON',16],
  87. 'Very old dragon': [0,10,7,3,17,17,'VERY OLD DRAGON',17],
  88. 'Ancient dragon': [0,11,8,3,18,18,'ANCIENT DRAGON',18],
  89. 'Violet fungus': [0,2,2,4,3,3,'VIOLET FUNGUS',3],
  90. 'Gelatinous cube': [0,3,1,1,4,4,'GELATINOUS CUBE',4],
  91. 'Ghoul': [0,2,2,3,2,2,'GHOUL',2],
  92. 'Giant lizard': [0,2,3,1,3,3,'GIANT LIZARD',3],
  93. 'Wererat': [0,2,2,1,3,3,'WERERAT',3],
  94. 'Ochre jelly': [0,4,1,1,6,6,'OCHRE JELLY',6],
  95. 'Ogre': [0,3,3,1,4,4,'OGRE',4],
  96. 'Huge spider': [0,2,2,1,2,2,'HUGE SPIDER',2],
  97. 'Large spider': [0,1,1,1,1,1,'LARGE SPIDER',1],
  98. 'Giant tick': [0,2,4,1,3,3,'GIANT TICK',3],
  99. 'Giant weasel': [0,2,2,1,3,3,'GIANT WEASEL',3],
  100. 'Carnivorous ape': [0,3,2,3,5,5,'CARNIVOROUS APE',5],
  101. 'Blink dog': [0,3,3,1,4,4,'BLINK DOG',4],
  102. 'Gargoyle': [0,3,3,4,4,4,'GARGOYLE',4],
  103. 'Ghast': [0,3,3,3,4,4,'GHAST',4],
  104. 'Gray ooze': [0,2,1,1,3,3,'GRAY OOZE',3],
  105. 'Hell hound': [0,3,3,1,4,4,'HELL HOUND',4],
  106. 'Five-headed hydra': [0,3,3,5,5,5,'FIVE-HEADED HYDRA',5],
  107. 'Six-headed hydra': [0,4,3,6,6,6,'SIX-HEADED HYDRA',6],
  108. 'Five-headed pyro hydra': [0,3,3,5,5,5,'FIVE-HEADED PYRO HYDRA',5],
  109. 'Werewolf': [0,3,3,1,4,4,'WEREWOLF',4],
  110. 'Yellow mold': [0,1,1,1,1,1,'YELLOW MOLD',1],
  111. 'Owlbear': [0,3,3,3,5,5,'OWLBEAR',5],
  112. 'Rust monster': [0,3,4,1,5,5,'RUST MONSTER',5],
  113. 'Shadow': [0,2,2,1,3,3,'SHADOW',3],
  114. 'Giant constrictor': [0,4,3,2,6,6,'GIANT CONSTRICTOR',6],
  115. 'Su-monster': [0,4,2,5,5,5,'SU-MONSTER',5],
  116. 'Ice toad': [0,3,3,1,5,5,'ICE TOAD',5],
  117. 'Poisonous toad': [0,2,2,1,2,2,'POISONOUS TOAD',2],
  118. 'Cockatrice': [0,3,2,1,5,5,'COCKATRICE',5],
  119. 'Displacer beast': [0,4,3,2,6,6,'DISPLACER BEAST',6],
  120. 'Doppelganger': [0,3,3,1,4,4,'DOPPELGANGER',4],
  121. 'Seven-headed hydra': [0,4,3,7,7,7,'SEVEN-HEADED HYDRA',7],
  122. 'Six-headed pyro hydra': [0,4,3,6,6,6,'SIX-HEADED PYRO HYDRA',6],
  123. 'Imp': [0,2,4,1,2,2,'IMP',2],
  124. 'Leucrotta': [0,4,3,1,6,6,'LEUCROTTA',6],
  125. 'Subterranean lizard': [0,4,3,1,6,6,'SUBTERRANEAN LIZARD',6],
  126. 'Wereboar': [0,3,3,1,5,5,'WEREBOAR',5],
  127. 'Minotaur': [0,4,2,2,6,6,'MINOTAUR',6],
  128. 'Quasit': [0,2,4,3,3,3,'QUASIT',3],
  129. 'Slithering tracker': [0,3,3,1,5,5,'SLITHERING TRACKER',5],
  130. 'Giant amphisbaena': [0,4,4,2,6,6,'GIANT AMPHISBAENA',6],
  131. 'Giant poisonous snake': [0,3,3,1,4,4,'GIANT POISONOUS SNAKE',4],
  132. 'Giant spitting snake': [0,3,3,1,4,4,'GIANT SPITTING SNAKE',4],
  133. 'Giant spider': [0,3,3,1,4,4,'GIANT SPIDER',4],
  134. 'Basilisk': [0,4,3,1,6,6,'BASILISK',6],
  135. 'Carrion crawler': [0,2,4,8,3,3,'CARRION CRAWLER',3],
  136. 'Erinyes devil': [0,4,4,1,6,6,'ERINYES DEVIL',6],
  137. 'Djinni': [0,4,3,1,7,7,'DJINNI',7],
  138. 'Green slime': [0,2,1,1,2,2,'GREEN SLIME',2],
  139. 'Eight-headed hydra': [0,4,3,8,8,8,'EIGHT-HEADED HYDRA',8],
  140. 'Nine-headed hydra': [0,4,3,9,9,9,'NINE-HEADED HYDRA',9],
  141. 'Jackalwere': [0,3,3,1,4,4,'JACKALWERE',4],
  142. 'Lammasu': [0,4,2,2,7,7,'LAMMASU',7],
  143. 'Werebear': [0,4,4,3,7,7,'WEREBEAR',7],
  144. 'Weretiger': [0,4,4,3,6,6,'WERETIGER',6],
  145. 'Manticore': [0,4,3,3,6,6,'MANTICORE',6],
  146. 'Medusa': [0,4,3,1,6,6,'MEDUSA',6],
  147. 'Brown mold': [0,1,1,1,1,1,'BROWN MOLD',1],
  148. 'Yellow mold': [0,1,1,1,1,1,'YELLOW MOLD',1],
  149. 'Ogre mage': [0,3,3,1,4,4,'OGRE MAGE',4],
  150. 'Otyugh': [0,4,4,3,7,7,'OTYUGH',7],
  151. 'Rakshasa': [0,4,7,3,7,7,'RAKSHASA',7],
  152. 'Salamander': [0,4,3,2,7,7,'SALAMANDER',7],
  153. 'Phase spider': [0,3,2,1,5,5,'PHASE SPIDER',5],
  154. 'Troll': [0,4,3,3,6,6,'TROLL',6],
  155. 'Wight': [0,3,3,1,4,4,'WIGHT',4],
  156. 'Wind walker': [0,4,2,1,6,6,'WIND WALKER',6],
  157. 'Wraith': [0,3,3,1,5,5,'WRAITH',5],
  158. 'Wyvern': [0,4,4,2,7,7,'WYVERN',7],
  159. 'Black pudding': [0.5,2,1,10,10,'BLACK PUDDING',10],
  160. 'Chimera': [0,4,3,6,9,9,'CHIMERA',9],
  161. 'Succubus': [0,4,5,2,6,6,'SUCCUBUS',6],
  162. 'Vrock': [0,4,5,5,8,8,'VROCK DEMON',8],
  163. 'Hezrou': [0,4,6,3,9,9,'HEZROU DEMON',9],
  164. 'Glabrezu': [0,5,7,5,10,10,'GLABREZU DEMON',10],
  165. 'Barbed devil': [0,4,5,3,8,8,'BARBED DEVIL',8],
  166. 'Bone devil': [0,4,6,1,9,9,'BONE DEVIL',9],
  167. 'Horned devil': [0,4,8,4,5,5,'HORNED DEVIL',5],
  168. 'Efreeti': [0,5,4,1,10,10,'EFREETI',10],
  169. 'Air elemental': [0,9,4,1,12,12,'AIR ELEMENTAL',12],
  170. 'Earth elemental': [0,9,4,1,12,12,'EARTH ELEMENTAL',12],
  171. 'Fire elemental': [0,9,4,1,12,12,'FIRE ELEMENTAL',12],
  172. 'Water elemental': [0,9,4,1,12,12,'WATER ELEMENTAL',12],
  173. 'Ettin': [0,5,4,2,10,10,'ETTIN',10],
  174. 'Hill giant': [0,4,3,1,8,8,'HILL GIANT',8],
  175. 'Stone giant': [0,4,5,1,9,9,'STONE GIANT',9],
  176. 'Fire giant': [0,5,4,1,11,11,'FIRE GIANT',11],
  177. 'Frost giant': [0,5,3,1,10,10,'FROST GIANT',10],
  178. 'Flesh golem': [0,4,1,2,8,8,'FLESH GOLEM',8],
  179. 'Gorgon': [0,4,4,1,8,8,'GORGON',8],
  180. 'Groaning spirit': [0,4,5,1,7,7,'GROANING SPIRIT',7],
  181. 'Ten-headed hydra': [0,5,3,10,10,10,'TEN-HEADED HYDRA',10],
  182. 'Eleven-headed hydra': [0,5,3,11,11,11,'ELEVEN-HEADED HYDRA',11],
  183. 'Twelve-headed hydra': [0,6,3,12,12,12,'TWELVE-HEADED HYDRA',12],
  184. 'Seven-headed pyro hydra': [0,4,3,7,7,7,'SEVEN-HEADED PYRO HYDRA',7],
  185. 'Eight-headed pyro hydra': [0,4,3,8,8,8,'EIGHT-HEADED PYRO HYDRA',8],
  186. 'Nine-headed pyro hydra': [0,4,3,9,9,9,'NINE-HEADED PYRO HYDRA',9],
  187. 'Intellect devourer': [0,4,3,4,6,6,'INTELLECT DEVOURER',6],
  188. 'Invisible stalker': [0,4,4,4,6,6,'INVISIBLE STALKER',6],
  189. 'Lamia': [0,4,4,1,9,9,'LAMIA',9],
  190. 'Fire lizard': [0,5,4,3,10,10,'FIRE LIZARD',10],
  191. 'Lurker above': [0,5,2,1,10,10,'LURKER ABOVE',10],
  192. 'Mezzodaemon': [0,7,6,1,10,10,'MEZZODAEMON',10],
  193. 'Mimic': [0,5,2,1,9,9,'MIMIC',9],
  194. 'Mind flayer': [0,4,3,4,8,8,'MIND FLAYER',8],
  195. 'Mummy': [0,4,4,1,6,6,'MUMMY',6],
  196. 'Spirit naga': [0,5,3,1,10,10,'SPIRIT NAGA',10],
  197. 'Neo-otyugh': [0,5,5,3,11,11,'NEO-OTYUGH',11],
  198. 'Night hag': [0,4,1,1,8,8,'NIGHT HAG',8],
  199. 'Roper': [0,5,5,1,11,11,'ROPER',11],
  200. 'Shambling mound': [0,5,5,2,10,10,'SHAMBLING MOUND',10],
  201. 'Shedu': [0,5,3,2,9,9,'SHEDU',9],
  202. 'Giant slug': [0,6,1,1,12,12,'GIANT SLUG',12],
  203. 'Spectre': [0,4,4,1,7,7,'SPECTRE',7],
  204. 'Trapper': [0,6,4,1,12,12,'TRAPPER',12],
  205. 'Umber hulk': [0,4,4,3,8,8,'UMBER HULK',8],
  206. 'Will-o-wisp': [0,4,9,1,9,9,'WILL-O-WISP',9],
  207. 'Xorn': [0,4,6,4,7,7,'XORN',7],
  208. 'Aerial servant': [0,7,4,1,16,16,'AERIAL SERVANT',16],
  209. 'Nalfeshnee': [0,6,6,3,11,11,'NALFESHNEE DEMON',11],
  210. 'Marilith': [0,4,8,7,7,7,'MARILITH',7],
  211. 'Balor': [0,4,6,1,8,8,'BALOR',8],
  212. 'Ice devil': [0,5,7,4,11,11,'ICE DEVIL',11],
  213. 'Ghost': [0,5,5,1,10,10,'GHOST',10],
  214. 'Cloud giant': [0,6,4,1,12,12,'CLOUD GIANT',12],
  215. 'Clay golem': [0,5,2,1,10,10,'CLAY GOLEM',10],
  216. 'Thirteen-headed hydra': [0,6,3,13,13,13,'THIRTEEN-HEADED HYDRA',13],
  217. 'Fourteen-headed hydra': [0,6,3,14,14,14,'FOURTEEN-HEADED HYDRA',14],
  218. 'Fifteen-headed hydra': [0,6,3,15,15,15,'FIFTEEN-HEADED HYDRA',15],
  219. 'Sixteen-headed hydra': [0,7,3,16,16,16,'SIXTEEN-HEADED HYDRA',16],
  220. 'Twelve-headed pyro hydra': [0,6,3,12,12,12,'TWELVE-HEADED PYRO HYDRA',12],
  221. 'Guardian naga': [0,5,4,2,12,12,'GUARDIAN NAGA',12],
  222. 'Purple worm': [0,6,2,2,15,15,'PURPLE WORM',15],
  223. 'Vampire': [0,4,5,1,8,8,'VAMPIRE',8],
  224. 'Pit fiend': [0,6,7,2,13,13,'PIT FIEND',13],
  225. 'Storm giant': [0,6,5,1,15,15,'STORM GIANT',15],
  226. 'Stone golem': [0,6,3,1,12,12,'STONE GOLEM',12],
  227. 'Seventeen-headed hydra': [0,7,3,17,17,17,'SEVENTEEN-HEADED HYDRA',17],
  228. 'Eighteen-headed hydra': [0,7,3,18,18,18,'EIGHTEEN-HEADED HYDRA',18],
  229. 'Nineteen-headed hydra': [0,7,3,19,19,19,'NINETEEN-HEADED HYDRA',19],
  230. 'Twenty-headed hydra': [0,8,3,20,20,20,'TWENTY-HEADED HYDRA',20],
  231. 'Nycadaemon': [0,8,7,1,14,14,'NYCADAEMON',14],
  232. 'Lesser titan': [0,7,4,1,18,18,'LESSER TITAN',18],
  233. 'Major titan': [0,7,5,1,20,20,'MAJOR TITAN',20],
  234. 'Beholder': [0,6,4,1,12,12,'BEHOLDER',12],
  235. 'Demogorgon, demon prince': [0,7,9,3,40,40,'DEMOGORGON, DEMON PRINCE',40],
  236. 'Juiblex, demon prince': [0,7,9,1,18,18,'JUIBLEX, DEMON PRINCE',18],
  237. 'Orcus, demon prince': [0,8,2,2,24,24,'ORCUS, DEMON PRINCE',24],
  238. 'Yeenoghu, demon prince': [0,7,8,1,20,20,'YEENOGHU, DEMON PRINCE',20],
  239. 'Asmodeus the archdevil': [0,7,9,1,40,40,'ASMODEUS THE ARCHDEVIL',40],
  240. 'Baalzebul the archdevil': [0,7,8,1,33,33,'BAALZEBUL THE ARCHDEVIL',33],
  241. 'Dispater the archdevil': [0,7,6,1,29,29,'DISPATER THE ARCHDEVIL',29],
  242. 'Geryon the archdevil': [0,7,7,3,27,27,'GERYON THE ARCHDEVIL',27],
  243. 'Iron golem': [0,7,4,1,16,16,'IRON GOLEM',16],
  244. 'Lich': [0,5,5,1,11,11,'LICH',11],
  245. 'Elder titan': [0,7,6,1,22,22,'ELDER TITAN',22]
  246. }
  247.  
  248. charadict = {
  249. 'Dwarf1': [5,4,6,2,2,2,'DWARF',1,'---',0,10],
  250. 'Dwarf2': [5,4,6,2,2,2,'DWARF',1,'---',0,10],
  251. 'Dwarf3': [5,4,6,2,2,2,'DWARF',1,'---',0,10],
  252. 'Dwarf4': [5,4,6,2,2,2,'DWARF',1,'---',0,10],
  253. 'Elf1': [6,4,4,2,2,2,'ELF',1,'---',0,10],
  254. 'Elf2': [6,4,4,2,2,2,'ELF',1,'---',0,10],
  255. 'Elf3': [6,4,4,2,2,2,'ELF',1,'---',0,10],
  256. 'Elf4': [6,4,4,2,2,2,'ELF',1,'---',0,10],
  257. 'Human1': [4,4,4,2,2,2,'HUMAN',1,'---',0,10],
  258. 'Human2': [4,4,4,2,2,2,'HUMAN',1,'---',0,10],
  259. 'Human3': [4,4,4,2,2,2,'HUMAN',1,'---',0,10],
  260. 'Human4': [4,4,4,2,2,2,'HUMAN',1,'---',0,10],
  261. 'Halfling1': [3,2,3,1,1,1,'HALFLING',1,'---',0,10],
  262. 'Halfling2': [3,2,3,1,1,1,'HALFLING',1,'---',0,10],
  263. 'Halfling3': [3,2,3,1,1,1,'HALFLING',1,'---',0,10],
  264. 'Halfling4': [3,2,3,1,1,1,'HALFLING',1,'---',0,10]
  265. }
  266.  
  267. remap = {
  268. 'Dwarf1': 'Name1',
  269. 'Dwarf2': 'Name2',
  270. 'Dwarf3': 'Name3',
  271. 'Dwarf4': 'Name4',
  272. 'Elf1': 'Name1',
  273. 'Elf2': 'Name2',
  274. 'Elf3': 'Name3',
  275. 'Elf3': 'Name4',
  276. 'Human1': 'Name1',
  277. 'Human2': 'Name2',
  278. 'Human3': 'Name3',
  279. 'Human4': 'Name4',
  280. 'Halfling1': 'Name1',
  281. 'Halfling2': 'Name2',
  282. 'Halfling3': 'Name3',
  283. 'Halfling4': 'Name4'
  284. }
  285.  
  286. # 0: Description, 1: Modifier, 2: Name, 3: Stat modified, 4: Item class
  287. # A: Healing, B: Equipment, C: Treasure
  288.  
  289. itemsdict = {
  290. 'Potion': ['Restores 1 HP.',1,'POTION',4,'A'],
  291. 'Full potion': ['Restores all HP.',100,'FULL POTION',4,'A'],
  292. 'Elixir-f': ['Permanently increases a character\'s FGT by 1.',1,'ELIXIR-F',0,'A'],
  293. 'Elixir-s': ['Permanently increases a character\'s STR by 1.',1,'ELIXIR-S',1,'A'],
  294. 'Elixir-d': ['Permanently increases a character\'s DEF by 1.',1,'ELIXIR-D',2,'A'],
  295. 'Elixir-h': ['Permanently increases a character\'s HIT by 1.',1,'ELIXIR-H',3,'A'],
  296. 'Health up': ['Permanently increases a character\'s max HP by 1.',1,'HEALTH UP',5,'A'],
  297. 'Short sword': ['Grants +1 STR while equipped.',1,'SHORT SWORD',1,'B'],
  298. 'Greatsword': ['Grants +2 STR while equipped.',2,'GREATSWORD',1,'B'],
  299. 'Sword3': ['Boosts a character\'s STR by 3 while equipped.',3,'SWORD3',1,'B']
  300. }
  301.  
  302. # 0: Wall, 1: Walkable, 2: Stairs up, 3: Door, 4: Stairs down
  303. dungeon_floor_0 = [
  304. [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
  305. [0,0,0,0,0,1,1,2,0,1,1,1,1,1,0,0,0,0,0,0,0,4,0],
  306. [0,0,0,0,0,1,0,0,0,3,0,0,0,1,0,0,0,0,0,0,0,1,0],
  307. [0,1,0,0,0,1,3,1,1,1,1,0,0,1,3,1,0,0,0,0,0,1,0],
  308. [0,3,0,0,0,0,0,3,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0],
  309. [0,1,1,1,1,1,0,1,0,0,0,0,0,1,0,1,1,1,1,1,3,1,0],
  310. [0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,1,0],
  311. [0,0,0,1,3,1,0,0,0,0,0,1,3,1,0,1,0,0,0,0,0,1,0],
  312. [0,1,3,1,0,0,0,0,0,1,3,1,0,0,0,1,0,0,0,0,0,1,0],
  313. [0,0,0,1,0,0,0,0,0,0,0,1,3,1,1,1,0,0,0,1,0,1,0],
  314. [0,0,0,3,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,3,0,1,0],
  315. [0,0,0,1,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,1,1,0],
  316. [0,0,0,0,0,3,0,0,0,0,0,1,3,1,0,0,0,0,0,1,0,1,0],
  317. [0,0,0,0,0,1,0,1,3,1,3,1,0,0,0,0,0,1,1,1,0,1,0],
  318. [0,0,0,1,3,1,0,0,0,1,0,3,0,0,0,0,0,1,0,0,0,1,0],
  319. [0,0,0,0,0,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,0],
  320. [0,0,0,0,0,3,0,3,0,0,0,0,0,1,0,1,0,0,0,0,0,1,0],
  321. [0,0,0,0,0,1,0,1,0,0,0,1,3,1,0,1,1,1,1,1,0,1,0],
  322. [0,0,0,0,0,1,0,1,0,0,0,0,0,3,0,0,0,0,0,1,0,1,0],
  323. [0,0,0,0,0,1,1,1,0,0,0,0,0,1,0,0,0,1,1,1,0,1,0],
  324. [0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,1,0,1,0,0,0,1,0],
  325. [0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,1,1,1,0],
  326. [0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,1,0,1,0,1,0],
  327. [0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,1,1,0,1,0],
  328. [0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,1,0,1,0,0,0,1,0],
  329. [0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,1,1,1,0],
  330. [0,0,0,0,0,0,0,0,0,0,0,1,0,3,0,0,0,0,0,1,0,1,0],
  331. [0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,1,0],
  332. [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
  333. ]
  334.  
  335. current_position = [2,21]
  336. face = ['North','East','South','West']
  337. current_face = 'North'
  338. current_map = dungeon_floor_0
  339. current_floor = 0
  340. step = 0
  341.  
  342. def monster_level1():
  343. global party_enemy
  344. for i in range(randint(1,3)):
  345. donjon = randint(1,100)
  346. if donjon <= 2:
  347. party_enemy.append('Giant ant')
  348. elif donjon <= 4:
  349. party_enemy.append('Badger')
  350. elif donjon <= 14:
  351. party_enemy.append('Fire beetle')
  352. elif donjon == 15:
  353. party_enemy.append('Manes demon')
  354. elif donjon <= 17:
  355. party_enemy.append('Dwarf')
  356. elif donjon == 18:
  357. party_enemy.append('Ear seeker')
  358. elif donjon == 19:
  359. party_enemy.append('Elf')
  360. elif donjon <= 21:
  361. party_enemy.append('Gnome')
  362. elif donjon <= 26:
  363. party_enemy.append('Goblin')
  364. elif donjon <= 28:
  365. party_enemy.append('Halfling')
  366. elif donjon <= 33:
  367. party_enemy.append('Hobgoblin')
  368. elif donjon <= 48:
  369. donjon1 = randint(1,45)
  370. if donjon1 <= 25:
  371. party_enemy.append('Human bandit')
  372. elif donjon1 <= 30:
  373. party_enemy.append('Human berserker')
  374. else:
  375. party_enemy.append('Human brigand')
  376. elif donjon <= 54:
  377. party_enemy.append('Kobold')
  378. elif donjon <= 66:
  379. party_enemy.append('Orc')
  380. elif donjon <= 70:
  381. party_enemy.append('Piercer')
  382. elif donjon <= 83:
  383. party_enemy.append('Giant rat')
  384. elif donjon <= 85:
  385. party_enemy.append('Rot grub')
  386. elif donjon <= 96:
  387. party_enemy.append('Shrieker')
  388. elif donjon <= 98:
  389. party_enemy.append('Skeleton')
  390. else:
  391. party_enemy.append('Zombie')
  392.  
  393. def monster_level2():
  394. global party_enemy
  395. for i in range(randint(1,3)):
  396. donjon = randint(1,100)
  397. if donjon == 1:
  398. party_enemy.append('Giant badger')
  399. elif donjon <= 16:
  400. party_enemy.append('Giant centipede')
  401. elif donjon <= 27:
  402. donjon1 = randint(1,45)
  403. if donjon1 <= 25:
  404. party_enemy.append('Human bandit')
  405. elif donjon1 <= 30:
  406. party_enemy.append('Human berserker')
  407. else:
  408. party_enemy.append('Human brigand')
  409. elif donjon == 29:
  410. party_enemy.append('Lemure devil')
  411. elif donjon <= 31:
  412. party_enemy.append('Gas spore')
  413. elif donjon <= 38:
  414. party_enemy.append('Gnoll')
  415. elif donjon <= 46:
  416. party_enemy.append('Piercer')
  417. elif donjon <= 58:
  418. party_enemy.append('Giant rat')
  419. elif donjon <= 60:
  420. party_enemy.append('Rot grub')
  421. elif donjon <= 72:
  422. party_enemy.append('Shrieker')
  423. elif donjon <= 77:
  424. party_enemy.append('Stirge')
  425. elif donjon <= 87:
  426. party_enemy.append('Giant toad')
  427. else:
  428. party_enemy.append('Troglodyte')
  429.  
  430. def monster_level3():
  431. global party_enemy
  432. for i in range(randint(1,2)):
  433. donjon = randint(1,100)
  434. if donjon <= 15:
  435. party_enemy.append('Boring beetle')
  436. elif donjon <= 30:
  437. party_enemy.append('Bugbear')
  438. elif donjon == 32:
  439. if len(party_enemy) >= 1: return
  440. else:
  441. party_enemy.append('Very young dragon')
  442. return
  443. elif donjon <= 34:
  444. party_enemy.append('Violet fungus')
  445. elif donjon <= 40:
  446. party_enemy.append('Gelatinous cube')
  447. elif donjon <= 45:
  448. party_enemy.append('Ghoul')
  449. elif donjon <= 50:
  450. party_enemy.append('Giant lizard')
  451. elif donjon <= 72:
  452. party_enemy.append('Ogre')
  453. elif donjon <= 74:
  454. party_enemy.append('Piercer')
  455. elif donjon == 75:
  456. party_enemy.append('Rot grub')
  457. elif donjon <= 77:
  458. party_enemy.append('Shrieker')
  459. elif donjon <= 84:
  460. party_enemy.append('Huge spider')
  461. elif donjon <= 93:
  462. party_enemy.append('Large spider')
  463. elif donjon <= 95:
  464. party_enemy.append('Giant tick')
  465. else:
  466. party_enemy.append('Giant weasel')
  467.  
  468. def monster_level4():
  469. global party_enemy
  470. for i in range(randint(1,2)):
  471. donjon = randint(1,100)
  472. if donjon <= 16:
  473. party_enemy.append('Carnivorous ape')
  474. elif donjon <= 22:
  475. party_enemy.append('Blink dog')
  476. elif donjon == 24:
  477. if len(party_enemy) >= 1: return
  478. else:
  479. party_enemy.append('Young dragon')
  480. return
  481. elif donjon <= 30:
  482. party_enemy.append('Gargoyle')
  483. elif donjon <= 36:
  484. party_enemy.append('Ghast')
  485. elif donjon <= 40:
  486. party_enemy.append('Gray ooze')
  487. elif donjon <= 44:
  488. party_enemy.append('Hell hound')
  489. elif donjon <= 46:
  490. if len(party_enemy) >= 1: return
  491. else:
  492. party_enemy.append('Five-headed hydra')
  493. return
  494. elif donjon == 47:
  495. if len(party_enemy) >= 1: return
  496. else:
  497. party_enemy.append('Six-headed hydra')
  498. return
  499. elif donjon == 48:
  500. if len(party_enemy) >= 1: return
  501. else:
  502. party_enemy.append('Five-headed pyro hydra')
  503. return
  504. elif donjon <= 62:
  505. party_enemy.append('Werewolf')
  506. elif donjon <= 75:
  507. party_enemy.append('Yellow mold')
  508. elif donjon <= 78:
  509. party_enemy.append('Owlbear')
  510. elif donjon == 79:
  511. party_enemy.append('Rust monster')
  512. elif donjon == 82:
  513. party_enemy.append('Shadow')
  514. elif donjon == 90:
  515. party_enemy.append('Giant constrictor')
  516. elif donjon == 94:
  517. party_enemy.append('Su-monster')
  518. elif donjon == 96:
  519. party_enemy.append('Ice toad')
  520. else:
  521. party_enemy.append('Poisonous toad')
  522.  
  523. def monster_level5():
  524. global party_enemy
  525. for i in range(randint(1,2)):
  526. donjon = randint(1,100)
  527. if donjon <= 12:
  528. party_enemy.append('Cockatrice')
  529. elif donjon <= 18:
  530. party_enemy.append('Displacer beast')
  531. elif donjon == 22:
  532. party_enemy.append('Doppelganger')
  533. elif donjon <= 24:
  534. if len(party_enemy) >= 1: return
  535. else:
  536. party_enemy.append('Young adult dragon')
  537. return
  538. elif donjon <= 26:
  539. if len(party_enemy) >= 1: return
  540. else:
  541. party_enemy.append('Seven-headed hydra')
  542. return
  543. elif donjon == 27:
  544. if len(party_enemy) >= 1: return
  545. else:
  546. party_enemy.append('Six-headed pyro hydra')
  547. return
  548. elif donjon == 28:
  549. party_enemy.append('Imp')
  550. elif donjon <= 31:
  551. party_enemy.append('Leucrotta')
  552. elif donjon == 50:
  553. party_enemy.append('Subterranean lizard')
  554. elif donjon == 52:
  555. party_enemy.append('Wereboar')
  556. elif donjon <= 60:
  557. party_enemy.append('Minotaur')
  558. elif donjon <= 64:
  559. party_enemy.append('Yellow mold')
  560. elif donjon == 65:
  561. party_enemy.append('Quasit')
  562. elif donjon == 67:
  563. party_enemy.append('Rust monster')
  564. elif donjon == 70:
  565. party_enemy.append('Shrieker')
  566. elif donjon == 72:
  567. party_enemy.append('Slithering tracker')
  568. elif donjon == 74:
  569. party_enemy.append('Giant amphisbaena')
  570. elif donjon == 82:
  571. party_enemy.append('Giant poisonous snake')
  572. elif donjon == 86:
  573. party_enemy.append('Giant spitting snake')
  574. else:
  575. party_enemy.append('Giant spider')
  576.  
  577. def monster_level6():
  578. global party_enemy
  579. for i in range(randint(1,2)):
  580. donjon = randint(1,100)
  581. if donjon <= 3:
  582. party_enemy.append('Basilisk')
  583. elif donjon <= 10:
  584. party_enemy.append('Carrion crawler')
  585. elif donjon <= 17:
  586. party_enemy.append('Erinyes devil')
  587. elif donjon <= 19:
  588. party_enemy.append('Djinni')
  589. elif donjon == 21:
  590. if len(party_enemy) >= 1: return
  591. else:
  592. party_enemy.append('Old dragon')
  593. return
  594. elif donjon <= 25:
  595. party_enemy.append('Green slime')
  596. elif donjon <= 27:
  597. if len(party_enemy) >= 1: return
  598. else:
  599. party_enemy.append('Eight-headed hydra')
  600. return
  601. elif donjon == 28:
  602. if len(party_enemy) >= 1: return
  603. else:
  604. party_enemy.append('Nine-headed hydra')
  605. return
  606. elif donjon <= 32:
  607. party_enemy.append('Jackalwere')
  608. elif donjon <= 36:
  609. party_enemy.append('Lammasu')
  610. elif donjon <= 38:
  611. party_enemy.append('Werebear')
  612. elif donjon == 41:
  613. party_enemy.append('Weretiger')
  614. elif donjon <= 50:
  615. party_enemy.append('Manticore')
  616. elif donjon <= 55:
  617. party_enemy.append('Medusa')
  618. elif donjon == 56:
  619. party_enemy.append('Brown mold')
  620. elif donjon <= 58:
  621. party_enemy.append('Yellow mold')
  622. elif donjon <= 60:
  623. party_enemy.append('Ogre mage')
  624. elif donjon <= 68:
  625. party_enemy.append('Otyugh')
  626. elif donjon <= 70:
  627. party_enemy.append('Rakshasa')
  628. elif donjon <= 73:
  629. party_enemy.append('Salamander')
  630. elif donjon <= 77:
  631. party_enemy.append('Phase spider')
  632. elif donjon <= 88:
  633. party_enemy.append('Troll')
  634. elif donjon <= 93:
  635. party_enemy.append('Wight')
  636. elif donjon <= 95:
  637. party_enemy.append('Wind walker')
  638. elif donjon <= 98:
  639. party_enemy.append('Wraith')
  640. else:
  641. party_enemy.append('Wyvern')
  642.  
  643. def monster_level7():
  644. global party_enemy
  645. for i in range(randint(1,2)):
  646. donjon = randint(1,100)
  647. if donjon <= 7:
  648. party_enemy.append('Black pudding')
  649. elif donjon <= 14:
  650. party_enemy.append('Chimera')
  651. elif donjon <= 16:
  652. party_enemy.append('Succubus')
  653. elif donjon == 17:
  654. if len(party_enemy) >= 1: return
  655. else:
  656. party_enemy.append('Vrock')
  657. return
  658. elif donjon == 18:
  659. if len(party_enemy) >= 1: return
  660. else:
  661. party_enemy.append('Hezrou')
  662. return
  663. elif donjon == 19:
  664. if len(party_enemy) >= 1: return
  665. else:
  666. party_enemy.append('Glabrezu')
  667. return
  668. elif donjon == 20:
  669. if len(party_enemy) >= 1: return
  670. else:
  671. party_enemy.append('Barbed devil')
  672. return
  673. elif donjon == 21:
  674. if len(party_enemy) >= 1: return
  675. else:
  676. party_enemy.append('Bone devil')
  677. return
  678. elif donjon == 22:
  679. if len(party_enemy) >= 1: return
  680. else:
  681. party_enemy.append('Horned devil')
  682. return
  683. elif donjon <= 24:
  684. if len(party_enemy) >= 1: return
  685. else:
  686. party_enemy.append('Very old dragon')
  687. return
  688. elif donjon == 25:
  689. party_enemy.append('Efreeti')
  690. elif donjon <= 27:
  691. donjon1 = randint(1,4)
  692. if donjon1 == 1:
  693. party_enemy.append('Air elemental')
  694. elif donjon1 == 2:
  695. party_enemy.append('Fire elemental')
  696. elif donjon1 == 3:
  697. party_enemy.append('Earth elemental')
  698. else:
  699. party_enemy.append('Water elemental')
  700. elif donjon <= 30:
  701. party_enemy.append('Ettin')
  702. elif donjon <= 35:
  703. donjon1 = randint(1,2)
  704. if donjon1 == 1:
  705. party_enemy.append('Hill giant')
  706. else:
  707. party_enemy.append('Stone giant')
  708. elif donjon <= 38:
  709. donjon1 = randint(1,2)
  710. if donjon1 == 1:
  711. party_enemy.append('Frost giant')
  712. else:
  713. party_enemy.append('Fire giant')
  714. elif donjon == 39:
  715. party_enemy.append('Flesh golem')
  716. elif donjon <= 41:
  717. party_enemy.append('Gorgon')
  718. elif donjon <= 43:
  719. party_enemy.append('Groaning spirit')
  720. elif donjon == 44:
  721. if len(party_enemy) >= 1: return
  722. else:
  723. party_enemy.append('Ten-headed hydra')
  724. return
  725. elif donjon == 45:
  726. if len(party_enemy) >= 1: return
  727. else:
  728. party_enemy.append('Eleven-headed hydra')
  729. return
  730. elif donjon == 46:
  731. if len(party_enemy) >= 1: return
  732. else:
  733. party_enemy.append('Twelve-headed hydra')
  734. return
  735. elif donjon == 47:
  736. if len(party_enemy) >= 1: return
  737. else:
  738. donjon1 = randint(1,3)
  739. if donjon1 == 1:
  740. party_enemy.append('Seven-headed pyro hydra')
  741. elif donjon1 == 2:
  742. party_enemy.append('Eight-headed pyro hydra')
  743. else:
  744. party_enemy.append('Nine-headed pyro hydra')
  745. return
  746. elif donjon <= 49:
  747. party_enemy.append('Intellect devourer')
  748. elif donjon <= 50:
  749. party_enemy.append('Invisible stalker')
  750. elif donjon <= 52:
  751. party_enemy.append('Lamia')
  752. elif donjon <= 56:
  753. party_enemy.append('Fire lizard')
  754. elif donjon <= 59:
  755. party_enemy.append('Lurker above')
  756. elif donjon <= 60:
  757. party_enemy.append('Mezzodaemon')
  758. elif donjon <= 63:
  759. party_enemy.append('Mimic')
  760. elif donjon <= 65:
  761. party_enemy.append('Mind flayer')
  762. elif donjon <= 69:
  763. party_enemy.append('Mummy')
  764. elif donjon == 70:
  765. party_enemy.append('Spirit naga')
  766. elif donjon <= 73:
  767. party_enemy.append('Neo-otyugh')
  768. elif donjon == 74:
  769. party_enemy.append('Night hag')
  770. elif donjon <= 78:
  771. party_enemy.append('Roper')
  772. elif donjon <= 82:
  773. party_enemy.append('Shambling mound')
  774. elif donjon <= 86:
  775. party_enemy.append('Shedu')
  776. elif donjon == 87:
  777. party_enemy.append('Giant slug')
  778. elif donjon <= 91:
  779. party_enemy.append('Spectre')
  780. elif donjon <= 93:
  781. party_enemy.append('Trapper')
  782. elif donjon <= 95:
  783. party_enemy.append('Umber hulk')
  784. elif donjon <= 97:
  785. party_enemy.append('Will-o-wisp')
  786. else:
  787. party_enemy.append('Xorn')
  788.  
  789. def monster_level8():
  790. global party_enemy
  791. for i in range(randint(1,2)):
  792. donjon = randint(1,100)
  793. if donjon <= 4:
  794. party_enemy.append('Aerial servant')
  795. elif donjon == 5:
  796. if len(party_enemy) >= 1: return
  797. else:
  798. party_enemy.append('Nalfeshnee')
  799. return
  800. elif donjon == 6:
  801. if len(party_enemy) >= 1: return
  802. else:
  803. party_enemy.append('Marilith')
  804. return
  805. elif donjon == 7:
  806. if len(party_enemy) >= 1: return
  807. else:
  808. party_enemy.append('Balor')
  809. return
  810. elif donjon == 8:
  811. if len(party_enemy) >= 1: return
  812. else:
  813. party_enemy.append('Ice devil')
  814. return
  815. elif donjon <= 10:
  816. if len(party_enemy) >= 1: return
  817. else:
  818. party_enemy.append('Ancient dragon')
  819. return
  820. elif donjon <= 15:
  821. party_enemy.append('Ghost')
  822. elif donjon <= 21:
  823. party_enemy.append('Cloud giant')
  824. elif donjon <= 23:
  825. party_enemy.append('Clay golem')
  826. elif donjon <= 26:
  827. if len(party_enemy) >= 1: return
  828. else:
  829. donjon1 = randint(1,4)
  830. if donjon1 == 1:
  831. party_enemy.append('Thirteen-headed hydra')
  832. elif donjon1 == 2:
  833. party_enemy.append('Fourteen-headed hydra')
  834. elif donjon1 == 3:
  835. party_enemy.append('Fifteen-headed hydra')
  836. else:
  837. party_enemy.append('Sixteen-headed hydra')
  838. return
  839. elif donjon == 27:
  840. if len(party_enemy) >= 1: return
  841. else:
  842. party_enemy.append('Twelve-headed pyro hydra')
  843. return
  844. elif donjon <= 29:
  845. party_enemy.append('Intellect devourer')
  846. elif donjon <= 35:
  847. party_enemy.append('Lurker above')
  848. elif donjon <= 41:
  849. party_enemy.append('Brown mold')
  850. elif donjon <= 43:
  851. party_enemy.append('Yellow mold')
  852. elif donjon <= 47:
  853. party_enemy.append('Mind flayer')
  854. elif donjon <= 50:
  855. party_enemy.append('Guardian naga')
  856. elif donjon <= 56:
  857. party_enemy.append('Neo-otyugh')
  858. elif donjon <= 64:
  859. if len(party_enemy) >= 1: return
  860. else:
  861. party_enemy.append('Purple worm')
  862. return
  863. elif donjon <= 69:
  864. party_enemy.append('Rust monster')
  865. elif donjon <= 73:
  866. party_enemy.append('Giant slug')
  867. elif donjon <= 78:
  868. party_enemy.append('Trapper')
  869. elif donjon <= 86:
  870. party_enemy.append('Vampire')
  871. elif donjon <= 92:
  872. party_enemy.append('Will-o-wisp')
  873. else:
  874. party_enemy.append('Xorn')
  875.  
  876. def monster_level9():
  877. global party_enemy
  878. donjon = randint(1,100)
  879. if donjon <= 4:
  880. party_enemy.append('Pit fiend')
  881. elif donjon <= 8:
  882. party_enemy.append('Ancient dragon')
  883. party_enemy.append('Old dragon')
  884. elif donjon <= 15:
  885. party_enemy.append('Storm giant')
  886. elif donjon <= 18:
  887. party_enemy.append('Stone golem')
  888. elif donjon <= 26:
  889. donjon1 = randint(1,4)
  890. if donjon1 == 1:
  891. party_enemy.append('Seventeen-headed hydra')
  892. elif donjon1 == 2:
  893. party_enemy.append('Eighteen-headed hydra')
  894. elif donjon1 == 3:
  895. party_enemy.append('Nineteen-headed hydra')
  896. else:
  897. party_enemy.append('Twenty-headed hydra')
  898. elif donjon <= 30:
  899. party_enemy.append('Twelve-headed pyro hydra')
  900. elif donjon <= 38:
  901. party_enemy.append('Brown mold')
  902. elif donjon <= 49:
  903. party_enemy.append('Yellow mold')
  904. elif donjon <= 52:
  905. party_enemy.append('Nycadaemon')
  906. elif donjon <= 64:
  907. party_enemy.append('Purple worm')
  908. elif donjon <= 67:
  909. party_enemy.append('Rust monster')
  910. elif donjon <= 69:
  911. party_enemy.append('Lesser titan')
  912. elif donjon <= 73:
  913. party_enemy.append('Major titan')
  914. elif donjon <= 80:
  915. party_enemy.append('Umber hulk')
  916. elif donjon <= 83:
  917. party_enemy.append('Vampire')
  918. elif donjon <= 93:
  919. donjon = randint(1,3)
  920. for i in range(donjon):
  921. party_enemy.append('Will-o-wisp')
  922. else:
  923. donjon = randint(1,3)
  924. for i in range(donjon):
  925. party_enemy.append('Xorn')
  926.  
  927. def monster_level10():
  928. global party_enemy
  929. donjon = randint(1,80)
  930. if donjon <= 13:
  931. party_enemy.append('Beholder')
  932. elif donjon <= 22:
  933. donjon1 = randint(1,4)
  934. if donjon1 == 1:
  935. party_enemy.append('Demogorgon, demon prince')
  936. elif donjon1 == 2:
  937. party_enemy.append('Juiblex, demon prince')
  938. elif donjon1 == 3:
  939. party_enemy.append('Orcus, demon prince')
  940. else:
  941. party_enemy.append('Yeenoghu, demon prince')
  942. elif donjon <= 25:
  943. donjon1 = randint(1,4)
  944. if donjon1 == 1:
  945. party_enemy.append('Asmodeus the archdevil')
  946. elif donjon1 == 2:
  947. party_enemy.append('Baalzebul the archdevil')
  948. elif donjon1 == 3:
  949. party_enemy.append('Dispater the archdevil')
  950. else:
  951. party_enemy.append('Geryon the archdevil')
  952. elif donjon <= 36:
  953. party_enemy.append('Ancient dragon')
  954. party_enemy.append('Very old dragon')
  955. elif donjon <= 47:
  956. party_enemy.append('Iron golem')
  957. elif donjon <= 58:
  958. party_enemy.append('Lich')
  959. elif donjon <= 69:
  960. party_enemy.append('Elder titan')
  961. else:
  962. party_enemy.append('Vampire')
  963.  
  964.  
  965. def dungeon_main():
  966. global party_enemy
  967. global battle_loop
  968. global current_position
  969. global current_face
  970. global current_floor
  971. global current_map
  972. global step
  973. while current_floor == 0:
  974. current_map = dungeon_floor_0
  975. walking()
  976. if step > 0:
  977. donjon = randint(1,20)
  978. if donjon <= 7:
  979. donjon = randint(1,20)
  980. if donjon <= 16:
  981. monster_level1()
  982. elif donjon <= 19:
  983. monster_level2()
  984. else:
  985. monster_level3()
  986. battle_loop = 'true'
  987. combat_display()
  988. party_enemy = []
  989. step = 0
  990.  
  991. while current_floor == -1:
  992. current_map = dungeon_floor_B1
  993. walking()
  994. if step > 0:
  995. donjon = randint(1,20)
  996. if donjon <= 7:
  997. donjon = randint(1,20)
  998. if donjon <= 12:
  999. monster_level1()
  1000. elif donjon <= 16:
  1001. monster_level2()
  1002. elif donjon <= 18:
  1003. monster_level3()
  1004. elif donjon == 19:
  1005. monster_level4()
  1006. else:
  1007. monster_level5()
  1008. battle_loop = 'true'
  1009. combat_display()
  1010. party_enemy = []
  1011. step = 0
  1012.  
  1013. while current_floor == -2:
  1014. current_map = dungeon_floor_B2
  1015. walking()
  1016. if step > 0:
  1017. donjon = randint(1,20)
  1018. if donjon <= 7:
  1019. donjon = randint(1,20)
  1020. if donjon <= 12:
  1021. monster_level1()
  1022. elif donjon <= 16:
  1023. monster_level2()
  1024. elif donjon <= 18:
  1025. monster_level3()
  1026. elif donjon == 19:
  1027. monster_level4()
  1028. else:
  1029. monster_level5()
  1030. battle_loop = 'true'
  1031. combat_display()
  1032. party_enemy = []
  1033. step = 0
  1034.  
  1035. while current_floor == -3:
  1036. current_map = dungeon_floor_B3
  1037. walking()
  1038. if step > 0:
  1039. donjon = randint(1,20)
  1040. if donjon <= 7:
  1041. donjon = randint(1,20)
  1042. if donjon <= 5:
  1043. monster_level1()
  1044. elif donjon <= 10:
  1045. monster_level2()
  1046. elif donjon <= 16:
  1047. monster_level3()
  1048. elif donjon <= 18:
  1049. monster_level4()
  1050. elif donjon == 19:
  1051. monster_level5()
  1052. else:
  1053. monster_level6()
  1054. battle_loop = 'true'
  1055. combat_display()
  1056. party_enemy = []
  1057. step = 0
  1058.  
  1059. while current_floor == -4:
  1060. current_map = dungeon_floor_B4
  1061. walking()
  1062. if step > 0:
  1063. donjon = randint(1,20)
  1064. if donjon <= 7:
  1065. donjon = randint(1,20)
  1066. if donjon <= 3:
  1067. monster_level1()
  1068. elif donjon <= 6:
  1069. monster_level2()
  1070. elif donjon <= 12:
  1071. monster_level3()
  1072. elif donjon <= 16:
  1073. monster_level4()
  1074. elif donjon <= 18:
  1075. monster_level5()
  1076. elif donjon == 19:
  1077. monster_level6()
  1078. else:
  1079. monster_level7()
  1080. battle_loop = 'true'
  1081. combat_display()
  1082. party_enemy = []
  1083. step = 0
  1084.  
  1085. while current_floor == -5:
  1086. current_map = dungeon_floor_B5
  1087. walking()
  1088. if step > 0:
  1089. donjon = randint(1,20)
  1090. if donjon <= 7:
  1091. donjon = randint(1,20)
  1092. if donjon <= 2:
  1093. monster_level1()
  1094. elif donjon <= 4:
  1095. monster_level2()
  1096. elif donjon <= 6:
  1097. monster_level3()
  1098. elif donjon <= 12:
  1099. monster_level4()
  1100. elif donjon <= 16:
  1101. monster_level5()
  1102. elif donjon <= 18:
  1103. monster_level6()
  1104. elif donjon == 19:
  1105. monster_level7()
  1106. else:
  1107. monster_level8()
  1108. battle_loop = 'true'
  1109. combat_display()
  1110. party_enemy = []
  1111. step = 0
  1112.  
  1113. while current_floor == -6:
  1114. current_map = dungeon_floor_B6
  1115. walking()
  1116. if step > 0:
  1117. donjon = randint(1,20)
  1118. if donjon <= 7:
  1119. donjon = randint(1,20)
  1120. if donjon == 1:
  1121. monster_level1()
  1122. elif donjon <= 3:
  1123. monster_level2()
  1124. elif donjon <= 5:
  1125. monster_level3()
  1126. elif donjon <= 10:
  1127. monster_level4()
  1128. elif donjon <= 14:
  1129. monster_level5()
  1130. elif donjon <= 16:
  1131. monster_level6()
  1132. elif donjon <= 18:
  1133. monster_level7()
  1134. elif donjon == 19:
  1135. monster_level8()
  1136. else:
  1137. monster_level9()
  1138. battle_loop = 'true'
  1139. combat_display()
  1140. party_enemy = []
  1141. step = 0
  1142.  
  1143. while current_floor == -7:
  1144. current_map = dungeon_floor_B7
  1145. walking()
  1146. if step > 0:
  1147. donjon = randint(1,20)
  1148. if donjon <= 7:
  1149. donjon = randint(1,20)
  1150. if donjon == 1:
  1151. monster_level1()
  1152. elif donjon == 2:
  1153. monster_level2()
  1154. elif donjon <= 4:
  1155. monster_level3()
  1156. elif donjon <= 7:
  1157. monster_level4()
  1158. elif donjon <= 10:
  1159. monster_level5()
  1160. elif donjon <= 14:
  1161. monster_level6()
  1162. elif donjon <= 16:
  1163. monster_level7()
  1164. elif donjon <= 18:
  1165. monster_level8()
  1166. elif donjon == 19:
  1167. monster_level9()
  1168. else:
  1169. monster_level10()
  1170. battle_loop = 'true'
  1171. combat_display()
  1172. party_enemy = []
  1173. step = 0
  1174.  
  1175. while current_floor == -8:
  1176. current_map = dungeon_floor_B8
  1177. walking()
  1178. if step > 0:
  1179. donjon = randint(1,20)
  1180. if donjon <= 7:
  1181. donjon = randint(1,20)
  1182. if donjon == 1:
  1183. monster_level1()
  1184. elif donjon == 2:
  1185. monster_level2()
  1186. elif donjon == 3:
  1187. monster_level3()
  1188. elif donjon <= 5:
  1189. monster_level4()
  1190. elif donjon <= 8:
  1191. monster_level5()
  1192. elif donjon <= 12:
  1193. monster_level6()
  1194. elif donjon <= 15:
  1195. monster_level7()
  1196. elif donjon <= 17:
  1197. monster_level8()
  1198. elif donjon <= 19:
  1199. monster_level9()
  1200. else:
  1201. monster_level10()
  1202. battle_loop = 'true'
  1203. combat_display()
  1204. party_enemy = []
  1205. step = 0
  1206.  
  1207. while current_floor == -9:
  1208. current_map = dungeon_floor_B9
  1209. walking()
  1210. if step > 0:
  1211. donjon = randint(1,20)
  1212. if donjon <= 7:
  1213. donjon = randint(1,20)
  1214. if donjon == 1:
  1215. monster_level1()
  1216. elif donjon == 2:
  1217. monster_level2()
  1218. elif donjon == 3:
  1219. monster_level3()
  1220. elif donjon == 4:
  1221. monster_level4()
  1222. elif donjon <= 6:
  1223. monster_level5()
  1224. elif donjon <= 9:
  1225. monster_level6()
  1226. elif donjon <= 12:
  1227. monster_level7()
  1228. elif donjon <= 16:
  1229. monster_level8()
  1230. elif donjon <= 19:
  1231. monster_level9()
  1232. else:
  1233. monster_level10()
  1234. battle_loop = 'true'
  1235. combat_display()
  1236. party_enemy = []
  1237. step = 0
  1238.  
  1239. while current_floor == -10:
  1240. current_map = dungeon_floor_B10
  1241. walking()
  1242. if step > 0:
  1243. donjon = randint(1,20)
  1244. if donjon <= 7:
  1245. donjon = randint(1,20)
  1246. if donjon == 1:
  1247. monster_level1()
  1248. elif donjon == 2:
  1249. monster_level2()
  1250. elif donjon == 3:
  1251. monster_level3()
  1252. elif donjon == 4:
  1253. monster_level4()
  1254. elif donjon <= 6:
  1255. monster_level5()
  1256. elif donjon <= 9:
  1257. monster_level6()
  1258. elif donjon <= 12:
  1259. monster_level7()
  1260. elif donjon <= 16:
  1261. monster_level8()
  1262. elif donjon <= 19:
  1263. monster_level9()
  1264. else:
  1265. monster_level10()
  1266. battle_loop = 'true'
  1267. combat_display()
  1268. party_enemy = []
  1269. step = 0
  1270.  
  1271. while current_floor == -11:
  1272. current_map = dungeon_floor_B11
  1273. walking()
  1274. if step > 0:
  1275. donjon = randint(1,20)
  1276. if donjon <= 7:
  1277. donjon = randint(1,20)
  1278. if donjon == 1:
  1279. monster_level1()
  1280. elif donjon == 2:
  1281. monster_level2()
  1282. elif donjon == 3:
  1283. monster_level3()
  1284. elif donjon == 4:
  1285. monster_level4()
  1286. elif donjon == 5:
  1287. monster_level5()
  1288. elif donjon <= 7:
  1289. monster_level6()
  1290. elif donjon <= 9:
  1291. monster_level7()
  1292. elif donjon <= 12:
  1293. monster_level8()
  1294. elif donjon <= 18:
  1295. monster_level9()
  1296. else:
  1297. monster_level10()
  1298. battle_loop = 'true'
  1299. combat_display()
  1300. party_enemy = []
  1301. step = 0
  1302.  
  1303. while current_floor == -12:
  1304. current_map = dungeon_floor_B12
  1305. walking()
  1306. if step > 0:
  1307. donjon = randint(1,20)
  1308. if donjon <= 7:
  1309. donjon = randint(1,20)
  1310. if donjon == 1:
  1311. monster_level1()
  1312. elif donjon == 2:
  1313. monster_level2()
  1314. elif donjon == 3:
  1315. monster_level3()
  1316. elif donjon == 4:
  1317. monster_level4()
  1318. elif donjon == 5:
  1319. monster_level5()
  1320. elif donjon <= 7:
  1321. monster_level6()
  1322. elif donjon <= 9:
  1323. monster_level7()
  1324. elif donjon <= 12:
  1325. monster_level8()
  1326. elif donjon <= 18:
  1327. monster_level9()
  1328. else:
  1329. monster_level10()
  1330. battle_loop = 'true'
  1331. combat_display()
  1332. party_enemy = []
  1333. step = 0
  1334.  
  1335. while current_floor == -13:
  1336. current_map = dungeon_floor_B13
  1337. walking()
  1338. if step > 0:
  1339. donjon = randint(1,20)
  1340. if donjon <= 7:
  1341. donjon = randint(1,20)
  1342. if donjon == 1:
  1343. monster_level1()
  1344. elif donjon == 2:
  1345. monster_level2()
  1346. elif donjon == 3:
  1347. monster_level3()
  1348. elif donjon == 4:
  1349. monster_level4()
  1350. elif donjon == 5:
  1351. monster_level5()
  1352. elif donjon == 6:
  1353. monster_level6()
  1354. elif donjon <= 8:
  1355. monster_level7()
  1356. elif donjon <= 11:
  1357. monster_level8()
  1358. elif donjon <= 17:
  1359. monster_level9()
  1360. else:
  1361. monster_level10()
  1362. battle_loop = 'true'
  1363. combat_display()
  1364. party_enemy = []
  1365. step = 0
  1366.  
  1367. while current_floor == -14:
  1368. current_map = dungeon_floor_B14
  1369. walking()
  1370. if step > 0:
  1371. donjon = randint(1,20)
  1372. if donjon <= 7:
  1373. donjon = randint(1,20)
  1374. if donjon == 1:
  1375. monster_level1()
  1376. elif donjon == 2:
  1377. monster_level2()
  1378. elif donjon == 3:
  1379. monster_level3()
  1380. elif donjon == 4:
  1381. monster_level4()
  1382. elif donjon == 5:
  1383. monster_level5()
  1384. elif donjon == 6:
  1385. monster_level6()
  1386. elif donjon <= 8:
  1387. monster_level7()
  1388. elif donjon <= 11:
  1389. monster_level8()
  1390. elif donjon <= 17:
  1391. monster_level9()
  1392. else:
  1393. monster_level10()
  1394. battle_loop = 'true'
  1395. combat_display()
  1396. party_enemy = []
  1397. step = 0
  1398.  
  1399. while current_floor <= -15:
  1400. if current_floor == -15:
  1401. current_map = dungeon_floor_B15
  1402. elif current_floor == -16:
  1403. current_map = dungeon_floor_B16
  1404. elif current_floor == -17:
  1405. current_map = dungeon_floor_B17
  1406. elif current_floor == -18:
  1407. current_map = dungeon_floor_B18
  1408. elif current_floor == -19:
  1409. current_map = dungeon_floor_B19
  1410. elif current_floor == -20:
  1411. current_map = dungeon_floor_B20
  1412. walking()
  1413. if step > 0:
  1414. donjon = randint(1,20)
  1415. if donjon <= 7:
  1416. donjon = randint(1,20)
  1417. if donjon == 1:
  1418. monster_level1()
  1419. elif donjon == 2:
  1420. monster_level2()
  1421. elif donjon == 3:
  1422. monster_level3()
  1423. elif donjon == 4:
  1424. monster_level4()
  1425. elif donjon == 5:
  1426. monster_level5()
  1427. elif donjon == 6:
  1428. monster_level6()
  1429. elif donjon == 7:
  1430. monster_level7()
  1431. elif donjon <= 10:
  1432. monster_level8()
  1433. elif donjon <= 16:
  1434. monster_level9()
  1435. else:
  1436. monster_level10()
  1437. battle_loop = 'true'
  1438. combat_display()
  1439. party_enemy = []
  1440. step = 0
  1441.  
  1442. def walking():
  1443. global current_position
  1444. global current_face
  1445. global face
  1446. while current_face == 'West':
  1447. y = current_position[0]
  1448. x = current_position[1]
  1449. if current_map[y][x-1] == 0:
  1450. if current_map[y+1][x] == 0:
  1451. if current_map[y-1][x] == 0:
  1452. # Wall in front, left, and right
  1453. dead_end()
  1454. elif current_map[y-1][x] == 1:
  1455. # Wall in front and left, space on right
  1456. turn_right()
  1457. elif current_map[y-1][x] == 2:
  1458. # Wall in front and left, stairs on right
  1459. turn_right()
  1460. elif current_map[y-1][x] == 3:
  1461. # Wall in front and left, door on right
  1462. door_right()
  1463. elif current_map[y-1][x] == 4:
  1464. # Wall in front and left, stairs on right
  1465. turn_right()
  1466. elif current_map[y+1][x] == 1:
  1467. if current_map[y-1][x] == 0:
  1468. # Wall in front and right, space on left
  1469. turn_left()
  1470. elif current_map[y-1][x] == 1:
  1471. # Wall in front, space on right and left
  1472. t_intersection()
  1473. elif current_map[y-1][x] == 2:
  1474. # Wall in front, space on left, stairs on right
  1475. t_intersection()
  1476. elif current_map[y-1][x] == 3:
  1477. # Wall in front, space on left, door on right
  1478. turn_left_door_right()
  1479. elif current_map[y-1][x] == 4:
  1480. # Wall in front, space on left, stairs on right
  1481. t_intersection()
  1482. elif current_map[y+1][x] == 2:
  1483. if current_map[y-1][x] == 0:
  1484. # Wall in front and right, stairs on left
  1485. turn_left()
  1486. elif current_map[y-1][x] == 1:
  1487. # Wall in front, space on right, stairs on left
  1488. t_intersection()
  1489. elif current_map[y-1][x] == 2:
  1490. # Wall in front, stairs on right and left
  1491. t_intersection()
  1492. elif current_map[y-1][x] == 3:
  1493. # Wall in front, stairs on left, door on right
  1494. turn_left_door_right()
  1495. elif current_map[y-1][x] == 4:
  1496. # Wall in front, stairs on left, stairs on right
  1497. t_intersection()
  1498. elif current_map[y+1][x] == 3:
  1499. if current_map[y-1][x] == 0:
  1500. # Wall in front and right, door on left
  1501. door_left()
  1502. elif current_map[y-1][x] == 1:
  1503. # Wall in front, space on right, door on left
  1504. turn_right_door_left()
  1505. elif current_map[y-1][x] == 2:
  1506. # Wall in front, stairs on right, door on left
  1507. turn_right_door_left()
  1508. elif current_map[y-1][x] == 3:
  1509. # Wall in front, door on right and left
  1510. door_right_left()
  1511. elif current_map[y-1][x] == 4:
  1512. # Wall in front, door on left, stairs on right
  1513. turn_right_door_left()
  1514. elif current_map[y+1][x] == 4:
  1515. if current_map[y-1][x] == 0:
  1516. # Wall in front and right, stairs on left
  1517. turn_left()
  1518. elif current_map[y-1][x] == 1:
  1519. # Wall in front, space on right, stairs on left
  1520. t_intersection()
  1521. elif current_map[y-1][x] == 2:
  1522. # Wall in front, stairs on right, stairs on left
  1523. t_intersection()
  1524. elif current_map[y-1][x] == 3:
  1525. # Wall in front, door on right, stairs on left
  1526. turn_left_door_right()
  1527. elif current_map[y-1][x] == 4:
  1528. # Wall in front, stairs on left, stairs on right
  1529. t_intersection()
  1530. elif current_map[y][x-1] == 1:
  1531. if current_map[y+1][x] == 0:
  1532. if current_map[y-1][x] == 0:
  1533. # Space in front, wall on left and right
  1534. corridor()
  1535. elif current_map[y-1][x] == 1:
  1536. # Space in front and right, wall on left
  1537. wall_left()
  1538. elif current_map[y-1][x] == 2:
  1539. # Space in front, wall on left, stairs on right
  1540. wall_left()
  1541. elif current_map[y-1][x] == 3:
  1542. # Space in front, wall on left, door on right
  1543. corridor_door_right()
  1544. elif current_map[y-1][x] == 4:
  1545. # Space in front, wall on left, stairs on right
  1546. wall_left()
  1547. elif current_map[y+1][x] == 1:
  1548. if current_map[y-1][x] == 0:
  1549. # Space in front and left, wall on right
  1550. wall_right()
  1551. elif current_map[y-1][x] == 1:
  1552. # Space in front and left and right
  1553. middle()
  1554. elif current_map[y-1][x] == 2:
  1555. # Space in front and left, stairs on right
  1556. middle()
  1557. elif current_map[y-1][x] == 3:
  1558. # Space in front and left, door on right
  1559. wall_right_door()
  1560. elif current_map[y-1][x] == 4:
  1561. # Space in front and left, stairs on right
  1562. middle()
  1563. elif current_map[y+1][x] == 2:
  1564. if current_map[y-1][x] == 0:
  1565. # Space in front, stairs on left, wall on right
  1566. wall_right()
  1567. elif current_map[y-1][x] == 1:
  1568. # Space in front, stairs on left, space on right
  1569. middle()
  1570. elif current_map[y-1][x] == 2:
  1571. # Space in front, stairs on left, stairs on right
  1572. middle()
  1573. elif current_map[y-1][x] == 3:
  1574. # Space in front, stairs on left, door on right
  1575. wall_right_door()
  1576. elif current_map[y-1][x] == 4:
  1577. # Space in front, stairs on left, stairs on right
  1578. middle()
  1579. elif current_map[y+1][x] == 3:
  1580. if current_map[y-1][x] == 0:
  1581. # Space in front, door on left, wall on right
  1582. corridor_door_left()
  1583. elif current_map[y-1][x] == 1:
  1584. # Space in front and right, door on left
  1585. wall_left_door()
  1586. elif current_map[y-1][x] == 2:
  1587. # Space in front, door on left, stairs on right
  1588. wall_left_door()
  1589. elif current_map[y-1][x] == 3:
  1590. # Space in front, door on left, door on right
  1591. corridor_door_left_right()
  1592. elif current_map[y-1][x] == 4:
  1593. # Space in front, door on left, stairs on right
  1594. wall_left_door()
  1595. elif current_map[y+1][x] == 4:
  1596. if current_map[y-1][x] == 0:
  1597. # Space in front, stairs on left, wall on right
  1598. wall_right()
  1599. elif current_map[y-1][x] == 1:
  1600. # Space in front and right, stairs on left
  1601. middle()
  1602. elif current_map[y-1][x] == 2:
  1603. # Space in front, stairs on left, stairs on right
  1604. middle()
  1605. elif current_map[y-1][x] == 3:
  1606. # Space in front, stairs on left, door on right
  1607. wall_right_door()
  1608. elif current_map[y-1][x] == 4:
  1609. # Space in front, stairs on left, stairs on right
  1610. middle()
  1611. elif current_map[y][x-1] == 2:
  1612. if current_map[y+1][x] == 0:
  1613. if current_map[y-1][x] == 0:
  1614. # Stairs in front, wall on left and right
  1615. stairs_front()
  1616. elif current_map[y-1][x] == 1:
  1617. # Stairs in front, wall on left, space on right
  1618. turn_right_stairs()
  1619. elif current_map[y-1][x] == 2:
  1620. # Stairs in front, wall on left, stairs on right
  1621. turn_right_stairs()
  1622. elif current_map[y-1][x] == 3:
  1623. # Stairs in front, wall on left, door on right
  1624. stairs_front_door_right()
  1625. elif current_map[y-1][x] == 4:
  1626. # Stairs in front, wall on left, stairs on right
  1627. turn_right_stairs()
  1628. elif current_map[y+1][x] == 1:
  1629. if current_map[y-1][x] == 0:
  1630. # Stairs in front, space on left, wall on right
  1631. turn_left_stairs()
  1632. elif current_map[y-1][x] == 1:
  1633. # Stairs in front, space on left, space on right
  1634. stairs_t_intersection()
  1635. elif current_map[y-1][x] == 2:
  1636. # Stairs in front, space on left, stairs on right
  1637. stairs_t_intersection()
  1638. elif current_map[y-1][x] == 3:
  1639. # Stairs in front, space on left, door on right
  1640. turn_left_stairs_door_right()
  1641. elif current_map[y-1][x] == 4:
  1642. # Stairs in front, space on left, stairs on right
  1643. stairs_t_intersection()
  1644. elif current_map[y+1][x] == 2:
  1645. if current_map[y-1][x] == 0:
  1646. # Stairs in front, stairs on left, wall on right
  1647. turn_left_stairs()
  1648. elif current_map[y-1][x] == 1:
  1649. # Stairs in front, stairs on left, space on right
  1650. stairs_t_intersection()
  1651. elif current_map[y-1][x] == 2:
  1652. # Stairs in front, stairs on left, stairs on right
  1653. stairs_t_intersection()
  1654. elif current_map[y-1][x] == 3:
  1655. # Stairs in front, stairs on left, door on right
  1656. turn_left_stairs_door_right()
  1657. elif current_map[y-1][x] == 4:
  1658. # Stairs in front, stairs on left, stairs on right
  1659. stairs_t_intersection()
  1660. elif current_map[y+1][x] == 3:
  1661. if current_map[y-1][x] == 0:
  1662. # Stairs in front, door on left, wall on right
  1663. stairs_front_door_left()
  1664. elif current_map[y-1][x] == 1:
  1665. # Stairs in front, door on left, space on right
  1666. turn_right_stairs_door_left()
  1667. elif current_map[y-1][x] == 2:
  1668. # Stairs in front, door on left, stairs on right
  1669. turn_right_stairs_door_left()
  1670. elif current_map[y-1][x] == 3:
  1671. # Stairs in front, door on left, door on right
  1672. stairs_front_door_left_right()
  1673. elif current_map[y-1][x] == 4:
  1674. # Stairs in front, door on left, stairs on right
  1675. turn_right_stairs_door_left()
  1676. elif current_map[y-1][x] == 4:
  1677. if current_map[y-1][x] == 0:
  1678. # Stairs in front, stairs on left, wall on right
  1679. turn_left_stairs()
  1680. elif current_map[y-1][x] == 1:
  1681. # Stairs in front, stairs on left, space on right
  1682. stairs_t_intersection()
  1683. elif current_map[y-1][x] == 2:
  1684. # Stairs in front, stairs on left, stairs on right
  1685. stairs_t_intersection()
  1686. elif current_map[y-1][x] == 3:
  1687. # Stairs in front, stairs on left, door on right
  1688. turn_left_stairs_door_right()
  1689. elif current_map[y-1][x] == 4:
  1690. # Stairs in front, stairs on left, stairs on right
  1691. stairs_t_intersection()
  1692. elif current_map[y][x-1] == 3:
  1693. if current_map[y+1][x] == 0:
  1694. if current_map[y-1][x] == 0:
  1695. # Door in front, wall on right, wall on left
  1696. door_front()
  1697. elif current_map[y-1][x] == 1:
  1698. # Door in front, wall on left, space on right
  1699. turn_right_door_front()
  1700. elif current_map[y-1][x] == 2:
  1701. # Door in front, wall on left, stairs on right
  1702. turn_right_door_front()
  1703. elif current_map[y-1][x] == 3:
  1704. # Door in front, wall on left, door on right
  1705. door_front_right()
  1706. elif current_map[y-1][x] == 4:
  1707. # Door in front, wall on left, stairs on right
  1708. turn_right_door_front()
  1709. elif current_map[y+1][x] == 1:
  1710. if current_map[y-1][x] == 0:
  1711. # Door in front, space on left, wall on right
  1712. turn_left_door_front()
  1713. elif current_map[y-1][x] == 1:
  1714. # Door in front, space on left, space on right
  1715. door_t_intersection()
  1716. elif current_map[y-1][x] == 2:
  1717. # Door in front, space on left, stairs on right
  1718. door_t_intersection()
  1719. elif current_map[y-1][x] == 3:
  1720. # Door in front, space on left, door on right
  1721. turn_left_door_front_right()
  1722. elif current_map[y-1][x] == 4:
  1723. # Door in front, space on left, stairs on right
  1724. door_t_intersection()
  1725. elif current_map[y+1][x] == 2:
  1726. if current_map[y-1][x] == 0:
  1727. # Door in front, stairs on left, wall on right
  1728. turn_left_door_front()
  1729. elif current_map[y-1][x] == 1:
  1730. # Door in front, stairs on left, space on right
  1731. door_t_intersection()
  1732. elif current_map[y-1][x] == 2:
  1733. # Door in front, stairs on left, stairs on right
  1734. door_t_intersection()
  1735. elif current_map[y-1][x] == 3:
  1736. # Door in front, stairs on left, door on right
  1737. turn_left_door_front_right()
  1738. elif current_map[y-1][x] == 4:
  1739. # Door in front, stairs on left, stairs on right
  1740. door_t_intersection()
  1741. elif current_map[y+1][x] == 3:
  1742. if current_map[y-1][x] == 0:
  1743. # Door in front, door on left, wall on right
  1744. door_front_left()
  1745. elif current_map[y-1][x] == 1:
  1746. # Door in front, door on left, space on right
  1747. turn_right_door_front_left()
  1748. elif current_map[y-1][x] == 2:
  1749. # Door in front, door on left, stairs on right
  1750. turn_right_door_front_left()
  1751. elif current_map[y-1][x] == 3:
  1752. # Door in front, door on left, door on right
  1753. door_front_left_right()
  1754. elif current_map[y+1][x] == 4:
  1755. # Door in front, door on left, stairs on right
  1756. turn_right_door_front_left()
  1757. elif current_map[y+1][x] == 4:
  1758. if current_map[y-1][x] == 0:
  1759. # Door in front, stairs on left, wall on right
  1760. turn_left_door_front()
  1761. elif current_map[y-1][x] == 1:
  1762. # Door in front, stairs on left, space on right
  1763. door_t_intersection()
  1764. elif current_map[y-1][x] == 2:
  1765. # Door in front, stairs on left, stairs on right
  1766. door_t_intersection()
  1767. elif current_map[y-1][x] == 3:
  1768. # Door in front, stairs on left, door on right
  1769. turn_left_door_front_right()
  1770. elif current_map[y-1][x] == 4:
  1771. # Door in front, stairs on left, stairs on right
  1772. door_t_intersection()
  1773. elif current_map[y][x-1] == 4:
  1774. if current_map[y+1][x] == 0:
  1775. if current_map[y-1][x] == 0:
  1776. # Downstairs in front, wall on right, wall on left
  1777. stairs_down()
  1778. elif current_map[y-1][x] == 1:
  1779. # Downstairs in front, wall on left, space on right
  1780. turn_right_stairs_down()
  1781. elif current_map[y-1][x] == 2:
  1782. # Downstairs in front, wall on left, stairs on right
  1783. turn_right_stairs_down()
  1784. elif current_map[y-1][x] == 3:
  1785. # Downstairs in front, wall on left, door on right
  1786. stairs_down_door_right()
  1787. elif current_map[y-1][x] == 4:
  1788. # Downstairs in front, wall on left, stairs on right
  1789. turn_right_stairs_down()
  1790. elif current_map[y+1][x] == 1:
  1791. if current_map[y-1][x] == 0:
  1792. # Downstairs in front, space on left, wall on right
  1793. turn_left_stairs_down()
  1794. elif current_map[y-1][x] == 1:
  1795. # Downstairs in front, space on left, space on right
  1796. stairs_down_t_intersection()
  1797. elif current_map[y-1][x] == 2:
  1798. # Downstairs in front, space on left, stairs on right
  1799. stairs_down_t_intersection()
  1800. elif current_map[y-1][x] == 3:
  1801. # Downstairs in front, space on left, door on right
  1802. turn_left_stairs_down_door_right()
  1803. elif current_map[y-1][x] == 4:
  1804. # Downstairs in front, space on left, stairs on right
  1805. stairs_down_t_intersection()
  1806. elif current_map[y+1][x] == 2:
  1807. if current_map[y-1][x] == 0:
  1808. # Downstairs in front, stairs on left, wall on right
  1809. turn_left_stairs_down()
  1810. elif current_map[y-1][x] == 1:
  1811. # Downstairs in front, stairs on left, space on right
  1812. stairs_down_t_intersection()
  1813. elif current_map[y-1][x] == 2:
  1814. # Downstairs in front, stairs on left, stairs on right
  1815. stairs_down_t_intersection()
  1816. elif current_map[y-1][x] == 3:
  1817. # Downstairs in front, stairs on left, door on right
  1818. turn_left_stairs_down_door_right()
  1819. elif current_map[y-1][x] == 4:
  1820. # Downstairs in front, stairs on left, stairs on right
  1821. stairs_down_t_intersection()
  1822. elif current_map[y+1][x] == 3:
  1823. if current_map[y-1][x] == 0:
  1824. # Downstairs in front, door on left, wall on right
  1825. stairs_down_door_left()
  1826. elif current_map[y-1][x] == 1:
  1827. # Downstairs in front, door on left, space on right
  1828. turn_right_stairs_down_door_left()
  1829. elif current_map[y-1][x] == 2:
  1830. # Downstairs in front, door on left, stairs on right
  1831. turn_right_stairs_down_door_left()
  1832. elif current_map[y-1][x] == 3:
  1833. # Downstairs in front, door on left, door on right
  1834. stairs_down_door_left_right()
  1835. elif current_map[y+1][x] == 4:
  1836. # Downstairs in front, door on left, stairs on right
  1837. turn_right_stairs_down_door_left()
  1838. elif current_map[y+1][x] == 4:
  1839. if current_map[y-1][x] == 0:
  1840. # Downstairs in front, stairs on left, wall on right
  1841. turn_left_stairs_down()
  1842. elif current_map[y-1][x] == 1:
  1843. # Downstairs in front, stairs on left, space on right
  1844. stairs_down_t_intersection()
  1845. elif current_map[y-1][x] == 2:
  1846. # Downstairs in front, stairs on left, stairs on right
  1847. stairs_down_t_intersection()
  1848. elif current_map[y-1][x] == 3:
  1849. # Downstairs in front, stairs on left, door on right
  1850. turn_left_stairs_down_door_right()
  1851. elif current_map[y-1][x] == 4:
  1852. # Downstairs in front, stairs on left, stairs on right
  1853. stairs_down_t_intersection()
  1854. while current_face == 'South':
  1855. y = current_position[0]
  1856. x = current_position[1]
  1857. if current_map[y+1][x] == 0:
  1858. if current_map[y][x+1] == 0:
  1859. if current_map[y][x-1] == 0:
  1860. # Wall in front, left, and right
  1861. dead_end()
  1862. elif current_map[y][x-1] == 1:
  1863. # Wall in front and left, space on right
  1864. turn_right()
  1865. elif current_map[y][x-1] == 2:
  1866. # Wall in front and left, stairs on right
  1867. turn_right()
  1868. elif current_map[y][x-1] == 3:
  1869. # Wall in front and left, door on right
  1870. door_right()
  1871. elif current_map[y][x-1] == 4:
  1872. # Wall in front and left, stairs on right
  1873. turn_right()
  1874. elif current_map[y][x+1] == 1:
  1875. if current_map[y][x-1] == 0:
  1876. # Wall in front and right, space on left
  1877. turn_left()
  1878. elif current_map[y][x-1] == 1:
  1879. # Wall in front, space on right and left
  1880. t_intersection()
  1881. elif current_map[y][x-1] == 2:
  1882. # Wall in front, space on left, stairs on right
  1883. t_intersection()
  1884. elif current_map[y][x-1] == 3:
  1885. # Wall in front, space on left, door on right
  1886. turn_left_door_right()
  1887. elif current_map[y][x-1] == 4:
  1888. # Wall in front, space on left, stairs on right
  1889. t_intersection()
  1890. elif current_map[y][x+1] == 2:
  1891. if current_map[y][x-1] == 0:
  1892. # Wall in front and right, stairs on left
  1893. turn_left()
  1894. elif current_map[y][x-1] == 1:
  1895. # Wall in front, space on right, stairs on left
  1896. t_intersection()
  1897. elif current_map[y][x-1] == 2:
  1898. # Wall in front, stairs on right and left
  1899. t_intersection()
  1900. elif current_map[y][x-1] == 3:
  1901. # Wall in front, stairs on left, door on right
  1902. turn_left_door_right()
  1903. elif current_map[y][x-1] == 4:
  1904. # Wall in front, stairs on left, stairs on right
  1905. t_intersection()
  1906. elif current_map[y][x+1] == 3:
  1907. if current_map[y][x-1] == 0:
  1908. # Wall in front and right, door on left
  1909. door_left()
  1910. elif current_map[y][x-1] == 1:
  1911. # Wall in front, space on right, door on left
  1912. turn_right_door_left()
  1913. elif current_map[y][x-1] == 2:
  1914. # Wall in front, stairs on right, door on left
  1915. turn_right_door_left()
  1916. elif current_map[y][x-1] == 3:
  1917. # Wall in front, door on right and left
  1918. door_right_left()
  1919. elif current_map[y][x-1] == 4:
  1920. # Wall in front, door on left, stairs on right
  1921. turn_right_door_left()
  1922. elif current_map[y][x+1] == 4:
  1923. if current_map[y][x-1] == 0:
  1924. # Wall in front and right, stairs on left
  1925. turn_left()
  1926. elif current_map[y][x-1] == 1:
  1927. # Wall in front, space on right, stairs on left
  1928. t_intersection()
  1929. elif current_map[y][x-1] == 2:
  1930. # Wall in front, stairs on right, stairs on left
  1931. t_intersection()
  1932. elif current_map[y][x-1] == 3:
  1933. # Wall in front, door on right, stairs on left
  1934. turn_left_door_right()
  1935. elif current_map[y][x-1] == 4:
  1936. # Wall in front, stairs on left, stairs on right
  1937. t_intersection()
  1938. elif current_map[y+1][x] == 1:
  1939. if current_map[y][x+1] == 0:
  1940. if current_map[y][x-1] == 0:
  1941. # Space in front, wall on left and right
  1942. corridor()
  1943. elif current_map[y][x-1] == 1:
  1944. # Space in front and right, wall on left
  1945. wall_left()
  1946. elif current_map[y][x-1] == 2:
  1947. # Space in front, wall on left, stairs on right
  1948. wall_left()
  1949. elif current_map[y][x-1] == 3:
  1950. # Space in front, wall on left, door on right
  1951. corridor_door_right()
  1952. elif current_map[y][x-1] == 4:
  1953. # Space in front, wall on left, stairs on right
  1954. wall_left()
  1955. elif current_map[y][x+1] == 1:
  1956. if current_map[y][x-1] == 0:
  1957. # Space in front and left, wall on right
  1958. wall_right()
  1959. elif current_map[y][x-1] == 1:
  1960. # Space in front and left and right
  1961. middle()
  1962. elif current_map[y][x-1] == 2:
  1963. # Space in front and left, stairs on right
  1964. middle()
  1965. elif current_map[y][x-1] == 3:
  1966. # Space in front and left, door on right
  1967. wall_right_door()
  1968. elif current_map[y][x-1] == 4:
  1969. # Space in front and left, stairs on right
  1970. middle()
  1971. elif current_map[y][x+1] == 2:
  1972. if current_map[y][x-1] == 0:
  1973. # Space in front, stairs on left, wall on right
  1974. wall_right()
  1975. elif current_map[y][x-1] == 1:
  1976. # Space in front, stairs on left, space on right
  1977. middle()
  1978. elif current_map[y][x-1] == 2:
  1979. # Space in front, stairs on left, stairs on right
  1980. middle()
  1981. elif current_map[y][x-1] == 3:
  1982. # Space in front, stairs on left, door on right
  1983. wall_right_door()
  1984. elif current_map[y][x-1] == 4:
  1985. # Space in front, stairs on left, stairs on right
  1986. middle()
  1987. elif current_map[y][x+1] == 3:
  1988. if current_map[y][x-1] == 0:
  1989. # Space in front, door on left, wall on right
  1990. corridor_door_left()
  1991. elif current_map[y][x-1] == 1:
  1992. # Space in front and right, door on left
  1993. wall_left_door()
  1994. elif current_map[y][x-1] == 2:
  1995. # Space in front, door on left, stairs on right
  1996. wall_left_door()
  1997. elif current_map[y][x-1] == 3:
  1998. # Space in front, door on left, door on right
  1999. corridor_door_left_right()
  2000. elif current_map[y][x-1] == 4:
  2001. # Space in front, door on left, stairs on right
  2002. wall_left_door()
  2003. elif current_map[y][x+1] == 4:
  2004. if current_map[y][x-1] == 0:
  2005. # Space in front, stairs on left, wall on right
  2006. wall_right()
  2007. elif current_map[y][x-1] == 1:
  2008. # Space in front and right, stairs on left
  2009. middle()
  2010. elif current_map[y][x-1] == 2:
  2011. # Space in front, stairs on left, stairs on right
  2012. middle()
  2013. elif current_map[y][x-1] == 3:
  2014. # Space in front, stairs on left, door on right
  2015. wall_right_door()
  2016. elif current_map[y][x-1] == 4:
  2017. # Space in front, stairs on left, stairs on right
  2018. middle()
  2019. elif current_map[y+1][x] == 2:
  2020. if current_map[y][x+1] == 0:
  2021. if current_map[y][x-1] == 0:
  2022. # Stairs in front, wall on left and right
  2023. stairs_front()
  2024. elif current_map[y][x-1] == 1:
  2025. # Stairs in front, wall on left, space on right
  2026. turn_right_stairs()
  2027. elif current_map[y][x-1] == 2:
  2028. # Stairs in front, wall on left, stairs on right
  2029. turn_right_stairs()
  2030. elif current_map[y][x-1] == 3:
  2031. # Stairs in front, wall on left, door on right
  2032. stairs_front_door_right()
  2033. elif current_map[y][x-1] == 4:
  2034. # Stairs in front, wall on left, stairs on right
  2035. turn_right_stairs()
  2036. elif current_map[y][x+1] == 1:
  2037. if current_map[y][x-1] == 0:
  2038. # Stairs in front, space on left, wall on right
  2039. turn_left_stairs()
  2040. elif current_map[y][x-1] == 1:
  2041. # Stairs in front, space on left, space on right
  2042. stairs_t_intersection()
  2043. elif current_map[y][x-1] == 2:
  2044. # Stairs in front, space on left, stairs on right
  2045. stairs_t_intersection()
  2046. elif current_map[y][x-1] == 3:
  2047. # Stairs in front, space on left, door on right
  2048. turn_left_stairs_door_right()
  2049. elif current_map[y][x-1] == 4:
  2050. # Stairs in front, space on left, stairs on right
  2051. stairs_t_intersection()
  2052. elif current_map[y][x+1] == 2:
  2053. if current_map[y][x-1] == 0:
  2054. # Stairs in front, stairs on left, wall on right
  2055. turn_left_stairs()
  2056. elif current_map[y][x-1] == 1:
  2057. # Stairs in front, stairs on left, space on right
  2058. stairs_t_intersection()
  2059. elif current_map[y][x-1] == 2:
  2060. # Stairs in front, stairs on left, stairs on right
  2061. stairs_t_intersection()
  2062. elif current_map[y][x-1] == 3:
  2063. # Stairs in front, stairs on left, door on right
  2064. turn_left_stairs_door_right()
  2065. elif current_map[y][x-1] == 4:
  2066. # Stairs in front, stairs on left, stairs on right
  2067. stairs_t_intersection()
  2068. elif current_map[y][x+1] == 3:
  2069. if current_map[y][x-1] == 0:
  2070. # Stairs in front, door on left, wall on right
  2071. stairs_front_door_left()
  2072. elif current_map[y][x-1] == 1:
  2073. # Stairs in front, door on left, space on right
  2074. turn_right_stairs_door_left()
  2075. elif current_map[y][x-1] == 2:
  2076. # Stairs in front, door on left, stairs on right
  2077. turn_right_stairs_door_left()
  2078. elif current_map[y][x-1] == 3:
  2079. # Stairs in front, door on left, door on right
  2080. stairs_front_door_left_right()
  2081. elif current_map[y][x-1] == 4:
  2082. # Stairs in front, door on left, stairs on right
  2083. turn_right_stairs_door_left()
  2084. elif current_map[y][x+1] == 4:
  2085. if current_map[y][x-1] == 0:
  2086. # Stairs in front, stairs on left, wall on right
  2087. turn_left_stairs()
  2088. elif current_map[y][x-1] == 1:
  2089. # Stairs in front, stairs on left, space on right
  2090. stairs_t_intersection()
  2091. elif current_map[y][x-1] == 2:
  2092. # Stairs in front, stairs on left, stairs on right
  2093. stairs_t_intersection()
  2094. elif current_map[y][x-1] == 3:
  2095. # Stairs in front, stairs on left, door on right
  2096. turn_left_stairs_door_right()
  2097. elif current_map[y][x-1] == 4:
  2098. # Stairs in front, stairs on left, stairs on right
  2099. stairs_t_intersection()
  2100. elif current_map[y+1][x] == 3:
  2101. if current_map[y][x+1] == 0:
  2102. if current_map[y][x-1] == 0:
  2103. # Door in front, wall on right, wall on left
  2104. door_front()
  2105. elif current_map[y][x-1] == 1:
  2106. # Door in front, wall on left, space on right
  2107. turn_right_door_front()
  2108. elif current_map[y][x-1] == 2:
  2109. # Door in front, wall on left, stairs on right
  2110. turn_right_door_front()
  2111. elif current_map[y][x-1] == 3:
  2112. # Door in front, wall on left, door on right
  2113. door_front_right()
  2114. elif current_map[y][x-1] == 4:
  2115. # Door in front, wall on left, stairs on right
  2116. turn_right_door_front()
  2117. elif current_map[y][x+1] == 1:
  2118. if current_map[y][x-1] == 0:
  2119. # Door in front, space on left, wall on right
  2120. turn_left_door_front()
  2121. elif current_map[y][x-1] == 1:
  2122. # Door in front, space on left, space on right
  2123. door_t_intersection()
  2124. elif current_map[y][x-1] == 2:
  2125. # Door in front, space on left, stairs on right
  2126. door_t_intersection()
  2127. elif current_map[y][x-1] == 3:
  2128. # Door in front, space on left, door on right
  2129. turn_left_door_front_right()
  2130. elif current_map[y][x-1] == 4:
  2131. # Door in front, space on left, stairs on right
  2132. door_t_intersection()
  2133. elif current_map[y][x+1] == 2:
  2134. if current_map[y][x-1] == 0:
  2135. # Door in front, stairs on left, wall on right
  2136. turn_left_door_front()
  2137. elif current_map[y][x-1] == 1:
  2138. # Door in front, stairs on left, space on right
  2139. door_t_intersection()
  2140. elif current_map[y][x-1] == 2:
  2141. # Door in front, stairs on left, stairs on right
  2142. door_t_intersection()
  2143. elif current_map[y][x-1] == 3:
  2144. # Door in front, stairs on left, door on right
  2145. turn_left_door_front_right()
  2146. elif current_map[y][x-1] == 4:
  2147. # Door in front, stairs on left, stairs on right
  2148. door_t_intersection()
  2149. elif current_map[y][x+1] == 3:
  2150. if current_map[y][x-1] == 0:
  2151. # Door in front, door on left, wall on right
  2152. door_front_left()
  2153. elif current_map[y][x-1] == 1:
  2154. # Door in front, door on left, space on right
  2155. turn_right_door_front_left()
  2156. elif current_map[y][x-1] == 2:
  2157. # Door in front, door on left, stairs on right
  2158. turn_right_door_front_left()
  2159. elif current_map[y][x-1] == 3:
  2160. # Door in front, door on left, door on right
  2161. door_front_left_right()
  2162. elif current_map[y][x-1] == 4:
  2163. # Door in front, door on left, stairs on right
  2164. turn_right_door_front_left()
  2165. elif current_map[y][x+1] == 4:
  2166. if current_map[y][x-1] == 0:
  2167. # Door in front, stairs on left, wall on right
  2168. turn_left_door_front()
  2169. elif current_map[y][x-1] == 1:
  2170. # Door in front, stairs on left, space on right
  2171. door_t_intersection()
  2172. elif current_map[y][x-1] == 2:
  2173. # Door in front, stairs on left, stairs on right
  2174. door_t_intersection()
  2175. elif current_map[y][x-1] == 3:
  2176. # Door in front, stairs on left, door on right
  2177. turn_left_door_front_right()
  2178. elif current_map[y][x-1] == 4:
  2179. # Door in front, stairs on left, stairs on right
  2180. door_t_intersection()
  2181. elif current_map[y+1][x] == 4:
  2182. if current_map[y][x+1] == 0:
  2183. if current_map[y][x-1] == 0:
  2184. # Downstairs in front, wall on right, wall on left
  2185. stairs_down()
  2186. elif current_map[y][x-1] == 1:
  2187. # Downstairs in front, wall on left, space on right
  2188. turn_right_stairs_down()
  2189. elif current_map[y][x-1] == 2:
  2190. # Downstairs in front, wall on left, stairs on right
  2191. turn_right_stairs_down()
  2192. elif current_map[y][x-1] == 3:
  2193. # Downstairs in front, wall on left, door on right
  2194. stairs_down_door_right()
  2195. elif current_map[y][x-1] == 4:
  2196. # Downstairs in front, wall on left, stairs on right
  2197. turn_right_stairs_down()
  2198. elif current_map[y][x+1] == 1:
  2199. if current_map[y][x-1] == 0:
  2200. # Downstairs in front, space on left, wall on right
  2201. turn_left_stairs_down()
  2202. elif current_map[y][x-1] == 1:
  2203. # Downstairs in front, space on left, space on right
  2204. stairs_down_t_intersection()
  2205. elif current_map[y][x-1] == 2:
  2206. # Downstairs in front, space on left, stairs on right
  2207. stairs_down_t_intersection()
  2208. elif current_map[y][x-1] == 3:
  2209. # Downstairs in front, space on left, door on right
  2210. turn_left_stairs_down_door_right()
  2211. elif current_map[y][x-1] == 4:
  2212. # Downstairs in front, space on left, stairs on right
  2213. stairs_down_t_intersection()
  2214. elif current_map[y][x+1] == 2:
  2215. if current_map[y][x-1] == 0:
  2216. # Downstairs in front, stairs on left, wall on right
  2217. turn_left_stairs_down()
  2218. elif current_map[y][x-1] == 1:
  2219. # Downstairs in front, stairs on left, space on right
  2220. stairs_down_t_intersection()
  2221. elif current_map[y][x-1] == 2:
  2222. # Downstairs in front, stairs on left, stairs on right
  2223. stairs_down_t_intersection()
  2224. elif current_map[y][x-1] == 3:
  2225. # Downstairs in front, stairs on left, door on right
  2226. turn_left_stairs_down_door_right()
  2227. elif current_map[y][x-1] == 4:
  2228. # Downstairs in front, stairs on left, stairs on right
  2229. stairs_down_t_intersection()
  2230. elif current_map[y][x+1] == 3:
  2231. if current_map[y][x-1] == 0:
  2232. # Downstairs in front, door on left, wall on right
  2233. stairs_down_door_left()
  2234. elif current_map[y][x-1] == 1:
  2235. # Downstairs in front, door on left, space on right
  2236. turn_right_stairs_down_door_left()
  2237. elif current_map[y][x-1] == 2:
  2238. # Downstairs in front, door on left, stairs on right
  2239. turn_right_stairs_down_door_left()
  2240. elif current_map[y][x-1] == 3:
  2241. # Downstairs in front, door on left, door on right
  2242. stairs_down_door_left_right()
  2243. elif current_map[y][x-1] == 4:
  2244. # Downstairs in front, door on left, stairs on right
  2245. turn_right_stairs_down_door_left()
  2246. elif current_map[y][x+1] == 4:
  2247. if current_map[y][x-1] == 0:
  2248. # Downstairs in front, stairs on left, wall on right
  2249. turn_left_stairs_down()
  2250. elif current_map[y][x-1] == 1:
  2251. # Downstairs in front, stairs on left, space on right
  2252. stairs_down_t_intersection()
  2253. elif current_map[y][x-1] == 2:
  2254. # Downstairs in front, stairs on left, stairs on right
  2255. stairs_down_t_intersection()
  2256. elif current_map[y][x-1] == 3:
  2257. # Downstairs in front, stairs on left, door on right
  2258. turn_left_stairs_down_door_right()
  2259. elif current_map[y][x-1] == 4:
  2260. # Downstairs in front, stairs on left, stairs on right
  2261. stairs_down_t_intersection()
  2262. while current_face == 'East':
  2263. y = current_position[0]
  2264. x = current_position[1]
  2265. if current_map[y][x+1] == 0:
  2266. if current_map[y-1][x] == 0:
  2267. if current_map[y+1][x] == 0:
  2268. # Wall in front, left, and right
  2269. dead_end()
  2270. elif current_map[y+1][x] == 1:
  2271. # Wall in front and left, space on right
  2272. turn_right()
  2273. elif current_map[y+1][x] == 2:
  2274. # Wall in front and left, stairs on right
  2275. turn_right()
  2276. elif current_map[y+1][x] == 3:
  2277. # Wall in front and left, door on right
  2278. door_right()
  2279. elif current_map[y+1][x] == 4:
  2280. # Wall in front and left, stairs on right
  2281. turn_right()
  2282. elif current_map[y-1][x] == 1:
  2283. if current_map[y+1][x] == 0:
  2284. # Wall in front and right, space on left
  2285. turn_left()
  2286. elif current_map[y+1][x] == 1:
  2287. # Wall in front, space on right and left
  2288. t_intersection()
  2289. elif current_map[y+1][x] == 2:
  2290. # Wall in front, space on left, stairs on right
  2291. t_intersection()
  2292. elif current_map[y+1][x] == 3:
  2293. # Wall in front, space on left, door on right
  2294. turn_left_door_right()
  2295. elif current_map[y+1][x] == 4:
  2296. # Wall in front, space on left, stairs on right
  2297. t_intersection()
  2298. elif current_map[y-1][x] == 2:
  2299. if current_map[y+1][x] == 0:
  2300. # Wall in front and right, stairs on left
  2301. turn_left()
  2302. elif current_map[y+1][x] == 1:
  2303. # Wall in front, space on right, stairs on left
  2304. t_intersection()
  2305. elif current_map[y+1][x] == 2:
  2306. # Wall in front, stairs on right and left
  2307. t_intersection()
  2308. elif current_map[y+1][x] == 3:
  2309. # Wall in front, stairs on left, door on right
  2310. turn_left_door_right()
  2311. elif current_map[y+1][x] == 4:
  2312. # Wall in front, stairs on left, stairs on right
  2313. t_intersection()
  2314. elif current_map[y-1][x] == 3:
  2315. if current_map[y+1][x] == 0:
  2316. # Wall in front and right, door on left
  2317. door_left()
  2318. elif current_map[y+1][x] == 1:
  2319. # Wall in front, space on right, door on left
  2320. turn_right_door_left()
  2321. elif current_map[y+1][x] == 2:
  2322. # Wall in front, stairs on right, door on left
  2323. turn_right_door_left()
  2324. elif current_map[y+1][x] == 3:
  2325. # Wall in front, door on right and left
  2326. door_right_left()
  2327. elif current_map[y+1][x] == 4:
  2328. # Wall in front, door on left, stairs on right
  2329. turn_right_door_left()
  2330. elif current_map[y-1][x] == 4:
  2331. if current_map[y+1][x] == 0:
  2332. # Wall in front and right, stairs on left
  2333. turn_left()
  2334. elif current_map[y+1][x] == 1:
  2335. # Wall in front, space on right, stairs on left
  2336. t_intersection()
  2337. elif current_map[y+1][x] == 2:
  2338. # Wall in front, stairs on right, stairs on left
  2339. t_intersection()
  2340. elif current_map[y+1][x] == 3:
  2341. # Wall in front, door on right, stairs on left
  2342. turn_left_door_right()
  2343. elif current_map[y+1][x] == 4:
  2344. # Wall in front, stairs on left, stairs on right
  2345. t_intersection()
  2346. elif current_map[y][x+1] == 1:
  2347. if current_map[y-1][x] == 0:
  2348. if current_map[y+1][x] == 0:
  2349. # Space in front, wall on left and right
  2350. corridor()
  2351. elif current_map[y+1][x] == 1:
  2352. # Space in front and right, wall on left
  2353. wall_left()
  2354. elif current_map[y+1][x] == 2:
  2355. # Space in front, wall on left, stairs on right
  2356. wall_left()
  2357. elif current_map[y+1][x] == 3:
  2358. # Space in front, wall on left, door on right
  2359. corridor_door_right()
  2360. elif current_map[y+1][x] == 4:
  2361. # Space in front, wall on left, stairs on right
  2362. wall_left()
  2363. elif current_map[y-1][x] == 1:
  2364. if current_map[y+1][x] == 0:
  2365. # Space in front and left, wall on right
  2366. wall_right()
  2367. elif current_map[y+1][x] == 1:
  2368. # Space in front and left and right
  2369. middle()
  2370. elif current_map[y+1][x] == 2:
  2371. # Space in front and left, stairs on right
  2372. middle()
  2373. elif current_map[y+1][x] == 3:
  2374. # Space in front and left, door on right
  2375. wall_right_door()
  2376. elif current_map[y+1][x] == 4:
  2377. # Space in front and left, stairs on right
  2378. middle()
  2379. elif current_map[y-1][x] == 2:
  2380. if current_map[y+1][x] == 0:
  2381. # Space in front, stairs on left, wall on right
  2382. wall_right()
  2383. elif current_map[y+1][x] == 1:
  2384. # Space in front, stairs on left, space on right
  2385. middle()
  2386. elif current_map[y+1][x] == 2:
  2387. # Space in front, stairs on left, stairs on right
  2388. middle()
  2389. elif current_map[y+1][x] == 3:
  2390. # Space in front, stairs on left, door on right
  2391. wall_right_door()
  2392. elif current_map[y+1][x] == 4:
  2393. # Space in front, stairs on left, stairs on right
  2394. middle()
  2395. elif current_map[y-1][x] == 3:
  2396. if current_map[y+1][x] == 0:
  2397. # Space in front, door on left, wall on right
  2398. corridor_door_left()
  2399. elif current_map[y+1][x] == 1:
  2400. # Space in front and right, door on left
  2401. wall_left_door()
  2402. elif current_map[y+1][x] == 2:
  2403. # Space in front, door on left, stairs on right
  2404. wall_left_door()
  2405. elif current_map[y+1][x] == 3:
  2406. # Space in front, door on left, door on right
  2407. corridor_door_left_right()
  2408. elif current_map[y+1][x] == 4:
  2409. # Space in front, door on left, stairs on right
  2410. wall_left_door()
  2411. elif current_map[y-1][x] == 4:
  2412. if current_map[y+1][x] == 0:
  2413. # Space in front, stairs on left, wall on right
  2414. wall_right()
  2415. elif current_map[y+1][x] == 1:
  2416. # Space in front and right, stairs on left
  2417. middle()
  2418. elif current_map[y+1][x] == 2:
  2419. # Space in front, stairs on left, stairs on right
  2420. middle()
  2421. elif current_map[y+1][x] == 3:
  2422. # Space in front, stairs on left, door on right
  2423. wall_right_door()
  2424. elif current_map[y+1][x] == 4:
  2425. # Space in front, stairs on left, stairs on right
  2426. middle()
  2427. elif current_map[y][x+1] == 2:
  2428. if current_map[y-1][x] == 0:
  2429. if current_map[y+1][x] == 0:
  2430. # Stairs in front, wall on left and right
  2431. stairs_front()
  2432. elif current_map[y+1][x] == 1:
  2433. # Stairs in front, wall on left, space on right
  2434. turn_right_stairs()
  2435. elif current_map[y+1][x] == 2:
  2436. # Stairs in front, wall on left, stairs on right
  2437. turn_right_stairs()
  2438. elif current_map[y+1][x] == 3:
  2439. # Stairs in front, wall on left, door on right
  2440. stairs_front_door_right()
  2441. elif current_map[y+1][x] == 4:
  2442. # Stairs in front, wall on left, stairs on right
  2443. turn_right_stairs()
  2444. elif current_map[y-1][x] == 1:
  2445. if current_map[y+1][x] == 0:
  2446. # Stairs in front, space on left, wall on right
  2447. turn_left_stairs()
  2448. elif current_map[y+1][x] == 1:
  2449. # Stairs in front, space on left, space on right
  2450. stairs_t_intersection()
  2451. elif current_map[y+1][x] == 2:
  2452. # Stairs in front, space on left, stairs on right
  2453. stairs_t_intersection()
  2454. elif current_map[y+1][x] == 3:
  2455. # Stairs in front, space on left, door on right
  2456. turn_left_stairs_door_right()
  2457. elif current_map[y+1][x] == 4:
  2458. # Stairs in front, space on left, stairs on right
  2459. stairs_t_intersection()
  2460. elif current_map[y-1][x] == 2:
  2461. if current_map[y+1][x] == 0:
  2462. # Stairs in front, stairs on left, wall on right
  2463. turn_left_stairs()
  2464. elif current_map[y+1][x] == 1:
  2465. # Stairs in front, stairs on left, space on right
  2466. stairs_t_intersection()
  2467. elif current_map[y+1][x] == 2:
  2468. # Stairs in front, stairs on left, stairs on right
  2469. stairs_t_intersection()
  2470. elif current_map[y+1][x] == 3:
  2471. # Stairs in front, stairs on left, door on right
  2472. turn_left_stairs_door_right()
  2473. elif current_map[y+1][x] == 4:
  2474. # Stairs in front, stairs on left, stairs on right
  2475. stairs_t_intersection()
  2476. elif current_map[y-1][x] == 3:
  2477. if current_map[y+1][x] == 0:
  2478. # Stairs in front, door on left, wall on right
  2479. stairs_front_door_left()
  2480. elif current_map[y+1][x] == 1:
  2481. # Stairs in front, door on left, space on right
  2482. turn_right_stairs_door_left()
  2483. elif current_map[y+1][x] == 2:
  2484. # Stairs in front, door on left, stairs on right
  2485. turn_right_stairs_door_left()
  2486. elif current_map[y+1][x] == 3:
  2487. # Stairs in front, door on left, door on right
  2488. stairs_front_door_left_right()
  2489. elif current_map[y+1][x] == 4:
  2490. # Stairs in front, door on left, stairs on right
  2491. turn_right_stairs_door_left()
  2492. elif current_map[y-1][x] == 4:
  2493. if current_map[y+1][x] == 0:
  2494. # Stairs in front, stairs on left, wall on right
  2495. turn_left_stairs()
  2496. elif current_map[y+1][x] == 1:
  2497. # Stairs in front, stairs on left, space on right
  2498. stairs_t_intersection()
  2499. elif current_map[y+1][x] == 2:
  2500. # Stairs in front, stairs on left, stairs on right
  2501. stairs_t_intersection()
  2502. elif current_map[y+1][x] == 3:
  2503. # Stairs in front, stairs on left, door on right
  2504. turn_left_stairs_door_right()
  2505. elif current_map[y+1][x] == 4:
  2506. # Stairs in front, stairs on left, stairs on right
  2507. stairs_t_intersection()
  2508. elif current_map[y][x+1] == 3:
  2509. if current_map[y-1][x] == 0:
  2510. if current_map[y+1][x] == 0:
  2511. # Door in front, wall on right, wall on left
  2512. door_front()
  2513. elif current_map[y+1][x] == 1:
  2514. # Door in front, wall on left, space on right
  2515. turn_right_door_front()
  2516. elif current_map[y+1][x] == 2:
  2517. # Door in front, wall on left, stairs on right
  2518. turn_right_door_front()
  2519. elif current_map[y+1][x] == 3:
  2520. # Door in front, wall on left, door on right
  2521. door_front_right()
  2522. elif current_map[y+1][x] == 4:
  2523. # Door in front, wall on left, stairs on right
  2524. turn_right_door_front()
  2525. elif current_map[y-1][x] == 1:
  2526. if current_map[y+1][x] == 0:
  2527. # Door in front, space on left, wall on right
  2528. turn_left_door_front()
  2529. elif current_map[y+1][x] == 1:
  2530. # Door in front, space on left, space on right
  2531. door_t_intersection()
  2532. elif current_map[y+1][x] == 2:
  2533. # Door in front, space on left, stairs on right
  2534. door_t_intersection()
  2535. elif current_map[y+1][x] == 3:
  2536. # Door in front, space on left, door on right
  2537. turn_left_door_front_right()
  2538. elif current_map[y+1][x] == 4:
  2539. # Door in front, space on left, stairs on right
  2540. door_t_intersection()
  2541. elif current_map[y-1][x] == 2:
  2542. if current_map[y+1][x] == 0:
  2543. # Door in front, stairs on left, wall on right
  2544. turn_left_door_front()
  2545. elif current_map[y+1][x] == 1:
  2546. # Door in front, stairs on left, space on right
  2547. door_t_intersection()
  2548. elif current_map[y+1][x] == 2:
  2549. # Door in front, stairs on left, stairs on right
  2550. door_t_intersection()
  2551. elif current_map[y+1][x] == 3:
  2552. # Door in front, stairs on left, door on right
  2553. turn_left_door_front_right()
  2554. elif current_map[y+1][x] == 4:
  2555. # Door in front, stairs on left, stairs on right
  2556. door_t_intersection()
  2557. elif current_map[y-1][x] == 3:
  2558. if current_map[y+1][x] == 0:
  2559. # Door in front, door on left, wall on right
  2560. door_front_left()
  2561. elif current_map[y+1][x] == 1:
  2562. # Door in front, door on left, space on right
  2563. turn_right_door_front_left()
  2564. elif current_map[y+1][x] == 2:
  2565. # Door in front, door on left, stairs on right
  2566. turn_right_door_front_left()
  2567. elif current_map[y+1][x] == 3:
  2568. # Door in front, door on left, door on right
  2569. door_front_left_right()
  2570. elif current_map[y+1][x] == 4:
  2571. # Door in front, door on left, stairs on right
  2572. turn_right_door_front_left()
  2573. elif current_map[y-1][x] == 4:
  2574. if current_map[y+1][x] == 0:
  2575. # Door in front, stairs on left, wall on right
  2576. turn_left_door_front()
  2577. elif current_map[y+1][x] == 1:
  2578. # Door in front, stairs on left, space on right
  2579. door_t_intersection()
  2580. elif current_map[y+1][x] == 2:
  2581. # Door in front, stairs on left, stairs on right
  2582. door_t_intersection()
  2583. elif current_map[y+1][x] == 3:
  2584. # Door in front, stairs on left, door on right
  2585. turn_left_door_front_right()
  2586. elif current_map[y+1][x] == 4:
  2587. # Door in front, stairs on left, stairs on right
  2588. door_t_intersection()
  2589. elif current_map[y][x+1] == 4:
  2590. if current_map[y-1][x] == 0:
  2591. if current_map[y+1][x] == 0:
  2592. # Downstairs in front, wall on right, wall on left
  2593. stairs_down()
  2594. elif current_map[y+1][x] == 1:
  2595. # Downstairs in front, wall on left, space on right
  2596. turn_right_stairs_down()
  2597. elif current_map[y+1][x] == 2:
  2598. # Downstairs in front, wall on left, stairs on right
  2599. turn_right_stairs_down()
  2600. elif current_map[y+1][x] == 3:
  2601. # Downstairs in front, wall on left, door on right
  2602. stairs_down_door_right()
  2603. elif current_map[y+1][x] == 4:
  2604. # Downstairs in front, wall on left, stairs on right
  2605. turn_right_stairs_down()
  2606. elif current_map[y-1][x] == 1:
  2607. if current_map[y+1][x] == 0:
  2608. # Downstairs in front, space on left, wall on right
  2609. turn_left_stairs_down()
  2610. elif current_map[y+1][x] == 1:
  2611. # Downstairs in front, space on left, space on right
  2612. stairs_down_t_intersection()
  2613. elif current_map[y+1][x] == 2:
  2614. # Downstairs in front, space on left, stairs on right
  2615. stairs_down_t_intersection()
  2616. elif current_map[y+1][x] == 3:
  2617. # Downstairs in front, space on left, door on right
  2618. turn_left_stairs_down_door_right()
  2619. elif current_map[y+1][x] == 4:
  2620. # Downstairs in front, space on left, stairs on right
  2621. stairs_down_t_intersection()
  2622. elif current_map[y-1][x] == 2:
  2623. if current_map[y+1][x] == 0:
  2624. # Downstairs in front, stairs on left, wall on right
  2625. turn_left_stairs_down()
  2626. elif current_map[y+1][x] == 1:
  2627. # Downstairs in front, stairs on left, space on right
  2628. stairs_down_t_intersection()
  2629. elif current_map[y+1][x] == 2:
  2630. # Downstairs in front, stairs on left, stairs on right
  2631. stairs_down_t_intersection()
  2632. elif current_map[y+1][x] == 3:
  2633. # Downstairs in front, stairs on left, door on right
  2634. turn_left_stairs_down_door_right()
  2635. elif current_map[y+1][x] == 4:
  2636. # Downstairs in front, stairs on left, stairs on right
  2637. stairs_down_t_intersection()
  2638. elif current_map[y-1][x] == 3:
  2639. if current_map[y+1][x] == 0:
  2640. # Downstairs in front, door on left, wall on right
  2641. stairs_down_door_left()
  2642. elif current_map[y+1][x] == 1:
  2643. # Downstairs in front, door on left, space on right
  2644. turn_right_stairs_down_door_left()
  2645. elif current_map[y+1][x] == 2:
  2646. # Downstairs in front, door on left, stairs on right
  2647. turn_right_stairs_down_door_left()
  2648. elif current_map[y+1][x] == 3:
  2649. # Downstairs in front, door on left, door on right
  2650. stairs_down_door_left_right()
  2651. elif current_map[y+1][x] == 4:
  2652. # Downstairs in front, door on left, stairs on right
  2653. turn_right_stairs_down_door_left()
  2654. elif current_map[y-1][x] == 4:
  2655. if current_map[y+1][x] == 0:
  2656. # Downstairs in front, stairs on left, wall on right
  2657. turn_left_stairs_down()
  2658. elif current_map[y+1][x] == 1:
  2659. # Downstairs in front, stairs on left, space on right
  2660. stairs_down_t_intersection()
  2661. elif current_map[y+1][x] == 2:
  2662. # Downstairs in front, stairs on left, stairs on right
  2663. stairs_down_t_intersection()
  2664. elif current_map[y+1][x] == 3:
  2665. # Downstairs in front, stairs on left, door on right
  2666. turn_left_stairs_down_door_right()
  2667. elif current_map[y+1][x] == 4:
  2668. # Downstairs in front, stairs on left, stairs on right
  2669. stairs_down_t_intersection()
  2670. while current_face == 'North':
  2671. y = current_position[0]
  2672. x = current_position[1]
  2673. if current_map[y-1][x] == 0:
  2674. if current_map[y][x-1] == 0:
  2675. if current_map[y][x+1] == 0:
  2676. # Wall in front, left, and right
  2677. dead_end()
  2678. elif current_map[y][x+1] == 1:
  2679. # Wall in front and left, space on right
  2680. turn_right()
  2681. elif current_map[y][x+1] == 2:
  2682. # Wall in front and left, stairs on right
  2683. turn_right()
  2684. elif current_map[y][x+1] == 3:
  2685. # Wall in front and left, door on right
  2686. door_right()
  2687. elif current_map[y][x+1] == 4:
  2688. # Wall in front and left, stairs on right
  2689. turn_right()
  2690. elif current_map[y][x-1] == 1:
  2691. if current_map[y][x+1] == 0:
  2692. # Wall in front and right, space on left
  2693. turn_left()
  2694. elif current_map[y][x+1] == 1:
  2695. # Wall in front, space on right and left
  2696. t_intersection()
  2697. elif current_map[y][x+1] == 2:
  2698. # Wall in front, space on left, stairs on right
  2699. t_intersection()
  2700. elif current_map[y][x+1] == 3:
  2701. # Wall in front, space on left, door on right
  2702. turn_left_door_right()
  2703. elif current_map[y][x+1] == 4:
  2704. # Wall in front, space on left, stairs on right
  2705. t_intersection()
  2706. elif current_map[y][x-1] == 2:
  2707. if current_map[y][x+1] == 0:
  2708. # Wall in front and right, stairs on left
  2709. turn_left()
  2710. elif current_map[y][x+1] == 1:
  2711. # Wall in front, space on right, stairs on left
  2712. t_intersection()
  2713. elif current_map[y][x+1] == 2:
  2714. # Wall in front, stairs on right and left
  2715. t_intersection()
  2716. elif current_map[y][x+1] == 3:
  2717. # Wall in front, stairs on left, door on right
  2718. turn_left_door_right()
  2719. elif current_map[y][x+1] == 4:
  2720. # Wall in front, stairs on left, stairs on right
  2721. t_intersection()
  2722. elif current_map[y][x-1] == 3:
  2723. if current_map[y][x+1] == 0:
  2724. # Wall in front and right, door on left
  2725. door_left()
  2726. elif current_map[y][x+1] == 1:
  2727. # Wall in front, space on right, door on left
  2728. turn_right_door_left()
  2729. elif current_map[y][x+1] == 2:
  2730. # Wall in front, stairs on right, door on left
  2731. turn_right_door_left()
  2732. elif current_map[y][x+1] == 3:
  2733. # Wall in front, door on right and left
  2734. door_right_left()
  2735. elif current_map[y][x+1] == 4:
  2736. # Wall in front, door on left, stairs on right
  2737. turn_right_door_left()
  2738. elif current_map[y][x-1] == 4:
  2739. if current_map[y][x+1] == 0:
  2740. # Wall in front and right, stairs on left
  2741. turn_left()
  2742. elif current_map[y][x+1] == 1:
  2743. # Wall in front, space on right, stairs on left
  2744. t_intersection()
  2745. elif current_map[y][x+1] == 2:
  2746. # Wall in front, stairs on right, stairs on left
  2747. t_intersection()
  2748. elif current_map[y][x+1] == 3:
  2749. # Wall in front, door on right, stairs on left
  2750. turn_left_door_right()
  2751. elif current_map[y][x+1] == 4:
  2752. # Wall in front, stairs on left, stairs on right
  2753. t_intersection()
  2754. elif current_map[y-1][x] == 1:
  2755. if current_map[y][x-1] == 0:
  2756. if current_map[y][x+1] == 0:
  2757. # Space in front, wall on left and right
  2758. corridor()
  2759. elif current_map[y][x+1] == 1:
  2760. # Space in front and right, wall on left
  2761. wall_left()
  2762. elif current_map[y][x+1] == 2:
  2763. # Space in front, wall on left, stairs on right
  2764. wall_left()
  2765. elif current_map[y][x+1] == 3:
  2766. # Space in front, wall on left, door on right
  2767. corridor_door_right()
  2768. elif current_map[y][x+1] == 4:
  2769. # Space in front, wall on left, stairs on right
  2770. wall_left()
  2771. elif current_map[y][x-1] == 1:
  2772. if current_map[y][x+1] == 0:
  2773. # Space in front and left, wall on right
  2774. wall_right()
  2775. elif current_map[y][x+1] == 1:
  2776. # Space in front and left and right
  2777. middle()
  2778. elif current_map[y][x+1] == 2:
  2779. # Space in front and left, stairs on right
  2780. middle()
  2781. elif current_map[y][x+1] == 3:
  2782. # Space in front and left, door on right
  2783. wall_right_door()
  2784. elif current_map[y][x+1] == 4:
  2785. # Space in front and left, stairs on right
  2786. middle()
  2787. elif current_map[y][x-1] == 2:
  2788. if current_map[y][x+1] == 0:
  2789. # Space in front, stairs on left, wall on right
  2790. wall_right()
  2791. elif current_map[y][x+1] == 1:
  2792. # Space in front, stairs on left, space on right
  2793. middle()
  2794. elif current_map[y][x+1] == 2:
  2795. # Space in front, stairs on left, stairs on right
  2796. middle()
  2797. elif current_map[y][x+1] == 3:
  2798. # Space in front, stairs on left, door on right
  2799. wall_right_door()
  2800. elif current_map[y][x+1] == 4:
  2801. # Space in front, stairs on left, stairs on right
  2802. middle()
  2803. elif current_map[y][x-1] == 3:
  2804. if current_map[y][x+1] == 0:
  2805. # Space in front, door on left, wall on right
  2806. corridor_door_left()
  2807. elif current_map[y][x+1] == 1:
  2808. # Space in front and right, door on left
  2809. wall_left_door()
  2810. elif current_map[y][x+1] == 2:
  2811. # Space in front, door on left, stairs on right
  2812. wall_left_door()
  2813. elif current_map[y][x+1] == 3:
  2814. # Space in front, door on left, door on right
  2815. corridor_door_left_right()
  2816. elif current_map[y][x+1] == 4:
  2817. # Space in front, door on left, stairs on right
  2818. wall_left_door()
  2819. elif current_map[y][x-1] == 4:
  2820. if current_map[y][x+1] == 0:
  2821. # Space in front, stairs on left, wall on right
  2822. wall_right()
  2823. elif current_map[y][x+1] == 1:
  2824. # Space in front and right, stairs on left
  2825. middle()
  2826. elif current_map[y][x+1] == 2:
  2827. # Space in front, stairs on left, stairs on right
  2828. middle()
  2829. elif current_map[y][x+1] == 3:
  2830. # Space in front, stairs on left, door on right
  2831. wall_right_door()
  2832. elif current_map[y][x+1] == 4:
  2833. # Space in front, stairs on left, stairs on right
  2834. middle()
  2835. elif current_map[y-1][x] == 2:
  2836. if current_map[y][x-1] == 0:
  2837. if current_map[y][x+1] == 0:
  2838. # Stairs in front, wall on left and right
  2839. stairs_front()
  2840. elif current_map[y][x+1] == 1:
  2841. # Stairs in front, wall on left, space on right
  2842. turn_right_stairs()
  2843. elif current_map[y][x+1] == 2:
  2844. # Stairs in front, wall on left, stairs on right
  2845. turn_right_stairs()
  2846. elif current_map[y][x+1] == 3:
  2847. # Stairs in front, wall on left, door on right
  2848. stairs_front_door_right()
  2849. elif current_map[y][x+1] == 4:
  2850. # Stairs in front, wall on left, stairs on right
  2851. turn_right_stairs()
  2852. elif current_map[y][x-1] == 1:
  2853. if current_map[y][x+1] == 0:
  2854. # Stairs in front, space on left, wall on right
  2855. turn_left_stairs()
  2856. elif current_map[y][x+1] == 1:
  2857. # Stairs in front, space on left, space on right
  2858. stairs_t_intersection()
  2859. elif current_map[y][x+1] == 2:
  2860. # Stairs in front, space on left, stairs on right
  2861. stairs_t_intersection()
  2862. elif current_map[y][x+1] == 3:
  2863. # Stairs in front, space on left, door on right
  2864. turn_left_stairs_door_right()
  2865. elif current_map[y][x+1] == 4:
  2866. # Stairs in front, space on left, stairs on right
  2867. stairs_t_intersection()
  2868. elif current_map[y][x-1] == 2:
  2869. if current_map[y][x+1] == 0:
  2870. # Stairs in front, stairs on left, wall on right
  2871. turn_left_stairs()
  2872. elif current_map[y][x+1] == 1:
  2873. # Stairs in front, stairs on left, space on right
  2874. stairs_t_intersection()
  2875. elif current_map[y][x+1] == 2:
  2876. # Stairs in front, stairs on left, stairs on right
  2877. stairs_t_intersection()
  2878. elif current_map[y][x+1] == 3:
  2879. # Stairs in front, stairs on left, door on right
  2880. turn_left_stairs_door_right()
  2881. elif current_map[y][x+1] == 4:
  2882. # Stairs in front, stairs on left, stairs on right
  2883. stairs_t_intersection()
  2884. elif current_map[y][x-1] == 3:
  2885. if current_map[y][x+1] == 0:
  2886. # Stairs in front, door on left, wall on right
  2887. stairs_front_door_left()
  2888. elif current_map[y][x+1] == 1:
  2889. # Stairs in front, door on left, space on right
  2890. turn_right_stairs_door_left()
  2891. elif current_map[y][x+1] == 2:
  2892. # Stairs in front, door on left, stairs on right
  2893. turn_right_stairs_door_left()
  2894. elif current_map[y][x+1] == 3:
  2895. # Stairs in front, door on left, door on right
  2896. stairs_front_door_left_right()
  2897. elif current_map[y][x+1] == 4:
  2898. # Stairs in front, door on left, stairs on right
  2899. turn_right_stairs_door_left()
  2900. elif current_map[y][x-1] == 4:
  2901. if current_map[y][x+1] == 0:
  2902. # Stairs in front, stairs on left, wall on right
  2903. turn_left_stairs()
  2904. elif current_map[y][x+1] == 1:
  2905. # Stairs in front, stairs on left, space on right
  2906. stairs_t_intersection()
  2907. elif current_map[y][x+1] == 2:
  2908. # Stairs in front, stairs on left, stairs on right
  2909. stairs_t_intersection()
  2910. elif current_map[y][x+1] == 3:
  2911. # Stairs in front, stairs on left, door on right
  2912. turn_left_stairs_door_right()
  2913. elif current_map[y][x+1] == 4:
  2914. # Stairs in front, stairs on left, stairs on right
  2915. stairs_t_intersection()
  2916. elif current_map[y-1][x] == 3:
  2917. if current_map[y][x-1] == 0:
  2918. if current_map[y][x+1] == 0:
  2919. # Door in front, wall on right, wall on left
  2920. door_front()
  2921. elif current_map[y][x+1] == 1:
  2922. # Door in front, wall on left, space on right
  2923. turn_right_door_front()
  2924. elif current_map[y][x+1] == 2:
  2925. # Door in front, wall on left, stairs on right
  2926. turn_right_door_front()
  2927. elif current_map[y][x+1] == 3:
  2928. # Door in front, wall on left, door on right
  2929. door_front_right()
  2930. elif current_map[y][x+1] == 4:
  2931. # Door in front, wall on left, stairs on right
  2932. turn_right_door_front()
  2933. elif current_map[y][x-1] == 1:
  2934. if current_map[y][x+1] == 0:
  2935. # Door in front, space on left, wall on right
  2936. turn_left_door_front()
  2937. elif current_map[y][x+1] == 1:
  2938. # Door in front, space on left, space on right
  2939. door_t_intersection()
  2940. elif current_map[y][x+1] == 2:
  2941. # Door in front, space on left, stairs on right
  2942. door_t_intersection()
  2943. elif current_map[y][x+1] == 3:
  2944. # Door in front, space on left, door on right
  2945. turn_left_door_front_right()
  2946. elif current_map[y][x+1] == 4:
  2947. # Door in front, space on left, stairs on right
  2948. door_t_intersection()
  2949. elif current_map[y][x-1] == 2:
  2950. if current_map[y][x+1] == 0:
  2951. # Door in front, stairs on left, wall on right
  2952. turn_left_door_front()
  2953. elif current_map[y][x+1] == 1:
  2954. # Door in front, stairs on left, space on right
  2955. door_t_intersection()
  2956. elif current_map[y][x+1] == 2:
  2957. # Door in front, stairs on left, stairs on right
  2958. door_t_intersection()
  2959. elif current_map[y][x+1] == 3:
  2960. # Door in front, stairs on left, door on right
  2961. turn_left_door_front_right()
  2962. elif current_map[y][x+1] == 4:
  2963. # Door in front, stairs on left, stairs on right
  2964. door_t_intersection()
  2965. elif current_map[y][x-1] == 3:
  2966. if current_map[y][x+1] == 0:
  2967. # Door in front, door on left, wall on right
  2968. door_front_left()
  2969. elif current_map[y][x+1] == 1:
  2970. # Door in front, door on left, space on right
  2971. turn_right_door_front_left()
  2972. elif current_map[y][x+1] == 2:
  2973. # Door in front, door on left, stairs on right
  2974. turn_right_door_front_left()
  2975. elif current_map[y][x+1] == 3:
  2976. # Door in front, door on left, door on right
  2977. door_front_left_right()
  2978. elif current_map[y][x+1] == 4:
  2979. # Door in front, door on left, stairs on right
  2980. turn_right_door_front_left()
  2981. elif current_map[y][x-1] == 4:
  2982. if current_map[y][x+1] == 0:
  2983. # Door in front, stairs on left, wall on right
  2984. turn_left_door_front()
  2985. elif current_map[y][x+1] == 1:
  2986. # Door in front, stairs on left, space on right
  2987. door_t_intersection()
  2988. elif current_map[y][x+1] == 2:
  2989. # Door in front, stairs on left, stairs on right
  2990. door_t_intersection()
  2991. elif current_map[y][x+1] == 3:
  2992. # Door in front, stairs on left, door on right
  2993. turn_left_door_front_right()
  2994. elif current_map[y][x+1] == 4:
  2995. # Door in front, stairs on left, stairs on right
  2996. door_t_intersection()
  2997. elif current_map[y-1][x] == 4:
  2998. if current_map[y][x-1] == 0:
  2999. if current_map[y][x+1] == 0:
  3000. # Downstairs in front, wall on right, wall on left
  3001. stairs_down()
  3002. elif current_map[y][x+1] == 1:
  3003. # Downstairs in front, wall on left, space on right
  3004. turn_right_stairs_down()
  3005. elif current_map[y][x+1] == 2:
  3006. # Downstairs in front, wall on left, stairs on right
  3007. turn_right_stairs_down()
  3008. elif current_map[y][x+1] == 3:
  3009. # Downstairs in front, wall on left, door on right
  3010. stairs_down_door_right()
  3011. elif current_map[y][x+1] == 4:
  3012. # Downstairs in front, wall on left, stairs on right
  3013. turn_right_stairs_down()
  3014. elif current_map[y][x-1] == 1:
  3015. if current_map[y][x+1] == 0:
  3016. # Downstairs in front, space on left, wall on right
  3017. turn_left_stairs_down()
  3018. elif current_map[y][x+1] == 1:
  3019. # Downstairs in front, space on left, space on right
  3020. stairs_down_t_intersection()
  3021. elif current_map[y][x+1] == 2:
  3022. # Downstairs in front, space on left, stairs on right
  3023. stairs_down_t_intersection()
  3024. elif current_map[y][x+1] == 3:
  3025. # Downstairs in front, space on left, door on right
  3026. turn_left_stairs_down_door_right()
  3027. elif current_map[y][x+1] == 4:
  3028. # Downstairs in front, space on left, stairs on right
  3029. stairs_down_t_intersection()
  3030. elif current_map[y][x-1] == 2:
  3031. if current_map[y][x+1] == 0:
  3032. # Downstairs in front, stairs on left, wall on right
  3033. turn_left_stairs_down()
  3034. elif current_map[y][x+1] == 1:
  3035. # Downstairs in front, stairs on left, space on right
  3036. stairs_down_t_intersection()
  3037. elif current_map[y][x+1] == 2:
  3038. # Downstairs in front, stairs on left, stairs on right
  3039. stairs_down_t_intersection()
  3040. elif current_map[y][x+1] == 3:
  3041. # Downstairs in front, stairs on left, door on right
  3042. turn_left_stairs_down_door_right()
  3043. elif current_map[y][x+1] == 4:
  3044. # Downstairs in front, stairs on left, stairs on right
  3045. stairs_down_t_intersection()
  3046. elif current_map[y][x-1] == 3:
  3047. if current_map[y][x+1] == 0:
  3048. # Downstairs in front, door on left, wall on right
  3049. stairs_down_door_left()
  3050. elif current_map[y][x+1] == 1:
  3051. # Downstairs in front, door on left, space on right
  3052. turn_right_stairs_down_door_left()
  3053. elif current_map[y][x+1] == 2:
  3054. # Downstairs in front, door on left, stairs on right
  3055. turn_right_stairs_down_door_left()
  3056. elif current_map[y][x+1] == 3:
  3057. # Downstairs in front, door on left, door on right
  3058. stairs_down_door_left_right()
  3059. elif current_map[y][x+1] == 4:
  3060. # Downstairs in front, door on left, stairs on right
  3061. turn_right_stairs_down_door_left()
  3062. elif current_map[y][x-1] == 4:
  3063. if current_map[y][x+1] == 0:
  3064. # Downstairs in front, stairs on left, wall on right
  3065. turn_left_stairs_down()
  3066. elif current_map[y][x+1] == 1:
  3067. # Downstairs in front, stairs on left, space on right
  3068. stairs_down_t_intersection()
  3069. elif current_map[y][x+1] == 2:
  3070. # Downstairs in front, stairs on left, stairs on right
  3071. stairs_down_t_intersection()
  3072. elif current_map[y][x+1] == 3:
  3073. # Downstairs in front, stairs on left, door on right
  3074. turn_left_stairs_down_door_right()
  3075. elif current_map[y][x+1] == 4:
  3076. # Downstairs in front, stairs on left, stairs on right
  3077. stairs_down_t_intersection()
  3078.  
  3079.  
  3080. def door_front_left_right():
  3081. global current_face
  3082. door_front_right_loop = 'true'
  3083. while door_front_right_loop == 'true':
  3084. alpha = face.index(current_face)
  3085. clear_screen()
  3086. time.sleep(0.01)
  3087. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  3088. ³±±±±±±±± ±±±±±±±³ ³
  3089. ³±±±±±±±±± ±±±±±±±±³ 1: INVENTORY ³
  3090. ³±±±±°°±±±±°±±±±±±±±±±±±°±±±±°°±±±³ 2: SEARCH ³
  3091. ³±±±±° °±±±°±±±±±±±±±±±±°±±±° °±±±³ 3: SAVE ³
  3092. ³±±±±° °±±°±±±±±±±±±±±±°±±° °±±±³ ³
  3093. ³±±±±° °±±°±±°°°°°°°°±±°±±° °±±±³ ³
  3094. ³±±±±° °±±°±±° °±±°±±° °±±±³ ³
  3095. ³±±±±° °±±°±±° °±±°±±° °±±±³ ³
  3096. ³±±±±° °±±°±±° °±±°±±° °±±±³ (Type CANCEL to cancel a command) ³
  3097. ³±±±±° °±±°±±° °±±°±±° °±±±³ ³
  3098. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  3099. party_print()
  3100. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  3101. status()
  3102. command = msvcrt.getch()
  3103. if command in [b'w',b'W']:
  3104. open_door()
  3105. return
  3106. elif command in [b'a',b'A']:
  3107. try:
  3108. current_face = face[alpha - 1]
  3109. except:
  3110. current_face = face[alpha + 4]
  3111. return
  3112. elif command in [b'd',b'D']:
  3113. try:
  3114. current_face = face[alpha + 1]
  3115. except:
  3116. current_face = face[alpha - 3]
  3117. return
  3118. elif command == b'1':
  3119. view_items_noncombat()
  3120. elif command == b'2':
  3121. search()
  3122. elif command == b'3':
  3123. save_game()
  3124.  
  3125. def turn_right_door_front_left():
  3126. global current_face
  3127. turn_right_door_front_left_loop = 'true'
  3128. while turn_right_door_front_left_loop == 'true':
  3129. alpha = face.index(current_face)
  3130. clear_screen()
  3131. time.sleep(0.01)
  3132. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  3133. ³±±±±±±±± ³ ³
  3134. ³±±±±±±±±± ³ 1: INVENTORY ³
  3135. ³±±±±°°±±±±°±±±±±±±±±±±±±±±±±±±±±±³ 2: SEARCH ³
  3136. ³±±±±° °±±±°±±±±±±±±±±±±±±±±±±±±±±³ 3: SAVE ³
  3137. ³±±±±° °±±°±±±±±±±±±±±±±±±±±±±±±±³ ³
  3138. ³±±±±° °±±°±±°°°°°°°°±±±±±±±±±±±±³ ³
  3139. ³±±±±° °±±°±±° °±±±±±±±±±±±±³ ³
  3140. ³±±±±° °±±°±±° °±±±±±±±±±±±±³ ³
  3141. ³±±±±° °±±°±±° °±±±±±±±±±±±±³ (Type CANCEL to cancel a command) ³
  3142. ³±±±±° °±±°±±° °±±±±±±±±±±±±³ ³
  3143. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  3144. party_print()
  3145. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  3146. status()
  3147. command = msvcrt.getch()
  3148. if command in [b'w',b'W']:
  3149. open_door()
  3150. return
  3151. elif command in [b'a',b'A']:
  3152. try:
  3153. current_face = face[alpha - 1]
  3154. except:
  3155. current_face = face[alpha + 4]
  3156. return
  3157. elif command in [b'd',b'D']:
  3158. try:
  3159. current_face = face[alpha + 1]
  3160. except:
  3161. current_face = face[alpha - 3]
  3162. return
  3163. elif command == b'1':
  3164. view_items_noncombat()
  3165. elif command == b'2':
  3166. search()
  3167. elif command == b'3':
  3168. save_game()
  3169.  
  3170. def door_front_left():
  3171. global current_face
  3172. door_front_left_loop = 'true'
  3173. while door_front_left_loop == 'true':
  3174. alpha = face.index(current_face)
  3175. clear_screen()
  3176. time.sleep(0.01)
  3177. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  3178. ³±±±±±±±± ±±±±±±±³ ³
  3179. ³±±±±±±±±± ±±±±±±±±³ 1: INVENTORY ³
  3180. ³±±±±°°±±±±°±±±±±±±±±±±±°±±±±±±±±±³ 2: SEARCH ³
  3181. ³±±±±° °±±±°±±±±±±±±±±±±°±±±±±±±±±³ 3: SAVE ³
  3182. ³±±±±° °±±°±±±±±±±±±±±±°±±±±±±±±±³ ³
  3183. ³±±±±° °±±°±±°°°°°°°°±±°±±±±±±±±±³ ³
  3184. ³±±±±° °±±°±±° °±±°±±±±±±±±±³ ³
  3185. ³±±±±° °±±°±±° °±±°±±±±±±±±±³ ³
  3186. ³±±±±° °±±°±±° °±±°±±±±±±±±±³ (Type CANCEL to cancel a command) ³
  3187. ³±±±±° °±±°±±° °±±°±±±±±±±±±³ ³
  3188. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  3189. party_print()
  3190. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  3191. status()
  3192. command = msvcrt.getch()
  3193. if command in [b'w',b'W']:
  3194. open_door()
  3195. return
  3196. elif command in [b'a',b'A']:
  3197. try:
  3198. current_face = face[alpha - 1]
  3199. except:
  3200. current_face = face[alpha + 4]
  3201. return
  3202. elif command in [b'd',b'D']:
  3203. try:
  3204. current_face = face[alpha + 1]
  3205. except:
  3206. current_face = face[alpha - 3]
  3207. return
  3208. elif command == b'1':
  3209. view_items_noncombat()
  3210. elif command == b'2':
  3211. search()
  3212. elif command == b'3':
  3213. save_game()
  3214.  
  3215. def turn_left_door_front():
  3216. global current_face
  3217. turn_left_door_front_loop = 'true'
  3218. while turn_left_door_front_loop == 'true':
  3219. alpha = face.index(current_face)
  3220. clear_screen()
  3221. time.sleep(0.01)
  3222. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  3223. ³ ±±±±±±±³ ³
  3224. ³ ±±±±±±±±³ 1: INVENTORY ³
  3225. ³±±±±±±±±±±±±±±±±±±±±±±±°±±±±±±±±±³ 2: SEARCH ³
  3226. ³±±±±±±±±±±±±±±±±±±±±±±±°±±±±±±±±±³ 3: SAVE ³
  3227. ³±±±±±±±±±±±±±±±±±±±±±±±°±±±±±±±±±³ ³
  3228. ³±±±±±±±±±±±±±°°°°°°°°±±°±±±±±±±±±³ ³
  3229. ³±±±±±±±±±±±±±° °±±°±±±±±±±±±³ ³
  3230. ³±±±±±±±±±±±±±° °±±°±±±±±±±±±³ ³
  3231. ³±±±±±±±±±±±±±° °±±°±±±±±±±±±³ (Type CANCEL to cancel a command) ³
  3232. ³±±±±±±±±±±±±±° °±±°±±±±±±±±±³ ³
  3233. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  3234. party_print()
  3235. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  3236. status()
  3237. command = msvcrt.getch()
  3238. if command in [b'w',b'W']:
  3239. open_door()
  3240. return
  3241. elif command in [b'a',b'A']:
  3242. try:
  3243. current_face = face[alpha - 1]
  3244. except:
  3245. current_face = face[alpha + 4]
  3246. return
  3247. elif command in [b'd',b'D']:
  3248. try:
  3249. current_face = face[alpha + 1]
  3250. except:
  3251. current_face = face[alpha - 3]
  3252. return
  3253. elif command == b'1':
  3254. view_items_noncombat()
  3255. elif command == b'2':
  3256. search()
  3257. elif command == b'3':
  3258. save_game()
  3259.  
  3260. def turn_left_door_front_right():
  3261. global current_face
  3262. turn_left_door_front_right_loop = 'true'
  3263. while turn_left_door_front_right_loop == 'true':
  3264. alpha = face.index(current_face)
  3265. clear_screen()
  3266. time.sleep(0.01)
  3267. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  3268. ³ ±±±±±±±³ ³
  3269. ³ ±±±±±±±±³ 1: INVENTORY ³
  3270. ³±±±±±±±±±±±±±±±±±±±±±±±°±±±±°°±±±³ 2: SEARCH ³
  3271. ³±±±±±±±±±±±±±±±±±±±±±±±°±±±° °±±±³ 3: SAVE ³
  3272. ³±±±±±±±±±±±±±±±±±±±±±±±°±±° °±±±³ ³
  3273. ³±±±±±±±±±±±±±°°°°°°°°±±°±±° °±±±³ ³
  3274. ³±±±±±±±±±±±±±° °±±°±±° °±±±³ ³
  3275. ³±±±±±±±±±±±±±° °±±°±±° °±±±³ ³
  3276. ³±±±±±±±±±±±±±° °±±°±±° °±±±³ (Type CANCEL to cancel a command) ³
  3277. ³±±±±±±±±±±±±±° °±±°±±° °±±±³ ³
  3278. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  3279. party_print()
  3280. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  3281. status()
  3282. command = msvcrt.getch()
  3283. if command in [b'w',b'W']:
  3284. open_door()
  3285. return
  3286. elif command in [b'a',b'A']:
  3287. try:
  3288. current_face = face[alpha - 1]
  3289. except:
  3290. current_face = face[alpha + 4]
  3291. return
  3292. elif command in [b'd',b'D']:
  3293. try:
  3294. current_face = face[alpha + 1]
  3295. except:
  3296. current_face = face[alpha - 3]
  3297. return
  3298. elif command == b'1':
  3299. view_items_noncombat()
  3300. elif command == b'2':
  3301. search()
  3302. elif command == b'3':
  3303. save_game()
  3304.  
  3305. def door_t_intersection():
  3306. global current_face
  3307. door_t_intersection_loop = 'true'
  3308. while door_t_intersection_loop == 'true':
  3309. alpha = face.index(current_face)
  3310. clear_screen()
  3311. time.sleep(0.01)
  3312. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  3313. ³ ³ ³
  3314. ³ ³ 1: INVENTORY ³
  3315. ³±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±³ 2: SEARCH ³
  3316. ³±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±³ 3: SAVE ³
  3317. ³±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±³ ³
  3318. ³±±±±±±±±±±±±±°°°°°°°°±±±±±±±±±±±±³ ³
  3319. ³±±±±±±±±±±±±±° °±±±±±±±±±±±±³ ³
  3320. ³±±±±±±±±±±±±±° °±±±±±±±±±±±±³ ³
  3321. ³±±±±±±±±±±±±±° °±±±±±±±±±±±±³ (Type CANCEL to cancel a command) ³
  3322. ³±±±±±±±±±±±±±° °±±±±±±±±±±±±³ ³
  3323. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  3324. party_print()
  3325. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  3326. status()
  3327. command = msvcrt.getch()
  3328. if command in [b'w',b'W']:
  3329. open_door()
  3330. return
  3331. elif command in [b'a',b'A']:
  3332. try:
  3333. current_face = face[alpha - 1]
  3334. except:
  3335. current_face = face[alpha + 4]
  3336. return
  3337. elif command in [b'd',b'D']:
  3338. try:
  3339. current_face = face[alpha + 1]
  3340. except:
  3341. current_face = face[alpha - 3]
  3342. return
  3343. elif command == b'1':
  3344. view_items_noncombat()
  3345. elif command == b'2':
  3346. search()
  3347. elif command == b'3':
  3348. save_game()
  3349.  
  3350. def door_front_right():
  3351. global current_face
  3352. door_front_right_loop = 'true'
  3353. while door_front_right_loop == 'true':
  3354. alpha = face.index(current_face)
  3355. clear_screen()
  3356. time.sleep(0.01)
  3357. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  3358. ³±±±±±±±± ±±±±±±±³ ³
  3359. ³±±±±±±±±± ±±±±±±±±³ 1: INVENTORY ³
  3360. ³±±±±±±±±±±°±±±±±±±±±±±±°±±±±°°±±±³ 2: SEARCH ³
  3361. ³±±±±±±±±±±°±±±±±±±±±±±±°±±±° °±±±³ 3: SAVE ³
  3362. ³±±±±±±±±±±°±±±±±±±±±±±±°±±° °±±±³ ³
  3363. ³±±±±±±±±±±°±±°°°°°°°°±±°±±° °±±±³ ³
  3364. ³±±±±±±±±±±°±±° °±±°±±° °±±±³ ³
  3365. ³±±±±±±±±±±°±±° °±±°±±° °±±±³ ³
  3366. ³±±±±±±±±±±°±±° °±±°±±° °±±±³ (Type CANCEL to cancel a command) ³
  3367. ³±±±±±±±±±±°±±° °±±°±±° °±±±³ ³
  3368. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  3369. party_print()
  3370. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  3371. status()
  3372. command = msvcrt.getch()
  3373. if command in [b'w',b'W']:
  3374. open_door()
  3375. return
  3376. elif command in [b'a',b'A']:
  3377. try:
  3378. current_face = face[alpha - 1]
  3379. except:
  3380. current_face = face[alpha + 4]
  3381. return
  3382. elif command in [b'd',b'D']:
  3383. try:
  3384. current_face = face[alpha + 1]
  3385. except:
  3386. current_face = face[alpha - 3]
  3387. return
  3388. elif command == b'1':
  3389. view_items_noncombat()
  3390. elif command == b'2':
  3391. search()
  3392. elif command == b'3':
  3393. save_game()
  3394.  
  3395. def turn_right_door_front():
  3396. global current_face
  3397. turn_right_door_front_loop = 'true'
  3398. while turn_right_door_front_loop == 'true':
  3399. alpha = face.index(current_face)
  3400. clear_screen()
  3401. time.sleep(0.01)
  3402. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  3403. ³±±±±±±±± ³ ³
  3404. ³±±±±±±±±± ³ 1: INVENTORY ³
  3405. ³±±±±±±±±±±°±±±±±±±±±±±±±±±±±±±±±±³ 2: SEARCH ³
  3406. ³±±±±±±±±±±°±±±±±±±±±±±±±±±±±±±±±±³ 3: SAVE ³
  3407. ³±±±±±±±±±±°±±±±±±±±±±±±±±±±±±±±±±³ ³
  3408. ³±±±±±±±±±±°±±°°°°°°°°±±±±±±±±±±±±³ ³
  3409. ³±±±±±±±±±±°±±° °±±±±±±±±±±±±³ ³
  3410. ³±±±±±±±±±±°±±° °±±±±±±±±±±±±³ ³
  3411. ³±±±±±±±±±±°±±° °±±±±±±±±±±±±³ (Type CANCEL to cancel a command) ³
  3412. ³±±±±±±±±±±°±±° °±±±±±±±±±±±±³ ³
  3413. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  3414. party_print()
  3415. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  3416. status()
  3417. command = msvcrt.getch()
  3418. if command in [b'w',b'W']:
  3419. open_door()
  3420. return
  3421. elif command in [b'a',b'A']:
  3422. try:
  3423. current_face = face[alpha - 1]
  3424. except:
  3425. current_face = face[alpha + 4]
  3426. return
  3427. elif command in [b'd',b'D']:
  3428. try:
  3429. current_face = face[alpha + 1]
  3430. except:
  3431. current_face = face[alpha - 3]
  3432. return
  3433. elif command == b'1':
  3434. view_items_noncombat()
  3435. elif command == b'2':
  3436. search()
  3437. elif command == b'3':
  3438. save_game()
  3439.  
  3440. def door_front():
  3441. global current_face
  3442. door_front_loop = 'true'
  3443. while door_front_loop == 'true':
  3444. alpha = face.index(current_face)
  3445. clear_screen()
  3446. time.sleep(0.01)
  3447. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  3448. ³±±±±±±±± ±±±±±±±³ ³
  3449. ³±±±±±±±±± ±±±±±±±±³ 1: INVENTORY ³
  3450. ³±±±±±±±±±±°±±±±±±±±±±±±°±±±±±±±±±³ 2: SEARCH ³
  3451. ³±±±±±±±±±±°±±±±±±±±±±±±°±±±±±±±±±³ 3: SAVE ³
  3452. ³±±±±±±±±±±°±±±±±±±±±±±±°±±±±±±±±±³ ³
  3453. ³±±±±±±±±±±°±±°°°°°°°°±±°±±±±±±±±±³ ³
  3454. ³±±±±±±±±±±°±±° °±±°±±±±±±±±±³ ³
  3455. ³±±±±±±±±±±°±±° °±±°±±±±±±±±±³ ³
  3456. ³±±±±±±±±±±°±±° °±±°±±±±±±±±±³ (Type CANCEL to cancel a command) ³
  3457. ³±±±±±±±±±±°±±° °±±°±±±±±±±±±³ ³
  3458. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  3459. party_print()
  3460. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  3461. status()
  3462. command = msvcrt.getch()
  3463. if command in [b'w',b'W']:
  3464. open_door()
  3465. return
  3466. elif command in [b'a',b'A']:
  3467. try:
  3468. current_face = face[alpha - 1]
  3469. except:
  3470. current_face = face[alpha + 4]
  3471. return
  3472. elif command in [b'd',b'D']:
  3473. try:
  3474. current_face = face[alpha + 1]
  3475. except:
  3476. current_face = face[alpha - 3]
  3477. return
  3478. elif command == b'1':
  3479. view_items_noncombat()
  3480. elif command == b'2':
  3481. search()
  3482. elif command == b'3':
  3483. save_game()
  3484.  
  3485. def stairs_down_door_left_right():
  3486. global current_face
  3487. stairs_down_door_left_right_loop = 'true'
  3488. while stairs_front_door_left_right_loop == 'true':
  3489. alpha = face.index(current_face)
  3490. clear_screen()
  3491. time.sleep(0.01)
  3492. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  3493. ³±±±±±±±± ±±±±±±±³ ³
  3494. ³±±±±±±±±± ±±±±±±±±³ 1: INVENTORY ³
  3495. ³±±±±°°±±±±°±±±±±±±±±±±±°±±±±°°±±±³ 2: SEARCH ³
  3496. ³±±±±° °±±±°±±±±±±±±±±±±°±±±° °±±±³ 3: SAVE ³
  3497. ³±±±±° °±±°±±±±±±±±±±±±°±±° °±±±³ ³
  3498. ³±±±±° °±±°±±±³±±±±³±±±°±±° °±±±³ ³
  3499. ³±±±±° °±±°±±±ÃÄÄÄÄ´±±±°±±° °±±±³ ³
  3500. ³±±±±° °±±°±±±³±±±±³±±±°±±° °±±±³ ³
  3501. ³±±±±° °±±°±±±ÃÄÄÄÄ´±±±°±±° °±±±³ (Type CANCEL to cancel a command) ³
  3502. ³±±±±° °±±°±±±³±±±±³±±±°±±° °±±±³ ³
  3503. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  3504. party_print()
  3505. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  3506. status()
  3507. command = msvcrt.getch()
  3508. if command in [b'w',b'W']:
  3509. descend_floors()
  3510. return
  3511. elif command in [b'a',b'A']:
  3512. try:
  3513. current_face = face[alpha - 1]
  3514. except:
  3515. current_face = face[alpha + 4]
  3516. return
  3517. elif command in [b'd',b'D']:
  3518. try:
  3519. current_face = face[alpha + 1]
  3520. except:
  3521. current_face = face[alpha - 3]
  3522. return
  3523. elif command == b'1':
  3524. view_items_noncombat()
  3525. elif command == b'2':
  3526. search()
  3527. elif command == b'3':
  3528. save_game()
  3529.  
  3530. def turn_right_stairs_down_door_left():
  3531. global current_face
  3532. turn_right_stairs_down_door_left_loop = 'true'
  3533. while turn_right_stairs_down_door_left_loop == 'true':
  3534. alpha = face.index(current_face)
  3535. clear_screen()
  3536. time.sleep(0.01)
  3537. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  3538. ³±±±±±±±± ³ ³
  3539. ³±±±±±±±±± ³ 1: INVENTORY ³
  3540. ³±±±±°°±±±±°±±±±±±±±±±±±±±±±±±±±±±³ 2: SEARCH ³
  3541. ³±±±±° °±±±°±±±±±±±±±±±±±±±±±±±±±±³ 3: SAVE ³
  3542. ³±±±±° °±±°±±±±±±±±±±±±±±±±±±±±±±³ ³
  3543. ³±±±±° °±±°±±±³±±±±³±±±±±±±±±±±±±³ ³
  3544. ³±±±±° °±±°±±±ÃÄÄÄÄ´±±±±±±±±±±±±±³ ³
  3545. ³±±±±° °±±°±±±³±±±±³±±±±±±±±±±±±±³ ³
  3546. ³±±±±° °±±°±±±ÃÄÄÄÄ´±±±±±±±±±±±±±³ (Type CANCEL to cancel a command) ³
  3547. ³±±±±° °±±°±±±³±±±±³±±±±±±±±±±±±±³ ³
  3548. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  3549. party_print()
  3550. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  3551. status()
  3552. command = msvcrt.getch()
  3553. if command in [b'w',b'W']:
  3554. descend_floors()
  3555. return
  3556. elif command in [b'a',b'A']:
  3557. try:
  3558. current_face = face[alpha - 1]
  3559. except:
  3560. current_face = face[alpha + 4]
  3561. return
  3562. elif command in [b'd',b'D']:
  3563. try:
  3564. current_face = face[alpha + 1]
  3565. except:
  3566. current_face = face[alpha - 3]
  3567. return
  3568. elif command == b'1':
  3569. view_items_noncombat()
  3570. elif command == b'2':
  3571. search()
  3572. elif command == b'3':
  3573. save_game()
  3574.  
  3575. def turn_left_stairs_down_door_right():
  3576. global current_face
  3577. turn_left_stairs_down_door_right_loop = 'true'
  3578. while turn_left_stairs_down_door_right_loop == 'true':
  3579. alpha = face.index(current_face)
  3580. clear_screen()
  3581. time.sleep(0.01)
  3582. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  3583. ³ ±±±±±±±³ ³
  3584. ³ ±±±±±±±±³ 1: INVENTORY ³
  3585. ³±±±±±±±±±±±±±±±±±±±±±±±°±±±±°°±±±³ 2: SEARCH ³
  3586. ³±±±±±±±±±±±±±±±±±±±±±±±°±±±° °±±±³ 3: SAVE ³
  3587. ³±±±±±±±±±±±±±±±±±±±±±±±°±±° °±±±³ ³
  3588. ³±±±±±±±±±±±±±±³±±±±³±±±°±±° °±±±³ ³
  3589. ³±±±±±±±±±±±±±±ÃÄÄÄÄ´±±±°±±° °±±±³ ³
  3590. ³±±±±±±±±±±±±±±³±±±±³±±±°±±° °±±±³ ³
  3591. ³±±±±±±±±±±±±±±ÃÄÄÄÄ´±±±°±±° °±±±³ (Type CANCEL to cancel a command) ³
  3592. ³±±±±±±±±±±±±±±³±±±±³±±±°±±° °±±±³ ³
  3593. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  3594. party_print()
  3595. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  3596. status()
  3597. command = msvcrt.getch()
  3598. if command in [b'w',b'W']:
  3599. descend_floors()
  3600. return
  3601. elif command in [b'a',b'A']:
  3602. try:
  3603. current_face = face[alpha - 1]
  3604. except:
  3605. current_face = face[alpha + 4]
  3606. return
  3607. elif command in [b'd',b'D']:
  3608. try:
  3609. current_face = face[alpha + 1]
  3610. except:
  3611. current_face = face[alpha - 3]
  3612. return
  3613. elif command == b'1':
  3614. view_items_noncombat()
  3615. elif command == b'2':
  3616. search()
  3617. elif command == b'3':
  3618. save_game()
  3619.  
  3620. def stairs_down_door_left():
  3621. global current_face
  3622. stairs_down_door_left_loop = 'true'
  3623. while stairs_down_door_left_loop == 'true':
  3624. alpha = face.index(current_face)
  3625. clear_screen()
  3626. time.sleep(0.01)
  3627. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  3628. ³±±±±±±±± ±±±±±±±³ ³
  3629. ³±±±±±±±±± ±±±±±±±±³ 1: INVENTORY ³
  3630. ³±±±±°°±±±±°±±±±±±±±±±±±°±±±±±±±±±³ 2: SEARCH ³
  3631. ³±±±±° °±±±°±±±±±±±±±±±±°±±±±±±±±±³ 3: SAVE ³
  3632. ³±±±±° °±±°±±±±±±±±±±±±°±±±±±±±±±³ ³
  3633. ³±±±±° °±±°±±±³±±±±³±±±°±±±±±±±±±³ ³
  3634. ³±±±±° °±±°±±±ÃÄÄÄÄ´±±±°±±±±±±±±±³ ³
  3635. ³±±±±° °±±°±±±³±±±±³±±±°±±±±±±±±±³ ³
  3636. ³±±±±° °±±°±±±ÃÄÄÄÄ´±±±°±±±±±±±±±³ (Type CANCEL to cancel a command) ³
  3637. ³±±±±° °±±°±±±³±±±±³±±±°±±±±±±±±±³ ³
  3638. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  3639. party_print()
  3640. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  3641. status()
  3642. command = msvcrt.getch()
  3643. if command in [b'w',b'W']:
  3644. descend_floors()
  3645. return
  3646. elif command in [b'a',b'A']:
  3647. try:
  3648. current_face = face[alpha - 1]
  3649. except:
  3650. current_face = face[alpha + 4]
  3651. return
  3652. elif command in [b'd',b'D']:
  3653. try:
  3654. current_face = face[alpha + 1]
  3655. except:
  3656. current_face = face[alpha - 3]
  3657. return
  3658. elif command == b'1':
  3659. view_items_noncombat()
  3660. elif command == b'2':
  3661. search()
  3662. elif command == b'3':
  3663. save_game()
  3664.  
  3665. def stairs_down_t_intersection():
  3666. global current_face
  3667. stairs_down_t_loop = 'true'
  3668. while stairs_down_t_loop == 'true':
  3669. alpha = face.index(current_face)
  3670. clear_screen()
  3671. time.sleep(0.01)
  3672. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  3673. ³ ³ ³
  3674. ³ ³ 1: INVENTORY ³
  3675. ³±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±³ 2: SEARCH ³
  3676. ³±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±³ 3: SAVE ³
  3677. ³±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±³ ³
  3678. ³±±±±±±±±±±±±±±³±±±±³±±±±±±±±±±±±±³ ³
  3679. ³±±±±±±±±±±±±±±ÃÄÄÄÄ´±±±±±±±±±±±±±³ ³
  3680. ³±±±±±±±±±±±±±±³±±±±³±±±±±±±±±±±±±³ ³
  3681. ³±±±±±±±±±±±±±±ÃÄÄÄÄ´±±±±±±±±±±±±±³ (Type CANCEL to cancel a command) ³
  3682. ³±±±±±±±±±±±±±±³±±±±³±±±±±±±±±±±±±³ ³
  3683. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  3684. party_print()
  3685. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  3686. status()
  3687. command = msvcrt.getch()
  3688. if command in [b'w',b'W']:
  3689. descend_floors()
  3690. return
  3691. elif command in [b'a',b'A']:
  3692. try:
  3693. current_face = face[alpha - 1]
  3694. except:
  3695. current_face = face[alpha + 4]
  3696. return
  3697. elif command in [b'd',b'D']:
  3698. try:
  3699. current_face = face[alpha + 1]
  3700. except:
  3701. current_face = face[alpha - 3]
  3702. return
  3703. elif command == b'1':
  3704. view_items_noncombat()
  3705. elif command == b'2':
  3706. search()
  3707. elif command == b'3':
  3708. save_game()
  3709.  
  3710. def turn_left_stairs_down():
  3711. global current_face
  3712. turn_left_stairs_down_loop = 'true'
  3713. while turn_left_stairs_down_loop == 'true':
  3714. alpha = face.index(current_face)
  3715. clear_screen()
  3716. time.sleep(0.01)
  3717. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  3718. ³ ±±±±±±±³ ³
  3719. ³ ±±±±±±±±³ 1: INVENTORY ³
  3720. ³±±±±±±±±±±±±±±±±±±±±±±±°±±±±±±±±±³ 2: SEARCH ³
  3721. ³±±±±±±±±±±±±±±±±±±±±±±±°±±±±±±±±±³ 3: SAVE ³
  3722. ³±±±±±±±±±±±±±±±±±±±±±±±°±±±±±±±±±³ ³
  3723. ³±±±±±±±±±±±±±±³±±±±³±±±°±±±±±±±±±³ ³
  3724. ³±±±±±±±±±±±±±±ÃÄÄÄÄ´±±±°±±±±±±±±±³ ³
  3725. ³±±±±±±±±±±±±±±³±±±±³±±±°±±±±±±±±±³ ³
  3726. ³±±±±±±±±±±±±±±ÃÄÄÄÄ´±±±°±±±±±±±±±³ (Type CANCEL to cancel a command) ³
  3727. ³±±±±±±±±±±±±±±³±±±±³±±±°±±±±±±±±±³ ³
  3728. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  3729. party_print()
  3730. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  3731. status()
  3732. command = msvcrt.getch()
  3733. if command in [b'w',b'W']:
  3734. descend_floors()
  3735. return
  3736. elif command in [b'a',b'A']:
  3737. try:
  3738. current_face = face[alpha - 1]
  3739. except:
  3740. current_face = face[alpha + 4]
  3741. return
  3742. elif command in [b'd',b'D']:
  3743. try:
  3744. current_face = face[alpha + 1]
  3745. except:
  3746. current_face = face[alpha - 3]
  3747. return
  3748. elif command == b'1':
  3749. view_items_noncombat()
  3750. elif command == b'2':
  3751. search()
  3752. elif command == b'3':
  3753. save_game()
  3754.  
  3755. def stairs_down_door_right():
  3756. global current_face
  3757. stairs_down_door_right_loop = 'true'
  3758. while stairs_down_door_right_loop == 'true':
  3759. alpha = face.index(current_face)
  3760. clear_screen()
  3761. time.sleep(0.01)
  3762. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  3763. ³±±±±±±±± ±±±±±±±³ ³
  3764. ³±±±±±±±±± ±±±±±±±±³ 1: INVENTORY ³
  3765. ³±±±±±±±±±±°±±±±±±±±±±±±°±±±±°°±±±³ 2: SEARCH ³
  3766. ³±±±±±±±±±±°±±±±±±±±±±±±°±±±° °±±±³ 3: SAVE ³
  3767. ³±±±±±±±±±±°±±±±±±±±±±±±°±±° °±±±³ ³
  3768. ³±±±±±±±±±±°±±±³±±±±³±±±°±±° °±±±³ ³
  3769. ³±±±±±±±±±±°±±±ÃÄÄÄÄ´±±±°±±° °±±±³ ³
  3770. ³±±±±±±±±±±°±±±³±±±±³±±±°±±° °±±±³ ³
  3771. ³±±±±±±±±±±°±±±ÃÄÄÄÄ´±±±°±±° °±±±³ (Type CANCEL to cancel a command) ³
  3772. ³±±±±±±±±±±°±±±³±±±±³±±±°±±° °±±±³ ³
  3773. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  3774. party_print()
  3775. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  3776. status()
  3777. command = msvcrt.getch()
  3778. if command in [b'w',b'W']:
  3779. descend_floors()
  3780. return
  3781. elif command in [b'a',b'A']:
  3782. try:
  3783. current_face = face[alpha - 1]
  3784. except:
  3785. current_face = face[alpha + 4]
  3786. return
  3787. elif command in [b'd',b'D']:
  3788. try:
  3789. current_face = face[alpha + 1]
  3790. except:
  3791. current_face = face[alpha - 3]
  3792. return
  3793. elif command == b'1':
  3794. view_items_noncombat()
  3795. elif command == b'2':
  3796. search()
  3797. elif command == b'3':
  3798. save_game()
  3799.  
  3800. def turn_right_stairs_down():
  3801. global current_face
  3802. turn_right_stairs_down_loop = 'true'
  3803. while turn_right_stairs_down_loop == 'true':
  3804. alpha = face.index(current_face)
  3805. clear_screen()
  3806. time.sleep(0.01)
  3807. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  3808. ³±±±±±±±± ³ ³
  3809. ³±±±±±±±±± ³ 1: INVENTORY ³
  3810. ³±±±±±±±±±±°±±±±±±±±±±±±±±±±±±±±±±³ 2: SEARCH ³
  3811. ³±±±±±±±±±±°±±±±±±±±±±±±±±±±±±±±±±³ 3: SAVE ³
  3812. ³±±±±±±±±±±°±±±±±±±±±±±±±±±±±±±±±±³ ³
  3813. ³±±±±±±±±±±°±±±³±±±±³±±±±±±±±±±±±±³ ³
  3814. ³±±±±±±±±±±°±±±ÃÄÄÄÄ´±±±±±±±±±±±±±³ ³
  3815. ³±±±±±±±±±±°±±±³±±±±³±±±±±±±±±±±±±³ ³
  3816. ³±±±±±±±±±±°±±±ÃÄÄÄÄ´±±±±±±±±±±±±±³ (Type CANCEL to cancel a command) ³
  3817. ³±±±±±±±±±±°±±±³±±±±³±±±±±±±±±±±±±³ ³
  3818. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  3819. party_print()
  3820. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  3821. status()
  3822. command = msvcrt.getch()
  3823. if command in [b'w',b'W']:
  3824. descend_floors()
  3825. return
  3826. elif command in [b'a',b'A']:
  3827. try:
  3828. current_face = face[alpha - 1]
  3829. except:
  3830. current_face = face[alpha + 4]
  3831. return
  3832. elif command in [b'd',b'D']:
  3833. try:
  3834. current_face = face[alpha + 1]
  3835. except:
  3836. current_face = face[alpha - 3]
  3837. return
  3838. elif command == b'1':
  3839. view_items_noncombat()
  3840. elif command == b'2':
  3841. search()
  3842. elif command == b'3':
  3843. save_game()
  3844.  
  3845. def stairs_down():
  3846. global current_face
  3847. stairs_down_loop = 'true'
  3848. while stairs_down_loop == 'true':
  3849. alpha = face.index(current_face)
  3850. clear_screen()
  3851. time.sleep(0.01)
  3852. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  3853. ³±±±±±±±± ±±±±±±±³ ³
  3854. ³±±±±±±±±± ±±±±±±±±³ 1: INVENTORY ³
  3855. ³±±±±±±±±±±°±±±±±±±±±±±±°±±±±±±±±±³ 2: SEARCH ³
  3856. ³±±±±±±±±±±°±±±±±±±±±±±±°±±±±±±±±±³ 3: SAVE ³
  3857. ³±±±±±±±±±±°±±±±±±±±±±±±°±±±±±±±±±³ ³
  3858. ³±±±±±±±±±±°±±±³±±±±³±±±°±±±±±±±±±³ ³
  3859. ³±±±±±±±±±±°±±±ÃÄÄÄÄ´±±±°±±±±±±±±±³ ³
  3860. ³±±±±±±±±±±°±±±³±±±±³±±±°±±±±±±±±±³ ³
  3861. ³±±±±±±±±±±°±±±ÃÄÄÄÄ´±±±°±±±±±±±±±³ (Type CANCEL to cancel a command) ³
  3862. ³±±±±±±±±±±°±±±³±±±±³±±±°±±±±±±±±±³ ³
  3863. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  3864. party_print()
  3865. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  3866. status()
  3867. command = msvcrt.getch()
  3868. if command in [b'w',b'W']:
  3869. descend_floors()
  3870. return
  3871. elif command in [b'a',b'A']:
  3872. try:
  3873. current_face = face[alpha - 1]
  3874. except:
  3875. current_face = face[alpha + 4]
  3876. return
  3877. elif command in [b'd',b'D']:
  3878. try:
  3879. current_face = face[alpha + 1]
  3880. except:
  3881. current_face = face[alpha - 3]
  3882. return
  3883. elif command == b'1':
  3884. view_items_noncombat()
  3885. elif command == b'2':
  3886. search()
  3887. elif command == b'3':
  3888. save_game()
  3889.  
  3890. def stairs_front_door_left_right():
  3891. global current_face
  3892. stairs_front_door_left_right_loop = 'true'
  3893. while stairs_front_door_left_right_loop == 'true':
  3894. alpha = face.index(current_face)
  3895. clear_screen()
  3896. time.sleep(0.01)
  3897. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  3898. ³±±±±±±±± À¿ ÚÙ ±±±±±±±³ ³
  3899. ³±±±±±±±±± ÀÄijÄÄÄijÄÄÙ ±±±±±±±±³ 1: INVENTORY ³
  3900. ³±±±±°°±±±±°±±±ÃÄÄÄÄ´±±±°±±±±°°±±±³ 2: SEARCH ³
  3901. ³±±±±° °±±±°±±±³±±±±³±±±°±±±° °±±±³ 3: SAVE ³
  3902. ³±±±±° °±±°±±±ÃÄÄÄÄ´±±±°±±° °±±±³ ³
  3903. ³±±±±° °±±°±±±³±±±±³±±±°±±° °±±±³ ³
  3904. ³±±±±° °±±°±±±ÃÄÄÄÄ´±±±°±±° °±±±³ ³
  3905. ³±±±±° °±±°±±±³±±±±³±±±°±±° °±±±³ ³
  3906. ³±±±±° °±±°±±±ÃÄÄÄÄ´±±±°±±° °±±±³ (Type CANCEL to cancel a command) ³
  3907. ³±±±±° °±±°±±±³±±±±³±±±°±±° °±±±³ ³
  3908. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  3909. party_print()
  3910. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  3911. status()
  3912. command = msvcrt.getch()
  3913. if command in [b'w',b'W']:
  3914. change_floors()
  3915. return
  3916. elif command in [b'a',b'A']:
  3917. try:
  3918. current_face = face[alpha - 1]
  3919. except:
  3920. current_face = face[alpha + 4]
  3921. return
  3922. elif command in [b'd',b'D']:
  3923. try:
  3924. current_face = face[alpha + 1]
  3925. except:
  3926. current_face = face[alpha - 3]
  3927. return
  3928. elif command == b'1':
  3929. view_items_noncombat()
  3930. elif command == b'2':
  3931. search()
  3932. elif command == b'3':
  3933. save_game()
  3934.  
  3935. def turn_right_stairs_door_left():
  3936. global current_face
  3937. turn_right_stairs_door_left_loop = 'true'
  3938. while turn_right_stairs_door_left_loop == 'true':
  3939. alpha = face.index(current_face)
  3940. clear_screen()
  3941. time.sleep(0.01)
  3942. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  3943. ³±±±±±±±± À¿ ÚÙ ³ ³
  3944. ³±±±±±±±±± ÀÄijÄÄÄijÄÄÙ ³ 1: INVENTORY ³
  3945. ³±±±±°°±±±±°±±±ÃÄÄÄÄ´±±±±±±±±±±±±±³ 2: SEARCH ³
  3946. ³±±±±° °±±±°±±±³±±±±³±±±±±±±±±±±±±³ 3: SAVE ³
  3947. ³±±±±° °±±°±±±ÃÄÄÄÄ´±±±±±±±±±±±±±³ ³
  3948. ³±±±±° °±±°±±±³±±±±³±±±±±±±±±±±±±³ ³
  3949. ³±±±±° °±±°±±±ÃÄÄÄÄ´±±±±±±±±±±±±±³ ³
  3950. ³±±±±° °±±°±±±³±±±±³±±±±±±±±±±±±±³ ³
  3951. ³±±±±° °±±°±±±ÃÄÄÄÄ´±±±±±±±±±±±±±³ (Type CANCEL to cancel a command) ³
  3952. ³±±±±° °±±°±±±³±±±±³±±±±±±±±±±±±±³ ³
  3953. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  3954. party_print()
  3955. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  3956. status()
  3957. command = msvcrt.getch()
  3958. if command in [b'w',b'W']:
  3959. change_floors()
  3960. return
  3961. elif command in [b'a',b'A']:
  3962. try:
  3963. current_face = face[alpha - 1]
  3964. except:
  3965. current_face = face[alpha + 4]
  3966. return
  3967. elif command in [b'd',b'D']:
  3968. try:
  3969. current_face = face[alpha + 1]
  3970. except:
  3971. current_face = face[alpha - 3]
  3972. return
  3973. elif command == b'1':
  3974. view_items_noncombat()
  3975. elif command == b'2':
  3976. search()
  3977. elif command == b'3':
  3978. save_game()
  3979.  
  3980. def turn_left_stairs_door_right():
  3981. global current_face
  3982. turn_left_stairs_door_right_loop = 'true'
  3983. while turn_left_stairs_door_right_loop == 'true':
  3984. alpha = face.index(current_face)
  3985. clear_screen()
  3986. time.sleep(0.01)
  3987. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  3988. ³ À¿ ÚÙ ±±±±±±±³ ³
  3989. ³ ÀÄijÄÄÄijÄÄÙ ±±±±±±±±³ 1: INVENTORY ³
  3990. ³±±±±±±±±±±±±±±ÃÄÄÄÄ´±±±°±±±±°°±±±³ 2: SEARCH ³
  3991. ³±±±±±±±±±±±±±±³±±±±³±±±°±±±° °±±±³ 3: SAVE ³
  3992. ³±±±±±±±±±±±±±±ÃÄÄÄÄ´±±±°±±° °±±±³ ³
  3993. ³±±±±±±±±±±±±±±³±±±±³±±±°±±° °±±±³ ³
  3994. ³±±±±±±±±±±±±±±ÃÄÄÄÄ´±±±°±±° °±±±³ ³
  3995. ³±±±±±±±±±±±±±±³±±±±³±±±°±±° °±±±³ ³
  3996. ³±±±±±±±±±±±±±±ÃÄÄÄÄ´±±±°±±° °±±±³ (Type CANCEL to cancel a command) ³
  3997. ³±±±±±±±±±±±±±±³±±±±³±±±°±±° °±±±³ ³
  3998. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  3999. party_print()
  4000. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  4001. status()
  4002. command = msvcrt.getch()
  4003. if command in [b'w',b'W']:
  4004. change_floors()
  4005. return
  4006. elif command in [b'a',b'A']:
  4007. try:
  4008. current_face = face[alpha - 1]
  4009. except:
  4010. current_face = face[alpha + 4]
  4011. return
  4012. elif command in [b'd',b'D']:
  4013. try:
  4014. current_face = face[alpha + 1]
  4015. except:
  4016. current_face = face[alpha - 3]
  4017. return
  4018. elif command == b'1':
  4019. view_items_noncombat()
  4020. elif command == b'2':
  4021. search()
  4022. elif command == b'3':
  4023. save_game()
  4024.  
  4025. def stairs_front_door_left():
  4026. global current_face
  4027. stairs_front_door_left_loop = 'true'
  4028. while stairs_front_door_left_loop == 'true':
  4029. alpha = face.index(current_face)
  4030. clear_screen()
  4031. time.sleep(0.01)
  4032. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  4033. ³±±±±±±±± À¿ ÚÙ ±±±±±±±³ ³
  4034. ³±±±±±±±±± ÀÄijÄÄÄijÄÄÙ ±±±±±±±±³ 1: INVENTORY ³
  4035. ³±±±±°°±±±±°±±±ÃÄÄÄÄ´±±±°±±±±±±±±±³ 2: SEARCH ³
  4036. ³±±±±° °±±±°±±±³±±±±³±±±°±±±±±±±±±³ 3: SAVE ³
  4037. ³±±±±° °±±°±±±ÃÄÄÄÄ´±±±°±±±±±±±±±³ ³
  4038. ³±±±±° °±±°±±±³±±±±³±±±°±±±±±±±±±³ ³
  4039. ³±±±±° °±±°±±±ÃÄÄÄÄ´±±±°±±±±±±±±±³ ³
  4040. ³±±±±° °±±°±±±³±±±±³±±±°±±±±±±±±±³ ³
  4041. ³±±±±° °±±°±±±ÃÄÄÄÄ´±±±°±±±±±±±±±³ (Type CANCEL to cancel a command) ³
  4042. ³±±±±° °±±°±±±³±±±±³±±±°±±±±±±±±±³ ³
  4043. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  4044. party_print()
  4045. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  4046. status()
  4047. command = msvcrt.getch()
  4048. if command in [b'w',b'W']:
  4049. change_floors()
  4050. return
  4051. elif command in [b'a',b'A']:
  4052. try:
  4053. current_face = face[alpha - 1]
  4054. except:
  4055. current_face = face[alpha + 4]
  4056. return
  4057. elif command in [b'd',b'D']:
  4058. try:
  4059. current_face = face[alpha + 1]
  4060. except:
  4061. current_face = face[alpha - 3]
  4062. return
  4063. elif command == b'1':
  4064. view_items_noncombat()
  4065. elif command == b'2':
  4066. search()
  4067. elif command == b'3':
  4068. save_game()
  4069.  
  4070. def stairs_t_intersection():
  4071. global current_face
  4072. turn_left_stairs_loop = 'true'
  4073. while turn_left_stairs_loop == 'true':
  4074. alpha = face.index(current_face)
  4075. clear_screen()
  4076. time.sleep(0.01)
  4077. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  4078. ³ À¿ ÚÙ ³ ³
  4079. ³ ÀÄijÄÄÄijÄÄÙ ³ 1: INVENTORY ³
  4080. ³±±±±±±±±±±±±±±ÃÄÄÄÄ´±±±±±±±±±±±±±³ 2: SEARCH ³
  4081. ³±±±±±±±±±±±±±±³±±±±³±±±±±±±±±±±±±³ 3: SAVE ³
  4082. ³±±±±±±±±±±±±±±ÃÄÄÄÄ´±±±±±±±±±±±±±³ ³
  4083. ³±±±±±±±±±±±±±±³±±±±³±±±±±±±±±±±±±³ ³
  4084. ³±±±±±±±±±±±±±±ÃÄÄÄÄ´±±±±±±±±±±±±±³ ³
  4085. ³±±±±±±±±±±±±±±³±±±±³±±±±±±±±±±±±±³ ³
  4086. ³±±±±±±±±±±±±±±ÃÄÄÄÄ´±±±±±±±±±±±±±³ (Type CANCEL to cancel a command) ³
  4087. ³±±±±±±±±±±±±±±³±±±±³±±±±±±±±±±±±±³ ³
  4088. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  4089. party_print()
  4090. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  4091. status()
  4092. command = msvcrt.getch()
  4093. if command in [b'w',b'W']:
  4094. change_floors()
  4095. return
  4096. elif command in [b'a',b'A']:
  4097. try:
  4098. current_face = face[alpha - 1]
  4099. except:
  4100. current_face = face[alpha + 4]
  4101. return
  4102. elif command in [b'd',b'D']:
  4103. try:
  4104. current_face = face[alpha + 1]
  4105. except:
  4106. current_face = face[alpha - 3]
  4107. return
  4108. elif command == b'1':
  4109. view_items_noncombat()
  4110. elif command == b'2':
  4111. search()
  4112. elif command == b'3':
  4113. save_game()
  4114.  
  4115. def turn_left_stairs():
  4116. global current_face
  4117. turn_left_stairs_loop = 'true'
  4118. while turn_left_stairs_loop == 'true':
  4119. alpha = face.index(current_face)
  4120. clear_screen()
  4121. time.sleep(0.01)
  4122. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  4123. ³ À¿ ÚÙ ±±±±±±±³ ³
  4124. ³ ÀÄijÄÄÄijÄÄÙ ±±±±±±±±³ 1: INVENTORY ³
  4125. ³±±±±±±±±±±±±±±ÃÄÄÄÄ´±±±°±±±±±±±±±³ 2: SEARCH ³
  4126. ³±±±±±±±±±±±±±±³±±±±³±±±°±±±±±±±±±³ 3: SAVE ³
  4127. ³±±±±±±±±±±±±±±ÃÄÄÄÄ´±±±°±±±±±±±±±³ ³
  4128. ³±±±±±±±±±±±±±±³±±±±³±±±°±±±±±±±±±³ ³
  4129. ³±±±±±±±±±±±±±±ÃÄÄÄÄ´±±±°±±±±±±±±±³ ³
  4130. ³±±±±±±±±±±±±±±³±±±±³±±±°±±±±±±±±±³ ³
  4131. ³±±±±±±±±±±±±±±ÃÄÄÄÄ´±±±°±±±±±±±±±³ (Type CANCEL to cancel a command) ³
  4132. ³±±±±±±±±±±±±±±³±±±±³±±±°±±±±±±±±±³ ³
  4133. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  4134. party_print()
  4135. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  4136. status()
  4137. command = msvcrt.getch()
  4138. if command in [b'w',b'W']:
  4139. change_floors()
  4140. return
  4141. elif command in [b'a',b'A']:
  4142. try:
  4143. current_face = face[alpha - 1]
  4144. except:
  4145. current_face = face[alpha + 4]
  4146. return
  4147. elif command in [b'd',b'D']:
  4148. try:
  4149. current_face = face[alpha + 1]
  4150. except:
  4151. current_face = face[alpha - 3]
  4152. return
  4153. elif command == b'1':
  4154. view_items_noncombat()
  4155. elif command == b'2':
  4156. search()
  4157. elif command == b'3':
  4158. save_game()
  4159.  
  4160. def stairs_front_door_right():
  4161. global current_face
  4162. stairs_front_door_right_loop = 'true'
  4163. while stairs_front_door_right_loop == 'true':
  4164. alpha = face.index(current_face)
  4165. clear_screen()
  4166. time.sleep(0.01)
  4167. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  4168. ³±±±±±±±± À¿ ÚÙ ±±±±±±±³ ³
  4169. ³±±±±±±±±± ÀÄijÄÄÄijÄÄÙ ±±±±±±±±³ 1: INVENTORY ³
  4170. ³±±±±±±±±±±°±±±ÃÄÄÄÄ´±±±°±±±±°°±±±³ 2: SEARCH ³
  4171. ³±±±±±±±±±±°±±±³±±±±³±±±°±±±° °±±±³ 3: SAVE ³
  4172. ³±±±±±±±±±±°±±±ÃÄÄÄÄ´±±±°±±° °±±±³ ³
  4173. ³±±±±±±±±±±°±±±³±±±±³±±±°±±° °±±±³ ³
  4174. ³±±±±±±±±±±°±±±ÃÄÄÄÄ´±±±°±±° °±±±³ ³
  4175. ³±±±±±±±±±±°±±±³±±±±³±±±°±±° °±±±³ ³
  4176. ³±±±±±±±±±±°±±±ÃÄÄÄÄ´±±±°±±° °±±±³ (Type CANCEL to cancel a command) ³
  4177. ³±±±±±±±±±±°±±±³±±±±³±±±°±±° °±±±³ ³
  4178. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  4179. party_print()
  4180. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  4181. status()
  4182. command = msvcrt.getch()
  4183. if command in [b'w',b'W']:
  4184. change_floors()
  4185. return
  4186. elif command in [b'a',b'A']:
  4187. try:
  4188. current_face = face[alpha - 1]
  4189. except:
  4190. current_face = face[alpha + 4]
  4191. return
  4192. elif command in [b'd',b'D']:
  4193. try:
  4194. current_face = face[alpha + 1]
  4195. except:
  4196. current_face = face[alpha - 3]
  4197. return
  4198. elif command == b'1':
  4199. view_items_noncombat()
  4200. elif command == b'2':
  4201. search()
  4202. elif command == b'3':
  4203. save_game()
  4204.  
  4205. def turn_right_stairs():
  4206. global current_face
  4207. turn_right_stairs_loop = 'true'
  4208. while turn_right_stairs_loop == 'true':
  4209. alpha = face.index(current_face)
  4210. clear_screen()
  4211. time.sleep(0.01)
  4212. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  4213. ³±±±±±±±± À¿ ÚÙ ³ ³
  4214. ³±±±±±±±±± ÀÄijÄÄÄijÄÄÙ ³ 1: INVENTORY ³
  4215. ³±±±±±±±±±±°±±±ÃÄÄÄÄ´±±±±±±±±±±±±±³ 2: SEARCH ³
  4216. ³±±±±±±±±±±°±±±³±±±±³±±±±±±±±±±±±±³ 3: SAVE ³
  4217. ³±±±±±±±±±±°±±±ÃÄÄÄÄ´±±±±±±±±±±±±±³ ³
  4218. ³±±±±±±±±±±°±±±³±±±±³±±±±±±±±±±±±±³ ³
  4219. ³±±±±±±±±±±°±±±ÃÄÄÄÄ´±±±±±±±±±±±±±³ ³
  4220. ³±±±±±±±±±±°±±±³±±±±³±±±±±±±±±±±±±³ ³
  4221. ³±±±±±±±±±±°±±±ÃÄÄÄÄ´±±±±±±±±±±±±±³ (Type CANCEL to cancel a command) ³
  4222. ³±±±±±±±±±±°±±±³±±±±³±±±±±±±±±±±±±³ ³
  4223. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  4224. party_print()
  4225. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  4226. status()
  4227. command = msvcrt.getch()
  4228. if command in [b'w',b'W']:
  4229. change_floors()
  4230. return
  4231. elif command in [b'a',b'A']:
  4232. try:
  4233. current_face = face[alpha - 1]
  4234. except:
  4235. current_face = face[alpha + 4]
  4236. return
  4237. elif command in [b'd',b'D']:
  4238. try:
  4239. current_face = face[alpha + 1]
  4240. except:
  4241. current_face = face[alpha - 3]
  4242. return
  4243. elif command == b'1':
  4244. view_items_noncombat()
  4245. elif command == b'2':
  4246. search()
  4247. elif command == b'3':
  4248. save_game()
  4249.  
  4250. def stairs_front():
  4251. global current_face
  4252. stairs_front_loop = 'true'
  4253. while stairs_front_loop == 'true':
  4254. alpha = face.index(current_face)
  4255. clear_screen()
  4256. time.sleep(0.01)
  4257. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  4258. ³±±±±±±±± À¿ ÚÙ ±±±±±±±³ ³
  4259. ³±±±±±±±±± ÀÄijÄÄÄijÄÄÙ ±±±±±±±±³ 1: INVENTORY ³
  4260. ³±±±±±±±±±±°±±±ÃÄÄÄÄ´±±±°±±±±±±±±±³ 2: SEARCH ³
  4261. ³±±±±±±±±±±°±±±³±±±±³±±±°±±±±±±±±±³ 3: SAVE ³
  4262. ³±±±±±±±±±±°±±±ÃÄÄÄÄ´±±±°±±±±±±±±±³ ³
  4263. ³±±±±±±±±±±°±±±³±±±±³±±±°±±±±±±±±±³ ³
  4264. ³±±±±±±±±±±°±±±ÃÄÄÄÄ´±±±°±±±±±±±±±³ ³
  4265. ³±±±±±±±±±±°±±±³±±±±³±±±°±±±±±±±±±³ ³
  4266. ³±±±±±±±±±±°±±±ÃÄÄÄÄ´±±±°±±±±±±±±±³ (Type CANCEL to cancel a command) ³
  4267. ³±±±±±±±±±±°±±±³±±±±³±±±°±±±±±±±±±³ ³
  4268. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  4269. party_print()
  4270. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  4271. status()
  4272. command = msvcrt.getch()
  4273. if command in [b'w',b'W']:
  4274. change_floors()
  4275. return
  4276. elif command in [b'a',b'A']:
  4277. try:
  4278. current_face = face[alpha - 1]
  4279. except:
  4280. current_face = face[alpha + 4]
  4281. return
  4282. elif command in [b'd',b'D']:
  4283. try:
  4284. current_face = face[alpha + 1]
  4285. except:
  4286. current_face = face[alpha - 3]
  4287. return
  4288. elif command == b'1':
  4289. view_items_noncombat()
  4290. elif command == b'2':
  4291. search()
  4292. elif command == b'3':
  4293. save_game()
  4294.  
  4295. def corridor_door_left_right():
  4296. global step
  4297. global current_position
  4298. global current_face
  4299. corridor_door_left_right_loop = 'true'
  4300. while corridor_door_left_right_loop == 'true':
  4301. alpha = face.index(current_face)
  4302. clear_screen()
  4303. time.sleep(0.01)
  4304. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  4305. ³±±±±±±±± ±±±±±±±³ ³
  4306. ³±±±±±±±±± ±±±±±±±±³ 1: INVENTORY ³
  4307. ³±±±±°°±±±± ±±±±°°±±±³ 2: SEARCH ³
  4308. ³±±±±° °±±±± ±±±±° °±±±³ 3: SAVE ³
  4309. ³±±±±° °±±±° °±±±° °±±±³ ³
  4310. ³±±±±° °±±±° °±±±° °±±±³ ³
  4311. ³±±±±° °±±±° °±±±° °±±±³ ³
  4312. ³±±±±° °±±±° °±±±° °±±±³ ³
  4313. ³±±±±° °±±±° °±±±° °±±±³ (Type CANCEL to cancel a command) ³
  4314. ³±±±±° °±±±° °±±±° °±±±³ ³
  4315. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  4316. party_print()
  4317. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  4318. status()
  4319. command = msvcrt.getch()
  4320. if command in [b'w',b'W']:
  4321. if current_face == 'North':
  4322. current_position[0] -= 1
  4323. elif current_face == 'East':
  4324. current_position[1] += 1
  4325. elif current_face == 'South':
  4326. current_position[0] += 1
  4327. elif current_face == 'West':
  4328. current_position[1] -= 1
  4329. step += 1
  4330. current_face = face[alpha]
  4331. return
  4332. elif command in [b'a',b'A']:
  4333. try:
  4334. current_face = face[alpha - 1]
  4335. except:
  4336. current_face = face[alpha + 4]
  4337. return
  4338. elif command in [b'd',b'D']:
  4339. try:
  4340. current_face = face[alpha + 1]
  4341. except:
  4342. current_face = face[alpha - 3]
  4343. return
  4344. elif command == b'1':
  4345. view_items_noncombat()
  4346. elif command == b'2':
  4347. search()
  4348. elif command == b'3':
  4349. save_game()
  4350.  
  4351. def corridor_door_left():
  4352. global step
  4353. global current_position
  4354. global current_face
  4355. corridor_door_left_loop = 'true'
  4356. while corridor_door_left_loop == 'true':
  4357. alpha = face.index(current_face)
  4358. clear_screen()
  4359. time.sleep(0.01)
  4360. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  4361. ³±±±±±±±± ±±±±±±±³ ³
  4362. ³±±±±±±±±± ±±±±±±±±³ 1: INVENTORY ³
  4363. ³±±±±°°±±±± ±±±±±±±±±³ 2: SEARCH ³
  4364. ³±±±±° °±±±± ±±±±±±±±±±³ 3: SAVE ³
  4365. ³±±±±° °±±±° °±±±±±±±±±±³ ³
  4366. ³±±±±° °±±±° °±±±±±±±±±±³ ³
  4367. ³±±±±° °±±±° °±±±±±±±±±±³ ³
  4368. ³±±±±° °±±±° °±±±±±±±±±±³ ³
  4369. ³±±±±° °±±±° °±±±±±±±±±±³ (Type CANCEL to cancel a command) ³
  4370. ³±±±±° °±±±° °±±±±±±±±±±³ ³
  4371. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  4372. party_print()
  4373. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  4374. status()
  4375. command = msvcrt.getch()
  4376. if command in [b'w',b'W']:
  4377. if current_face == 'North':
  4378. current_position[0] -= 1
  4379. elif current_face == 'East':
  4380. current_position[1] += 1
  4381. elif current_face == 'South':
  4382. current_position[0] += 1
  4383. elif current_face == 'West':
  4384. current_position[1] -= 1
  4385. step += 1
  4386. current_face = face[alpha]
  4387. return
  4388. elif command in [b'a',b'A']:
  4389. try:
  4390. current_face = face[alpha - 1]
  4391. except:
  4392. current_face = face[alpha + 4]
  4393. return
  4394. elif command in [b'd',b'D']:
  4395. try:
  4396. current_face = face[alpha + 1]
  4397. except:
  4398. current_face = face[alpha - 3]
  4399. return
  4400. elif command == b'1':
  4401. view_items_noncombat()
  4402. elif command == b'2':
  4403. search()
  4404. elif command == b'3':
  4405. save_game()
  4406.  
  4407. def wall_left_door():
  4408. global step
  4409. global current_position
  4410. global current_face
  4411. wall_left_door_loop = 'true'
  4412. while wall_left_door_loop == 'true':
  4413. alpha = face.index(current_face)
  4414. clear_screen()
  4415. time.sleep(0.01)
  4416. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  4417. ³±±±±±±±± ³ ³
  4418. ³±±±±±±±±± ±°±±±±±±³ 1: INVENTORY ³
  4419. ³±±±±°°±±±± ±±°±±±±±±³ 2: SEARCH ³
  4420. ³±±±±° °±±±± ±±±°±±±±±±³ 3: SAVE ³
  4421. ³±±±±° °±±±° °±±±°±±±±±±³ ³
  4422. ³±±±±° °±±±° °±±±°±±±±±±³ ³
  4423. ³±±±±° °±±±° °±±±°±±±±±±³ ³
  4424. ³±±±±° °±±±° °±±±°±±±±±±³ ³
  4425. ³±±±±° °±±±° °±±±°±±±±±±³ (Type CANCEL to cancel a command) ³
  4426. ³±±±±° °±±±° °±±±°±±±±±±³ ³
  4427. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  4428. party_print()
  4429. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  4430. status()
  4431. command = msvcrt.getch()
  4432. if command in [b'w',b'W']:
  4433. if current_face == 'North':
  4434. current_position[0] -= 1
  4435. elif current_face == 'East':
  4436. current_position[1] += 1
  4437. elif current_face == 'South':
  4438. current_position[0] += 1
  4439. elif current_face == 'West':
  4440. current_position[1] -= 1
  4441. step += 1
  4442. current_face = face[alpha]
  4443. return
  4444. elif command in [b'a',b'A']:
  4445. try:
  4446. current_face = face[alpha - 1]
  4447. except:
  4448. current_face = face[alpha + 4]
  4449. return
  4450. elif command in [b'd',b'D']:
  4451. try:
  4452. current_face = face[alpha + 1]
  4453. except:
  4454. current_face = face[alpha - 3]
  4455. return
  4456. elif command == b'1':
  4457. view_items_noncombat()
  4458. elif command == b'2':
  4459. search()
  4460. elif command == b'3':
  4461. save_game()
  4462.  
  4463. def wall_right_door():
  4464. global step
  4465. global current_position
  4466. global current_face
  4467. wall_right_door_loop = 'true'
  4468. while wall_right_door_loop == 'true':
  4469. alpha = face.index(current_face)
  4470. clear_screen()
  4471. time.sleep(0.01)
  4472. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  4473. ³ ±±±±±±±³ ³
  4474. ³±±±±±±±°± ±±±±±±±±³ 1: INVENTORY ³
  4475. ³±±±±±±±°±± ±±±±°°±±±³ 2: SEARCH ³
  4476. ³±±±±±±±°±±± ±±±±° °±±±³ 3: SAVE ³
  4477. ³±±±±±±±°±±±° °±±±° °±±±³ ³
  4478. ³±±±±±±±°±±±° °±±±° °±±±³ ³
  4479. ³±±±±±±±°±±±° °±±±° °±±±³ ³
  4480. ³±±±±±±±°±±±° °±±±° °±±±³ ³
  4481. ³±±±±±±±°±±±° °±±±° °±±±³ (Type CANCEL to cancel a command) ³
  4482. ³±±±±±±±°±±±° °±±±° °±±±³ ³
  4483. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  4484. party_print()
  4485. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  4486. status()
  4487. command = msvcrt.getch()
  4488. if command in [b'w',b'W']:
  4489. if current_face == 'North':
  4490. current_position[0] -= 1
  4491. elif current_face == 'East':
  4492. current_position[1] += 1
  4493. elif current_face == 'South':
  4494. current_position[0] += 1
  4495. elif current_face == 'West':
  4496. current_position[1] -= 1
  4497. step += 1
  4498. current_face = face[alpha]
  4499. return
  4500. elif command in [b'a',b'A']:
  4501. try:
  4502. current_face = face[alpha - 1]
  4503. except:
  4504. current_face = face[alpha + 4]
  4505. return
  4506. elif command in [b'd',b'D']:
  4507. try:
  4508. current_face = face[alpha + 1]
  4509. except:
  4510. current_face = face[alpha - 3]
  4511. return
  4512. elif command == b'1':
  4513. view_items_noncombat()
  4514. elif command == b'2':
  4515. search()
  4516. elif command == b'3':
  4517. save_game()
  4518.  
  4519. def middle():
  4520. global step
  4521. global current_position
  4522. global current_face
  4523. middle_loop = 'true'
  4524. while middle_loop == 'true':
  4525. alpha = face.index(current_face)
  4526. clear_screen()
  4527. time.sleep(0.01)
  4528. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  4529. ³ ³ ³
  4530. ³±±±±±±±°± ±°±±±±±±³ 1: INVENTORY ³
  4531. ³±±±±±±±°±± ±±°±±±±±±³ 2: SEARCH ³
  4532. ³±±±±±±±°±±± ±±±°±±±±±±³ 3: SAVE ³
  4533. ³±±±±±±±°±±±° °±±±°±±±±±±³ ³
  4534. ³±±±±±±±°±±±° °±±±°±±±±±±³ ³
  4535. ³±±±±±±±°±±±° °±±±°±±±±±±³ ³
  4536. ³±±±±±±±°±±±° °±±±°±±±±±±³ ³
  4537. ³±±±±±±±°±±±° °±±±°±±±±±±³ (Type CANCEL to cancel a command) ³
  4538. ³±±±±±±±°±±±° °±±±°±±±±±±³ ³
  4539. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  4540. party_print()
  4541. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  4542. status()
  4543. command = msvcrt.getch()
  4544. if command in [b'w',b'W']:
  4545. if current_face == 'North':
  4546. current_position[0] -= 1
  4547. elif current_face == 'East':
  4548. current_position[1] += 1
  4549. elif current_face == 'South':
  4550. current_position[0] += 1
  4551. elif current_face == 'West':
  4552. current_position[1] -= 1
  4553. step += 1
  4554. current_face = face[alpha]
  4555. return
  4556. elif command in [b'a',b'A']:
  4557. try:
  4558. current_face = face[alpha - 1]
  4559. except:
  4560. current_face = face[alpha + 4]
  4561. return
  4562. elif command in [b'd',b'D']:
  4563. try:
  4564. current_face = face[alpha + 1]
  4565. except:
  4566. current_face = face[alpha - 3]
  4567. return
  4568. elif command == b'1':
  4569. view_items_noncombat()
  4570. elif command == b'2':
  4571. search()
  4572. elif command == b'3':
  4573. save_game()
  4574.  
  4575. def wall_right():
  4576. global step
  4577. global current_position
  4578. global current_face
  4579. wall_right_loop = 'true'
  4580. while wall_right_loop == 'true':
  4581. alpha = face.index(current_face)
  4582. clear_screen()
  4583. time.sleep(0.01)
  4584. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  4585. ³ ±±±±±±±³ ³
  4586. ³±±±±±±±°± ±±±±±±±±³ 1: INVENTORY ³
  4587. ³±±±±±±±°±± ±±±±±±±±±³ 2: SEARCH ³
  4588. ³±±±±±±±°±±± ±±±±±±±±±±³ 3: SAVE ³
  4589. ³±±±±±±±°±±±° °±±±±±±±±±±³ ³
  4590. ³±±±±±±±°±±±° °±±±±±±±±±±³ ³
  4591. ³±±±±±±±°±±±° °±±±±±±±±±±³ ³
  4592. ³±±±±±±±°±±±° °±±±±±±±±±±³ ³
  4593. ³±±±±±±±°±±±° °±±±±±±±±±±³ (Type CANCEL to cancel a command) ³
  4594. ³±±±±±±±°±±±° °±±±±±±±±±±³ ³
  4595. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  4596. party_print()
  4597. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  4598. status()
  4599. command = msvcrt.getch()
  4600. if command in [b'w',b'W']:
  4601. if current_face == 'North':
  4602. current_position[0] -= 1
  4603. elif current_face == 'East':
  4604. current_position[1] += 1
  4605. elif current_face == 'South':
  4606. current_position[0] += 1
  4607. elif current_face == 'West':
  4608. current_position[1] -= 1
  4609. step += 1
  4610. current_face = face[alpha]
  4611. return
  4612. elif command in [b'a',b'A']:
  4613. try:
  4614. current_face = face[alpha - 1]
  4615. except:
  4616. current_face = face[alpha + 4]
  4617. return
  4618. elif command in [b'd',b'D']:
  4619. try:
  4620. current_face = face[alpha + 1]
  4621. except:
  4622. current_face = face[alpha - 3]
  4623. return
  4624. elif command == b'1':
  4625. view_items_noncombat()
  4626. elif command == b'2':
  4627. search()
  4628. elif command == b'3':
  4629. save_game()
  4630.  
  4631. def corridor_door_right():
  4632. global step
  4633. global current_position
  4634. global current_face
  4635. corridor_door_right_loop = 'true'
  4636. while corridor_door_right_loop == 'true':
  4637. alpha = face.index(current_face)
  4638. clear_screen()
  4639. time.sleep(0.01)
  4640. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  4641. ³±±±±±±±± ±±±±±±±³ ³
  4642. ³±±±±±±±±± ±±±±±±±±³ 1: INVENTORY ³
  4643. ³±±±±±±±±±± ±±±±°°±±±³ 2: SEARCH ³
  4644. ³±±±±±±±±±±± ±±±±° °±±±³ 3: SAVE ³
  4645. ³±±±±±±±±±±±° °±±±° °±±±³ ³
  4646. ³±±±±±±±±±±±° °±±±° °±±±³ ³
  4647. ³±±±±±±±±±±±° °±±±° °±±±³ ³
  4648. ³±±±±±±±±±±±° °±±±° °±±±³ ³
  4649. ³±±±±±±±±±±±° °±±±° °±±±³ (Type CANCEL to cancel a command) ³
  4650. ³±±±±±±±±±±±° °±±±° °±±±³ ³
  4651. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  4652. party_print()
  4653. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  4654. status()
  4655. command = msvcrt.getch()
  4656. if command in [b'w',b'W']:
  4657. if current_face == 'North':
  4658. current_position[0] -= 1
  4659. elif current_face == 'East':
  4660. current_position[1] += 1
  4661. elif current_face == 'South':
  4662. current_position[0] += 1
  4663. elif current_face == 'West':
  4664. current_position[1] -= 1
  4665. step += 1
  4666. current_face = face[alpha]
  4667. return
  4668. elif command in [b'a',b'A']:
  4669. try:
  4670. current_face = face[alpha - 1]
  4671. except:
  4672. current_face = face[alpha + 4]
  4673. return
  4674. elif command in [b'd',b'D']:
  4675. try:
  4676. current_face = face[alpha + 1]
  4677. except:
  4678. current_face = face[alpha - 3]
  4679. return
  4680. elif command == b'1':
  4681. view_items_noncombat()
  4682. elif command == b'2':
  4683. search()
  4684. elif command == b'3':
  4685. save_game()
  4686.  
  4687. def wall_left():
  4688. global step
  4689. global current_position
  4690. global current_face
  4691. wall_left_loop = 'true'
  4692. while wall_left_loop == 'true':
  4693. alpha = face.index(current_face)
  4694. clear_screen()
  4695. time.sleep(0.01)
  4696. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  4697. ³±±±±±±±± ³ ³
  4698. ³±±±±±±±±± ±°±±±±±±³ 1: INVENTORY ³
  4699. ³±±±±±±±±±± ±±°±±±±±±³ 2: SEARCH ³
  4700. ³±±±±±±±±±±± ±±±°±±±±±±³ 3: SAVE ³
  4701. ³±±±±±±±±±±±° °±±±°±±±±±±³ ³
  4702. ³±±±±±±±±±±±° °±±±°±±±±±±³ ³
  4703. ³±±±±±±±±±±±° °±±±°±±±±±±³ ³
  4704. ³±±±±±±±±±±±° °±±±°±±±±±±³ ³
  4705. ³±±±±±±±±±±±° °±±±°±±±±±±³ (Type CANCEL to cancel a command) ³
  4706. ³±±±±±±±±±±±° °±±±°±±±±±±³ ³
  4707. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  4708. party_print()
  4709. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  4710. status()
  4711. command = msvcrt.getch()
  4712. if command in [b'w',b'W']:
  4713. if current_face == 'North':
  4714. current_position[0] -= 1
  4715. elif current_face == 'East':
  4716. current_position[1] += 1
  4717. elif current_face == 'South':
  4718. current_position[0] += 1
  4719. elif current_face == 'West':
  4720. current_position[1] -= 1
  4721. step += 1
  4722. current_face = face[alpha]
  4723. return
  4724. elif command in [b'a',b'A']:
  4725. try:
  4726. current_face = face[alpha - 1]
  4727. except:
  4728. current_face = face[alpha + 4]
  4729. return
  4730. elif command in [b'd',b'D']:
  4731. try:
  4732. current_face = face[alpha + 1]
  4733. except:
  4734. current_face = face[alpha - 3]
  4735. return
  4736. elif command == b'1':
  4737. view_items_noncombat()
  4738. elif command == b'2':
  4739. search()
  4740. elif command == b'3':
  4741. save_game()
  4742.  
  4743. def corridor():
  4744. global step
  4745. global current_position
  4746. global current_face
  4747. corridor_loop = 'true'
  4748. while corridor_loop == 'true':
  4749. alpha = face.index(current_face)
  4750. clear_screen()
  4751. time.sleep(0.01)
  4752. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  4753. ³±±±±±±±± ±±±±±±±³ ³
  4754. ³±±±±±±±±± ±±±±±±±±³ 1: INVENTORY ³
  4755. ³±±±±±±±±±± ±±±±±±±±±³ 2: SEARCH ³
  4756. ³±±±±±±±±±±± ±±±±±±±±±±³ 3: SAVE ³
  4757. ³±±±±±±±±±±±° °±±±±±±±±±±³ ³
  4758. ³±±±±±±±±±±±° °±±±±±±±±±±³ ³
  4759. ³±±±±±±±±±±±° °±±±±±±±±±±³ ³
  4760. ³±±±±±±±±±±±° °±±±±±±±±±±³ ³
  4761. ³±±±±±±±±±±±° °±±±±±±±±±±³ (Type CANCEL to cancel a command) ³
  4762. ³±±±±±±±±±±±° °±±±±±±±±±±³ ³
  4763. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  4764. party_print()
  4765. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  4766. status()
  4767. command = msvcrt.getch()
  4768. if command in [b'w',b'W']:
  4769. if current_face == 'North':
  4770. current_position[0] -= 1
  4771. elif current_face == 'East':
  4772. current_position[1] += 1
  4773. elif current_face == 'South':
  4774. current_position[0] += 1
  4775. elif current_face == 'West':
  4776. current_position[1] -= 1
  4777. step += 1
  4778. current_face = face[alpha]
  4779. return
  4780. elif command in [b'a',b'A']:
  4781. try:
  4782. current_face = face[alpha - 1]
  4783. except:
  4784. current_face = face[alpha + 4]
  4785. return
  4786. elif command in [b'd',b'D']:
  4787. try:
  4788. current_face = face[alpha + 1]
  4789. except:
  4790. current_face = face[alpha - 3]
  4791. return
  4792. elif command == b'1':
  4793. view_items_noncombat()
  4794. elif command == b'2':
  4795. search()
  4796. elif command == b'3':
  4797. save_game()
  4798.  
  4799. def dead_end():
  4800. global current_face
  4801. dead_end_loop = 'true'
  4802. while dead_end_loop == 'true':
  4803. alpha = face.index(current_face)
  4804. clear_screen()
  4805. time.sleep(0.01)
  4806. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  4807. ³±±±±±±±± ±±±±±±±³ ³
  4808. ³±±±±±±±±± ±±±±±±±±³ 1: INVENTORY ³
  4809. ³±±±±±±±±±±°±±±±±±±±±±±±°±±±±±±±±±³ 2: SEARCH ³
  4810. ³±±±±±±±±±±°±±±±±±±±±±±±°±±±±±±±±±³ 3: SAVE ³
  4811. ³±±±±±±±±±±°±±±±±±±±±±±±°±±±±±±±±±³ ³
  4812. ³±±±±±±±±±±°±±±±±±±±±±±±°±±±±±±±±±³ ³
  4813. ³±±±±±±±±±±°±±±±±±±±±±±±°±±±±±±±±±³ ³
  4814. ³±±±±±±±±±±°±±±±±±±±±±±±°±±±±±±±±±³ ³
  4815. ³±±±±±±±±±±°±±±±±±±±±±±±°±±±±±±±±±³ (Type CANCEL to cancel a command) ³
  4816. ³±±±±±±±±±±°±±±±±±±±±±±±°±±±±±±±±±³ ³
  4817. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  4818. party_print()
  4819. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  4820. status()
  4821. command = msvcrt.getch()
  4822. if command in [b'a',b'A']:
  4823. try:
  4824. current_face = face[alpha - 1]
  4825. except:
  4826. current_face = face[alpha + 4]
  4827. return
  4828. elif command in [b'd',b'D']:
  4829. try:
  4830. current_face = face[alpha + 1]
  4831. except:
  4832. current_face = face[alpha - 3]
  4833. return
  4834. elif command == b'1':
  4835. view_items_noncombat()
  4836. elif command == b'2':
  4837. search()
  4838. elif command == b'3':
  4839. save_game()
  4840.  
  4841. def turn_right():
  4842. global current_face
  4843. turn_right_loop = 'true'
  4844. while turn_right_loop == 'true':
  4845. alpha = face.index(current_face)
  4846. clear_screen()
  4847. time.sleep(0.01)
  4848. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  4849. ³±±±±±±±± ³ ³
  4850. ³±±±±±±±±± ³ 1: INVENTORY ³
  4851. ³±±±±±±±±±±°±±±±±±±±±±±±±±±±±±±±±±³ 2: SEARCH ³
  4852. ³±±±±±±±±±±°±±±±±±±±±±±±±±±±±±±±±±³ 3: SAVE ³
  4853. ³±±±±±±±±±±°±±±±±±±±±±±±±±±±±±±±±±³ ³
  4854. ³±±±±±±±±±±°±±±±±±±±±±±±±±±±±±±±±±³ ³
  4855. ³±±±±±±±±±±°±±±±±±±±±±±±±±±±±±±±±±³ ³
  4856. ³±±±±±±±±±±°±±±±±±±±±±±±±±±±±±±±±±³ ³
  4857. ³±±±±±±±±±±°±±±±±±±±±±±±±±±±±±±±±±³ (Type CANCEL to cancel a command) ³
  4858. ³±±±±±±±±±±°±±±±±±±±±±±±±±±±±±±±±±³ ³
  4859. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  4860. party_print()
  4861. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  4862. status()
  4863. command = msvcrt.getch()
  4864. if command in [b'a',b'A']:
  4865. try:
  4866. current_face = face[alpha - 1]
  4867. except:
  4868. current_face = face[alpha + 4]
  4869. return
  4870. elif command in [b'd',b'D']:
  4871. try:
  4872. current_face = face[alpha + 1]
  4873. except:
  4874. current_face = face[alpha - 3]
  4875. return
  4876. elif command == b'1':
  4877. view_items_noncombat()
  4878. elif command == b'2':
  4879. search()
  4880. elif command == b'3':
  4881. save_game()
  4882.  
  4883. def door_right():
  4884. global current_face
  4885. door_right_loop = 'true'
  4886. while door_right_loop == 'true':
  4887. alpha = face.index(current_face)
  4888. clear_screen()
  4889. time.sleep(0.01)
  4890. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  4891. ³±±±±±±±± ±±±±±±±³ ³
  4892. ³±±±±±±±±± ±±±±±±±±³ 1: INVENTORY ³
  4893. ³±±±±±±±±±±°±±±±±±±±±±±±°±±±±°°±±±³ 2: SEARCH ³
  4894. ³±±±±±±±±±±°±±±±±±±±±±±±°±±±° °±±±³ 3: SAVE ³
  4895. ³±±±±±±±±±±°±±±±±±±±±±±±°±±° °±±±³ ³
  4896. ³±±±±±±±±±±°±±±±±±±±±±±±°±±° °±±±³ ³
  4897. ³±±±±±±±±±±°±±±±±±±±±±±±°±±° °±±±³ ³
  4898. ³±±±±±±±±±±°±±±±±±±±±±±±°±±° °±±±³ ³
  4899. ³±±±±±±±±±±°±±±±±±±±±±±±°±±° °±±±³ (Type CANCEL to cancel a command) ³
  4900. ³±±±±±±±±±±°±±±±±±±±±±±±°±±° °±±±³ ³
  4901. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  4902. party_print()
  4903. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  4904. status()
  4905. command = msvcrt.getch()
  4906. if command in [b'a',b'A']:
  4907. try:
  4908. current_face = face[alpha - 1]
  4909. except:
  4910. current_face = face[alpha + 4]
  4911. return
  4912. elif command in [b'd',b'D']:
  4913. try:
  4914. current_face = face[alpha + 1]
  4915. except:
  4916. current_face = face[alpha - 3]
  4917. return
  4918. elif command == b'1':
  4919. view_items_noncombat()
  4920. elif command == b'2':
  4921. search()
  4922. elif command == b'3':
  4923. save_game()
  4924.  
  4925. def turn_left():
  4926. global current_face
  4927. turn_left_loop = 'true'
  4928. while turn_left_loop == 'true':
  4929. alpha = face.index(current_face)
  4930. clear_screen()
  4931. time.sleep(0.01)
  4932. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  4933. ³ ±±±±±±±³ ³
  4934. ³ ±±±±±±±±³ 1: INVENTORY ³
  4935. ³±±±±±±±±±±±±±±±±±±±±±±±°±±±±±±±±±³ 2: SEARCH ³
  4936. ³±±±±±±±±±±±±±±±±±±±±±±±°±±±±±±±±±³ 3: SAVE ³
  4937. ³±±±±±±±±±±±±±±±±±±±±±±±°±±±±±±±±±³ ³
  4938. ³±±±±±±±±±±±±±±±±±±±±±±±°±±±±±±±±±³ ³
  4939. ³±±±±±±±±±±±±±±±±±±±±±±±°±±±±±±±±±³ ³
  4940. ³±±±±±±±±±±±±±±±±±±±±±±±°±±±±±±±±±³ ³
  4941. ³±±±±±±±±±±±±±±±±±±±±±±±°±±±±±±±±±³ (Type CANCEL to cancel a command) ³
  4942. ³±±±±±±±±±±±±±±±±±±±±±±±°±±±±±±±±±³ ³
  4943. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  4944. party_print()
  4945. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  4946. status()
  4947. command = msvcrt.getch()
  4948. if command in [b'a',b'A']:
  4949. try:
  4950. current_face = face[alpha - 1]
  4951. except:
  4952. current_face = face[alpha + 4]
  4953. return
  4954. elif command in [b'd',b'D']:
  4955. try:
  4956. current_face = face[alpha + 1]
  4957. except:
  4958. current_face = face[alpha - 3]
  4959. return
  4960. elif command == b'1':
  4961. view_items_noncombat()
  4962. elif command == b'2':
  4963. search()
  4964. elif command == b'3':
  4965. save_game()
  4966.  
  4967. def t_intersection():
  4968. global current_face
  4969. t_intersection_loop = 'true'
  4970. while t_intersection_loop == 'true':
  4971. alpha = face.index(current_face)
  4972. clear_screen()
  4973. time.sleep(0.01)
  4974. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  4975. ³ ³ ³
  4976. ³ ³ 1: INVENTORY ³
  4977. ³±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±³ 2: SEARCH ³
  4978. ³±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±³ 3: SAVE ³
  4979. ³±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±³ ³
  4980. ³±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±³ ³
  4981. ³±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±³ ³
  4982. ³±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±³ ³
  4983. ³±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±³ (Type CANCEL to cancel a command) ³
  4984. ³±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±³ ³
  4985. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  4986. party_print()
  4987. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  4988. status()
  4989. command = msvcrt.getch()
  4990. if command in [b'a',b'A']:
  4991. try:
  4992. current_face = face[alpha - 1]
  4993. except:
  4994. current_face = face[alpha + 4]
  4995. return
  4996. elif command in [b'd',b'D']:
  4997. try:
  4998. current_face = face[alpha + 1]
  4999. except:
  5000. current_face = face[alpha - 3]
  5001. return
  5002. elif command == b'1':
  5003. view_items_noncombat()
  5004. elif command == b'2':
  5005. search()
  5006. elif command == b'3':
  5007. save_game()
  5008.  
  5009. def turn_left_door_right():
  5010. global current_face
  5011. turn_left_door_right_loop = 'true'
  5012. while turn_left_door_right_loop == 'true':
  5013. alpha = face.index(current_face)
  5014. clear_screen()
  5015. time.sleep(0.01)
  5016. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  5017. ³ ±±±±±±±³ ³
  5018. ³ ±±±±±±±±³ 1: INVENTORY ³
  5019. ³±±±±±±±±±±±±±±±±±±±±±±±°±±±±°°±±±³ 2: SEARCH ³
  5020. ³±±±±±±±±±±±±±±±±±±±±±±±°±±±° °±±±³ 3: SAVE ³
  5021. ³±±±±±±±±±±±±±±±±±±±±±±±°±±° °±±±³ ³
  5022. ³±±±±±±±±±±±±±±±±±±±±±±±°±±° °±±±³ ³
  5023. ³±±±±±±±±±±±±±±±±±±±±±±±°±±° °±±±³ ³
  5024. ³±±±±±±±±±±±±±±±±±±±±±±±°±±° °±±±³ ³
  5025. ³±±±±±±±±±±±±±±±±±±±±±±±°±±° °±±±³ (Type CANCEL to cancel a command) ³
  5026. ³±±±±±±±±±±±±±±±±±±±±±±±°±±° °±±±³ ³
  5027. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  5028. party_print()
  5029. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  5030. status()
  5031. command = msvcrt.getch()
  5032. if command in [b'a',b'A']:
  5033. try:
  5034. current_face = face[alpha - 1]
  5035. except:
  5036. current_face = face[alpha + 4]
  5037. return
  5038. elif command in [b'd',b'D']:
  5039. try:
  5040. current_face = face[alpha + 1]
  5041. except:
  5042. current_face = face[alpha - 3]
  5043. return
  5044. elif command == b'1':
  5045. view_items_noncombat()
  5046. elif command == b'2':
  5047. search()
  5048. elif command == b'3':
  5049. save_game()
  5050.  
  5051. def door_left():
  5052. global current_face
  5053. door_left_loop = 'true'
  5054. while door_left_loop == 'true':
  5055. alpha = face.index(current_face)
  5056. clear_screen()
  5057. time.sleep(0.01)
  5058. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  5059. ³±±±±±±±± ±±±±±±±³ ³
  5060. ³±±±±±±±±± ±±±±±±±±³ 1: INVENTORY ³
  5061. ³±±±±°°±±±±°±±±±±±±±±±±±°±±±±±±±±±³ 2: SEARCH ³
  5062. ³±±±±° °±±±°±±±±±±±±±±±±°±±±±±±±±±³ 3: SAVE ³
  5063. ³±±±±° °±±°±±±±±±±±±±±±°±±±±±±±±±³ ³
  5064. ³±±±±° °±±°±±±±±±±±±±±±°±±±±±±±±±³ ³
  5065. ³±±±±° °±±°±±±±±±±±±±±±°±±±±±±±±±³ ³
  5066. ³±±±±° °±±°±±±±±±±±±±±±°±±±±±±±±±³ ³
  5067. ³±±±±° °±±°±±±±±±±±±±±±°±±±±±±±±±³ (Type CANCEL to cancel a command) ³
  5068. ³±±±±° °±±°±±±±±±±±±±±±°±±±±±±±±±³ ³
  5069. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  5070. party_print()
  5071. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  5072. status()
  5073. command = msvcrt.getch()
  5074. if command in [b'a',b'A']:
  5075. try:
  5076. current_face = face[alpha - 1]
  5077. except:
  5078. current_face = face[alpha + 4]
  5079. return
  5080. elif command in [b'd',b'D']:
  5081. try:
  5082. current_face = face[alpha + 1]
  5083. except:
  5084. current_face = face[alpha - 3]
  5085. return
  5086. elif command == b'1':
  5087. view_items_noncombat()
  5088. elif command == b'2':
  5089. search()
  5090. elif command == b'3':
  5091. save_game()
  5092.  
  5093. def turn_right_door_left():
  5094. global current_face
  5095. turn_right_door_left_loop = 'true'
  5096. while turn_right_door_left_loop == 'true':
  5097. alpha = face.index(current_face)
  5098. clear_screen()
  5099. time.sleep(0.01)
  5100. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  5101. ³±±±±±±±± ³ ³
  5102. ³±±±±±±±±± ³ 1: INVENTORY ³
  5103. ³±±±±°°±±±±°±±±±±±±±±±±±±±±±±±±±±±³ 2: SEARCH ³
  5104. ³±±±±° °±±±°±±±±±±±±±±±±±±±±±±±±±±³ 3: SAVE ³
  5105. ³±±±±° °±±°±±±±±±±±±±±±±±±±±±±±±±³ ³
  5106. ³±±±±° °±±°±±±±±±±±±±±±±±±±±±±±±±³ ³
  5107. ³±±±±° °±±°±±±±±±±±±±±±±±±±±±±±±±³ ³
  5108. ³±±±±° °±±°±±±±±±±±±±±±±±±±±±±±±±³ ³
  5109. ³±±±±° °±±°±±±±±±±±±±±±±±±±±±±±±±³ (Type CANCEL to cancel a command) ³
  5110. ³±±±±° °±±°±±±±±±±±±±±±±±±±±±±±±±³ ³
  5111. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  5112. party_print()
  5113. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  5114. status()
  5115. command = msvcrt.getch()
  5116. if command in [b'a',b'A']:
  5117. try:
  5118. current_face = face[alpha - 1]
  5119. except:
  5120. current_face = face[alpha + 4]
  5121. return
  5122. elif command in [b'd',b'D']:
  5123. try:
  5124. current_face = face[alpha + 1]
  5125. except:
  5126. current_face = face[alpha - 3]
  5127. return
  5128. elif command == b'1':
  5129. view_items_noncombat()
  5130. elif command == b'2':
  5131. search()
  5132. elif command == b'3':
  5133. save_game()
  5134.  
  5135. def door_right_left():
  5136. global current_face
  5137. door_right_left_loop = 'true'
  5138. while door_right_left_loop == 'true':
  5139. alpha = face.index(current_face)
  5140. clear_screen()
  5141. time.sleep(0.01)
  5142. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  5143. ³±±±±±±±± ±±±±±±±³ ³
  5144. ³±±±±±±±±± ±±±±±±±±³ 1: INVENTORY ³
  5145. ³±±±±°°±±±±°±±±±±±±±±±±±°±±±±°°±±±³ 2: SEARCH ³
  5146. ³±±±±° °±±±°±±±±±±±±±±±±°±±±° °±±±³ 3: SAVE ³
  5147. ³±±±±° °±±°±±±±±±±±±±±±°±±° °±±±³ ³
  5148. ³±±±±° °±±°±±±±±±±±±±±±°±±° °±±±³ ³
  5149. ³±±±±° °±±°±±±±±±±±±±±±°±±° °±±±³ ³
  5150. ³±±±±° °±±°±±±±±±±±±±±±°±±° °±±±³ ³
  5151. ³±±±±° °±±°±±±±±±±±±±±±°±±° °±±±³ (Type CANCEL to cancel a command) ³
  5152. ³±±±±° °±±°±±±±±±±±±±±±°±±° °±±±³ ³
  5153. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  5154. party_print()
  5155. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  5156. status()
  5157. command = msvcrt.getch()
  5158. if command in [b'a',b'A']:
  5159. try:
  5160. current_face = face[alpha - 1]
  5161. except:
  5162. current_face = face[alpha + 4]
  5163. return
  5164. elif command in [b'd',b'D']:
  5165. try:
  5166. current_face = face[alpha + 1]
  5167. except:
  5168. current_face = face[alpha - 3]
  5169. return
  5170. elif command == b'1':
  5171. view_items_noncombat()
  5172. elif command == b'2':
  5173. search()
  5174. elif command == b'3':
  5175. save_game()
  5176.  
  5177. def clear_screen():
  5178. if os.name in("nt","dos","ce"):
  5179. os.system("CLS")
  5180. else:
  5181. print("Error: Unsupported OS.")
  5182. time.sleep(5)
  5183.  
  5184. def combat_battle(i):
  5185.  
  5186. global party_hero
  5187. global party_hero_length
  5188. global party_enemy
  5189. global party_enemy_length
  5190. global battle_loop
  5191. global battle_loop1
  5192.  
  5193. party_hero_length = len(party_hero)
  5194. party_enemy_length = len(party_enemy)
  5195. clear_screen()
  5196. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  5197. ³ ³ ³
  5198. ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ You're fighting an enemy! ³
  5199. ³ ³ ³ ³ ³
  5200. ³ ³ ÛßÛßÛ ³ ³ 1: ATTACK ³
  5201. ³ ³ ÛÛßßßÛÛ ³ ³ 2: INVENTORY ³
  5202. ³ ³ ÛÛÛÛÛÛÛÛÛ ³ ³ 3: ESCAPE ³
  5203. ³ ³ ÛÛÛÛÛÛÛÛÛÛÛ ³ ³ ³
  5204. ³ ³ ³ ³ ³
  5205. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ (Type CANCEL to cancel a command) ³
  5206. ³ ³ ³
  5207. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  5208. party_print()
  5209. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENEMY ÄÄÄÄ""")
  5210. for q in range(3):
  5211. try:
  5212. print(" %s: %s" %(q+1,charadict_enemy[party_enemy[q]][6]))
  5213. except:
  5214. print(" ---")
  5215.  
  5216. command = str(input(("\nWho will %s attack?\n>" % (charadict[party_hero[i]][6]))))
  5217. try:
  5218. command = int(command)
  5219. does_enemy_exist = 'false'
  5220. for k in range(party_enemy_length):
  5221. if charadict_enemy[party_enemy[command-1]][6] == (charadict_enemy[party_enemy[k]][6]):
  5222. combat_action(i,k)
  5223. combat_death(i,k)
  5224. party_enemy_length = len(party_enemy)
  5225. does_enemy_exist = 'true'
  5226. battle_loop1 = 'false'
  5227. break
  5228. else: pass
  5229. if does_enemy_exist == 'false':
  5230. print("That enemy doesn't exist.")
  5231. time.sleep(0.8)
  5232. else: pass
  5233. except (ValueError, IndexError):
  5234. try:
  5235. command = command.capitalize()
  5236. does_enemy_exist = 'false'
  5237. for k in range(party_enemy_length):
  5238. if charadict_enemy[command][6] == (charadict_enemy[party_enemy[k]][6]):
  5239. combat_action(i,k)
  5240. combat_death(i,k)
  5241. party_enemy_length = len(party_enemy)
  5242. does_enemy_exist = 'true'
  5243. battle_loop1 = 'false'
  5244. break
  5245. else: pass
  5246. if does_enemy_exist == 'false':
  5247. print("That enemy doesn't exist.")
  5248. time.sleep(0.8)
  5249. else: pass
  5250. except:
  5251. try:
  5252. command = command.capitalize()
  5253. if command == 'Cancel':
  5254. pass
  5255. else:
  5256. print("That enemy doesn't exist.")
  5257. time.sleep(0.8)
  5258. except:
  5259. print("That enemy doesn't exist.")
  5260. time.sleep(0.8)
  5261.  
  5262. def combat_display():
  5263.  
  5264. global party_hero
  5265. global party_hero_length
  5266. global party_enemy
  5267. global party_enemy_length
  5268. global battle_loop
  5269. global battle_loop1
  5270.  
  5271. while battle_loop == 'true':
  5272. clear_screen()
  5273. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  5274. ³ ³ ³
  5275. ³ ³ ³
  5276. ³ ³ ³
  5277. ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ ³
  5278. ³ ³ RANDOM ENCOUNTER ³ ³ ³
  5279. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ ³
  5280. ³ ³ ³
  5281. ³ ³ ³
  5282. ³ ³ (Type CANCEL to cancel a command) ³
  5283. ³ ³ ³
  5284. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  5285. party_print()
  5286. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  5287. status()
  5288. time.sleep(1)
  5289. battle_loop = 'true2'
  5290.  
  5291. while battle_loop == 'true2':
  5292.  
  5293. party_hero_length = len(party_hero)
  5294. party_enemy_length = len(party_enemy)
  5295.  
  5296. for i in range(party_hero_length):
  5297.  
  5298. if charadict[party_hero[i]][4] > 0:
  5299.  
  5300. battle_loop1 = 'true'
  5301. while battle_loop1 == 'true':
  5302. clear_screen()
  5303. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  5304. ³ ³ ³
  5305. ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ You're fighting an enemy! ³
  5306. ³ ³ ³ ³ ³
  5307. ³ ³ ÛßÛßÛ ³ ³ 1: ATTACK ³
  5308. ³ ³ ÛÛßßßÛÛ ³ ³ 2: INVENTORY ³
  5309. ³ ³ ÛÛÛÛÛÛÛÛÛ ³ ³ 3: ESCAPE ³
  5310. ³ ³ ÛÛÛÛÛÛÛÛÛÛÛ ³ ³ ³
  5311. ³ ³ ³ ³ ³
  5312. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ (Type CANCEL to cancel a command) ³
  5313. ³ ³ ³
  5314. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  5315. party_print()
  5316. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENEMY ÄÄÄÄ""")
  5317. for q in range(3):
  5318. try:
  5319. print(" %s: %s" %(q+1,charadict_enemy[party_enemy[q]][6]))
  5320. except:
  5321. print(" ---")
  5322.  
  5323. command = str(input("\nWhat will %s do?\n>" % (charadict[party_hero[i]][6])))
  5324. try:
  5325. command = int(command)
  5326. does_command_exist = 'false'
  5327. if command_list[command-1] == 'Attack':
  5328. combat_battle(i)
  5329. if len(party_enemy) == 0:
  5330. print("\nParty was victorious!")
  5331. time.sleep(0.8)
  5332. party_gain_exp()
  5333. battle_loop = 'false'
  5334. return
  5335. else: pass
  5336. does_command_exist = 'true'
  5337. elif command_list[command-1] == 'Inventory':
  5338. view_items(i)
  5339. does_command_exist = 'true'
  5340. elif command_list[command-1] == 'Escape':
  5341. if boss == 'true':
  5342. print("You can't escape!")
  5343. time.sleep(0.8)
  5344. else:
  5345. print("Escaped successfully!")
  5346. battle_loop = 'false'
  5347. time.sleep(0.8)
  5348. return
  5349. does_command_exist = 'true'
  5350. else: pass
  5351. if does_command_exist == 'false':
  5352. print("That is not an option. A")
  5353. time.sleep(0.8)
  5354. else: pass
  5355. except:
  5356. try:
  5357. command = command.capitalize()
  5358. does_command_exist = 'false'
  5359. if command == 'Attack':
  5360. combat_battle(i)
  5361. if len(party_enemy) == 0:
  5362. print("\nParty was victorious!")
  5363. time.sleep(0.8)
  5364. party_gain_exp()
  5365. battle_loop = 'false'
  5366. return
  5367. else: pass
  5368. does_command_exist = 'true'
  5369. elif command == 'Inventory':
  5370. view_items(i)
  5371. does_command_exist = 'true'
  5372. elif command == 'Escape':
  5373. if boss == 'true':
  5374. print("You can't escape!")
  5375. time.sleep(0.8)
  5376. else:
  5377. print("Escaped successfully!")
  5378. battle_loop = 'false'
  5379. time.sleep(0.8)
  5380. return
  5381. does_command_exist = 'true'
  5382. else: pass
  5383. if does_command_exist == 'false':
  5384. print("That is not an option. B")
  5385. time.sleep(0.8)
  5386. else: pass
  5387. except:
  5388. print("That is not an option. C")
  5389. time.sleep(0.8)
  5390. else:
  5391. temp = 0
  5392. for u in range(party_hero_length):
  5393. temp += charadict[party_hero[u]][4]
  5394. if temp <= 0:
  5395. print("\nParty has been defeated...")
  5396. time.sleep(0.8)
  5397. sys.exit()
  5398. else: pass
  5399.  
  5400. for k in range(party_enemy_length):
  5401. clear_screen()
  5402. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  5403. ³ ³ ³
  5404. ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ You're fighting an enemy! ³
  5405. ³ ³ ³ ³ ³
  5406. ³ ³ ÛßÛßÛ ³ ³ 1: ATTACK ³
  5407. ³ ³ ÛÛßßßÛÛ ³ ³ 2: INVENTORY ³
  5408. ³ ³ ÛÛÛÛÛÛÛÛÛ ³ ³ 3: ESCAPE ³
  5409. ³ ³ ÛÛÛÛÛÛÛÛÛÛÛ ³ ³ ³
  5410. ³ ³ ³ ³ ³
  5411. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ (Type CANCEL to cancel a command) ³
  5412. ³ ³ ³
  5413. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  5414. party_print()
  5415. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENEMY ÄÄÄÄ""")
  5416. for q in range(3):
  5417. try:
  5418. print(" %s: %s" %(q+1,charadict_enemy[party_enemy[q]][6]))
  5419. except:
  5420. print(" ---")
  5421. i = randint(1,party_hero_length) - 1
  5422. if charadict[party_hero[i]][4] <= 0:
  5423. try:
  5424. i -= 1
  5425. if charadict[party_hero[i]][4] <= 0:
  5426. try:
  5427. i -= 1
  5428. if charadict[party_hero[i]][4] <= 0:
  5429. i -= 1
  5430. try:
  5431. combat_action_enemy(i,k)
  5432. combat_death(i,k)
  5433. except:
  5434. i += 1
  5435. combat_action_enemy(i,k)
  5436. combat_death(i,k)
  5437. else:
  5438. combat_action_enemy(i,k)
  5439. combat_death(i,k)
  5440. except:
  5441. i += 1
  5442. combat_action_enemy(i,k)
  5443. combat_death(i,k)
  5444. else:
  5445. combat_action_enemy(i,k)
  5446. combat_death(i,k)
  5447. except:
  5448. i += 1
  5449. combat_action_enemy(i,k)
  5450. combat_death(i,k)
  5451. else:
  5452. combat_action_enemy(i,k)
  5453. combat_death(i,k)
  5454. temp = 0
  5455. for u in range(party_hero_length):
  5456. temp += charadict[party_hero[u]][4]
  5457. if temp <= 0:
  5458. print("\nParty has been defeated...")
  5459. time.sleep(0.8)
  5460. sys.exit()
  5461. else: pass
  5462.  
  5463. def view_items_noncombat():
  5464.  
  5465. global party_hero
  5466. global party_hero_length
  5467. global items_length
  5468.  
  5469. items_length = len(items_list)
  5470.  
  5471. items_loop = 'true'
  5472. while items_loop == 'true':
  5473. clear_screen()
  5474. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  5475. ³ ³ ³
  5476. ³ ³ Currently accessing inventory... ³
  5477. ³ ³ ³
  5478. ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ ³
  5479. ³ ³ USING INVENTORY ³ ³ ³
  5480. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ ³
  5481. ³ ³ ³
  5482. ³ ³ ³
  5483. ³ ³ (Type CANCEL to cancel a command) ³
  5484. ³ ³ ³
  5485. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ITEMS ÄÄÄÙ""")
  5486. for m in range(8):
  5487. try:
  5488. print(" %s: %s - %s" %(m+1,itemsdict[items_list[m]][2],
  5489. itemsdict[items_list[m]][0]))
  5490. except:
  5491. print(" ---")
  5492.  
  5493. command = str(input("\nWhat item will you use?\n>"))
  5494. try:
  5495. command = int(command)
  5496. does_item_exist = 'false'
  5497. for e in range(items_length):
  5498. if itemsdict[items_list[command-1]][2] == itemsdict[items_list[e]][2]:
  5499. item_target_noncombat(e)
  5500. does_item_exist = 'true'
  5501. return
  5502. else: pass
  5503. if does_item_exist == 'false':
  5504. print("You don't have that item.")
  5505. time.sleep(0.8)
  5506. else: pass
  5507. except:
  5508. try:
  5509. command = command.capitalize()
  5510. does_item_exist = 'false'
  5511. for e in range(items_length):
  5512. if itemsdict[command][2] == itemsdict[items_list[e]][2]:
  5513. item_target_noncombat(e)
  5514. does_item_exist = 'true'
  5515. return
  5516. else: pass
  5517. if does_item_exist == 'false':
  5518. if command == 'Cancel':
  5519. return
  5520. else:
  5521. print("You don't have that item.")
  5522. time.sleep(0.8)
  5523. else: pass
  5524. except:
  5525. try:
  5526. command = command.capitalize()
  5527. if command == 'Cancel':
  5528. return
  5529. else:
  5530. print("You don't have that item.")
  5531. time.sleep(0.8)
  5532. except:
  5533. print("You don't have that item.")
  5534. time.sleep(0.8)
  5535.  
  5536. def view_items(i):
  5537.  
  5538. global party_hero
  5539. global party_hero_length
  5540. global items_length
  5541. global battle_loop1
  5542.  
  5543. items_length = len(items_list)
  5544.  
  5545. items_loop = 'true'
  5546. while items_loop == 'true':
  5547. clear_screen()
  5548. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  5549. ³ ³ ³
  5550. ³ ³ You're fighting an enemy! ³
  5551. ³ ³ ³
  5552. ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ 1: ATTACK ³
  5553. ³ ³ USING INVENTORY ³ ³ 2: INVENTORY ³
  5554. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ 3: ESCAPE ³
  5555. ³ ³ ³
  5556. ³ ³ ³
  5557. ³ ³ (Type CANCEL to cancel a command) ³
  5558. ³ ³ ³
  5559. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ITEMS ÄÄÄÙ""")
  5560. for m in range(8):
  5561. try:
  5562. print(" %s: %s - %s" %(m+1,itemsdict[items_list[m]][2],
  5563. itemsdict[items_list[m]][0]))
  5564. except:
  5565. print(" ---")
  5566.  
  5567. command = str(input("\nWhat item will %s use?\n>" % (charadict[party_hero[i]][6])))
  5568. try:
  5569. command = int(command)
  5570. does_item_exist = 'false'
  5571. for e in range(items_length):
  5572. if itemsdict[items_list[command-1]][2] == itemsdict[items_list[e]][2]:
  5573. item_target(e)
  5574. does_item_exist = 'true'
  5575. return
  5576. else: pass
  5577. if does_item_exist == 'false':
  5578. print("You don't have that item.")
  5579. time.sleep(0.8)
  5580. else: pass
  5581. except:
  5582. try:
  5583. command = command.capitalize()
  5584. does_item_exist = 'false'
  5585. for e in range(items_length):
  5586. if itemsdict[command][2] == itemsdict[items_list[e]][2]:
  5587. item_target(e)
  5588. does_item_exist = 'true'
  5589. return
  5590. else: pass
  5591. if does_item_exist == 'false':
  5592. if command == 'Cancel':
  5593. return
  5594. else:
  5595. print("You don't have that item.")
  5596. time.sleep(0.8)
  5597. else: pass
  5598. except:
  5599. try:
  5600. command = command.capitalize()
  5601. if command == 'Cancel':
  5602. return
  5603. else:
  5604. print("You don't have that item.")
  5605. time.sleep(0.8)
  5606. except:
  5607. print("You don't have that item.")
  5608. time.sleep(0.8)
  5609.  
  5610. def item_target_noncombat(e):
  5611. global party_hero
  5612. global party_hero_length
  5613. global items_length
  5614.  
  5615. party_hero_length = len(party_hero)
  5616. items_length = len(items_list)
  5617. clear_screen()
  5618. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  5619. ³ ³ ³
  5620. ³ ³ Currently accessing inventory... ³
  5621. ³ ³ ³
  5622. ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ ³
  5623. ³ ³ USING INVENTORY ³ ³ ³
  5624. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ ³
  5625. ³ ³ ³
  5626. ³ ³ ³
  5627. ³ ³ (Type CANCEL to cancel a command) ³
  5628. ³ ³ ³
  5629. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  5630. party_print()
  5631. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  5632. status()
  5633. if itemsdict[items_list[e]][4] == 'A':
  5634. command = str(input("\nUse %s on whom?\n>" % (itemsdict[items_list[e]][2])))
  5635. try:
  5636. command = int(command)
  5637. does_target_exist = 'false'
  5638. for f in range(party_hero_length):
  5639. if charadict[party_hero[command-1]][6] == charadict[party_hero[f]][6]:
  5640. charadict[party_hero[f]][itemsdict[items_list[e]][3]] += itemsdict[items_list[e]][1]
  5641. if charadict[party_hero[f]][4] > charadict[party_hero[f]][5]:
  5642. charadict[party_hero[f]][4] = charadict[party_hero[f]][5]
  5643. print("It had no effect...")
  5644. time.sleep(0.8)
  5645. elif charadict[party_hero[f]][3] > 3:
  5646. charadict[party_hero[f]][3] = 3
  5647. print("It had no effect...")
  5648. time.sleep(0.8)
  5649. else:
  5650. print("%s\'s %s rose by %s!" % (charadict[party_hero[f]][6],
  5651. stats_names[itemsdict[items_list[e]][3]],
  5652. itemsdict[items_list[e]][1]))
  5653. time.sleep(0.8)
  5654. del items_list[e]
  5655. does_target_exist = 'true'
  5656. break
  5657. time.sleep(0.8)
  5658. else: pass
  5659. if does_target_exist == 'false':
  5660. print("\nThat character doesn't exist.")
  5661. time.sleep(0.8)
  5662. else: pass
  5663. except:
  5664. try:
  5665. command = command.capitalize()
  5666. does_target_exist = 'false'
  5667. for f in range(party_hero_length):
  5668. if charadict[command][6] == charadict[party_hero[f]][6]:
  5669. charadict[party_hero[f]][itemsdict[items_list[e]][3]] += itemsdict[items_list[e]][1]
  5670. if charadict[party_hero[f]][4] > charadict[party_hero[f]][5]:
  5671. charadict[party_hero[f]][4] = charadict[party_hero[f]][5]
  5672. print("It had no effect...")
  5673. time.sleep(0.8)
  5674. elif charadict[party_hero[f]][3] > 3:
  5675. charadict[party_hero[f]][3] = 3
  5676. print("It had no effect...")
  5677. time.sleep(0.8)
  5678. else:
  5679. print("%s\'s %s rose by %s!" % (charadict[party_hero[f]][6],
  5680. stats_names[itemsdict[items_list[e]][3]],
  5681. itemsdict[items_list[e]][1]))
  5682. time.sleep(0.8)
  5683. del items_list[e]
  5684. does_target_exist = 'true'
  5685. break
  5686. time.sleep(0.8)
  5687. else: pass
  5688. if does_target_exist == 'false':
  5689. print("\nThat character doesn't exist.")
  5690. time.sleep(0.8)
  5691. else: pass
  5692. except:
  5693. try:
  5694. command = command.capitalize()
  5695. if command == 'Cancel':
  5696. return
  5697. else:
  5698. print("\nThat character doesn't exist.")
  5699. time.sleep(0.8)
  5700. except:
  5701. print("\nThat character doesn't exist.")
  5702. time.sleep(0.8)
  5703. elif itemsdict[items_list[e]][4] == 'B':
  5704. command = str(input("\nEquip %s to whom?\n>" % (itemsdict[items_list[e]][2])))
  5705. try:
  5706. command = int(command)
  5707. does_target_exist = 'false'
  5708. for f in range(party_hero_length):
  5709. if charadict[party_hero[command-1]][6] == charadict[party_hero[f]][6]:
  5710. if charadict[party_hero[f]][9] == 0:
  5711. charadict[party_hero[f]][9] = 1
  5712. charadict[party_hero[f]][8] = itemsdict[items_list[e]][2]
  5713. charadict[party_hero[f]][itemsdict[items_list[e]][3]] += itemsdict[items_list[e]][1]
  5714. print("%s equipped %s." %(charadict[party_hero[f]][6],itemsdict[items_list[e]][2]))
  5715. time.sleep(0.8)
  5716. del items_list[e]
  5717. does_target_exist = 'true'
  5718. break
  5719. elif charadict[party_hero[f]][9] == 1:
  5720. command = str(input("%s already has %s. Unequip? Y/N\n>" % (charadict[party_hero[f]][6], charadict[party_hero[f]][8])))
  5721. try:
  5722. command = command.capitalize()
  5723. if command in ['y','Y']:
  5724. charadict[party_hero[f]][8] = charadict[party_hero[f]][8].capitalize()
  5725. charadict[party_hero[f]][itemsdict[items_list[e]][3]] -= itemsdict[charadict[party_hero[f]][8]][1]
  5726. items_list.append(charadict[party_hero[f]][8])
  5727. charadict[party_hero[f]][8] = itemsdict[items_list[e]][2]
  5728. charadict[party_hero[f]][itemsdict[items_list[e]][3]] += itemsdict[items_list[e]][1]
  5729. print("%s equipped %s." %(charadict[party_hero[f]][6],itemsdict[items_list[e]][2]))
  5730. time.sleep(0.8)
  5731. del items_list[e]
  5732. does_target_exist = 'true'
  5733. break
  5734. elif command in ['n','N']: pass
  5735. except:
  5736. print("That doesn't make sense.")
  5737. time.sleep(0.8)
  5738. else: pass
  5739. if does_target_exist == 'false':
  5740. print("\nThat character doesn't exist.")
  5741. time.sleep(0.8)
  5742. else: pass
  5743. except:
  5744. try:
  5745. command = command.capitalize()
  5746. does_target_exist = 'false'
  5747. for f in range(party_hero_length):
  5748. if charadict[command][6] == charadict[party_hero[f]][6]:
  5749. if charadict[party_hero[f]][9] == 0:
  5750. charadict[party_hero[f]][9] = 1
  5751. charadict[party_hero[f]][8] = itemsdict[items_list[e]][2]
  5752. charadict[party_hero[f]][itemsdict[items_list[e]][3]] += itemsdict[items_list[e]][1]
  5753. print("%s equipped %s." %(charadict[party_hero[f]][6],itemsdict[items_list[e]][2]))
  5754. time.sleep(0.8)
  5755. del items_list[e]
  5756. does_target_exist = 'true'
  5757. break
  5758. elif charadict[party_hero[f]][9] == 1:
  5759. command = str(input("%s already has %s. Unequip? Y/N\n>" % (charadict[party_hero[f]][6], charadict[party_hero[f]][8])))
  5760. try:
  5761. command = command.capitalize()
  5762. if command in ['y','Y']:
  5763. charadict[party_hero[f]][8] = charadict[party_hero[f]][8].capitalize()
  5764. charadict[party_hero[f]][itemsdict[items_list[e]][3]] -= itemsdict[charadict[party_hero[f]][8]][1]
  5765. items_list.append(charadict[party_hero[f]][8])
  5766. charadict[party_hero[f]][8] = itemsdict[items_list[e]][2]
  5767. charadict[party_hero[f]][itemsdict[items_list[e]][3]] += itemsdict[items_list[e]][1]
  5768. print("%s equipped %s." %(charadict[party_hero[f]][6],itemsdict[items_list[e]][2]))
  5769. time.sleep(0.8)
  5770. del items_list[e]
  5771. does_target_exist = 'true'
  5772. break
  5773. elif command in ['n','N','Cancel']: pass
  5774. except:
  5775. print("That doesn't make sense.")
  5776. time.sleep(0.8)
  5777. else: pass
  5778. if does_target_exist == 'false':
  5779. print("\nThat character doesn't exist.")
  5780. time.sleep(0.8)
  5781. else: pass
  5782. except:
  5783. try:
  5784. command = command.capitalize()
  5785. if command == 'Cancel':
  5786. return
  5787. else:
  5788. print("\nThat character doesn't exist.")
  5789. time.sleep(0.8)
  5790. except:
  5791. print("\nThat character doesn't exist.")
  5792. time.sleep(0.8)
  5793.  
  5794. def item_target(e):
  5795.  
  5796. global party_hero_length
  5797. global party_hero
  5798. global items_length
  5799. global battle_loop1
  5800.  
  5801. items_length = len(items_list)
  5802. clear_screen()
  5803. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  5804. ³ ³ ³
  5805. ³ ³ You're fighting an enemy! ³
  5806. ³ ³ ³
  5807. ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ 1: ATTACK ³
  5808. ³ ³ USING INVENTORY ³ ³ 2: INVENTORY ³
  5809. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ 3: ESCAPE ³
  5810. ³ ³ ³
  5811. ³ ³ ³
  5812. ³ ³ (Type CANCEL to cancel a command) ³
  5813. ³ ³ ³
  5814. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  5815. party_print()
  5816.  
  5817. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENEMY ÄÄÄÄ""")
  5818. for q in range(3):
  5819. try:
  5820. print(" %s: %s" %(q+1,charadict_enemy[party_enemy[q]][6]))
  5821. except:
  5822. print(" ---")
  5823.  
  5824. if itemsdict[items_list[e]][4] == 'A':
  5825. command = str(input("\nUse %s on whom?\n>" % (itemsdict[items_list[e]][2])))
  5826. try:
  5827. command = int(command)
  5828. does_target_exist = 'false'
  5829. for f in range(party_hero_length):
  5830. if charadict[party_hero[command-1]][6] == charadict[party_hero[f]][6]:
  5831. charadict[party_hero[f]][itemsdict[items_list[e]][3]] += itemsdict[items_list[e]][1]
  5832. if charadict[party_hero[f]][4] > charadict[party_hero[f]][5]:
  5833. charadict[party_hero[f]][4] = charadict[party_hero[f]][5]
  5834. print("It had no effect...")
  5835. time.sleep(0.8)
  5836. elif charadict[party_hero[f]][3] > 3:
  5837. charadict[party_hero[f]][3] = 3
  5838. print("It had no effect...")
  5839. time.sleep(0.8)
  5840. else:
  5841. print("%s\'s %s rose by %s!" % (charadict[party_hero[f]][6],
  5842. stats_names[itemsdict[items_list[e]][3]],
  5843. itemsdict[items_list[e]][1]))
  5844. time.sleep(0.8)
  5845. del items_list[e]
  5846. does_target_exist = 'true'
  5847. battle_loop1 = 'false'
  5848. break
  5849. time.sleep(0.8)
  5850. else: pass
  5851. if does_target_exist == 'false':
  5852. print("\nThat character doesn't exist.")
  5853. time.sleep(0.8)
  5854. else: pass
  5855. except:
  5856. try:
  5857. command = command.capitalize()
  5858. does_target_exist = 'false'
  5859. for f in range(party_hero_length):
  5860. if charadict[command][6] == charadict[party_hero[f]][6]:
  5861. charadict[party_hero[f]][itemsdict[items_list[e]][3]] += itemsdict[items_list[e]][1]
  5862. if charadict[party_hero[f]][4] > charadict[party_hero[f]][5]:
  5863. charadict[party_hero[f]][4] = charadict[party_hero[f]][5]
  5864. print("It had no effect...")
  5865. time.sleep(0.8)
  5866. elif charadict[party_hero[f]][3] > 3:
  5867. charadict[party_hero[f]][3] = 3
  5868. print("It had no effect...")
  5869. time.sleep(0.8)
  5870. else:
  5871. print("%s\'s %s rose by %s!" % (charadict[party_hero[f]][6],
  5872. stats_names[itemsdict[items_list[e]][3]],
  5873. itemsdict[items_list[e]][1]))
  5874. time.sleep(0.8)
  5875. del items_list[e]
  5876. does_target_exist = 'true'
  5877. battle_loop1 = 'false'
  5878. break
  5879. time.sleep(0.8)
  5880. else: pass
  5881. if does_target_exist == 'false':
  5882. print("\nThat character doesn't exist.")
  5883. time.sleep(0.8)
  5884. else: pass
  5885. except:
  5886. try:
  5887. command = command.capitalize()
  5888. if command == 'Cancel':
  5889. return
  5890. else:
  5891. print("\nThat character doesn't exist.")
  5892. time.sleep(0.8)
  5893. except:
  5894. print("\nThat character doesn't exist. D")
  5895. time.sleep(0.8)
  5896. elif itemsdict[items_list[e]][4] == 'B':
  5897. command = str(input("\nEquip %s to whom?\n>" % (itemsdict[items_list[e]][2])))
  5898. try:
  5899. command = int(command)
  5900. does_target_exist = 'false'
  5901. for f in range(party_hero_length):
  5902. if charadict[party_hero[command-1]][6] == charadict[party_hero[f]][6]:
  5903. if charadict[party_hero[f]][9] == 0:
  5904. charadict[party_hero[f]][9] = 1
  5905. charadict[party_hero[f]][8] = itemsdict[items_list[e]][2]
  5906. charadict[party_hero[f]][itemsdict[items_list[e]][3]] += itemsdict[items_list[e]][1]
  5907. print("%s equipped %s." %(charadict[party_hero[f]][6],itemsdict[items_list[e]][2]))
  5908. time.sleep(0.8)
  5909. del items_list[e]
  5910. does_target_exist = 'true'
  5911. battle_loop1 = 'false'
  5912. break
  5913. elif charadict[party_hero[f]][9] == 1:
  5914. command = str(input("%s already has %s. Unequip? Y/N\n>" % (charadict[party_hero[f]][6], charadict[party_hero[f]][8])))
  5915. try:
  5916. command = command.capitalize()
  5917. if command in ['y','Y']:
  5918. charadict[party_hero[f]][8] = charadict[party_hero[f]][8].capitalize()
  5919. charadict[party_hero[f]][itemsdict[items_list[e]][3]] -= itemsdict[charadict[party_hero[f]][8]][1]
  5920. items_list.append(charadict[party_hero[f]][8])
  5921. charadict[party_hero[f]][8] = itemsdict[items_list[e]][2]
  5922. charadict[party_hero[f]][itemsdict[items_list[e]][3]] += itemsdict[items_list[e]][1]
  5923. print("%s equipped %s." %(charadict[party_hero[f]][6],itemsdict[items_list[e]][2]))
  5924. time.sleep(0.8)
  5925. del items_list[e]
  5926. does_target_exist = 'true'
  5927. battle_loop1 = 'false'
  5928. break
  5929. elif command in ['n','N']: pass
  5930. except:
  5931. print("That doesn't make sense.")
  5932. time.sleep(0.8)
  5933. else: pass
  5934. if does_target_exist == 'false':
  5935. print("\nThat character doesn't exist.")
  5936. time.sleep(0.8)
  5937. else: pass
  5938. except:
  5939. try:
  5940. command = command.capitalize()
  5941. does_target_exist = 'false'
  5942. for f in range(party_hero_length):
  5943. if charadict[command][6] == charadict[party_hero[f]][6]:
  5944. if charadict[party_hero[f]][9] == 0:
  5945. charadict[party_hero[f]][9] = 1
  5946. charadict[party_hero[f]][8] = itemsdict[items_list[e]][2]
  5947. charadict[party_hero[f]][itemsdict[items_list[e]][3]] += itemsdict[items_list[e]][1]
  5948. print("%s equipped %s." %(charadict[party_hero[f]][6],itemsdict[items_list[e]][2]))
  5949. time.sleep(0.8)
  5950. del items_list[e]
  5951. does_target_exist = 'true'
  5952. battle_loop1 = 'false'
  5953. break
  5954. elif charadict[party_hero[f]][9] == 1:
  5955. command = str(input("%s already has %s. Unequip? Y/N\n>" % (charadict[party_hero[f]][6], charadict[party_hero[f]][8])))
  5956. try:
  5957. command = command.capitalize()
  5958. if command in ['y','Y']:
  5959. charadict[party_hero[f]][8] = charadict[party_hero[f]][8].capitalize()
  5960. charadict[party_hero[f]][itemsdict[items_list[e]][3]] -= itemsdict[charadict[party_hero[f]][8]][1]
  5961. items_list.append(charadict[party_hero[f]][8])
  5962. charadict[party_hero[f]][8] = itemsdict[items_list[e]][2]
  5963. charadict[party_hero[f]][itemsdict[items_list[e]][3]] += itemsdict[items_list[e]][1]
  5964. print("%s equipped %s." %(charadict[party_hero[f]][6],itemsdict[items_list[e]][2]))
  5965. time.sleep(0.8)
  5966. del items_list[e]
  5967. does_target_exist = 'true'
  5968. battle_loop1 = 'false'
  5969. break
  5970. elif command in ['n','N','Cancel']: pass
  5971. except:
  5972. print("That doesn't make sense.")
  5973. time.sleep(0.8)
  5974. else: pass
  5975. if does_target_exist == 'false':
  5976. print("\nThat character doesn't exist.")
  5977. time.sleep(0.8)
  5978. else: pass
  5979. except:
  5980. try:
  5981. command = command.capitalize()
  5982. if command == 'Cancel':
  5983. return
  5984. else:
  5985. print("\nThat character doesn't exist.")
  5986. time.sleep(0.8)
  5987. except:
  5988. print("\nThat character doesn't exist.")
  5989. time.sleep(0.8)
  5990.  
  5991. def combat_death(i,k):
  5992.  
  5993. global party_hero
  5994. global party_enemy
  5995. global battle_exp
  5996. global party_hero_length
  5997. global party_enemy_length
  5998.  
  5999. if charadict[party_hero[i]][4] <= 0:
  6000. clear_screen()
  6001. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  6002. ³ ³ ³
  6003. ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ You're fighting an enemy! ³
  6004. ³ ³ ³ ³ ³
  6005. ³ ³ ÛßÛßÛ ³ ³ 1: ATTACK ³
  6006. ³ ³ ÛÛßßßÛÛ ³ ³ 2: INVENTORY ³
  6007. ³ ³ ÛÛÛÛÛÛÛÛÛ ³ ³ 3: ESCAPE ³
  6008. ³ ³ ÛÛÛÛÛÛÛÛÛÛÛ ³ ³ ³
  6009. ³ ³ ³ ³ ³
  6010. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ (Type CANCEL to cancel a command) ³
  6011. ³ ³ ³
  6012. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  6013. party_print()
  6014. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENEMY ÄÄÄÄ""")
  6015. for q in range(3):
  6016. try:
  6017. print(" %s: %s" %(q+1,charadict_enemy[party_enemy[q]][6]))
  6018. except:
  6019. print(" ---")
  6020. print("\n%s was defeated!" % (charadict[party_hero[i]][6]))
  6021. time.sleep(0.8)
  6022. else: pass
  6023.  
  6024. if charadict_enemy[party_enemy[k]][4] <= 0:
  6025. charadict_enemy[party_enemy[k]][4] = charadict_enemy[party_enemy[k]][5]
  6026. battle_exp += charadict_enemy[party_enemy[k]][7]
  6027. del party_enemy[k]
  6028. clear_screen()
  6029. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  6030. ³ ³ ³
  6031. ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ You're fighting an enemy! ³
  6032. ³ ³ ³ ³ ³
  6033. ³ ³ ÛßÛßÛ ³ ³ 1: ATTACK ³
  6034. ³ ³ ÛÛßßßÛÛ ³ ³ 2: INVENTORY ³
  6035. ³ ³ ÛÛÛÛÛÛÛÛÛ ³ ³ 3: ESCAPE ³
  6036. ³ ³ ÛÛÛÛÛÛÛÛÛÛÛ ³ ³ ³
  6037. ³ ³ ³ ³ ³
  6038. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ (Type CANCEL to cancel a command) ³
  6039. ³ ³ ³
  6040. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  6041. party_print()
  6042. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENEMY ÄÄÄÄ""")
  6043. for q in range(3):
  6044. try:
  6045. print(" %s: %s" %(q+1,charadict_enemy[party_enemy[q]][6]))
  6046. except:
  6047. print(" ---")
  6048. else: pass
  6049.  
  6050. def combat_action(i,k):
  6051.  
  6052. global party_hero
  6053. global party_enemy
  6054.  
  6055. multiple_attack = 'false'
  6056. for j in range(charadict[party_hero[i]][3]):
  6057. roll_global = randint(1,100)
  6058. if multiple_attack == 'false':
  6059. clear_screen()
  6060. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  6061. ³ ³ ³
  6062. ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ You're fighting an enemy! ³
  6063. ³ ³ ³ ³ ³
  6064. ³ ³ ÛßÛßÛ ³ ³ 1: ATTACK ³
  6065. ³ ³ ÛÛßßßÛÛ ³ ³ 2: INVENTORY ³
  6066. ³ ³ ÛÛÛÛÛÛÛÛÛ ³ ³ 3: ESCAPE ³
  6067. ³ ³ ÛÛÛÛÛÛÛÛÛÛÛ ³ ³ ³
  6068. ³ ³ ³ ³ ³
  6069. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ (Type CANCEL to cancel a command) ³
  6070. ³ ³ ³
  6071. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  6072. party_print()
  6073. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENEMY ÄÄÄÄ""")
  6074. for q in range(3):
  6075. try:
  6076. print(" %s: %s" %(q+1,charadict_enemy[party_enemy[q]][6]))
  6077. except:
  6078. print(" ---")
  6079. print("\n%s attacked %s..." % (charadict[party_hero[i]][6],
  6080. charadict_enemy[party_enemy[k]][6]))
  6081. else:
  6082. clear_screen()
  6083. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  6084. ³ ³ ³
  6085. ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ You're fighting an enemy! ³
  6086. ³ ³ ³ ³ ³
  6087. ³ ³ ÛßÛßÛ ³ ³ 1: ATTACK ³
  6088. ³ ³ ÛÛßßßÛÛ ³ ³ 2: INVENTORY ³
  6089. ³ ³ ÛÛÛÛÛÛÛÛÛ ³ ³ 3: ESCAPE ³
  6090. ³ ³ ÛÛÛÛÛÛÛÛÛÛÛ ³ ³ ³
  6091. ³ ³ ³ ³ ³
  6092. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ (Type CANCEL to cancel a command) ³
  6093. ³ ³ ³
  6094. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  6095. party_print()
  6096. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENEMY ÄÄÄÄ""")
  6097. for q in range(3):
  6098. try:
  6099. print(" %s: %s" %(q+1,charadict_enemy[party_enemy[q]][6]))
  6100. except:
  6101. print(" ---")
  6102. print("\n%s attacked again..." % (charadict[party_hero[i]][6]))
  6103. time.sleep(0.8)
  6104. if roll_global >= 95:
  6105. print("and hit for 3 damage! Critical hit!")
  6106. time.sleep(0.8)
  6107. charadict_enemy[party_enemy[k]][4] -= 3
  6108. multiple_attack = 'true'
  6109. elif roll_global >= hit[charadict[party_hero[i]][1]-1][charadict_enemy[party_enemy[k]][2]-1]:
  6110. print("and hit for 1 damage!")
  6111. time.sleep(0.8)
  6112. charadict_enemy[party_enemy[k]][4] -= 1
  6113. multiple_attack = 'true'
  6114. else:
  6115. print("but missed!")
  6116. time.sleep(0.8)
  6117. break
  6118.  
  6119. def combat_action_enemy(i,k):
  6120.  
  6121. global party_hero
  6122. global party_enemy
  6123.  
  6124. multiple_attack = 'false'
  6125. for j in range(charadict_enemy[party_enemy[k]][3]):
  6126. roll_global = randint(1,100)
  6127. if multiple_attack == 'false':
  6128. clear_screen()
  6129. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  6130. ³ ³ ³
  6131. ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ You're fighting an enemy! ³
  6132. ³ ³ ³ ³ ³
  6133. ³ ³ ÛßÛßÛ ³ ³ 1: ATTACK ³
  6134. ³ ³ ÛÛßßßÛÛ ³ ³ 2: INVENTORY ³
  6135. ³ ³ ÛÛÛÛÛÛÛÛÛ ³ ³ 3: ESCAPE ³
  6136. ³ ³ ÛÛÛÛÛÛÛÛÛÛÛ ³ ³ ³
  6137. ³ ³ ³ ³ ³
  6138. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ (Type CANCEL to cancel a command) ³
  6139. ³ ³ ³
  6140. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  6141. party_print()
  6142. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENEMY ÄÄÄÄ""")
  6143. for q in range(3):
  6144. try:
  6145. print(" %s: %s" %(q+1,charadict_enemy[party_enemy[q]][6]))
  6146. except:
  6147. print(" ---")
  6148. print("\n%s attacked %s..." % (charadict_enemy[party_enemy[k]][6],
  6149. charadict[party_hero[i]][6]))
  6150. else:
  6151. clear_screen()
  6152. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  6153. ³ ³ ³
  6154. ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ You're fighting an enemy! ³
  6155. ³ ³ ³ ³ ³
  6156. ³ ³ ÛßÛßÛ ³ ³ 1: ATTACK ³
  6157. ³ ³ ÛÛßßßÛÛ ³ ³ 2: INVENTORY ³
  6158. ³ ³ ÛÛÛÛÛÛÛÛÛ ³ ³ 3: ESCAPE ³
  6159. ³ ³ ÛÛÛÛÛÛÛÛÛÛÛ ³ ³ ³
  6160. ³ ³ ³ ³ ³
  6161. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ (Type CANCEL to cancel a command) ³
  6162. ³ ³ ³
  6163. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  6164. party_print()
  6165. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENEMY ÄÄÄÄ""")
  6166. for q in range(3):
  6167. try:
  6168. print(" %s: %s" %(q+1,charadict_enemy[party_enemy[q]][6]))
  6169. except:
  6170. print(" ---")
  6171. print("\n%s attacked again..." % (charadict[party_hero[i]][6]))
  6172. time.sleep(0.8)
  6173. if roll_global <= hit[charadict_enemy[party_enemy[k]][1]-1][charadict[party_hero[i]][2]-1]:
  6174. print("and hit for 1 damage!")
  6175. time.sleep(0.8)
  6176. charadict[party_hero[i]][4] -= 1
  6177. multiple_attack = 'true'
  6178. else:
  6179. print("but missed!")
  6180. time.sleep(0.8)
  6181. break
  6182.  
  6183. def party_print():
  6184. for q in range(4):
  6185. try:
  6186. if len(charadict[party_hero[q]][6]) == 10:
  6187. print(" %s Lv. %s HP: %s/%s STR: %s DEF: %s HIT: %s %s"
  6188. %(charadict[party_hero[q]][6],
  6189. charadict[party_hero[q]][7],
  6190. charadict[party_hero[q]][4],
  6191. charadict[party_hero[q]][5],
  6192. charadict[party_hero[q]][1],
  6193. charadict[party_hero[q]][2],
  6194. charadict[party_hero[q]][3],
  6195. charadict[party_hero[q]][8]))
  6196. elif len(charadict[party_hero[q]][6]) == 9:
  6197. print(" %s Lv. %s HP: %s/%s STR: %s DEF: %s HIT: %s %s"
  6198. %(charadict[party_hero[q]][6],
  6199. charadict[party_hero[q]][7],
  6200. charadict[party_hero[q]][4],
  6201. charadict[party_hero[q]][5],
  6202. charadict[party_hero[q]][1],
  6203. charadict[party_hero[q]][2],
  6204. charadict[party_hero[q]][3],
  6205. charadict[party_hero[q]][8]))
  6206. elif len(charadict[party_hero[q]][6]) == 8:
  6207. print(" %s Lv. %s HP: %s/%s STR: %s DEF: %s HIT: %s %s"
  6208. %(charadict[party_hero[q]][6],
  6209. charadict[party_hero[q]][7],
  6210. charadict[party_hero[q]][4],
  6211. charadict[party_hero[q]][5],
  6212. charadict[party_hero[q]][1],
  6213. charadict[party_hero[q]][2],
  6214. charadict[party_hero[q]][3],
  6215. charadict[party_hero[q]][8]))
  6216. elif len(charadict[party_hero[q]][6]) == 7:
  6217. print(" %s Lv. %s HP: %s/%s STR: %s DEF: %s HIT: %s %s"
  6218. %(charadict[party_hero[q]][6],
  6219. charadict[party_hero[q]][7],
  6220. charadict[party_hero[q]][4],
  6221. charadict[party_hero[q]][5],
  6222. charadict[party_hero[q]][1],
  6223. charadict[party_hero[q]][2],
  6224. charadict[party_hero[q]][3],
  6225. charadict[party_hero[q]][8]))
  6226. elif len(charadict[party_hero[q]][6]) == 6:
  6227. print(" %s Lv. %s HP: %s/%s STR: %s DEF: %s HIT: %s %s"
  6228. %(charadict[party_hero[q]][6],
  6229. charadict[party_hero[q]][7],
  6230. charadict[party_hero[q]][4],
  6231. charadict[party_hero[q]][5],
  6232. charadict[party_hero[q]][1],
  6233. charadict[party_hero[q]][2],
  6234. charadict[party_hero[q]][3],
  6235. charadict[party_hero[q]][8]))
  6236. elif len(charadict[party_hero[q]][6]) == 5:
  6237. print(" %s Lv. %s HP: %s/%s STR: %s DEF: %s HIT: %s %s"
  6238. %(charadict[party_hero[q]][6],
  6239. charadict[party_hero[q]][7],
  6240. charadict[party_hero[q]][4],
  6241. charadict[party_hero[q]][5],
  6242. charadict[party_hero[q]][1],
  6243. charadict[party_hero[q]][2],
  6244. charadict[party_hero[q]][3],
  6245. charadict[party_hero[q]][8]))
  6246. elif len(charadict[party_hero[q]][6]) == 4:
  6247. print(" %s Lv. %s HP: %s/%s STR: %s DEF: %s HIT: %s %s"
  6248. %(charadict[party_hero[q]][6],
  6249. charadict[party_hero[q]][7],
  6250. charadict[party_hero[q]][4],
  6251. charadict[party_hero[q]][5],
  6252. charadict[party_hero[q]][1],
  6253. charadict[party_hero[q]][2],
  6254. charadict[party_hero[q]][3],
  6255. charadict[party_hero[q]][8]))
  6256. elif len(charadict[party_hero[q]][6]) == 3:
  6257. print(" %s Lv. %s HP: %s/%s STR: %s DEF: %s HIT: %s %s"
  6258. %(charadict[party_hero[q]][6],
  6259. charadict[party_hero[q]][7],
  6260. charadict[party_hero[q]][4],
  6261. charadict[party_hero[q]][5],
  6262. charadict[party_hero[q]][1],
  6263. charadict[party_hero[q]][2],
  6264. charadict[party_hero[q]][3],
  6265. charadict[party_hero[q]][8]))
  6266. elif len(charadict[party_hero[q]][6]) == 2:
  6267. print(" %s Lv. %s HP: %s/%s STR: %s DEF: %s HIT: %s %s"
  6268. %(charadict[party_hero[q]][6],
  6269. charadict[party_hero[q]][7],
  6270. charadict[party_hero[q]][4],
  6271. charadict[party_hero[q]][5],
  6272. charadict[party_hero[q]][1],
  6273. charadict[party_hero[q]][2],
  6274. charadict[party_hero[q]][3],
  6275. charadict[party_hero[q]][8]))
  6276. elif len(charadict[party_hero[q]][6]) == 1:
  6277. print(" %s Lv. %s HP: %s/%s STR: %s DEF: %s HIT: %s %s"
  6278. %(charadict[party_hero[q]][6],
  6279. charadict[party_hero[q]][7],
  6280. charadict[party_hero[q]][4],
  6281. charadict[party_hero[q]][5],
  6282. charadict[party_hero[q]][1],
  6283. charadict[party_hero[q]][2],
  6284. charadict[party_hero[q]][3],
  6285. charadict[party_hero[q]][8]))
  6286. except:
  6287. print(" ---")
  6288.  
  6289. def party_gain_exp():
  6290.  
  6291. global battle_exp
  6292. global party_hero_length
  6293.  
  6294. party_hero_length = len(party_hero)
  6295.  
  6296. for i in range(party_hero_length):
  6297.  
  6298. if charadict[party_hero[i]][4] > 0:
  6299.  
  6300. charadict[party_hero[i]][10] -= battle_exp
  6301. clear_screen()
  6302. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  6303. ³ ³ ³
  6304. ³ ³ You're fighting an enemy! ³
  6305. ³ ³ ³
  6306. ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ 1: ATTACK ³
  6307. ³ ³ EXPERIENCE GAINED ³ ³ 2: INVENTORY ³
  6308. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ 3: ESCAPE ³
  6309. ³ ³ ³
  6310. ³ ³ ³
  6311. ³ ³ (Type CANCEL to cancel a command) ³
  6312. ³ ³ ³
  6313. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  6314. party_print()
  6315. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENEMY ÄÄÄÄ""")
  6316. for q in range(3):
  6317. try:
  6318. print(" %s: %s" %(q+1,charadict_enemy[party_enemy[q]][6]))
  6319. except:
  6320. print(" ---")
  6321.  
  6322. print("\n%s gained %s EXP!" %(charadict[party_hero[i]][6],battle_exp))
  6323. time.sleep(0.8)
  6324. if charadict[party_hero[i]][10] <= 0:
  6325. charadict[party_hero[i]][7] += 1
  6326. charadict[party_hero[i]][10] += charadict[party_hero[i]][7]*10
  6327.  
  6328. clear_screen()
  6329. print("""ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  6330. ³ ³ ³
  6331. ³ ³ You're fighting an enemy! ³
  6332. ³ ³ ³
  6333. ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ 1: ATTACK ³
  6334. ³ ³ EXPERIENCE GAINED ³ ³ 2: INVENTORY ³
  6335. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ 3: ESCAPE ³
  6336. ³ ³ ³
  6337. ³ ³ ³
  6338. ³ ³ (Type CANCEL to cancel a command) ³
  6339. ³ ³ ³
  6340. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  6341. party_print()
  6342. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ENEMY ÄÄÄÄ""")
  6343. for q in range(3):
  6344. try:
  6345. print(" %s: %s" %(q+1,charadict_enemy[party_enemy[q]][6]))
  6346. except:
  6347. print(" ---")
  6348.  
  6349. print("\n%s leveled up!" %(charadict[party_hero[i]][6]))
  6350. time.sleep(0.8)
  6351.  
  6352. if charadict[party_hero[i]][7] % 5 == 0:
  6353. stat_roll = randint(1,4)
  6354.  
  6355. if stat_roll == 1:
  6356. charadict[party_hero[i]][1] += 1
  6357. print("%s\'s STR rose by 1!" %(charadict[party_hero[i]][6]))
  6358. time.sleep(0.8)
  6359.  
  6360. elif stat_roll == 2:
  6361. charadict[party_hero[i]][2] += 1
  6362. print("%s\'s DEF rose by 1!" %(charadict[party_hero[i]][6]))
  6363. time.sleep(0.8)
  6364.  
  6365. elif stat_roll == 3:
  6366. charadict[party_hero[i]][5] += 1
  6367. print("%s\'s max HP rose by 1!" %(charadict[party_hero[i]][6]))
  6368. time.sleep(0.8)
  6369.  
  6370. elif stat_roll == 4:
  6371. charadict[party_hero[i]][3] += 1
  6372. if charadict[party_hero[i]][3] > 3:
  6373. charadict[party_hero[i]][3] = 3
  6374. else:
  6375. print("%s\'s HIT rose by 1!" %(charadict[party_hero[i]][6]))
  6376. time.sleep(0.8)
  6377. else: pass
  6378. else: pass
  6379. else: pass
  6380.  
  6381. battle_exp = 0
  6382.  
  6383. def status():
  6384. global current_face
  6385. print("Current Position: (%s,%s)" %(current_position[1],current_position[0]))
  6386. print("Facing %s" %(current_face))
  6387. print(step)
  6388.  
  6389. def search():
  6390. print("This feature is not implemented yet.")
  6391.  
  6392. def descend_floors():
  6393. print("hehe")
  6394.  
  6395. def change_floors():
  6396. print("hehe")
  6397.  
  6398. def open_door():
  6399. global current_position
  6400. print("Try opening the door? Y/N")
  6401. command = msvcrt.getch()
  6402. if command in [b'y',b'Y']:
  6403. print("You opened the door.")
  6404. time.sleep(0.8)
  6405. if current_face == 'North':
  6406. current_position[0] -= 2
  6407. elif current_face == 'East':
  6408. current_position[1] += 2
  6409. elif current_face == 'South':
  6410. current_position[0] += 2
  6411. elif current_face == 'West':
  6412. current_position[1] -= 2
  6413. return
  6414. elif command in [b'n',b'N']: return
  6415. else: return
  6416.  
  6417.  
  6418. def save_game():
  6419. print("This feature is not implemented yet.")
  6420. time.sleep(0.8)
  6421.  
  6422. def title_screen_main():
  6423. title_screen_loop1 = 'true'
  6424. while title_screen_loop1 == 'true':
  6425. input("""
  6426.  
  6427.  
  6428.  
  6429.  
  6430.  
  6431.  
  6432.  
  6433. DRAGONISH QUEST
  6434. v1.02
  6435.  
  6436.  
  6437.  
  6438. Press ENTER to continue.\n""")
  6439. clear_screen()
  6440. time.sleep(0.01)
  6441. title_screen_options()
  6442.  
  6443. def title_screen_options():
  6444. title_screen_loop2 = 'true'
  6445. while title_screen_loop2 == 'true':
  6446. clear_screen()
  6447. print("""
  6448.  
  6449.  
  6450.  
  6451.  
  6452.  
  6453.  
  6454.  
  6455. DRAGONISH QUEST
  6456. v1.02
  6457.  
  6458. 1: New Game
  6459. 2: Continue
  6460. 3: Quit\n""")
  6461. command = msvcrt.getch()
  6462. if command == b'1':
  6463. print("Starting new game...")
  6464. time.sleep(2)
  6465. new_game()
  6466. elif command == b'2':
  6467. print("This feature is not implemented yet.")
  6468. time.sleep(0.8)
  6469. elif command == b'3':
  6470. print("Shutting down...")
  6471. time.sleep(3)
  6472. sys.exit()
  6473. else: pass
  6474.  
  6475. def new_game():
  6476. clear_screen()
  6477. time.sleep(0.01)
  6478. print("""
  6479. ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ COMMAND ÄÄÄ¿
  6480. ³ ³ ³
  6481. ³ ³ Currently in town... ³
  6482. ³ °°°°°°°°°°° ³ ³
  6483. ³ °°ÛÛÛÛÛ°°°°°° ³ 1: INVENTORY ³
  6484. ³ °°Û°Û°Û°Û°°°°°° ³ 2: SAVE ³
  6485. ³ ÛÛÛÛÛÛÛÛÛ°ÛÛÛ ³ ³
  6486. ³ Û ÛÛÛ Û°ÛÛÛ ³ ³
  6487. ³ Û ÛÛÛ Û°ÛÛÛ ³ ³
  6488. ³ ³ (Type CANCEL to cancel a command) ³
  6489. ³ ³ ³
  6490. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PARTY ÄÄÄÙ""")
  6491. party_print()
  6492. print("""ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ STATS ÄÄÄÄ""")
  6493. status()
  6494. time.sleep(3600)
  6495.  
  6496. dungeon_main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement