Optional remove win actions once they're used.
authorSimon Cross <hodgestar@gmail.com>
Sat, 17 May 2014 18:17:13 +0000 (20:17 +0200)
committerSimon Cross <hodgestar@gmail.com>
Sat, 17 May 2014 18:31:09 +0000 (20:31 +0200)
naja/actions.py

index 5aa465a4c3122889e801871211432323a0cbaf71..6f03358b34b64de2d4c0b01027ab083ac3707482 100644 (file)
@@ -175,6 +175,8 @@ class AcquireWinToken(LocationAction):
         board.player.bits.clear_bits(set([
             BITS.RED, BITS.GREEN, BITS.BLUE,
         ]))
+        if self.data.get('once', False):
+            location.actions.remove(self)
 
 
 class GainHealth(LocationAction):