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, 75 insertions, 90 deletions
diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc
index ee215b8ee2..792bf67d41 100644
--- a/crawl-ref/source/output.cc
+++ b/crawl-ref/source/output.cc
@@ -198,9 +198,6 @@ void print_stats(void)
you.redraw_strength = 0;
- if (you.strength < 1)
- ouch(INSTANT_DEATH, 0, KILLED_BY_WEAKNESS);
-
burden_change();
}
@@ -228,9 +225,6 @@ void print_stats(void)
cprintf( " " );
you.redraw_intelligence = 0;
-
- if (you.intel < 1)
- ouch(INSTANT_DEATH, 0, KILLED_BY_STUPIDITY);
}
if (you.redraw_dexterity)
@@ -257,9 +251,6 @@ 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)
@@ -328,10 +319,9 @@ void print_stats(void)
clear_to_end_of_line();
gotoxy(xcol, 13);
- if (you.equip[EQ_WEAPON] != -1)
+ if (you.weapon())
{
-
- const item_def& wpn = you.inv[you.equip[EQ_WEAPON]];
+ const item_def& wpn = *you.weapon();
textcolor(wpn.colour);
const std::string prefix = menu_colour_item_prefix(wpn);
@@ -339,9 +329,7 @@ void print_stats(void)
if (prefcol != -1)
textcolor(prefcol);
- cprintf("%s",
- wpn.name(DESC_INVENTORY,
- Options.terse_hand).substr(0,38).c_str());
+ cprintf("%s", wpn.name(DESC_INVENTORY, true).substr(0,38).c_str());
textcolor(LIGHTGREY);
}
else
@@ -550,6 +538,12 @@ 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])
{
@@ -918,30 +912,7 @@ 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 = 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;
- }
+ int saplevel = you.mutation[MUT_SAPROVOROUS];
const char* pregourmand;
const char* postgourmand;
if ( wearing_amulet(AMU_THE_GOURMAND, calc_unid) )
@@ -999,6 +970,7 @@ 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];
@@ -1171,30 +1143,7 @@ void print_overview_screen()
determine_color_string(rslow), itosym1(rslow));
cols.add_formatted(0, buf, false);
- 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;
- }
+ int saplevel = you.mutation[MUT_SAPROVOROUS];
const char* pregourmand;
const char* postgourmand;
if ( wearing_amulet(AMU_THE_GOURMAND, calc_unid) )
@@ -1411,8 +1360,11 @@ 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, ";
@@ -1464,8 +1416,6 @@ 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, " :
@@ -1598,16 +1548,6 @@ 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)
{
@@ -1714,16 +1654,6 @@ 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
@@ -1798,6 +1728,13 @@ 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 += ", ";
@@ -1950,10 +1887,10 @@ std::string status_mut_abilities()
Str_change -= level;
Dex_change += level;
break;
- case MUT_LOST:
+ case MUT_SCREAM:
if (have_any)
text += ", ";
- snprintf(info, INFO_SIZE, "forgetfulness %d", level);
+ snprintf(info, INFO_SIZE, "screaming %d", level);
text += info;
have_any = true;
break;
@@ -2006,6 +1943,36 @@ 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 += ", ";
@@ -2097,6 +2064,7 @@ 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 += ", ";
@@ -2104,17 +2072,29 @@ 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_FANGS:
+ case MUT_TALONS:
if (have_any)
text += ", ";
- snprintf(info, INFO_SIZE, "sharp teeth %d", level);
- text += info;
+ text += "talons";
+ have_any = true;
+ break;
+ case MUT_PAWS:
+ if (have_any)
+ text += ", ";
+ text += "soft paws";
have_any = true;
break;
case MUT_BREATHE_POISON:
@@ -2150,6 +2130,8 @@ 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)
@@ -2216,6 +2198,9 @@ std::string status_mut_abilities()
case MUT_PATTERNED_SCALES:
AC_change += level;
break;
+ case MUT_SHAGGY_FUR:
+ AC_change += level;
+ break;
default: break;
}
}