Extension des Simulators pog
This commit is contained in:
parent
e0234dd2e4
commit
0505f3f1c9
39
hpCalcSim.py
39
hpCalcSim.py
@ -11,6 +11,8 @@ APog = [2,3,4,5]
|
||||
HPmult = 2
|
||||
APmult = 2
|
||||
|
||||
simRes = ""
|
||||
|
||||
print("AP:HP:HPnew\n")
|
||||
|
||||
for i in range(0,4):
|
||||
@ -18,24 +20,33 @@ for i in range(0,4):
|
||||
AP = HPog
|
||||
match i:
|
||||
case 0:
|
||||
print("## Calculating without Multipliers ##")
|
||||
caseString = "## Calculating without Multipliers ##"
|
||||
print(caseString)
|
||||
simRes += caseString
|
||||
|
||||
case 1:
|
||||
print("\n## Calculating with Attack Multipliers ##")
|
||||
caseString = "\n## Calculating with Attack Multipliers ##"
|
||||
print(caseString)
|
||||
simRes += caseString
|
||||
AP = [point * 2 for point in AP]
|
||||
|
||||
case 2:
|
||||
print("\n## Calculating with Defense Multipliers ##")
|
||||
caseString = "\n## Calculating with Defense Multipliers ##"
|
||||
print(caseString)
|
||||
simRes += caseString
|
||||
HP = [point * 2 for point in HP]
|
||||
|
||||
|
||||
case 3:
|
||||
print("\n## Calculating with Attack and Defense Multipliers ##")
|
||||
caseString = "\n## Calculating with Attack and Defense Multipliers ##"
|
||||
print(caseString)
|
||||
simRes += caseString
|
||||
AP = [point * 2 for point in AP]
|
||||
HP = [point * 2 for point in HP]
|
||||
|
||||
|
||||
print("-First Iteration-")
|
||||
itString = "\n-First Iteration-\n"
|
||||
print(itString)
|
||||
simRes += itString
|
||||
|
||||
liste = [AP, HP]
|
||||
combinations = [p for p in it.product(*liste)]
|
||||
@ -44,11 +55,21 @@ for i in range(0,4):
|
||||
|
||||
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"]))
|
||||
tmpStr = str(comb[0]) + ":" + str(comb[1]) + ":" + str(soln["HPnew"]) + "\n"
|
||||
print(tmpStr)
|
||||
simRes += tmpStr
|
||||
newcombs.append((comb[0], soln["HPnew"]))
|
||||
|
||||
print("-Second Iteration-")
|
||||
itString = "\n-Second Iteration-\n"
|
||||
print(itString)
|
||||
simRes += itString
|
||||
|
||||
for comb in newcombs:
|
||||
for soln in pl.query("einheit_alive("+str(comb[0])+","+str(comb[1])+", HPnew)"):
|
||||
print(str(comb[0]) + ":" + str(comb[1]) + ":" + str(soln["HPnew"]))
|
||||
tmpStr = str(comb[0]) + ":" + str(comb[1]) + ":" + str(soln["HPnew"]) + "\n"
|
||||
print(tmpStr)
|
||||
simRes += tmpStr
|
||||
|
||||
|
||||
with open("res.txt", "w") as w:
|
||||
w.write(simRes)
|
59
res.txt
Normal file
59
res.txt
Normal file
@ -0,0 +1,59 @@
|
||||
## Calculating without Multipliers ##
|
||||
-First Iteration-
|
||||
1:2:1
|
||||
1:3:2
|
||||
1:5:4
|
||||
2:3:1
|
||||
2:5:3
|
||||
3:5:2
|
||||
|
||||
-Second Iteration-
|
||||
1:2:1
|
||||
1:4:3
|
||||
2:3:1
|
||||
|
||||
## Calculating with Attack Multipliers ##
|
||||
-First Iteration-
|
||||
2:3:1
|
||||
2:5:3
|
||||
4:5:1
|
||||
|
||||
-Second Iteration-
|
||||
2:3:1
|
||||
|
||||
## Calculating with Defense Multipliers ##
|
||||
-First Iteration-
|
||||
1:2:1
|
||||
1:4:3
|
||||
1:6:5
|
||||
1:10:9
|
||||
2:4:2
|
||||
2:6:4
|
||||
2:10:8
|
||||
3:4:1
|
||||
3:6:3
|
||||
3:10:7
|
||||
5:6:1
|
||||
5:10:5
|
||||
|
||||
-Second Iteration-
|
||||
1:3:2
|
||||
1:5:4
|
||||
1:9:8
|
||||
2:4:2
|
||||
2:8:6
|
||||
3:7:4
|
||||
|
||||
## Calculating with Attack and Defense Multipliers ##
|
||||
-First Iteration-
|
||||
2:4:2
|
||||
2:6:4
|
||||
2:10:8
|
||||
4:6:2
|
||||
4:10:6
|
||||
6:10:4
|
||||
|
||||
-Second Iteration-
|
||||
2:4:2
|
||||
2:8:6
|
||||
4:6:2
|
Loading…
x
Reference in New Issue
Block a user