neelthee-mansion 3.19.20__py3-none-any.whl → 3.19.21__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 +15 -14
- {neelthee_mansion-3.19.20.dist-info → neelthee_mansion-3.19.21.dist-info}/METADATA +1 -1
- {neelthee_mansion-3.19.20.dist-info → neelthee_mansion-3.19.21.dist-info}/RECORD +8 -8
- {neelthee_mansion-3.19.20.dist-info → neelthee_mansion-3.19.21.dist-info}/LICENSE.md +0 -0
- {neelthee_mansion-3.19.20.dist-info → neelthee_mansion-3.19.21.dist-info}/WHEEL +0 -0
- {neelthee_mansion-3.19.20.dist-info → neelthee_mansion-3.19.21.dist-info}/entry_points.txt +0 -0
- {neelthee_mansion-3.19.20.dist-info → neelthee_mansion-3.19.21.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,24 @@ 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
|
-
|
522
|
+
# Check for keywords and map to corresponding response
|
523
|
+
for topic, variations in self.keyword_variations.items():
|
524
|
+
if any(variation in player_input for variation in variations):
|
525
|
+
self.asked_about.add(topic)
|
526
|
+
type_text(self._get_response(topic))
|
526
527
|
|
527
|
-
|
528
|
-
|
528
|
+
# If no keywords found, return a generic response
|
529
|
+
type_text(self._generic_response())
|
529
530
|
|
530
531
|
def _get_response(self, topic):
|
531
532
|
"""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=me_GGDArDHAfu_hfGLixfJgBcZf-NxgaeTDUyB73i8U,20288
|
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.21.dist-info/LICENSE.md,sha256=CV8XGZaCyyAMdbkYFQUjb8AjBq9vkoyqdZCq1_hetms,1105
|
12
|
+
neelthee_mansion-3.19.21.dist-info/METADATA,sha256=tE9j6eV60NFs4SvhsF8KIm_0UghqAS5ahs9uO6Hz8nk,1757
|
13
|
+
neelthee_mansion-3.19.21.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
|
14
|
+
neelthee_mansion-3.19.21.dist-info/entry_points.txt,sha256=j5ScTTyIidFhmT3F6hcX9pnlom4cJdDmfe26BmM6Igo,56
|
15
|
+
neelthee_mansion-3.19.21.dist-info/top_level.txt,sha256=woQImQewylhly5Rb24HwPEGMxPY6do_PaUwGd5BNLOM,17
|
16
|
+
neelthee_mansion-3.19.21.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|