Note that this will cause a bug if you have more than 23 mutations simultaneously; fixing that will require patching formatted_string.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@485 c06c8d41-db1a-0410-9941-cceddc491573
PGTE3JC4J5U536IJTCJFXTUOSRE73JXZJINWAGCANOQOCGC7J6AAC
cprintf("%s" EOL, naga_speed_descrip[you.mutation[MUT_FAST]]);
j += 4;
if ( you.mutation[MUT_FAST] )
result += "<lightred>";
result += naga_speed_descrip[you.mutation[MUT_FAST]];
if ( you.mutation[MUT_FAST] )
result += "</lightred>";
result += EOL;
have_any = true;
cprintf("Your body regenerates quickly." EOL);
switch ( you.mutation[MUT_CLAWS] ) {
case 0:
cprintf("You have claws for hands." EOL);
break;
case 1:
cprintf("You have sharp claws for hands." EOL);
break;
case 2:
cprintf("You have very sharp claws for hands." EOL);
break;
case 3:
// literally true
cprintf("Your claws are sharper than steel." EOL);
break;
default:
break;
}
j += 2;
result += "Your body regenerates quickly." EOL;
if ( you.mutation[MUT_CLAWS] )
result += "<lightred>";
result += troll_claw_descrip[you.mutation[MUT_CLAWS]];
if ( you.mutation[MUT_CLAWS] )
result += "</lightred";
result += EOL;
have_any = true;
cprintf("You are");
cprintf((you.experience_level > 25) ? " very strongly" :
((you.experience_level > 12) ? " strongly" : ""));
cprintf(" in touch with the powers of death." EOL);
j++;
result += "You are";
if (you.experience_level > 25)
result += " very strongly";
else if (you.experience_level > 12)
result += " strongly";
result += " in touch with the powers of death." EOL;
textcolor(RED);
/* same as above, but power is enhanced by mutation */
if (you.demon_pow[i] != 0 && you.demon_pow[i] < you.mutation[i])
textcolor(LIGHTRED);
if ( you.demon_pow[i] < you.mutation[i] )
result += "</lightred>";
else
result += "</red>";
if (j == 0)
cprintf( "You are not a mutant." EOL );
if (!have_any)
result += "You are not a mutant." EOL;
return formatted_string::parse_string(result);
}
void display_mutations()
{
#ifdef DOS_TERM
char buffer[4800];
window(1, 1, 80, 25);
gettext(1, 1, 80, 25, buffer);
#endif
text += " Mutations & Other Weirdness";
text += "\n";
for (int j = 0; j < 100; j++)
{
if (you.mutation[j])
{
if (you.demon_pow[j] > 0)
text += "* ";
text += mutation_name(j);
text += "\n";
}
}
text += describe_mutations();
text += "\n\n";