comparison arogue5/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 0ed67132cf10
children 56e748983fa8
comparison
equal deleted inserted replaced
166:9b5f1e6aa35a 167:a0a57cf42810
82 switch (ch = tp->tr_type) { 82 switch (ch = tp->tr_type) {
83 case TRAPDOOR: 83 case TRAPDOOR:
84 if (is_player) { 84 if (is_player) {
85 level++; 85 level++;
86 pstats.s_hpt -= roll(1, 10); 86 pstats.s_hpt -= roll(1, 10);
87 msg("You fell into a trap!");
88 if (pstats.s_hpt <= 0) death(D_FALL); 87 if (pstats.s_hpt <= 0) death(D_FALL);
89 new_level(NORMLEV); 88 new_level(NORMLEV);
89 msg("You fell into a trap!");
90 } 90 }
91 else { 91 else {
92 if (can_see) msg("The %s fell into a trap!", mname); 92 if (can_see) msg("The %s fell into a trap!", mname);
93 93
94 /* See if the fall killed the monster */ 94 /* See if the fall killed the monster */