Compare commits
4 Commits
d2f490a9cf
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2da9e96537 | ||
|
|
e848494967 | ||
|
|
2331bab303 | ||
|
|
346273f737 |
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
input.txt
|
||||||
@@ -57,20 +57,20 @@ class Action:
|
|||||||
hits=False
|
hits=False
|
||||||
crit=False
|
crit=False
|
||||||
if(self.advantage==0):
|
if(self.advantage==0):
|
||||||
if(((self.hit[0]+self.hit[1]) >=self.targetAc and (self.hit[0]-self.atkMod)>1) or self.critAbove<(self.hit[0]-self.atkMod)): # 0 (rul 1 value), 1 (rul 1 bonus), 2 (rul 2 value), 3(rul 2 bonus)
|
if(((self.hit[0]+self.hit[1]) >=self.targetAc and (self.hit[0]-self.atkMod)>1) or self.critAbove<=(self.hit[0]-self.atkMod)): # 0 (rul 1 value), 1 (rul 1 bonus), 2 (rul 2 value), 3(rul 2 bonus)
|
||||||
hits=1
|
hits=1
|
||||||
if(self.critAbove<(self.hit[0]-self.atkMod)):
|
if(self.critAbove<=(self.hit[0]-self.atkMod)):
|
||||||
self.crits=1
|
self.crits=1
|
||||||
if(self.advantage==1):
|
if(self.advantage==1):
|
||||||
if(((self.hit[2]+self.hit[3]) >=self.targetAc and (self.hit[2]-self.atkMod)>1 or (self.hit[0]+self.hit[1]) >=self.targetAc and (self.hit[0]-self.atkMod)>1) or (self.critAbove<self.hit[2]-self.atkMod) or (self.critAbove<self.hit[0]-self.atkMod)):
|
if(((self.hit[2]+self.hit[3]) >=self.targetAc and (self.hit[2]-self.atkMod)>1 or (self.hit[0]+self.hit[1]) >=self.targetAc and (self.hit[0]-self.atkMod)>1) or (self.critAbove<=self.hit[2]-self.atkMod) or (self.critAbove<=self.hit[0]-self.atkMod)):
|
||||||
hits=1
|
hits=1
|
||||||
if((self.critAbove<self.hit[2]-self.atkMod) or (self.critAbove<self.hit[0]-self.atkMod)):
|
if((self.critAbove<=self.hit[2]-self.atkMod) or (self.critAbove<=self.hit[0]-self.atkMod)):
|
||||||
self.crits=1
|
self.crits=1
|
||||||
|
|
||||||
if(self.advantage==-1):
|
if(self.advantage==-1):
|
||||||
if((((self.hit[2]+self.hit[3]) >=self.targetAc and (self.hit[2]-self.atkMod)>1) or ((self.critAbove<self.hit[2]-self.atkMod))) and (((self.hit[0]+self.hit[1]) >=self.targetAc and (self.hit[0]-self.atkMod)>1) or (self.critAbove<self.hit[0]-self.atkMod))):
|
if((((self.hit[2]+self.hit[3]) >=self.targetAc and (self.hit[2]-self.atkMod)>1) or ((self.critAbove<=self.hit[2]-self.atkMod))) and (((self.hit[0]+self.hit[1]) >=self.targetAc and (self.hit[0]-self.atkMod)>1) or (self.critAbove<=self.hit[0]-self.atkMod))):
|
||||||
hits=1
|
hits=1
|
||||||
if((self.critAbove<self.hit[2]-self.atkMod) and (self.critAbove<self.hit[0]-self.atkMod)):
|
if((self.critAbove<=self.hit[2]-self.atkMod) and (self.critAbove<=self.hit[0]-self.atkMod)):
|
||||||
self.crits=1
|
self.crits=1
|
||||||
|
|
||||||
if(hits==1):
|
if(hits==1):
|
||||||
@@ -94,7 +94,7 @@ class Action:
|
|||||||
fumbles=False
|
fumbles=False
|
||||||
return fumbles
|
return fumbles
|
||||||
|
|
||||||
damTypes=["Slashing","Radiant","Great Weapon Master","Divine","Holy Weapon","Great Weapon Master/Radiant", "Bludgeoning"]
|
damTypes=["Slashing","Radiant","Great Weapon Master","Divine","Holy Weapon","Great Weapon Master/Radiant", "Bludgeoning","arm of dawn, Awakend","Lightning"]
|
||||||
con=0
|
con=0
|
||||||
def incContext():
|
def incContext():
|
||||||
res=0
|
res=0
|
||||||
@@ -116,7 +116,7 @@ def checkIfCounts(line):
|
|||||||
estCon=0
|
estCon=0
|
||||||
if(re.match("(^_?[0-9]+){1}( \+ [0-9]+)?( [0-9]+( \+ [0-9])*)?", line)):
|
if(re.match("(^_?[0-9]+){1}( \+ [0-9]+)?( [0-9]+( \+ [0-9])*)?", line)):
|
||||||
print("match : " + line)
|
print("match : " + line)
|
||||||
estCon=1 # attackroll eller dam
|
estCon=1 # attackroll eller
|
||||||
s=re.search('\([-|\+][0-9]+\)+', line)
|
s=re.search('\([-|\+][0-9]+\)+', line)
|
||||||
if(s!=None):
|
if(s!=None):
|
||||||
print("match modifier: " + line)
|
print("match modifier: " + line)
|
||||||
|
|||||||
Reference in New Issue
Block a user