Files
aoe2-fighting/examples/example-fighting.py
Nate Bowman 67c9fc1696 Remove Blacksmith upgrades from siege weapons
Siege weapons do not benefit from Blacksmith upgrades.  Also, this
commit splits the attack and defense ranges from Blacksmith upgrades
into two attributes, which makes it easier to see what is happening to
get the final range of attack-vs-defense upgrade values.
2026-11-14 21:38:42 -05:00

28 lines
732 B
Python

from flashcards.maps import (create_maps,
read_data_to_dict)
from fighting.fighting import Fighting
# --- General section to read in names and data
# specify the namelist to be used to create the deck
# give the relative path of the file from flashcards.config.namelists_dir
namelist = 'units-test.txt'
#namelist = 'units-non-unique.txt'
# key into json file specifying which data you want
name_json_keys = 'units_buildings'
data_json_keys = ('data', 'Unit')
_, nums = create_maps(namelist, name_json_keys)
data = read_data_to_dict(data_json_keys)
fight = Fighting(data, nums)
results = fight.generate_all_fight_results()
for k, v in results.items():
print(k)
print(v)
print('\n\n')