Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[bin/crypt] putting water in the car

  • Loading branch information...
commit 59cb5dfade5fe8eaccef6ff8d45e28966312ebe7 1 parent d51648b
Carl Mäsak authored July 25, 2012
30  bin/crypt
@@ -1052,6 +1052,10 @@ class Crypt::Game {
1052 1052
                 'car',
1053 1053
                 -> $_ {
1054 1054
                     when 'leaves' { $!engine.remark: 'car-full-of-leaves' }
  1055
+                    when 'water' {
  1056
+                        $!engine.remark('car-is-now-wet'),
  1057
+                        $!engine.place_thing('water', 'hill');
  1058
+                    }
1055 1059
                 };
1056 1060
 
1057 1061
             # Things on hill
@@ -2509,6 +2513,32 @@ multi MAIN('test') {
2509 2513
             'picking up water with your bare hands fails';
2510 2514
     }
2511 2515
 
  2516
+    {
  2517
+        my $game = game_from_hall();
  2518
+
  2519
+        $game.use('flashlight');
  2520
+        $game.take('helmet');
  2521
+        $game.walk('north');
  2522
+        $game.walk('north');
  2523
+        $game.put_thing_in('water', 'helmet');
  2524
+        $game.walk('west');
  2525
+        is $game.put_thing_in('water', 'car'),
  2526
+            [
  2527
+                Adventure::PlayerPutIn.new(
  2528
+                    :thing<water>,
  2529
+                    :in<car>,
  2530
+                ),
  2531
+                Adventure::GameRemarked.new(
  2532
+                    :remark<car-is-now-wet>,
  2533
+                ),
  2534
+                Adventure::ThingPlaced.new(
  2535
+                    :thing<water>,
  2536
+                    :room<hill>,
  2537
+                ),
  2538
+            ],
  2539
+            'putting water into the car';
  2540
+    }
  2541
+
2512 2542
     done;
2513 2543
 }
2514 2544
 
4  game-data/descriptions
@@ -80,3 +80,7 @@ The whole floor tips back, hiding the hole again.
80 80
 
81 81
 == remark:bare-hands-carry-water
82 82
 Your bare hands aren't very good at carrying water.
  83
+
  84
+== remark:car-is-now-wet
  85
+What doesn't discolor the seats collects in miserable little puddles on the
  86
+floor mats.

0 notes on commit 59cb5df

Please sign in to comment.
Something went wrong with that request. Please try again.