Define some YAML references for common actions.
authorJeremy Thurgood <firxen@gmail.com>
Mon, 12 May 2014 17:38:11 +0000 (19:38 +0200)
committerJeremy Thurgood <firxen@gmail.com>
Mon, 12 May 2014 17:38:11 +0000 (19:38 +0200)
data/location_decks/test.yaml

index b5df649d1a1c2d573841b7d951a4ac08a13aa508..d26cafde89356beb56cf41fc0c40b2854b332856 100644 (file)
@@ -1,16 +1,26 @@
 description: "Test location deck."
+
+# This field is ignored, but it's a useful place to put some action definitions
+# we can reference later.
+_standard_actions:
+  bad_default: &BAD-DEFAULT
+    action_class: 'LoseHealthOrMSB'
+    required_bits: []
+  toggle_bits_c: &TOGGLE-BITS-C
+    action_class: 'ToggleBits'
+    required_bits: [CYAN]
+  set_bits_ym: &SET-BITS-YM
+    action_class: 'SetBits'
+    required_bits: [YELLOW, MAGENTA]
+
 cards:
   - actions: []
   - actions:
-    - action_class: 'LoseHealthOrMSB'
-      required_bits: []
-    - action_class: 'ToggleBits'
-      required_bits: [CYAN]
-    - action_class: 'SetBits'
-      required_bits: [YELLOW, MAGENTA]
+    - *BAD-DEFAULT
+    - *TOGGLE-BITS-C
+    - *SET-BITS-YM
   - actions:
     - action_class: 'ToggleBits'
       required_bits: [YELLOW]
   - actions:
-    - action_class: 'SetBits'
-      required_bits: [YELLOW, CYAN]
+    - *SET-BITS-YM