summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/output.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/output.cc')
-rw-r--r--crawl-ref/source/output.cc165
1 files changed, 90 insertions, 75 deletions
diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc
index 792bf67d41..ee215b8ee2 100644
--- a/crawl-ref/source/output.cc
+++ b/crawl-ref/source/output.cc
@@ -198,6 +198,9 @@ void print_stats(void)
you.redraw_strength = 0;
+ if (you.strength < 1)
+ ouch(INSTANT_DEATH, 0, KILLED_BY_WEAKNESS);
+
burden_change();
}
@@ -225,6 +228,9 @@ void print_stats(void)
cprintf( " " );
you.redraw_intelligence = 0;
+
+ if (you.intel < 1)
+ ouch(INSTANT_DEATH, 0, KILLED_BY_STUPIDITY);
}
if (you.redraw_dexterity)
@@ -251,6 +257,9 @@ void print_stats(void)
cprintf( " " );
you.redraw_dexterity = 0;
+
+ if (you.dex < 1)
+ ouch(INSTANT_DEATH, 0, KILLED_BY_CLUMSINESS);
}
if (you.redraw_armour_class)
@@ -319,9 +328,10 @@ void print_stats(void)
clear_to_end_of_line();
gotoxy(xcol, 13);
- if (you.weapon())
+ if (you.equip[EQ_WEAPON] != -1)
{
- const item_def& wpn = *you.weapon();
+
+ const item_def& wpn = you.inv[you.equip[EQ_WEAPON]];
textcolor(wpn.colour);
const std::string prefix = menu_colour_item_prefix(wpn);
@@ -329,7 +339,9 @@ void print_stats(void)
if (prefcol != -1)
textcolor(prefcol);
- cprintf("%s", wpn.name(DESC_INVENTORY, true).substr(0,38).c_str());
+ cprintf("%s",
+ wpn.name(DESC_INVENTORY,
+ Options.terse_hand).substr(0,38).c_str());
textcolor(LIGHTGREY);
}
else
@@ -538,12 +550,6 @@ void print_stats(void)
textcolor( RED ); // no different levels
cprintf( "Conf " );
}
-
- if (you.duration[DUR_BEHELD])
- {
- textcolor( RED ); // no different levels
- cprintf( "Bhld " );
- }
if (you.duration[DUR_LIQUID_FLAMES])
{
@@ -912,7 +918,30 @@ std::vector<formatted_string> get_full_detail(bool calc_unid, long sc)
determine_color_string(rcorr), itosym1(rcorr));
cols.add_formatted(2, buf, false);
- int saplevel = you.mutation[MUT_SAPROVOROUS];
+ int saplevel = 0;
+ switch (you.species)
+ {
+ case SP_GHOUL:
+ saplevel = 3;
+ snprintf(buf, sizeof buf, "%sSaprovore : %s",
+ determine_color_string(3), itosym3(3) );
+ break;
+
+ case SP_KOBOLD:
+ case SP_TROLL:
+ saplevel = 2;
+ snprintf(buf, sizeof buf, "%sSaprovore : %s",
+ determine_color_string(2), itosym3(2) );
+ break;
+
+ case SP_HILL_ORC:
+ case SP_OGRE:
+ saplevel = 1;
+ break;
+ default:
+ saplevel = 0;
+ break;
+ }
const char* pregourmand;
const char* postgourmand;
if ( wearing_amulet(AMU_THE_GOURMAND, calc_unid) )
@@ -970,7 +999,6 @@ void print_overview_screen()
cmd_help.set_flags(MF_NOSELECT | MF_ALWAYS_SHOW_MORE | MF_NOWRAP, false);
cmd_help.set_more( formatted_string::parse_string(
"<cyan>[ + : Page down. - : Page up. Esc exits.]"));
- cmd_help.set_tag("resists");
std::string text;
char title[50];
@@ -1143,7 +1171,30 @@ void print_overview_screen()
determine_color_string(rslow), itosym1(rslow));
cols.add_formatted(0, buf, false);
- int saplevel = you.mutation[MUT_SAPROVOROUS];
+ int saplevel = 0;
+ switch (you.species)
+ {
+ case SP_GHOUL:
+ saplevel = 3;
+ snprintf(buf, sizeof buf, "%sSaprovore : %s",
+ determine_color_string(3), itosym3(3) );
+ break;
+
+ case SP_KOBOLD:
+ case SP_TROLL:
+ saplevel = 2;
+ snprintf(buf, sizeof buf, "%sSaprovore : %s",
+ determine_color_string(2), itosym3(2) );
+ break;
+
+ case SP_HILL_ORC:
+ case SP_OGRE:
+ saplevel = 1;
+ break;
+ default:
+ saplevel = 0;
+ break;
+ }
const char* pregourmand;
const char* postgourmand;
if ( wearing_amulet(AMU_THE_GOURMAND, calc_unid) )
@@ -1360,11 +1411,8 @@ std::string status_mut_abilities()
if (you.duration[DUR_CONF])
text += "confused, ";
- // how exactly did you get to show the status?
if (you.duration[DUR_PARALYSIS])
text += "paralysed, ";
- if (you.duration[DUR_SLEEP])
- text += "sleeping, ";
if (you.duration[DUR_EXHAUSTED])
text += "exhausted, ";
@@ -1416,6 +1464,8 @@ std::string status_mut_abilities()
text += "bonded with blade, ";
int move_cost = (player_speed() * player_movement_speed()) / 10;
+ if ( you.duration[DUR_SLOW] )
+ move_cost *= 2;
text += (move_cost < 8) ? "very quick, " :
(move_cost < 10) ? "quick, " :
@@ -1548,6 +1598,16 @@ std::string status_mut_abilities()
have_any = true;
break;
+ case SP_TROLL:
+ text += "saprovore 2";
+ have_any = true;
+ break;
+
+ case SP_GHOUL:
+ text += "saprovore 3";
+ have_any = true;
+ break;
+
case SP_GREY_ELF:
if (you.experience_level > 4)
{
@@ -1654,6 +1714,16 @@ std::string status_mut_abilities()
}
break;
+ case SP_KOBOLD:
+ text += "saprovore 2";
+ have_any = true;
+ break;
+
+ case SP_HILL_ORC:
+ case SP_OGRE:
+ text += "saprovore 1";
+ have_any = true;
+ break;
default:
break;
} //end switch - innate abilities
@@ -1728,13 +1798,6 @@ std::string status_mut_abilities()
text += "poison resistance";
have_any = true;
break;
- case MUT_SAPROVOROUS:
- if (have_any)
- text += ", ";
- snprintf(info, INFO_SIZE, "saprovore %d", level);
- text += info;
- have_any = true;
- break;
case MUT_CARNIVOROUS:
if (have_any)
text += ", ";
@@ -1887,10 +1950,10 @@ std::string status_mut_abilities()
Str_change -= level;
Dex_change += level;
break;
- case MUT_SCREAM:
+ case MUT_LOST:
if (have_any)
text += ", ";
- snprintf(info, INFO_SIZE, "screaming %d", level);
+ snprintf(info, INFO_SIZE, "forgetfulness %d", level);
text += info;
have_any = true;
break;
@@ -1943,36 +2006,6 @@ std::string status_mut_abilities()
text += info;
have_any = true;
break;
- case MUT_LOW_MAGIC:
- if (have_any)
- text += ", ";
- snprintf(info, INFO_SIZE, "-%d%% mp", level*10);
- text += info;
- have_any = true;
- break;
- case MUT_HIGH_MAGIC:
- if (have_any)
- text += ", ";
- snprintf(info, INFO_SIZE, "+%d mp%%", level*10);
- text += info;
- have_any = true;
- break;
- case MUT_DRIFTING:
- if (have_any)
- text += ", ";
- snprintf(info, INFO_SIZE, "drifting %d", level);
- text += info;
- have_any = true;
- break;
- case MUT_SLEEPINESS:
- if (have_any)
- text += ", ";
- snprintf(info, INFO_SIZE, "sleepiness %d", level);
- text += info;
- have_any = true;
- break;
-
- /* demonspawn mutations */
case MUT_TORMENT_RESISTANCE:
if (have_any)
text += ", ";
@@ -2064,7 +2097,6 @@ std::string status_mut_abilities()
text += "invoke powers of Tartarus";
have_any = true;
break;
- /* end of demonspawn mutations */
case MUT_CLAWS:
if (have_any)
text += ", ";
@@ -2072,29 +2104,17 @@ std::string status_mut_abilities()
text += info;
have_any = true;
break;
- case MUT_FANGS:
- if (have_any)
- text += ", ";
- snprintf(info, INFO_SIZE, "sharp teeth %d", level);
- text += info;
- have_any = true;
- break;
case MUT_HOOVES:
if (have_any)
text += ", ";
text += "hooves";
have_any = true;
break;
- case MUT_TALONS:
- if (have_any)
- text += ", ";
- text += "talons";
- have_any = true;
- break;
- case MUT_PAWS:
+ case MUT_FANGS:
if (have_any)
text += ", ";
- text += "soft paws";
+ snprintf(info, INFO_SIZE, "sharp teeth %d", level);
+ text += info;
have_any = true;
break;
case MUT_BREATHE_POISON:
@@ -2130,8 +2150,6 @@ std::string status_mut_abilities()
text += info;
have_any = true;
break;
-
- // scales etc. -> calculate sum of AC bonus
case MUT_RED_SCALES:
AC_change += level;
if (level == 3)
@@ -2198,9 +2216,6 @@ std::string status_mut_abilities()
case MUT_PATTERNED_SCALES:
AC_change += level;
break;
- case MUT_SHAGGY_FUR:
- AC_change += level;
- break;
default: break;
}
}