From e87dea4ec73e18578f93d82434660af8d2135904 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Thu, 6 Mar 2008 14:30:42 +0000 Subject: Tweak Vampires, part I Better stats and aptitudes as suggested in David's post "The plan" Minor modifications to starving/hungry/full messages. Generally change Hungry to Thirsty, and Engorged to Alive. For now, the rest remains as for the other species. Yes, this is nowhere near as radical as David'd suggestions as those are confusing me immenseley, and I just can't code that way. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3526 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/delay.cc | 9 ++++----- crawl-ref/source/food.cc | 18 ++++++++++++----- crawl-ref/source/newgame.cc | 2 +- crawl-ref/source/output.cc | 49 +++++++++++++++++++++++++++------------------ crawl-ref/source/player.cc | 40 +++++++++++++++++++++++++----------- crawl-ref/source/skills2.cc | 32 ++++++++++++++--------------- 6 files changed, 92 insertions(+), 58 deletions(-) diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc index bccac34824..46f8901537 100644 --- a/crawl-ref/source/delay.cc +++ b/crawl-ref/source/delay.cc @@ -695,7 +695,8 @@ void handle_delay( void ) items_for_multidrop.erase( items_for_multidrop.begin() ); break; case DELAY_EAT: - mpr("You continue eating.", MSGCH_MULTITURN_ACTION); + mprf(MSGCH_MULTITURN_ACTION, "You continue %sing.", + you.species == SP_VAMPIRE ? "drink" : "eat"); break; default: break; @@ -776,10 +777,8 @@ static void finish_delay(const delay_queue_item &delay) break; } case DELAY_EAT: - if (you.species == SP_VAMPIRE) - mpr( "You finish drinking." ); - else - mpr( "You finish eating." ); + mprf("You finish %sing.", + you.species == SP_VAMPIRE ? "drink" : "eat"); // For chunks, warn the player if they're not getting much // nutrition. if (delay.parm1) diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc index da11ab593a..294eb27e45 100644 --- a/crawl-ref/source/food.cc +++ b/crawl-ref/source/food.cc @@ -590,6 +590,14 @@ bool eat_food(bool run_hook, int slot) * * ************************************************** */ +static std::string how_hungry() +{ + if (you.hunger_state > HS_SATIATED) + return ("full"); + else if (you.species == SP_VAMPIRE) + return ("thirsty"); + return ("hungry"); +} static bool food_change(bool suppress_message) { @@ -638,11 +646,11 @@ static bool food_change(bool suppress_message) learned_something_new(TUT_YOU_HUNGRY); break; case HS_VERY_HUNGRY: - mpr("You are feeling very hungry.", MSGCH_FOOD); + mprf(MSGCH_FOOD, "You are feeling very %s.", how_hungry().c_str()); learned_something_new(TUT_YOU_HUNGRY); break; case HS_HUNGRY: - mpr("You are feeling hungry.", MSGCH_FOOD); + mprf(MSGCH_FOOD, "You are feeling %s.", how_hungry().c_str()); learned_something_new(TUT_YOU_HUNGRY); break; default: @@ -677,7 +685,8 @@ static void describe_food_change(int food_increment) else msg += "less "; - msg += ((you.hunger_state > HS_SATIATED) ? "full." : "hungry."); + msg += how_hungry().c_str(); + msg += "."; mpr(msg.c_str()); } // end describe_food_change() @@ -959,8 +968,7 @@ static void eat_chunk( int chunk_effect, bool cannibal, int mon_intel ) (chunk_effect == CE_ROTTEN) ? "rotting " : ""); if (you.species == SP_GHOUL) - heal_from_food(hp_amt, 0, !one_chance_in(4), - one_chance_in(5)); + heal_from_food(hp_amt, 0, !one_chance_in(4), one_chance_in(5)); do_eat = true; } diff --git a/crawl-ref/source/newgame.cc b/crawl-ref/source/newgame.cc index 4ce2d0ad6c..f4fc30c287 100644 --- a/crawl-ref/source/newgame.cc +++ b/crawl-ref/source/newgame.cc @@ -2152,7 +2152,7 @@ static void species_stat_init(species_type which_species) 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_VAMPIRE: sb = 5; ib = 8; db = 7; break; // 20 case SP_RED_DRACONIAN: case SP_WHITE_DRACONIAN: diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc index e446bbdb83..c9329fe18c 100644 --- a/crawl-ref/source/output.cc +++ b/crawl-ref/source/output.cc @@ -189,6 +189,32 @@ static int count_digits(int val) } #endif +static std::string describe_hunger() +{ + bool vamp = (you.species == SP_VAMPIRE); + + switch (you.hunger_state) + { + case HS_ENGORGED: + return (vamp? "Alive" : "Engorged"); + case HS_VERY_FULL: + return ("Very Full"); + case HS_FULL: + return ("Full"); + case HS_SATIATED: // normal + return (""); + case HS_HUNGRY: + return (vamp? "Thirsty" : "Hungry"); + case HS_VERY_HUNGRY: + return (vamp? "Very Thirsty" : "Very Hungry"); + case HS_NEAR_STARVING: + return ("Near Starving"); + case HS_STARVING: + default: + return ("Starving"); + } +} + void print_stats(void) { textcolor(LIGHTGREY); @@ -528,42 +554,27 @@ void print_stats(void) { case HS_ENGORGED: textcolor( LIGHTGREEN ); - cprintf( "Engorged" ); break; case HS_VERY_FULL: - textcolor( GREEN ); - cprintf( "Very Full" ); - break; - case HS_FULL: - textcolor( GREEN ); - cprintf( "Full" ); - break; - case HS_SATIATED: + textcolor( GREEN ); break; case HS_HUNGRY: - textcolor( YELLOW ); - cprintf( "Hungry" ); - break; - case HS_VERY_HUNGRY: - textcolor( YELLOW ); - cprintf( "Very Hungry" ); - break; - case HS_NEAR_STARVING: textcolor( YELLOW ); - cprintf( "Near Starving" ); break; case HS_STARVING: textcolor( RED ); - cprintf( "Starving" ); break; } + const std::string state = describe_hunger(); + if (!state.empty()) + cprintf(state.c_str()); textcolor( LIGHTGREY ); diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index e38d6bcb75..ef449f2227 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -907,16 +907,23 @@ int player_regen(void) // healing depending on satiation if (you.species == SP_VAMPIRE) { - if (you.hunger_state <= HS_STARVING) - return 0; // no regeneration for starving vampires - else if (you.hunger_state <= HS_HUNGRY) + switch (you.hunger_state) + { + case HS_STARVING: + if (you.attribute[ATTR_TRANSFORMATION] != TRAN_BAT) + return (0); // no regeneration for starving vampires! + // intentional fall-through for bat form + case HS_NEAR_STARVING: + case HS_VERY_HUNGRY: + case HS_HUNGRY: return (rr / 2); - else if (you.hunger_state >= HS_FULL) + case HS_SATIATED: + return (rr); + case HS_FULL: + case HS_VERY_FULL: return (rr + 20); - else if (you.attribute[ATTR_TRANSFORMATION] == TRAN_BAT - || you.hunger_state > HS_HUNGRY) - { - return rr; + case HS_ENGORGED: + return (rr + 40); } } @@ -2785,8 +2792,8 @@ void level_change(bool skip_ability_increase) if (!(you.experience_level % 3)) { modify_stat( (coinflip() ? STAT_INTELLIGENCE - : STAT_DEXTERITY), 1, false, - "level gain"); + : STAT_DEXTERITY), 1, false, + "level gain"); } break; @@ -2800,7 +2807,7 @@ void level_change(bool skip_ability_increase) if (!(you.experience_level % 4)) { modify_stat( (coinflip() ? STAT_INTELLIGENCE - : STAT_DEXTERITY), 1, false, + : STAT_DEXTERITY), 1, false, "level gain"); } @@ -3631,8 +3638,17 @@ void display_char_status() " faster than usual." : ".") ); } - if (you.disease || you.species == SP_VAMPIRE && you.hunger_state < HS_HUNGRY) + 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 ); diff --git a/crawl-ref/source/skills2.cc b/crawl-ref/source/skills2.cc index 9762a03e33..b339e762ed 100644 --- a/crawl-ref/source/skills2.cc +++ b/crawl-ref/source/skills2.cc @@ -1549,8 +1549,8 @@ const int spec_skills[ NUM_SPECIES ][40] = { // SP_VAMPIRE (38) 110, // SK_FIGHTING - 100, // SK_SHORT_BLADES - 110, // SK_LONG_BLADES + 90, // SK_SHORT_BLADES + 100, // SK_LONG_BLADES 110, // SK_UNUSED_1 110, // SK_AXES 140, // SK_MACES_FLAILS @@ -1562,11 +1562,11 @@ const int spec_skills[ NUM_SPECIES ][40] = 140, // SK_DARTS 140, // SK_THROWING 140, // SK_ARMOUR - 110, // SK_DODGING + 90, // SK_DODGING 50, // SK_STEALTH - 100, // SK_STABBING - 140, // SK_SHIELDS - 110, // SK_TRAPS_DOORS + 90, // SK_STABBING + 110, // SK_SHIELDS + 100, // SK_TRAPS_DOORS 90, // SK_UNARMED_COMBAT 140, // undefined 140, // undefined @@ -1575,19 +1575,19 @@ const int spec_skills[ NUM_SPECIES ][40] = 140, // undefined (100 * 130)/100, // SK_SPELLCASTING 160, // SK_CONJURATIONS - 140, // SK_ENCHANTMENTS + 90, // SK_ENCHANTMENTS 100, // SK_SUMMONINGS - 100, // SK_NECROMANCY + 90, // SK_NECROMANCY 140, // SK_TRANSLOCATIONS - 120, // SK_TRANSMIGRATION - 140, // SK_DIVINATIONS + 90, // SK_TRANSMIGRATION + 120, // 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 + 100, // SK_ICE_MAGIC + 100, // SK_AIR_MAGIC + 120, // SK_EARTH_MAGIC + 120, // SK_POISON_MAGIC + (160 * 75)/100, // SK_INVOCATIONS + (120 * 75)/100, // SK_EVOCATIONS }, // SP_HILL_DWARF placeholder. -- cgit v1.2.3-54-g00ecf