neelthee-mansion 3.23.5__py3-none-any.whl → 3.23.7__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- neelthee_mansion/Mansion_of_Amnesia.py +20 -19
- neelthee_mansion/Rooms.py +371 -371
- neelthee_mansion/creatures.py +7 -56
- neelthee_mansion/utils.py +1 -1
- {neelthee_mansion-3.23.5.dist-info → neelthee_mansion-3.23.7.dist-info}/METADATA +1 -1
- neelthee_mansion-3.23.7.dist-info/RECORD +16 -0
- neelthee_mansion-3.23.5.dist-info/RECORD +0 -16
- {neelthee_mansion-3.23.5.dist-info → neelthee_mansion-3.23.7.dist-info}/LICENSE.md +0 -0
- {neelthee_mansion-3.23.5.dist-info → neelthee_mansion-3.23.7.dist-info}/WHEEL +0 -0
- {neelthee_mansion-3.23.5.dist-info → neelthee_mansion-3.23.7.dist-info}/entry_points.txt +0 -0
- {neelthee_mansion-3.23.5.dist-info → neelthee_mansion-3.23.7.dist-info}/top_level.txt +0 -0
neelthee_mansion/creatures.py
CHANGED
@@ -45,14 +45,14 @@ class base_character:
|
|
45
45
|
Returns:
|
46
46
|
None
|
47
47
|
"""
|
48
|
-
string_beginning = "
|
48
|
+
string_beginning = ""
|
49
49
|
if type(self) == creature:
|
50
|
-
string_beginning = "The
|
50
|
+
string_beginning = "The "
|
51
51
|
self.hp = self.hp - damage_taken
|
52
52
|
if self.hp < 0:
|
53
53
|
self.hp = 0
|
54
54
|
add_text_to_textbox(text_area,
|
55
|
-
f"{string_beginning}{self.name}
|
55
|
+
f"{string_beginning}{self.name} takes {damage_taken} damage and has {self.hp} HP left!"
|
56
56
|
)
|
57
57
|
|
58
58
|
|
@@ -142,10 +142,10 @@ class creature(base_character):
|
|
142
142
|
self.dropped_items = dropped_items
|
143
143
|
self.xp = rounding(self.difficulty * 2 + len(self.dropped_items))
|
144
144
|
self.description = (
|
145
|
-
description if description else f"A
|
145
|
+
description if description else f"A {self.name}."
|
146
146
|
)
|
147
147
|
self.flavor_text = (
|
148
|
-
flavor_text if flavor_text else f"You see a
|
148
|
+
flavor_text if flavor_text else f"You see a {self.name}!"
|
149
149
|
)
|
150
150
|
self.type = type
|
151
151
|
self.crit_chance = crit_chance
|
@@ -169,7 +169,7 @@ class creature(base_character):
|
|
169
169
|
elif curent_holiday == "easter":
|
170
170
|
add_text_to_textbox(text_area, f"The {self.name} also has bunny ears.")
|
171
171
|
elif curent_holiday == "halloween":
|
172
|
-
if random < 0.2:
|
172
|
+
if random() < 0.2:
|
173
173
|
add_text_to_textbox(text_area, f"The {self.name} also has a pumkin on it's head.")
|
174
174
|
|
175
175
|
|
@@ -398,55 +398,6 @@ class PC(base_character):
|
|
398
398
|
self.hp = clamp(value, 0, self.maxhp)
|
399
399
|
|
400
400
|
|
401
|
-
class NPC(PC):
|
402
|
-
def __init__(
|
403
|
-
self,
|
404
|
-
Name: str,
|
405
|
-
Age: int,
|
406
|
-
Class: str,
|
407
|
-
Level: int,
|
408
|
-
Background: str,
|
409
|
-
Height: Height,
|
410
|
-
Weight: int,
|
411
|
-
Notes: list = [],
|
412
|
-
special_ability: base_ability = supercrit_ability(),
|
413
|
-
NOTES: list = [],
|
414
|
-
xp: int = None,
|
415
|
-
inventory: inv = None,
|
416
|
-
money: int = 0,
|
417
|
-
weapons_atpws: list = [],
|
418
|
-
npc_role: str = "generic", # New attribute for NPC role (e.g., merchant, enemy, etc.)
|
419
|
-
aggressive: bool = False, # New attribute to determine if NPC is aggressive
|
420
|
-
):
|
421
|
-
super().__init__(
|
422
|
-
Name=Name,
|
423
|
-
Age=Age,
|
424
|
-
Class=Class,
|
425
|
-
Level=Level,
|
426
|
-
Background=Background,
|
427
|
-
Height=Height,
|
428
|
-
Weight=Weight,
|
429
|
-
Notes=Notes,
|
430
|
-
special_ability=special_ability,
|
431
|
-
NOTES=NOTES,
|
432
|
-
xp=xp,
|
433
|
-
inventory=inventory,
|
434
|
-
money=money,
|
435
|
-
weapons_atpws=weapons_atpws,
|
436
|
-
)
|
437
|
-
self.npc_role = npc_role
|
438
|
-
self.aggressive = aggressive
|
439
|
-
|
440
|
-
def interact(self):
|
441
|
-
if self.aggressive:
|
442
|
-
return f"{self.name} looks hostile and prepares for a fight!"
|
443
|
-
else:
|
444
|
-
return f"{self.name} has nothing to say to you."
|
445
|
-
|
446
|
-
def npc_info(self):
|
447
|
-
return f"Name: {self.name}, Age: {self.Age}, Class: {self.Class}, Level: {self.Level}, Role: {self.npc_role}, Aggressive: {self.aggressive}"
|
448
|
-
|
449
|
-
|
450
401
|
class PC_action:
|
451
402
|
def __init__(self, value) -> None:
|
452
403
|
if not value in ValidActions:
|
@@ -511,7 +462,7 @@ class NPC(Guard):
|
|
511
462
|
def talk(self, text_area):
|
512
463
|
while True:
|
513
464
|
player_input = loop_til_valid_input(
|
514
|
-
f"What do you want to say to
|
465
|
+
f"What do you want to say to {self.name}?",
|
515
466
|
"",
|
516
467
|
str,
|
517
468
|
)
|
neelthee_mansion/utils.py
CHANGED
@@ -51,7 +51,7 @@ These utilities aim to simplify development processes, promote code reuse, and i
|
|
51
51
|
def add_text_to_textbox(text_area: scrolledtext.ScrolledText, text, newline=True):
|
52
52
|
# Enable the text box to insert text
|
53
53
|
text_area.config(state=tk.NORMAL)
|
54
|
-
text_area.insert(tk.END, text +
|
54
|
+
text_area.insert(tk.END, text + "\n" if newline else "")
|
55
55
|
text_area.see(tk.END)
|
56
56
|
text_area.update_idletasks()
|
57
57
|
# Set the text box back to read-only
|
@@ -0,0 +1,16 @@
|
|
1
|
+
neelthee_mansion/Books.py,sha256=Zs6GOi12vrikne-E37LdrLNRb6CyUogOCDApDGFj6Ls,26168
|
2
|
+
neelthee_mansion/Mansion_of_Amnesia.py,sha256=w_qK2clkRhZn7kNOCi4zRZrEp_8oGFtRh7crDowZjTw,53973
|
3
|
+
neelthee_mansion/Quests.py,sha256=pUlru2RugP57MACQORZaF_X9lsbefTdPYTSO474phgo,2791
|
4
|
+
neelthee_mansion/Rooms.py,sha256=AOhD5EDmmid5vfow_EBT8qB4jLtvsdBG5OXHAFQ-YJA,79220
|
5
|
+
neelthee_mansion/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
|
+
neelthee_mansion/__main__.py,sha256=OIAWZ04le70DyjtR4hlmK9csHej7EHxeUrMoNnM-Vjc,95
|
7
|
+
neelthee_mansion/all_game_utils.py,sha256=AasunTkFmgAqt9ZIoYmymi4R7leBe4ubW-C1ts0Qclo,351
|
8
|
+
neelthee_mansion/creatures.py,sha256=XdRM5DJSnjAKXn4QskXKBf_YGvov26fX3XU1E2ww0zg,19722
|
9
|
+
neelthee_mansion/items.py,sha256=aGEkNUROf4WuLdsmoFYD-0BbJ984SODt73-8-_F1Z9Y,6672
|
10
|
+
neelthee_mansion/utils.py,sha256=uTBmCWz1TRLpKSwAJHlcN_pJZDMvYdLVyUfkTV0gFdw,14225
|
11
|
+
neelthee_mansion-3.23.7.dist-info/LICENSE.md,sha256=CV8XGZaCyyAMdbkYFQUjb8AjBq9vkoyqdZCq1_hetms,1105
|
12
|
+
neelthee_mansion-3.23.7.dist-info/METADATA,sha256=sYe_w74B7HUPnJE06QdXu0MnpGfIwBOViUNw9faeKAk,1756
|
13
|
+
neelthee_mansion-3.23.7.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
14
|
+
neelthee_mansion-3.23.7.dist-info/entry_points.txt,sha256=j5ScTTyIidFhmT3F6hcX9pnlom4cJdDmfe26BmM6Igo,56
|
15
|
+
neelthee_mansion-3.23.7.dist-info/top_level.txt,sha256=woQImQewylhly5Rb24HwPEGMxPY6do_PaUwGd5BNLOM,17
|
16
|
+
neelthee_mansion-3.23.7.dist-info/RECORD,,
|
@@ -1,16 +0,0 @@
|
|
1
|
-
neelthee_mansion/Books.py,sha256=Zs6GOi12vrikne-E37LdrLNRb6CyUogOCDApDGFj6Ls,26168
|
2
|
-
neelthee_mansion/Mansion_of_Amnesia.py,sha256=WlLi0vXlm0VErEAhliPvxIqFSMNwK9M52cLuyuGmlZo,54350
|
3
|
-
neelthee_mansion/Quests.py,sha256=pUlru2RugP57MACQORZaF_X9lsbefTdPYTSO474phgo,2791
|
4
|
-
neelthee_mansion/Rooms.py,sha256=CgenMX9ssTCWbDFopX6GHhNDnRYF5MpaDufWvt5fPwU,86025
|
5
|
-
neelthee_mansion/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
|
-
neelthee_mansion/__main__.py,sha256=OIAWZ04le70DyjtR4hlmK9csHej7EHxeUrMoNnM-Vjc,95
|
7
|
-
neelthee_mansion/all_game_utils.py,sha256=AasunTkFmgAqt9ZIoYmymi4R7leBe4ubW-C1ts0Qclo,351
|
8
|
-
neelthee_mansion/creatures.py,sha256=VyRfyjMpcwqLsBUfGE9qPosmFnWsqoPYgN0NT-Zj8gc,21334
|
9
|
-
neelthee_mansion/items.py,sha256=aGEkNUROf4WuLdsmoFYD-0BbJ984SODt73-8-_F1Z9Y,6672
|
10
|
-
neelthee_mansion/utils.py,sha256=nVWzqARScBkbUEyt2yZRsxxFVGquP6gs2O2wQSbreKc,14225
|
11
|
-
neelthee_mansion-3.23.5.dist-info/LICENSE.md,sha256=CV8XGZaCyyAMdbkYFQUjb8AjBq9vkoyqdZCq1_hetms,1105
|
12
|
-
neelthee_mansion-3.23.5.dist-info/METADATA,sha256=VgPvIVfPmtpoAwLugbm51l4WDojp81QUH1-YG9k3Vps,1756
|
13
|
-
neelthee_mansion-3.23.5.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
14
|
-
neelthee_mansion-3.23.5.dist-info/entry_points.txt,sha256=j5ScTTyIidFhmT3F6hcX9pnlom4cJdDmfe26BmM6Igo,56
|
15
|
-
neelthee_mansion-3.23.5.dist-info/top_level.txt,sha256=woQImQewylhly5Rb24HwPEGMxPY6do_PaUwGd5BNLOM,17
|
16
|
-
neelthee_mansion-3.23.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|