diff --git a/sc2/game_data.py b/sc2/game_data.py index 4283892c..1a590952 100644 --- a/sc2/game_data.py +++ b/sc2/game_data.py @@ -325,15 +325,11 @@ def __bool__(self) -> bool: return self.minerals != 0 or self.vespene != 0 def __add__(self, other: Cost) -> Cost: - if not other: - return self - if not self: - return other time = (self.time or 0) + (other.time or 0) return Cost(self.minerals + other.minerals, self.vespene + other.vespene, time=time) def __sub__(self, other: Cost) -> Cost: - time = (self.time or 0) + (other.time or 0) + time = (self.time or 0) - (other.time or 0) return Cost(self.minerals - other.minerals, self.vespene - other.vespene, time=time) def __mul__(self, other: int) -> Cost: