From 42acab0b7d5738062a3d4efc83002d9ad890381f Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Mon, 16 Jun 2008 14:58:51 +0000 Subject: Don't change beam names for tracers. (Fixes 1994978.) Clean up the vampire ability screen a bit. Special case naga bardings of running (according to makeitem.cc they can exist) to be called "naga barding of speedy slithering" instead. Yes, it's a hack, and yes, the name is rather unwieldy, but it makes more sense this way. I hope. :p git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5880 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/beam.cc | 25 ++++++++++++------------- crawl-ref/source/describe.cc | 2 ++ crawl-ref/source/effects.cc | 2 +- crawl-ref/source/itemname.cc | 20 +++++++++++++------- crawl-ref/source/itemprop.cc | 10 +++++----- crawl-ref/source/makeitem.cc | 8 ++++---- crawl-ref/source/mutation.cc | 35 ++++++++++++++++++++--------------- crawl-ref/source/player.cc | 10 +++++----- 8 files changed, 62 insertions(+), 50 deletions(-) diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index 6172e1f1ae..5df920a6e4 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -5098,21 +5098,19 @@ static int _range_used_on_hit(bolt &beam) return (0); } -/* - Takes a bolt and refines it for use in the explosion function. Called - from missile() and beam() in beam.cc. Explosions which do not follow from - beams (eg scrolls of immolation) bypass this function. - */ +// Takes a bolt and refines it for use in the explosion function. Called +// from missile() and beam() in beam.cc. Explosions which do not follow from +// beams (eg scrolls of immolation) bypass this function. static void _explosion1(bolt &pbolt) { int ex_size = 1; // convenience int x = pbolt.target_x; int y = pbolt.target_y; - const char *seeMsg = NULL; + const char *seeMsg = NULL; const char *hearMsg = NULL; - // assume that the player can see/hear the explosion, or + // Assume that the player can see/hear the explosion, or // gets burned by it anyway. :) pbolt.msg_generated = true; @@ -5190,14 +5188,16 @@ static void _explosion1(bolt &pbolt) { seeMsg = "The ball expands into a vile cloud!"; hearMsg = "You hear a gentle \'poof\'."; - pbolt.name = "stinking cloud"; + if (!pbolt.is_tracer) + pbolt.name = "stinking cloud"; } if (pbolt.name == "potion") { seeMsg = "The potion explodes!"; hearMsg = "You hear an explosion!"; - pbolt.name = "cloud"; + if (!pbolt.is_tracer) + pbolt.name = "cloud"; } if (seeMsg == NULL) @@ -5228,12 +5228,11 @@ static void _explosion1(bolt &pbolt) #define MAX_EXPLOSION_RADIUS 9 -// explosion is considered to emanate from beam->target_x, target_y +// explosion() is considered to emanate from beam->target_x, target_y // and has a radius equal to ex_size. The explosion will respect // boundaries like walls, but go through/around statues/idols/etc. - -// for each cell affected by the explosion, affect() is called. - +// +// For each cell affected by the explosion, affect() is called. void explosion( bolt &beam, bool hole_in_the_middle, bool explode_in_wall, bool stop_at_statues, bool stop_at_walls, bool show_more) diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc index 4cf3fe0697..a5115e9c9b 100644 --- a/crawl-ref/source/describe.cc +++ b/crawl-ref/source/describe.cc @@ -1918,6 +1918,8 @@ void describe_item( item_def &item, bool allow_inscribe ) cgotoxy(1, wherey() + 2); inscribe_item(item, false); } + else if (getch() == 0) + getch(); } // There are currently two ways to inscribe an item: diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index 21453bd865..9190e4bf3f 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -1002,7 +1002,7 @@ static int _find_acquirement_subtype(object_class_type class_wanted, type_wanted = (coinflip())? OBJ_RANDOM : static_cast(_random_nonbody_armour_type()); - // some species specific fitting problems + // Some species specific fitting problems. switch (you.species) { case SP_OGRE: diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc index d557138d8e..9fa9e05cc6 100644 --- a/crawl-ref/source/itemname.cc +++ b/crawl-ref/source/itemname.cc @@ -214,11 +214,11 @@ std::string item_def::name(description_level_type descrip, equipped = true; } else if (this->link == you.equip[EQ_CLOAK] - || this->link == you.equip[EQ_HELMET] - || this->link == you.equip[EQ_GLOVES] - || this->link == you.equip[EQ_BOOTS] - || this->link == you.equip[EQ_SHIELD] - || this->link == you.equip[EQ_BODY_ARMOUR]) + || this->link == you.equip[EQ_HELMET] + || this->link == you.equip[EQ_GLOVES] + || this->link == you.equip[EQ_BOOTS] + || this->link == you.equip[EQ_SHIELD] + || this->link == you.equip[EQ_BODY_ARMOUR]) { buff << " (worn)"; equipped = true; @@ -1245,9 +1245,15 @@ std::string item_def::name_aux( description_level_type desc, if (sparm != SPARM_NORMAL) { - if ( !terse ) + if (!terse) buff << " of "; - buff << armour_ego_name(sparm, terse); + + // "naga barding of running" doesn't make any sense, and yes, + // they are possible. + if (sub_type == ARM_NAGA_BARDING && sparm == SPARM_RUNNING) + buff << (terse ? "speed" : "speedy slithering"); + else + buff << armour_ego_name(sparm, terse); } } diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc index 34307c39ea..4cfe2fd891 100644 --- a/crawl-ref/source/itemprop.cc +++ b/crawl-ref/source/itemprop.cc @@ -1295,7 +1295,7 @@ bool check_armour_shape( const item_def &item, bool quiet ) } else { - // Note: some transformation include all of the above as well + // Note: Some transformations include all of the above as well. if (item.sub_type == ARM_NAGA_BARDING || item.sub_type == ARM_CENTAUR_BARDING) { @@ -1573,7 +1573,7 @@ hands_reqd_type hands_reqd( const item_def &item, size_type size ) ret = HANDS_TWO; break; - case OBJ_ARMOUR: // barding and body armours are unwieldy + case OBJ_ARMOUR: // Bardings and body armours are unwieldy. if (item.sub_type == ARM_NAGA_BARDING || item.sub_type == ARM_CENTAUR_BARDING || get_armour_slot( item ) == EQ_BODY_ARMOUR) @@ -2582,7 +2582,7 @@ size_type item_size( const item_def &item ) size = SIZE_SMALL; break; - default: // body armours and bardings + default: // Body armours and bardings. size = SIZE_MEDIUM; break; } @@ -2641,8 +2641,8 @@ bool is_colourful_item( const item_def &item ) bool is_shield(const item_def &item) { - return item.base_type == OBJ_ARMOUR - && get_armour_slot(item) == EQ_SHIELD; + return (item.base_type == OBJ_ARMOUR + && get_armour_slot(item) == EQ_SHIELD); } // Returns true if the given item cannot be wielded with the given shield. diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc index e45f4686de..df03895983 100644 --- a/crawl-ref/source/makeitem.cc +++ b/crawl-ref/source/makeitem.cc @@ -4013,7 +4013,7 @@ void give_armour(monsters *mon, int level) force_colour = WHITE; //mv: always white break; - // centaurs sometimes wear barding + // Centaurs sometimes wear barding. case MONS_CENTAUR: case MONS_CENTAUR_WARRIOR: case MONS_YAKTAUR: @@ -4025,7 +4025,7 @@ void give_armour(monsters *mon, int level) /* mon->type == MONS_YAKTAUR_CAPTAIN ? */ : 200)) { mitm[bp].base_type = OBJ_ARMOUR; - mitm[bp].sub_type = ARM_CENTAUR_BARDING; + mitm[bp].sub_type = ARM_CENTAUR_BARDING; } break; @@ -4040,12 +4040,12 @@ void give_armour(monsters *mon, int level) : 100 )) { mitm[bp].base_type = OBJ_ARMOUR; - mitm[bp].sub_type = ARM_NAGA_BARDING; + mitm[bp].sub_type = ARM_NAGA_BARDING; } else if (mon->type == MONS_GREATER_NAGA || one_chance_in(3)) { mitm[bp].base_type = OBJ_ARMOUR; - mitm[bp].sub_type = ARM_ROBE; + mitm[bp].sub_type = ARM_ROBE; } break; diff --git a/crawl-ref/source/mutation.cc b/crawl-ref/source/mutation.cc index 7b8a24976f..341eff36b7 100644 --- a/crawl-ref/source/mutation.cc +++ b/crawl-ref/source/mutation.cc @@ -1444,37 +1444,42 @@ static void _display_vampire_attributes() std::string result; - const int lines = 13; + const int lines = 14; std::string column[lines][7] = { {" ", "Alive ", "Full ", "Satiated ", "Thirsty ", "Near... ", "Bloodless"}, - //Alive Full Satiated Thirsty Near... Bloodless - {"Metabolism ", "very fast ", "fast ", "fast ", "normal ", "slow ", "none "}, + //Alive Full Satiated Thirsty Near... Bloodless + {"Metabolism ", "very fast ", "fast ", "fast ", "normal ", "slow ", "none "}, - {"Regeneration ", "very fast ", "fast ", "normal ", "normal ", "slow ", "none "}, + {"Regeneration ", "very fast ", "fast ", "normal ", "normal ", "slow ", "none "}, - {"Poison resistance ", " ", " ", " ", " + ", " + ", " + "}, + {"Stealth boost ", "none ", "none ", "none ", "minor ", "major ", "large "}, - {"Cold resistance ", " ", " ", " ", " + ", " + ", " ++ "}, + {"Spell hunger ", "full ", "full ", "full ", "halved ", "none ", "none "}, - {"Negative resistance ", " ", " ", " ", " + ", " ++ ", " +++ "}, + {EOL EOL "Resistances" EOL + "Poison resistance ", " ", " ", " ", " + ", " + ", " + "}, - {"Torment resistance ", " ", " ", " ", " ", " ", " + "}, + {"Cold resistance ", " ", " ", " ", " + ", " + ", " ++ "}, - {"Mutation chance ", "always ", "often ", "sometimes ", "never ", "never ", "never "}, + {"Negative resistance ", " ", " ", " ", " + ", " ++ ", " +++ "}, - {"Non-physical " EOL - "mutation effects ", "full ", "capped ", "capped ", "none ", "none ", "none "}, + {"Torment resistance ", " ", " ", " ", " ", " ", " + "}, + + {EOL EOL "Other effects" EOL + "Mutation chance ", "always ", "often ", "sometimes ", "never ", "never ", "never "}, - {"Potion effects ", "full ", "full ", "full ", "halved ", "halved ", "halved"}, + {"Non-physical " EOL + "mutation effects ", "full ", "capped ", "capped ", "none ", "none ", "none "}, - {"Bat Form ", "no ", "no ", "yes ", "yes ", "yes ", "yes "}, + {"Potion effects ", "full ", "full ", "full ", "halved ", "halved ", "halved"}, - {"Stealth boost ", "none ", "none ", "none ", "minor ", "major ", "large "}, + {"Bat Form ", "no ", "no ", "yes ", "yes ", "yes ", "yes "}, - {"Spell hunger ", "full ", "full ", "full ", "halved ", "none ", "none "} + {"Other transformation " EOL + "or going berserk ", "yes ", "yes ", "no ", "no ", "no ", "no "} }; int current = 0; diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index ddf66e78d1..712ecabde6 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -2009,8 +2009,8 @@ int player_AC(void) AC += item.plus * 100; - // The deformed don't fit into body armour very well - // (this includes nagas and centaurs) + // The deformed don't fit into body armour very well. + // (This includes nagas and centaurs.) if (i == EQ_BODY_ARMOUR && player_mutation_level(MUT_DEFORMED)) AC -= ac_value / 2; } @@ -2281,7 +2281,7 @@ int player_evasion() if (dodge_bonus > max_bonus) dodge_bonus = max_bonus; - // Some lesser armours have small penalties now (shields, barding) + // Some lesser armours have small penalties now (shields, barding). for (int i = EQ_CLOAK; i < EQ_BODY_ARMOUR; i++) { if (you.equip[i] == -1) @@ -2289,7 +2289,7 @@ int player_evasion() int pen = property( you.inv[ you.equip[i] ], PARM_EVASION ); - // reducing penalty of larger shields for larger characters + // Reducing penalty of larger shields for larger characters. if (i == EQ_SHIELD && torso > SIZE_MEDIUM) pen += (torso - SIZE_MEDIUM); @@ -2297,7 +2297,7 @@ int player_evasion() ev += pen; } - // handle main body armour penalty + // Handle main body armour penalty. if (you.equip[EQ_BODY_ARMOUR] != -1) { // XXX: magnify arm_penalty for weak characters? -- cgit v1.2.3-54-g00ecf