summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-06 17:16:58 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-06 17:16:58 +0000
commit07dc1fd248de5cf9f29683cb76c70277d6c7e156 (patch)
treef62952f5749df637ee34662e1994473ed1080a2b /crawl-ref/source/player.cc
parent4e14b2dc2f1ebcc6971995f013d81db61cfb17e7 (diff)
downloadcrawl-ref-07dc1fd248de5cf9f29683cb76c70277d6c7e156.tar.gz
crawl-ref-07dc1fd248de5cf9f29683cb76c70277d6c7e156.zip
Further improvements of vampires:
1) Quaffing and eating * They now get full effect of potions unless hungry (er, thirsty) or worse, in which case the effect gets halved as before. * Potions of blood heal on the level of heal wounds or healing, depending on hunger state. Healing always heals rotting and removes confusion - the chances involved were just frustrating to players. * Draining corpses has the same nutrition value as eating the (random) amount of chunks you get out of dissecting, but takes longer (and all at once, so draining your corpses in the middle of a battle is extremely risky). I guess this is still too good (when do you ever get to eat all chunks you get out of, say, an ogre or centaur?) so will have to be nerfed. 2) Resistances Resistances depend more strongly on hunger states now. Vampires are always poison resistant and can always see invisible. Additionally, they gain * rCold 1 at Hungry or worse, and rCold 2 at Near Starving or worse (The latter comes with susceptibility to fire.) * life protection 1 when satiated, 2 when hungry or worse, and 3 when near starving or worse * At starving they also get torment res. * Hungry vampires and vampires in bat form are stealthier, and starving vampires are even more stealthy. As before, they get the Necromancy boost (like Mummies do) at xl 13 and 26. Also, vampires can now cast spells while starving, but suffer a failure increase akin to that of Blade Hands. (I've no idea what these numbers actually mean, so this will most likely have to be changed as well.) Updated tables.txt. Still TODO: * Add special biting attack for successful stabbing. * Add distilling blood ability, and possibly distinguish between old and new potions (new food type, maybe). * Allow vampires to mutate, but these mutations to only take effect when Full, Very Full or Engorged. * Update manual. Apart from that, they are ready for playtesting once again. As always, feedback would be much appreciated. :) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3528 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r--crawl-ref/source/player.cc61
1 files changed, 45 insertions, 16 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index ef449f2227..aebac973fe 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -1134,8 +1134,11 @@ int player_res_fire(bool calc_unid)
rf += scan_randarts(RAP_FIRE, calc_unid);
// species:
- if (you.species == SP_MUMMY)
+ if (you.species == SP_MUMMY
+ || you.species == SP_VAMPIRE && you.hunger_state <= HS_NEAR_STARVING)
+ {
rf--;
+ }
// spells:
if (you.duration[DUR_RESIST_FIRE] > 0)
@@ -1176,6 +1179,16 @@ int player_res_cold(bool calc_unid)
{
int rc = 0;
+ if (you.species == SP_VAMPIRE)
+ {
+ if (you.hunger_state <= HS_NEAR_STARVING)
+ rc += 2;
+ else if (you.hunger_state <= HS_HUNGRY)
+ rc++;
+ }
+
+
+
/* rings of fire resistance/fire */
rc += player_equip( EQ_RINGS, RING_PROTECTION_FROM_COLD, calc_unid );
rc += player_equip( EQ_RINGS, RING_ICE, calc_unid );
@@ -1342,7 +1355,8 @@ bool player_control_teleport(bool calc_unid) {
int player_res_torment(bool)
{
return (you.mutation[MUT_TORMENT_RESISTANCE] ||
- you.attribute[ATTR_TRANSFORMATION] == TRAN_LICH);
+ you.attribute[ATTR_TRANSFORMATION] == TRAN_LICH ||
+ you.species == SP_VAMPIRE && you.hunger_state == HS_STARVING);
}
// funny that no races are susceptible to poisons {dlb}
@@ -1363,7 +1377,7 @@ int player_res_poison(bool calc_unid)
{
rp++;
}
-
+
// ego armour:
rp += player_equip_ego_type( EQ_ALL_ARMOUR, SPARM_POISON_RESISTANCE );
@@ -1572,6 +1586,24 @@ int player_prot_life(bool calc_unid)
{
int pl = 0;
+ if (you.species == SP_VAMPIRE)
+ {
+ switch (you.hunger_state)
+ {
+ case HS_STARVING:
+ case HS_NEAR_STARVING:
+ pl = 3;
+ case HS_VERY_HUNGRY:
+ case HS_HUNGRY:
+ pl = 2;
+ case HS_SATIATED:
+ pl = 1;
+ default:
+ break;
+ }
+ }
+
+
if (wearing_amulet(AMU_WARDING, calc_unid))
++pl;
@@ -1581,11 +1613,6 @@ int player_prot_life(bool calc_unid)
// armour: (checks body armour only)
pl += player_equip_ego_type( EQ_ALL_ARMOUR, SPARM_POSITIVE_ENERGY );
- if (you.species == SP_VAMPIRE && you.hunger_state > HS_HUNGRY)
- {
- pl += 2;
- }
-
switch (you.attribute[ATTR_TRANSFORMATION])
{
case TRAN_STATUE:
@@ -2368,15 +2395,15 @@ int player_see_invis(bool calc_unid)
{
int si = 0;
+ /* Vampires can see invisible */
+ if (you.species == SP_VAMPIRE)
+ si++;
+
si += player_equip( EQ_RINGS, RING_SEE_INVISIBLE, calc_unid );
/* armour: (checks head armour only) */
si += player_equip_ego_type( EQ_HELMET, SPARM_SEE_INVISIBLE );
- /* Vampires can see invisible if not weakened by hunger */
- if (you.species == SP_VAMPIRE && you.hunger_state > HS_HUNGRY)
- si++;
-
if (you.mutation[MUT_ACUTE_VISION] > 0)
si += you.mutation[MUT_ACUTE_VISION];
@@ -3337,11 +3364,13 @@ int check_stealth(void)
stealth += (you.skills[SK_STEALTH] * 12);
break;
case SP_VAMPIRE:
- if (you.attribute[ATTR_TRANSFORMATION] == TRAN_BAT
- || you.hunger_state <= HS_HUNGRY)
+ // Hungry/bat-form vampires are (much) more stealthy
+ if (you.hunger_state <= HS_STARVING)
+ stealth += (you.skills[SK_STEALTH] * 21);
+ else if (you.attribute[ATTR_TRANSFORMATION] == TRAN_BAT
+ || you.hunger_state <= HS_HUNGRY)
{
- // Hungry/batty vampires are more stealthy
- stealth += (you.skills[SK_STEALTH] * 19);
+ stealth += (you.skills[SK_STEALTH] * 20);
}
else
stealth += (you.skills[SK_STEALTH] * 18);