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
P2ZCF3BBG523ZEOD6XQA4X5YEHBTWH3IM33YVHXP2SQ5POXZIH4QC
FVCAZQ5Y3MJUSYWOLGBWPGE2CNXVGQF3LHF2GT2JZ7Z2ZPWL2YNAC
I2B33Z7NZGC33AMDSSK446AZZYWKPHWLAGULVHKKZU4MVB4BNJOAC
XHFG7QUF4UF7OYU7KWT2EB6XITI2BZDHH2D2FD7YP33C3M4GRBKQC
ARVJY7XPMCHI4IAQMD2VUWTAXQLCRNVSM2MK3YT4S4WHQYFTLEMAC
4EZVKDQA5GM3QDTNTCKEKGH4F6LGAYNLBT756PXODKZ2B7C4ZVHAC
RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
UURAYLSSITZLQR56MCWFPIWMECU7F3USMA2UPJAO4IPIY5WVKP5QC
YCL3W2PFE6ILTGBFODCSXNPDIA46KVSZP2TI7HDMYAOEJT65RIEAC
R22TTMI6WXWULC7ODKFF3QCB7MOTETQQ6IR4BUCUPOCQKQNCTT5AC
JR2RAQ523LOWNDYJNK6AZVKI6WVMI622PIV72XWOVZYPXPUKSQWAC
7NDXS36TE7QVXTXJWMYSVG5UHCCLPIO4VL6NXFGTDK3ZNKE3A2IAC
LABXKXWWQY2V4FUDLGVTDYHXINAP6KRHZDHBQ2FE22FFOEIZPL6QC
LIBWXPN6HLJAIGEFJYLOL4HLIUD236U3WM5QPHIZ3DSB4CCUJERAC
6LT6USGJOTDMRJGXLAN2NSZXK2GKWEXDKKUV6SVV7ZC6WI6EKMDQC
XD27UUFYG5CXSQMTO5TMCAND5QUDNGLNGZFNISRFWCNO7R2ODAPQC
RB3ZDZXUZ3KVU5C4MFWTQB4J3PCQ5IQS4UVUBRS3TLSPFKBWNFDAC
SDLKLUNFGVKDS55DDJZCBAVIB7NL3RRYPTACAY65SCUQKV6APFSAC
KFULGQQOHWUTXOM3BXCCYPGGVGGY4Z6265XUFRCBPNLTZAEHJZSQC
DTO3EUKWHZ5RJNGNCFYXSOVTIPVXPP637F2W7WFGYKJ7JK7VNKNQC
VNHFP63ZLLZU3A3PLXP4BITX57DUIYDHFOHQYK3BOBHV3S64G26QC
3KAINFIXO7WNWGUGZB43EUNFRS2ZPBLQZDTY456QACMRHYIJ7WDAC
MBBPLL4SZUB3JUUYQYLZW7S5OXRCEGJX3WWADOQXGHWQ7BIKCY5QC
BWAQ3FHBBM6G3K3KYP75CRTR343RDQZJRYX5ZGYUEXYBAC3APDLAC
CIPVRZGLOZHCERK6YPOBV3P2E4IAB4H6D5EHLRQE2O5E4P4VCBUAC
QGIFCQMDBOD3QDWNSZOZFU7AHG2J53OWR5IE3VFCBNVO4SFBF2NQC
77H4BWWPPGLM3PLZH4QTAJRXIZTSDVNCOKZE223I437FN2UJ34RQC
74LQ7JXVLAFSHLI7LCBKFX47CNTYSKGUQSXNX5FCIUIGCC2JTR3QC
IHIJSWVOONSTA2WCHKW3YKBLETUQECFVBVLMET5SGQZ4C6U3GCUQC
5R4WV4H5SNIM5WU2X33JJ63HIEGKCXN2HELZ6FRRKKANPLMRLF3QC
DH3YTI6VVI727SQXO4CXSDCSBG2UN3UAWLFULBGRLBVH22ACRXIAC
WXSNNK2RXP3DQFAEQGQUZJHFWXJC7ZKG2WURZGL566UDM4YXFSWQC
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);
{ // SP_VAMPIRE (38)
110, // SK_FIGHTING
100, // SK_SHORT_BLADES
110, // SK_LONG_SWORDS
110, // SK_UNUSED_1
110, // SK_AXES
140, // SK_MACES_FLAILS
110, // SK_POLEARMS
140, // SK_STAVES
140, // SK_SLINGS
140, // SK_BOWS
140, // SK_CROSSBOWS
140, // SK_DARTS
140, // SK_THROWING
140, // SK_ARMOUR
110, // SK_DODGING
50, // SK_STEALTH
100, // SK_STABBING
140, // SK_SHIELDS
110, // SK_TRAPS_DOORS
90, // SK_UNARMED_COMBAT
140, // undefined
140, // undefined
140, // undefined
140, // undefined
140, // undefined
(100 * 130)/100, // SK_SPELLCASTING
160, // SK_CONJURATIONS
140, // SK_ENCHANTMENTS
100, // SK_SUMMONINGS
100, // SK_NECROMANCY
140, // SK_TRANSLOCATIONS
120, // SK_TRANSMIGRATION
140, // SK_DIVINATIONS
140, // SK_FIRE_MAGIC
140, // SK_ICE_MAGIC
140, // SK_AIR_MAGIC
140, // SK_EARTH_MAGIC
140, // SK_POISON_MAGIC
(140 * 75)/100, // SK_INVOCATIONS
(140 * 75)/100, // SK_EVOCATIONS
},
}
// healing depending on satiation
if (you.species == SP_VAMPIRE)
{
if (you.hunger_state == HS_FULL)
return (rr + 20);
else if (you.attribute[ATTR_TRANSFORMATION] == TRAN_BAT
|| you.hunger_state > HS_HUNGRY)
{
return rr;
}
else if (you.hunger_state == HS_HUNGRY)
return (rr / 2);
else if (you.hunger_state == HS_STARVING)
return 0; // no regeneration for starving vampires
hunger += 6 * player_equip_ego_type( EQ_WEAPON, SPWPN_VAMPIRICISM );
hunger += 9 * player_equip_ego_type( EQ_WEAPON, SPWPN_VAMPIRES_TOOTH );
if (you.species != SP_VAMPIRE)
{
hunger += 6 * player_equip_ego_type( EQ_WEAPON, SPWPN_VAMPIRICISM );
hunger += 9 * player_equip_ego_type( EQ_WEAPON, SPWPN_VAMPIRES_TOOTH );
}
else
{
hunger += 1 * player_equip_ego_type( EQ_WEAPON, SPWPN_VAMPIRICISM );
hunger += 2 * player_equip_ego_type( EQ_WEAPON, SPWPN_VAMPIRES_TOOTH );
}
case SP_VAMPIRE:
result += "You are";
result += (you.experience_level > 25 && you.hunger_state == HS_FULL) ?
" very strongly" :
(you.experience_level > 12 && you.hunger_state != HS_HUNGRY) ?
" strongly" : "";
result += " in touch with the powers of death." EOL;
have_any = true;
break;
case POT_BLOOD:
if (you.species == SP_VAMPIRE)
{
int temp_rand = random2(9);
strcpy(info, (temp_rand == 0) ? "human" :
(temp_rand == 1) ? "rat" :
(temp_rand == 2) ? "goblin" :
(temp_rand == 3) ? "elf" :
(temp_rand == 4) ? "goat" :
(temp_rand == 5) ? "sheep" :
(temp_rand == 6) ? "gnoll" :
(temp_rand == 7) ? "sheep"
: "yak");
mprf("Yummy - fresh %s blood!", info);
lessen_hunger(1000, true);
mpr("You feel better.");
inc_hp(1 + random2(10), false);
}
else
{
bool likes_blood = (you.species == SP_KOBOLD
|| you.species == SP_OGRE
|| you.species == SP_TROLL
|| you.mutation[MUT_CARNIVOROUS]);
if (likes_blood)
{
mpr("This tastes like blood.");
lessen_hunger(200, true);
}
else
{
mpr("Blech - this tastes like blood!");
if (!you.mutation[MUT_HERBIVOROUS] && one_chance_in(3))
lessen_hunger(100, true);
else
disease_player( 50 + random2(100) );
xom_is_stimulated(32);
}
did_god_conduct(DID_DRINK_BLOOD, 1 + random2(3));
}
break;
if (you.inv[which_inventory_slot].sub_type == FOOD_CHUNK)
if (you.inv[which_inventory_slot].base_type == OBJ_CORPSES
&& you.inv[which_inventory_slot].sub_type == CORPSE_BODY)
{
const int mons_type = you.inv[ which_inventory_slot ].plus;
const int chunk_type = mons_corpse_effect( mons_type );
const bool rotten = (you.inv[which_inventory_slot].special < 100);
const int mass = item_mass( you.inv[which_inventory_slot] );
if (!vampire_consume_corpse(mons_type, mass, chunk_type, rotten))
return;
if (!mons_skeleton( mons_type )) {
dec_inv_item_quantity( which_inventory_slot, 1 );
}
else {
you.inv[which_inventory_slot].sub_type = CORPSE_SKELETON;
you.inv[which_inventory_slot].special = 90;
you.inv[which_inventory_slot].colour = LIGHTGREY;
}
// dec_inv_item_quantity( which_inventory_slot, 1 );
return;
}
else if (you.inv[which_inventory_slot].sub_type == FOOD_CHUNK)
if (mitm[item_link].sub_type == FOOD_CHUNK)
if (mitm[item_link].base_type == OBJ_CORPSES
&& mitm[item_link].sub_type == CORPSE_BODY)
{
const int mons_type = mitm[item_link].plus;
const int chunk_type = mons_corpse_effect( mons_type );
const bool rotten = (mitm[item_link].special < 100);
const int mass = item_mass( mitm[item_link] );
if (!vampire_consume_corpse(mons_type, mass, chunk_type, rotten))
return;
if (!mons_skeleton( mons_type )) {
dec_mitm_item_quantity( item_link, 1 );
}
else {
mitm[item_link].sub_type = CORPSE_SKELETON;
mitm[item_link].special = 90;
mitm[item_link].colour = LIGHTGREY;
}
// dec_mitm_item_quantity( item_link, 1 );
you.turn_is_over = 1;
return;
}
else if (mitm[item_link].sub_type == FOOD_CHUNK)
bool vampire_consume_corpse(int mons_type, int mass,
int chunk_type, bool rotten) {
int food_value = 0;
if (chunk_type == CE_HCL) {
mpr( "There is no blood in this body!" );
return false;
}
else if (!rotten) {
inc_hp(1, false);
switch (mons_type) {
case MONS_HUMAN:
food_value = mass + random2avg(you.experience_level * 10, 2);
mpr( "This warm blood tastes really delicious!" );
inc_hp(1 + random2(1 + you.experience_level), false);
break;
case MONS_ELF:
food_value = mass + random2avg(you.experience_level * 10, 2);
mpr( "This warm blood tastes magically delicious!" );
inc_mp(1 + random2(3), false);
break;
default:
food_value = mass;
mpr( "This warm blood tastes delicious!" );
break;
}
did_god_conduct(DID_DRINK_BLOOD, 8);
}
else if (wearing_amulet(AMU_THE_GOURMAND)){
food_value = mass/3 + random2(you.experience_level * 5);
mpr("Slurps.");
did_god_conduct(DID_DRINK_BLOOD, 8);
}
else {
mpr("It's not fresh enough.");
return false;
}
lessen_hunger( food_value, true );
describe_food_change(food_value);
if (player_rotted() && !rotten && one_chance_in(4))
{
mpr("You feel more resilient.");
unrot_hp(1);
}
if (you.strength < you.max_strength && one_chance_in(3))
{
mpr("You feel your strength returning.");
you.strength++;
you.redraw_strength = 1;
}
// start_delay( DELAY_EAT, 3 );
start_delay( DELAY_EAT, 1 + mass/300 );
return true;
} // end vampire_consume_corpse()
if (you.hunger_state == HS_STARVING)
// vampires know how to bite and aim better when hungry
if (you.species == SP_VAMPIRE && uattack == UNAT_BITE)
{
your_to_hit += 1;
if (vampiric)
{
if (you.hunger_state == HS_HUNGRY)
your_to_hit += 1;
else if (you.hunger_state == HS_STARVING)
your_to_hit += 2;
}
}
else if (you.species != SP_VAMPIRE && you.hunger_state == HS_STARVING)
if (mondied && damage_brand == SPWPN_VAMPIRICISM)
if (you.species == SP_VAMPIRE && damage_brand == SPWPN_VAMPIRICISM)
{
if (mons_holiness(def) == MH_NATURAL
&& damage_done > 0 && you.hp < you.hp_max
&& !one_chance_in(5))
{
mpr("You feel better.");
int heal = 1 + random2(damage_done);
if (heal > you.experience_level)
heal = you.experience_level;
heal += 1 + random2(damage_done);
inc_hp(heal, false);
if (you.hunger_state < HS_ENGORGED)
{
lessen_hunger(45 + random2avg(59, 2), true);
}
did_god_conduct(DID_DRINK_BLOOD, 5 + random2(4));
}
}
else if (mondied && damage_brand == SPWPN_VAMPIRICISM)