diff --git a/ActionModul.py b/ActionModul.py index f72e5e0..e235344 100644 --- a/ActionModul.py +++ b/ActionModul.py @@ -123,11 +123,11 @@ class ActionModul(ActionBasics): if item.id ==self.world.ITEM_JACKE: self.setFehler('Also du die Jacke anziehst, findest du einen kleine Schlüssel in der Tasche.') self.findeTruhenschluessel() - elif item.id == self.world.ITEM_LEITER: + elif self.isItem(item,self.world.ITEM_LEITER): if(self.world.aktuellerRaum.id == self.world.RAUM_ESSZIMMER): logging.debug(f'aktuellerRaum ist {self.world.aktuellerRaum.id}') self.rauf() - elif item.id == self.world.ITEM_PLANKE: + elif self.isItem(item,self.world.ITEM_PLANKE): if self.isAktuellerRaum(self.world.RAUM_BACH): self.baueBruecke() self.setFehler('Du legst die Planke über den Bach und es ensteht eine Brücke.') @@ -136,6 +136,12 @@ class ActionModul(ActionBasics): elif self.isItem(item, self.world.ITEM_SCHWIMMWESTE): item.zustand = item.ANGEZOGEN self.setFehler('Du ziehst die Schwimmweste an.') + elif self.isItem(item,self.world.ITEM_DIAMANT): + if self.isAktuellerRaum(self.world.RAUM_MAUER): + self.world.printText('graböffnung') + self.world.aktuellerRaum.ausgaenge[self.world.SUED] = self.world.RAUM_GRAB + else: + self.setFehler('Nichts passiert.') diff --git a/TestModule.py b/TestModule.py index 755f9c4..79a538a 100644 --- a/TestModule.py +++ b/TestModule.py @@ -375,7 +375,14 @@ class TestModule: # Insel self.ac.rauf() self.schrittzaehler += 1 - # return + + # Palme + self.ac.rauf() + self.schrittzaehler += 1 + + # Insel + self.ac.runter() + self.schrittzaehler += 1 #Beiboot self.ac.ost() @@ -433,4 +440,16 @@ class TestModule: def testMauer(self): self.testStatue() + # Mauer + self.ac.ost() + + pcmd = self.parseInput('untersuche Mauer') + self.ac.untersuche(pcmd) + + pcmd = self.parseInput('benutze Diamant') + self.ac.benutze(pcmd) + + #Grab + self.ac.sued() + \ No newline at end of file diff --git a/World.py b/World.py index 9c0b8f4..240a769 100644 --- a/World.py +++ b/World.py @@ -99,7 +99,9 @@ class World: def fortschritt(self): anz_raeume, anz_entdeckt = self.zaehleRaeume() - return round((anz_entdeckt/anz_raeume) *100,2) + progress = round((anz_entdeckt/anz_raeume) *100,2) + logging.debug(f'anz_raeume={anz_raeume}, entdeckt={anz_entdeckt}, progress={progress}') + return progress def printRaum(self): raum = self.aktuellerRaum @@ -453,7 +455,7 @@ class World: self.RAUM_WALD = '36' self.RAUM_STATUE = '37' self.RAUM_KOPF = '38' - self.RAUM_MAUER = '41' + self.RAUM_MAUER = '39' self.RAUM_GRAB = '40' diff --git a/tomb.py b/tomb.py index a833593..e7c0793 100755 --- a/tomb.py +++ b/tomb.py @@ -128,6 +128,8 @@ def inputLoop(stdscr): commandid = '0' elif debugcommand[1] == 'weg': logging.debug(f'gelaufener Weg: {world.weg}') + elif debugcommand[1] == 'unvisited': + debug_NonVisited() elif command.startswith('auto:'): command = command.rstrip() @@ -158,6 +160,8 @@ def inputLoop(stdscr): testmodul.testKlippe() elif debugcommand[1] == 'statue': testmodul.testStatue() + elif debugcommand[1] == 'mauer': + testmodul.testMauer() world.fehler = '' @@ -170,6 +174,15 @@ def inputLoop(stdscr): verarbeiteBefehl(parsedCommand) actionmodul.raumaction() +def debug_NonVisited(): + logging.debug('nicht entdeckte Räume:') + + for raumid in world.raumliste: + raum = world.raumliste[raumid] + + if not raum.entdeckt: + logging.debug(f'{raum.id} - {raum.name}') + def debug_Personen(): logging.debug('Personen im aktuellen Raum') diff --git a/world.xml b/world.xml index 5e60e23..75aeef6 100644 --- a/world.xml +++ b/world.xml @@ -249,12 +249,13 @@ + Du stehst vor einer Mauer. - + Das Grab des Azteken. Du bist am Ziel. @@ -508,5 +509,9 @@ Der Stier ist völlig fasziniert, als du die Jacke hin und herschwenkst. Als du sie nach Osten wirfst, schaubt er einmal auf und rennt hinter her. + + Also du den Diamant in den Sockel setzt, schiebt sich ein Teil der Mauer knirschend nach hinten und gibt einen Durchgang frei. Staubige Luft + quillt dir entgegen. +