diff options
-rw-r--r-- | crawl-ref/source/abl-show.cc | 18 | ||||
-rw-r--r-- | crawl-ref/source/food.cc | 21 | ||||
-rw-r--r-- | crawl-ref/source/item_use.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/mutation.cc | 19 | ||||
-rw-r--r-- | crawl-ref/source/newgame.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/output.cc | 43 | ||||
-rw-r--r-- | crawl-ref/source/player.cc | 77 |
7 files changed, 113 insertions, 69 deletions
diff --git a/crawl-ref/source/abl-show.cc b/crawl-ref/source/abl-show.cc index 4b25ad308f..61c87c46a8 100644 --- a/crawl-ref/source/abl-show.cc +++ b/crawl-ref/source/abl-show.cc @@ -825,10 +825,16 @@ bool activate_ability() std::vector<talent> talents = your_talents(false); if ( talents.empty() ) { - mpr("Sorry, you're not good enough to have a special ability."); + // Vampires can't turn into bats when full to the rim with blood. + if (you.species == SP_VAMPIRE && you.experience_level >= 3) + mpr("Sorry, you're too full to transform right now."); + else + mpr("Sorry, you're not good enough to have a special ability."); + crawl_state.zero_turns_taken(); return false; } + if ( you.duration[DUR_CONF] ) { talents = your_talents(true); @@ -900,6 +906,7 @@ static bool activate_talent(const talent& tal) case ABIL_END_TRANSFORMATION: case ABIL_DELAYED_FIREBALL: case ABIL_MUMMY_RESTORATION: + case ABIL_TRAN_BAT: hungerCheck = false; break; default: @@ -1991,15 +1998,16 @@ std::vector<talent> your_talents( bool check_confused ) (you.species == SP_BLACK_DRACONIAN) ? ABIL_BREATHE_LIGHTNING : (you.species == SP_PURPLE_DRACONIAN) ? ABIL_BREATHE_POWER : (you.species == SP_PALE_DRACONIAN) ? ABIL_BREATHE_STEAM : - (you.species == SP_MOTTLED_DRACONIAN)? ABIL_BREATHE_STICKY_FLAME: - ABIL_NON_ABILITY); + (you.species == SP_MOTTLED_DRACONIAN)? ABIL_BREATHE_STICKY_FLAME + : ABIL_NON_ABILITY); if (ability != ABIL_NON_ABILITY) add_talent(talents, ability, check_confused ); } } - if (you.species == SP_VAMPIRE && you.experience_level >= 3 && - you.attribute[ATTR_TRANSFORMATION] != TRAN_BAT) + if (you.species == SP_VAMPIRE && you.experience_level >= 3 + && you.hunger_state < HS_ENGORGED + && you.attribute[ATTR_TRANSFORMATION] != TRAN_BAT) { add_talent(talents, ABIL_TRAN_BAT, check_confused ); } diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc index b9850752ab..4230529edd 100644 --- a/crawl-ref/source/food.cc +++ b/crawl-ref/source/food.cc @@ -569,7 +569,8 @@ bool eat_food(bool run_hook, int slot) if (you.hunger >= 11000) { - mpr("You're too full to eat anything."); + mprf("You're too full to %s anything.", + you.species == SP_VAMPIRE ? "drain" : "eat"); crawl_state.zero_turns_taken(); return (false); } @@ -641,18 +642,32 @@ static bool food_change(bool suppress_message) if (newstate < HS_SATIATED) interrupt_activity( AI_HUNGRY ); + else if (newstate == HS_ENGORGED && you.species == SP_VAMPIRE + && you.attribute[ATTR_TRANSFORMATION] == TRAN_BAT + && you.duration[DUR_TRANSFORMATION] > 2) + { + mpr("Your bloodfilled body can't sustain your transformation much longer.", + MSGCH_WARN); + you.duration[DUR_TRANSFORMATION] = 2; + } if (suppress_message == false) { switch (you.hunger_state) { case HS_STARVING: - mpr("You are starving!", MSGCH_FOOD); + if (you.species == SP_VAMPIRE) + mpr("You feel devoid of blood!"); + else + mpr("You are starving!", MSGCH_FOOD); learned_something_new(TUT_YOU_STARVING); you.check_awaken(500); break; case HS_NEAR_STARVING: - mpr("You are near starving.", MSGCH_FOOD); + if (you.species == SP_VAMPIRE) + mpr("You feel almost devoid of blood!"); + else + mpr("You are near starving.", MSGCH_FOOD); learned_something_new(TUT_YOU_HUNGRY); break; case HS_VERY_HUNGRY: diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index 3545cd8f65..7845bcd483 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -1292,7 +1292,7 @@ quiver_type get_quiver_type() static bool Hack_Ignore_F_Inscription = false; // only for "why can't I fire" feedback static void _get_fire_order(std::vector<int>& fire_order) { - for (unsigned int i_inv=Options.fire_items_start; i_inv<ENDOFPACK; i_inv++) + for (int i_inv=Options.fire_items_start; i_inv<ENDOFPACK; i_inv++) { const item_def& item = you.inv[i_inv]; if (!is_valid_item(item)) diff --git a/crawl-ref/source/mutation.cc b/crawl-ref/source/mutation.cc index 35f3c22a78..47353ebca3 100644 --- a/crawl-ref/source/mutation.cc +++ b/crawl-ref/source/mutation.cc @@ -1196,21 +1196,22 @@ formatted_string describe_mutations() break; case SP_VAMPIRE: - if (you.hunger_state >= HS_SATIATED) + if (you.hunger_state < HS_SATIATED) { - result += "<green>"; - result += "You are"; - result += (you.experience_level > 25) ? - " strongly" : ""; - result += " in touch with the powers of death." EOL; - result += "You are quite resistant to negative energy." EOL; - result += "You can see invisible." EOL; - result += "</green>"; + if (you.experience_level >= 13) + { + result += "<green>"; + result += "You are"; + result += " in touch with the powers of death." EOL; + result += "</green>"; + } } if (you.hunger_state <= HS_STARVING) result += "<green>You do not heal.</green>" EOL; else if (you.hunger_state <= HS_HUNGRY) result += "<green>You heal slowly.</green>" EOL; + else if (you.hunger_state >= HS_ENGORGED) + result += "<green>Your natural rate of healing is extremely fast.</green>" EOL; else if (you.hunger_state >= HS_FULL) result += "<green>Your natural rate of healing is unusually fast.</green>" EOL; have_any = true; diff --git a/crawl-ref/source/newgame.cc b/crawl-ref/source/newgame.cc index a64d25eca1..9adc168062 100644 --- a/crawl-ref/source/newgame.cc +++ b/crawl-ref/source/newgame.cc @@ -2296,6 +2296,8 @@ static void give_basic_mutations(species_type speci) case SP_VAMPIRE: 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: diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc index c9329fe18c..f9e4e62326 100644 --- a/crawl-ref/source/output.cc +++ b/crawl-ref/source/output.cc @@ -208,10 +208,10 @@ static std::string describe_hunger() case HS_VERY_HUNGRY: return (vamp? "Very Thirsty" : "Very Hungry"); case HS_NEAR_STARVING: - return ("Near Starving"); + return (vamp? "Near Bloodless" : "Near Starving"); case HS_STARVING: default: - return ("Starving"); + return (vamp? "Bloodless" : "Starving"); } } @@ -1525,14 +1525,29 @@ std::string status_mut_abilities() if (you.duration[DUR_PRAYER]) text += "praying, "; - if (you.duration[DUR_REGENERATION] - && (you.species != SP_VAMPIRE || you.hunger_state >= HS_HUNGRY) - || you.species == SP_VAMPIRE && you.hunger_state >= HS_FULL) + if (you.disease && !you.duration[DUR_REGENERATION] + || you.species == SP_VAMPIRE && you.hunger_state <= HS_STARVING) + { + text += "non-regenerating, "; + } + else if (you.duration[DUR_REGENERATION] + || you.species == SP_VAMPIRE && you.hunger_state != HS_SATIATED) { if (you.disease) - text += "recuperating, "; + text += "recuperating"; else - text += "regenerating, "; + text += "regenerating"; + + if (you.species == SP_VAMPIRE && you.hunger_state != HS_SATIATED) + { + if (you.hunger_state <= HS_HUNGRY) + text += " slowly"; + else if (you.hunger_state == HS_ENGORGED) + text += " very quickly"; + else if (you.hunger_state >= HS_FULL) + text += " quickly"; + } + text += ", "; } // not used as resistance part already says so @@ -1647,12 +1662,6 @@ std::string status_mut_abilities() else if (!you.duration[DUR_HASTE] && you.duration[DUR_SWIFTNESS]) text += "swift, "; - if (you.disease - || you.species == SP_VAMPIRE && you.hunger_state < HS_HUNGRY) - { - text += "non-regenerating, "; - } - if (you.attribute[ATTR_HELD]) text += "held, "; @@ -1717,7 +1726,7 @@ std::string status_mut_abilities() text += "\nYou are a cloud of diffuse gas."; break; } - +/* const int to_hit = calc_your_to_hit( false ) * 2; snprintf( info, INFO_SIZE, @@ -1733,7 +1742,7 @@ std::string status_mut_abilities() (to_hit < 100) ? "You feel comfortable with your ability to fight" : "You feel confident with your ability to fight" ); text += info; - +*/ if (you.duration[DUR_DEATHS_DOOR]) text += "\nYou are standing in death's doorway."; @@ -1777,6 +1786,10 @@ std::string status_mut_abilities() have_any = true; break; + case SP_VAMPIRE: + if (you.experience_level < 13 || you.hunger_state > HS_HUNGRY) + break; + // else fall-through case SP_MUMMY: text += "in touch with death"; diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index aebac973fe..f4cf3381bc 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -1435,13 +1435,9 @@ int player_spec_death() } else if (you.species == SP_VAMPIRE) { - // Vampires get bonus only when not hungry - if (you.experience_level >= 13 && you.hunger_state > HS_HUNGRY) - { + // Vampires get bonus only when hungry + if (you.experience_level >= 13 && you.hunger_state <= HS_HUNGRY) sd++; - if (you.experience_level >= 26) - sd++; - } } // transformations: @@ -2395,10 +2391,6 @@ 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) */ @@ -2938,13 +2930,22 @@ void level_change(bool skip_ability_increase) case SP_VAMPIRE: if (you.experience_level == 3) { - mpr( "You can now transform into a vampire bat.", - MSGCH_INTRINSIC_GAIN ); + if (you.hunger_state == HS_ENGORGED) + { + mpr( "If you weren't so full you could now transform " + "into a vampire bat.", MSGCH_INTRINSIC_GAIN ); + } + else + { + mpr( "You can now transform into a vampire bat.", + MSGCH_INTRINSIC_GAIN ); + } } - else if (you.experience_level == 13 || you.experience_level == 26) + else if (you.experience_level == 13) { - mpr( "You feel more in touch with the powers of death.", - MSGCH_INTRINSIC_GAIN ); + mprf( MSGCH_INTRINSIC_GAIN, + "You feel %sin touch with the powers of death.", + (you.hunger_state <= HS_HUNGRY ? "" : "strangely ")); } break; case SP_NAGA: @@ -3490,7 +3491,9 @@ static void ability_increase() void display_char_status() { - if (you.is_undead) + if (you.species == SP_VAMPIRE && you.hunger_state == HS_ENGORGED) + mpr( "You feel almost alive." ); + else if (you.is_undead) mpr( "You are undead." ); else if (you.duration[DUR_DEATHS_DOOR]) mpr( "You are standing in death's doorway." ); @@ -3558,16 +3561,30 @@ void display_char_status() if (you.duration[DUR_PRAYER]) mpr( "You are praying." ); + if (you.disease && !you.duration[DUR_REGENERATION] + || 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_HUNGRY) - || you.species == SP_VAMPIRE && you.hunger_state >= HS_FULL) + && (you.species != SP_VAMPIRE || you.hunger_state > HS_STARVING)) { if (you.disease) mpr("You are recuperating from your illness."); else - mpr( "You are regenerating." ); + mpr("You are regenerating."); } - + if (you.duration[DUR_SWIFTNESS]) mpr( "You can move swiftly." ); @@ -3667,18 +3684,6 @@ void display_char_status() " faster than usual." : ".") ); } - if (you.disease || 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_SATIATED) - mpr("You heal quickly."); - } - // prints a contamination message contaminate_player( 0, true ); @@ -3687,7 +3692,7 @@ void display_char_status() mprf("Your hands are glowing %s red.", (you.duration[DUR_CONFUSING_TOUCH] > 40) ? "an extremely bright" : (you.duration[DUR_CONFUSING_TOUCH] > 20) ? "bright" - : "a soft" ); + : "a soft" ); } if (you.duration[DUR_SURE_BLADE]) @@ -3695,7 +3700,7 @@ void display_char_status() mprf("You have a %sbond with your blade.", (you.duration[DUR_SURE_BLADE] > 15) ? "strong " : (you.duration[DUR_SURE_BLADE] > 5) ? "" - : "weak " ); + : "weak " ); } int move_cost = (player_speed() * player_movement_speed()) / 10; @@ -3727,7 +3732,7 @@ void display_char_status() (move_cost == 10) ? "average" : (move_cost < 13) ? "slow" : "very slow" ); - +/* const int to_hit = calc_your_to_hit( false ) * 2; // Messages based largely on percentage chance of missing the // average EV 10 humanoid, and very agile EV 30 (pretty much @@ -3747,7 +3752,7 @@ void display_char_status() (to_hit < 60) ? "Very agile monsters are a bit hard to hit" : (to_hit < 100) ? "You feel comfortable with your ability to fight" : "You feel confident with your ability to fight" ); - +*/ #if DEBUG_DIAGNOSTICS mprf("To-hit: %d", to_hit); #endif |