Jacke dupliziert sich beim Werfen nicht mehr.
This commit is contained in:
@@ -89,16 +89,16 @@ class ActionModul(ActionBasics):
|
||||
elif item.id == self.world.ITEM_GATTER:
|
||||
logging.debug('Gatter öffnen')
|
||||
if self.isAktuellerRaum(self.world.RAUM_WIESE):
|
||||
stier = self.world.findPersonImAktuellenRaum(self.world.PERSON_STIER)
|
||||
stier = self.world.findPersonImAktuellenRaumById(self.world.PERSON_STIER)
|
||||
|
||||
logging.debug('Stier ist {stier}')
|
||||
logging.debug(f'Stier ist {stier}')
|
||||
|
||||
if stier != None:
|
||||
if stier == None:
|
||||
item.zustand = item.OFFEN
|
||||
self.macheWegFrei(self.world.SUED,self.world.RAUM_BRACHLAND)
|
||||
self.setFehler('Das Gatter steht offen.')
|
||||
else:
|
||||
self.setFehler(f'Der {stier.name} steht dir im Weg.')
|
||||
self.setFehler(f'Der Stier steht dir im Weg.')
|
||||
|
||||
|
||||
|
||||
@@ -194,10 +194,23 @@ class ActionModul(ActionBasics):
|
||||
if self.isAktuellerRaum(self.world.RAUM_BRACHLAND):
|
||||
if item.zustand == item.VOLL:
|
||||
ranke = self.world.findItemById(self.world.ITEM_BOHNENRANKE)
|
||||
fisch = self.world.findItemImInventarById(self.world.ITEM_FISCH)
|
||||
|
||||
logging.debug(f'Fisch ist {fisch}')
|
||||
|
||||
if fisch != None:
|
||||
logging.debug('Krug leeren löst den Fisch auf.')
|
||||
self.vanishItem(fisch)
|
||||
self.setFehler('Der Fisch löst sich auf.')
|
||||
|
||||
if ranke.zustand < ranke.GROSS:
|
||||
ranke.zustand = ranke.zustand +1
|
||||
self.setFehler('Die Bohnenranke wächst.')
|
||||
meldung = 'Die Bohnenranke wächst.'
|
||||
|
||||
if fisch != None:
|
||||
meldung = meldung + ' Der Fisch löst sich auf.'
|
||||
|
||||
self.setFehler(meldung)
|
||||
if ranke.zustand == ranke.GROSS:
|
||||
self.world.aktuellerRaum.ausgaenge[self.world.RAUF] = self.world.RAUM_BOHNENRANKE
|
||||
self.setFehler('Die Bohnenranke reicht jetzt bis in die Wolken hinein.')
|
||||
@@ -309,7 +322,7 @@ class ActionModul(ActionBasics):
|
||||
self.setFehler('Der Elefant ist schon geflohen.')
|
||||
else:
|
||||
self.setFehler('Das besitzt du nicht')
|
||||
elif self.isAktuellerRaum(self.world.RAUM_WIESE):
|
||||
elif self.isItemAndAktRaum(item, self.world.ITEM_JACKE, self.world.RAUM_WIESE):
|
||||
logging.debug('Jackenwurf')
|
||||
stier = self.world.findPersonImAktuellenRaumById(self.world.PERSON_STIER)
|
||||
jacke = self.world.findItemImInventarById(self.world.ITEM_JACKE)
|
||||
@@ -318,14 +331,19 @@ class ActionModul(ActionBasics):
|
||||
if stier != None:
|
||||
if jacke != None:
|
||||
self.world.printText('jackewurf')
|
||||
logging.debug(f'1:Jacke im Raum {self.liegtItemInRaum(jacke.id, self.world.aktuellerRaum)}')
|
||||
self.personVonRaumNachRaum(stier,self.world.aktuellerRaum.id, self.world.RAUM_FELD)
|
||||
logging.debug(f'2:Jacke im Raum {self.liegtItemInRaum(jacke.id, self.world.aktuellerRaum)}')
|
||||
self.moveItemVonInventarNachRaum(jacke, self.world.RAUM_FELD)
|
||||
logging.debug(f'3:Jacke im Raum {self.liegtItemInRaum(jacke.id, self.world.aktuellerRaum)}')
|
||||
else:
|
||||
self.setFehler('Die trägst du nicht bei dir.')
|
||||
else:
|
||||
logging.debug(f'verliere Jacke (kein Stier)')
|
||||
self.verliere(parsedCommand)
|
||||
else:
|
||||
self.verliere(parsedCommand)
|
||||
logging.debug(f'verliere Jacke (falscher Raum, nicht Jacke)')
|
||||
self.verliere(parsedCommand)
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user