Add Confusing Touch ("Touch") and Sure Blade ("Blade") to the status output. I've moved BWpn into line 3 to make space for the others. Still, the status can get positively cluttered.
Apply coding convention to static methods in output.cc.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3872 c06c8d41-db1a-0410-9941-cceddc491573
TM35IHKZZNBCMR3ERBS4EYHGUK5IVCPUT2JUITMT74AYAIUZSYFQC
E3X5HVN5UN75OMTJA6JFQBNZ54P37NDZLZZF7EFBZZC45KR73YGAC
HL47H6Q4SA2KSPHWZSOCGHHCDB6JGC4LLHPA4JUHNCCPF2ZGQNTAC
LP5EK64IEM7AHNYQID4GGKOQJQNZLKY4DCCZN47SIUZ6IXAXH5UAC
FACD4S74A4PYPEYDEIDP56BPE5NJGRK2RWVOKROXLMT7FJUPTYQAC
G3BGTWSXRETYVNLG24E4O7SRMTB352REOQAFOIL4WB7X74P4RDIAC
ESWIM76FGJL4QFLSHU6AC4D74PT7OPLQ7ZCJYWLZS5UCBAJDXYHAC
77H4BWWPPGLM3PLZH4QTAJRXIZTSDVNCOKZE223I437FN2UJ34RQC
QSJECU2LZOQ5K5QUQDQOPQ4J3GAZEE5ZWIIM4DVBXYLVVX5DYLWQC
SDLKLUNFGVKDS55DDJZCBAVIB7NL3RRYPTACAY65SCUQKV6APFSAC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
25CH7HH4LKXFIZ75YNMXS3TSXO6O27DYSOPLOD45K4OCNFWLS4LQC
PS2BPOBKMUTQPFSQX4MTQ3A7B6MQGLWKTRAGUZED47KCWF5DPCJAC
LBOWQK6P35RBX6CTIW5RFQVGRYNJ6XP3TVAAQCQ5ABBCEQAXIMXQC
BFYHDL4EHSPKKC6EPKDRPESHYAA2WFKC6RXQIRRTSSTF3Z2QPVCAC
YIIILIV4ZPRIPWWT4GL7YWSJCUVH6RJJLXV4XIHY6SF3H7Y3EAYAC
6PNVX6Q45HH733TZDXYBA6BYPJKDMND5B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4YNUWK2RTKNE6N4UWNBMO5WDRKW737ENVE3RKV5LCRAC
I7QLYOTE6DLQZM7YWUWYLKHRJRB2A3STQ42ALSRGQICEWKD2QTEQC
JDM5R3HYGXKQKZWY35QZ2KOB24TFZ3FW2PCNXCRCMWG72AZC5ZXQC
RVST2QHYJ757ZHK4AUJ5NGPDZ44AD6RVFVXYPKQIBJXZBDNUCHXQC
XPCGZBHHSL6MB3ORMUJI64BAERU6AZTIY6RK56BBW7SNB3IK24IAC
HBHQQDULNVWISJ75XIL6R6BFEDYRNY22NX3ZTFVNP5ZWJGJSKOEQC
THEWZBBFONK266AMYIIFQ4SFGZMTMU62ZO2Y43UMCDD6DDBSDYKAC
EHSY6DVGUMI6C67WKET3GDJVLWJWGYBYQONNDK5JVT7BCTHBEZVAC
int draw_colour_bar(int val, int max_val, int old_val, int old_disp,
int ox, int oy, unsigned short default_colour,
unsigned short change_colour, unsigned short empty_colour)
static int _draw_colour_bar(int val, int max_val, int old_val, int old_disp,
int ox, int oy, unsigned short default_colour,
unsigned short change_colour,
unsigned short empty_colour)
// Don't redraw colour bars during running/resting
// *unless* we'll stop doing so after that
if (you.running > 1 && is_resting() && val != max_val)
// Don't redraw colour bars while resting
// *unless* we'll stop doing so right after that
if (you.running >= 2 && is_resting() && val != max_val)
// Perhaps this should be reversed to show when it can be used?
// In that case, it should be probably be GREEN, and we'd have
// to check to see if the player does have a breath weapon. -- bwr
if (you.duration[DUR_BREATH_WEAPON] &&
wherex() < get_number_of_cols() - 5)
if (you.duration[DUR_CONFUSING_TOUCH]
&& wherex() < get_number_of_cols() - 5)
// Perhaps this should be reversed to show when it can be used?
// In that case, it should be probably be GREEN, and we'd have
// to check to see if the player does have a breath weapon. -- bwr
if (you.duration[DUR_BREATH_WEAPON] && wherex() < get_number_of_cols() - 5)
{
textcolor( YELLOW ); // no warning
cprintf( "BWpn " );
}
switch (att) {
case ATT_FRIENDLY: cprintf(" (friendly)"); break;
case ATT_NEUTRAL: cprintf(" (neutral)"); break;
switch (att)
{
case ATT_FRIENDLY: cprintf(" (friendly)"); break;
case ATT_NEUTRAL: cprintf(" (neutral)"); break;
determine_color_string(rfire), itosym3(rfire),
determine_color_string(rcold), itosym3(rcold),
determine_color_string(rlife), itosym3(rlife),
determine_color_string(rpois), itosym1(rpois),
determine_color_string(relec), itosym1(relec));
_determine_color_string(rfire), itosym3(rfire),
_determine_color_string(rcold), itosym3(rcold),
_determine_color_string(rlife), itosym3(rlife),
_determine_color_string(rpois), itosym1(rpois),
_determine_color_string(relec), itosym1(relec));
determine_color_string(rsust), itosym1(rsust),
determine_color_string(rmuta), itosym1(rmuta),
determine_color_string(rslow), itosym1(rslow),
determine_color_string(rclar), itosym1(rclar));
_determine_color_string(rsust), itosym1(rsust),
_determine_color_string(rmuta), itosym1(rmuta),
_determine_color_string(rslow), itosym1(rslow),
_determine_color_string(rclar), itosym1(rclar));
determine_color_string(rinvi), itosym1(rinvi),
determine_color_string(rward), itosym1(rward),
determine_color_string(rcons), itosym1(rcons),
determine_color_string(rcorr), itosym1(rcorr));
_determine_color_string(rinvi), itosym1(rinvi),
_determine_color_string(rward), itosym1(rward),
_determine_color_string(rcons), itosym1(rcons),
_determine_color_string(rcorr), itosym1(rcorr));
determine_color_string(rctel), itosym1(rctel),
determine_color_string(rlevi), itosym1(rlevi),
determine_color_string(rcfli), itosym1(rcfli));
_determine_color_string(rctel), itosym1(rctel),
_determine_color_string(rlevi), itosym1(rlevi),
_determine_color_string(rcfli), itosym1(rcfli));
determine_color_string(rfire), itosym3(rfire),
determine_color_string(rcold), itosym3(rcold),
determine_color_string(rlife), itosym3(rlife),
determine_color_string(rpois), itosym1(rpois),
determine_color_string(relec), itosym1(relec),
determine_color_string(rsust), itosym1(rsust),
determine_color_string(rmuta), itosym1(rmuta),
determine_color_string(rslow), itosym1(rslow));
_determine_color_string(rfire), itosym3(rfire),
_determine_color_string(rcold), itosym3(rcold),
_determine_color_string(rlife), itosym3(rlife),
_determine_color_string(rpois), itosym1(rpois),
_determine_color_string(relec), itosym1(relec),
_determine_color_string(rsust), itosym1(rsust),
_determine_color_string(rmuta), itosym1(rmuta),
_determine_color_string(rslow), itosym1(rslow));
determine_color_string(rinvi), itosym1(rinvi),
determine_color_string(rward), itosym1(rward),
determine_color_string(rcons), itosym1(rcons),
determine_color_string(rcorr), itosym1(rcorr),
determine_color_string(rclar), itosym1(rclar));
_determine_color_string(rinvi), itosym1(rinvi),
_determine_color_string(rward), itosym1(rward),
_determine_color_string(rcons), itosym1(rcons),
_determine_color_string(rcorr), itosym1(rcorr),
_determine_color_string(rclar), itosym1(rclar));
determine_color_string(rctel), itosym1(rctel),
determine_color_string(rlevi), itosym1(rlevi),
determine_color_string(rcfli), itosym1(rcfli));
_determine_color_string(rctel), itosym1(rctel),
_determine_color_string(rlevi), itosym1(rlevi),
_determine_color_string(rcfli), itosym1(rcfli));
}
// assumes the item is equipped in the first place!
static bool _is_true_equipped_item(item_def item)
{
// weapons and staves are only truly equipped if wielded
if (item.link == you.equip[EQ_WEAPON])
return (item.base_type == OBJ_WEAPONS || item.base_type == OBJ_STAVES);
// cursed armour and rings are only truly equipped if *not* wielded
return (item.link != you.equip[EQ_WEAPON]);
// returns whether there's any action you can take with an item in inventory
// apart from dropping it
static bool _can_use_item(item_def item, bool equipped)
{
// vampires can drain corpses
if (item.base_type == OBJ_CORPSES)
{
return (you.species == SP_VAMPIRE
&& item.sub_type != CORPSE_SKELETON
&& !food_is_rotten(item)
&& mons_has_blood(item.plus));
}
// mummies can't do anything with food or potions
if (you.species == SP_MUMMY)
return (item.base_type != OBJ_POTIONS && item.base_type != OBJ_FOOD);
if (equipped && item_cursed(item))
{
// misc. items/rods can always be evoked, cursed or not
if (item.base_type == OBJ_MISCELLANY || item_is_rod(item))
return true;
// you can't unwield/fire a wielded cursed weapon/staff
// but cursed armour and rings can be unwielded without problems
return (!_is_true_equipped_item(item));
}
// in all other cases you can use the item in some way
return true;
}
if ((type != OBJ_CORPSES
|| you.species == SP_VAMPIRE
&& you.inv[ix].sub_type != CORPSE_SKELETON
&& you.inv[ix].special >= 100)
&& (you.species != SP_MUMMY
|| you.inv[ix].base_type != OBJ_POTIONS
&& you.inv[ix].base_type != OBJ_FOOD))
if (_can_use_item(you.inv[ix], equipped))
item_slot = prompt_invent_item(
"Inscribe which item? ",
MT_INVLIST,
OSEL_ANY );
item_slot = prompt_invent_item("Inscribe which item? ",
MT_INVLIST, OSEL_ANY );