PHYRRIC Victory\!
[naja.git] / data / location_decks / puzzles / chess.yaml
index 2fc0ac68fd32b81afcb691be1232281f91dc0992..42345731715aba6086110591ea702b51ce2872fe 100644 (file)
@@ -1,6 +1,18 @@
 description: "Kasparov to F3"
 puzzle: true
 
+# This field is ignored, but it's a useful place to put some action definitions
+# we can reference later.
+_action_defitions:
+  - &PHYRRIC-VICTORY
+    action_class: GenericBits
+    required_bits: [RED, GREEN, BLUE]
+    data:
+      clear: [NORTH, SOUTH, EAST, WEST, RED, GREEN, BLUE, MSB]
+      acquire_win: true
+      lose_health: true
+      once: true
+
 # This field is ignored, but it's a useful place to put some card definitions
 # we can reference later.
 _card_definitions:
@@ -11,10 +23,7 @@ _card_definitions:
         required_bits: []
         data:
           chesspiece: BISHOP
-      - action_class: AcquireWinToken
-        required_bits: [RED, GREEN, BLUE]
-        data:
-          once: true
+      - *PHYRRIC-VICTORY
   - &CHESS-WIN-CARD-CASTLE
     card_name: 'chess-win-rook'
     actions:
@@ -22,10 +31,7 @@ _card_definitions:
         required_bits: []
         data:
           chesspiece: CASTLE
-      - action_class: AcquireWinToken
-        required_bits: [RED, GREEN, BLUE]
-        data:
-          once: true
+      - *PHYRRIC-VICTORY
   - &CHESS-WIN-CARD-KNIGHT
     card_name: 'chess-win-knight'
     actions:
@@ -33,38 +39,32 @@ _card_definitions:
         required_bits: []
         data:
           chesspiece: KNIGHT
-      - action_class: AcquireWinToken
-        required_bits: [RED, GREEN, BLUE]
-        data:
-          once: true
+      - *PHYRRIC-VICTORY
   - &CHESS-WIN-CARD-SEPPUKU
     card_name: 'chess-win-seppuku'
     actions:
       - action_class: LoseHealthOrMSB
         required_bits: []
-      - action_class: AcquireWinToken
-        required_bits: [RED, GREEN, BLUE]
-        data:
-          once: true
+      - *PHYRRIC-VICTORY
   - &TEST-BORING
     card_name: 'test-boring'
     actions:
-      - action_class: 'DoNothing'
+      - action_class: DoNothing
         required_bits: []
   - &CHESS-CENTRE
     card_name: 'chess-centre'
     bits: [NORTH, SOUTH, EAST, WEST]
     actions:
-      - action_class: 'SetBits'
+      - action_class: SetBits
         required_bits: []
-      - action_class: 'AllowChessMove'
+      - action_class: AllowChessMove
         data: {'chesspiece': BISHOP}
         required_bits: [RED, GREEN, BLUE, MSB]
   - &CHESS-NORTH
     card_name: 'chess-north'
     bits: [NORTH, EAST, WEST, RED]
     actions:
-      - action_class: 'GenericBits'
+      - action_class: GenericBits
         required_bits: []
         data:
           toggle: [RED]
@@ -73,7 +73,7 @@ _card_definitions:
     card_name: 'chess-south'
     bits: [SOUTH, EAST, WEST, RED, GREEN]
     actions:
-      - action_class: 'GenericBits'
+      - action_class: GenericBits
         required_bits: []
         data:
           toggle: [RED, GREEN]
@@ -82,7 +82,7 @@ _card_definitions:
     card_name: 'chess-east'
     bits: [NORTH, SOUTH, EAST, RED, BLUE]
     actions:
-      - action_class: 'GenericBits'
+      - action_class: GenericBits
         required_bits: []
         data:
           toggle: [RED, BLUE]
@@ -92,7 +92,7 @@ _card_definitions:
     card_name: 'chess-west'
     bits: [NORTH, SOUTH, WEST, BLUE, MSB]
     actions:
-      - action_class: 'GenericBits'
+      - action_class: GenericBits
         required_bits: []
         data:
           toggle: [BLUE, MSB]