git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2506 c06c8d41-db1a-0410-9941-cceddc491573
PDK36YVNNJ76LDXLK3NBHHLE47GZRVYGAXDY2FWLD5H7HR4Q6WRAC
F7Q7QRZACTDPP6KH3AB5J6B6B5PRVV4FURTOIGXHRHWNVSQT3TVAC
EEYHYRJXQKQZZ5PGEV5OCUJHCEPCHBECIPAD5QY4UMZUI5LLSVGAC
CLIEHAE2PP7ZIGLLIMYCWM4FC54KBOAN5AILOLAZJ5S26GTJM4RQC
CMNLYUECIMEZSOYG4KOSINOPER5OM7PPCGIHCM7LQVWEO77XFUYQC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
MOT3YZFRY3JG2MH3GN2VD6IY3IJSAXJUXMXS222TXWKRFCENOCDQC
2VOD7XONHR3G2JGZGXOPHNR2AN7WUQZFR5KJH5ZY4P4G67H3RCSQC
P2ZCF3BBG523ZEOD6XQA4X5YEHBTWH3IM33YVHXP2SQ5POXZIH4QC
RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC
&& (you.species == SP_NAGA || you.mutation[MUT_HOOVES]
|| you.species == SP_KENKU || player_genus(GENPC_DRACONIAN)))
&& (you.species == SP_NAGA || you.species == SP_KENKU
|| player_genus(GENPC_DRACONIAN)))
break;
case MUT_SHOCK_RESISTANCE:
mpr(lose_mutation[mutat][you.mutation[mutat] - 1], MSGCH_MUTATION);
break;
case MUT_FAST_METABOLISM:
mpr(lose_mutation[mutat][you.mutation[mutat] - 1], MSGCH_MUTATION);
break;
case MUT_SLOW_METABOLISM:
mpr(lose_mutation[mutat][you.mutation[mutat] - 1], MSGCH_MUTATION);
break;
case MUT_TELEPORT_CONTROL:
mpr(lose_mutation[mutat][you.mutation[mutat] - 1], MSGCH_MUTATION);
// Some mutations only have one "level", and it's better
// to show the first level description than a blank description.
if (mutation_descrip[ which_mutat ][ level - 1 ][0] == 0)
return (mutation_descrip[ which_mutat ][ 0 ]);
else
return (mutation_descrip[ which_mutat ][ level - 1 ]);
return (mutation_descrip[ which_mutat ][ level - 1 ]);
//jmf: might be useful somewhere (eg Xom or transmigration effect)
bool give_cosmetic_mutation()
{
mutation_type mutation = NUM_MUTATIONS;
int how_much = 0;
int counter = 0;
do
{
mutation = MUT_DEFORMED;
how_much = 1 + random2(3);
if (one_chance_in(6))
{
mutation = MUT_ROBUST;
how_much = 1 + random2(3);
}
if (one_chance_in(6))
{
mutation = MUT_FRAIL;
how_much = 1 + random2(3);
}
if (one_chance_in(5))
{
mutation = MUT_TOUGH_SKIN;
how_much = 1 + random2(3);
}
if (one_chance_in(4))
{
mutation = MUT_CLAWS;
how_much = 1 + random2(3);
}
if (you.species != SP_NAGA && !you.mutation[MUT_HOOVES]
&& you.species != SP_KENKU && !player_genus(GENPC_DRACONIAN)
&& one_chance_in(5))
{
mutation = MUT_HOOVES;
how_much = 1;
}
if (one_chance_in(5))
{
mutation = MUT_FANGS;
how_much = 1 + random2(3);
}
if (player_genus(GENPC_DRACONIAN) && one_chance_in(5))
{
mutation = MUT_BIG_WINGS;
how_much = 1;
}
if (one_chance_in(5))
{
mutation = MUT_CARNIVOROUS;
how_much = 1 + random2(3);
}
if (one_chance_in(6))
{
mutation = MUT_HORNS;
how_much = 1 + random2(3);
}
if ((you.species == SP_NAGA || player_genus(GENPC_DRACONIAN))
&& one_chance_in(4))
{
mutation = MUT_STINGER;
how_much = 1 + random2(3);
}
if (you.species == SP_NAGA && one_chance_in(6))
{
mutation = MUT_BREATHE_POISON;
how_much = 1;
}
if (!(you.species == SP_NAGA || player_genus(GENPC_DRACONIAN))
&& one_chance_in(7))
{
mutation = MUT_SPIT_POISON;
how_much = 1;
}
if (!(you.species == SP_NAGA || player_genus(GENPC_DRACONIAN))
&& one_chance_in(8))
{
mutation = MUT_BREATHE_FLAMES;
how_much = 1 + random2(3);
}
if (you.mutation[mutation] > 0)
how_much -= you.mutation[mutation];
if (how_much < 0)
how_much = 0;
}
while (how_much == 0 && counter++ < 5000);
if (how_much != 0)
return mutate(mutation);
else
return false;
} // end give_cosmetic_mutation()