summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/transfor.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-07-14 23:29:19 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-07-14 23:29:19 +0000
commit94002884ec345eb4e7d6680d6ce26c9b3b0a245a (patch)
tree2823754e89885a73fb83dd1c0ea07b76e88e3a6d /crawl-ref/source/transfor.cc
parent3b818666ded14091b0ad01215b66fe1fccf2a2d6 (diff)
downloadcrawl-ref-94002884ec345eb4e7d6680d6ce26c9b3b0a245a.tar.gz
crawl-ref-94002884ec345eb4e7d6680d6ce26c9b3b0a245a.zip
Vampires, yay! Credit mostly goes to Jarmo, though
there are a few traces of things I've changed (that I've included and then commented out). There's still lots of stuff to be added, but they should be playable right now. I notice that their vampiric bite attack needs to be made more probable. Feel free to comment on anything that looks weird, is plain wrong, or goes against the spirit of Crawl/Stonesoup. Positive feedback will be appreciated as well. :) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1870 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/transfor.cc')
-rw-r--r--crawl-ref/source/transfor.cc33
1 files changed, 32 insertions, 1 deletions
diff --git a/crawl-ref/source/transfor.cc b/crawl-ref/source/transfor.cc
index ebbfc8a621..3846120be5 100644
--- a/crawl-ref/source/transfor.cc
+++ b/crawl-ref/source/transfor.cc
@@ -114,6 +114,7 @@ size_type player::transform_size(int psize) const
switch (transform)
{
case TRAN_SPIDER:
+ case TRAN_BAT:
return SIZE_TINY;
case TRAN_ICE_BEAST:
return SIZE_LARGE;
@@ -165,7 +166,7 @@ bool transform(int pow, transformation_type which_trans)
if (you.attribute[ATTR_TRANSFORMATION] != TRAN_NONE)
untransform();
- if (you.is_undead)
+ if (you.is_undead && (you.species != SP_VAMPIRE || which_trans != TRAN_BAT))
{
mpr("Your unliving flesh cannot be transformed in this way.");
return (false);
@@ -209,6 +210,30 @@ bool transform(int pow, transformation_type which_trans)
you.colour = BROWN;
return (true);
+ case TRAN_BAT:
+ // high ev, low ac, high speed
+ if (check_for_cursed_equipment( rem_stuff ))
+ return false;
+
+ mprf("You turn into a %sbat.",
+ you.species == SP_VAMPIRE ? "vampire " : "");
+
+ remove_equipment( rem_stuff );
+ // drop_everything();
+
+ you.attribute[ATTR_TRANSFORMATION] = TRAN_BAT;
+ you.duration[DUR_TRANSFORMATION] = 20 + random2(pow) + random2(pow);
+
+ if (you.duration[DUR_TRANSFORMATION] > 100)
+ you.duration[DUR_TRANSFORMATION] = 100;
+
+ modify_stat( STAT_DEXTERITY, 5, true );
+ modify_stat( STAT_STRENGTH, -5, true );
+
+ you.symbol = 'b';
+ you.colour = (you.species == SP_VAMPIRE) ? BLACK : DARKGREY;
+ return (true);
+
case TRAN_ICE_BEAST: // also AC +3, cold +3, fire -1, pois +1
mpr( "You turn into a creature of crystalline ice." );
@@ -420,6 +445,12 @@ void untransform(void)
modify_stat( STAT_DEXTERITY, -5, true );
break;
+ case TRAN_BAT:
+ mpr("Your transformation has ended.", MSGCH_DURATION);
+ modify_stat( STAT_DEXTERITY, -5, true );
+ modify_stat( STAT_STRENGTH, 5, true );
+ break;
+
case TRAN_BLADE_HANDS:
mpr( "Your hands revert to their normal proportions.", MSGCH_DURATION );
you.wield_change = true;