Apply state_change() to mirror object.
authorEric S. Raymond <esr@thyrsus.com>
Sun, 16 Jul 2017 09:08:03 +0000 (05:08 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Sun, 16 Jul 2017 09:08:03 +0000 (05:08 -0400)
actions.c
adventure.yaml

index 48de9d04a7f84763343d71627243b142e14a9470..c4d86b48ca42201318140bc294bb8238071d4488 100644 (file)
--- a/actions.c
+++ b/actions.c
@@ -253,7 +253,7 @@ static int vbreak(verb_t verb, obj_t obj)
     switch (obj) {
     case MIRROR:
         if (game.closed) {
-            rspeak(BREAK_MIRROR);
+            state_change(MIRROR, MIRROR_BROKEN);
             return GO_DWARFWAKE;
         } else {
             rspeak(TOO_FAR);
index 8336ac42fdf742a598f1d3671bd216f0aa9ab302..f857ac7257d5d922382dcc4381eed86390fb2406 100644 (file)
@@ -2883,9 +2883,6 @@ arbitrary_messages:  !!omap
     information to escape?  Sorry, but this initial hint is all you get."
 - DONT_UNDERSTAND: &dont_understand 'I''m afraid I don''t understand.'
 - HAND_PASSTHROUGH: 'Your hand passes through it as though it weren''t there.'
-- BREAK_MIRROR: |-
-    You strike the mirror a resounding blow, whereupon it shatters into a
-    myriad tiny fragments.
 - PROD_DWARF: |-
     You prod the nearest dwarf, who wakes up grumpily, takes one look at
     you, curses, and grabs for his axe.
@@ -3274,7 +3271,15 @@ objects: !!omap
     inventory: '*mirror'
     locations: LOC_MIRRORCANYON
     immovable: true
-    descriptions: !!null
+    states: [MIRROR_UNBROKEN, MIRROR_BROKEN]
+    descriptions:
+    - ''
+    - ''
+    changes:
+    - ''
+    - |-
+        You strike the mirror a resounding blow, whereupon it shatters into a
+        myriad tiny fragments.
 - PLANT:
     words: ['plant', 'beans']
     inventory: '*plant'