on the current square. (This will need some interface improvements to prevent players from 'p'ing away their stash…) Also removed some unused enums and enum values. Breaks savefiles.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1470 c06c8d41-db1a-0410-9941-cceddc491573
APMT6XTVAD4ZCXCMUPTW5KCNR7TXW6W37SNYUP5A6NLFLXT3BCYQC
6GT5JAWOIIL4SQ5MWIID6ZVO3KKQFWDQDZNVFHZ6DNK5QCBXJ4UAC
VNHFP63ZLLZU3A3PLXP4BITX57DUIYDHFOHQYK3BOBHV3S64G26QC
6NBAJU44SKV2GYCFZ3NWGC5L73CIZIKINHSL4J7VKASV6R5WMIZAC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
SDLKLUNFGVKDS55DDJZCBAVIB7NL3RRYPTACAY65SCUQKV6APFSAC
WBMXDD2A5QSCIS6TCDFWBKOXVCUFYUN2GHPJSFSRL7SKCPIBIMXAC
5ASC3STDYCNLZFEBN6UTMUCGDETHBR2OCBZCF5VIAZ5RRWLOTDYQC
RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC
3NFVCXRVGHN2CHLLWFZES5RBS4R2BCDS4EEQNSDCFYIFQWQK7MUQC
DTO3EUKWHZ5RJNGNCFYXSOVTIPVXPP637F2W7WFGYKJ7JK7VNKNQC
77H4BWWPPGLM3PLZH4QTAJRXIZTSDVNCOKZE223I437FN2UJ34RQC
CIPVRZGLOZHCERK6YPOBV3P2E4IAB4H6D5EHLRQE2O5E4P4VCBUAC
GACH6PWPGGUBEE7PFEPQMOZKSR7HTQGL2WLGF2AQPJD3FCCSKZNQC
if (!you.attribute[ATTR_CARD_TABLE])
{
thing_created = items( 1, OBJ_MISCELLANY,
MISC_PORTABLE_ALTAR_OF_NEMELEX,
true, 1, 250 );
if (thing_created != NON_ITEM)
you.attribute[ATTR_CARD_TABLE] = 1;
}
else
{
if (random2(200) <= you.piety && one_chance_in(4))
gift_type = MISC_DECK_OF_SUMMONINGS;
if (random2(200) <= you.piety && coinflip())
gift_type = MISC_DECK_OF_WONDERS;
if (random2(200) <= you.piety && one_chance_in(4))
gift_type = MISC_DECK_OF_POWER;
thing_created = items( 1, OBJ_MISCELLANY, gift_type,
true, 1, 250 );
}
if (random2(200) <= you.piety && one_chance_in(4))
gift_type = MISC_DECK_OF_SUMMONINGS;
if (random2(200) <= you.piety && coinflip())
gift_type = MISC_DECK_OF_WONDERS;
if (random2(200) <= you.piety && one_chance_in(4))
gift_type = MISC_DECK_OF_POWER;
thing_created = items( 1, OBJ_MISCELLANY, gift_type,
true, 1, 250 );
&& (item.base_type != OBJ_FOOD || item.sub_type != FOOD_CHUNK)
// Portable altars cannot be tracked meaningfully with Crawl's
// current handling for portable altars.
&& (item.base_type != OBJ_MISCELLANY ||
item.sub_type != MISC_PORTABLE_ALTAR_OF_NEMELEX));
&& (item.base_type != OBJ_FOOD || item.sub_type != FOOD_CHUNK));
}
// Fortunately, the player is prevented from testing their
// portable altar in the Ecumenical Temple. -- bwr
if (grd[you.x_pos][you.y_pos] == DNGN_ALTAR_NEMELEX_XOBEH
&& !player_in_branch( BRANCH_ECUMENICAL_TEMPLE ))
{
if (inv_count() >= ENDOFPACK)
{
mpr("There is a portable altar here, "
"but you can't carry anything else.");
return;
}
if (yesno("There is a portable altar here. Pick it up?"))
{
for (m = 0; m < ENDOFPACK; m++)
{
if (!is_valid_item( you.inv[m] ))
{
item_def& item = you.inv[m];
item.base_type = OBJ_MISCELLANY;
item.sub_type = MISC_PORTABLE_ALTAR_OF_NEMELEX;
item.plus = 0;
item.plus2 = 0;
item.special = 0;
item.colour = LIGHTMAGENTA;
item.quantity = 1;
item.inscription = you.last_altar_inscription;
set_ident_flags( item, ISFLAG_IDENT_MASK );
item.x = -1;
item.y = -1;
item.link = m;
burden_change();
mpr( item.name(DESC_INVENTORY_EQUIP).c_str() );
break;
}
}
grd[you.x_pos][you.y_pos] = DNGN_FLOOR;
unnotice_altar();
}
break;
case MISC_PORTABLE_ALTAR_OF_NEMELEX:
if (player_in_branch( BRANCH_ECUMENICAL_TEMPLE ))
{
mpr( "Don't you think this level already has more than "
"enough altars?" );
}
else if (grd[you.x_pos][you.y_pos] != DNGN_FLOOR)
mpr("You need a clear area to place this item.");
else
{
mpr("You unfold the altar and place it on the floor.");
you.last_altar_inscription =
you.inv[you.equip[EQ_WEAPON]].inscription;
grd[you.x_pos][you.y_pos] = DNGN_ALTAR_NEMELEX_XOBEH;
dec_inv_item_quantity( you.equip[EQ_WEAPON], 1 );
seen_notable_thing(
DNGN_ALTAR_NEMELEX_XOBEH, you.x_pos, you.y_pos);
}
};
// these are for the old system (still used for reading old files)
enum armour_description_type
{
DARM_PLAIN, // added for the heck of it, 15 Apr 2000 {dlb}
DARM_EMBROIDERED_SHINY = 1, // which it is dependent upon armour subtype {dlb}
DARM_RUNED,
DARM_GLOWING,
DARM_ELVEN,
DARM_DWARVEN, // 5
DARM_ORCISH
// ATTR_SPEC_AIR, // don't use this!
// ATTR_SPEC_EARTH,
ATTR_CONTROL_TELEPORT = 3, // obsolete
ATTR_WALK_SLOWLY,
ATTR_TRANSFORMATION, // 5
ATTR_TRANSFORMATION,