diff options
-rw-r--r-- | crawl-ref/source/fight.cc | 3 | ||||
-rw-r--r-- | crawl-ref/source/food.cc | 25 | ||||
-rw-r--r-- | crawl-ref/source/newgame.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/player.cc | 90 |
4 files changed, 93 insertions, 27 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index 99ca63105f..551073571e 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -2036,7 +2036,8 @@ bool melee_attack::apply_damage_brand() // don't drink poisonous or mutagenic blood if (mons_has_blood(def->type) - && (chunk_type == CE_CLEAN || chunk_type == CE_CONTAMINATED)) + && (chunk_type == CE_CLEAN || chunk_type == CE_CONTAMINATED + || chunk_type == CE_POISONOUS && player_res_poison() )) { mprf( "You draw %s's blood!", def->name(DESC_NOCAP_THE, true).c_str() ); diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc index 3c72dbb878..325bff34e8 100644 --- a/crawl-ref/source/food.cc +++ b/crawl-ref/source/food.cc @@ -1512,7 +1512,7 @@ static int determine_chunk_effect(int which_chunk_type, bool rotten_chunk) case CE_POISONOUS: if (you.attribute[ATTR_TRANSFORMATION] == TRAN_LICH - || player_res_poison() > 0 && you.species != SP_VAMPIRE) + || player_res_poison() > 0) { this_chunk_effect = CE_CLEAN; } @@ -1682,18 +1682,33 @@ static bool vampire_consume_corpse(const int mons_type, const int max_chunks, break; case CE_CONTAMINATED: food_value = mass / (random2(3) + 1); - mpr( "Somehow that blood was not very filling!" ); + mpr( "Somehow this blood was not very filling!" ); break; case CE_POISONOUS: - food_value = random2(mass) - mass/2; - mpr( "Blech - that blood tastes nasty!" ); + food_value = -random2(mass/2); + mpr( "Blech - this blood tastes nasty!" ); + if (poison_player( 3 + random2(4) )) + xom_is_stimulated(random2(128)); break; case CE_MUTAGEN_RANDOM: food_value = random2(mass); - mpr( "That blood tastes really weird!" ); + mpr( "This blood tastes really weird!" ); mutate(RANDOM_MUTATION); + did_god_conduct( DID_DELIBERATE_MUTATING, 10); xom_is_stimulated(100); break; + case CE_MUTAGEN_BAD: + food_value = random2(mass/2); + mpr("This blood tastes *really* weird."); + give_bad_mutation(); + did_god_conduct( DID_DELIBERATE_MUTATING, 10); + xom_is_stimulated(random2(200)); + break; + case CE_HCL: + rot_player( 10 + random2(10) ); + if (disease_player( 50 + random2(100) )) + xom_is_stimulated(random2(100)); + break; } } did_god_conduct(DID_DRINK_BLOOD, 8); diff --git a/crawl-ref/source/newgame.cc b/crawl-ref/source/newgame.cc index f24ab8173b..734e62c926 100644 --- a/crawl-ref/source/newgame.cc +++ b/crawl-ref/source/newgame.cc @@ -2318,8 +2318,6 @@ static void give_basic_mutations(species_type speci) you.mutation[MUT_FANGS] = 3; you.mutation[MUT_SLOW_METABOLISM] = 1; you.mutation[MUT_ACUTE_VISION] = 1; - // This needs to be changed! - you.mutation[MUT_POISON_RESISTANCE] = 1; break; default: break; diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 4efee38c60..88f58592ef 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -971,9 +971,9 @@ int player_regen(void) return (rr); case HS_FULL: case HS_VERY_FULL: - return (rr + 20); + return (rr + 10); case HS_ENGORGED: - return (rr + 40); + return (rr + 20); } } @@ -1420,6 +1420,10 @@ int player_res_poison(bool calc_unid, bool temp) { int rp = 0; + // only thirsty vampires are naturally poison resistant + if (you.species == SP_VAMPIRE && you.hunger_state <= HS_HUNGRY) + rp++; + /* rings of poison resistance */ rp += player_equip( EQ_RINGS, RING_POISON_RESISTANCE, calc_unid ); @@ -3153,7 +3157,7 @@ void level_change(bool skip_ability_increase) redraw_screen(); } - if (you.experience_level == 18) + if (you.experience_level == 14) { switch (you.species) { @@ -3163,13 +3167,15 @@ void level_change(bool skip_ability_increase) case SP_WHITE_DRACONIAN: perma_mutate(MUT_COLD_RESISTANCE, 1); break; - case SP_BLACK_DRACONIAN: - perma_mutate(MUT_SHOCK_RESISTANCE, 1); - break; default: break; } } + else if (you.species == SP_BLACK_DRACONIAN + && you.experience_level == 18) + { + perma_mutate(MUT_SHOCK_RESISTANCE, 1); + } if (!(you.experience_level % 3)) hp_adjust++; @@ -3581,6 +3587,60 @@ void display_char_status() mpr( "You are standing in death's doorway." ); else mpr( "You are alive." ); + + if (you.species == SP_VAMPIRE) + { + std::string msg = "At your current hunger state you "; + std::vector<std::string> attrib; + + switch (you.hunger_state) + { + case HS_STARVING: + attrib.push_back("resist poison"); + attrib.push_back("are susceptible to fire"); + attrib.push_back("significantly resist cold"); + attrib.push_back("strongly resist negative energy"); + attrib.push_back("resist torment"); + if (you.experience_level >= 13) + attrib.push_back("are in touch with the powers of death"); + attrib.push_back("do not heal!"); + break; + case HS_NEAR_STARVING: + attrib.push_back("resist poison"); + attrib.push_back("significantly resist cold"); + attrib.push_back("strongly resist negative energy"); + if (you.experience_level >= 13) + attrib.push_back("are in touch with the powers of death"); + attrib.push_back("heal slowly!"); + break; + case HS_HUNGRY: + case HS_VERY_HUNGRY: + attrib.push_back("resist poison"); + attrib.push_back("resist cold"); + attrib.push_back("significantly resist negative energy"); + if (you.experience_level >= 13) + attrib.push_back("are in touch with the powers of death"); + attrib.push_back("heal slowly!"); + break; + case HS_SATIATED: + attrib.push_back("resist negative energy."); + break; + case HS_FULL: + case HS_VERY_FULL: + attrib.push_back("heal quickly."); + break; + case HS_ENGORGED: + attrib.push_back("heal extremely quickly."); + break; + } + + if (!attrib.empty()) + { + msg += comma_separated_line(attrib.begin(), attrib.end(), + ", and ", ", "); + mpr(msg.c_str()); + } + } switch (you.attribute[ATTR_TRANSFORMATION]) { @@ -3644,19 +3704,10 @@ void display_char_status() mpr( "You are praying." ); if (you.disease && !you.duration[DUR_REGENERATION] - || you.species == SP_VAMPIRE && you.hunger_state <= HS_STARVING) + && (you.species != SP_VAMPIRE || you.hunger_state > HS_STARVING)) { mpr("You do not heal."); } - else if (you.species == SP_VAMPIRE) - { - if (you.hunger_state <= HS_HUNGRY) - mpr("You heal slowly."); - else if (you.hunger_state == HS_ENGORGED) - mpr("You heal very quickly."); - else if (you.hunger_state >= HS_FULL) - mpr("You heal quickly."); - } if (you.duration[DUR_REGENERATION] && (you.species != SP_VAMPIRE || you.hunger_state > HS_STARVING)) @@ -4998,7 +5049,8 @@ bool rot_player( int amount ) if (amount <= 0) return false; - if (you.is_undead) + if (you.is_undead + && (you.species != SP_VAMPIRE || you.hunger_state <= HS_HUNGRY)) { mpr( "You feel terrible." ); return false; @@ -5648,9 +5700,9 @@ int player::damage_brand(int) case TRAN_BAT: if (you.species == SP_VAMPIRE && one_chance_in(5)) - { ret = SPWPN_VAMPIRICISM; - } // else fall through + break; + default: break; } |