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.
@@ -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
- type_text(Creature.talk())
539
+ Creature.talk()
540
540
  return
541
541
  else:
542
542
  type_text(f"There is nothing special about the {Name}.")
@@ -509,23 +509,30 @@ class NPC(Guard):
509
509
  self.generic_response = generic_response
510
510
 
511
511
  def talk(self):
512
- player_input = loop_til_valid_input(
513
- f"What do you want to say to %*BROWN*%{self.name}%*RESET*%?",
514
- "",
515
- str,
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
- # Normalize the input to lowercase
519
- player_input = player_input.lower()
519
+ # Normalize the input to lowercase
520
+ player_input = player_input.lower()
520
521
 
521
- # Check for keywords and map to corresponding response
522
- for topic, variations in self.keyword_variations.items():
523
- if any(variation in player_input for variation in variations):
524
- self.asked_about.add(topic)
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
- # If no keywords found, return a generic response
528
- return self._generic_response()
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,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: neelthee-mansion
3
- Version: 3.19.20
3
+ Version: 3.19.22
4
4
  Summary: A text-based adventure game set in Neel-thee’s mansion.
5
5
  Home-page: https://github.com/Flameblade375/neelthee_mansion
6
6
  Author: Alexander.E.F
@@ -1,16 +1,16 @@
1
1
  neelthee_mansion/Books.py,sha256=ABAdO2LQJ0PwPlHXpvdANoyz6uNbMTkI8-_RDpq6Qcc,25627
2
- neelthee_mansion/Mansion_of_Amnesia.py,sha256=HGQv4iH4j0YQviLq3hbe2zmX4i6qwzeBDbA-ch4EZYU,49714
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=IQvtWgcmDbJg6dmkyhLozgO4PgZMKVlIC_eOPv10I0E,20203
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.20.dist-info/LICENSE.md,sha256=CV8XGZaCyyAMdbkYFQUjb8AjBq9vkoyqdZCq1_hetms,1105
12
- neelthee_mansion-3.19.20.dist-info/METADATA,sha256=i4xN4EeynFQSbG5UBrG-hVDsbj_ajRNj3zj7kgH2AzM,1757
13
- neelthee_mansion-3.19.20.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
14
- neelthee_mansion-3.19.20.dist-info/entry_points.txt,sha256=j5ScTTyIidFhmT3F6hcX9pnlom4cJdDmfe26BmM6Igo,56
15
- neelthee_mansion-3.19.20.dist-info/top_level.txt,sha256=woQImQewylhly5Rb24HwPEGMxPY6do_PaUwGd5BNLOM,17
16
- neelthee_mansion-3.19.20.dist-info/RECORD,,
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,,