neelthee-mansion 3.14.3__py3-none-any.whl → 3.15.0__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 +36 -19
- neelthee_mansion/creatures.py +2 -0
- neelthee_mansion/items.py +8 -1
- {neelthee_mansion-3.14.3.dist-info → neelthee_mansion-3.15.0.dist-info}/METADATA +1 -1
- {neelthee_mansion-3.14.3.dist-info → neelthee_mansion-3.15.0.dist-info}/RECORD +8 -8
- {neelthee_mansion-3.14.3.dist-info → neelthee_mansion-3.15.0.dist-info}/WHEEL +0 -0
- {neelthee_mansion-3.14.3.dist-info → neelthee_mansion-3.15.0.dist-info}/entry_points.txt +0 -0
- {neelthee_mansion-3.14.3.dist-info → neelthee_mansion-3.15.0.dist-info}/top_level.txt +0 -0
@@ -17,11 +17,11 @@ Neel-thee's Mansion of Amnesia
|
|
17
17
|
|
18
18
|
global player, evil_mage, commands, NOTE_NUM, credits, color_coding, quest_manager, revealer, CHARACTERSLIST, BACKGROUNDS
|
19
19
|
|
20
|
-
BACKGROUNDS =
|
21
|
-
'Adventurer',
|
22
|
-
'Artist',
|
23
|
-
'Scholar',
|
24
|
-
|
20
|
+
BACKGROUNDS = {
|
21
|
+
'Adventurer': ['Survival', 'Climbing'],
|
22
|
+
'Artist': ['Painting', 'Sculpting'],
|
23
|
+
'Scholar': ['Reading', 'Research'],
|
24
|
+
}
|
25
25
|
|
26
26
|
revealer = KeyRevealer()
|
27
27
|
|
@@ -432,16 +432,24 @@ def display_directions(text):
|
|
432
432
|
|
433
433
|
return text
|
434
434
|
|
435
|
-
def
|
435
|
+
def Examine(*Args):
|
436
436
|
Name = ' '.join(Args)
|
437
437
|
item_index = player.inventory.index(Name) # Store the result of index in a variable
|
438
438
|
|
439
439
|
if item_index is not None: # Check explicitly if item_index is valid
|
440
440
|
_ = player.inventory[item_index]
|
441
|
-
|
442
|
-
|
443
|
-
if _
|
444
|
-
|
441
|
+
if isinstance(_, item):
|
442
|
+
type_text("You look at your item and you figure out this about it:")
|
443
|
+
if not revealer.reveal_key_code(_):
|
444
|
+
if _.type == 'weapon':
|
445
|
+
type_text(f"This item is a weapon that adds {_.value} damage.")
|
446
|
+
elif _.type == 'readable':
|
447
|
+
if 'reading' in player.Skills:
|
448
|
+
type_text(f"You read {_.name} and it contains:")
|
449
|
+
if isinstance(_, Book):
|
450
|
+
type_text(_.GetContense())
|
451
|
+
else:
|
452
|
+
type_text(_.value)
|
445
453
|
elif Name in ROOMS[player.CURRENTROOM]['directions']: # Check exits in the room
|
446
454
|
door = ROOMS[player.CURRENTROOM]['directions'][Name]
|
447
455
|
if isinstance(door, Door):
|
@@ -876,7 +884,7 @@ commands = {
|
|
876
884
|
'sleep': handle_sleep_command,
|
877
885
|
'put': handle_put_command,
|
878
886
|
'map': PrintMap,
|
879
|
-
'examine':
|
887
|
+
'examine': Examine,
|
880
888
|
}
|
881
889
|
|
882
890
|
|
@@ -974,19 +982,28 @@ def initializer():
|
|
974
982
|
color_coding = loop_til_valid_input("Do you want color coding (Y/N)?", "you didn't answer Y or N.", Y_N).value
|
975
983
|
|
976
984
|
|
977
|
-
while True:
|
978
|
-
type_text("")
|
979
|
-
type_text(
|
980
|
-
|
981
|
-
|
985
|
+
while True:
|
986
|
+
type_text("") # Prints an empty line
|
987
|
+
type_text("0. Random")
|
988
|
+
|
989
|
+
# Display each background with its skills formatted correctly.
|
990
|
+
for idx, (background_name, background_skills) in enumerate(BACKGROUNDS.items()):
|
991
|
+
formatted_skills = ", ".join(background_skills)
|
992
|
+
type_text(f"{idx + 1}. {background_name} - {formatted_skills}")
|
982
993
|
|
994
|
+
# Prompt the user to pick a background by number.
|
983
995
|
background = loop_til_valid_input("What background do you want? (please select the number to the left of them)", "You didn't pick one", int)
|
984
|
-
|
996
|
+
|
997
|
+
length = len(BACKGROUNDS)
|
985
998
|
if 1 <= background <= length:
|
986
|
-
background
|
999
|
+
# Get the background name and skills based on user choice.
|
1000
|
+
background_name = list(BACKGROUNDS.keys())[background - 1]
|
1001
|
+
background_skills = BACKGROUNDS[background_name]
|
987
1002
|
break
|
988
1003
|
elif background == 0:
|
989
|
-
background
|
1004
|
+
# Randomly select a background and get its associated skills.
|
1005
|
+
background_name = choice(list(BACKGROUNDS.keys()))
|
1006
|
+
background_skills = BACKGROUNDS[background_name]
|
990
1007
|
break
|
991
1008
|
else:
|
992
1009
|
type_text("You didn't pick one")
|
neelthee_mansion/creatures.py
CHANGED
@@ -277,6 +277,7 @@ class PC(base_character):
|
|
277
277
|
backstory: str = "",
|
278
278
|
CURRENTROOM: str = "",
|
279
279
|
LASTROOM: str = None,
|
280
|
+
Skills: list[str] = None
|
280
281
|
):
|
281
282
|
if not xp:
|
282
283
|
if Level == 1:
|
@@ -307,6 +308,7 @@ class PC(base_character):
|
|
307
308
|
self.backstory = backstory
|
308
309
|
self.CURRENTROOM = CURRENTROOM
|
309
310
|
self.LASTROOM = LASTROOM
|
311
|
+
self.Skills = Skills
|
310
312
|
|
311
313
|
def get_change_weapon(self, weapon_atpw: int = 0, weapon_index: int = -1):
|
312
314
|
if weapon_atpw > 0:
|
neelthee_mansion/items.py
CHANGED
@@ -2,7 +2,7 @@ from .utils import *
|
|
2
2
|
|
3
3
|
class item:
|
4
4
|
|
5
|
-
def __init__(self, name: str =
|
5
|
+
def __init__(self, name: str = "", type: str = "miscellaneous", value: int = 0):
|
6
6
|
self.name = name
|
7
7
|
self.type = type
|
8
8
|
self.value = value
|
@@ -14,6 +14,13 @@ class item:
|
|
14
14
|
else:
|
15
15
|
return False
|
16
16
|
|
17
|
+
class Book(item):
|
18
|
+
def __init__(self, Name: str = "", Contense: int = ""):
|
19
|
+
super().__init__(Name, "readable", Contense)
|
20
|
+
|
21
|
+
def GetContense(self):
|
22
|
+
return self.value
|
23
|
+
|
17
24
|
class Lock:
|
18
25
|
def __init__(self, key_code: str = None):
|
19
26
|
self.key_code = key_code if key_code else get_random_string(10)
|
@@ -1,14 +1,14 @@
|
|
1
|
-
neelthee_mansion/Mansion_of_Amnesia.py,sha256=
|
1
|
+
neelthee_mansion/Mansion_of_Amnesia.py,sha256=RNpYKpDYLNqfD8LpEuopxZqZFid0KXE1pSgHXhXzf8o,46126
|
2
2
|
neelthee_mansion/Quests.py,sha256=q6VzR3mt9AYe29ACWZuf-suz4yOKrL946aJ493eQRS0,2611
|
3
3
|
neelthee_mansion/Rooms.py,sha256=DJ-Y_qr_-xXMJbENgtLnWqxeIhbEEM7BXsAxpuhlh0Y,90063
|
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=mnxws_YEnsoftkkBMZv1k_zlnGKWGenUvsZnNKjuFJQ,349
|
7
|
-
neelthee_mansion/creatures.py,sha256=
|
8
|
-
neelthee_mansion/items.py,sha256=
|
7
|
+
neelthee_mansion/creatures.py,sha256=Qch3gEcfCYZ2MnWJRPQFb9LiTx7LUzvoK9DUMeLxuDs,15581
|
8
|
+
neelthee_mansion/items.py,sha256=Dz3y3d1mvbtHLqfIeEmaeDzukG7DlK6AUBZ7LzUMuZQ,5735
|
9
9
|
neelthee_mansion/utils.py,sha256=Wt1CdK4eCskrxRXkeKgzVoa_NIzwQ047dJU-b_e8pb8,13559
|
10
|
-
neelthee_mansion-3.
|
11
|
-
neelthee_mansion-3.
|
12
|
-
neelthee_mansion-3.
|
13
|
-
neelthee_mansion-3.
|
14
|
-
neelthee_mansion-3.
|
10
|
+
neelthee_mansion-3.15.0.dist-info/METADATA,sha256=VCCQutaXrWffx0UqkiAasxF9lJNt1QFLWnudNe0pw6s,1992
|
11
|
+
neelthee_mansion-3.15.0.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
|
12
|
+
neelthee_mansion-3.15.0.dist-info/entry_points.txt,sha256=j5ScTTyIidFhmT3F6hcX9pnlom4cJdDmfe26BmM6Igo,56
|
13
|
+
neelthee_mansion-3.15.0.dist-info/top_level.txt,sha256=woQImQewylhly5Rb24HwPEGMxPY6do_PaUwGd5BNLOM,17
|
14
|
+
neelthee_mansion-3.15.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|