From 8f5060cc3e5ffb0af25a8e5df0c29a61dfeb78f5 Mon Sep 17 00:00:00 2001 From: blitzmann Date: Sun, 17 Jun 2018 12:10:33 -0400 Subject: [PATCH] Fix some issues capping at a certain range (#1651) --- eos/saveddata/mutator.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eos/saveddata/mutator.py b/eos/saveddata/mutator.py index 7b8affd07..ff1473005 100644 --- a/eos/saveddata/mutator.py +++ b/eos/saveddata/mutator.py @@ -86,7 +86,10 @@ class Mutator(EqBase): returnVal = val else: # need to fudge the numbers a bit. Go with the value closest to base - returnVal = min(self.maxValue, max(self.minValue, val)) + if val >= 0: + returnVal = min(self.maxValue, max(self.minValue, val)) + else: + returnVal = max(self.maxValue, min(self.minValue, val)) return returnVal