From: Neil Date: Sat, 17 May 2014 12:34:12 +0000 (+0200) Subject: Unbreak the game by adding card_names to the yaml files X-Git-Tag: 0.1~109 X-Git-Url: https://git.ctpug.org.za/?a=commitdiff_plain;h=faf6b0cef3ab0a98eb9899a27505d7bb4a04eef1;p=naja.git Unbreak the game by adding card_names to the yaml files --- diff --git a/data/location_decks/standard.yaml b/data/location_decks/standard.yaml index 0ff3bc6..885070e 100644 --- a/data/location_decks/standard.yaml +++ b/data/location_decks/standard.yaml @@ -99,34 +99,48 @@ _action_definitions: # we can reference later. _card_definitions: - &WIN-CARD-1 + card_name: + - 'win1' actions: - *ACQUIRE-WIN-TOKEN - &WIN-CARD-2 + card_name: + - 'win2' actions: - *BAD-DEFAULT - *ACQUIRE-WIN-TOKEN - &WIN-CARD-3 + card_name: + - 'win3' actions: - *SET-BITS-DEFAULT - *ACQUIRE-WIN-TOKEN - &KNIGHT-AND-SET + card_name: + - 'knight_set' actions: - *BAD-DEFAULT - *SET-BITS-B - *KNIGHT-MOVE - &CASTLE-AND-SET + card_name: + - 'castle_set' actions: - *BAD-DEFAULT - *SET-BITS-G - *CASTLE-MOVE - &BISHOP-AND-SET + card_name: + - 'bishop_set' actions: - *BAD-DEFAULT - *SET-BITS-R - *BISHOP-MOVE - &TOGGLE-RG-R + card_name: + - 'toggle-rg-r' bits: [RED, GREEN] # Colour-blind robot! actions: - *GAIN-HEALTH-DEFAULT @@ -135,6 +149,8 @@ _card_definitions: - action_class: 'SetBits' required_bits: [GREEN, BLUE] - &TOGGLE-RG-G + card_name: + - 'toggle-rg-g' bits: [RED, GREEN] # Colour-blind robot! actions: - *GAIN-HEALTH-DEFAULT @@ -144,43 +160,59 @@ _card_definitions: required_bits: [RED, BLUE] - &SHIFT-N-AND-HEAL + card_name: + - 'shift-n-heal' actions: - *TOGGLE-BITS-DEFAULT - *SHIFT-N - *HEAL-RG - &SHIFT-S-AND-HEAL + card_name: + - 'shift-s-heal' actions: - *TOGGLE-BITS-DEFAULT - *SHIFT-S - *HEAL-RG - &SHIFT-E-AND-HEAL + card_name: + - 'shift-e-heal' actions: - *TOGGLE-BITS-DEFAULT - *SHIFT-E - *HEAL-RB - &SHIFT-W-AND-HEAL + card_name: + - 'shift-w-heal' actions: - *TOGGLE-BITS-DEFAULT - *SHIFT-W - *HEAL-RB - &ROT-CW-AND-SET + card_name: + - 'rot-cw-set' actions: - *TOGGLE-BITS-DEFAULT - *ROT-CW - *SET-BITS-B - &ROT-CCW-AND-SET + card_name: + - 'rot-ccw-set' actions: - *TOGGLE-BITS-DEFAULT - *ROT-CCW - *SET-BITS-G - &SHIFT-E-BITSHIFT + card_name: + - 'shift-e-bitshift' actions: - *SHIFT-E - *BITSHIFT-R - &SHIFT-W-BITSHIFT + card_name: + - 'shift-w-bitshift' actions: - *SHIFT-W - *BITSHIFT-L diff --git a/data/location_decks/test.yaml b/data/location_decks/test.yaml deleted file mode 100644 index d88978d..0000000 --- a/data/location_decks/test.yaml +++ /dev/null @@ -1,62 +0,0 @@ -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: - - &SET-BITS-DEFAULT - action_class: 'LoseHealthOrMSBAndSetBits' - required_bits: [] - - &GAIN-HEALTH-DEFAULT - action_class: 'GainHealthAndClearBitsOrMSB' - required_bits: [] - - &BAD-DEFAULT - action_class: 'LoseHealthOrMSB' - required_bits: [] - - &TOGGLE-BITS-C - action_class: 'ToggleBits' - required_bits: [BLUE] - - &SET-BITS-YM - action_class: 'SetBits' - required_bits: [RED, GREEN] - - &ACQUIRE-WIN-TOKEN - action_class: 'AcquireWinToken' - required_bits: [RED, GREEN, BLUE] - -cards: - - actions: - - *SET-BITS-DEFAULT - - actions: - - *BAD-DEFAULT - - *TOGGLE-BITS-C - - *SET-BITS-YM - - actions: - - action_class: 'ToggleBits' - required_bits: [RED] - - actions: - - *SET-BITS-YM - - actions: - - *BAD-DEFAULT - - *ACQUIRE-WIN-TOKEN - - actions: - - *GAIN-HEALTH-DEFAULT - - *TOGGLE-BITS-C - - actions: - - action_class: 'ShiftLocations' - required_bits: [GREEN, BLUE] - data: {'direction': NORTH} - - bits: [RED, GREEN] # colour-blind robot! - actions: - - action_class: 'ToggleBits' - required_bits: [GREEN] - - actions: - - action_class: 'AllowChessMove' - required_bits: [RED, BLUE] - data: {'chesspiece': KNIGHT} - - actions: - - action_class: 'AllowChessMove' - required_bits: [RED, BLUE] - data: {'chesspiece': BISHOP} - - actions: - - action_class: 'AllowChessMove' - required_bits: [RED, BLUE] - data: {'chesspiece': CASTLE} diff --git a/data/location_decks/test_puzzle.yaml b/data/location_decks/test_puzzle.yaml index 60b8149..8ca9f2d 100644 --- a/data/location_decks/test_puzzle.yaml +++ b/data/location_decks/test_puzzle.yaml @@ -93,9 +93,13 @@ _action_definitions: # we can reference later. _card_definitions: - &TEST-WIN-CARD + card_name: + - 'test-win' actions: - *TEST-WIN - &TEST-BORING + card_name: + - 'test-boring' actions: - *TEST-NULL