diff --git a/hpCalcSim.py b/hpCalcSim.py new file mode 100644 index 0000000..ee9e9be --- /dev/null +++ b/hpCalcSim.py @@ -0,0 +1,43 @@ +import random +from pyswip import Prolog as pl +import itertools as it + +print("Consulting") +pl.consult("main.pl") + +HP = [1,2,3,5] +AP = [2,3,4,5] + +HPmult = 2 +APmult = 2 + +print("AP:HP:HPnew\n") + +for i in range(0,4): + match i: + case 0: + print("Calculating without Multipliers") + + case 1: + print("\nCalculating with Attack Multipliers") + AP = [point * 2 for point in AP] + + case 2: + print("\nCalculating with Defense Multipliers") + HP = [point * 2 for point in HP] + + + case 3: + print("\nCalculating with Attack and Defense Multipliers") + AP = [point * 2 for point in AP] + HP = [point * 2 for point in HP] + + + + liste = [AP, HP] + combinations = [p for p in it.product(*liste)] + + for comb in combinations : + for soln in pl.query("einheit_alive("+str(comb[0])+","+str(comb[1])+", HPnew)"): + print(str(comb[0]) + ":" + str(comb[1]) + ":" + str(soln["HPnew"])) +