Allow creation of fighting cards in bulk
This commit is contained in:
@@ -139,13 +139,6 @@ def generate_notes(attack_bonus_names, armor_bonus_names, hp_bonus_names):
|
||||
if len(hp_bonus_names) > 0:
|
||||
notes += f'with {" and ".join(hp_bonus_names)} applied. '
|
||||
|
||||
other = attack_bonus_names + armor_bonus_names
|
||||
if len(other) > 0:
|
||||
verb = 'is'
|
||||
if len(other) > 1:
|
||||
verb = 'are'
|
||||
notes += f'{" and ".join(other)} {verb} incoporated into net attack range'
|
||||
|
||||
return notes
|
||||
|
||||
|
||||
@@ -321,7 +314,9 @@ def generate_all_fight_results(data, nums):
|
||||
loops over all possible values of blacksmith research and any other
|
||||
relevant non-blacksmith bonuses found in fighting.constants.bonuses.
|
||||
'''
|
||||
all_results = {}
|
||||
for attacker, defender in itertools.product(nums.keys(), nums.keys()):
|
||||
fight_results = []
|
||||
attack_type = get_attack_type(nums[attacker], data)
|
||||
bonus_names = get_possible_bonus_names_for_fight(attacker, defender)
|
||||
combos = generate_all_combinations(*bonus_names)
|
||||
@@ -336,5 +331,7 @@ def generate_all_fight_results(data, nums):
|
||||
combo[0],
|
||||
combo[1],
|
||||
combo[2],
|
||||
True)
|
||||
print(results)
|
||||
False)
|
||||
fight_results.append(results)
|
||||
all_results[(attacker, defender)] = fight_results
|
||||
return all_results
|
||||
|
||||
Reference in New Issue
Block a user