neelthee-mansion 3.19.21__py3-none-any.whl → 3.19.23__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- neelthee_mansion/creatures.py +9 -3
- {neelthee_mansion-3.19.21.dist-info → neelthee_mansion-3.19.23.dist-info}/METADATA +1 -1
- {neelthee_mansion-3.19.21.dist-info → neelthee_mansion-3.19.23.dist-info}/RECORD +7 -7
- {neelthee_mansion-3.19.21.dist-info → neelthee_mansion-3.19.23.dist-info}/LICENSE.md +0 -0
- {neelthee_mansion-3.19.21.dist-info → neelthee_mansion-3.19.23.dist-info}/WHEEL +0 -0
- {neelthee_mansion-3.19.21.dist-info → neelthee_mansion-3.19.23.dist-info}/entry_points.txt +0 -0
- {neelthee_mansion-3.19.21.dist-info → neelthee_mansion-3.19.23.dist-info}/top_level.txt +0 -0
neelthee_mansion/creatures.py
CHANGED
@@ -519,14 +519,20 @@ class NPC(Guard):
|
|
519
519
|
# Normalize the input to lowercase
|
520
520
|
player_input = player_input.lower()
|
521
521
|
|
522
|
+
# Exit the loop if the player says "goodbye"
|
523
|
+
if player_input == "goodbye":
|
524
|
+
type_text(f"Goodbye then. Don't get lost!")
|
525
|
+
break
|
526
|
+
|
522
527
|
# Check for keywords and map to corresponding response
|
523
528
|
for topic, variations in self.keyword_variations.items():
|
524
529
|
if any(variation in player_input for variation in variations):
|
525
530
|
self.asked_about.add(topic)
|
526
531
|
type_text(self._get_response(topic))
|
527
|
-
|
528
|
-
|
529
|
-
|
532
|
+
break # Stop further keyword checks and wait for the next input
|
533
|
+
else:
|
534
|
+
# If no keywords found, return a generic response
|
535
|
+
type_text(self._generic_response())
|
530
536
|
|
531
537
|
def _get_response(self, topic):
|
532
538
|
"""Return a response from the NPC based on the topic asked."""
|
@@ -5,12 +5,12 @@ neelthee_mansion/Rooms.py,sha256=WayqeFG9HjG_uREZjpPxEwJp_m7c0O5b52OCoWYXXeQ,783
|
|
5
5
|
neelthee_mansion/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
6
|
neelthee_mansion/__main__.py,sha256=OIAWZ04le70DyjtR4hlmK9csHej7EHxeUrMoNnM-Vjc,95
|
7
7
|
neelthee_mansion/all_game_utils.py,sha256=AasunTkFmgAqt9ZIoYmymi4R7leBe4ubW-C1ts0Qclo,351
|
8
|
-
neelthee_mansion/creatures.py,sha256=
|
8
|
+
neelthee_mansion/creatures.py,sha256=WX3E-zF8v5j4USA-JpUENYQW4z3vEX0he0ee6HODt-0,20586
|
9
9
|
neelthee_mansion/items.py,sha256=mV4K3Ep522LypL74NOT112bpP6ywQ1DR0A38KiHJFa8,5816
|
10
10
|
neelthee_mansion/utils.py,sha256=GaCkein6dppeufYfBMk59gHAE2b4p9TJW2MsRjyyFvQ,13702
|
11
|
-
neelthee_mansion-3.19.
|
12
|
-
neelthee_mansion-3.19.
|
13
|
-
neelthee_mansion-3.19.
|
14
|
-
neelthee_mansion-3.19.
|
15
|
-
neelthee_mansion-3.19.
|
16
|
-
neelthee_mansion-3.19.
|
11
|
+
neelthee_mansion-3.19.23.dist-info/LICENSE.md,sha256=CV8XGZaCyyAMdbkYFQUjb8AjBq9vkoyqdZCq1_hetms,1105
|
12
|
+
neelthee_mansion-3.19.23.dist-info/METADATA,sha256=YSFO1KHTGniTpXZUP364I9InjDk0lAp5xjBhoRIeE-Y,1757
|
13
|
+
neelthee_mansion-3.19.23.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
|
14
|
+
neelthee_mansion-3.19.23.dist-info/entry_points.txt,sha256=j5ScTTyIidFhmT3F6hcX9pnlom4cJdDmfe26BmM6Igo,56
|
15
|
+
neelthee_mansion-3.19.23.dist-info/top_level.txt,sha256=woQImQewylhly5Rb24HwPEGMxPY6do_PaUwGd5BNLOM,17
|
16
|
+
neelthee_mansion-3.19.23.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|