neelthee-mansion 3.4.0__tar.gz → 3.5.0__tar.gz

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.
Files changed (19) hide show
  1. {neelthee_mansion-3.4.0 → neelthee_mansion-3.5.0}/PKG-INFO +1 -1
  2. {neelthee_mansion-3.4.0 → neelthee_mansion-3.5.0}/neelthee_mansion/Mansion_of_Amnesia.py +35 -43
  3. {neelthee_mansion-3.4.0 → neelthee_mansion-3.5.0}/neelthee_mansion/creatures.py +13 -4
  4. {neelthee_mansion-3.4.0 → neelthee_mansion-3.5.0}/neelthee_mansion/utils.py +50 -0
  5. {neelthee_mansion-3.4.0 → neelthee_mansion-3.5.0}/neelthee_mansion.egg-info/PKG-INFO +1 -1
  6. {neelthee_mansion-3.4.0 → neelthee_mansion-3.5.0}/setup.py +1 -1
  7. {neelthee_mansion-3.4.0 → neelthee_mansion-3.5.0}/README.md +0 -0
  8. {neelthee_mansion-3.4.0 → neelthee_mansion-3.5.0}/neelthee_mansion/Quests.py +0 -0
  9. {neelthee_mansion-3.4.0 → neelthee_mansion-3.5.0}/neelthee_mansion/Rooms.py +0 -0
  10. {neelthee_mansion-3.4.0 → neelthee_mansion-3.5.0}/neelthee_mansion/__init__.py +0 -0
  11. {neelthee_mansion-3.4.0 → neelthee_mansion-3.5.0}/neelthee_mansion/__main__.py +0 -0
  12. {neelthee_mansion-3.4.0 → neelthee_mansion-3.5.0}/neelthee_mansion/all_game_utils.py +0 -0
  13. {neelthee_mansion-3.4.0 → neelthee_mansion-3.5.0}/neelthee_mansion/items.py +0 -0
  14. {neelthee_mansion-3.4.0 → neelthee_mansion-3.5.0}/neelthee_mansion.egg-info/SOURCES.txt +0 -0
  15. {neelthee_mansion-3.4.0 → neelthee_mansion-3.5.0}/neelthee_mansion.egg-info/dependency_links.txt +0 -0
  16. {neelthee_mansion-3.4.0 → neelthee_mansion-3.5.0}/neelthee_mansion.egg-info/entry_points.txt +0 -0
  17. {neelthee_mansion-3.4.0 → neelthee_mansion-3.5.0}/neelthee_mansion.egg-info/requires.txt +0 -0
  18. {neelthee_mansion-3.4.0 → neelthee_mansion-3.5.0}/neelthee_mansion.egg-info/top_level.txt +0 -0
  19. {neelthee_mansion-3.4.0 → neelthee_mansion-3.5.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: neelthee_mansion
3
- Version: 3.4.0
3
+ Version: 3.5.0
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
@@ -15,7 +15,13 @@ GameState = {
15
15
  Neel-thee's Mansion of Amnesia
16
16
  '''
17
17
 
18
- global player, evil_mage, commands, NOTE_NUM, credits, characters, color_coding, quest_manager, revealer
18
+ global player, evil_mage, commands, NOTE_NUM, credits, color_coding, quest_manager, revealer, CHARACTERSLIST, BACKGROUNDS
19
+
20
+ BACKGROUNDS = [
21
+ 'Adventurer',
22
+ 'Artist',
23
+ 'Scholar',
24
+ ]
19
25
 
20
26
  revealer = KeyRevealer()
21
27
 
@@ -33,7 +39,7 @@ height = Height()
33
39
  weight = 0
34
40
 
35
41
 
36
- charactersList = [
42
+ CHARACTERSLIST = [
37
43
  {'name': 'Jack', 'age': 19, 'height': Height('6ft 3'), 'weight(LBs)': 213},
38
44
  {'name': 'Darcie-Mae', 'age': 19, 'height': Height('5ft 5'), 'weight(LBs)': 150},
39
45
  {'name': 'John', 'age': 25, 'height': Height('5ft 10'), 'weight(LBs)': 180},
@@ -923,15 +929,9 @@ def handle_guard_action(guard):
923
929
  else:
924
930
  return [False, [guard, True]] # Function was not found
925
931
 
926
- def main():
927
- global player, color_coding
928
- global charactersList
929
-
930
-
931
- df = pd.DataFrame(charactersList)
932
-
933
-
934
- # this is the initializer
932
+ def initializer():
933
+ global color_coding, player, CHARACTERSLIST
934
+ df = pd.DataFrame(CHARACTERSLIST)
935
935
  Standord_Player = loop_til_valid_input("Do you want to use a premade character?", "you didn't answer Y or N.", Y_N).value
936
936
 
937
937
  if Standord_Player:
@@ -943,9 +943,9 @@ def main():
943
943
  "That wasn't one of the characters. Please choose one.",
944
944
  int
945
945
  )
946
- lstIndex = last_index(charactersList)
946
+ lstIndex = last_index(CHARACTERSLIST)
947
947
  if selected_character <= lstIndex:
948
- character_info = charactersList[selected_character]
948
+ character_info = CHARACTERSLIST[selected_character]
949
949
  name = character_info['name']
950
950
  age = character_info['age']
951
951
  height = character_info['height']
@@ -965,46 +965,38 @@ def main():
965
965
  color_coding = loop_til_valid_input("Do you want color coding (Y/N)?", "you didn't answer Y or N.", Y_N).value
966
966
 
967
967
 
968
+ while True:
969
+ for idx, background in enumerate(BACKGROUNDS):
970
+ type_text(f"{idx}. {background}")
971
+
972
+ 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)
973
+ lstIndex = last_index(CHARACTERSLIST)
974
+ if background <= lstIndex:
975
+ background = BACKGROUNDS[background]
976
+ break
977
+ else:
978
+ type_text("You didn't pick one")
979
+
980
+
968
981
  # start the player in the Hall and sets up everything else
969
982
  player = PC(
970
983
  name,
971
984
  age,
972
- 'Warrior',
985
+ background,
973
986
  1,
974
987
  'Soldier',
975
988
  height,
976
989
  weight,
977
- [
978
- f"You joined the army at {14 if age >= 14 else age}",
979
- f"You joined the army to end the war and because you wanted glory",
980
- f"You spent your first year of service training and the rest on the front lines, surprisingly you didn't die",
981
- f"In your service, you made 3 friends, one of them died",
982
- f"You fought your enemies from the tops of the mountains to the vast oceans",
983
- f"Your father was never home; he was always off on great adventures until he died when you were {7 if age >= 7 else age}",
984
- f"You have no friends back home; you were always very lonely",
985
- f"You are an only child. You ran away from home to join the army; your mother misses you terribly",
986
- f"She was a baker, and you spent a lot of time helping her bake bread. You never went to school",
987
- f"The people you admire the most are Sam and Aragorn from Lord of the Rings, which you read as a child. You also read the Hunger Games when you were {13 if age >= 13 else age}",
988
- f"Your favorite weapon is a bow; however, the scimitar is a close second.",
989
- ],
990
- backstory=f"""
991
- You were born into a life of solitude as an only child. Your father was always away on grand adventures and passed away when you were just {7 if age >= 7 else age}. Your mother, a dedicated
992
- baker, raised you alone. Although she did her best, you spent most of your time helping her in the bakery rather than attending school, which left you feeling quite isolated.
993
-
994
- At the age of {14 if age >= 14 else age}, driven by a desire for glory and a wish to end the war, you left home to join the army. You spent your first year in rigorous training, followed by a
995
- harsh life on the front lines. Against all odds, you survived, forging bonds with three close friends—though one of them tragically died in battle. Your journey took you from the heights of
996
- mountains to the vast expanses of the ocean, each experience shaping who you are.
997
-
998
- You were deeply influenced by the heroes of your childhood—Sam and Aragorn from %*ITALIC*%Lord of the Rings%*RESET*%, which you read as a child, and the characters from %*ITALIC*%The Hunger
999
- Games%*RESET*%, which you read when you were {13 if age >= 13 else age}. These stories inspired you and fueled your dream of heroism. Though your favorite weapon is a bow, you also have a
1000
- fondness for the scimitar.
1001
-
1002
- Now, you find yourself in the Mansion of Amnesia, a place that seems to have erased your memories. The details of your past are fragmented, but the echoes of your history drive you forward.
1003
- You must navigate the mansion and uncover the truth behind your captivity, all while drawing strength from the remnants of your past.
1004
- """,
1005
- CURRENTROOM='Hall'
990
+ CURRENTROOM='Hall'
1006
991
  )
1007
992
 
993
+ def main():
994
+ global player, color_coding
995
+
996
+
997
+ # this is the initializer
998
+ initializer()
999
+
1008
1000
  # shows the instructions
1009
1001
  start()
1010
1002
 
@@ -126,7 +126,7 @@ class creature(base_character):
126
126
  self.difficulty = self.hp / 10 + self.atpw
127
127
  self.dropped_items = dropped_items
128
128
  self.xp = rounding(self.difficulty * 2 + len(self.dropped_items))
129
- self.description = description if description else f'A %*CYAN*%{self.name}%*RESET'
129
+ self.description = description if description else f'A %*CYAN*%{self.name}%*RESET.'
130
130
  self.flavor_text = flavor_text if flavor_text else f'You see a %*CYAN*%{self.name}%*RESET*%!'
131
131
  self.type = type
132
132
  self.crit_chance = crit_chance
@@ -144,6 +144,15 @@ class creature(base_character):
144
144
  Prints the description of the creature.
145
145
  """
146
146
  type_text(self.description)
147
+ curent_holiday = get_holiday()
148
+ if curent_holiday == 'christmas':
149
+ type_text(f"The {self.name} also has a santa hat.")
150
+ elif curent_holiday == 'easter':
151
+ type_text(f"The {self.name} also has bunny ears.")
152
+ elif curent_holiday == 'halloween':
153
+ if random < 0.2:
154
+ type_text(f"The {self.name} also has a pumkin on it's head.")
155
+
147
156
 
148
157
  class Guard(creature):
149
158
  """
@@ -190,11 +199,11 @@ class Guard(creature):
190
199
  rooms = []
191
200
  for direction, room in ROOMS[self.current_room]['directions'].items():
192
201
  rooms.append(room)
193
- self.current_room = choice(rooms)
202
+ self.current_room = choice(rooms).GetRoom()
194
203
  elif self.patrol_type == 'follow':
195
204
  for direction, room in ROOMS[self.current_room]['directions'].items():
196
- if room == player.CURRENTROOM:
197
- self.current_room = room
205
+ if room.GetRoom() == player.CURRENTROOM:
206
+ self.current_room = room.GetRoom()
198
207
  return
199
208
 
200
209
  def check_detection(self, player_room):
@@ -254,6 +254,56 @@ def is_executable(code_str):
254
254
  except (SyntaxError, TypeError):
255
255
  return False
256
256
 
257
+ def get_holiday():
258
+ today = date.today()
259
+ year = today.year
260
+
261
+ # Define date ranges for holidays
262
+ halloween_start = date(year, 10, 20)
263
+ halloween_end = date(year, 10, 31)
264
+
265
+ christmas_start = date(year, 12, 24)
266
+ christmas_end = date(year, 12, 26)
267
+
268
+ easter_sunday = calculate_easter_date(year)
269
+ easter_start = easter_sunday - timedelta(days=3)
270
+ easter_end = easter_sunday + timedelta(days=3)
271
+
272
+ # Check if today is near Halloween
273
+ if halloween_start <= today <= halloween_end:
274
+ return 'halloween'
275
+
276
+ # Check if today is near Christmas
277
+ elif christmas_start <= today <= christmas_end:
278
+ return 'christmas'
279
+
280
+ # Check if today is near Easter
281
+ elif easter_start <= today <= easter_end:
282
+ return 'easter'
283
+
284
+ # No holiday near today
285
+ else:
286
+ return None
287
+
288
+ # Easter calculation (based on the "Computus" algorithm)
289
+ def calculate_easter_date(year):
290
+ a = year % 19
291
+ b = year // 100
292
+ c = year % 100
293
+ d = b // 4
294
+ e = b % 4
295
+ f = (b + 8) // 25
296
+ g = (b - f + 1) // 3
297
+ h = (19 * a + b - d - g + 15) % 30
298
+ i = c // 4
299
+ k = c % 4
300
+ l = (32 + 2 * e + 2 * i - h - k) % 7
301
+ m = (a + 11 * h + 22 * l) // 451
302
+ month = (h + l - 7 * m + 114) // 31
303
+ day = ((h + l - 7 * m + 114) % 31) + 1
304
+
305
+ return date(year, month, day)
306
+
257
307
  def play_sound(sound_file):
258
308
  playsound(sound_file)
259
309
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: neelthee-mansion
3
- Version: 3.4.0
3
+ Version: 3.5.0
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
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name='neelthee_mansion',
5
- version='3.4.0',
5
+ version='3.5.0',
6
6
  packages=find_packages(), # Automatically finds all packages and modules
7
7
  install_requires=[
8
8
  'wheel', 'psutil', 'playsound', 'requests', 'keyboard', 'pandas', 'validators', 'dicttoxml', 'pytz',