summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mutation.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-18 10:50:12 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-18 10:50:12 +0000
commita7c16941b77fcdcc841c3edbcd0514c16ac4c2e5 (patch)
treee3fddfcf268b8dba46eb242b328b051cf3578faf /crawl-ref/source/mutation.cc
parent70eeeeec718a95bee1845c48545577551b2abbb7 (diff)
downloadcrawl-ref-a7c16941b77fcdcc841c3edbcd0514c16ac4c2e5.tar.gz
crawl-ref-a7c16941b77fcdcc841c3edbcd0514c16ac4c2e5.zip
Fix tiles compile (in a hacky way, since I don't know what the mp/hp
bar change was really about). Modify mutations screen for Vampires to allow a toggle to a second page that lists all those resistances and stuff depending on their blood level. The screen (designed by David) is really neat, but the underlying could stand to be improved, and it might be too large, as well. Also restrict Sublimation of Blood to Vampires that are at least Full, and it also makes them a bit more thirsty (since they presumably lose blood when using it). Dispel Undead only does half damage to Vampires at Alive, and 66% damage at Full or Very Full. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4325 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/mutation.cc')
-rw-r--r--crawl-ref/source/mutation.cc119
1 files changed, 117 insertions, 2 deletions
diff --git a/crawl-ref/source/mutation.cc b/crawl-ref/source/mutation.cc
index ded5f3f8d7..d54883ac1f 100644
--- a/crawl-ref/source/mutation.cc
+++ b/crawl-ref/source/mutation.cc
@@ -1388,17 +1388,132 @@ formatted_string describe_mutations()
if (!have_any)
result += "You are rather mundane." EOL;
+ if (you.species == SP_VAMPIRE)
+ {
+ result += EOL EOL;
+ result += EOL EOL;
+ result += "Press '<w>!</w>' to toggle between mutations and properties depending on your" EOL
+ "hunger status." EOL;
+ }
+
return formatted_string::parse_string(result);
}
+static void _display_vampire_attributes()
+{
+ clrscr();
+ cgotoxy(1,1);
+
+ std::string result;
+
+ std::string column[9][7] =
+ {
+ {" ", "<lightgreen>Alive</lightgreen> ", "<green>Full</green> ",
+ "Satiated ", "<yellow>Thirsty</yellow> ", "<yellow>Near...</yellow> ",
+ "<lightred>Bloodless</lightred>"},
+ //Alive Full Satiated Thirsty Near... Bloodless
+ {"Metabolism ", "very fast ", "fast ", "fast ", "normal ", "slow ", "none"},
+
+ {"Regeneration ", "very fast ", "fast ", "normal ", "normal ", "slow ", "none"},
+
+ {"Poison resistance ", " ", " ", " + ", " + ", " + ", " + "},
+
+ {"Cold resistance ", " ", " ", " ", " + ", " + ", " ++ "},
+
+ {"Negative resistance ", " ", " ", " ", " + ", " ++ ", " +++ "},
+
+ {"Torment resistance ", " ", " ", " ", " ", " ", " + "},
+
+ {"Mutation effects ", "full ", "capped ", "capped ", "none ", "none ", "none "},
+
+ {"Stealth boost ", "none ", "none ", "none ", "minor ", "major ", "large"}
+ };
+
+ int current = 0;
+ switch (you.hunger_state)
+ {
+ case HS_ENGORGED:
+ current = 1;
+ break;
+ case HS_VERY_FULL:
+ case HS_FULL:
+ current = 2;
+ break;
+ case HS_SATIATED:
+ current = 3;
+ break;
+ case HS_HUNGRY:
+ case HS_VERY_HUNGRY:
+ current = 4;
+ break;
+ case HS_NEAR_STARVING:
+ current = 5;
+ break;
+ case HS_STARVING:
+ current = 6;
+ }
+
+ for (int y = 0; y < 9; y++) // lines (properties)
+ {
+ for (int x = 0; x < 7; x++) // columns (hunger states)
+ {
+ if (y > 0 && x == current)
+ result += "<w>";
+ result += column[y][x];
+ if (y > 0 && x == current)
+ result += "</w>";
+ }
+ result += EOL;
+ }
+/*
+ result = " <lightgreen>Alive</lightgreen> <green>Full</green> Satiated "
+ "<yellow>Thirsty Near...</yellow> <lightred>Bloodless</lightred>" EOL
+ "Metabolism very fast fast fast normal slow none " EOL
+ "Regeneration very fast fast normal normal slow none " EOL
+ "Poison resistance + + + + " EOL
+ "Cold resistance + + ++ " EOL
+ "Negative resistance + ++ +++ " EOL
+ "Torment resistance + " EOL
+ "Mutation effects full capped capped none none none " EOL
+ "Stealth boost none none none minor major large" EOL;
+*/
+
+ result += EOL EOL;
+ result += EOL EOL;
+ result += EOL EOL;
+ result += "Press '<w>!</w>' to toggle between mutations and properties depending on your " EOL
+ "hunger status." EOL;
+
+ const formatted_string vp_props = formatted_string::parse_string(result);
+ vp_props.display();
+
+ if (you.species == SP_VAMPIRE)
+ {
+ const int keyin = getch();
+ if (keyin == '!')
+ display_mutations();
+ }
+}
+
void display_mutations()
{
clrscr();
cgotoxy(1,1);
const formatted_string mutation_fs = describe_mutations();
- Menu mutation_menu(mutation_fs);
- mutation_menu.show();
+
+ if (you.species == SP_VAMPIRE)
+ {
+ mutation_fs.display();
+ const int keyin = getch();
+ if (keyin == '!')
+ _display_vampire_attributes();
+ }
+ else
+ {
+ Menu mutation_menu(mutation_fs);
+ mutation_menu.show();
+ }
}
static int calc_mutation_amusement_value(mutation_type which_mutation)