Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[bin/crypt] putting out the fire with water

  • Loading branch information...
commit 00f8e1f6943229fb99b07f7a15a6afe0e4343ec0 1 parent 59cb5df
@masak authored
Showing with 42 additions and 0 deletions.
  1. +39 −0 bin/crypt
  2. +3 −0  game-data/descriptions
View
39 bin/crypt
@@ -1112,6 +1112,18 @@ class Crypt::Game {
.make_thing_carryable: 'helmet';
.make_thing_a_container: 'helmet';
+ # Things in cave
+ .place_thing: 'fire', 'cave';
+ .make_thing_a_container: 'fire';
+ .on_put:
+ 'fire',
+ -> $_ {
+ when 'water' {
+ $!engine.remark('fire-dies'),
+ $!engine.place_thing('fire', 'nowhere');
+ }
+ };
+
.place_player: $!player_location = 'clearing';
}
@@ -2539,6 +2551,33 @@ multi MAIN('test') {
'putting water into the car';
}
+ {
+ my $game = game_after_hanoi_is_solved();
+
+ $game.take('helmet');
+ $game.walk('north');
+ $game.walk('north');
+ $game.put_thing_in('water', 'helmet');
+ $game.walk('south');
+ $game.walk('south');
+ $game.walk('down');
+ is $game.put_thing_in('water', 'fire'),
+ [
+ Adventure::PlayerPutIn.new(
+ :thing<water>,
+ :in<fire>,
+ ),
+ Adventure::GameRemarked.new(
+ :remark<fire-dies>,
+ ),
+ Adventure::ThingPlaced.new(
+ :thing<fire>,
+ :room<nowhere>,
+ ),
+ ],
+ 'putting out the fire with water';
+ }
+
done;
}
View
3  game-data/descriptions
@@ -84,3 +84,6 @@ Your bare hands aren't very good at carrying water.
== remark:car-is-now-wet
What doesn't discolor the seats collects in miserable little puddles on the
floor mats.
+
+== remark:fire-dies
+The fire wanes and dies out.
Please sign in to comment.
Something went wrong with that request. Please try again.