neelthee-mansion 3.9.1__tar.gz → 3.10.0__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.
- {neelthee_mansion-3.9.1 → neelthee_mansion-3.10.0}/PKG-INFO +1 -1
- {neelthee_mansion-3.9.1 → neelthee_mansion-3.10.0}/neelthee_mansion/Mansion_of_Amnesia.py +4 -4
- {neelthee_mansion-3.9.1 → neelthee_mansion-3.10.0}/neelthee_mansion/items.py +30 -25
- {neelthee_mansion-3.9.1 → neelthee_mansion-3.10.0}/neelthee_mansion.egg-info/PKG-INFO +1 -1
- {neelthee_mansion-3.9.1 → neelthee_mansion-3.10.0}/setup.py +1 -1
- {neelthee_mansion-3.9.1 → neelthee_mansion-3.10.0}/README.md +0 -0
- {neelthee_mansion-3.9.1 → neelthee_mansion-3.10.0}/neelthee_mansion/Quests.py +0 -0
- {neelthee_mansion-3.9.1 → neelthee_mansion-3.10.0}/neelthee_mansion/Rooms.py +0 -0
- {neelthee_mansion-3.9.1 → neelthee_mansion-3.10.0}/neelthee_mansion/__init__.py +0 -0
- {neelthee_mansion-3.9.1 → neelthee_mansion-3.10.0}/neelthee_mansion/__main__.py +0 -0
- {neelthee_mansion-3.9.1 → neelthee_mansion-3.10.0}/neelthee_mansion/all_game_utils.py +0 -0
- {neelthee_mansion-3.9.1 → neelthee_mansion-3.10.0}/neelthee_mansion/creatures.py +0 -0
- {neelthee_mansion-3.9.1 → neelthee_mansion-3.10.0}/neelthee_mansion/utils.py +0 -0
- {neelthee_mansion-3.9.1 → neelthee_mansion-3.10.0}/neelthee_mansion.egg-info/SOURCES.txt +0 -0
- {neelthee_mansion-3.9.1 → neelthee_mansion-3.10.0}/neelthee_mansion.egg-info/dependency_links.txt +0 -0
- {neelthee_mansion-3.9.1 → neelthee_mansion-3.10.0}/neelthee_mansion.egg-info/entry_points.txt +0 -0
- {neelthee_mansion-3.9.1 → neelthee_mansion-3.10.0}/neelthee_mansion.egg-info/requires.txt +0 -0
- {neelthee_mansion-3.9.1 → neelthee_mansion-3.10.0}/neelthee_mansion.egg-info/top_level.txt +0 -0
- {neelthee_mansion-3.9.1 → neelthee_mansion-3.10.0}/setup.cfg +0 -0
@@ -125,7 +125,7 @@ get [%*BLUE*%item%*RESET*%] - Pick up an item from your current location
|
|
125
125
|
search [the/] [%*RED*%container%*RESET*%] - Search a container in your current location
|
126
126
|
use [%*BLUE*%item%*RESET*%] - Use an item from your inventory
|
127
127
|
put [%*BLUE*%item%*RESET*%] [the/] [%*RED*%container%*RESET*%] - Put an item from your inventory into a container in your current location
|
128
|
-
|
128
|
+
examine [%*GREEN*%direction%*RESET*%/%*RED*%container%*RESET*%/%*BLUE*%item%*RESET*%] - Find out some info about the object
|
129
129
|
sleep - Rest for a bit and regain some health
|
130
130
|
look - Look around your current location
|
131
131
|
quit - Quit the game
|
@@ -463,7 +463,7 @@ def Examin(*Args):
|
|
463
463
|
else:
|
464
464
|
type_text(f"There is no container named {Name} in this room.")
|
465
465
|
else:
|
466
|
-
type_text(f"There is
|
466
|
+
type_text(f"There is nothing special about the {Name}.")
|
467
467
|
|
468
468
|
def battle(player: PC, good_guys: list, bad_guys: list, last_room):
|
469
469
|
"""
|
@@ -836,7 +836,7 @@ def handle_grumpy_pig(player: PC, enemy: creature):
|
|
836
836
|
if ask_for_consent("Do you want to use your torch to scare the pig away"):
|
837
837
|
enemy_reacting = False
|
838
838
|
type_text(f'You wave your torch at the pig and it runs away through a tiny open window.', colorTrue=color_coding)
|
839
|
-
del ROOMS[player.CURRENTROOM]['creatures stats']
|
839
|
+
del ROOMS[player.CURRENTROOM]['creatures stats'][ROOMS[player.CURRENTROOM]['creatures stats'].index(enemy)]
|
840
840
|
player.xp += 5
|
841
841
|
if 'rations' in player.inventory:
|
842
842
|
if ask_for_consent("Do you want to throw your ration at the pig"):
|
@@ -872,7 +872,7 @@ commands = {
|
|
872
872
|
'sleep': handle_sleep_command,
|
873
873
|
'put': handle_put_command,
|
874
874
|
'map': PrintMap,
|
875
|
-
'
|
875
|
+
'examine': Examin,
|
876
876
|
}
|
877
877
|
|
878
878
|
|
@@ -14,9 +14,6 @@ class item:
|
|
14
14
|
else:
|
15
15
|
return False
|
16
16
|
|
17
|
-
def IsUsable(self) -> bool:
|
18
|
-
return self.usable
|
19
|
-
|
20
17
|
class Lock:
|
21
18
|
def __init__(self, key_code: str = None):
|
22
19
|
self.key_code = key_code if key_code else get_random_string(10)
|
@@ -63,29 +60,37 @@ class KeyRevealer:
|
|
63
60
|
self.max_reveals = max_reveals
|
64
61
|
|
65
62
|
def reveal_key_code(self, obj: Key, mask_char="="):
|
66
|
-
if
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
return
|
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
|
71
67
|
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
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))
|
80
|
+
|
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
|
89
94
|
|
90
95
|
class ShopItem:
|
91
96
|
def __init__(self, item: item, price: int):
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
2
2
|
|
3
3
|
setup(
|
4
4
|
name='neelthee_mansion',
|
5
|
-
version='3.
|
5
|
+
version='3.10.0',
|
6
6
|
packages=find_packages(), # Automatically finds all packages and modules
|
7
7
|
install_requires=[
|
8
8
|
'wheel', 'psutil', 'playsound', 'requests', 'keyboard', 'pandas', 'validators', 'dicttoxml', 'pytz',
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{neelthee_mansion-3.9.1 → neelthee_mansion-3.10.0}/neelthee_mansion.egg-info/dependency_links.txt
RENAMED
File without changes
|
{neelthee_mansion-3.9.1 → neelthee_mansion-3.10.0}/neelthee_mansion.egg-info/entry_points.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|