neelthee-mansion 3.16.6__py3-none-any.whl → 3.16.8__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/Books.py CHANGED
@@ -296,7 +296,7 @@ unknown.
296
296
  """
297
297
  ),
298
298
  Book(
299
- "the Book of shadows",
299
+ "the book of shadows",
300
300
  """
301
301
  Lucy and Elsa discovered a locked, black-bound book with a single silver key dangling from it. Unlike the other books, this one seemed to avoid their touch, slipping away each time they reached
302
302
  for it. When they finally grasped it, the Keeper appeared, his eyes cautious.
@@ -678,8 +678,8 @@ def select_target(chooser, targets: list):
678
678
 
679
679
 
680
680
  def command():
681
- global player
682
- try:
681
+ global player
682
+ #try:
683
683
  ShouldBreak = False
684
684
 
685
685
  while True:
@@ -707,12 +707,12 @@ def command():
707
707
  ShouldBreak = True
708
708
  if ShouldBreak:
709
709
  return
710
- except KeyError as e:
711
- type_text(f"KeyError: {e} - This might be due to an undefined command or incorrect arguments.", colorTrue=color_coding)
712
- except ValueError as e:
713
- type_text(f"ValueError: {e} - This might be due to incorrect arguments provided.", colorTrue=color_coding)
714
- except Exception as e:
715
- type_text(f"Unexpected Error: {e}", colorTrue=color_coding)
710
+ #except KeyError as e:
711
+ # type_text(f"KeyError: {e} - This might be due to an undefined command or incorrect arguments.", colorTrue=color_coding)
712
+ #except ValueError as e:
713
+ # type_text(f"ValueError: {e} - This might be due to incorrect arguments provided.", colorTrue=color_coding)
714
+ #except Exception as e:
715
+ # type_text(f"Unexpected Error: {e}", colorTrue=color_coding)
716
716
 
717
717
  def handle_sleep_command(player: PC):
718
718
  type_text("You decide to rest for a while.", colorTrue=color_coding)
neelthee_mansion/items.py CHANGED
@@ -60,37 +60,38 @@ class KeyRevealer:
60
60
  self.max_reveals = max_reveals
61
61
 
62
62
  def reveal_key_code(self, obj: Key, mask_char="="):
63
- if obj.reveal_count >= self.max_reveals:
64
- type_text(f"You can only reveal a Key Code {self.max_reveals} times.")
65
- type_text(f"Here is what you already know about this lock: {obj.CurentRevealStr}")
66
- return
63
+ if hasattr(obj, "reveal_count"):
64
+ if obj.reveal_count >= self.max_reveals:
65
+ type_text(f"You can only reveal a Key Code {self.max_reveals} times.")
66
+ type_text(f"Here is what you already know about this lock: {obj.CurentRevealStr}")
67
+ return
67
68
 
68
- if not hasattr(obj, 'lock'):
69
- key_code = obj.value
70
- else:
71
- key_code = obj.lock.key_code
72
-
73
- one_third_length = len(key_code) // 3
74
-
75
- # Keep track of already revealed indices
76
- revealed_indices = {i for i, char in enumerate(obj.CurentRevealStr) if char != mask_char}
77
-
78
- # Get new indices to reveal
79
- new_indices = set(sample(range(len(key_code)), one_third_length))
69
+ if not hasattr(obj, 'lock'):
70
+ key_code = obj.value
71
+ else:
72
+ key_code = obj.lock.key_code
80
73
 
81
- # Combine revealed and new indices
82
- all_revealed_indices = revealed_indices.union(new_indices)
83
-
84
- # Create the result with revealed characters
85
- result = [
86
- key_code[i] if i in all_revealed_indices else mask_char
87
- for i in range(len(key_code))
88
- ]
89
-
90
- obj.reveal_count += 1
91
- obj.CurentRevealStr = ''.join(result)
92
- type_text("".join(result))
93
- return True
74
+ one_third_length = len(key_code) // 3
75
+
76
+ # Keep track of already revealed indices
77
+ revealed_indices = {i for i, char in enumerate(obj.CurentRevealStr) if char != mask_char}
78
+
79
+ # Get new indices to reveal
80
+ new_indices = set(sample(range(len(key_code)), one_third_length))
81
+
82
+ # Combine revealed and new indices
83
+ all_revealed_indices = revealed_indices.union(new_indices)
84
+
85
+ # Create the result with revealed characters
86
+ result = [
87
+ key_code[i] if i in all_revealed_indices else mask_char
88
+ for i in range(len(key_code))
89
+ ]
90
+
91
+ obj.reveal_count += 1
92
+ obj.CurentRevealStr = ''.join(result)
93
+ type_text("".join(result))
94
+ return True
94
95
 
95
96
  class ShopItem:
96
97
  def __init__(self, item: item, price: int):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: neelthee-mansion
3
- Version: 3.16.6
3
+ Version: 3.16.8
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,15 +1,15 @@
1
- neelthee_mansion/Books.py,sha256=JNrS6YX49UZfRcdSxKQt7tSUH0K_8kBbRNs9Xv_MqRo,25591
2
- neelthee_mansion/Mansion_of_Amnesia.py,sha256=DZghPK3vMbbTOeMnWzPNRTAP_V2udNZ0SVjNYIdD-kc,46354
1
+ neelthee_mansion/Books.py,sha256=7jBS6lRqQ6DCTpbPN365lRoGnZdjU2b438gmcMkFnOc,25591
2
+ neelthee_mansion/Mansion_of_Amnesia.py,sha256=l3567bSDiwogm14FM8nhUteCIAm8BO8TDdAM3A8aQ-I,46365
3
3
  neelthee_mansion/Quests.py,sha256=q6VzR3mt9AYe29ACWZuf-suz4yOKrL946aJ493eQRS0,2611
4
4
  neelthee_mansion/Rooms.py,sha256=DuPkR0a0dC6jB3_Ebh1U88sJ9XND77xup1z6CulUxTc,90157
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=mnxws_YEnsoftkkBMZv1k_zlnGKWGenUvsZnNKjuFJQ,349
8
8
  neelthee_mansion/creatures.py,sha256=nc-6YQ7S89teDiypJdHKLLuq-q3UpbQCVGfJ4hnCb7M,15600
9
- neelthee_mansion/items.py,sha256=sMi2ZdeWYFNAeZ01szYBIHKQPHO14aAVuyAG4tz0ZyM,5538
9
+ neelthee_mansion/items.py,sha256=rfbyQ-2-MP-LCXKHRyimy-0fFFLmVYZWZcKyCCloF_M,5644
10
10
  neelthee_mansion/utils.py,sha256=Wt1CdK4eCskrxRXkeKgzVoa_NIzwQ047dJU-b_e8pb8,13559
11
- neelthee_mansion-3.16.6.dist-info/METADATA,sha256=jf4sEV_qyHum0wR-esl37uwdS3FBksjC9xJ-lZqH-z0,1992
12
- neelthee_mansion-3.16.6.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
13
- neelthee_mansion-3.16.6.dist-info/entry_points.txt,sha256=j5ScTTyIidFhmT3F6hcX9pnlom4cJdDmfe26BmM6Igo,56
14
- neelthee_mansion-3.16.6.dist-info/top_level.txt,sha256=woQImQewylhly5Rb24HwPEGMxPY6do_PaUwGd5BNLOM,17
15
- neelthee_mansion-3.16.6.dist-info/RECORD,,
11
+ neelthee_mansion-3.16.8.dist-info/METADATA,sha256=TQfa-ygHBNp45A3M0v2TYZ2R0Hyr6S-KKQN_FOtTSpo,1992
12
+ neelthee_mansion-3.16.8.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
13
+ neelthee_mansion-3.16.8.dist-info/entry_points.txt,sha256=j5ScTTyIidFhmT3F6hcX9pnlom4cJdDmfe26BmM6Igo,56
14
+ neelthee_mansion-3.16.8.dist-info/top_level.txt,sha256=woQImQewylhly5Rb24HwPEGMxPY6do_PaUwGd5BNLOM,17
15
+ neelthee_mansion-3.16.8.dist-info/RECORD,,