neelthee-mansion 3.19.15__tar.gz → 3.19.17__tar.gz

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.
Files changed (21) hide show
  1. {neelthee_mansion-3.19.15 → neelthee_mansion-3.19.17}/PKG-INFO +1 -1
  2. {neelthee_mansion-3.19.15 → neelthee_mansion-3.19.17}/neelthee_mansion/Mansion_of_Amnesia.py +7 -0
  3. {neelthee_mansion-3.19.15 → neelthee_mansion-3.19.17}/neelthee_mansion/Rooms.py +4 -1
  4. {neelthee_mansion-3.19.15 → neelthee_mansion-3.19.17}/neelthee_mansion/creatures.py +106 -0
  5. {neelthee_mansion-3.19.15 → neelthee_mansion-3.19.17}/neelthee_mansion.egg-info/PKG-INFO +1 -1
  6. {neelthee_mansion-3.19.15 → neelthee_mansion-3.19.17}/setup.py +1 -1
  7. {neelthee_mansion-3.19.15 → neelthee_mansion-3.19.17}/LICENSE.md +0 -0
  8. {neelthee_mansion-3.19.15 → neelthee_mansion-3.19.17}/README.md +0 -0
  9. {neelthee_mansion-3.19.15 → neelthee_mansion-3.19.17}/neelthee_mansion/Books.py +0 -0
  10. {neelthee_mansion-3.19.15 → neelthee_mansion-3.19.17}/neelthee_mansion/Quests.py +0 -0
  11. {neelthee_mansion-3.19.15 → neelthee_mansion-3.19.17}/neelthee_mansion/__init__.py +0 -0
  12. {neelthee_mansion-3.19.15 → neelthee_mansion-3.19.17}/neelthee_mansion/__main__.py +0 -0
  13. {neelthee_mansion-3.19.15 → neelthee_mansion-3.19.17}/neelthee_mansion/all_game_utils.py +0 -0
  14. {neelthee_mansion-3.19.15 → neelthee_mansion-3.19.17}/neelthee_mansion/items.py +0 -0
  15. {neelthee_mansion-3.19.15 → neelthee_mansion-3.19.17}/neelthee_mansion/utils.py +0 -0
  16. {neelthee_mansion-3.19.15 → neelthee_mansion-3.19.17}/neelthee_mansion.egg-info/SOURCES.txt +0 -0
  17. {neelthee_mansion-3.19.15 → neelthee_mansion-3.19.17}/neelthee_mansion.egg-info/dependency_links.txt +0 -0
  18. {neelthee_mansion-3.19.15 → neelthee_mansion-3.19.17}/neelthee_mansion.egg-info/entry_points.txt +0 -0
  19. {neelthee_mansion-3.19.15 → neelthee_mansion-3.19.17}/neelthee_mansion.egg-info/requires.txt +0 -0
  20. {neelthee_mansion-3.19.15 → neelthee_mansion-3.19.17}/neelthee_mansion.egg-info/top_level.txt +0 -0
  21. {neelthee_mansion-3.19.15 → neelthee_mansion-3.19.17}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: neelthee_mansion
3
- Version: 3.19.15
3
+ Version: 3.19.17
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
@@ -531,6 +531,13 @@ def Examine(*Args):
531
531
  type_text(f"The container {Name} has no lock.")
532
532
  else:
533
533
  type_text(f"There is no container named {Name} in this room.")
534
+ elif "creatures stats" in ROOMS[player.CURRENTROOM]:
535
+ for Creature in ROOMS[player.CURRENTROOM]["creatures stats"]:
536
+ if isinstance(Creature, creature):
537
+ if isinstance(Creature, NPC):
538
+ if Creature.name.lower() == Name:
539
+ Creature.talk()
540
+ return
534
541
  else:
535
542
  type_text(f"There is nothing special about the {Name}.")
536
543
 
@@ -737,10 +737,13 @@ You notice a "
737
737
  "west": Door("Room name"),
738
738
  "bookcase": Door("Cavern 3"),
739
739
  },
740
+ "creatures stats": [
741
+ Geraldo()
742
+ ],
740
743
  "containers": {
741
744
  "bookcases": container(sample(books, 3)),
742
745
  },
743
- "info": "Towering %*RED*%bookcases%*RESET*% filled with odd, mismatched books line the walls. Some have faded titles, others are blank, arranged almost deliberately. One bookcase stands slightly forward, leaving a faint scrape on the floor. The air is still, as if waiting for you to notice.",
746
+ "info": "Towering %*RED*%bookcases%*RESET*% filled with odd, mismatched books line the walls. A cat named %*BROWN*%geraldo times%*RESET*% Some have faded titles, others are blank, arranged almost deliberately. One bookcase stands slightly forward, leaving a faint scrape on the floor. The air is still, as if waiting for you to notice.",
744
747
  "map": """
745
748
  █████████
746
749
  █ █
@@ -457,3 +457,109 @@ class PC_action:
457
457
  if isinstance(value, PC_action):
458
458
  return self.value == value.value
459
459
  return self.value == value
460
+
461
+
462
+ class NPC(Guard):
463
+
464
+ def __init__(
465
+ self,
466
+ name,
467
+ hp,
468
+ atpw,
469
+ dropped_items=[],
470
+ description=None,
471
+ flavor_text=None,
472
+ type=creature_type("humanoid"),
473
+ crit_chance=0.05,
474
+ current_room=None,
475
+ patrol_route=None,
476
+ patrol_type="normal",
477
+ frendly_text="",
478
+ generic_response="The person looks like they don't see you.",
479
+ ):
480
+ super().__init__(
481
+ name,
482
+ hp,
483
+ atpw,
484
+ dropped_items,
485
+ description,
486
+ flavor_text,
487
+ type,
488
+ crit_chance,
489
+ current_room,
490
+ patrol_route,
491
+ patrol_type,
492
+ frendly_text,
493
+ )
494
+ self.frendly = True
495
+ # Define the responses for each topic
496
+ self.responses = {
497
+ "introduction": "Oh, hello. I didn't see you there.",
498
+ }
499
+
500
+ # Define keyword variations that map to the same topic
501
+ self.keyword_variations = {
502
+ "introduction": ["hello", "hi", "greetings", "hey"],
503
+ }
504
+
505
+ # To keep track of which topics the player has asked about
506
+ self.asked_about = set()
507
+ self.generic_response = generic_response
508
+
509
+ def talk(self):
510
+ player_input = input(
511
+ f"What do you want to say to %*BROWN*%{self.name}%*RESET*%? \n>"
512
+ )
513
+
514
+ # Normalize the input to lowercase
515
+ player_input = player_input.lower()
516
+
517
+ # Check for keywords and map to corresponding response
518
+ for topic, variations in self.keyword_variations.items():
519
+ if any(variation in player_input for variation in variations):
520
+ self.asked_about.add(topic)
521
+ return self._get_response(topic)
522
+
523
+ # If no keywords found, return a generic response
524
+ return self._generic_response()
525
+
526
+ def _get_response(self, topic):
527
+ """Return a response from the NPC based on the topic asked."""
528
+ return f"{self.responses[topic]}"
529
+
530
+ def _generic_response(self):
531
+ """Default response if no known keyword is found in the player's input."""
532
+ return self.generic_response
533
+
534
+
535
+ class Geraldo(NPC):
536
+
537
+ def __init__(self):
538
+ super().__init__(
539
+ "geraldo times",
540
+ 9999999999,
541
+ 999,
542
+ type=creature_type("beast", "cat"),
543
+ flavor_text="You see a cat sitting on a bookshelf.",
544
+ description="The cat looks at you with a bored look on its face.",
545
+ responses={
546
+ "introduction": "Oh, you're here. Didn't think you'd make it. But I suppose I'm not the one making the decisions around here, am I?",
547
+ "mansion": "The mansion? Well, it's not as grand as it may seem. Inside, it's as much a prison as it is a home. Everyone you find here has been trapped by Neel-thee. You’ll find that out soon enough.",
548
+ "neel-thee": "Neel-thee? Oh, you've heard of him, have you? He’s not one to be trifled with, but then again, neither am I.",
549
+ "escape": "Escape? Ha. If only it were that simple. If you're planning to leave, you'd better have a better idea than just running out the door.",
550
+ "danger": "Danger? Well, it’s always lurking, isn’t it? You might not see it, but I feel it in the air. Something's coming, something... wrong.",
551
+ },
552
+ keyword_variations={
553
+ "introduction": ["hello", "hi", "greetings", "hey"],
554
+ "mansion": ["mansion", "this place", "the mansion", "home", "house"],
555
+ "neel-thee": [
556
+ "neel-thee",
557
+ "who is neel-thee",
558
+ "tell me about neel-thee",
559
+ "who is this neel-thee",
560
+ ],
561
+ "escape": ["escape", "leave", "get out", "break free"],
562
+ "danger": ["danger", "something wrong", "something’s off", "dangerous"],
563
+ },
564
+ generic_response="The cat looks at you with those mysterious eyes, as if deciding whether or not to speak.",
565
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: neelthee-mansion
3
- Version: 3.19.15
3
+ Version: 3.19.17
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
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="neelthee_mansion",
5
- version="3.19.15",
5
+ version="3.19.17",
6
6
  packages=find_packages(), # Automatically finds all packages and modules
7
7
  install_requires=[
8
8
  "wheel",