neelthee-mansion 3.19.20__py3-none-any.whl → 3.19.22__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/Mansion_of_Amnesia.py +1 -1
- neelthee_mansion/creatures.py +21 -14
- {neelthee_mansion-3.19.20.dist-info → neelthee_mansion-3.19.22.dist-info}/METADATA +1 -1
- {neelthee_mansion-3.19.20.dist-info → neelthee_mansion-3.19.22.dist-info}/RECORD +8 -8
- {neelthee_mansion-3.19.20.dist-info → neelthee_mansion-3.19.22.dist-info}/LICENSE.md +0 -0
- {neelthee_mansion-3.19.20.dist-info → neelthee_mansion-3.19.22.dist-info}/WHEEL +0 -0
- {neelthee_mansion-3.19.20.dist-info → neelthee_mansion-3.19.22.dist-info}/entry_points.txt +0 -0
- {neelthee_mansion-3.19.20.dist-info → neelthee_mansion-3.19.22.dist-info}/top_level.txt +0 -0
@@ -536,7 +536,7 @@ def Examine(*Args):
|
|
536
536
|
if isinstance(Creature, creature):
|
537
537
|
if isinstance(Creature, NPC):
|
538
538
|
if Creature.name.lower() == Name:
|
539
|
-
|
539
|
+
Creature.talk()
|
540
540
|
return
|
541
541
|
else:
|
542
542
|
type_text(f"There is nothing special about the {Name}.")
|
neelthee_mansion/creatures.py
CHANGED
@@ -509,23 +509,30 @@ class NPC(Guard):
|
|
509
509
|
self.generic_response = generic_response
|
510
510
|
|
511
511
|
def talk(self):
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
512
|
+
while True:
|
513
|
+
player_input = loop_til_valid_input(
|
514
|
+
f"What do you want to say to %*BROWN*%{self.name}%*RESET*%?",
|
515
|
+
"",
|
516
|
+
str,
|
517
|
+
)
|
517
518
|
|
518
|
-
|
519
|
-
|
519
|
+
# Normalize the input to lowercase
|
520
|
+
player_input = player_input.lower()
|
520
521
|
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
return self._get_response(topic)
|
522
|
+
# Exit the loop if the player says "goodbye"
|
523
|
+
if player_input == "goodbye":
|
524
|
+
type_text(f"%*BROWN*%{self.name}%*RESET*% says: 'Goodbye then. Don't get lost!'")
|
525
|
+
break
|
526
526
|
|
527
|
-
|
528
|
-
|
527
|
+
# Check for keywords and map to corresponding response
|
528
|
+
for topic, variations in self.keyword_variations.items():
|
529
|
+
if any(variation in player_input for variation in variations):
|
530
|
+
self.asked_about.add(topic)
|
531
|
+
type_text(self._get_response(topic))
|
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())
|
529
536
|
|
530
537
|
def _get_response(self, topic):
|
531
538
|
"""Return a response from the NPC based on the topic asked."""
|
@@ -1,16 +1,16 @@
|
|
1
1
|
neelthee_mansion/Books.py,sha256=ABAdO2LQJ0PwPlHXpvdANoyz6uNbMTkI8-_RDpq6Qcc,25627
|
2
|
-
neelthee_mansion/Mansion_of_Amnesia.py,sha256=
|
2
|
+
neelthee_mansion/Mansion_of_Amnesia.py,sha256=8lRuSqEXjsWpEQq58zu6tUSmcG8glfPHsCuPsJe-7CA,49703
|
3
3
|
neelthee_mansion/Quests.py,sha256=pUlru2RugP57MACQORZaF_X9lsbefTdPYTSO474phgo,2791
|
4
4
|
neelthee_mansion/Rooms.py,sha256=WayqeFG9HjG_uREZjpPxEwJp_m7c0O5b52OCoWYXXeQ,78353
|
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=FY-VFeZEDeEpoZ32Z6DEWgpTFlkYTXyShMKyFC5lNvM,20624
|
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.22.dist-info/LICENSE.md,sha256=CV8XGZaCyyAMdbkYFQUjb8AjBq9vkoyqdZCq1_hetms,1105
|
12
|
+
neelthee_mansion-3.19.22.dist-info/METADATA,sha256=7x_124_odg-Kybmo31s_6gEBU4nKRasqF1wuPt0PNk4,1757
|
13
|
+
neelthee_mansion-3.19.22.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
|
14
|
+
neelthee_mansion-3.19.22.dist-info/entry_points.txt,sha256=j5ScTTyIidFhmT3F6hcX9pnlom4cJdDmfe26BmM6Igo,56
|
15
|
+
neelthee_mansion-3.19.22.dist-info/top_level.txt,sha256=woQImQewylhly5Rb24HwPEGMxPY6do_PaUwGd5BNLOM,17
|
16
|
+
neelthee_mansion-3.19.22.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|