Explorar el Código

Move logic to bluse function directly, forgot how touch was being used

Kirk Trombley hace 3 años
padre
commit
7989031b2f
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  1. 3 2
      commands/commands/curse.py

+ 3 - 2
commands/commands/curse.py

@@ -12,7 +12,7 @@ class CurseScore:
     zero_passes: int = 0
 
     def touch(self):
-        if abs(self.score) <= 1:
+        if self.score == 0:
             self.zero_passes += 1
 
     def __str__(self):
@@ -56,6 +56,7 @@ async def bless(target: Target(), store: Data(CurseScore)):
 @as_command
 async def blurse(target: Target(), store: Data(CurseScore)):
     score = await store.load_or(target)
-    score.touch()
+    if abs(score.score) <= 1:
+        score.zero_passes += 1
     await store.save(target, score)
     return f"{target.capitalize()} = {score}"