-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathprint_loot.py
More file actions
executable file
·28 lines (24 loc) · 1.13 KB
/
print_loot.py
File metadata and controls
executable file
·28 lines (24 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env python3
from pythongame.core.game_data import CONSUMABLES, \
get_consumables_with_level
from pythongame.core.item_data import get_items_with_level, get_item_data_by_type, create_item_description, \
randomized_item_id
from pythongame.register_game_data import register_all_game_data
def print_loot():
for level in range(1, 10):
consumable_types = get_consumables_with_level(level)
item_types = get_items_with_level(level)
if not consumable_types and not item_types:
continue
print("LEVEL " + str(level))
print("- - - - -")
for c_type in consumable_types:
print("{:<25}".format(c_type.name) + "{:<15}".format("") + str(CONSUMABLES[c_type].description))
for i_type in item_types:
data = get_item_data_by_type(i_type)
description_lines = [line.text for line in create_item_description(randomized_item_id(i_type))]
print("{:<25}".format(data.base_name) + "{:<15}".format("(unique)" if data.is_unique else "") + ", ".join(
description_lines))
print("")
register_all_game_data()
print_loot()