Forescry should too) [1829000] Removed a whole lot of dead code; the place for dead code is in the svn repository, not the compilation unit.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2842 c06c8d41-db1a-0410-9941-cceddc491573
3JMYZAITZNV5TPYISUMMYGJRYKFDZP34YAG72IB27BISVSZU76VQC
SCZCQPNBQG2GXZ76LCEYOMB4QMZGI6YV7LJEC7ZVBUG27KLO564AC
BRGAZR5AXWC2IALBVXO5SB354IRQEIRHSK55RZPGFI4AGIOD4LUQC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC
QDTVLBRGHDTRUVT7I3O72K6TMOYAUSAJBZUHGOEFU2RKJNUPWZSQC
4UXFU3FZOCBSLDQ4S7MJKAE2H7VUHCNRDQMIY6NJ3PHYXWNGISDQC
LS3DAZVRDCXVN2BKBC6RGCKO3R43Z7HKG4GXJWLBK4AKBL2G6QDQC
I2B33Z7NZGC33AMDSSK446AZZYWKPHWLAGULVHKKZU4MVB4BNJOAC
// I need to make some debris for metal, crystal and stone.
// They could go in OBJ_MISSILES, but I think I'd rather move
// MI_LARGE_ROCK into OBJ_DEBRIS and code giants to throw any
// OBJ_DEBRIS they get their meaty mits on.
static void place_debris(int x, int y, int debris_type)
{
#ifdef USE_DEBRIS_CODE
switch (debris_type)
{
// hate to say this, but the first parameter only allows specific quantity
// for *food* and nothing else -- and I would hate to see that parameter
// (force_unique) abused any more than it already has been ... {dlb}:
case DEBRIS_STONE:
large = items( random2(3), OBJ_MISSILES, MI_LARGE_ROCK, true, 1, 250 );
small = items( 3 + random2(6) + random2(6) + random2(6),
OBJ_MISSILES, MI_STONE, true, 1, 250 );
break;
case DEBRIS_METAL:
case DEBRIS_WOOD:
case DEBRIS_CRYSTAL:
break;
}
if (small != NON_ITEM)
move_item_to_grid( &small, x, y );
if (large != NON_ITEM)
move_item_to_grid( &large, x, y );
#else
UNUSED( x );
UNUSED( y );
UNUSED( debris_type );
return;
#endif
} // end place_debris()
} // end cast_see_invisible()
#if 0
// FIXME: This would be kinda cool if implemented right.
// The idea is that, like detect_secret_doors, the spell gathers all
// sorts of information about a thing and then tells the caster a few
// cryptic hints. So for a (+3,+5) Mace of Flaming, one might detect
// "enchantment and heat", but for a cursed ring of hunger, one might
// detect "enchantment and ice" (since it gives you a 'deathly cold'
// feeling when you put it on) or "necromancy" (since it's evil).
// A weapon of Divine Wrath and a randart that makes you angry might
// both give similar messages. The key would be to not tell more than
// hints about whether an item is benign or cursed, but give info
// on how strong its enchantment is (and therefore how valuable it
// probably is).
static void cast_detect_magic(int pow)
{
struct dist bmove;
int x, y;
int monster = 0, item = 0, next; //int max;
FixedVector < int, NUM_SPELL_TYPES > found;
int strong = 0; // int curse = 0;
for (next = 0; next < NUM_SPELL_TYPES; next++)
{
found[next] = 0;
}
mpr("Which direction?", MSGCH_PROMPT);
direction( bmove, DIR_DIR, TARG_ANY, true );
if (!bmove.isValid)
{
canned_msg(MSG_SPELL_FIZZLES);
return;
}
if (bmove.dx == 0 && bmove.dy == 0)
{
mpr("You detect a divination in progress.");
return;
}
x = you.x_pos + bmove.dx;
y = you.y_pos + bmove.dy;
monster = mgrd[x][y];
if (monster == NON_MONSTER)
goto do_items;
else
goto all_done;
do_items:
item = igrd[x][y];
if (item == NON_ITEM)
goto all_done;
while (item != NON_ITEM)
{
next = mitm[item].link;
if (is_dumpable_artefact(mitm[item].base_type,
mitm[item].sub_type,
mitm[item].plus,
mitm[item].plus2,
mitm[item].special, 0, 0))
{
strong++;
//FIXME: do checks for randart properties
}
else
{
switch (mitm[item].base_type)
{
case OBJ_WEAPONS:
found[SPTYP_ENCHANTMENT] += (mitm[item].plus > 50);
found[SPTYP_ENCHANTMENT] += (mitm[item].plus2 > 50);
break;
case OBJ_MISSILES:
found[SPTYP_ENCHANTMENT] += (mitm[item].plus > 50);
found[SPTYP_ENCHANTMENT] += (mitm[item].plus2 > 50);
break;
case OBJ_ARMOUR:
found[SPTYP_ENCHANTMENT] += mitm[item].plus;
}
}
}
all_done:
if (monster)
{
mpr("You detect a morphogenic field, such as a monster might have.");
}
if (strong)
{
mpr("You detect very strong enchantments.");
return;
}
else
{
//FIXME:
}
return;
void cast_animate_golem(int pow)
{
// must have more than 20 max_hitpoints
// must be wielding a Scroll of Paper (for chem)
// must be standing on a pile of <foo> (for foo in: wood, metal, rock, stone)
// Will cost you 5-10% of max_hitpoints, or 20 + some, whichever is more
mpr("You imbue the inanimate form with a portion of your life force.");
naughty(NAUGHTY_CREATED_LIFE, 10);
}
****************************************************************** */
#if 0
static int make_a_random_cloud(int x, int y, int pow, int ctype)
{
if (ctype == CLOUD_NONE)
ctype = CLOUD_BLACK_SMOKE;
unsigned char cloud_material;
switch (random2(9))
{
case 0:
cloud_material = CLOUD_FIRE;
break;
case 1:
cloud_material = CLOUD_STINK;
break;
case 2:
cloud_material = CLOUD_COLD;
break;
case 3:
cloud_material = CLOUD_POISON;
break;
case 4:
cloud_material = CLOUD_BLUE_SMOKE;
break;
case 5:
cloud_material = CLOUD_STEAM;
break;
case 6:
cloud_material = CLOUD_PURP_SMOKE;
break;
default:
cloud_material = ctype;
break;
}
// that last bit is equivalent to "random2(pow/4) + random2(pow/4)
// + random2(pow/4)" {dlb}
// can you see the pattern? {dlb}
place_cloud(cloud_material, x, y, 3 + random2avg(3 * (pow / 4) - 2, 3));
return 1;
} // end make_a_random_cloud()
#endif
bool big = true;
// this type of power manipulation should be done with the others,
// currently over in it_use2.cc (ack) -- bwr
// int hurt = 2 + random2(5) + random2(4) + random2(pow) / 20;
big = false;
bool big = false;
int wep = you.equip[EQ_WEAPON];
if (you.inv[wep].base_type == OBJ_MISSILES
&& (you.inv[wep].sub_type == MI_STONE
|| you.inv[wep].sub_type == MI_LARGE_ROCK))
big = true;
const item_def& wpn(*you.weapon());
big = (wpn.base_type == OBJ_MISSILES)
&& (wpn.sub_type == MI_STONE || wpn.sub_type == MI_LARGE_ROCK);