if self.data['chesspiece'] in CHESS_PIECES:
chesspiece = CHESS_PIECES[self.data['chesspiece']]
board.allow_chess_move(chesspiece)
+
+
+class AllowChessMoveIfMSB(LocationAction):
+ TEXT = "Clear {MSB} and move like a %(chesspiece_name)s for one turn."
+ MSB_GLYPH = ACTION_GLYPHS.MOVEMENT
+
+ def perform_action(self, board, location):
+ if self.data['chesspiece'] in CHESS_PIECES:
+ if self.check_and_clear_MSB(board.player):
+ chesspiece = CHESS_PIECES[self.data['chesspiece']]
+ board.allow_chess_move(chesspiece)