Entdeckung des Fischs
This commit is contained in:
@@ -155,6 +155,12 @@ class ActionModul:
|
||||
schluessel.sichtbar = True
|
||||
self.insInventar(schluessel)
|
||||
|
||||
def schlage(self, parsedCommand):
|
||||
item = self.world.findItemInAktuellerRaum(parsedCommand.gegenstand)
|
||||
|
||||
if item.id == self.world.ITEM_BOXSACK:
|
||||
self.setFehler('Der Boxsack sagt: Hmm, hmm?')
|
||||
|
||||
|
||||
def zeigeItemBeschreibung(self,item):
|
||||
self.world.printText(f'item-{item.id}')
|
||||
@@ -183,17 +189,15 @@ class ActionModul:
|
||||
schluessel = self.world.findRaumItemById(self.world.ITEM_HAUSTUERSCHLUESSEL)
|
||||
schluessel.sichtbar = True
|
||||
elif item.id == self.world.ITEM_TEICH:
|
||||
self.setFehler('Im Teich schwimmt ein kleiner Fish')
|
||||
fisch = self.world.findItemInAktuellerRaum(self.world.ITEM_FISCH)
|
||||
fisch = self.world.findItemById(self.world.ITEM_FISCH)
|
||||
|
||||
if fisch.raumid == self.world.RAUM_TEICH:
|
||||
fisch.sichtbar = True
|
||||
self.setFehler('Im Teich schwimmt ein kleiner Fisch')
|
||||
fisch = self.world.findItemById(self.world.ITEM_FISCH)
|
||||
fisch.sichtbar = True
|
||||
elif item.id == self.world.ITEM_JACKE:
|
||||
self.findeTruhenschluessel()
|
||||
elif item.id == self.world.ITEM_TEICH:
|
||||
fisch = self.world.findItemById(self.world.ITEM_FISCH)
|
||||
|
||||
fisch.sichtbar = True
|
||||
if fisch.raumid == self.world.RAUM_TEICH:
|
||||
self.setFehler('Im Teich schwimmt ein kleiner Fisch')
|
||||
else:
|
||||
self.zeigeItemBeschreibung(item)
|
||||
|
||||
|
@@ -92,7 +92,14 @@ class TestModule:
|
||||
self.ac.runter()
|
||||
#Zum Bach
|
||||
self.ac.sued()
|
||||
|
||||
|
||||
pcmd = self.parseInput('verliere Planke')
|
||||
self.ac.verliere(pcmd)
|
||||
|
||||
#Zum Teich
|
||||
self.ac.sued()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
1
World.py
1
World.py
@@ -244,6 +244,7 @@ class World:
|
||||
self.ITEM_TEICH = '16'
|
||||
self.ITEM_FISCH = '17'
|
||||
self.ITEM_SCHWERT = '18'
|
||||
self.ITEM_BOXSACK = '19'
|
||||
|
||||
# Räume
|
||||
|
||||
|
4
tomb.py
4
tomb.py
@@ -56,6 +56,8 @@ def verarbeiteBefehl(parsedCommand):
|
||||
actionmodul.fange(parsedCommand)
|
||||
elif id == '23':
|
||||
actionmodul.hilfe()
|
||||
elif id == '24':
|
||||
actionmodul.schlage(parsedCommand)
|
||||
elif id == '-1':
|
||||
world.fehler = 'Ich verstehe diesen Befehl nicht'
|
||||
else:
|
||||
@@ -121,7 +123,7 @@ def debug_Items():
|
||||
count = 0
|
||||
for item in world.gegenstaende:
|
||||
logging.debug(f'count= {count}')
|
||||
logging.debug(f'Itemtyp: ' + {item})
|
||||
logging.debug(f'Itemtyp: {type(item)}')
|
||||
# logging.debug(f'Item-IdId:{item.id} - Item-Name:{item.name}')
|
||||
count = count +1
|
||||
|
||||
|
13
world.xml
13
world.xml
@@ -4,7 +4,7 @@
|
||||
<raum id='1' name='Esszimmer'>
|
||||
<ausgang dir='Sued' nachRaum='3' />
|
||||
<ausgang dir='Rauf' nachRaum='2' />
|
||||
<beschreibung> Vor dem Fenster steht ein Tisch, rechts davon führt eine Leiter nach oben.
|
||||
<beschreibung> Vor dem Fenster steht ein Tisch, rechts davon führt eine Leiter nach oben. In der Ecke steht ein Boxsack.
|
||||
</beschreibung>
|
||||
|
||||
</raum>
|
||||
@@ -104,6 +104,9 @@
|
||||
<command name='klettere' id='24' key='21' />
|
||||
<command name='fange' id='25' key='22' />
|
||||
<command name='hilfe' id='28' key='23' />
|
||||
<command name='schlage' id='29' key='24' />
|
||||
<command name='boxe' id='30' key='24' />
|
||||
|
||||
</commandset>
|
||||
|
||||
<adjektive>
|
||||
@@ -141,9 +144,10 @@
|
||||
<item name='Haustürschlüssel' id='13' raum='4' imobil='false' adjektiv = '0' msgid='1' visible='false' />
|
||||
<item name='Rankgitter' id='14' raum='6' imobil='false' adjektiv = '0' msgid='3' visible='true' />
|
||||
<item name='Planke' id='15' raum='7' imobil='false' adjektiv = '0' msgid='3' visible='true' />
|
||||
<item name='Teich' id='16' raum='9' imobil='true' adjektiv = '0' msgid='2' visible='true' />
|
||||
<item name='Fisch' id='17' raum='9' imobil='false' adjektiv = '0' msgid='0' visible='false' />
|
||||
<item name='Teich' id='16' raum='10' imobil='true' adjektiv = '0' msgid='2' visible='true' />
|
||||
<item name='Fisch' id='17' raum='10' imobil='false' adjektiv = '0' msgid='0' visible='false' />
|
||||
<item name='Schwert' id='18' raum='-1' imobil='false' adjektiv = '0' msgid='1' visible='false' />
|
||||
<item name='Boxsack' id='19' raum='1' imobil='true' adjektiv = '0' msgid='1' visible='true' />
|
||||
|
||||
</items>
|
||||
<personen>
|
||||
@@ -179,6 +183,9 @@
|
||||
<text id='item-15'>
|
||||
Die Planke wirkt stabil genug, dein Gewicht zu tragen.
|
||||
</text>
|
||||
<text id='item-19'>
|
||||
Der Boxsack trägt die Aufschrift: Eigentum von Maddes. Außerdem hat jemand ein großes V draufgemalt.
|
||||
</text>
|
||||
<text id='item-9'>
|
||||
Das Tor besteht aus schmideeisernen Stäben, die geschmiedete Querträger halten. Das Tor ist an den Seiten in Führungsschienen
|
||||
eingelassen. Auf der rechten Seite befindet sich etwa in der Mitte ein Schloss. Hinter dem Tor scheint ein Treppenhaus zu sein.
|
||||
|
Reference in New Issue
Block a user