comparison xrogue/command.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 23fff8f7b303
children f54901b9c39b
comparison
equal deleted inserted replaced
166:9b5f1e6aa35a 167:a0a57cf42810
973 /* You can go up into the outside if standing on top of a worm hole */ 973 /* You can go up into the outside if standing on top of a worm hole */
974 if (position == WORMHOLE) { 974 if (position == WORMHOLE) {
975 prev_max = 1000; 975 prev_max = 1000;
976 level--; 976 level--;
977 if (level <= 0) level = 1; 977 if (level <= 0) level = 1;
978 msg("You find yourself in strange surroundings... ");
979 if (wizard) addmsg("Going up through a worm hole. "); 978 if (wizard) addmsg("Going up through a worm hole. ");
980 take_with(); 979 take_with();
981 new_level(OUTSIDE); 980 new_level(OUTSIDE);
981 msg("You find yourself in strange surroundings... ");
982 return; 982 return;
983 } 983 }
984 984
985 if (winat(hero.y, hero.x) != STAIRS) { 985 if (winat(hero.y, hero.x) != STAIRS) {
986 if (off(player, CANINWALL)) { /* Must use stairs if can't phase */ 986 if (off(player, CANINWALL)) { /* Must use stairs if can't phase */
1028 } 1028 }
1029 else if (cur_max > level) { 1029 else if (cur_max > level) {
1030 prev_max = 1000; /* flag used in n_level.c */ 1030 prev_max = 1000; /* flag used in n_level.c */
1031 level--; 1031 level--;
1032 if (level <= 0) level = 1; 1032 if (level <= 0) level = 1;
1033 msg("You emerge into the %s. ", daytime ? "eerie light" : "dark night");
1034 if (wizard) msg("Going up: cur_max=%d level=%d. ", cur_max, level); 1033 if (wizard) msg("Going up: cur_max=%d level=%d. ", cur_max, level);
1035 take_with(); 1034 take_with();
1036 new_level(OUTSIDE); /* Leaving the dungeon for outside */ 1035 new_level(OUTSIDE); /* Leaving the dungeon for outside */
1036 msg("You emerge into the %s. ", daytime ? "eerie light" : "dark night");
1037 return; 1037 return;
1038 } 1038 }
1039 else { 1039 else {
1040 prev_max = 1; /* flag used in n_level.c */ 1040 prev_max = 1; /* flag used in n_level.c */
1041 level = -1; /* Indicate that we are new to the outside */ 1041 level = -1; /* Indicate that we are new to the outside */
1042 msg("You emerge into the %s. ", daytime ? "eerie light" : "dark night");
1043 if (wizard) msg("Going up: cur_max=%d level=%d. ", cur_max, level); 1042 if (wizard) msg("Going up: cur_max=%d level=%d. ", cur_max, level);
1044 take_with(); 1043 take_with();
1045 new_level(OUTSIDE); 1044 new_level(OUTSIDE);
1045 msg("You emerge into the %s. ", daytime ? "eerie light" : "dark night");
1046 return; 1046 return;
1047 } 1047 }
1048 1048
1049 if (no_phase) unphase(); 1049 if (no_phase) unphase();
1050 } 1050 }