|
From: <jp...@mi...> - 2007-07-13 12:30:37
|
Hey!
These past few days I've been incorporating (part of) Jarmo Kielosto's vampire
patch. You can see my current version of this patch below.
This patch introduces vampires as a new race that is available to Fighters,
Assassins and Death Knights (Jarmo) as well as Necromancers and Summoners (me).
Vampires can not die from hunger, but their hunger status majorly influences
their regeneration rate. That, and their ability to transform into bats makes
playing them a lot of fun.
I've yet to see a successful draining bite, but once I get that to work that
should be very exciting (not to mention powerful) as well.
Now I'm a bit unsure about a couple of things.
1.) There are a number of details in Jarmo's patch I do not
agree with. Should I simply keep my own changes, make
note of any differences, or leave it open for discussion?
2.) Once it's complete (still needs playtesting, and I want
to add a bit more) should I simply commit it? Submit this
updated patch, or something else I didn't think of?
3.) Are there any volunteers for extensive vampire testing? ;)
Johanna
---------------------------------
Common subdirectories: source-trunk/.svn and source/.svn
diff -cabiN source-trunk/abl-show.cc source/abl-show.cc
*** source-trunk/abl-show.cc 2007-07-11 00:10:13.000000000 +0200
--- source/abl-show.cc 2007-07-12 20:21:33.265625000 +0200
***************
*** 168,173 ****
--- 168,174 ----
{ ABIL_BREATHE_POWER, "Breathe Power", 0, 0, 125, 0, ABFLAG_BREATH },
{ ABIL_BREATHE_STICKY_FLAME, "Breathe Sticky Flame", 0, 0, 125, 0,
ABFLAG_BREATH },
{ ABIL_BREATHE_STEAM, "Breathe Steam", 0, 0, 75, 0, ABFLAG_BREATH },
+ { ABIL_TRAN_BAT, "Bat Form", 2, 0, 25, 0, ABFLAG_NONE },
{ ABIL_SPIT_ACID, "Spit Acid", 0, 0, 125, 0, ABFLAG_BREATH },
***************
*** 507,512 ****
--- 508,519 ----
case ABIL_FLY_II: // this is for draconians {dlb}
failure = 45 - (you.experience_level + you.strength);
break;
+
+ case ABIL_TRAN_BAT:
+ invoc = true;
+ failure = 45 - (you.experience_level + you.skills[SK_INVOCATIONS]);
+ // perfect = true;
+ break;
// end species abilties (some mutagenic)
// begin demonic powers {dlb}
***************
*** 1654,1659 ****
--- 1661,1670 ----
exercise(SK_INVOCATIONS, 2 + random2(4));
break;
+ case ABIL_TRAN_BAT:
+ transform(100, TRAN_BAT);
+ break;
+
case ABIL_RENOUNCE_RELIGION:
if (yesno("Really renounce your faith, foregoing its fabulous
benefits?")
&& yesno( "Are you sure you won't change your mind later?" ))
***************
*** 1843,1848 ****
--- 1854,1864 ----
}
}
+ if (you.species == SP_VAMPIRE && you.experience_level >= 3)
+ {
+ add_talent(talents, ABIL_TRAN_BAT, check_confused );
+ }
+
//jmf: alternately put check elsewhere
if ((you.level_type == LEVEL_DUNGEON && you.mutation[MUT_MAPPING]) ||
(you.level_type == LEVEL_PANDEMONIUM && you.mutation[MUT_MAPPING]==3))
diff -cabiN source-trunk/acr.cc source/acr.cc
*** source-trunk/acr.cc 2007-07-11 00:10:32.000000000 +0200
--- source/acr.cc 2007-07-13 10:53:21.390625000 +0200
***************
*** 1225,1236 ****
--- 1225,1248 ----
break;
case CMD_THROW:
+ if (you.attribute[ATTR_TRANSFORMATION] == TRAN_BAT)
+ {
+ mpr("You can't throw anything in your present form!");
+ flush_input_buffer( FLUSH_ON_FAILURE );
+ break;
+ }
if (Options.tutorial_left)
Options.tut_throw_counter++;
throw_anything();
break;
case CMD_FIRE:
+ if (you.attribute[ATTR_TRANSFORMATION] == TRAN_BAT)
+ {
+ mpr("You can't fire anything in your present form!");
+ flush_input_buffer( FLUSH_ON_FAILURE );
+ break;
+ }
if (Options.tutorial_left)
Options.tut_throw_counter++;
shoot_thing();
***************
*** 1250,1259 ****
--- 1262,1283 ----
break;
case CMD_REMOVE_JEWELLERY:
+ if (you.attribute[ATTR_TRANSFORMATION] == TRAN_BAT)
+ {
+ mpr("You can't do that in your present form!");
+ flush_input_buffer( FLUSH_ON_FAILURE );
+ break;
+ }
remove_ring();
break;
case CMD_WEAR_JEWELLERY:
+ if (you.attribute[ATTR_TRANSFORMATION] == TRAN_BAT)
+ {
+ mpr("You can't do that in your present form!");
+ flush_input_buffer( FLUSH_ON_FAILURE );
+ break;
+ }
puton_ring(-1, false);
break;
***************
*** 1330,1336 ****
flush_input_buffer( FLUSH_ON_FAILURE );
break;
}
!
if (Options.tutorial_left)
Options.tut_spell_counter++;
if (!cast_a_spell())
--- 1354,1367 ----
flush_input_buffer( FLUSH_ON_FAILURE );
break;
}
! /*
! if (you.attribute[ATTR_TRANSFORMATION] == TRAN_BAT)
! {
! mpr("You can't cast spells in your present form!");
! flush_input_buffer( FLUSH_ON_FAILURE );
! break;
! }
! */
if (Options.tutorial_left)
Options.tut_spell_counter++;
if (!cast_a_spell())
***************
*** 1753,1758 ****
--- 1784,1796 ----
{
you.duration[DUR_TRANSFORMATION]--;
+ if (you.species == SP_VAMPIRE
+ && you.attribute[ATTR_TRANSFORMATION] == TRAN_BAT
+ && you.duration[DUR_TRANSFORMATION] > 2)
+ {
+ you.duration[DUR_TRANSFORMATION] = 5;
+ }
+
if (you.duration[DUR_TRANSFORMATION] == 10)
{
mpr("Your transformation is almost over.", MSGCH_DURATION);
Common subdirectories: source-trunk/Crawl.xcodeproj and source/Crawl.xcodeproj
Common subdirectories: source-trunk/dat and source/dat
diff -cabiN source-trunk/delay.cc source/delay.cc
*** source-trunk/delay.cc 2007-07-11 00:10:19.000000000 +0200
--- source/delay.cc 2007-07-13 14:14:10.640625000 +0200
***************
*** 492,497 ****
--- 492,500 ----
break;
}
case DELAY_EAT:
+ if (you.species == SP_VAMPIRE)
+ mpr( "You finish drinking." );
+ else
mpr( "You finish eating." );
// For chunks, warn the player if they're not getting much
// nutrition.
***************
*** 560,568 ****
if (is_valid_item(item) && item.base_type == OBJ_CORPSES)
{
mprf("You finish %s the corpse into pieces.",
! (you.species==SP_TROLL || you.species == SP_GHOUL) ?
"ripping"
: "chopping");
turn_corpse_into_chunks( mitm[ delay.parm1 ] );
if (you.duration[DUR_BERSERKER] && you.berserk_penalty !=
NO_BERSERK_PENALTY)
--- 563,575 ----
if (is_valid_item(item) && item.base_type == OBJ_CORPSES)
{
mprf("You finish %s the corpse into pieces.",
! (you.species==SP_TROLL || you.species == SP_GHOUL
! || you.mutation[MUT_FANGS] == 3) ? "ripping"
: "chopping");
+ if (you.species == SP_VAMPIRE)
+ mpr("What a waste.");
+
turn_corpse_into_chunks( mitm[ delay.parm1 ] );
if (you.duration[DUR_BERSERKER] && you.berserk_penalty !=
NO_BERSERK_PENALTY)
diff -cabiN source-trunk/describe.cc source/describe.cc
*** source-trunk/describe.cc 2007-07-11 00:10:15.000000000 +0200
--- source/describe.cc 2007-07-13 01:45:51.906250000 +0200
***************
*** 2215,2220 ****
--- 2215,2223 ----
"which may be afflicting you.$";
case POT_MUTATION:
return "A potion which does very strange things to you.$";
+ case POT_BLOOD:
+ return "A potion containing the essence of life. Vital for all living
"
+ "creatures, as well as some undead ones.$";
case NUM_POTIONS:
return "A buggy potion.";
}
diff -cabiN source-trunk/effects.cc source/effects.cc
*** source-trunk/effects.cc 2007-07-11 00:10:15.000000000 +0200
--- source/effects.cc 2007-07-12 18:18:36.937500000 +0200
***************
*** 508,513 ****
--- 508,520 ----
type_wanted = one_chance_in(10) ? FOOD_ROYAL_JELLY
: FOOD_CHUNK;
}
+ else if (you.species == SP_VAMPIRE )
+ {
+ // Vampires really don't want any OBJ_FOOD but OBJ_CORPSES
+ // ...but it's easier to just give them a potion of blood
+ class_wanted = OBJ_POTIONS;
+ type_wanted = POT_BLOOD;
+ }
else
{
// Meat is better than bread (except for herbivores), and
diff -cabiN source-trunk/enum.h source/enum.h
*** source-trunk/enum.h 2007-07-11 00:10:14.000000000 +0200
--- source/enum.h 2007-07-12 23:52:55.515625000 +0200
***************
*** 123,128 ****
--- 123,129 ----
ABIL_TRAN_SERPENT_OF_HELL,
ABIL_ROTTING,
ABIL_TORMENT_II,
+ ABIL_TRAN_BAT,
ABIL_RENOUNCE_RELIGION = 250 // 250
};
***************
*** 798,803 ****
--- 799,805 ----
DID_SPELL_NONUTILITY, // unused
DID_CARDS,
DID_STIMULANTS, // unused
+ DID_DRINK_BLOOD,
DID_EAT_MEAT, // unused
DID_CREATED_LIFE, // unused
***************
*** 2698,2703 ****
--- 2700,2706 ----
MUT_SMITE, // 57
MUT_CLAWS, //jmf: added
MUT_HOOVES, //jmf: etc.
+ MUT_FANGS,
MUT_BREATHE_POISON, // 60
MUT_STINGER,
MUT_BIG_WINGS,
***************
*** 2868,2873 ****
--- 2871,2877 ----
POT_BERSERK_RAGE,
POT_CURE_MUTATION,
POT_MUTATION,
+ POT_BLOOD,
NUM_POTIONS
};
***************
*** 3300,3306 ****
SP_GHOUL, // 35
SP_KENKU,
SP_MERFOLK,
! SP_ELF, // (placeholder)
SP_HILL_DWARF, // (placeholder)
NUM_SPECIES, // always after the last species
--- 3304,3310 ----
SP_GHOUL, // 35
SP_KENKU,
SP_MERFOLK,
! SP_VAMPIRE,
SP_HILL_DWARF, // (placeholder)
NUM_SPECIES, // always after the last species
***************
*** 3706,3711 ****
--- 3710,3716 ----
TRAN_LICH,
TRAN_SERPENT_OF_HELL,
TRAN_AIR,
+ TRAN_BAT,
NUM_TRANSFORMATIONS // must remain last member {dlb}
};
***************
*** 3796,3802 ****
UNAT_KICK,
UNAT_HEADBUTT,
UNAT_TAILSLAP,
! UNAT_PUNCH
};
enum undead_state_type // you.is_undead
--- 3801,3808 ----
UNAT_KICK,
UNAT_HEADBUTT,
UNAT_TAILSLAP,
! UNAT_PUNCH,
! UNAT_BITE
};
enum undead_state_type // you.is_undead
diff -cabiN source-trunk/fight.cc source/fight.cc
*** source-trunk/fight.cc 2007-07-11 00:10:28.000000000 +0200
--- source/fight.cc 2007-07-13 12:22:45.031250000 +0200
***************
*** 165,171 ****
// Returns the to-hit for your extra unarmed.attacks.
// DOES NOT do the final roll (i.e., random2(your_to_hit)).
! static int calc_your_to_hit_unarmed()
{
int your_to_hit;
--- 165,171 ----
// Returns the to-hit for your extra unarmed.attacks.
// DOES NOT do the final roll (i.e., random2(your_to_hit)).
! static int calc_your_to_hit_unarmed(int uattack = UNAT_NO_ATTACK, bool
vampiric = false)
{
int your_to_hit;
***************
*** 175,181 ****
if (wearing_amulet(AMU_INACCURACY))
your_to_hit -= 5;
! if (you.hunger_state == HS_STARVING)
your_to_hit -= 3;
your_to_hit += slaying_bonus(PWPN_HIT);
--- 175,193 ----
if (wearing_amulet(AMU_INACCURACY))
your_to_hit -= 5;
! // 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)
your_to_hit -= 3;
your_to_hit += slaying_bonus(PWPN_HIT);
***************
*** 553,558 ****
--- 565,574 ----
else
uattack = (coinflip() ? UNAT_HEADBUTT : UNAT_KICK);
+ if (you.mutation[MUT_FANGS]
+ || you.attribute[ATTR_TRANSFORMATION] == TRAN_DRAGON)
+ uattack = UNAT_BITE;
+
if ((you.attribute[ATTR_TRANSFORMATION] == TRAN_DRAGON
|| player_genus(GENPC_DRACONIAN)
|| (you.species == SP_MERFOLK && player_is_swimming())
***************
*** 564,576 ****
if (coinflip())
uattack = UNAT_PUNCH;
}
! for (int scount = 0; scount < 4; scount++)
{
unarmed_attack.clear();
damage_brand = SPWPN_NORMAL;
aux_damage = 0;
switch (scount)
{
--- 580,596 ----
if (coinflip())
uattack = UNAT_PUNCH;
+
+ if (you.species == SP_VAMPIRE && coinflip())
+ uattack = UNAT_BITE;
}
! for (int scount = 0; scount < 5; scount++)
{
unarmed_attack.clear();
damage_brand = SPWPN_NORMAL;
aux_damage = 0;
+ bool vampiric = false;
switch (scount)
{
***************
*** 587,593 ****
if (you.attribute[ATTR_TRANSFORMATION] == TRAN_SERPENT_OF_HELL
|| you.attribute[ATTR_TRANSFORMATION] == TRAN_ICE_BEAST
|| you.attribute[ATTR_TRANSFORMATION] == TRAN_DRAGON
! || you.attribute[ATTR_TRANSFORMATION] == TRAN_SPIDER)
{
continue;
}
--- 607,614 ----
if (you.attribute[ATTR_TRANSFORMATION] == TRAN_SERPENT_OF_HELL
|| you.attribute[ATTR_TRANSFORMATION] == TRAN_ICE_BEAST
|| you.attribute[ATTR_TRANSFORMATION] == TRAN_DRAGON
! || you.attribute[ATTR_TRANSFORMATION] == TRAN_SPIDER
! || you.attribute[ATTR_TRANSFORMATION] == TRAN_BAT)
{
continue;
}
***************
*** 610,616 ****
if (you.attribute[ATTR_TRANSFORMATION] == TRAN_SERPENT_OF_HELL
|| you.attribute[ATTR_TRANSFORMATION] == TRAN_SPIDER
|| you.attribute[ATTR_TRANSFORMATION] == TRAN_ICE_BEAST
! || you.attribute[ATTR_TRANSFORMATION] == TRAN_DRAGON)
{
continue;
}
--- 631,638 ----
if (you.attribute[ATTR_TRANSFORMATION] == TRAN_SERPENT_OF_HELL
|| you.attribute[ATTR_TRANSFORMATION] == TRAN_SPIDER
|| you.attribute[ATTR_TRANSFORMATION] == TRAN_ICE_BEAST
! || you.attribute[ATTR_TRANSFORMATION] == TRAN_DRAGON
! || you.attribute[ATTR_TRANSFORMATION] == TRAN_BAT)
{
continue;
}
***************
*** 652,658 ****
}
if (you.attribute[ATTR_TRANSFORMATION] == TRAN_SPIDER
! || you.attribute[ATTR_TRANSFORMATION] == TRAN_ICE_BEAST)
{
continue;
}
--- 674,681 ----
}
if (you.attribute[ATTR_TRANSFORMATION] == TRAN_SPIDER
! || you.attribute[ATTR_TRANSFORMATION] == TRAN_ICE_BEAST
! || you.attribute[ATTR_TRANSFORMATION] == TRAN_BAT)
{
continue;
}
***************
*** 683,689 ****
if (you.attribute[ATTR_TRANSFORMATION] == TRAN_SERPENT_OF_HELL
|| you.attribute[ATTR_TRANSFORMATION] == TRAN_SPIDER
|| you.attribute[ATTR_TRANSFORMATION] == TRAN_ICE_BEAST
! || you.attribute[ATTR_TRANSFORMATION] == TRAN_DRAGON)
{
continue;
}
--- 706,713 ----
if (you.attribute[ATTR_TRANSFORMATION] == TRAN_SERPENT_OF_HELL
|| you.attribute[ATTR_TRANSFORMATION] == TRAN_SPIDER
|| you.attribute[ATTR_TRANSFORMATION] == TRAN_ICE_BEAST
! || you.attribute[ATTR_TRANSFORMATION] == TRAN_DRAGON
! || you.attribute[ATTR_TRANSFORMATION] == TRAN_BAT)
{
continue;
}
***************
*** 717,722 ****
--- 741,774 ----
break;
+ case 4:
+ if (uattack != UNAT_BITE)
+ {
+ continue;
+ }
+ if (!you.mutation[MUT_FANGS] || !one_chance_in(5))
+ {
+ continue;
+ }
+
+ unarmed_attack = "bite";
+ // simple_miss_message = true;
+
+ aux_damage += you.mutation[MUT_FANGS] * 2;
+
+ // prob: 1/4 when non-hungry, 1/2 when hungry, 100% when starving
+ if (you.species == SP_VAMPIRE)
+ {
+ if (you.hunger_state > HS_HUNGRY && coinflip())
+ break;
+ if (you.hunger_state > HS_STARVING && coinflip())
+ break;
+
+ damage_brand = SPWPN_VAMPIRICISM;
+ vampiric = true;
+ }
+ break;
+
/* To add more, add to while part of loop below as well */
default:
continue;
***************
*** 724,730 ****
}
// unified to-hit calculation
! to_hit = random2( calc_your_to_hit_unarmed() );
make_hungry(2, true);
--- 776,782 ----
}
// unified to-hit calculation
! to_hit = random2( calc_your_to_hit_unarmed(uattack, vampiric) );
make_hungry(2, true);
***************
*** 1139,1144 ****
--- 1191,1201 ----
else if (weapon->base_type == OBJ_WEAPONS)
weap_type = weapon->sub_type;
+ if (you.attribute[ATTR_TRANSFORMATION] == TRAN_BAT)
+ {
+ attack_verb = "bite";
+ return(damage);
+ }
// All weak hits look the same, except for when the player
// has a non-weapon in hand. -- bwr
if (damage < HIT_WEAK)
***************
*** 1314,1320 ****
did_god_conduct(DID_UNHOLY, 1);
}
! if (mondied && damage_brand == SPWPN_VAMPIRICISM)
{
if (mons_holiness(def) == MH_NATURAL
&& damage_done > 0 && you.hp < you.hp_max
--- 1371,1399 ----
did_god_conduct(DID_UNHOLY, 1);
}
! 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)
{
if (mons_holiness(def) == MH_NATURAL
&& damage_done > 0 && you.hp < you.hp_max
***************
*** 1323,1329 ****
mpr("You feel better.");
// more than if not killed
! inc_hp(1 + random2(damage_done), false);
if (you.hunger_state != HS_ENGORGED)
lessen_hunger(30 + random2avg(59, 2), true);
--- 1402,1410 ----
mpr("You feel better.");
// more than if not killed
! int heal = 1 + random2(damage_done);
!
! inc_hp(heal, false);
if (you.hunger_state != HS_ENGORGED)
lessen_hunger(30 + random2avg(59, 2), true);
***************
*** 2077,2082 ****
--- 2158,2164 ----
your_to_hit -= 5;
const bool see_invis = player_see_invis();
+
// if you can't see yourself, you're a little less acurate.
if (you.duration[DUR_INVIS] && !see_invis)
your_to_hit -= 5;
***************
*** 2174,2179 ****
--- 2256,2264 ----
case TRAN_SPIDER:
your_to_hit += maybe_random2(10, random_factor);
break;
+ case TRAN_BAT:
+ your_to_hit += random2(10);
+ break;
case TRAN_ICE_BEAST:
your_to_hit += maybe_random2(10, random_factor);
break;
***************
*** 2359,2364 ****
--- 2444,2452 ----
if (you.burden_state == BS_UNENCUMBERED
&& one_chance_in(heavy_armour_penalty + 1))
{
+ if (you.attribute[ATTR_TRANSFORMATION] == TRAN_BAT)
+ unarmed_delay = 10 - you.skills[SK_UNARMED_COMBAT] / 3;
+ else
unarmed_delay = 10 - you.skills[SK_UNARMED_COMBAT] / 5;
/* this shouldn't happen anyway...sanity */
***************
*** 2407,2412 ****
--- 2495,2503 ----
case TRAN_SPIDER:
damage = 5;
break;
+ case TRAN_BAT:
+ damage = (you.species == SP_VAMPIRE ? 2 : 1);
+ break;
case TRAN_ICE_BEAST:
damage = 12;
break;
***************
*** 2439,2444 ****
--- 2530,2538 ----
damage += (you.mutation[ MUT_CLAWS ] * 2);
}
+ if (you.attribute[ATTR_TRANSFORMATION] == TRAN_BAT)
+ damage += (you.skills[SK_UNARMED_COMBAT]/3);
+ else
damage += you.skills[SK_UNARMED_COMBAT];
return (damage);
diff -cabiN source-trunk/food.cc source/food.cc
*** source-trunk/food.cc 2007-07-11 00:10:15.000000000 +0200
--- source/food.cc 2007-07-13 09:21:03.375000000 +0200
***************
*** 53,58 ****
--- 53,60 ----
static void ghoul_eat_flesh( int chunk_effect );
static void describe_food_change(int hunger_increment);
static bool food_change(bool suppress_message);
+ bool vampire_consume_corpse(int mons_type, int mass,
+ int chunk_type, bool rotten);
/*
**************************************************
***************
*** 192,197 ****
--- 194,202 ----
const transformation_type transform =
static_cast<transformation_type>(you.attribute[ATTR_TRANSFORMATION]);
+ // Xom probably likes this
+ bool teeth_butcher = (you.mutation[MUT_FANGS] == 3);
+
bool barehand_butcher =
(you.equip[ EQ_GLOVES ] == -1
&& (transform_can_butcher_barehanded(transform)
***************
*** 207,213 ****
!item_cursed(you.inv[you.equip[EQ_GLOVES]]));
int old_gloves = you.equip[EQ_GLOVES];
! bool can_butcher = barehand_butcher ||
(you.equip[EQ_WEAPON] != -1 &&
can_cut_meat(you.inv[you.equip[EQ_WEAPON]]));
--- 212,218 ----
!item_cursed(you.inv[you.equip[EQ_GLOVES]]));
int old_gloves = you.equip[EQ_GLOVES];
! bool can_butcher = teeth_butcher || barehand_butcher ||
(you.equip[EQ_WEAPON] != -1 &&
can_cut_meat(you.inv[you.equip[EQ_WEAPON]]));
***************
*** 315,321 ****
if ( can_butcher )
{
// we actually butcher now
! if ( barehand_butcher )
mpr("You start tearing the corpse apart.");
else
mpr("You start hacking away.");
--- 320,326 ----
if ( can_butcher )
{
// we actually butcher now
! if ( teeth_butcher || barehand_butcher )
mpr("You start tearing the corpse apart.");
else
mpr("You start hacking away.");
***************
*** 431,437 ****
prompt_invent_item(
"Eat which item?",
MT_INVLIST,
! OBJ_FOOD,
true, true, true, 0, NULL,
OPER_EAT );
if (which_inventory_slot == PROMPT_ABORT)
--- 436,442 ----
prompt_invent_item(
"Eat which item?",
MT_INVLIST,
! you.species == SP_VAMPIRE ? OBJ_CORPSES : OBJ_FOOD,
true, true, true, 0, NULL,
OPER_EAT );
if (which_inventory_slot == PROMPT_ABORT)
***************
*** 442,453 ****
// this conditional can later be merged into food::can_ingest() when
// expanded to handle more than just OBJ_FOOD 16mar200 {dlb}
! if (you.inv[which_inventory_slot].base_type != OBJ_FOOD)
{
mpr("You can't eat that!");
return (false);
}
if (!can_ingest( you.inv[which_inventory_slot].base_type,
you.inv[which_inventory_slot].sub_type, false ))
{
--- 447,467 ----
// this conditional can later be merged into food::can_ingest() when
// expanded to handle more than just OBJ_FOOD 16mar200 {dlb}
! if (you.species != SP_VAMPIRE &&
! you.inv[which_inventory_slot].base_type != OBJ_FOOD)
{
mpr("You can't eat that!");
return (false);
}
+ if (you.species == SP_VAMPIRE &&
+ (you.inv[which_inventory_slot].base_type != OBJ_CORPSES
+ || you.inv[which_inventory_slot].sub_type != CORPSE_BODY))
+ {
+ mpr("You crave blood!");
+ return (false);
+ }
+
if (!can_ingest( you.inv[which_inventory_slot].base_type,
you.inv[which_inventory_slot].sub_type, false ))
{
***************
*** 515,520 ****
--- 529,540 ----
if (you.species == SP_GHOUL && you.hunger > 6999)
you.hunger = 6999;
+ // vampires can never be engorged or starve to death
+ if (you.species == SP_VAMPIRE && you.hunger <= 100)
+ you.hunger = 101;
+ if (you.species == SP_VAMPIRE && you.hunger > 10999)
+ you.hunger = 10999;
+
// get new hunger state
if (you.hunger <= 1000)
newstate = HS_STARVING;
***************
*** 586,592 ****
void eat_from_inventory(int which_inventory_slot)
{
! if (you.inv[which_inventory_slot].sub_type == FOOD_CHUNK)
{
// this is a bit easier to read... most compilers should
// handle this the same -- bwr
--- 606,634 ----
void eat_from_inventory(int which_inventory_slot)
{
! 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)
{
// this is a bit easier to read... most compilers should
// handle this the same -- bwr
***************
*** 607,613 ****
void eat_floor_item(int item_link)
{
! if (mitm[item_link].sub_type == FOOD_CHUNK)
{
const int chunk_type = mons_corpse_effect( mitm[item_link].plus );
const bool rotten = (mitm[item_link].special < 100);
--- 649,679 ----
void eat_floor_item(int item_link)
{
! 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)
{
const int chunk_type = mons_corpse_effect( mitm[item_link].plus );
const bool rotten = (mitm[item_link].special < 100);
***************
*** 634,644 ****
{
item_def& item = mitm[o];
! if (item.base_type != OBJ_FOOD)
continue;
mprf( MSGCH_PROMPT,
! "Eat %s%s?", (item.quantity > 1) ? "one of " : "",
item.name(DESC_NOCAP_A).c_str() );
// If we're prompting now, we don't need a -more- when
--- 700,715 ----
{
item_def& item = mitm[o];
! if (you.species != SP_VAMPIRE && item.base_type != OBJ_FOOD)
! continue;
!
! if (you.species == SP_VAMPIRE &&
! (item.base_type != OBJ_CORPSES || item.sub_type != CORPSE_BODY))
continue;
mprf( MSGCH_PROMPT,
! "%s %s%s?", you.species == SP_VAMPIRE ? "Drink blood from" :
"Eat",
! (item.quantity > 1) ? "one of " : "",
item.name(DESC_NOCAP_A).c_str() );
// If we're prompting now, we don't need a -more- when
***************
*** 1141,1146 ****
--- 1212,1229 ----
return (false);
}
+ if (you.species == SP_VAMPIRE)
+ {
+ if (what_isit == OBJ_CORPSES && kindof_thing == CORPSE_BODY)
+ {
+ return (true);
+ }
+ else
+ {
+ mpr("Blech - you need blood!");
+ }
+ return (false);
+ }
bool ur_carnivorous = (you.mutation[MUT_CARNIVOROUS] == 3);
***************
*** 1213,1218 ****
--- 1296,1303 ----
// of things other than just food -- corpses first, then more
// exotic stuff later would be good to explore - 13mar2000 {dlb}
case OBJ_CORPSES:
+ // if (you.species == SP_VAMPIRE && kind_of_thing == CORPSE_BODY)
+ // return (true);
default:
return (false);
}
***************
*** 1352,1354 ****
--- 1437,1500 ----
return (this_chunk_effect);
} // end determine_chunk_effect()
+
+ 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 );
+ return true;
+ } // end vampire_consume_corpse()
diff -cabiN source-trunk/it_use2.cc source/it_use2.cc
*** source-trunk/it_use2.cc 2007-07-11 00:10:25.000000000 +0200
--- source/it_use2.cc 2007-07-13 09:42:51.453125000 +0200
***************
*** 54,59 ****
--- 54,69 ----
switch (pot_eff)
{
case POT_HEALING:
+ if (you.species == SP_VAMPIRE)
+ {
+ inc_hp((5 + random2(7)) / 2, false);
+ if (!one_chance_in(3))
+ you.rotting = 0;
+ if (!one_chance_in(3))
+ you.duration[DUR_CONF] = 0;
+ mpr("You feel slightly better.");
+ break;
+ }
mpr("You feel better.");
inc_hp(5 + random2(7), false);
***************
*** 71,76 ****
--- 81,92 ----
break;
case POT_HEAL_WOUNDS:
+ if (you.species == SP_VAMPIRE /*&& you.hunger_state */)
+ {
+ inc_hp((10 + random2avg(28, 3)) / 2, false);
+ mpr("You feel better.");
+ break;
+ }
mpr("You feel much better.");
inc_hp(10 + random2avg(28, 3), false);
***************
*** 83,88 ****
--- 99,109 ----
break;
case POT_SPEED:
+ if (you.species == SP_VAMPIRE)
+ {
+ haste_player( (40 + random2(pow)) / 2 );
+ break;
+ }
haste_player( 40 + random2(pow) );
break;
***************
*** 158,173 ****
--- 179,209 ----
break;
case POT_SLOWING:
+ if (you.species == SP_VAMPIRE)
+ {
+ slow_player( (10 + random2(pow)) / 2 );
+ break;
+ }
slow_player( 10 + random2(pow) );
xom_is_stimulated(64);
break;
case POT_PARALYSIS:
+ if (you.species == SP_VAMPIRE)
+ {
+ slow_player( 10 + random2(pow) );
+ break;
+ }
you.paralyse(2 + random2( 6 + you.duration[DUR_PARALYSIS] ));
xom_is_stimulated(64);
break;
case POT_CONFUSION:
+ if (you.species == SP_VAMPIRE)
+ {
+ confuse_player( (3 + random2(8)) / 2 );
+ break;
+ }
confuse_player( 3 + random2(8) );
xom_is_stimulated(128);
break;
***************
*** 190,200 ****
--- 226,247 ----
// carnivore check here? {dlb}
case POT_PORRIDGE: // oatmeal - always gluggy white/grey?
+ if (you.species == SP_VAMPIRE)
+ {
+ mpr("Blech - that potion was really gluggy!");
+ break;
+ }
mpr("That potion was really gluggy!");
lessen_hunger(6000, true);
break;
case POT_DEGENERATION:
+ if (you.species == SP_VAMPIRE)
+ {
+ mpr("There was something wrong with that liquid!");
+ lose_stat(STAT_RANDOM, 1 + random2(2));
+ break;
+ }
mpr("There was something very wrong with that liquid!");
lose_stat(STAT_RANDOM, 1 + random2avg(4, 2));
xom_is_stimulated(64);
***************
*** 212,217 ****
--- 259,269 ----
break;
case POT_WATER:
+ if (you.species == SP_VAMPIRE)
+ {
+ mpr("Blech - this tastes like water.");
+ break;
+ }
mpr("This tastes like water.");
// we should really separate thirst from hunger {dlb}
// Thirst would just be annoying for the player, the
***************
*** 256,261 ****
--- 308,319 ----
break;
case POT_BERSERK_RAGE:
+ if (you.species == SP_VAMPIRE)
+ {
+ mpr("You feel slightly irritated.");
+ make_hungry(100, false);
+ break;
+ }
go_berserk(true);
xom_is_stimulated(64);
break;
***************
*** 279,284 ****
--- 337,386 ----
did_god_conduct(DID_STIMULANTS, 4 + random2(4));
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) );
+ }
+ did_god_conduct(DID_DRINK_BLOOD, 1 + random2(3));
+ }
+ break;
+
case NUM_POTIONS:
mpr("You feel bugginess flow through your body.");
break;
diff -cabiN source-trunk/itemname.cc source/itemname.cc
*** source-trunk/itemname.cc 2007-07-11 00:10:28.000000000 +0200
--- source/itemname.cc 2007-07-12 19:09:20.203125000 +0200
***************
*** 480,485 ****
--- 480,486 ----
case POT_BERSERK_RAGE: return "berserk rage";
case POT_CURE_MUTATION: return "cure mutation";
case POT_MUTATION: return "mutation";
+ case POT_BLOOD: return "blood";
default: return "bugginess";
}
}
Common subdirectories: source-trunk/lua and source/lua
diff -cabiN source-trunk/makeitem.cc source/makeitem.cc
*** source-trunk/makeitem.cc 2007-07-11 00:10:18.000000000 +0200
--- source/makeitem.cc 2007-07-13 09:10:47.656250000 +0200
***************
*** 2403,2423 ****
case 4:
// enhancements
if (coinflip())
! mitm[p].sub_type = POT_SPEED; // 6.444%
else
! mitm[p].sub_type = POT_MIGHT; // 6.444%
if (one_chance_in(10))
! mitm[p].sub_type = POT_BERSERK_RAGE; // 1.432%
if (one_chance_in(5))
! mitm[p].sub_type = POT_INVISIBILITY; // 3.580%
if (one_chance_in(6))
! mitm[p].sub_type = POT_LEVITATION; // 3.580%
if (one_chance_in(30))
! mitm[p].sub_type = POT_PORRIDGE; // 0.741%
break;
case 5:
--- 2403,2426 ----
case 4:
// enhancements
if (coinflip())
! mitm[p].sub_type = POT_SPEED; // 6.122%
else
! mitm[p].sub_type = POT_MIGHT; // 6.122%
if (one_chance_in(10))
! mitm[p].sub_type = POT_BERSERK_RAGE; // 1.360%
if (one_chance_in(5))
! mitm[p].sub_type = POT_INVISIBILITY; // 3.401%
if (one_chance_in(6))
! mitm[p].sub_type = POT_LEVITATION; // 3.401%
if (one_chance_in(30))
! mitm[p].sub_type = POT_PORRIDGE; // 0.704%
!
! if (one_chance_in(20))
! mitm[p].sub_type = POT_BLOOD; // 1.111%
break;
case 5:
Common subdirectories: source-trunk/misc and source/misc
Common subdirectories: source-trunk/morgue and source/morgue
diff -cabiN source-trunk/mutation.cc source/mutation.cc
*** source-trunk/mutation.cc 2007-07-11 00:10:15.000000000 +0200
--- source/mutation.cc 2007-07-13 10:47:10.437500000 +0200
***************
*** 246,251 ****
--- 246,255 ----
{"You have hooves in place of feet.", "", ""},
// 60 - leave some space for more demonic powers...
+
+ {"You have very sharp teeth.", "You have extremely sharp teeth.",
+ "You have razor-sharp teeth."},
+
{"You can exhale a cloud of poison.", "", ""},
{"Your tail ends in a poisonous barb.",
***************
*** 492,497 ****
--- 496,504 ----
{"Your feet shrivel into cloven hooves.", "", ""},
// 60
+ {"Your teeth lengthen and sharpen.", "Your teeth become sharper and
pointier.",
+ "Your teeth are very long and razor-sharp."},
+
{"You taste something nasty.", "You taste something very nasty.",
"You taste something extremely nasty."},
***************
*** 712,717 ****
--- 719,726 ----
{"Your hooves expand and flesh out into feet!", "", ""},
// 60
+ {"Your teeth shrink and become duller.", "", ""},
+
{"", "", ""},
{"", "", ""},
{"", "", ""},
***************
*** 852,857 ****
--- 861,867 ----
2, //jmf: claws
1, //jmf: hooves
// 60
+ 1,
0,
0,
0,
***************
*** 1070,1075 ****
--- 1080,1095 ----
have_any = true;
break;
+ 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;
+
default:
break;
} //end switch - innate abilities
***************
*** 1199,1204 ****
--- 1219,1225 ----
case MUT_FRAIL:
case MUT_CLAWS:
case MUT_HOOVES:
+ case MUT_FANGS:
case MUT_BREATHE_POISON:
case MUT_STINGER:
case MUT_BIG_WINGS:
***************
*** 1402,1407 ****
--- 1423,1434 ----
return false;
}
+ if (you.species == SP_VAMPIRE
+ && (mutat == MUT_FANGS || mutat == MUT_HERBIVOROUS))
+ {
+ return false;
+ }
+
if (mutat == MUT_BIG_WINGS && !player_genus(GENPC_DRACONIAN))
return false;
***************
*** 1549,1554 ****
--- 1576,1585 ----
remove_one_equip(EQ_BOOTS);
break;
+ case MUT_FANGS:
+ mpr(gain_mutation[mutat][you.mutation[mutat]], MSGCH_MUTATION);
+ break;
+
case MUT_CLAWS:
mpr((you.species == SP_TROLL ? troll_claw_messages
***************
*** 2330,2335 ****
--- 2361,2372 ----
how_much = 1;
}
+ if (you.species != SP_VAMPIRE && one_chance_in(5))
+ {
+ mutation = MUT_FANGS;
+ how_much = 1 + random2(3);
+ }
+
if (player_genus(GENPC_DRACONIAN) && one_chance_in(5))
{
mutation = MUT_BIG_WINGS;
diff -cabiN source-trunk/newgame.cc source/newgame.cc
*** source-trunk/newgame.cc 2007-07-11 16:31:56.000000000 +0200
--- source/newgame.cc 2007-07-13 11:48:05.390625000 +0200
***************
*** 257,263 ****
// we only want draconians counted once in this loop...
// we'll add the variety lower down -- bwr
if ((sp >= SP_WHITE_DRACONIAN && sp <= SP_BASE_DRACONIAN)
! || sp == SP_ELF || sp == SP_HILL_DWARF)
continue;
for (int cl = JOB_FIGHTER; cl < NUM_JOBS; cl++)
--- 257,263 ----
// we only want draconians counted once in this loop...
// we'll add the variety lower down -- bwr
if ((sp >= SP_WHITE_DRACONIAN && sp <= SP_BASE_DRACONIAN)
! || sp == SP_HILL_DWARF)
continue;
for (int cl = JOB_FIGHTER; cl < NUM_JOBS; cl++)
***************
*** 390,395 ****
--- 390,396 ----
PDESCQ(PDQ_GLUGGY, PDC_WHITE);
you.item_description[IDESC_POTIONS][POT_WATER] = PDESCS(PDC_CLEAR);
+ you.item_description[IDESC_POTIONS][POT_BLOOD] = PDESCS(PDC_RED);
for (int i = 0; i < NUM_IDESC; i++)
{
***************
*** 452,459 ****
static void give_starting_food()
{
! // the undead start with no food
! if (you.is_undead != US_ALIVE)
return;
item_def item;
--- 453,460 ----
static void give_starting_food()
{
! // these undead start with no food
! if (you.species == SP_MUMMY || you.species == SP_GHOUL)
return;
item_def item;
***************
*** 462,467 ****
--- 463,473 ----
item.base_type = OBJ_POTIONS;
item.sub_type = POT_PORRIDGE;
}
+ else if (you.species == SP_VAMPIRE)
+ {
+ item.base_type = OBJ_POTIONS;
+ item.sub_type = POT_BLOOD;
+ }
else
{
item.base_type = OBJ_FOOD;
***************
*** 634,639 ****
--- 640,646 ----
case SP_GREY_ELF:
case SP_HIGH_ELF:
+ case SP_VAMPIRE:
dec_max_hp(1);
break;
***************
*** 657,662 ****
--- 664,670 ----
// adjust max_magic_points by species {dlb}
switch (you.species)
{
+ case SP_VAMPIRE:
case SP_SPRIGGAN:
case SP_DEMIGOD:
case SP_GREY_ELF:
***************
*** 764,770 ****
species_stat_init( you.species ); // must be down here {dlb}
you.is_undead = ((you.species == SP_MUMMY) ? US_UNDEAD :
! (you.species == SP_GHOUL) ? US_HUNGRY_DEAD : US_ALIVE);
// before we get into the inventory init, set light radius based
// on species vision. currently, all species see out to 8 squares.
--- 772,780 ----
species_stat_init( you.species ); // must be down here {dlb}
you.is_undead = ((you.species == SP_MUMMY) ? US_UNDEAD :
! (you.species == SP_GHOUL || you.species == SP_VAMPIRE) ?
! US_HUNGRY_DEAD :
! US_ALIVE);
// before we get into the inventory init, set light radius based
// on species vision. currently, all species see out to 8 squares.
***************
*** 864,870 ****
static bool species_is_undead( unsigned char speci )
{
! return (speci == SP_MUMMY || speci == SP_GHOUL);
}
static bool class_allowed( species_type speci, job_type char_class )
--- 874,880 ----
static bool species_is_undead( unsigned char speci )
{
! return (speci == SP_MUMMY || speci == SP_GHOUL || speci == SP_VAMPIRE);
}
static bool class_allowed( species_type speci, job_type char_class )
***************
*** 1171,1176 ****
--- 1181,1188 ----
case JOB_SUMMONER:
if (player_genus(GENPC_DWARVEN, speci))
return false;
+ if (speci == SP_VAMPIRE)
+ return true;
if (species_is_undead( speci ))
return false;
***************
*** 1774,1779 ****
--- 1786,1792 ----
case SP_MUMMY: sb = 7; ib = 3; db = 3; break; // 13
case SP_GHOUL: sb = 9; ib = 1; db = 2; break; // 13
+ case SP_VAMPIRE: sb = 5; ib = 6; db = 5; break; // 16
case SP_RED_DRACONIAN:
case SP_WHITE_DRACONIAN:
***************
*** 1903,1908 ****
--- 1916,1926 ----
case SP_KOBOLD:
you.mutation[MUT_CARNIVOROUS] = 3;
break;
+ case SP_VAMPIRE:
+ you.mutation[MUT_FANGS] = 3;
+ you.mutation[MUT_SLOW_METABOLISM] = 1;
+ // you.mutation[MUT_POISON_RESISTANCE] = 1;
+ break;
default:
break;
}
***************
*** 1914,1919 ****
--- 1932,1940 ----
static void give_basic_knowledge(job_type which_job)
{
+ if (you.species == SP_VAMPIRE)
+ set_ident_type( OBJ_POTIONS, POT_BLOOD, ID_KNOWN_TYPE );
+
switch (which_job)
{
case JOB_PRIEST:
***************
*** 2900,2906 ****
static species_type letter_to_species(int keyn)
{
! if ( keyn < 'a' || keyn > 'x' )
return SP_UNKNOWN;
const int offset = keyn - 'a';
int rc;
--- 2921,2927 ----
static species_type letter_to_species(int keyn)
{
! if ( keyn < 'a' || keyn > 'y' )
return SP_UNKNOWN;
const int offset = keyn - 'a';
int rc;
***************
*** 2992,2998 ****
for (int i = SP_HUMAN; i < NUM_SPECIES; ++i)
{
if ((i > SP_RED_DRACONIAN && i <= SP_BASE_DRACONIAN)
! || i == SP_ELF || i == SP_HILL_DWARF)
continue;
if (you.char_class != JOB_UNKNOWN &&
--- 3013,3019 ----
for (int i = SP_HUMAN; i < NUM_SPECIES; ++i)
{
if ((i > SP_RED_DRACONIAN && i <= SP_BASE_DRACONIAN)
! || i == SP_HILL_DWARF)
continue;
if (you.char_class != JOB_UNKNOWN &&
***************
*** 3402,3414 ****
you.inv[2].special = 0;
}
}
! else if (you.species == SP_GHOUL || you.species == SP_MUMMY)
{
you.inv[1].quantity = 1;
you.inv[1].base_type = OBJ_ARMOUR;
you.inv[1].sub_type = ARM_ROBE;
you.inv[1].plus = 0;
you.inv[1].special = 0;
if (you.species == SP_MUMMY)
{
--- 3423,3437 ----
you.inv[2].special = 0;
}
}
! else if (you.is_undead)
{
you.inv[1].quantity = 1;
you.inv[1].base_type = OBJ_ARMOUR;
you.inv[1].sub_type = ARM_ROBE;
you.inv[1].plus = 0;
you.inv[1].special = 0;
+ if (you.species == SP_VAMPIRE && coinflip())
+ you.inv[1].sub_type = ARM_LEATHER_ARMOUR;
if (you.species == SP_MUMMY)
{
***************
*** 3457,3463 ****
you.equip[EQ_BODY_ARMOUR] = 1;
if (you.species != SP_KOBOLD && you.species != SP_OGRE
! && you.species != SP_TROLL && you.species != SP_GHOUL)
{
you.equip[EQ_SHIELD] = 2;
}
--- 3480,3487 ----
you.equip[EQ_BODY_ARMOUR] = 1;
if (you.species != SP_KOBOLD && you.species != SP_OGRE
! && you.species != SP_TROLL && you.species != SP_GHOUL
! && you.species != SP_VAMPIRE)
{
you.equip[EQ_SHIELD] = 2;
}
***************
*** 4886,4891 ****
--- 4910,4921 ----
break;
}
+ // Vampires always start with unarmed combat skill.
+ if (you.species == SP_VAMPIRE && you.skills[SK_UNARMED_COMBAT] < 2)
+ {
+ you.skills[SK_UNARMED_COMBAT] = 2;
+ }
+
if (weap_skill)
you.skills[weapon_skill(OBJ_WEAPONS, you.inv[0].sub_type)] =
weap_skill;
diff -cabiN source-trunk/output.cc source/output.cc
*** source-trunk/output.cc 2007-07-11 21:25:28.000000000 +0200
--- source/output.cc 2007-07-13 10:17:04.484375000 +0200
***************
*** 1318,1325 ****
if (you.duration[DUR_PRAYER])
text += "praying, ";
! if (you.duration[DUR_REGENERATION])
text += "regenerating, ";
// not used as resistance part already says so
// if (you.duration[DUR_INSULATION])
--- 1318,1331 ----
if (you.duration[DUR_PRAYER])
text += "praying, ";
! if (you.duration[DUR_REGENERATION]
! && (you.species != SP_VAMPIRE || you.hunger_state >= HS_HUNGRY))
! {
! if (you.disease)
! text += "recuperating, ";
! else
text += "regenerating, ";
+ }
// not used as resistance part already says so
// if (you.duration[DUR_INSULATION])
***************
*** 1456,1466 ****
--- 1462,1478 ----
text += info;
+ if (you.disease || you.species == SP_VAMPIRE && you.hunger_state <
HS_HUNGRY)
+ text += "non-regenerating";
+
switch (you.attribute[ATTR_TRANSFORMATION])
{
case TRAN_SPIDER:
text += "\nYou are in spider-form.";
break;
+ case TRAN_BAT:
+ text += "\nYou are in bat-form.";
+ break;
case TRAN_BLADE_HANDS:
text += "\nYou have blades for hands.";
break;
***************
*** 1482,1487 ****
--- 1494,1501 ----
case TRAN_AIR:
text += "\nYou are a cloud of diffuse gas.";
break;
+ default:
+ break;
}
const int to_hit = calc_your_to_hit( false ) * 2;
***************
*** 1660,1665 ****
--- 1674,1683 ----
have_any = true;
break;
+ case SP_VAMPIRE:
+ text += "sharp teeth 3";
+ have_any = true;
+ break;
default:
break;
} //end switch - innate abilities
***************
*** 2046,2051 ****
--- 2064,2078 ----
text += "hooves";
have_any = true;
break;
+ case MUT_FANGS:
+ if (you.species == SP_VAMPIRE)
+ break;
+ if (have_any)
+ text += ", ";
+ snprintf(info, INFO_SIZE, "sharp teeth %d", level);
+ text += info;
+ have_any = true;
+ break;
case MUT_BREATHE_POISON:
if (have_any)
text += ", ";
diff -cabiN source-trunk/player.cc source/player.cc
*** source-trunk/player.cc 2007-07-11 16:31:56.000000000 +0200
--- source/player.cc 2007-07-13 12:23:37.765625000 +0200
***************
*** 411,417 ****
case SP_GREY_ELF:
case SP_DEEP_ELF:
case SP_SLUDGE_ELF:
! case SP_ELF:
return (which_genus == GENPC_ELVEN);
case SP_MOUNTAIN_DWARF:
--- 411,417 ----
case SP_GREY_ELF:
case SP_DEEP_ELF:
case SP_SLUDGE_ELF:
! // case SP_ELF:
return (which_genus == GENPC_ELVEN);
case SP_MOUNTAIN_DWARF:
***************
*** 693,698 ****
--- 693,714 ----
rr /= 2;
}
+ // 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
+ }
+
if (rr < 1)
rr = 1;
***************
*** 703,708 ****
--- 719,727 ----
{
int hunger = 3;
+ if (you.attribute[ATTR_TRANSFORMATION] == TRAN_BAT)
+ return 1;
+
// jmf: hunger isn't fair while you can't eat
// Actually, it is since you can detransform any time you like -- bwr
if (you.attribute[ATTR_TRANSFORMATION] == TRAN_AIR)
***************
*** 738,745 ****
--- 757,771 ----
hunger -= 2 * player_equip( EQ_RINGS, RING_SUSTENANCE );
// weapon ego types
+ 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
);
+ }
// troll leather armour
hunger += player_equip( EQ_BODY_ARMOUR, ARM_TROLL_LEATHER_ARMOUR );
***************
*** 802,807 ****
--- 828,834 ----
case SP_GREY_ELF:
case SP_SLUDGE_ELF:
case SP_MOUNTAIN_DWARF:
+ case SP_VAMPIRE:
rm = you.experience_level * 4;
break;
case SP_NAGA:
***************
*** 1167,1172 ****
--- 1194,1209 ----
if (you.experience_level >= 26)
sd++;
}
+ else if (you.species == SP_VAMPIRE)
+ {
+ // Vampires get bonus only when not hungry
+ if (you.experience_level >= 13 && you.hunger_state > HS_HUNGRY)
+ {
+ sd++;
+ if (you.experience_level >= 26)
+ sd++;
+ }
+ }
// transformations:
if (you.attribute[ATTR_TRANSFORMATION] == TRAN_LICH)
***************
*** 1319,1325 ****
// armour: (checks body armour only)
pl += player_equip_ego_type( EQ_ALL_ARMOUR, SPARM_POSITIVE_ENERGY );
! if (you.is_undead)
pl += 3;
switch (you.attribute[ATTR_TRANSFORMATION])
--- 1356,1366 ----
// 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;
! }
! else if (you.is_undead && you.species != SP_VAMPIRE)
pl += 3;
switch (you.attribute[ATTR_TRANSFORMATION])
***************
*** 1399,1404 ****
--- 1440,1447 ----
/* transformations */
if (you.attribute[ATTR_TRANSFORMATION] == TRAN_SPIDER)
mv = 8;
+ else if (you.attribute[ATTR_TRANSFORMATION] == TRAN_BAT)
+ mv = 5;
/* armour */
if (player_equip_ego_type( EQ_BOOTS, SPARM_RUNNING ))
***************
*** 2003,2008 ****
--- 2046,2055 ----
ev += 3;
break;
+ case TRAN_BAT:
+ ev += 20 + (you.experience_level - 10);
+ break;
+
case TRAN_AIR:
ev += 20;
break;
***************
*** 2096,2101 ****
--- 2143,2152 ----
/* 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];
***************
*** 2463,2468 ****
--- 2514,2531 ----
}
break;
+ case SP_VAMPIRE:
+ if (you.experience_level == 3)
+ {
+ mpr( "You can now transform into a bat",
+ MSGCH_INTRINSIC_GAIN );
+ }
+ else if (you.experience_level == 13 || you.experience_level ==
26)
+ {
+ mpr( "You feel more in touch with the powers of death.",
+ MSGCH_INTRINSIC_GAIN );
+ }
+ break;
case SP_NAGA:
// lower because of HD raise -- bwr
// if (you.experience_level < 14)
***************
*** 2856,2862 ****
stealth += (you.skills[SK_STEALTH] * 12);
else
{
! switch (you.species)
{
case SP_TROLL:
case SP_OGRE:
--- 2919,2925 ----
ste...
[truncated message content] |