neelthee-mansion 3.20.20__py3-none-any.whl → 3.21.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 +231 -99
- {neelthee_mansion-3.20.20.dist-info → neelthee_mansion-3.21.0.dist-info}/METADATA +1 -1
- neelthee_mansion-3.21.0.dist-info/RECORD +16 -0
- neelthee_mansion/Mansion_of_Amnesia-win2.py +0 -1345
- neelthee_mansion/Rooms-win2.py +0 -1937
- neelthee_mansion-3.20.20.dist-info/RECORD +0 -18
- {neelthee_mansion-3.20.20.dist-info → neelthee_mansion-3.21.0.dist-info}/LICENSE.md +0 -0
- {neelthee_mansion-3.20.20.dist-info → neelthee_mansion-3.21.0.dist-info}/WHEEL +0 -0
- {neelthee_mansion-3.20.20.dist-info → neelthee_mansion-3.21.0.dist-info}/entry_points.txt +0 -0
- {neelthee_mansion-3.20.20.dist-info → neelthee_mansion-3.21.0.dist-info}/top_level.txt +0 -0
@@ -3,6 +3,7 @@ from .creatures import *
|
|
3
3
|
from .items import *
|
4
4
|
from .Quests import *
|
5
5
|
from .all_game_utils import *
|
6
|
+
import tkinter as tk
|
6
7
|
|
7
8
|
|
8
9
|
GameState = {
|
@@ -1114,106 +1115,237 @@ def handle_guard_action(guard):
|
|
1114
1115
|
def initializer():
|
1115
1116
|
global color_coding, player, CHARACTERSLIST
|
1116
1117
|
df = pd.DataFrame(CHARACTERSLIST)
|
1117
|
-
Standord_Player = loop_til_valid_input(
|
1118
|
-
"Do you want to use a premade character?", "you didn't answer Y or N.", Y_N
|
1119
|
-
).value
|
1120
1118
|
|
1121
|
-
|
1122
|
-
|
1123
|
-
|
1124
|
-
|
1125
|
-
|
1126
|
-
|
1127
|
-
|
1128
|
-
|
1129
|
-
|
1130
|
-
|
1131
|
-
|
1132
|
-
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1136
|
-
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1143
|
-
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1150
|
-
|
1151
|
-
|
1152
|
-
|
1153
|
-
|
1154
|
-
|
1155
|
-
|
1156
|
-
|
1157
|
-
|
1158
|
-
|
1159
|
-
|
1160
|
-
|
1161
|
-
|
1162
|
-
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
1180
|
-
|
1181
|
-
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
1185
|
-
|
1186
|
-
|
1187
|
-
|
1188
|
-
|
1189
|
-
|
1190
|
-
|
1191
|
-
|
1192
|
-
|
1193
|
-
|
1194
|
-
|
1195
|
-
|
1196
|
-
|
1197
|
-
|
1198
|
-
|
1199
|
-
|
1200
|
-
|
1201
|
-
|
1202
|
-
|
1203
|
-
|
1204
|
-
|
1205
|
-
|
1206
|
-
|
1207
|
-
|
1208
|
-
|
1209
|
-
|
1210
|
-
|
1211
|
-
|
1212
|
-
|
1213
|
-
|
1214
|
-
|
1215
|
-
|
1216
|
-
|
1119
|
+
# A tkinter window that asks these questions, instead of the console.Include a button that says "Exit Game". When the button is clicked, the game exits. Include a button that says "premade character". When the button is clicked, a new window opens that lets you choose one of the premade characters from teh CHARACTERSLIST var. Include a button that says "custom character". When the button is clicked, a new window opens that asks them for a name, age, hight, and waight(LBs).
|
1120
|
+
def create_main_menu():
|
1121
|
+
def select_character():
|
1122
|
+
selected_index = character_listbox.curselection()
|
1123
|
+
if selected_index:
|
1124
|
+
selected_character = CHARACTERSLIST[selected_index[0]]
|
1125
|
+
name_entry.delete(0, tk.END)
|
1126
|
+
name_entry.insert(0, selected_character['name'])
|
1127
|
+
age_entry.delete(0, tk.END)
|
1128
|
+
age_entry.insert(0, selected_character['age'])
|
1129
|
+
height_entry.delete(0, tk.END)
|
1130
|
+
height_entry.insert(0, selected_character['height'])
|
1131
|
+
weight_entry.delete(0, tk.END)
|
1132
|
+
weight_entry.insert(0, selected_character['weight(LBs)'])
|
1133
|
+
character_window.destroy()
|
1134
|
+
|
1135
|
+
def show_premade_characters():
|
1136
|
+
global character_window, character_listbox
|
1137
|
+
character_window = tk.Toplevel(root)
|
1138
|
+
character_window.title("Select Premade Character")
|
1139
|
+
character_listbox = tk.Listbox(character_window, width=50)
|
1140
|
+
for character in CHARACTERSLIST:
|
1141
|
+
character_info = f"Name: {character['name']}, Age: {character['age']}, Height: {character['height']}, Weight: {character['weight(LBs)']} LBs"
|
1142
|
+
character_listbox.insert(tk.END, character_info)
|
1143
|
+
character_listbox.pack()
|
1144
|
+
select_button = tk.Button(character_window, text="Select", command=select_character)
|
1145
|
+
select_button.pack()
|
1146
|
+
|
1147
|
+
def custom_character():
|
1148
|
+
name_entry.delete(0, tk.END)
|
1149
|
+
age_entry.delete(0, tk.END)
|
1150
|
+
height_entry.delete(0, tk.END)
|
1151
|
+
weight_entry.delete(0, tk.END)
|
1152
|
+
|
1153
|
+
def choose_background():
|
1154
|
+
background_window = tk.Toplevel(root)
|
1155
|
+
background_window.title("Choose Background")
|
1156
|
+
|
1157
|
+
tk.Label(background_window, text="Select a Background for Your Character:").pack()
|
1158
|
+
|
1159
|
+
background_listbox = tk.Listbox(background_window)
|
1160
|
+
for background in BACKGROUNDS.keys():
|
1161
|
+
background_listbox.insert(tk.END, background)
|
1162
|
+
background_listbox.pack()
|
1163
|
+
|
1164
|
+
def select_background():
|
1165
|
+
selected_index = background_listbox.curselection()
|
1166
|
+
if selected_index:
|
1167
|
+
background = list(BACKGROUNDS.keys())[selected_index[0]]
|
1168
|
+
background_skills = BACKGROUNDS[background]
|
1169
|
+
global player
|
1170
|
+
selected_character = {
|
1171
|
+
"name": name_entry.get(),
|
1172
|
+
"age": age_entry.get(),
|
1173
|
+
"height": height_entry.get(),
|
1174
|
+
"weight": weight_entry.get()
|
1175
|
+
}
|
1176
|
+
player = PC(
|
1177
|
+
selected_character["name"],
|
1178
|
+
selected_character["age"],
|
1179
|
+
background,
|
1180
|
+
1,
|
1181
|
+
"Solder",
|
1182
|
+
selected_character["height"],
|
1183
|
+
selected_character["weight"],
|
1184
|
+
Skills=background_skills
|
1185
|
+
)
|
1186
|
+
start_game()
|
1187
|
+
|
1188
|
+
select_button = tk.Button(background_window, text="Select", command=select_background)
|
1189
|
+
select_button.pack()
|
1190
|
+
|
1191
|
+
def exit_game():
|
1192
|
+
exit()
|
1193
|
+
|
1194
|
+
def continue_setup():
|
1195
|
+
ask_color_coding()
|
1196
|
+
|
1197
|
+
def start_game():
|
1198
|
+
# I will add more logic for starting the game later
|
1199
|
+
root.destroy()
|
1200
|
+
|
1201
|
+
def ask_color_coding():
|
1202
|
+
color_window = tk.Toplevel(root)
|
1203
|
+
color_window.title("Color Coding")
|
1204
|
+
tk.Label(color_window, text="Do you want color coding?").pack()
|
1205
|
+
tk.Button(color_window, text="Yes", command=lambda: set_color_coding(True)).pack()
|
1206
|
+
tk.Button(color_window, text="No", command=lambda: set_color_coding(False)).pack()
|
1207
|
+
|
1208
|
+
def set_color_coding(choice):
|
1209
|
+
global color_coding
|
1210
|
+
color_coding = choice
|
1211
|
+
# Add your logic for enabling/disabling color coding here
|
1212
|
+
choose_background()
|
1213
|
+
|
1214
|
+
root = tk.Tk()
|
1215
|
+
root.title("Character Creation")
|
1216
|
+
|
1217
|
+
tk.Label(root, text="Name:").pack()
|
1218
|
+
name_entry = tk.Entry(root)
|
1219
|
+
name_entry.pack()
|
1220
|
+
|
1221
|
+
tk.Label(root, text="Age:").pack()
|
1222
|
+
age_entry = tk.Entry(root)
|
1223
|
+
age_entry.pack()
|
1224
|
+
|
1225
|
+
tk.Label(root, text="Height:").pack()
|
1226
|
+
height_entry = tk.Entry(root)
|
1227
|
+
height_entry.pack()
|
1228
|
+
|
1229
|
+
tk.Label(root, text="Weight (LBs):").pack()
|
1230
|
+
weight_entry = tk.Entry(root)
|
1231
|
+
weight_entry.pack()
|
1232
|
+
|
1233
|
+
premade_button = tk.Button(root, text="Premade Character", command=show_premade_characters)
|
1234
|
+
premade_button.pack()
|
1235
|
+
|
1236
|
+
custom_button = tk.Button(root, text="Custom Character", command=custom_character)
|
1237
|
+
custom_button.pack()
|
1238
|
+
|
1239
|
+
continue_button = tk.Button(root, text="Continue", command=continue_setup)
|
1240
|
+
continue_button.pack()
|
1241
|
+
|
1242
|
+
exit_button = tk.Button(root, text="Exit Game", command=exit_game)
|
1243
|
+
exit_button.pack()
|
1244
|
+
|
1245
|
+
root.mainloop()
|
1246
|
+
|
1247
|
+
create_main_menu()
|
1248
|
+
|
1249
|
+
#Standord_Player = loop_til_valid_input(
|
1250
|
+
# "Do you want to use a premade character?", "you didn't answer Y or N.", Y_N
|
1251
|
+
#).value
|
1252
|
+
|
1253
|
+
#if Standord_Player:
|
1254
|
+
# while True:
|
1255
|
+
# type_text("Who do you want to play as?", colorTrue=False)
|
1256
|
+
# print(df)
|
1257
|
+
# selected_character = loop_til_valid_input(
|
1258
|
+
# "Who do you want to play as? (please select the number to the left of there stats)",
|
1259
|
+
# "That wasn't one of the characters. Please choose one.",
|
1260
|
+
# int,
|
1261
|
+
# )
|
1262
|
+
# lstIndex = last_index(CHARACTERSLIST)
|
1263
|
+
# if selected_character <= lstIndex:
|
1264
|
+
# character_info = CHARACTERSLIST[selected_character]
|
1265
|
+
# name = character_info["name"]
|
1266
|
+
# age = character_info["age"]
|
1267
|
+
# height = character_info["height"]
|
1268
|
+
# weight = character_info["weight(LBs)"]
|
1269
|
+
# break
|
1270
|
+
# else:
|
1271
|
+
# type_text(colorTrue=False)
|
1272
|
+
|
1273
|
+
#else:
|
1274
|
+
# type_text(
|
1275
|
+
# "You will now have to enter a name, age, height, and weight. Please enter the height in this format: _ft _. These will be used throughout the game.",
|
1276
|
+
# colorTrue=False,
|
1277
|
+
# )
|
1278
|
+
|
1279
|
+
# name = loop_til_valid_input(
|
1280
|
+
# "What is your name?",
|
1281
|
+
# "You didn't enter a string. Please enter a string.",
|
1282
|
+
# str,
|
1283
|
+
# )
|
1284
|
+
# age = loop_til_valid_input(
|
1285
|
+
# "What is your age (in whole years)?",
|
1286
|
+
# "You didn't enter an integer. Please enter an integer.",
|
1287
|
+
# int,
|
1288
|
+
# )
|
1289
|
+
# height = loop_til_valid_input(
|
1290
|
+
# "What is your height?",
|
1291
|
+
# "You didn't enter your height in the correct format. Please enter your height in the correct format.",
|
1292
|
+
# Height,
|
1293
|
+
# )
|
1294
|
+
# weight = loop_til_valid_input(
|
1295
|
+
# "What is your weight (in lbs)?",
|
1296
|
+
# "You didn't enter an integer. Please enter an integer.",
|
1297
|
+
# int,
|
1298
|
+
# )
|
1299
|
+
|
1300
|
+
#color_coding = loop_til_valid_input(
|
1301
|
+
# "Do you want color coding (Y/N)?", "you didn't answer Y or N.", Y_N
|
1302
|
+
#).value
|
1303
|
+
|
1304
|
+
#background_name = []
|
1305
|
+
#background_skills = []
|
1306
|
+
|
1307
|
+
#while True:
|
1308
|
+
# type_text("") # Prints an empty line
|
1309
|
+
# type_text("0. Random")
|
1310
|
+
|
1311
|
+
# # Display each background with its skills formatted correctly.
|
1312
|
+
# for idx, (background_name, background_skills) in enumerate(BACKGROUNDS.items()):
|
1313
|
+
# formatted_skills = ", ".join(background_skills)
|
1314
|
+
# type_text(f"{idx + 1}. {background_name} - {formatted_skills}")
|
1315
|
+
|
1316
|
+
# # Prompt the user to pick a background by number.
|
1317
|
+
# background = loop_til_valid_input(
|
1318
|
+
# "What background do you want? (please select the number to the left of them)",
|
1319
|
+
# "You didn't pick one",
|
1320
|
+
# int,
|
1321
|
+
# )
|
1322
|
+
|
1323
|
+
# length = len(BACKGROUNDS)
|
1324
|
+
# if 1 <= background <= length:
|
1325
|
+
# # Get the background name and skills based on user choice.
|
1326
|
+
# background_name = list(BACKGROUNDS.keys())[background - 1]
|
1327
|
+
# background_skills = BACKGROUNDS[background_name]
|
1328
|
+
# break
|
1329
|
+
# elif background == 0:
|
1330
|
+
# # Randomly select a background and get its associated skills.
|
1331
|
+
# background_name = choice(list(BACKGROUNDS.keys()))
|
1332
|
+
# background_skills = BACKGROUNDS[background_name]
|
1333
|
+
# break
|
1334
|
+
# else:
|
1335
|
+
# type_text("You didn't pick one")
|
1336
|
+
|
1337
|
+
## start the player in the Hall and sets up everything else
|
1338
|
+
#player = PC(
|
1339
|
+
# name,
|
1340
|
+
# age,
|
1341
|
+
# background,
|
1342
|
+
# 1,
|
1343
|
+
# "Soldier",
|
1344
|
+
# height,
|
1345
|
+
# weight,
|
1346
|
+
# CURRENTROOM="Hall",
|
1347
|
+
# Skills=background_skills,
|
1348
|
+
#)
|
1217
1349
|
|
1218
1350
|
|
1219
1351
|
def main():
|
@@ -0,0 +1,16 @@
|
|
1
|
+
neelthee_mansion/Books.py,sha256=Zs6GOi12vrikne-E37LdrLNRb6CyUogOCDApDGFj6Ls,26168
|
2
|
+
neelthee_mansion/Mansion_of_Amnesia.py,sha256=WaHjdJVck5mdm2SqWq6Mg1eGAt9PXWQXhyc5Uu6ritU,55875
|
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=vUR8PmdiftCFBCGJbHkCT4AMUPvqwouDGQ4ye2fiPCw,20910
|
9
|
+
neelthee_mansion/items.py,sha256=--DtMCZrurDAe3S-gB5DXAul_kmG9BGB0QmBY2-Fphc,6383
|
10
|
+
neelthee_mansion/utils.py,sha256=GaCkein6dppeufYfBMk59gHAE2b4p9TJW2MsRjyyFvQ,13702
|
11
|
+
neelthee_mansion-3.21.0.dist-info/LICENSE.md,sha256=CV8XGZaCyyAMdbkYFQUjb8AjBq9vkoyqdZCq1_hetms,1105
|
12
|
+
neelthee_mansion-3.21.0.dist-info/METADATA,sha256=Rd6EuKCPy2fz3nhfiCGU8pTZpTwtmgMQgrjw33qDBSI,1980
|
13
|
+
neelthee_mansion-3.21.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
14
|
+
neelthee_mansion-3.21.0.dist-info/entry_points.txt,sha256=j5ScTTyIidFhmT3F6hcX9pnlom4cJdDmfe26BmM6Igo,56
|
15
|
+
neelthee_mansion-3.21.0.dist-info/top_level.txt,sha256=woQImQewylhly5Rb24HwPEGMxPY6do_PaUwGd5BNLOM,17
|
16
|
+
neelthee_mansion-3.21.0.dist-info/RECORD,,
|