From 8a78afdcea14016d0471fe74cc66a943c8fd616a Mon Sep 17 00:00:00 2001 From: Darshan Shaligram Date: Sun, 10 Jan 2010 18:22:58 +0530 Subject: Remove resist slowing, increment tag major version. --- crawl-ref/source/artefact.cc | 5 +---- crawl-ref/source/describe.cc | 1 - crawl-ref/source/exclude.cc | 16 +++------------- crawl-ref/source/goditem.cc | 3 +-- crawl-ref/source/itemname.cc | 1 - crawl-ref/source/itemprop-enum.h | 2 -- crawl-ref/source/l_you.cc | 2 -- crawl-ref/source/main.cc | 22 ++-------------------- crawl-ref/source/output.cc | 7 ++----- crawl-ref/source/player.cc | 38 +++++--------------------------------- crawl-ref/source/shopping.cc | 1 - crawl-ref/source/tags.cc | 40 ++++++++++++++-------------------------- crawl-ref/source/tags.h | 7 ++----- 13 files changed, 30 insertions(+), 115 deletions(-) diff --git a/crawl-ref/source/artefact.cc b/crawl-ref/source/artefact.cc index a8648bf4d2..e0bbedf6d1 100644 --- a/crawl-ref/source/artefact.cc +++ b/crawl-ref/source/artefact.cc @@ -102,11 +102,8 @@ static bool _god_fits_artefact(const god_type which_god, const item_def &item, if (item.base_type == OBJ_WEAPONS && item.sub_type == WPN_QUICK_BLADE) type_bad = true; - if (item.base_type == OBJ_JEWELLERY && (item.sub_type == AMU_RAGE - || item.sub_type == AMU_RESIST_SLOW)) - { + if (item.base_type == OBJ_JEWELLERY && item.sub_type == AMU_RAGE) type_bad = true; - } break; default: diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc index 164c1ff7ba..c00f33a82d 100644 --- a/crawl-ref/source/describe.cc +++ b/crawl-ref/source/describe.cc @@ -144,7 +144,6 @@ const char* jewellery_base_ability_string(int subtype) case RING_FIRE: return "Fire"; case RING_ICE: return "Ice"; case RING_TELEPORT_CONTROL: return "cTele"; - case AMU_RESIST_SLOW: return "rSlow"; case AMU_CLARITY: return "Clar"; case AMU_WARDING: return "Ward"; case AMU_RESIST_CORROSION: return "rCorr"; diff --git a/crawl-ref/source/exclude.cc b/crawl-ref/source/exclude.cc index 79f8860f9d..1d16ac3aa1 100644 --- a/crawl-ref/source/exclude.cc +++ b/crawl-ref/source/exclude.cc @@ -620,19 +620,9 @@ void unmarshallExcludes(reader& inf, char minorVersion, exclude_set &excludes) { coord_def c; unmarshallCoord(inf, c); - const int radius = unmarshallShort(inf); - bool autoexcl = false; - autoexcl = unmarshallBoolean(inf); - std::string desc = ""; - if (minorVersion < TAG_MINOR_EXCLUSION_DESC) - { - monster_type mon = static_cast(unmarshallShort(inf)); - if (mon != MONS_NO_MONSTER) - desc = mons_type_name(mon, DESC_PLAIN); - } - else - desc = unmarshallString(inf); - + const int radius = unmarshallShort(inf); + const bool autoexcl = unmarshallBoolean(inf); + const std::string desc = unmarshallString(inf); excludes.add_exclude(c, radius, autoexcl, desc); } } diff --git a/crawl-ref/source/goditem.cc b/crawl-ref/source/goditem.cc index dbcb130e59..83e83a7b70 100644 --- a/crawl-ref/source/goditem.cc +++ b/crawl-ref/source/goditem.cc @@ -271,8 +271,7 @@ bool is_hasty_item(const item_def& item) retval = (item.sub_type == WAND_HASTING); break; case OBJ_JEWELLERY: - retval = (item.sub_type == AMU_RAGE - || item.sub_type == AMU_RESIST_SLOW); + retval = (item.sub_type == AMU_RAGE); break; case OBJ_POTIONS: retval = (item.sub_type == POT_SPEED diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc index 7e61efcf32..de7df19748 100644 --- a/crawl-ref/source/itemname.cc +++ b/crawl-ref/source/itemname.cc @@ -585,7 +585,6 @@ static const char* jewellery_type_name(int jeweltype) case RING_ICE: return "ring of ice"; case RING_TELEPORT_CONTROL: return "ring of teleport control"; case AMU_RAGE: return "amulet of rage"; - case AMU_RESIST_SLOW: return "amulet of resist slowing"; case AMU_CLARITY: return "amulet of clarity"; case AMU_WARDING: return "amulet of warding"; case AMU_RESIST_CORROSION: return "amulet of resist corrosion"; diff --git a/crawl-ref/source/itemprop-enum.h b/crawl-ref/source/itemprop-enum.h index cc807371a4..d139422610 100644 --- a/crawl-ref/source/itemprop-enum.h +++ b/crawl-ref/source/itemprop-enum.h @@ -178,7 +178,6 @@ enum jewellery_type AMU_FIRST_AMULET = 35, AMU_RAGE = AMU_FIRST_AMULET, // 35 - AMU_RESIST_SLOW, AMU_CLARITY, AMU_WARDING, AMU_RESIST_CORROSION, @@ -574,4 +573,3 @@ enum zap_count_type }; #endif - diff --git a/crawl-ref/source/l_you.cc b/crawl-ref/source/l_you.cc index c43b91f737..9380968be6 100644 --- a/crawl-ref/source/l_you.cc +++ b/crawl-ref/source/l_you.cc @@ -89,7 +89,6 @@ LUARET1(you_res_draining, number, player_prot_life(false)) LUARET1(you_res_shock, number, player_res_electricity(false)) LUARET1(you_res_statdrain, number, player_sust_abil(false)) LUARET1(you_res_mutation, number, wearing_amulet(AMU_RESIST_MUTATION, false)) -LUARET1(you_res_slowing, number, wearing_amulet(AMU_RESIST_SLOW, false)) LUARET1(you_gourmand, boolean, wearing_amulet(AMU_THE_GOURMAND, false)) LUARET1(you_saprovorous, number, player_mutation_level(MUT_SAPROVOROUS)) LUARET1(you_levitating, boolean, you.flight_mode() == FL_LEVITATE) @@ -181,7 +180,6 @@ static const struct luaL_reg you_clib[] = { "res_shock" , you_res_shock }, { "res_statdrain", you_res_statdrain }, { "res_mutation", you_res_mutation }, - { "res_slowing", you_res_slowing }, { "saprovorous", you_saprovorous }, { "gourmand", you_gourmand }, { "levitating", you_levitating }, diff --git a/crawl-ref/source/main.cc b/crawl-ref/source/main.cc index 5a8a06dca9..bd226dc7d8 100644 --- a/crawl-ref/source/main.cc +++ b/crawl-ref/source/main.cc @@ -2503,26 +2503,8 @@ static void _decrement_durations() // slowing, exhaustion still ends haste. if (you.duration[DUR_HASTE] > 0) { - if (wearing_amulet(AMU_RESIST_SLOW)) - { - if (you.duration[DUR_HASTE] > 3 * BASELINE_DELAY) - { - you.set_duration(DUR_HASTE, div_rand_round(2 + coinflip(), 2)); - mpr("Your extra speed is starting to run out.", - MSGCH_DURATION); - } - else - { - mpr("You feel yourself slow down.", MSGCH_DURATION); - you.duration[DUR_HASTE] = 0; - } - did_god_conduct(DID_HASTY, 3, true); - } - else - { - // Silently cancel haste, then slow player. - you.duration[DUR_HASTE] = 0; - } + // Silently cancel haste, then slow player. + you.duration[DUR_HASTE] = 0; } slow_player(dur); } diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc index 419e9ef3cf..7a55f02527 100644 --- a/crawl-ref/source/output.cc +++ b/crawl-ref/source/output.cc @@ -1837,7 +1837,6 @@ static std::vector _get_overview_resistances( || you.religion == GOD_ZIN && you.piety >= 150); const int rrott = (you.res_rotting() || you.religion == GOD_ZIN && you.piety >= 150); - const int rslow = wearing_amulet(AMU_RESIST_SLOW, calc_unid); snprintf(buf, sizeof buf, "%sRes.Fire : %s\n" @@ -1848,8 +1847,7 @@ static std::vector _get_overview_resistances( "%sSpirit.Shd: %s\n" "%sSust.Abil.: %s\n" "%sRes.Mut. : %s\n" - "%sRes.Rott. : %s\n" - "%sRes.Slow : %s\n", + "%sRes.Rott. : %s\n", _determine_colour_string(rfire, 3), itosym3(rfire), _determine_colour_string(rcold, 3), itosym3(rcold), _determine_colour_string(rlife, 3), itosym3(rlife), @@ -1858,8 +1856,7 @@ static std::vector _get_overview_resistances( _determine_colour_string(rspir, 1), itosym1(rspir), _determine_colour_string(rsust, 1), itosym1(rsust), _determine_colour_string(rmuta, 1), itosym1(rmuta), - _determine_colour_string(rrott, 1), itosym1(rrott), - _determine_colour_string(rslow, 1), itosym1(rslow)); + _determine_colour_string(rrott, 1), itosym1(rrott)); cols.add_formatted(0, buf, false); int saplevel = player_mutation_level(MUT_SAPROVOROUS); diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index c2f62c6a35..a8c990a854 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -4986,19 +4986,7 @@ bool slow_player(int turns) turns *= 2; int threshold = 100 * 2; - if (wearing_amulet(AMU_RESIST_SLOW)) - { - mpr("You feel momentarily lethargic."); - - // Identify amulet. - item_def *amulet = you.slot_item(EQ_AMULET); - did_god_conduct(DID_HASTY, 5, !amulet || item_type_known(*amulet)); - if (amulet && !item_type_known(*amulet)) - set_ident_type(*amulet, ID_KNOWN_TYPE); - - return (false); - } - else if (you.duration[DUR_SLOW] >= threshold * BASELINE_DELAY) + if (you.duration[DUR_SLOW] >= threshold * BASELINE_DELAY) mpr("You already are as slow as you could be."); else { @@ -5022,10 +5010,7 @@ void dec_slow_player(int delay) if (you.duration[DUR_SLOW] > BASELINE_DELAY) { // BCR - Amulet of resist slow affects slow counter. - if (wearing_amulet(AMU_RESIST_SLOW)) - you.duration[DUR_SLOW] -= 5 * delay; - else - you.duration[DUR_SLOW] -= delay; + you.duration[DUR_SLOW] -= delay; } if (you.duration[DUR_SLOW] <= BASELINE_DELAY) { @@ -5041,20 +5026,10 @@ void haste_player(int turns) if (turns <= 0) return; - bool amu_eff = wearing_amulet(AMU_RESIST_SLOW); - - if (amu_eff) - { - mpr("Your amulet glows brightly."); - item_def *amulet = you.slot_item(EQ_AMULET); - if (amulet && !item_type_known(*amulet)) - set_ident_type(*amulet, ID_KNOWN_TYPE); - } - // Cutting the nominal turns in half since hasted actions take half the // usual delay. turns /= 2; - int threshold = (80 + 20 * amu_eff) / 2; + const int threshold = 40; if (you.duration[DUR_HASTE] == 0) mpr("You feel yourself speed up."); @@ -5067,7 +5042,6 @@ void haste_player(int turns) } you.increase_duration(DUR_HASTE, turns, threshold); - did_god_conduct(DID_STIMULANTS, 4 + random2(4)); } @@ -5080,9 +5054,7 @@ void dec_haste_player(int delay) { int old_dur = you.duration[DUR_HASTE]; - // BCR - Amulet of resist slow affects haste counter - if (!wearing_amulet(AMU_RESIST_SLOW) || coinflip()) - you.duration[DUR_HASTE] -= delay; + you.duration[DUR_HASTE] -= delay; int threshold = 6 * BASELINE_DELAY; // message if we cross the threshold @@ -6618,7 +6590,7 @@ bool player::confusable() const bool player::slowable() const { - return (!wearing_amulet(AMU_RESIST_SLOW)); + return true; } flight_type player::flight_mode() const diff --git a/crawl-ref/source/shopping.cc b/crawl-ref/source/shopping.cc index 5606ef4428..94cd11e25e 100644 --- a/crawl-ref/source/shopping.cc +++ b/crawl-ref/source/shopping.cc @@ -1798,7 +1798,6 @@ unsigned int item_value( item_def item, bool ident ) case AMU_CLARITY: case AMU_RESIST_CORROSION: case AMU_RESIST_MUTATION: - case AMU_RESIST_SLOW: case AMU_WARDING: valued += 30; break; diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc index 5c5190bccd..3f0ee61f5a 100644 --- a/crawl-ref/source/tags.cc +++ b/crawl-ref/source/tags.cc @@ -1547,18 +1547,9 @@ static void tag_read_you(reader &th, char minorVersion) you.water_in_sight = -1; // List of currently beholding monsters (usually empty). - if (minorVersion >= TAG_MINOR_BEHELD16) - { - count_c = unmarshallShort(th); - for (i = 0; i < count_c; i++) - you.beholders.push_back(unmarshallShort(th)); - } - else - { - count_c = unmarshallByte(th); - for (i = 0; i < count_c; i++) - you.beholders.push_back(unmarshallByte(th)); - } + count_c = unmarshallShort(th); + for (i = 0; i < count_c; i++) + you.beholders.push_back(unmarshallShort(th)); you.piety_hysteresis = unmarshallByte(th); @@ -1655,20 +1646,17 @@ static void tag_read_you_items(reader &th, char minorVersion) for (j = 0; j < count_s; ++j) you.seen_spell[j] = unmarshallByte(th); - if (minorVersion >= TAG_MINOR_SEEN_WEAPONS_ARMOUR) - { - count_s = unmarshallShort(th); - if (count_s > NUM_WEAPONS) - count_s = NUM_WEAPONS; - for (j = 0; j < count_s; ++j) - you.seen_weapon[j] = unmarshallLong(th); - - count_s = unmarshallShort(th); - if (count_s > NUM_ARMOURS) - count_s = NUM_ARMOURS; - for (j = 0; j < count_s; ++j) - you.seen_armour[j] = unmarshallLong(th); - } + count_s = unmarshallShort(th); + if (count_s > NUM_WEAPONS) + count_s = NUM_WEAPONS; + for (j = 0; j < count_s; ++j) + you.seen_weapon[j] = unmarshallLong(th); + + count_s = unmarshallShort(th); + if (count_s > NUM_ARMOURS) + count_s = NUM_ARMOURS; + for (j = 0; j < count_s; ++j) + you.seen_armour[j] = unmarshallLong(th); } static PlaceInfo unmarshallPlaceInfo(reader &th) diff --git a/crawl-ref/source/tags.h b/crawl-ref/source/tags.h index e2559d33fd..e7e42ea717 100644 --- a/crawl-ref/source/tags.h +++ b/crawl-ref/source/tags.h @@ -40,17 +40,14 @@ enum tag_file_type // file types supported by tag system enum tag_major_version { TAG_MAJOR_START = 5, - TAG_MAJOR_VERSION = 15 + TAG_MAJOR_VERSION = 16 }; // Minor version will be reset to zero when major version changes. enum tag_minor_version { TAG_MINOR_RESET = 0, // Minor tags were reset - TAG_MINOR_SEEN_WEAPONS_ARMOUR = 1, - TAG_MINOR_BEHELD16 = 2, // Use correct type sizes for beholders - TAG_MINOR_EXCLUSION_DESC = 3, // Mark exclusion reason in annotation. - TAG_MINOR_VERSION = 3 // Current version. (Keep equal to max.) + TAG_MINOR_VERSION = 0 // Current version. (Keep equal to max.) }; struct enum_info -- cgit v1.2.3-54-g00ecf