Ignore mutations with 0 base value

This commit is contained in:
DarkPhoenix
2020-04-23 19:47:57 +03:00
parent 0859f2fbe9
commit 8eed6fbe21
2 changed files with 4 additions and 0 deletions

View File

@@ -81,6 +81,8 @@ class Mutator(EqBase):
@validates("value")
def validator(self, key, val):
""" Validates values as properly falling within the range of the modules' Mutaplasmid """
if self.baseValue == 0:
return 0
mod = val / self.baseValue
if self.minMod <= mod <= self.maxMod: