neelthee-mansion 2.2.1__py3-none-any.whl → 2.2.3__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.
@@ -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
  █ █
@@ -172,7 +172,17 @@ ROOMS = {
172
172
  █ █
173
173
  █ææææ√ææ█
174
174
  █████████''',
175
- 'Hints': ['I wonder if there is anything salvageable in the cupboards', 'I should probably look around'],
175
+ 'Hints': [
176
+ 'I wonder if there is anything salvageable in the %*RED*%cupboards%*RESET*%',
177
+ 'I should probably look around',
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
+ ],
176
186
  },
177
187
 
178
188
  'Dining Room': {
@@ -200,7 +210,10 @@ ROOMS = {
200
210
  █ █
201
211
  █ █
202
212
  ████║████''',
203
- 'Hints': ['I wonder if there is anything in the chandelier', 'I wonder if there is anything around the room'],
213
+ 'Hints': [
214
+ 'I wonder if there is anything in the %*RED*%chandelier',
215
+ 'I wonder if there is anything around the room',
216
+ ],
204
217
  },
205
218
 
206
219
  'Garden': {
@@ -222,7 +235,9 @@ ROOMS = {
222
235
  █ ∩
223
236
  █ í
224
237
  █íííííííí''',
225
- 'Hints': ['I think I need a key for the gate'],
238
+ 'Hints': [
239
+ 'I think I need a %*BLUE*%key%*RESET*% for the gate',
240
+ ],
226
241
  },
227
242
 
228
243
  'Armoury': {
@@ -251,7 +266,10 @@ You notice a ''%*RED*%storage%*RESET*% device in one corner. You hear a %*YELLOW
251
266
  █Γ █
252
267
  █ █
253
268
  ████║████''',
254
- 'Hints': ['Maybe there is something salvageable on the racks', 'I wonder if that armour is salvageable'],
269
+ 'Hints': [
270
+ 'Maybe there is something salvageable on the %*RED*%racks%*RESET*%',
271
+ 'I wonder if that armour is salvageable',
272
+ ],
255
273
  },
256
274
 
257
275
  'Sitting Room': {
@@ -285,7 +303,11 @@ You notice a ''%*RED*%storage%*RESET*% device in one corner. You hear a %*YELLOW
285
303
  █ █
286
304
  █ █
287
305
  ████║████''',
288
- 'Hints': ['That pig seems dangerous', 'Those sofas look comfy', "I wonder what's down those stairs"],
306
+ 'Hints': [
307
+ 'That %*CYAN*%pig%*RESET*% seems dangerous',
308
+ 'Those %*RED*%sofas%*RESET*% look comfy',
309
+ "I wonder what's %*GREEN*%down%*RESET*% those stairs",
310
+ ],
289
311
  },
290
312
 
291
313
  'Landing': {
@@ -312,7 +334,9 @@ You notice a ''%*RED*%storage%*RESET*% device in one corner. You hear a %*YELLOW
312
334
  █╖ █
313
335
  █╖ █
314
336
  ████║████''',
315
- 'Hints': ['I wonder if I can pry one of the %*RED*%floorboards%*RESET*% back'],
337
+ 'Hints': [
338
+ 'I wonder if I can pry one of the %*RED*%floorboards%*RESET*% back'
339
+ ],
316
340
  },
317
341
 
318
342
  'Bedroom': {
@@ -339,7 +363,12 @@ You notice a ''%*RED*%storage%*RESET*% device in one corner. You hear a %*YELLOW
339
363
  █╬ §§█
340
364
  █╬ ☼☼§§█
341
365
  █████████''',
342
- 'Hints': ["I wonder what's north", 'I wonder if there is anything under the bed', 'I wonder if there is anything in the drawers', "I wonder what's in the wardrobe"],
366
+ 'Hints': [
367
+ "I wonder what's %*GREEN*%north%*RESET*%",
368
+ 'I wonder if there is anything under the %*RED*%bed%*RESET*%',
369
+ 'I wonder if there is anything in the %*RED*%drawers%*RESET*%',
370
+ "I wonder what's in the %*RED*%wardrobe%*RESET*%",
371
+ ],
343
372
  },
344
373
 
345
374
  'Office': {
@@ -365,7 +394,11 @@ You notice a ''%*RED*%storage%*RESET*% device in one corner. You hear a %*YELLOW
365
394
  █š █
366
395
  █ █
367
396
  ████║████''',
368
- 'Hints': ["I wonder what's in the storage, if anything", "I wonder what's through the southern door", 'I wonder if there is anything on the desk'],
397
+ 'Hints': [
398
+ "I wonder what's in the %*RED*%storage%*RESET*%, if anything",
399
+ "I wonder what's through the %*GREEN*%south%*RESET*%ern door",
400
+ 'I wonder if there is anything on the %*RED*%desk%*RESET*%',
401
+ ],
369
402
  },
370
403
 
371
404
  'Balcony': {
@@ -386,7 +419,9 @@ You notice a ''%*RED*%storage%*RESET*% device in one corner. You hear a %*YELLOW
386
419
  ∟ ∟
387
420
  ∟ ∟
388
421
  ∟∟∟∟∟∟∟∟∟''',
389
- 'Hints': ['', '', '', ''],
422
+ 'Hints': [
423
+ 'If I had a %*BLUE*%grappling-hook%*RESET*% I might be able to throw it into the trees and swing down into the forest',
424
+ ],
390
425
  },
391
426
 
392
427
  'Tower Bottom': {
@@ -410,7 +445,7 @@ You notice a ''%*RED*%storage%*RESET*% device in one corner. You hear a %*YELLOW
410
445
  █╖ █
411
446
  █╖ █
412
447
  ████║████''',
413
- 'Hints': ['', '', '', ''],
448
+ 'Hints': ["I wonder what's %*GREEN*%south%*RESET*%", "I wonder what's %*GREEN*%east%*RESET*%", "I wonder what's %*GREEN*%up%*RESET*%", "I wonder what's %*GREEN*%down%*RESET*%"],
414
449
  },
415
450
 
416
451
  'Tower Middle': {
@@ -421,6 +456,9 @@ You notice a ''%*RED*%storage%*RESET*% device in one corner. You hear a %*YELLOW
421
456
  'down': 'Tower Bottom',
422
457
  'up': 'Tower Top',
423
458
  },
459
+ 'containers': {
460
+ 'Stone': container([item('money-pouch', 'valuable', 25)], True),
461
+ },
424
462
  'item': item('tome'),
425
463
  'info': 'You are in the middle of a stone tower. The only light comes from above, through the cracks around the hatch to above.',
426
464
  'map': '''
@@ -433,7 +471,9 @@ You notice a ''%*RED*%storage%*RESET*% device in one corner. You hear a %*YELLOW
433
471
  █╖ █
434
472
  █╖ █
435
473
  █████████''',
436
- 'Hints': ['', '', '', ''],
474
+ 'Hints': [
475
+ 'There might be an item here',
476
+ ],
437
477
  },
438
478
 
439
479
  'Tower Top' :{
@@ -464,7 +504,9 @@ You notice a ''%*RED*%storage%*RESET*% device in one corner. You hear a %*YELLOW
464
504
  █ █
465
505
  █ █
466
506
  █████████''',
467
- 'Hints': ['', '', '', ''],
507
+ 'Hints': [
508
+ 'I could %*GREEN*%teleport%*RESET*%',
509
+ ],
468
510
  },
469
511
 
470
512
  'Basement Armoury': {
@@ -492,7 +534,10 @@ You notice a ''%*RED*%storage%*RESET*% device in one corner. You hear a %*YELLOW
492
534
  █ █
493
535
  █ █
494
536
  ████║████''',
495
- 'Hints': ['', '', '', ''],
537
+ 'Hints': [
538
+ 'The things in %*RED*%rack-1%*RESET*% and %*RED*%rack-2%*RESET*% are salvigable',
539
+ "I wonder if I can get this %*BLUE*%torch%*RESET*% out of it's holder",
540
+ ],
496
541
  },
497
542
 
498
543
  'Basement 1': {
@@ -517,7 +562,9 @@ You notice a ''%*RED*%storage%*RESET*% device in one corner. You hear a %*YELLOW
517
562
  █ █
518
563
  █ █
519
564
  ████║████''',
520
- 'Hints': ['', '', '', ''],
565
+ 'Hints': [
566
+ "I wonder if I can get this %*BLUE*%torch%*RESET*% out of it's holder",
567
+ ],
521
568
  },
522
569
 
523
570
  'Basement 2': {
@@ -540,7 +587,9 @@ You notice a ''%*RED*%storage%*RESET*% device in one corner. You hear a %*YELLOW
540
587
  █ █
541
588
  █ █
542
589
  █████████''',
543
- 'Hints': ['', '', '', ''],
590
+ 'Hints': [
591
+ "I wonder if I can get this %*BLUE*%torch%*RESET*% out of it's holder",
592
+ ],
544
593
  },
545
594
 
546
595
  'Basement 3': {
@@ -586,7 +635,9 @@ You notice a ''%*RED*%storage%*RESET*% device in one corner. You hear a %*YELLOW
586
635
  █ █
587
636
  █ █
588
637
  █████████''',
589
- 'Hints': ['', '', '', ''],
638
+ 'Hints': [
639
+ "I wonder if I can get this %*BLUE*%torch%*RESET*% out of it's holder",
640
+ ],
590
641
  },
591
642
 
592
643
  'Forest Clearing': {
@@ -609,7 +660,6 @@ You notice a ''%*RED*%storage%*RESET*% device in one corner. You hear a %*YELLOW
609
660
  ¥ ¥¥
610
661
  ¥ ¥
611
662
  ''',
612
- 'Hints': ['', '', '', ''],
613
663
  },
614
664
 
615
665
  'Forest Path1': {
@@ -630,7 +680,6 @@ You notice a ''%*RED*%storage%*RESET*% device in one corner. You hear a %*YELLOW
630
680
  ¥ ¥
631
681
  ¥¥ ¥ ¥
632
682
  ''',
633
- 'Hints': ['', '', '', ''],
634
683
  },
635
684
 
636
685
  'Forest Path2': {
@@ -651,7 +700,6 @@ You notice a ''%*RED*%storage%*RESET*% device in one corner. You hear a %*YELLOW
651
700
  ¥¥¥ ¥
652
701
  ¥ ¥¥¥
653
702
  ''',
654
- 'Hints': ['', '', '', ''],
655
703
  },
656
704
 
657
705
  'Teleportation Deck': {
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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: neelthee-mansion
3
- Version: 2.2.1
3
+ Version: 2.2.3
4
4
  Summary: A text-based adventure game set in Neel-thee’s mansion.
5
5
  Home-page: https://github.com/Flameblade375/neelthee_mansion
6
6
  Author: Alexander.E.F
@@ -1,14 +1,14 @@
1
- neelthee_mansion/Mansion_of_Amnesia.py,sha256=0I6i8DXW5QW9xz2pT4eUtdNGYqmpv909tmgnQzNEOmk,37479
1
+ neelthee_mansion/Mansion_of_Amnesia.py,sha256=4jMfqF_eBOpThpG7mKYkO_fUqk_qbJi7q8ftKiL1xGU,37893
2
2
  neelthee_mansion/Quests.py,sha256=q6VzR3mt9AYe29ACWZuf-suz4yOKrL946aJ493eQRS0,2611
3
- neelthee_mansion/Rooms.py,sha256=DPGcAWro1utfHjsTiwLfkf6dnypKNG-T_fnYlJXNsyk,79262
3
+ neelthee_mansion/Rooms.py,sha256=gsuHlQWclcEExt9c59-D-ElEk0uOMZpZogFjSYjetUc,81539
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=BMznNtk4dH5ns1YVtOKprVOIp0PjFf7pMHjAVpxvchg,13994
8
- neelthee_mansion/items.py,sha256=MrLIpY33I5jU926MCapHAb34KKyZAf9rHo1E2hIUHS4,1898
8
+ neelthee_mansion/items.py,sha256=uzZ9fq6_YK3oQ2lkAsyidWwM6trasVsjdQi2V0JTPfw,2097
9
9
  neelthee_mansion/utils.py,sha256=IfaFlIDPGMxW5eBNDTuRi-wFpPwPKSThdjYGpOZphYs,11494
10
- neelthee_mansion-2.2.1.dist-info/METADATA,sha256=UqeZRZebkjNw5pcK-f8Kl5R3XRNINKfsZeh0LVFnsX0,1680
11
- neelthee_mansion-2.2.1.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
12
- neelthee_mansion-2.2.1.dist-info/entry_points.txt,sha256=j5ScTTyIidFhmT3F6hcX9pnlom4cJdDmfe26BmM6Igo,56
13
- neelthee_mansion-2.2.1.dist-info/top_level.txt,sha256=woQImQewylhly5Rb24HwPEGMxPY6do_PaUwGd5BNLOM,17
14
- neelthee_mansion-2.2.1.dist-info/RECORD,,
10
+ neelthee_mansion-2.2.3.dist-info/METADATA,sha256=1UdYKJygrpbjpBehgXTgcffoLqzN6TP1p6X3WMb6gyE,1680
11
+ neelthee_mansion-2.2.3.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
12
+ neelthee_mansion-2.2.3.dist-info/entry_points.txt,sha256=j5ScTTyIidFhmT3F6hcX9pnlom4cJdDmfe26BmM6Igo,56
13
+ neelthee_mansion-2.2.3.dist-info/top_level.txt,sha256=woQImQewylhly5Rb24HwPEGMxPY6do_PaUwGd5BNLOM,17
14
+ neelthee_mansion-2.2.3.dist-info/RECORD,,