neelthee-mansion 3.7.1__py3-none-any.whl → 3.7.4__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 +14 -12
- neelthee_mansion/items.py +23 -20
- {neelthee_mansion-3.7.1.dist-info → neelthee_mansion-3.7.4.dist-info}/METADATA +1 -1
- {neelthee_mansion-3.7.1.dist-info → neelthee_mansion-3.7.4.dist-info}/RECORD +7 -7
- {neelthee_mansion-3.7.1.dist-info → neelthee_mansion-3.7.4.dist-info}/WHEEL +0 -0
- {neelthee_mansion-3.7.1.dist-info → neelthee_mansion-3.7.4.dist-info}/entry_points.txt +0 -0
- {neelthee_mansion-3.7.1.dist-info → neelthee_mansion-3.7.4.dist-info}/top_level.txt +0 -0
@@ -433,15 +433,15 @@ def display_directions(text):
|
|
433
433
|
|
434
434
|
def Examin(*Args):
|
435
435
|
Name = ' '.join(Args)
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
if
|
443
|
-
type_text(f"This item is a weapon that adds {
|
444
|
-
elif Name in ROOMS[player.CURRENTROOM]['directions']:
|
436
|
+
item_index = player.inventory.index(Name) # Store the result of index in a variable
|
437
|
+
|
438
|
+
if item_index is not None: # Check explicitly if item_index is valid
|
439
|
+
_ = player.inventory[item_index]
|
440
|
+
type_text("You look at your item and you figure out this about it:")
|
441
|
+
if not revealer.reveal_key_code(_):
|
442
|
+
if _.type == 'weapon':
|
443
|
+
type_text(f"This item is a weapon that adds {_.value} damage.")
|
444
|
+
elif Name in ROOMS[player.CURRENTROOM]['directions']: # Check exits in the room
|
445
445
|
door = ROOMS[player.CURRENTROOM]['directions'][Name]
|
446
446
|
if isinstance(door, Door):
|
447
447
|
if isinstance(door.lock, Lock):
|
@@ -450,8 +450,8 @@ def Examin(*Args):
|
|
450
450
|
else:
|
451
451
|
type_text(f"The exit {Name} has no lock.")
|
452
452
|
else:
|
453
|
-
type_text(f"There is nothing
|
454
|
-
elif Name in ROOMS[player.CURRENTROOM]['containers']:
|
453
|
+
type_text(f"There is nothing special about the exit {Name}.")
|
454
|
+
elif Name in ROOMS[player.CURRENTROOM]['containers']: # Check containers in the room
|
455
455
|
containerins = ROOMS[player.CURRENTROOM]['containers'][Name]
|
456
456
|
if isinstance(containerins, container):
|
457
457
|
if isinstance(containerins.lock, Lock):
|
@@ -460,7 +460,9 @@ def Examin(*Args):
|
|
460
460
|
else:
|
461
461
|
type_text(f"The container {Name} has no lock.")
|
462
462
|
else:
|
463
|
-
type_text(f"There is no container {
|
463
|
+
type_text(f"There is no container named {Name} in this room.")
|
464
|
+
else:
|
465
|
+
type_text(f"There is no {Name} to examine.")
|
464
466
|
|
465
467
|
def battle(player: PC, good_guys: list, bad_guys: list, last_room):
|
466
468
|
"""
|
neelthee_mansion/items.py
CHANGED
@@ -63,26 +63,29 @@ class KeyRevealer:
|
|
63
63
|
self.max_reveals = max_reveals
|
64
64
|
|
65
65
|
def reveal_key_code(self, obj: Key, mask_char="="):
|
66
|
-
if obj
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
66
|
+
if isinstance(obj, Key):
|
67
|
+
if obj.reveal_count >= self.max_reveals:
|
68
|
+
type_text(f"You can only reveal a Key Code twice.")
|
69
|
+
type_text(f"Here is what you already know about this lock: {obj.CurentRevealStr}")
|
70
|
+
return
|
71
|
+
|
72
|
+
if not hasattr(obj, 'lock'):
|
73
|
+
key_code = obj.value
|
74
|
+
else:
|
75
|
+
key_code = obj.lock.key_code
|
76
|
+
one_third_length = len(key_code) // 3
|
77
|
+
selected_indices = random.sample(range(len(key_code)), one_third_length)
|
78
|
+
|
79
|
+
result = [
|
80
|
+
key_code[i] if i in selected_indices else mask_char
|
81
|
+
for i in range(len(key_code))
|
82
|
+
]
|
83
|
+
|
84
|
+
obj.reveal_count += 1
|
85
|
+
obj.CurentRevealStr = ''.join(result)
|
86
|
+
type_text("".join(result))
|
87
|
+
return True
|
88
|
+
return
|
86
89
|
|
87
90
|
class ShopItem:
|
88
91
|
def __init__(self, item: item, price: int):
|
@@ -1,14 +1,14 @@
|
|
1
|
-
neelthee_mansion/Mansion_of_Amnesia.py,sha256=
|
1
|
+
neelthee_mansion/Mansion_of_Amnesia.py,sha256=J0OfaZqVomntBIaqv6pnloim1xL_tjOs7Tgql6UPuys,44347
|
2
2
|
neelthee_mansion/Quests.py,sha256=q6VzR3mt9AYe29ACWZuf-suz4yOKrL946aJ493eQRS0,2611
|
3
3
|
neelthee_mansion/Rooms.py,sha256=k658h0TUr0EuVnHgbi0xJ2qnmFq_9rpe0V6mZF9_mqA,87843
|
4
4
|
neelthee_mansion/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
5
|
neelthee_mansion/__main__.py,sha256=OIAWZ04le70DyjtR4hlmK9csHej7EHxeUrMoNnM-Vjc,95
|
6
6
|
neelthee_mansion/all_game_utils.py,sha256=Xfty9uXiYAfmA6iVzJurq852ZBPn7a4gQUcUcaV9yEU,341
|
7
7
|
neelthee_mansion/creatures.py,sha256=DQKYl1G3N92ycjay3_kxTMcOkj1S-zXKqRGUbbFZNlU,15396
|
8
|
-
neelthee_mansion/items.py,sha256=
|
8
|
+
neelthee_mansion/items.py,sha256=JI-pBQ-lfWXlG70QJXKtQaW-Tf4ZLTo4C8g_rDxOfAA,5279
|
9
9
|
neelthee_mansion/utils.py,sha256=Wt1CdK4eCskrxRXkeKgzVoa_NIzwQ047dJU-b_e8pb8,13559
|
10
|
-
neelthee_mansion-3.7.
|
11
|
-
neelthee_mansion-3.7.
|
12
|
-
neelthee_mansion-3.7.
|
13
|
-
neelthee_mansion-3.7.
|
14
|
-
neelthee_mansion-3.7.
|
10
|
+
neelthee_mansion-3.7.4.dist-info/METADATA,sha256=s4Agm2oq6Qf7f164BfkKXxKhIvbCKaa4cwfn9iR3duI,1991
|
11
|
+
neelthee_mansion-3.7.4.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
|
12
|
+
neelthee_mansion-3.7.4.dist-info/entry_points.txt,sha256=j5ScTTyIidFhmT3F6hcX9pnlom4cJdDmfe26BmM6Igo,56
|
13
|
+
neelthee_mansion-3.7.4.dist-info/top_level.txt,sha256=woQImQewylhly5Rb24HwPEGMxPY6do_PaUwGd5BNLOM,17
|
14
|
+
neelthee_mansion-3.7.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|