Mercurial > hg > early-roguelike
comparison xrogue/move.c @ 167:a0a57cf42810
ARogue family: don't hide messages caused by moving to a new level.
new_level() redraws the whole screen, including the message line, so if
msg() has just been called, the message will likely not last long
enough to be noticed. These cases have been changed so that msg() is
called after new_level().
If a fall through a trapdoor is fatal, "You fall into a trap!" is no
longer printed, but the tombstone should make things clear.
author | John "Elwin" Edwards |
---|---|
date | Mon, 29 Jun 2015 20:37:32 -0400 |
parents | e6179860cb76 |
children | f54901b9c39b |
comparison
equal
deleted
inserted
replaced
166:9b5f1e6aa35a | 167:a0a57cf42810 |
---|---|
83 switch (ch = tp->tr_type) { | 83 switch (ch = tp->tr_type) { |
84 case TRAPDOOR: | 84 case TRAPDOOR: |
85 if (is_player) { | 85 if (is_player) { |
86 level++; | 86 level++; |
87 pstats.s_hpt -= roll(1, 10); | 87 pstats.s_hpt -= roll(1, 10); |
88 msg("You fell through a trap! "); | |
89 if (pstats.s_hpt < 1) { | 88 if (pstats.s_hpt < 1) { |
90 pstats.s_hpt = -1; | 89 pstats.s_hpt = -1; |
91 death(D_FALL); | 90 death(D_FALL); |
92 } | 91 } |
93 wclear(cw); | 92 wclear(cw); |
94 wclear(mw); | 93 wclear(mw); |
95 new_level(NORMLEV); | 94 new_level(NORMLEV); |
95 msg("You fell through a trap! "); | |
96 } | 96 } |
97 else { | 97 else { |
98 if (can_see) msg("%s fell into a trap!", prname(mname, TRUE)); | 98 if (can_see) msg("%s fell into a trap!", prname(mname, TRUE)); |
99 | 99 |
100 /* | 100 /* |
140 /* worm hole trap to OUTSIDE */ | 140 /* worm hole trap to OUTSIDE */ |
141 when WORMHOLE: | 141 when WORMHOLE: |
142 if (is_player) { | 142 if (is_player) { |
143 prev_max = 1000; /* flag used in n_level.c */ | 143 prev_max = 1000; /* flag used in n_level.c */ |
144 level++; | 144 level++; |
145 msg("You suddenly find yourself in strange surroundings! "); | |
146 pstats.s_hpt -= roll(1, 10); | 145 pstats.s_hpt -= roll(1, 10); |
147 if (pstats.s_hpt < 1) { | 146 if (pstats.s_hpt < 1) { |
148 pstats.s_hpt = -1; | 147 pstats.s_hpt = -1; |
149 death(D_FALL); | 148 death(D_FALL); |
150 } | 149 } |
151 new_level(OUTSIDE); | 150 new_level(OUTSIDE); |
151 msg("You suddenly find yourself in strange surroundings! "); | |
152 return(ch); | 152 return(ch); |
153 } | 153 } |
154 else { | 154 else { |
155 if (can_see) msg("%s fell into the worm hole! ", prname(mname, TRUE)); | 155 if (can_see) msg("%s fell into the worm hole! ", prname(mname, TRUE)); |
156 | 156 |