예제 #1
0
 def roll(self, char, weapon, options = None):
     variables = self.createVarDict(char, weapon, options)
     self.evaluate(variables)
     difficulty = variables["GS"]
     pool = variables["pool"]
     r = roll(pool)
     return getNumberOfSuccesses(r, difficulty)
예제 #2
0
 def rollSkill(self, skill, diff, minSuccesses=0, att=None):
     assert skill in self.skills
     if att is not None and att in self.attributes:
         diff = max(1, diff + self.attributes.getModifier(att))
     r = roll(self.getPoolSize(skill))
     if minSuccesses:
         return isSuccessful(r, diff, minSuccesses)
     else:
         return getNumberOfSuccesses(r, diff)
예제 #3
0
 def rollAttribute(self, att, diff, minSuccesses=0):
     r = roll(self.attributes[att])
     if minSuccesses:
         return isSuccessful(r, diff, minSuccesses)
     else:
         return getNumberOfSuccesses(r, diff)