board.player.bits.clear_bits(set([
BITS.CYAN, BITS.MAGENTA, BITS.YELLOW,
]))
+
+
+class GainHealthAndClearBitsOrMSB(LocationAction):
+ TEXT = "Gain health, then clear bits specified by this location or MSB."
+ USES_MSB = True
+
+ def perform_action(self, board, location):
+ board.gain_health()
+ if not self.check_and_clear_MSB(board.player):
+ board.player.bits.clear_bits(location.bitwise_operand)