neelthee-mansion 2.2.2__py3-none-any.whl → 2.2.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 +9 -0
- neelthee_mansion/Rooms.py +8 -1
- neelthee_mansion/creatures.py +2 -0
- neelthee_mansion/items.py +7 -0
- {neelthee_mansion-2.2.2.dist-info → neelthee_mansion-2.2.4.dist-info}/METADATA +1 -1
- neelthee_mansion-2.2.4.dist-info/RECORD +14 -0
- neelthee_mansion-2.2.2.dist-info/RECORD +0 -14
- {neelthee_mansion-2.2.2.dist-info → neelthee_mansion-2.2.4.dist-info}/WHEEL +0 -0
- {neelthee_mansion-2.2.2.dist-info → neelthee_mansion-2.2.4.dist-info}/entry_points.txt +0 -0
- {neelthee_mansion-2.2.2.dist-info → neelthee_mansion-2.2.4.dist-info}/top_level.txt +0 -0
@@ -750,6 +750,14 @@ commands = {
|
|
750
750
|
def quit():
|
751
751
|
exit()
|
752
752
|
|
753
|
+
def do_random_event():
|
754
|
+
if 'Random events' in ROOMS[CURRENTROOM] and 'Event chance' in ROOMS[CURRENTROOM]:
|
755
|
+
if random() <= ROOMS[CURRENTROOM]['Event chance']:
|
756
|
+
if is_executable(Event['Event code']):
|
757
|
+
Event = choice(ROOMS[CURRENTROOM]['Random events'])
|
758
|
+
type_text(Event['Output text'])
|
759
|
+
exec(Event['Event code'])
|
760
|
+
|
753
761
|
guards = [
|
754
762
|
Guard(
|
755
763
|
name="Guard",
|
@@ -903,6 +911,7 @@ def main():
|
|
903
911
|
for ___ in GameState['collected items']:
|
904
912
|
if isinstance(___, item):
|
905
913
|
quest_manager.update_objective(f"Colect {___.name}")
|
914
|
+
do_random_event()
|
906
915
|
|
907
916
|
|
908
917
|
|
neelthee_mansion/Rooms.py
CHANGED
@@ -161,7 +161,7 @@ ROOMS = {
|
|
161
161
|
'A %*CYAN*%hungry%*RESET*% bear attacks you!',
|
162
162
|
),
|
163
163
|
],
|
164
|
-
'info': 'You are in the kitchen, there are several trashed %*RED*%cupboards%*RESET*%, and a fireplace.',
|
164
|
+
'info': 'You are in the kitchen, there are several trashed %*RED*%cupboards%*RESET*%, one of them has a knotted cord sticking out, and a fireplace.',
|
165
165
|
'map': '''
|
166
166
|
████║████
|
167
167
|
█ █
|
@@ -176,6 +176,13 @@ ROOMS = {
|
|
176
176
|
'I wonder if there is anything salvageable in the %*RED*%cupboards%*RESET*%',
|
177
177
|
'I should probably look around',
|
178
178
|
],
|
179
|
+
'Event chance': 0.1,
|
180
|
+
'Random events': [
|
181
|
+
{
|
182
|
+
'Output text': "You hear a bang and the cupboard door swings open slowly and the cord is gone",
|
183
|
+
'Event code': "ROOMS['Kitchen']['containers']['cupboards'].take_contents()"
|
184
|
+
},
|
185
|
+
],
|
179
186
|
},
|
180
187
|
|
181
188
|
'Dining Room': {
|
neelthee_mansion/creatures.py
CHANGED
@@ -214,10 +214,12 @@ class base_ability:
|
|
214
214
|
|
215
215
|
def activate(self, target: creature, damage: int = 5):
|
216
216
|
self.ready = False
|
217
|
+
self.current_cooldown = 0
|
217
218
|
print(f"Ability {self.name} will be ready after {self.cooldown_time} commands.")
|
218
219
|
|
219
220
|
def Tick(self):
|
220
221
|
self.current_cooldown += 1
|
222
|
+
self.check_cooldown
|
221
223
|
|
222
224
|
def check_cooldown(self):
|
223
225
|
if self.current_cooldown >= self.cooldown_time:
|
neelthee_mansion/items.py
CHANGED
@@ -65,3 +65,10 @@ class container:
|
|
65
65
|
def __init__(self, contents: list[item], secret: bool = False) -> None:
|
66
66
|
self.contents = contents
|
67
67
|
self.secret = secret
|
68
|
+
|
69
|
+
def take_contents(self, geter = None):
|
70
|
+
try:
|
71
|
+
for Item in self.contents:
|
72
|
+
geter.inventory_add(Item)
|
73
|
+
finally:
|
74
|
+
self.contents = None
|
@@ -0,0 +1,14 @@
|
|
1
|
+
neelthee_mansion/Mansion_of_Amnesia.py,sha256=4jMfqF_eBOpThpG7mKYkO_fUqk_qbJi7q8ftKiL1xGU,37893
|
2
|
+
neelthee_mansion/Quests.py,sha256=q6VzR3mt9AYe29ACWZuf-suz4yOKrL946aJ493eQRS0,2611
|
3
|
+
neelthee_mansion/Rooms.py,sha256=gsuHlQWclcEExt9c59-D-ElEk0uOMZpZogFjSYjetUc,81539
|
4
|
+
neelthee_mansion/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
|
+
neelthee_mansion/__main__.py,sha256=OIAWZ04le70DyjtR4hlmK9csHej7EHxeUrMoNnM-Vjc,95
|
6
|
+
neelthee_mansion/all_game_utils.py,sha256=Xfty9uXiYAfmA6iVzJurq852ZBPn7a4gQUcUcaV9yEU,341
|
7
|
+
neelthee_mansion/creatures.py,sha256=AwK38v_aLxV26mZtAZeSSeAQpZd66bL8zW7Hd7U4qR8,14058
|
8
|
+
neelthee_mansion/items.py,sha256=uzZ9fq6_YK3oQ2lkAsyidWwM6trasVsjdQi2V0JTPfw,2097
|
9
|
+
neelthee_mansion/utils.py,sha256=IfaFlIDPGMxW5eBNDTuRi-wFpPwPKSThdjYGpOZphYs,11494
|
10
|
+
neelthee_mansion-2.2.4.dist-info/METADATA,sha256=gnC-yRmQe7iVLlmc8KmjG1fndofBaAU9M2A5kGLGYw8,1680
|
11
|
+
neelthee_mansion-2.2.4.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
|
12
|
+
neelthee_mansion-2.2.4.dist-info/entry_points.txt,sha256=j5ScTTyIidFhmT3F6hcX9pnlom4cJdDmfe26BmM6Igo,56
|
13
|
+
neelthee_mansion-2.2.4.dist-info/top_level.txt,sha256=woQImQewylhly5Rb24HwPEGMxPY6do_PaUwGd5BNLOM,17
|
14
|
+
neelthee_mansion-2.2.4.dist-info/RECORD,,
|
@@ -1,14 +0,0 @@
|
|
1
|
-
neelthee_mansion/Mansion_of_Amnesia.py,sha256=0I6i8DXW5QW9xz2pT4eUtdNGYqmpv909tmgnQzNEOmk,37479
|
2
|
-
neelthee_mansion/Quests.py,sha256=q6VzR3mt9AYe29ACWZuf-suz4yOKrL946aJ493eQRS0,2611
|
3
|
-
neelthee_mansion/Rooms.py,sha256=J2FZcU63vxlfUCZxSxa_af2S04FiOVKzkP1hYxrE69c,81103
|
4
|
-
neelthee_mansion/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
|
-
neelthee_mansion/__main__.py,sha256=OIAWZ04le70DyjtR4hlmK9csHej7EHxeUrMoNnM-Vjc,95
|
6
|
-
neelthee_mansion/all_game_utils.py,sha256=Xfty9uXiYAfmA6iVzJurq852ZBPn7a4gQUcUcaV9yEU,341
|
7
|
-
neelthee_mansion/creatures.py,sha256=BMznNtk4dH5ns1YVtOKprVOIp0PjFf7pMHjAVpxvchg,13994
|
8
|
-
neelthee_mansion/items.py,sha256=MrLIpY33I5jU926MCapHAb34KKyZAf9rHo1E2hIUHS4,1898
|
9
|
-
neelthee_mansion/utils.py,sha256=IfaFlIDPGMxW5eBNDTuRi-wFpPwPKSThdjYGpOZphYs,11494
|
10
|
-
neelthee_mansion-2.2.2.dist-info/METADATA,sha256=U4NEm2UpZUawuOSI507m-tEy62ahvaWvTCtzzOYxm8E,1680
|
11
|
-
neelthee_mansion-2.2.2.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
|
12
|
-
neelthee_mansion-2.2.2.dist-info/entry_points.txt,sha256=j5ScTTyIidFhmT3F6hcX9pnlom4cJdDmfe26BmM6Igo,56
|
13
|
-
neelthee_mansion-2.2.2.dist-info/top_level.txt,sha256=woQImQewylhly5Rb24HwPEGMxPY6do_PaUwGd5BNLOM,17
|
14
|
-
neelthee_mansion-2.2.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|