git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2810 c06c8d41-db1a-0410-9941-cceddc491573
KT3JMGSH5VTNRV2H5POWZLYNXSIRE5CT2XW3ZID7FNZTXYOZG22QC
L4RYVF46EQKMVOEADGRG4WMPVTQ6NNFGYMU4SHAH6XJIKWVHT77QC
EAAACIJUVSBDOB6S73O4NFSMRDLFLQTFO7SXWWALGMVDZTQTHQBQC
FU7EQZLXD7YNGUUDHXCBI3VUKL6M2G3EPDY6FB5UA6B6RD4S5UOQC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
X5WLJCJVW55SXZVP7IKP7ADCJIGNKN4PKAXFECVR6TNK7XSMZR7QC
DDU4A3JGN5IUIPP5IASOODKPR2WBHSDSV4FITZ6HNXNSXXQACWAQC
RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC
IVVTHLTTLOP5TSULXJWUSSXHOKYWVU3OWKYVK45A7RIB6V34MYQAC
GQL5SIGBHLU3FMCE54XVGLRY5AZHRM6DUEB722REA2DPLGJSN6EQC
static bool evoke_horn_of_geryon()
{
// Note: This assumes that the Vestibule has not been changed.
bool rc = false;
if (player_in_branch( BRANCH_VESTIBULE_OF_HELL ))
{
mpr("You produce a weird and mournful sound.");
for (int count_x = 0; count_x < GXM; count_x++)
{
for (int count_y = 0; count_y < GYM; count_y++)
{
if (grd[count_x][count_y] == DNGN_STONE_ARCH)
{
rc = true;
map_marker *marker =
env.markers.find(coord_def(count_x, count_y),
MAT_FEATURE);
if (marker)
{
map_feature_marker *featm =
dynamic_cast<map_feature_marker*>(marker);
grd[count_x][count_y] = featm->feat;
env.markers.remove(marker);
}
}
}
}
if (rc)
mpr("Your way has been unbarred.");
}
else
{
mpr("You produce a hideous howling noise!");
create_monster( MONS_BEAST, 4, BEH_HOSTILE, you.x_pos, you.y_pos,
MHITYOU, 250, false, false, false, true );
}
return rc;
}
static bool evoke_sceptre_of_asmodeus()
{
bool rc = true;
if ( one_chance_in(21) )
rc = false;
else if (one_chance_in(2))
{
// summon devils, maybe a Fiend
const monster_type mtype = (one_chance_in(4) ? MONS_FIEND :
summon_any_demon(DEMON_COMMON));
const bool good_summon = (create_monster( mtype, 6, BEH_HOSTILE,
you.x_pos, you.y_pos,
MHITYOU, 250) != -1);
if (good_summon)
{
if (mtype == MONS_FIEND)
mpr("\"Your arrogance condemns you, mortal!\"");
else
mpr("The Sceptre summons one of its servants.");
}
else
mpr("The air shimmers briefly.");
}
else
{
// Cast a destructive spell
const spell_type spl = static_cast<spell_type>(
random_choose_weighted( 114, SPELL_BOLT_OF_FIRE,
57, SPELL_LIGHTNING_BOLT,
57, SPELL_BOLT_OF_DRAINING,
12, SPELL_HELLFIRE,
0 ));
your_spells( spl, you.skills[SK_EVOCATIONS] * 8, false );
}
return true;
}
spell_casted = (one_chance_in(4) ? MONS_FIEND
: MONS_HELLION + random2(10));
bool good_summon = (create_monster( spell_casted,
6, BEH_HOSTILE,
you.x_pos, you.y_pos,
MHITYOU, 250) != -1);
if (good_summon)
{
if (spell_casted == MONS_FIEND)
mpr("\"Your arrogance condemns you, mortal!\"");
else
mpr("The Sceptre summons one of its servants.");
}
make_hungry(200, false);
temp_rand = random2(240);
if (temp_rand > 125)
spell_casted = SPELL_BOLT_OF_FIRE; // 114 in 240
else if (temp_rand > 68)
spell_casted = SPELL_LIGHTNING_BOLT; // 57 in 240
else if (temp_rand > 11)
spell_casted = SPELL_BOLT_OF_DRAINING; // 57 in 240
else
spell_casted = SPELL_HELLFIRE; // 12 in 240
power = you.skills[SK_EVOCATIONS] * 8;
your_spells( static_cast<spell_type>(spell_casted),
power, false );
did_work = true;
// Note: This assumes that the Vestibule has not been changed.
if (player_in_branch( BRANCH_VESTIBULE_OF_HELL ))
{
int opened_gates = 0;
mpr("You produce a weird and mournful sound.");
for (int count_x = 0; count_x < GXM; count_x++)
{
for (int count_y = 0; count_y < GYM; count_y++)
{
if (grd[count_x][count_y] == DNGN_STONE_ARCH)
{
opened_gates++;
map_marker *marker =
env.markers.find(coord_def(count_x, count_y),
MAT_FEATURE);
if (marker)
{
map_feature_marker *featm =
dynamic_cast<map_feature_marker*>(marker);
grd[count_x][count_y] = featm->feat;
env.markers.remove(marker);
}
}
}
}
if (opened_gates)
{
mpr("Your way has been unbarred.");
pract = 1;
}
}
else
{
mpr("You produce a hideous howling noise!");
int midx = create_monster( MONS_BEAST, 4,
BEH_HOSTILE, you.x_pos, you.y_pos,
MHITYOU, 250 );
// avoid scumming; also prevents it from showing up on notes
if ( midx != -1 )
menv[midx].flags |= MF_CREATED_FRIENDLY;
// no practice
}
if ( evoke_horn_of_geryon() )
pract = 1;