Anonymous | Login | 2024-04-26 16:54 CEST |
Main | My View | View Issues | Change Log | Wiki | Tavern | News |
Viewing Issue Advanced Details [ Jump to Notes ] [ Wiki ] | [ View Simple ] [ Issue History ] [ Print ] | ||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||
0008230 | [DCSS] Patches | minor | have not tried | 2014-03-05 05:33 | 2014-03-18 03:32 | ||
Reporter | chris | View Status | public | ||||
Assigned To | Kate | ||||||
Priority | normal | Resolution | done | Local or Remote | Local | ||
Status | closed | Operating System | Other | ||||
Projection | none | Console or Tiles | Both | ||||
ETA | none | Fixed in Branch | 0.14 ancient branch | Product Branch | 0.14 ancient branch | ||
Product Version | |||||||
Summary | 0008230: Remove racial armor | ||||||
Description |
Schedule racial armor ISFLAG_* enums for removal or recycling Remove MAKE_ITEM_* as well Remove some references to racial armor and items Remove remaining `race:` armor specifications from vaults Ignore racial armor in tiles Monsters no longer prefer matching racial armor Simplify some mon-gear code Stop generation of racial armor Racial body armor has no effect on spellcasting Racial armor does not alter players' effective Armour skill No longer reduce item mass of elven armor Remove stealth bonus from elven boots and cloaks Make all armor dwarven for purposes of corrosion resistance |
||||||
Steps To Reproduce | |||||||
Additional Information | |||||||
Tags | No tags attached. | ||||||
Attached Files |
0001-Armor.patch [^] (100,532 bytes) 2014-03-05 08:57 [Show Content] [Hide Content]From 38ac6014e61a96cda33fbc846337ff0089c592fc Mon Sep 17 00:00:00 2001 From: Chris Oelmueller <chris.oelmueller@gmail.com> Date: Wed, 12 Feb 2014 19:26:57 +0100 Subject: Make all armor dwarven for purposes of corrosion resistance That is, reduce the corrosion chance by 80% across the board. Previously this only happened for dwarven armor or CPA. --- crawl-ref/source/describe.cc | 11 ----------- crawl-ref/source/items.cc | 9 ++------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc index a34e018..142ab40 100644 --- a/crawl-ref/source/describe.cc +++ b/crawl-ref/source/describe.cc @@ -761,17 +761,6 @@ static string _corrosion_resistance_string(const item_def &item) return make_stringf(format, "immune"); else if (ench >= 4 && item_ident(item, ISFLAG_KNOW_PLUSES)) return make_stringf(format, "extremely resistant"); - else if (item.base_type == OBJ_ARMOUR - && item.sub_type == ARM_CRYSTAL_PLATE_ARMOUR) - { - return "\nBeing made of crystal renders it very resistant to acidic " - "corrosion."; - } - else if (get_equip_race(item) == ISFLAG_DWARVEN) - { - return "\nBeing of dwarven fabrication renders it very resistant to " - "acidic corrosion."; - } else if (ench >= 3 && item_ident(item, ISFLAG_KNOW_PLUSES)) return make_stringf(format, "resistant"); else if (ench >= 2 && item_ident(item, ISFLAG_KNOW_PLUSES)) diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc index 278033d..ffa623e 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -4105,14 +4105,9 @@ void corrode_item(item_def &item, actor *holder) if (how_rusty < -5) return; - // Corrosion-resistant items. - if (item.base_type == OBJ_ARMOUR - && (item.sub_type == ARM_CRYSTAL_PLATE_ARMOUR - || get_equip_race(item) == ISFLAG_DWARVEN) - && !one_chance_in(5)) - { + // Armour resists corrosion. + if (item.base_type == OBJ_ARMOUR && !one_chance_in(5)) return; - } // determine chance of corrosion {dlb}: const int chance = abs(how_rusty); -- 1.9.0 From 9d8759131d2f8a60d331c5a77ce1fc8d9ec43f34 Mon Sep 17 00:00:00 2001 From: Chris Oelmueller <chris.oelmueller@gmail.com> Date: Wed, 12 Feb 2014 19:32:20 +0100 Subject: Remove stealth bonus from elven boots and cloaks --- crawl-ref/source/artefact.cc | 8 ++------ crawl-ref/source/describe.cc | 2 -- crawl-ref/source/player.cc | 7 ------- 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/crawl-ref/source/artefact.cc b/crawl-ref/source/artefact.cc index e539a94..63d3540 100644 --- a/crawl-ref/source/artefact.cc +++ b/crawl-ref/source/artefact.cc @@ -1076,12 +1076,8 @@ static void _get_randart_properties(const item_def &item, } if (one_chance_in(10) - && (aclass != OBJ_ARMOUR - || atype != ARM_CLOAK - || get_equip_race(item) != ISFLAG_ELVEN) - && (aclass != OBJ_ARMOUR - || atype != ARM_BOOTS - || get_equip_race(item) != ISFLAG_ELVEN) + && (aclass != OBJ_ARMOUR || atype != ARM_CLOAK) + && (aclass != OBJ_ARMOUR || atype != ARM_BOOTS) && get_armour_ego_type(item) != SPARM_STEALTH) { power_level++; diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc index 142ab40..8119c59 100644 --- a/crawl-ref/source/describe.cc +++ b/crawl-ref/source/describe.cc @@ -1352,8 +1352,6 @@ static string _describe_armour(const item_def &item, bool verbose) description += "\nIt is well-crafted and unobstructive"; else description += "\nIt is well-crafted and lightweight"; - if (item.sub_type == ARM_CLOAK || item.sub_type == ARM_BOOTS) - description += ", and helps its wearer avoid being noticed"; description += "."; } diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index a25c934..461f6c9 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -3882,7 +3882,6 @@ int check_stealth(void) stealth /= 3; const item_def *arm = you.slot_item(EQ_BODY_ARMOUR, false); - const item_def *cloak = you.slot_item(EQ_CLOAK, false); const item_def *boots = you.slot_item(EQ_BOOTS, false); if (arm) @@ -3899,9 +3898,6 @@ int check_stealth(void) stealth += you.scan_artefacts(ARTP_STEALTH); - if (cloak && get_equip_race(*cloak) == ISFLAG_ELVEN) - stealth += 20; - if (you.duration[DUR_STEALTH]) stealth += 80; @@ -3925,9 +3921,6 @@ int check_stealth(void) { if (get_armour_ego_type(*boots) == SPARM_STEALTH) stealth += 50; - - if (get_equip_race(*boots) == ISFLAG_ELVEN) - stealth += 20; } else if (player_mutation_level(MUT_HOOVES) > 0) -- 1.9.0 From d431cc5ea809eefd074dd166ae8aee6cafa5cb97 Mon Sep 17 00:00:00 2001 From: Chris Oelmueller <chris.oelmueller@gmail.com> Date: Wed, 12 Feb 2014 19:35:16 +0100 Subject: No longer reduce item mass of elven armor --- crawl-ref/source/describe.cc | 5 +---- crawl-ref/source/itemprop.cc | 9 --------- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc index 8119c59..597be78 100644 --- a/crawl-ref/source/describe.cc +++ b/crawl-ref/source/describe.cc @@ -1349,10 +1349,7 @@ static string _describe_armour(const item_def &item, bool verbose) else if (race == ISFLAG_ELVEN) { if (get_item_slot(item) == EQ_BODY_ARMOUR) - description += "\nIt is well-crafted and unobstructive"; - else - description += "\nIt is well-crafted and lightweight"; - description += "."; + description += "\nIt is well-crafted and unobstructive."; } description += "\nIt fits "; diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc index 6e10387..4ffa270 100644 --- a/crawl-ref/source/itemprop.cc +++ b/crawl-ref/source/itemprop.cc @@ -2589,15 +2589,6 @@ int item_mass(const item_def &item) case OBJ_ARMOUR: unit_mass = Armour_prop[ Armour_index[item.sub_type] ].mass; - - if (get_equip_race(item) == ISFLAG_ELVEN) - { - const int reduc = (unit_mass >= 25) ? unit_mass / 5 : 5; - - // Truncate to the nearest 5 and reduce the item mass: - unit_mass -= ((reduc / 5) * 5); - unit_mass = max(unit_mass, 5); - } break; case OBJ_MISSILES: -- 1.9.0 From 92c5aa12bd361d53cbb4ef6ccaa040f163d7ca5c Mon Sep 17 00:00:00 2001 From: Chris Oelmueller <chris.oelmueller@gmail.com> Date: Wed, 12 Feb 2014 19:45:58 +0100 Subject: Racial armor does not alter players' effective Armour skill For now, give the Beogh bonus to all worshippers but reduce it a bit. --- crawl-ref/source/player.cc | 40 +++++++++++----------------------------- 1 file changed, 11 insertions(+), 29 deletions(-) diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 461f6c9..1becb53 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -2408,38 +2408,20 @@ static int _player_armour_racial_bonus(const item_def& item) return 0; int racial_bonus = 0; - const iflags_t armour_race = get_equip_race(item); - const iflags_t racial_type = get_species_race(you.species); - // Dwarven armour is universally good -- bwr - if (armour_race == ISFLAG_DWARVEN) - racial_bonus += 4; - - if (racial_type && armour_race == racial_type) + // an additional bonus for Beogh worshippers + if (you_worship(GOD_BEOGH) && !player_under_penance()) { - // Elven armour is light, but still gives one level to elves. - // Orcish and Dwarven armour are worth +2 to the correct - // species, plus the plus that anyone gets with dwarven armour. - // -- bwr - if (racial_type == ISFLAG_ELVEN) - racial_bonus += 2; + if (you.piety >= piety_breakpoint(5)) + racial_bonus = 10; + else if (you.piety >= piety_breakpoint(4)) + racial_bonus = 8; + else if (you.piety >= piety_breakpoint(2)) + racial_bonus = 6; + else if (you.piety >= piety_breakpoint(0)) + racial_bonus = 4; else - racial_bonus += 4; - - // an additional bonus for Beogh worshippers - if (you_worship(GOD_BEOGH) && !player_under_penance()) - { - if (you.piety >= piety_breakpoint(5)) - racial_bonus += racial_bonus * 9 / 4; - else if (you.piety >= piety_breakpoint(4)) - racial_bonus += racial_bonus * 7 / 4; - else if (you.piety >= piety_breakpoint(2)) - racial_bonus += racial_bonus * 5 / 4; - else if (you.piety >= piety_breakpoint(0)) - racial_bonus += racial_bonus * 3 / 4; - else - racial_bonus += racial_bonus / 4; - } + racial_bonus = 2; } return racial_bonus; -- 1.9.0 From 39b11996bffaa04c4dbd7546801df6e910cd4a9d Mon Sep 17 00:00:00 2001 From: Chris Oelmueller <chris.oelmueller@gmail.com> Date: Wed, 12 Feb 2014 20:22:03 +0100 Subject: Racial body armor has no effect on spellcasting - No bonus for matching races - No malus for dwarven armor - No bonus for elven armor --- crawl-ref/source/describe.cc | 21 --------------------- crawl-ref/source/player.cc | 25 +------------------------ 2 files changed, 1 insertion(+), 45 deletions(-) diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc index 597be78..cb93dda 100644 --- a/crawl-ref/source/describe.cc +++ b/crawl-ref/source/describe.cc @@ -1337,27 +1337,6 @@ static string _describe_armour(const item_def &item, bool verbose) if (!item_ident(item, ISFLAG_KNOW_PROPERTIES) && item_type_known(item)) description += "\nThis armour may have some hidden properties."; } - else if (get_equip_race(item) != ISFLAG_NO_RACE) - { - // Randart armour can't be racial. - description += "\n"; - - iflags_t race = get_equip_race(item); - - if (race == ISFLAG_DWARVEN) - description += "\nIt is well-crafted and durable."; - else if (race == ISFLAG_ELVEN) - { - if (get_item_slot(item) == EQ_BODY_ARMOUR) - description += "\nIt is well-crafted and unobstructive."; - } - - description += "\nIt fits "; - description += (race == ISFLAG_DWARVEN) ? "dwarves" : - (race == ISFLAG_ELVEN) ? "elves" - : "orcs"; - description += " well."; - } if (!is_artefact(item)) { diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 1becb53..0e09517 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -2634,28 +2634,6 @@ int player_evasion(ev_ignore_type evit) return unscale_round_up(final_evasion, scale); } -static int _player_body_armour_racial_spellcasting_bonus(const int scale) -{ - const item_def *body_armour = you.slot_item(EQ_BODY_ARMOUR, false); - if (!body_armour) - return 0; - - const iflags_t armour_race = get_equip_race(*body_armour); - const iflags_t player_race = get_species_race(you.species); - - int armour_racial_spellcasting_bonus = 0; - if (armour_race & ISFLAG_ELVEN) - armour_racial_spellcasting_bonus += 25; - - if (armour_race & ISFLAG_DWARVEN) - armour_racial_spellcasting_bonus -= 15; - - if (armour_race & player_race) - armour_racial_spellcasting_bonus += 15; - - return armour_racial_spellcasting_bonus * scale; -} - // Returns the spellcasting penalty (increase in spell failure) for the // player's worn body armour and shield. int player_armour_shield_spell_penalty() @@ -2663,8 +2641,7 @@ int player_armour_shield_spell_penalty() const int scale = 100; const int body_armour_penalty = - max(25 * you.adjusted_body_armour_penalty(scale) - - _player_body_armour_racial_spellcasting_bonus(scale), 0); + max(25 * you.adjusted_body_armour_penalty(scale), 0); const int total_penalty = body_armour_penalty + 25 * you.adjusted_shield_penalty(scale) -- 1.9.0 From 43223749c34de2a88ac1cfd52c199d35fcfc8ce2 Mon Sep 17 00:00:00 2001 From: Chris Oelmueller <chris.oelmueller@gmail.com> Date: Wed, 12 Feb 2014 19:45:18 +0100 Subject: Stop generation of racial armor --- crawl-ref/source/acquire.cc | 4 -- crawl-ref/source/itemprop.cc | 37 +----------- crawl-ref/source/makeitem.cc | 139 ++----------------------------------------- crawl-ref/source/mon-gear.cc | 28 ++++----- crawl-ref/source/ng-setup.cc | 5 +- crawl-ref/source/wiz-mon.cc | 10 +--- 6 files changed, 21 insertions(+), 202 deletions(-) diff --git a/crawl-ref/source/acquire.cc b/crawl-ref/source/acquire.cc index 8966ce8..246147d 100644 --- a/crawl-ref/source/acquire.cc +++ b/crawl-ref/source/acquire.cc @@ -1265,10 +1265,6 @@ int acquirement_create_item(object_class_type class_wanted, } } - // bias racial make towards the player - if (doodad.base_type == OBJ_ARMOUR && !is_artefact(doodad)) - maybe_set_armour_race(doodad, get_species_race(you.species), 3); - if (doodad.base_type == OBJ_WEAPONS && !can_wield(&doodad, false, true) || doodad.base_type == OBJ_ARMOUR diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc index 4ffa270..ce50e57 100644 --- a/crawl-ref/source/itemprop.cc +++ b/crawl-ref/source/itemprop.cc @@ -802,42 +802,7 @@ iflags_t get_equip_desc(const item_def &item) void set_equip_race(item_def &item, iflags_t flags) { - ASSERT((flags & ~ISFLAG_RACIAL_MASK) == 0); - - if (item.base_type != OBJ_ARMOUR - || item.sub_type > ARM_MAX_RACIAL) - { - return; - } - - // check that item is appropriate for racial type - switch (flags) - { - case ISFLAG_ELVEN: - if (item.sub_type == ARM_PLATE_ARMOUR || is_hard_helmet(item)) - return; - break; - - case ISFLAG_DWARVEN: - if (item.sub_type == ARM_ROBE - || item.sub_type == ARM_LEATHER_ARMOUR - || get_armour_slot(item) == EQ_HELMET && !is_hard_helmet(item)) - { - return; - } - break; - - case ISFLAG_ORCISH: - if (get_armour_slot(item) == EQ_HELMET && !is_hard_helmet(item)) - return; - break; - - default: - break; - } - - item.flags &= ~ISFLAG_RACIAL_MASK; // delete previous - item.flags |= flags; + return; } void set_equip_desc(item_def &item, iflags_t flags) diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc index 484629d..0c26dd2 100644 --- a/crawl-ref/source/makeitem.cc +++ b/crawl-ref/source/makeitem.cc @@ -1859,105 +1859,6 @@ static bool _try_make_armour_artefact(item_def& item, int force_type, return false; } -static item_status_flag_type _determine_armour_race(const item_def& item, - int item_race) -{ - item_status_flag_type rc = ISFLAG_NO_RACE; - - if (item.sub_type > ARM_MAX_RACIAL) - return rc; - - switch (item_race) - { - case MAKE_ITEM_ELVEN: - rc = ISFLAG_ELVEN; - break; - - case MAKE_ITEM_DWARVEN: - rc = ISFLAG_DWARVEN; - break; - - case MAKE_ITEM_ORCISH: - rc = ISFLAG_ORCISH; - break; - - case MAKE_ITEM_RANDOM_RACE: - if (coinflip()) - break; - - switch (item.sub_type) - { - case ARM_BUCKLER: - case ARM_SHIELD: - case ARM_LARGE_SHIELD: - if (one_chance_in(4)) - rc = ISFLAG_ORCISH; - if (one_chance_in(4)) - rc = ISFLAG_ELVEN; - if (one_chance_in(3)) - rc = ISFLAG_DWARVEN; - break; - - case ARM_CLOAK: - if (one_chance_in(4)) - rc = ISFLAG_ORCISH; - if (one_chance_in(4)) - rc = ISFLAG_DWARVEN; - if (one_chance_in(4)) - rc = ISFLAG_ELVEN; - break; - - case ARM_GLOVES: - case ARM_BOOTS: - if (one_chance_in(4)) - rc = ISFLAG_ORCISH; - if (one_chance_in(4)) - rc = ISFLAG_ELVEN; - if (one_chance_in(6)) - rc = ISFLAG_DWARVEN; - break; - - case ARM_HAT: - if (one_chance_in(6)) - rc = ISFLAG_ORCISH; - if (one_chance_in(6)) - rc = ISFLAG_ELVEN; - break; - - case ARM_HELMET: - if (one_chance_in(6)) - rc = ISFLAG_ORCISH; - if (one_chance_in(5)) - rc = ISFLAG_DWARVEN; - break; - - case ARM_ROBE: - if (one_chance_in(6)) - rc = ISFLAG_ORCISH; - if (one_chance_in(4)) - rc = ISFLAG_ELVEN; - break; - - case ARM_LEATHER_ARMOUR: - case ARM_RING_MAIL: - case ARM_SCALE_MAIL: - case ARM_CHAIN_MAIL: - case ARM_PLATE_ARMOUR: - if (item.sub_type <= ARM_CHAIN_MAIL && one_chance_in(6)) - rc = ISFLAG_ELVEN; - if (item.sub_type >= ARM_RING_MAIL && one_chance_in(5)) - rc = ISFLAG_DWARVEN; - if (one_chance_in(5)) - rc = ISFLAG_ORCISH; - - default: - break; - } - } - - return rc; -} - static special_armour_type _determine_armour_ego(const item_def& item, int force_type, int item_level) { @@ -2158,8 +2059,7 @@ bool is_armour_brand_ok(int type, int brand, bool strict) } static void _generate_armour_item(item_def& item, bool allow_uniques, - int force_type, int item_level, - int item_race) + int force_type, int item_level) { if (force_type != OBJ_RANDOM) item.sub_type = force_type; @@ -2196,7 +2096,7 @@ static void _generate_armour_item(item_def& item, bool allow_uniques, return; } - if (item_race == MAKE_ITEM_RANDOM_RACE && item.sub_type == ARM_BOOTS) + if (item.sub_type == ARM_BOOTS) { if (one_chance_in(8)) item.sub_type = ARM_NAGA_BARDING; @@ -2204,12 +2104,6 @@ static void _generate_armour_item(item_def& item, bool allow_uniques, item.sub_type = ARM_CENTAUR_BARDING; } - set_equip_race(item, _determine_armour_race(item, item_race)); - - // Dwarven armour is high-quality. - if (get_equip_race(item) == ISFLAG_DWARVEN && coinflip()) - item.plus++; - const bool force_good = item_level >= MAKE_GIFT_ITEM; const bool forced_ego = (item.special > 0); const bool no_ego = (item.special == SPARM_FORBID_EGO); @@ -2246,12 +2140,7 @@ static void _generate_armour_item(item_def& item, bool allow_uniques, item.plus += random2(3); } - if (!no_ego - && x_chance_in_y(31 + item_level, 350) - && (force_good - || forced_ego - || get_equip_race(item) != ISFLAG_ORCISH - || item.sub_type <= ARM_PLATE_ARMOUR && coinflip())) + if (!no_ego && x_chance_in_y(31 + item_level, 350)) { // ...an ego item, in fact. set_item_ego_type(item, OBJ_ARMOUR, @@ -2918,8 +2807,7 @@ int items(bool allow_uniques, int force_type, // desired SUBTYPE - enum varies by OBJ bool dont_place, // don't randomly place item on level int item_level, // level of the item, can differ from global - int item_race, // weapon / armour racial categories - // item_race also gives type of rune! + int item_race, // weapon racial categories / type of rune uint32_t mapmask, int force_ego, // desired ego/brand int agent, // acquirement agent, if not -1 @@ -3028,8 +2916,7 @@ int items(bool allow_uniques, break; case OBJ_ARMOUR: - _generate_armour_item(item, allow_uniques, force_type, - item_level, item_race); + _generate_armour_item(item, allow_uniques, force_type, item_level); break; case OBJ_WANDS: @@ -3417,21 +3304,7 @@ void item_set_appearance(item_def &item) void maybe_set_armour_race(item_def &item, int allowed, int num_rolls) { - ASSERT(item.base_type == OBJ_ARMOUR); - - if (!allowed) - return; - - while (num_rolls-- > 0) - { - iflags_t irace = 0; - irace = _determine_armour_race(item, MAKE_ITEM_RANDOM_RACE); - if (!(allowed & irace)) - continue; - dprf("Extra race roll passed!"); - set_equip_race(item, irace); - return; - } + return; } #if defined(DEBUG_DIAGNOSTICS) || defined(DEBUG_TESTS) diff --git a/crawl-ref/source/mon-gear.cc b/crawl-ref/source/mon-gear.cc index 057eded..da8eb75 100644 --- a/crawl-ref/source/mon-gear.cc +++ b/crawl-ref/source/mon-gear.cc @@ -1892,8 +1892,7 @@ static void _give_shield(monster* mon, int level) case MONS_DEEP_ELF_FIGHTER: if (one_chance_in(6)) { - make_item_for_monster(mon, OBJ_ARMOUR, ARM_BUCKLER, - level, MAKE_ITEM_ELVEN); + make_item_for_monster(mon, OBJ_ARMOUR, ARM_BUCKLER, level); } break; @@ -1956,10 +1955,7 @@ static void _give_shield(monster* mon, int level) break; case MONS_DEEP_ELF_KNIGHT: if (one_chance_in(3)) - { - make_item_for_monster(mon, OBJ_ARMOUR, ARM_BUCKLER, - level, MAKE_ITEM_ELVEN); - } + make_item_for_monster(mon, OBJ_ARMOUR, ARM_BUCKLER, level); break; case MONS_SPRIGGAN: case MONS_SPRIGGAN_RIDER: @@ -1982,15 +1978,15 @@ static void _give_shield(monster* mon, int level) break; case MONS_NORRIS: make_item_for_monster(mon, OBJ_ARMOUR, ARM_BUCKLER, - level * 2 + 1, MAKE_ITEM_RANDOM_RACE, 1); + level * 2 + 1, MAKE_ITEM_NO_RACE, 1); break; case MONS_WIGLAF: make_item_for_monster(mon, OBJ_ARMOUR, ARM_SHIELD, - level * 2 + 1, MAKE_ITEM_DWARVEN, 1); + level * 2 + 1, MAKE_ITEM_NO_RACE, 1); break; case MONS_LOUISE: shield = make_item_for_monster(mon, OBJ_ARMOUR, ARM_LARGE_SHIELD, - level * 2 + 1, MAKE_ITEM_RANDOM_RACE, 1); + level * 2 + 1, MAKE_ITEM_NO_RACE, 1); if (shield && !is_artefact(*shield)) { shield->props["item_tile_name"] = "lshield_louise"; @@ -2000,7 +1996,7 @@ static void _give_shield(monster* mon, int level) break; case MONS_DONALD: shield = make_item_for_monster(mon, OBJ_ARMOUR, ARM_SHIELD, - level * 2 + 1, MAKE_ITEM_RANDOM_RACE, 1); + level * 2 + 1, MAKE_ITEM_NO_RACE, 1); if (shield) { @@ -2068,7 +2064,7 @@ static void _give_armour(monster* mon, int level, bool spectral_orcs) { case MONS_DEEP_ELF_BLADEMASTER: case MONS_DEEP_ELF_MASTER_ARCHER: - item_race = MAKE_ITEM_ELVEN; + item_race = MAKE_ITEM_NO_RACE; item.base_type = OBJ_ARMOUR; item.sub_type = ARM_LEATHER_ARMOUR; break; @@ -2166,9 +2162,6 @@ static void _give_armour(monster* mon, int level, bool spectral_orcs) break; case MONS_URUG: - item_race = MAKE_ITEM_ORCISH; - // deliberate fall through {dlb} - case MONS_ASTERION: case MONS_EDMUND: case MONS_FRANCES: @@ -2183,7 +2176,7 @@ static void _give_armour(monster* mon, int level, bool spectral_orcs) case MONS_WIGLAF: if (one_chance_in(3)) level = MAKE_GOOD_ITEM; - item_race = MAKE_ITEM_DWARVEN; + item_race = MAKE_ITEM_NO_RACE; item.base_type = OBJ_ARMOUR; item.sub_type = random_choose_weighted(8, ARM_CHAIN_MAIL, 10, ARM_PLATE_ARMOUR, @@ -2277,7 +2270,7 @@ static void _give_armour(monster* mon, int level, bool spectral_orcs) case MONS_DWARF: case MONS_DEEP_DWARF: case MONS_DEEP_DWARF_DEATH_KNIGHT: - item_race = MAKE_ITEM_DWARVEN; + item_race = MAKE_ITEM_NO_RACE; item.base_type = OBJ_ARMOUR; item.sub_type = random_choose_weighted(7, ARM_CHAIN_MAIL, 1, ARM_PLATE_ARMOUR, @@ -2413,7 +2406,6 @@ static void _give_armour(monster* mon, int level, bool spectral_orcs) item.sub_type = ARM_ROBE; item.plus = 1 + coinflip(); set_item_ego_type(item, OBJ_ARMOUR, SPARM_COLD_RESISTANCE); - set_equip_race(item, ISFLAG_ELVEN); item.flags |= ISFLAG_KNOW_TYPE; break; } @@ -2484,7 +2476,7 @@ static void _give_armour(monster* mon, int level, bool spectral_orcs) case MONS_ORC_WIZARD: case MONS_BLORK_THE_ORC: case MONS_NERGALLE: - item_race = MAKE_ITEM_ORCISH; + item_race = MAKE_ITEM_NO_RACE; item.base_type = OBJ_ARMOUR; item.sub_type = ARM_ROBE; break; diff --git a/crawl-ref/source/ng-setup.cc b/crawl-ref/source/ng-setup.cc index 89fd625..0d3e12d 100644 --- a/crawl-ref/source/ng-setup.cc +++ b/crawl-ref/source/ng-setup.cc @@ -1107,9 +1107,8 @@ static void _racialise_starting_equipment() if (is_useless_item(you.inv[i])) _newgame_clear_item(i); // Don't change object type modifier unless it starts plain. - else if ((you.inv[i].base_type == OBJ_ARMOUR - || you.inv[i].base_type == OBJ_WEAPONS) - && get_equip_race(you.inv[i]) == ISFLAG_NO_RACE) + else if (you.inv[i].base_type == OBJ_WEAPONS + && get_equip_race(you.inv[i]) == ISFLAG_NO_RACE) { // Now add appropriate species type mod. if (player_genus(GENPC_ELVEN)) diff --git a/crawl-ref/source/wiz-mon.cc b/crawl-ref/source/wiz-mon.cc index dd74504..b3429a6 100644 --- a/crawl-ref/source/wiz-mon.cc +++ b/crawl-ref/source/wiz-mon.cc @@ -119,16 +119,10 @@ static int _make_mimic_item(object_class_type type) make_item_randart(item); else if (prop < 40) set_equip_desc(item, ISFLAG_GLOWING); - else if (prop < 60) + else if (prop < 65) set_equip_desc(item, ISFLAG_RUNED); - else if (prop < 80) - set_equip_desc(item, ISFLAG_EMBROIDERED_SHINY); - else if (prop < 85) - set_equip_race(item, ISFLAG_ORCISH); else if (prop < 90) - set_equip_race(item, ISFLAG_DWARVEN); - else if (prop < 95) - set_equip_race(item, ISFLAG_ELVEN); + set_equip_desc(item, ISFLAG_EMBROIDERED_SHINY); break; case OBJ_SCROLLS: -- 1.9.0 From e5e3ab89cb1069f71a03eb7a01ebfb678b016941 Mon Sep 17 00:00:00 2001 From: Chris Oelmueller <chris.oelmueller@gmail.com> Date: Wed, 12 Feb 2014 20:15:01 +0100 Subject: Simplify some mon-gear code MAKE_ITEM_NO_RACE is the default. --- crawl-ref/source/mon-gear.cc | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/crawl-ref/source/mon-gear.cc b/crawl-ref/source/mon-gear.cc index da8eb75..0c267d5 100644 --- a/crawl-ref/source/mon-gear.cc +++ b/crawl-ref/source/mon-gear.cc @@ -1910,15 +1910,12 @@ static void _give_shield(monster* mon, int level) make_item_for_monster(mon, OBJ_ARMOUR, one_chance_in(3) ? ARM_LARGE_SHIELD : ARM_SHIELD, - level, MAKE_ITEM_NO_RACE); + level); } break; case MONS_OCTOPODE: if (coinflip()) - { - make_item_for_monster(mon, OBJ_ARMOUR, ARM_SHIELD, - level, MAKE_ITEM_NO_RACE); - } + make_item_for_monster(mon, OBJ_ARMOUR, ARM_SHIELD, level); break; case MONS_DRACONIAN_KNIGHT: case MONS_IRONHEART_PRESERVER: @@ -1940,19 +1937,14 @@ static void _give_shield(monster* mon, int level) break; make_item_for_monster(mon, OBJ_ARMOUR, coinflip() ? ARM_BUCKLER : ARM_SHIELD, - level, MAKE_ITEM_NO_RACE); + level); break; case MONS_TENGU_REAVER: if (one_chance_in(3)) level = MAKE_GOOD_ITEM; - // deliberate fall-through + make_item_for_monster(mon, OBJ_ARMOUR, ARM_BUCKLER, level); + break; case MONS_TENGU_CONJURER: - if (mon->type == MONS_TENGU_REAVER || one_chance_in(3)) - { - make_item_for_monster(mon, OBJ_ARMOUR, ARM_BUCKLER, - level, MAKE_ITEM_NO_RACE); - } - break; case MONS_DEEP_ELF_KNIGHT: if (one_chance_in(3)) make_item_for_monster(mon, OBJ_ARMOUR, ARM_BUCKLER, level); @@ -1968,7 +1960,7 @@ static void _give_shield(monster* mon, int level) shield = make_item_for_monster(mon, OBJ_ARMOUR, ARM_BUCKLER, mon->type == MONS_THE_ENCHANTRESS ? MAKE_GOOD_ITEM : mon->type == MONS_SPRIGGAN_DEFENDER ? level * 2 + 1 : - level, MAKE_ITEM_NO_RACE); + level); if (shield && !is_artefact(*shield)) // ineligible... { shield->props["item_tile_name"] = "buckler_spriggan"; @@ -2031,15 +2023,13 @@ static void _give_shield(monster* mon, int level) if (one_chance_in(3)) { armour_type shield_type = coinflip() ? ARM_BUCKLER : ARM_SHIELD; - - shield = make_item_for_monster(mon, OBJ_ARMOUR, shield_type, - level, MAKE_ITEM_NO_RACE); + shield = make_item_for_monster(mon, OBJ_ARMOUR, shield_type, level); } break; case MONS_WARMONGER: make_item_for_monster(mon, OBJ_ARMOUR, coinflip() ? ARM_LARGE_SHIELD : ARM_SHIELD, - MAKE_GOOD_ITEM, MAKE_ITEM_NO_RACE); + MAKE_GOOD_ITEM); break; default: break; -- 1.9.0 From 95a4607be4388130c6192959704ec855b971c402 Mon Sep 17 00:00:00 2001 From: Chris Oelmueller <chris.oelmueller@gmail.com> Date: Wed, 12 Feb 2014 20:16:30 +0100 Subject: Monsters no longer prefer matching racial armor As it doesn't exist. --- crawl-ref/source/monster.cc | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc index ad7ff35..57c558a 100644 --- a/crawl-ref/source/monster.cc +++ b/crawl-ref/source/monster.cc @@ -1954,22 +1954,13 @@ bool monster::pickup_armour(item_def &item, int near, bool force) if (value_old == value_new) { - // Prefer matching racial type. - if (_item_race_matches_monster(*existing_armour, this)) - value_old++; - if (_item_race_matches_monster(item, this)) - value_new++; - - if (value_old == value_new) - { - // If items are of the same value, use shopping - // value as a further crude estimate. - value_old = item_value(*existing_armour, true); - value_new = item_value(item, true); - } - if (value_old >= value_new) - return false; + // If items are of the same value, use shopping + // value as a further crude estimate. + value_old = item_value(*existing_armour, true); + value_new = item_value(item, true); } + if (value_old >= value_new) + return false; } if (!drop_item(mslot, near)) -- 1.9.0 From cf687180f8575feded5a85a0e88ebb197e13774e Mon Sep 17 00:00:00 2001 From: Chris Oelmueller <chris.oelmueller@gmail.com> Date: Wed, 12 Feb 2014 20:23:36 +0100 Subject: Ignore racial armor in tiles Might want to re-use some of them as variations, but that is a task for people who actually know what they're doing with tiles. --- crawl-ref/source/rltiles/dc-item.txt | 29 +---------------------------- crawl-ref/source/tilepick.cc | 25 ------------------------- 2 files changed, 1 insertion(+), 53 deletions(-) diff --git a/crawl-ref/source/rltiles/dc-item.txt b/crawl-ref/source/rltiles/dc-item.txt index b2e5151..6c7cb56 100644 --- a/crawl-ref/source/rltiles/dc-item.txt +++ b/crawl-ref/source/rltiles/dc-item.txt @@ -9,9 +9,7 @@ # # If only the first line has a define on it, then the following images will be # considered as variations. If you don't have five, images will be reused for -# multiple types. Orcish/elven/dwarven equipment are considered separate items -# with respect to variations and will not share variations with the base -# equipment. See tilepick.cc for more details. +# multiple types. See tilepick.cc for more details. ##### Artefacts (fixed and unrandart) %include dc-unrand.txt @@ -358,38 +356,22 @@ robe3 leather_armour1 ARM_LEATHER_ARMOUR leather_armour2 leather_armour3 -orcish_leather_armour ARM_LEATHER_ARMOUR_ORC -orcish_leather_armour2 -elven_leather_armour ARM_LEATHER_ARMOUR_ELF -elven_leather_armour2 ring_mail1 ARM_RING_MAIL ring_mail2 ring_mail3 -orcish_ringmail ARM_RING_MAIL_ORC -orcish_ringmail2 -elven_ringmail ARM_RING_MAIL_ELF -elven_ringmail2 -dwarven_ringmail ARM_RING_MAIL_DWA scale_mail1 ARM_SCALE_MAIL scale_mail2 scale_mail3 -elven_scalemail ARM_SCALE_MAIL_ELF -elven_scalemail2 chain_mail1 ARM_CHAIN_MAIL chain_mail2 chain_mail3 -elven_chain_mail ARM_CHAIN_MAIL_ELF -orcish_chain_mail ARM_CHAIN_MAIL_ORC -orcish_chain_mail2 plate1 ARM_PLATE_ARMOUR plate2 plate3 -orcish_plate ARM_PLATE_ARMOUR_ORC -orcish_plate2 crystal_plate ARM_CRYSTAL_PLATE_ARMOUR crystal_plate2 @@ -437,15 +419,6 @@ centaur_barding_red buckler1 ARM_BUCKLER buckler2 buckler3 - -dwarven_buckler1 ARM_BUCKLER_DWARVEN -dwarven_buckler2 - -elven_buckler1 ARM_BUCKLER_ELVEN -elven_buckler2 - -orcish_buckler1 ARM_BUCKLER_ORCISH -orcish_buckler2 %rim 1 buckler_spriggan ARM_BUCKLER_SPRIGGAN diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc index 365e014..97a4dc5 100644 --- a/crawl-ref/source/tilepick.cc +++ b/crawl-ref/source/tilepick.cc @@ -3265,7 +3265,6 @@ static tileidx_t _tileidx_missile(const item_def &item) static tileidx_t _tileidx_armour_base(const item_def &item) { - int race = item.flags & ISFLAG_RACIAL_MASK; int type = item.sub_type; switch (type) { @@ -3273,36 +3272,18 @@ static tileidx_t _tileidx_armour_base(const item_def &item) return TILE_ARM_ROBE; case ARM_LEATHER_ARMOUR: - if (race == ISFLAG_ORCISH) - return TILE_ARM_LEATHER_ARMOUR_ORC; - if (race == ISFLAG_ELVEN) - return TILE_ARM_LEATHER_ARMOUR_ELF; return TILE_ARM_LEATHER_ARMOUR; case ARM_RING_MAIL: - if (race == ISFLAG_ORCISH) - return TILE_ARM_RING_MAIL_ORC; - if (race == ISFLAG_ELVEN) - return TILE_ARM_RING_MAIL_ELF; - if (race == ISFLAG_DWARVEN) - return TILE_ARM_RING_MAIL_DWA; return TILE_ARM_RING_MAIL; case ARM_SCALE_MAIL: - if (race == ISFLAG_ELVEN) - return TILE_ARM_SCALE_MAIL_ELF; return TILE_ARM_SCALE_MAIL; case ARM_CHAIN_MAIL: - if (race == ISFLAG_ELVEN) - return TILE_ARM_CHAIN_MAIL_ELF; - if (race == ISFLAG_ORCISH) - return TILE_ARM_CHAIN_MAIL_ORC; return TILE_ARM_CHAIN_MAIL; case ARM_PLATE_ARMOUR: - if (race == ISFLAG_ORCISH) - return TILE_ARM_PLATE_ARMOUR_ORC; return TILE_ARM_PLATE_ARMOUR; case ARM_CRYSTAL_PLATE_ARMOUR: @@ -3332,12 +3313,6 @@ static tileidx_t _tileidx_armour_base(const item_def &item) return TILE_ARM_BOOTS; case ARM_BUCKLER: - if (race == ISFLAG_DWARVEN) - return TILE_ARM_BUCKLER_DWARVEN; - else if (race == ISFLAG_ELVEN) - return TILE_ARM_BUCKLER_ELVEN; - else if (race == ISFLAG_ORCISH) - return TILE_ARM_BUCKLER_ORCISH; return TILE_ARM_BUCKLER; case ARM_LARGE_SHIELD: -- 1.9.0 From d21e3dab9273da5737ed4d21ed206dfff3607b3f Mon Sep 17 00:00:00 2001 From: Chris Oelmueller <chris.oelmueller@gmail.com> Date: Wed, 12 Feb 2014 20:57:29 +0100 Subject: Remove remaining `race:` armor specifications from vaults --- crawl-ref/source/dat/des/branches/abyss.des | 2 +- crawl-ref/source/dat/des/branches/forest.des | 5 ++-- crawl-ref/source/dat/des/branches/hell.des | 5 ++-- crawl-ref/source/dat/des/branches/orc.des | 2 +- crawl-ref/source/dat/des/branches/spider.des | 9 ++---- crawl-ref/source/dat/des/portals/bailey.des | 33 +++++++------------- crawl-ref/source/dat/des/portals/lab.des | 8 ++--- crawl-ref/source/dat/des/portals/volcano.des | 10 +++---- crawl-ref/source/dat/des/sprint/arena_sprint.des | 6 ++-- crawl-ref/source/dat/des/sprint/meat.des | 2 +- crawl-ref/source/dat/des/sprint/zigsprint.des | 8 ++--- crawl-ref/source/dat/des/tutorial/lesson3.des | 2 +- crawl-ref/source/dat/des/tutorial/lesson4.des | 4 +-- .../source/dat/des/variable/grated_community.des | 4 +-- .../source/dat/des/variable/mini_monsters.des | 35 ++++++++++------------ crawl-ref/source/mapdef.cc | 15 +--------- 16 files changed, 57 insertions(+), 93 deletions(-) diff --git a/crawl-ref/source/dat/des/branches/abyss.des b/crawl-ref/source/dat/des/branches/abyss.des index 8530f43..4ec3d3f 100644 --- a/crawl-ref/source/dat/des/branches/abyss.des +++ b/crawl-ref/source/dat/des/branches/abyss.des @@ -1330,7 +1330,7 @@ NAME: hangedman_abyss_rune_treasure_dump mundane animal skin / gold q:1 KITEM: 13e = rod of striking w:2 / wand of slowing / wand of magic darts / \ wand of flame w:5 / wand of frost w:5 / plain deck w:2 / \ - whip not_cursed w:2 / hat not_cursed mundane race:none w:5 + whip not_cursed w:2 / hat not_cursed mundane w:5 KITEM: f = abyssal rune of zot mimic, abyssal rune of zot mimic KITEM: g = abyssal rune of zot mimic, abyssal rune of zot SHUFFLE: 14 / 23 diff --git a/crawl-ref/source/dat/des/branches/forest.des b/crawl-ref/source/dat/des/branches/forest.des index b9744ca..c51ff11 100644 --- a/crawl-ref/source/dat/des/branches/forest.des +++ b/crawl-ref/source/dat/des/branches/forest.des @@ -761,10 +761,9 @@ NAME: nicolae_forest_orc_logging_accident KPROP: Bbop = bloody SUBST: B = ', b = . : dgn.delayed_decay_extra(_G, 'o', 'orc corpse', 'hand axe / ' .. -: 'broad axe, leather armour race:orcish / ' .. -: 'pair of gloves race:orcish, mundane quarterstaff ') +: 'broad axe, leather armour / pair of gloves, mundane quarterstaff ') : dgn.delayed_decay_extra(_G, 'p', 'orc corpse', 'hand axe / ' .. -: 'broad axe, leather armour race:orcish / pair of gloves race:orcish ') +: 'broad axe, leather armour / pair of gloves ') KITEM: w = mundane quarterstaff KITEM: s = meat ration / bread ration FTILE: 'o = floor_dirt diff --git a/crawl-ref/source/dat/des/branches/hell.des b/crawl-ref/source/dat/des/branches/hell.des index 7202fbd..fbdae1c 100644 --- a/crawl-ref/source/dat/des/branches/hell.des +++ b/crawl-ref/source/dat/des/branches/hell.des @@ -240,9 +240,8 @@ NAME: lightli_too_deep SUBST: y = x.. SUBST: ; = %A.....l : dgn.delayed_decay(_G, '%', 'dwarf skeleton') -KITEM: A = any weapon w:20 / chain mail race:dwarven w:60 / \ - plate armour race:dwarven w:19 / \ - crystal plate armour race:dwarven w:1 +KITEM: A = any weapon w:20 / chain mail w:60 / plate armour w:19 / \ + crystal plate armour w:1 : hell_entry_tier(_G, "mid") MAP xxxxxxxxxxxxxxx diff --git a/crawl-ref/source/dat/des/branches/orc.des b/crawl-ref/source/dat/des/branches/orc.des index f40e5a2..4f75ad5 100644 --- a/crawl-ref/source/dat/des/branches/orc.des +++ b/crawl-ref/source/dat/des/branches/orc.des @@ -663,7 +663,7 @@ NAME: elf_legates MONS: deep elf fighter / deep elf summoner / deep elf conjurer / deep elf priest MONS: deep elf fighter / deep elf mage / deep elf priest MONS: deep elf fighter / nothing -ITEM: good_item scimitar / good_item chain mail race:elven +ITEM: good_item scimitar / good_item chain mail SUBST: = : +x MAP xxxxx=xxx diff --git a/crawl-ref/source/dat/des/branches/spider.des b/crawl-ref/source/dat/des/branches/spider.des index 078bf5a..fb3a0f8 100644 --- a/crawl-ref/source/dat/des/branches/spider.des +++ b/crawl-ref/source/dat/des/branches/spider.des @@ -641,8 +641,7 @@ NAME: nicolae_spider_mines_1 KMONS: z = jumping spider w:5 / wolf spider w:3 / spider w:5 / redback w:1 / \ tarantella w:1 / nothing w:100 : dgn.delayed_decay(_G, 'v', 'orc skeleton') -KITEM: z = any armour race:orcish w:5 / any weapon w:5 / \ - gold w:1 / nothing w:50 +KITEM: z = any armour w:5 / any weapon w:5 / gold w:1 / nothing w:50 KFEAT: z = web / floor w:60 MAP xxxxxxxxxxxxxxx @@ -682,8 +681,7 @@ NAME: nicolae_spider_mines_2 KMONS: z = jumping spider w:5 / wolf spider w:3 / spider w:5 / redback w:1 / \ tarantella w:1 / nothing w:100 : dgn.delayed_decay(_G, 'v', 'orc skeleton') -KITEM: z = any armour race:orcish w:5 / any weapon w:5 / \ - gold w:1 / nothing w:50 +KITEM: z = any armour w:5 / any weapon w:5 / gold w:1 / nothing w:50 KFEAT: z = web / floor w:60 KFEAT: _ = altar_beogh @@ -723,8 +721,7 @@ NAME: nicolae_spider_mines_3 KMONS: z = jumping spider w:5 / wolf spider w:3 / spider w:5 / redback w:1 / \ tarantella w:1 / nothing w:100 : dgn.delayed_decay(_G, 'v', 'orc skeleton') -KITEM: z = any armour race:orcish w:5 / any weapon w:5 / \ - gold w:1 / nothing w:50 +KITEM: z = any armour w:5 / any weapon w:5 / gold w:1 / nothing w:50 KFEAT: z = web / floor w:60 KFEAT: Q = abandoned_shop MAP diff --git a/crawl-ref/source/dat/des/portals/bailey.des b/crawl-ref/source/dat/des/portals/bailey.des index 0c1eb94..05bc182 100644 --- a/crawl-ref/source/dat/des/portals/bailey.des +++ b/crawl-ref/source/dat/des/portals/bailey.des @@ -98,30 +98,20 @@ function orc_with_polearm(e) e.mons("orc ; \ spear | trident | halberd .\ - scale mail race:orcish | scale mail |\ - ring mail race:orcish | ring mail |\ - chain mail race:orcish | chain mail") + scale mail | ring mail | chain mail") end function orc_warrior_with_polearm(e) e.mons("orc warrior ; \ - spear w:5 | trident w:5 |\ - halberd | glaive | bardiche w:1 .\ - scale mail race:orcish | scale mail |\ - ring mail race:orcish | ring mail |\ - chain mail race:orcish | chain mail |\ - plate armour race:orcish | plate armour |\ + spear w:5 | trident w:5 | halberd | glaive | bardiche w:1 .\ + ring mail | scale mail | chain mail | plate armour |\ crystal plate armour w:1") end function orc_knight_with_polearm(e) e.mons("orc knight ; \ - trident w:5 | halberd |\ - glaive | bardiche w:1 .\ - ring mail race:orcish | ring mail |\ - chain mail race:orcish | chain mail |\ - chain mail race:orcish | chain mail |\ - plate armour race:orcish | plate armour |\ + trident w:5 | halberd | glaive | bardiche w:1 .\ + ring mail | scale mail | chain mail | plate armour |\ crystal plate armour w:1") end @@ -129,9 +119,7 @@ function orc_warlord_with_polearm(e) e.mons("orc warlord ; \ halberd | glaive | bardiche w:1 .\ - chain mail race:orcish w:20 | chain mail w:20 |\ - plate armour race:orcish | plate armour |\ - crystal plate armour w:1") + chain mail w:20 | plate armour | crystal plate armour w:1") end }} @@ -710,13 +698,12 @@ NAME: bailey_polearm_1 : orc_knight_with_polearm(_G) SUBST: 2 = 223. SUBST: 1 = 1 2:1 . -ITEM: good_item crystal plate armour / good_item plate armour race:orcish /\ +ITEM: good_item crystal plate armour / good_item plate armour /\ good_item gold dragon armour w:5 / good_item ice dragon armour w:5 /\ good_item fire dragon armour w:5 / good_item steam dragon armour w:5 -# XXX: Which armour pieces can be orcish? -ITEM: good_item cloak race:orcish / good_item pair of gloves race:orcish /\ - good_item helmet race:orcish / good_item pair of boots race:orcish /\ - good_item large shield race:orcish / good_item shield race:orcish +ITEM: good_item cloak / good_item pair of gloves /\ + good_item helmet / good_item pair of boots /\ + good_item large shield / good_item shield : bailey_setup(_G) MAP xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx diff --git a/crawl-ref/source/dat/des/portals/lab.des b/crawl-ref/source/dat/des/portals/lab.des index 8805e6d..5705a8b 100644 --- a/crawl-ref/source/dat/des/portals/lab.des +++ b/crawl-ref/source/dat/des/portals/lab.des @@ -239,10 +239,10 @@ NAME: nicolae_lab_dead_adventurers .. "eveningstar / executioner's axe w:2 / " .. 'great mace w:2, helmet good_item / ' .. 'pair of gloves good_item / pair of boots good_item, ' - .. 'plate armour race:dwarven / crystal plate armour w:2' ) + .. 'plate armour / crystal plate armour w:2' ) -- Elf caster. 4 items. -dgn.delayed_decay_extra(_G, 'B', 'elf skeleton', 'robe race:elven, randbook, ' +dgn.delayed_decay_extra(_G, 'B', 'elf skeleton', 'robe, randbook, ' .. 'any magical staff, any jewellery' ) -- Spriggan stabber. 4 items. @@ -278,10 +278,10 @@ NAME: nicolae_lab_dead_adventurers -- Orc fighter. 3 items. dgn.delayed_decay_extra(_G, 'J', 'orc skeleton', 'shield / large shield w:2, ' .. 'long sword / eveningstar / broad axe / demon blade, ' - .. 'plate armour race:orcish / crystal plate armour w:2' ) + .. 'plate armour / crystal plate armour w:2' ) -- Dwarven heavy armour earth elementalist. 3-4 items. -dgn.delayed_decay_extra(_G, 'K', 'dwarf skeleton', 'plate armour race:dwarven, ' +dgn.delayed_decay_extra(_G, 'K', 'dwarf skeleton', 'plate armour, ' .. 'randbook disc:earth / any book, staff of earth / any magical staff, ' .. 'ring of wizardry / any jewellery / nothing w:20' ) diff --git a/crawl-ref/source/dat/des/portals/volcano.des b/crawl-ref/source/dat/des/portals/volcano.des index 9bdb4fd..11a8e64 100644 --- a/crawl-ref/source/dat/des/portals/volcano.des +++ b/crawl-ref/source/dat/des/portals/volcano.des @@ -238,12 +238,12 @@ local warriorstuff = "scimitar " .. flame .. " | war axe " .. flame .. " | halberd " .. flame - .. " . ring mail race:orcish " .. res - .. " | scale mail race:orcish " .. res + .. " . ring mail " .. res + .. " | scale mail " .. res local knightstuff = "great mace " .. flame .. " | great sword " .. flame .. " | glaive " .. flame - .. " . chain mail race:orcish " .. res + .. " . chain mail " .. res local magestuff = "spear " .. flame .. " | whip " .. flame .. " . robe " .. res @@ -253,8 +253,8 @@ .. " . bow ego:flame ident:type . arrow" local elfstuff = "long sword " .. flame .. " | short sword " .. flame - .. " | leather armour race:elven " .. res - .. " | ring mail race:elven " .. res + .. " | leather armour " .. res + .. " | ring mail " .. res local dracstuff = "long sword " .. flame .. " | halberd " .. flame .. " | war axe " .. flame .. " . cloak" diff --git a/crawl-ref/source/dat/des/sprint/arena_sprint.des b/crawl-ref/source/dat/des/sprint/arena_sprint.des index 54e384d..80cc17f 100644 --- a/crawl-ref/source/dat/des/sprint/arena_sprint.des +++ b/crawl-ref/source/dat/des/sprint/arena_sprint.des @@ -733,9 +733,9 @@ col:flash deep elf sorcerer hp:400 \ name:deep_elf_elementalist n_rpl n_des n_noc tile:mons_deep_elf_elementalist \ spells:iron_shot;summon_air_elementals;sticky_flame_range;summon_water_elementals;haste;blink actual_spells \ - ; robe ego:fire_resistance race:elven | \ - robe ego:cold_resistance race:elven | \ - robe ego:resistance race:elven . dagger ego:freezing | \ + ; robe ego:fire_resistance | \ + robe ego:cold_resistance | \ + robe ego:resistance . dagger ego:freezing | \ dagger ego:flaming | dagger ego:electrocution", "elven rune of zot"} else diff --git a/crawl-ref/source/dat/des/sprint/meat.des b/crawl-ref/source/dat/des/sprint/meat.des index 7062523..6605e24 100644 --- a/crawl-ref/source/dat/des/sprint/meat.des +++ b/crawl-ref/source/dat/des/sprint/meat.des @@ -119,7 +119,7 @@ ; ring of slaying plus:27000 plus2:250 not_cursed ident:all \ no_pickup . demon whip plus:9 plus2:9 not_cursed ego:vorpal \ ident:all no_pickup \ - . large shield plus:12 not_cursed ego:none race:no_race \ + . large shield plus:12 not_cursed ego:none \ ident:all no_pickup" -- Meatlord shadow creatures will be shadow fiends diff --git a/crawl-ref/source/dat/des/sprint/zigsprint.des b/crawl-ref/source/dat/des/sprint/zigsprint.des index abd795c..0a47041 100644 --- a/crawl-ref/source/dat/des/sprint/zigsprint.des +++ b/crawl-ref/source/dat/des/sprint/zigsprint.des @@ -711,15 +711,15 @@ NAME: room_start KFEAT: q = altar_fedhas KFEAT: r = altar_cheibriados KFEAT: s = altar_dithmenos -KITEM: B = plate armour race:none mundane not_cursed ident:all plus:5, \ +KITEM: B = plate armour mundane not_cursed ident:all plus:5, \ fire dragon armour mundane not_cursed ident:all plus:5, \ ice dragon armour mundane not_cursed ident:all plus:5, \ storm dragon armour mundane not_cursed ident:all plus:5, \ gold dragon armour mundane not_cursed ident:all plus:5, \ crystal plate armour mundane not_cursed ident:all plus:5 -KITEM: C = buckler race:none mundane not_cursed ident:all plus:3, \ - shield race:none mundane not_cursed ident:all plus:3, \ - large shield race:none mundane not_cursed ident:all plus:3 +KITEM: C = buckler mundane not_cursed ident:all plus:3, \ + shield mundane not_cursed ident:all plus:3, \ + large shield mundane not_cursed ident:all plus:3 KITEM: D = broad axe mundane not_cursed ident:all plus:5 plus2:5, \ battleaxe mundane not_cursed ident:all plus:5 plus2:5, \ executioner's axe mundane not_cursed ident:all plus:5 plus2:5 diff --git a/crawl-ref/source/dat/des/tutorial/lesson3.des b/crawl-ref/source/dat/des/tutorial/lesson3.des index 0945c95..9856a69 100644 --- a/crawl-ref/source/dat/des/tutorial/lesson3.des +++ b/crawl-ref/source/dat/des/tutorial/lesson3.des @@ -29,7 +29,7 @@ NAME: tutorial_lesson3 KFEAT: ABC = . COLOUR: defgABC = lightblue FTILE: defgABC = tutorial_pad -ITEM: pair of boots race:no_race mundane not_cursed +ITEM: pair of boots mundane not_cursed ITEM: scroll of fog q:1 ITEM: scroll of fear q:1 ITEM: scimitar ego:venom not_cursed diff --git a/crawl-ref/source/dat/des/tutorial/lesson4.des b/crawl-ref/source/dat/des/tutorial/lesson4.des index 992eab7..5cb0dc5 100644 --- a/crawl-ref/source/dat/des/tutorial/lesson4.des +++ b/crawl-ref/source/dat/des/tutorial/lesson4.des @@ -105,8 +105,8 @@ NAME: tutorial_lesson4_level2 ITEM: randbook numspells:1 spells:animate_skeleton title:Necromancy_for_Newbies owner:player ITEM: never_decay bat skeleton / never_decay goblin; nothing skeleton ITEM: never_decay ball python skeleton / never_decay jackal skeleton -ITEM: shield race:none not_cursed -ITEM: ring mail race:none not_cursed +ITEM: shield not_cursed +ITEM: ring mail not_cursed MONS: hobgoblin MONS: rat MONS: goblin diff --git a/crawl-ref/source/dat/des/variable/grated_community.des b/crawl-ref/source/dat/des/variable/grated_community.des index 6d64594..12fd3b5 100644 --- a/crawl-ref/source/dat/des/variable/grated_community.des +++ b/crawl-ref/source/dat/des/variable/grated_community.des @@ -282,8 +282,8 @@ NAME: grated_community_mu_orcish_home sausage / slice of pizza / nothing KFEAT: 8 = orcish_idol / w:5 floor KFEAT: _ = altar_beogh / w:15 floor -KITEM: $ = battleaxe / nothing, race:orcish plate armour /\ - nothing, meat ration, q:2 sausage / nothing, gold, any, any +KITEM: $ = battleaxe / nothing, plate armour / nothing, \ + meat ration, q:2 sausage / nothing, gold, any, any MARKER: # = lua:fog_machine { cloud_type = "flame", \ pow_min = 10, pow_max = 10, delay = 10, \ size = 1, walk_dist = 0, start_clouds = 1, excl_rad = 0 } diff --git a/crawl-ref/source/dat/des/variable/mini_monsters.des b/crawl-ref/source/dat/des/variable/mini_monsters.des index e5d8271..0515c61 100644 --- a/crawl-ref/source/dat/des/variable/mini_monsters.des +++ b/crawl-ref/source/dat/des/variable/mini_monsters.des @@ -1824,11 +1824,11 @@ NAME: hangedman_minor_magic DEPTH: D:9-11, Orc MONS: crimson imp, white imp, shadow imp, iron imp MONS: orc, orc wizard w:39 / Blork the orc w:1, swamp drake -KMONS: 0 = orc ; robe race:orcish . wand of confusion | wand of slowing w:35 | \ +KMONS: 0 = orc ; robe . wand of confusion | wand of slowing w:35 | \ wand of magic darts w:35 | wand of flame | wand of frost . \ potion of invisibility | potion of speed | nothing w:980 KMONS: 89 = deep elf mage -KITEM: 8d = robe / robe race:orcish, hat w:40 / hat good_item, \ +KITEM: 8d = robe / robe, hat w:40 / hat good_item, \ hat w:20 / hat good_item KITEM: 9e = book of minor magic SUBST: - = + @@ -1865,14 +1865,14 @@ NAME: hangedman_elemental_death_ray DEPTH: Depths MONS: deep dwarf ; wand of cold | wand of frost w:5 . \ staff of fire w:15 | quarterstaff ego:flaming w:14 | rod of fiery destruction w:1 . \ - robe race:none ego:fire_resistance w:15 | \ - robe race:none ego:cold_resistance w:14 | \ - robe race:none ego:resistance w:1 + robe ego:fire_resistance w:15 | \ + robe ego:cold_resistance w:14 | \ + robe ego:resistance w:1 MONS: deep dwarf ; wand of fire | wand of flame w:5 . \ staff of cold w:15 | quarterstaff ego:freezing w:15 | \ - robe race:none ego:fire_resistance w:15 | \ - robe race:none ego:cold_resistance w:14 | \ - robe race:none ego:resistance w:1 + robe ego:fire_resistance w:15 | \ + robe ego:cold_resistance w:14 | \ + robe ego:resistance w:1 MONS: simulacrum, fire elemental ITEM: nothing, lamp of fire SHUFFLE: 12, 3df / 4eF @@ -5304,21 +5304,16 @@ NAME: grunt_guarded_unrand_arga DEPTH: Depths WEIGHT: 3 # KMONS is used here to get the fallback to work properly. -KMONS: W = Wiglaf ; broad axe unrand:arga . \ - shield race:dwarven . \ - chain mail w:8 race:dwarven | \ - plate armour w:10 race:dwarven | \ - crystal plate armour w:1 race:dwarven, \ +KMONS: W = Wiglaf ; broad axe unrand:arga . shield . \ + chain mail w:8 | plate armour w:10 | crystal plate armour w:1, \ deep dwarf name:berserker n_suf god:trog hd:8 col:lightred \ spells:brothers_in_arms;.;trog's_hand;berserker_rage;.;. priest_spells \ - ; broad axe unrand:arga . \ - chain mail w:7 race:dwarven | \ - plate armour w:1 race:dwarven + ; broad axe unrand:arga . \ + chain mail w:7 | plate armour w:1 KMONS: J = Jorgrun, deep dwarf death knight MONS: deep dwarf name:berserker n_suf god:trog hd:8 col:lightred \ spells:brothers_in_arms;.;trog's_hand;berserker_rage;.;. priest_spells \ - ; broad axe good_item . \ - chain mail race:dwarven + ; broad axe good_item . chain mail MONS: deep dwarf death knight w:5 / nothing MONS: deep dwarf SUBST: X = x. @@ -5348,8 +5343,8 @@ NAME: grunt_unrand_guarded_doom_knight WEIGHT: 3 MONS: deep dwarf death knight ; \ great sword unrand:sword_of_the_doom_knight . \ - chain mail race:dwarven w:7 | \ - plate armour race:dwarven w:1 + chain mail w:7 | \ + plate armour w:1 MONS: profane servitor, bone dragon, ghoul, death cob, skeletal warrior MONS: freezing wraith / phantasmal warrior / \ flaming corpse / flayed ghost / skeletal warrior diff --git a/crawl-ref/source/mapdef.cc b/crawl-ref/source/mapdef.cc index dfbeb59..26b3709 100644 --- a/crawl-ref/source/mapdef.cc +++ b/crawl-ref/source/mapdef.cc @@ -5090,21 +5090,8 @@ item_spec item_list::parse_single_spec(string s) } string ego_str = strip_tag_prefix(s, "ego:"); - string race_str = strip_tag_prefix(s, "race:"); - if (race_str == "elven") - result.race = MAKE_ITEM_ELVEN; - else if (race_str == "dwarven") - result.race = MAKE_ITEM_DWARVEN; - else if (race_str == "orcish") - result.race = MAKE_ITEM_ORCISH; - else if (race_str == "none" || race_str == "no_race") - result.race = MAKE_ITEM_NO_RACE; - else if (!race_str.empty()) - { - error = make_stringf("Bad race: %s", race_str.c_str()); - return result; - } + result.race = MAKE_ITEM_NO_RACE; string id_str = strip_tag_prefix(s, "ident:"); if (id_str == "all") -- 1.9.0 From 95c03e96babb1bca27c769e65da733e1da1a6f7f Mon Sep 17 00:00:00 2001 From: Chris Oelmueller <chris.oelmueller@gmail.com> Date: Mon, 24 Feb 2014 21:01:14 +0100 Subject: Remove some references to racial armor and items Namely: - get_species_race - racial_description_string - set_|get_equip_race - _item_race_matches_monster - _racialise_starting_equipment Remove set/get_equip_race --- crawl-ref/source/decks.cc | 2 -- crawl-ref/source/itemname.cc | 21 --------------------- crawl-ref/source/itemname.h | 2 -- crawl-ref/source/itemprop.cc | 20 +------------------- crawl-ref/source/itemprop.h | 7 ++----- crawl-ref/source/makeitem.cc | 4 ---- crawl-ref/source/monster.cc | 14 -------------- crawl-ref/source/ng-setup.cc | 25 ------------------------- 8 files changed, 3 insertions(+), 92 deletions(-) diff --git a/crawl-ref/source/decks.cc b/crawl-ref/source/decks.cc index 38367a7..b3af435 100644 --- a/crawl-ref/source/decks.cc +++ b/crawl-ref/source/decks.cc @@ -2608,8 +2608,6 @@ static void _summon_dancing_weapon(int power, deck_rarity_type rarity) ASSERT(mon->weapon() != NULL); item_def& wpn(*mon->weapon()); - set_equip_race(wpn, ISFLAG_NO_RACE); - if (power_level == 0) { // Wimpy, negative-enchantment weapon. diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc index 73e8351..d258a2e 100644 --- a/crawl-ref/source/itemname.cc +++ b/crawl-ref/source/itemname.cc @@ -1129,21 +1129,6 @@ static const char* rod_type_name(int type) } } -const char* racial_description_string(const item_def& item, bool terse) -{ - switch (get_equip_race(item)) - { - case ISFLAG_ORCISH: - return terse ? "orc " : "orcish "; - case ISFLAG_ELVEN: - return terse ? "elf " : "elven "; - case ISFLAG_DWARVEN: - return terse ? "dwarf " : "dwarven "; - default: - return ""; - } -} - string base_type_string(const item_def &item, bool known) { return base_type_string(item.base_type, known); @@ -1487,12 +1472,6 @@ string item_def::name_aux(description_level_type desc, bool terse, bool ident, } } - if (!basename && !dbname) - { - // always give racial description (has game effects) - buff << racial_description_string(*this, terse); - } - buff << item_base_name(*this); if (know_ego && !is_artefact(*this)) diff --git a/crawl-ref/source/itemname.h b/crawl-ref/source/itemname.h index c3e46be..80a81b1 100644 --- a/crawl-ref/source/itemname.h +++ b/crawl-ref/source/itemname.h @@ -81,8 +81,6 @@ enum bool is_vowel(const ucs_t chr); -const char* racial_description_string(const item_def& item, bool terse = false); - void check_item_knowledge(bool unknown_items = false); void display_runes(); diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc index ce50e57..b97e0d4 100644 --- a/crawl-ref/source/itemprop.cc +++ b/crawl-ref/source/itemprop.cc @@ -788,23 +788,13 @@ bool fully_identified(const item_def& item) } // -// Equipment race and description: +// Equipment description: // -iflags_t get_equip_race(const item_def &item) -{ - return item.flags & ISFLAG_RACIAL_MASK; -} - iflags_t get_equip_desc(const item_def &item) { return item.flags & ISFLAG_COSMETIC_MASK; } -void set_equip_race(item_def &item, iflags_t flags) -{ - return; -} - void set_equip_desc(item_def &item, iflags_t flags) { ASSERT((flags & ~ISFLAG_COSMETIC_MASK) == 0); @@ -813,14 +803,6 @@ void set_equip_desc(item_def &item, iflags_t flags) item.flags |= flags; } -iflags_t get_species_race(species_type sp) -{ - return you.species == SP_DEEP_DWARF ? ISFLAG_DWARVEN : - player_genus(GENPC_ELVEN) ? ISFLAG_ELVEN : - player_genus(GENPC_ORCISH) ? ISFLAG_ORCISH - : 0; -} - bool is_helmet(const item_def& item) { return item.base_type == OBJ_ARMOUR && get_armour_slot(item) == EQ_HELMET; diff --git a/crawl-ref/source/itemprop.h b/crawl-ref/source/itemprop.h index d89b631..af136c1 100644 --- a/crawl-ref/source/itemprop.h +++ b/crawl-ref/source/itemprop.h @@ -29,12 +29,9 @@ void set_ident_flags(item_def &item, iflags_t flags); void unset_ident_flags(item_def &item, iflags_t flags); bool fully_identified(const item_def &item) PURE; -// racial item and item descriptions: -void set_equip_race(item_def &item, iflags_t flags); -void set_equip_desc(item_def &item, iflags_t flags); -iflags_t get_equip_race(const item_def &item) PURE; +// item descriptions: +void set_equip_desc(item_def &item, iflags_t flags); iflags_t get_equip_desc(const item_def &item) PURE; -iflags_t get_species_race(species_type sp) IMMUTABLE; bool is_helmet(const item_def &item) PURE; bool is_hard_helmet(const item_def &item) PURE; diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc index 0c26dd2..f621638 100644 --- a/crawl-ref/source/makeitem.cc +++ b/crawl-ref/source/makeitem.cc @@ -1464,8 +1464,6 @@ static void _generate_weapon_item(item_def& item, bool allow_uniques, item.plus = 0; item.plus2 = 0; - set_equip_race(item, ISFLAG_NO_RACE); - if (item_level < 0) { // Thoroughly damaged, could had been good once. @@ -1779,8 +1777,6 @@ static void _generate_missile_item(item_def& item, int force_type, return; } - set_equip_race(item, ISFLAG_NO_RACE); - if (!no_brand) { set_item_ego_type(item, OBJ_MISSILES, diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc index 57c558a..f13f827 100644 --- a/crawl-ref/source/monster.cc +++ b/crawl-ref/source/monster.cc @@ -1579,20 +1579,6 @@ static int _ego_damage_bonus(item_def &item) } } -static bool _item_race_matches_monster(const item_def &item, monster* mons) -{ - if (get_equip_race(item) == ISFLAG_ELVEN) - return mons_genus(mons->type) == MONS_ELF; - - if (get_equip_race(item) == ISFLAG_DWARVEN) - return mons_genus(mons->type) == MONS_DWARF; - - if (get_equip_race(item) == ISFLAG_ORCISH) - return mons_genus(mons->type) == MONS_ORC; - - return false; -} - bool monster::pickup_melee_weapon(item_def &item, int near) { // Draconian monks are masters of unarmed combat. diff --git a/crawl-ref/source/ng-setup.cc b/crawl-ref/source/ng-setup.cc index 0d3e12d..a5fe090 100644 --- a/crawl-ref/source/ng-setup.cc +++ b/crawl-ref/source/ng-setup.cc @@ -1098,30 +1098,6 @@ static void _mark_starting_books() mark_had_book(you.inv[i]); } -static void _racialise_starting_equipment() -{ - for (int i = 0; i < ENDOFPACK; ++i) - { - if (you.inv[i].defined()) - { - if (is_useless_item(you.inv[i])) - _newgame_clear_item(i); - // Don't change object type modifier unless it starts plain. - else if (you.inv[i].base_type == OBJ_WEAPONS - && get_equip_race(you.inv[i]) == ISFLAG_NO_RACE) - { - // Now add appropriate species type mod. - if (player_genus(GENPC_ELVEN)) - set_equip_race(you.inv[i], ISFLAG_ELVEN); - else if (you.species == SP_DEEP_DWARF) - set_equip_race(you.inv[i], ISFLAG_DWARVEN); - else if (player_genus(GENPC_ORCISH)) - set_equip_race(you.inv[i], ISFLAG_ORCISH); - } - } - } -} - static void _give_basic_spells(job_type which_job) { // Wanderers may or may not already have a spell. - bwr @@ -1337,7 +1313,6 @@ static void _setup_generic(const newgame_def& ng) _give_basic_spells(you.char_class); _give_basic_knowledge(you.char_class); - _racialise_starting_equipment(); initialise_item_descriptions(); for (int i = 0; i < ENDOFPACK; ++i) -- 1.9.0 From ae3cf16ac5e05fb67abc504089f8a5ac364d5bca Mon Sep 17 00:00:00 2001 From: Chris Oelmueller <chris.oelmueller@gmail.com> Date: Mon, 24 Feb 2014 21:59:14 +0100 Subject: Remove MAKE_ITEM_* as well This removes the logic for creating racial items. --- crawl-ref/source/acquire.cc | 6 +-- crawl-ref/source/dgn-labyrinth.cc | 3 +- crawl-ref/source/dungeon.cc | 34 ++-------------- crawl-ref/source/godprayer.cc | 6 +-- crawl-ref/source/makeitem.cc | 10 +---- crawl-ref/source/makeitem.h | 14 +------ crawl-ref/source/mapdef.cc | 3 -- crawl-ref/source/mapdef.h | 4 +- crawl-ref/source/misc.cc | 3 +- crawl-ref/source/mon-gear.cc | 84 ++++++++------------------------------- crawl-ref/source/religion.cc | 6 +-- crawl-ref/source/wiz-item.cc | 3 +- crawl-ref/source/xom.cc | 7 +--- 13 files changed, 36 insertions(+), 147 deletions(-) diff --git a/crawl-ref/source/acquire.cc b/crawl-ref/source/acquire.cc index 246147d..1fb5240 100644 --- a/crawl-ref/source/acquire.cc +++ b/crawl-ref/source/acquire.cc @@ -1186,8 +1186,7 @@ int acquirement_create_item(object_class_type class_wanted, want_arts = false; thing_created = items(want_arts, class_wanted, type_wanted, true, - ITEM_LEVEL, MAKE_ITEM_RANDOM_RACE, - 0, 0, agent); + ITEM_LEVEL, 0, 0, 0, agent); if (thing_created == NON_ITEM) continue; @@ -1251,8 +1250,7 @@ int acquirement_create_item(object_class_type class_wanted, { destroy_item(thing_created, true); thing_created = items(true, OBJ_ARMOUR, at, true, - ITEM_LEVEL, MAKE_ITEM_RANDOM_RACE, - 0, 0, agent); + ITEM_LEVEL, 0, 0, 0, agent); } else if (agent != GOD_XOM && one_chance_in(3)) { diff --git a/crawl-ref/source/dgn-labyrinth.cc b/crawl-ref/source/dgn-labyrinth.cc index 4678c60..3026d14 100644 --- a/crawl-ref/source/dgn-labyrinth.cc +++ b/crawl-ref/source/dgn-labyrinth.cc @@ -111,8 +111,7 @@ static void _labyrinth_place_items(const coord_def &end) const int treasure_item = items(1, glopop, OBJ_RANDOM, true, - one_chance_in(3)? env.absdepth0 * 3 : MAKE_GOOD_ITEM, - MAKE_ITEM_RANDOM_RACE); + one_chance_in(3) ? env.absdepth0 * 3 : MAKE_GOOD_ITEM); if (treasure_item != NON_ITEM) mitm[treasure_item].pos = end; diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc index df75c37..a895dec 100644 --- a/crawl-ref/source/dungeon.cc +++ b/crawl-ref/source/dungeon.cc @@ -4512,8 +4512,8 @@ retry: true, where) : spec.corpselike() ? _dgn_item_corpse(spec, where) : items(spec.allow_uniques, base_type, - spec.sub_type, true, level, spec.race, 0, - spec.ego, -1, spec.level == ISPEC_MUNDANE)); + spec.sub_type, true, level, 0, 0, spec.ego, -1, + spec.level == ISPEC_MUNDANE)); if (item_made != NON_ITEM && item_made != -1) { @@ -4578,15 +4578,6 @@ static void _dgn_give_mon_spec_items(mons_spec &mspec, mon->inv[i] = NON_ITEM; } - item_make_species_type racial = MAKE_ITEM_RANDOM_RACE; - - if (mons_genus(type) == MONS_ORC) - racial = MAKE_ITEM_ORCISH; - else if (mons_genus(type) == MONS_DWARF) - racial = MAKE_ITEM_DWARVEN; - else if (mons_genus(type) == MONS_ELF) - racial = MAKE_ITEM_ELVEN; - item_list &list = mspec.items; const int size = list.size(); @@ -4607,22 +4598,6 @@ static void _dgn_give_mon_spec_items(mons_spec &mspec, spec.ego = SP_FORBID_EGO; } - // Gives orcs and elves appropriate racial gear, unless - // otherwise specified. - if (spec.race == MAKE_ITEM_RANDOM_RACE) - { - // But don't automatically give elves elven boots or - // elven cloaks, or the same for dwarves. - if ((racial != MAKE_ITEM_ELVEN - && racial != MAKE_ITEM_DWARVEN) - || spec.base_type != OBJ_ARMOUR - || (spec.sub_type != ARM_CLOAK - && spec.sub_type != ARM_BOOTS)) - { - spec.race = racial; - } - } - int item_level = mspec.place.absdepth(); if (spec.level >= 0) @@ -4650,7 +4625,7 @@ static void _dgn_give_mon_spec_items(mons_spec &mspec, _dgn_item_corpse(spec, mon->pos()) : items(spec.allow_uniques, spec.base_type, spec.sub_type, true, item_level, - spec.race, 0, spec.ego, -1, + 0, 0, spec.ego, -1, spec.level == ISPEC_MUNDANE)); if (item_made != NON_ITEM && item_made != -1) @@ -5585,8 +5560,7 @@ static void _place_spec_shop(const coord_def& where, else { orb = items(1, basetype, subtype, true, - one_chance_in(4) ? MAKE_GOOD_ITEM : item_level, - MAKE_ITEM_RANDOM_RACE); + one_chance_in(4) ? MAKE_GOOD_ITEM : item_level); } // Try for a better selection. diff --git a/crawl-ref/source/godprayer.cc b/crawl-ref/source/godprayer.cc index cc86729..c1b12b3 100644 --- a/crawl-ref/source/godprayer.cc +++ b/crawl-ref/source/godprayer.cc @@ -260,8 +260,7 @@ static bool _altar_prayer() } int thing_created = items(1, OBJ_BOOKS, BOOK_NECRONOMICON, true, 1, - MAKE_ITEM_RANDOM_RACE, - 0, 0, you.religion); + 0, 0, 0, you.religion); if (thing_created == NON_ITEM) return false; @@ -535,8 +534,7 @@ static void _ashenzari_sac_scroll(const item_def& item) jwl, SCR_CURSE_JEWELLERY, 0); } - int it = items(0, OBJ_SCROLLS, scr, true, 0, MAKE_ITEM_NO_RACE, - 0, 0, GOD_ASHENZARI); + int it = items(0, OBJ_SCROLLS, scr, true, 0, 0, 0, 0, GOD_ASHENZARI); if (it == NON_ITEM) { mpr("You feel the world is against you."); diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc index f621638..316e8c7 100644 --- a/crawl-ref/source/makeitem.cc +++ b/crawl-ref/source/makeitem.cc @@ -2803,7 +2803,7 @@ int items(bool allow_uniques, int force_type, // desired SUBTYPE - enum varies by OBJ bool dont_place, // don't randomly place item on level int item_level, // level of the item, can differ from global - int item_race, // weapon racial categories / type of rune + int rune_type, // type of rune uint32_t mapmask, int force_ego, // desired ego/brand int agent, // acquirement agent, if not -1 @@ -3298,11 +3298,6 @@ void item_set_appearance(item_def &item) } } -void maybe_set_armour_race(item_def &item, int allowed, int num_rolls) -{ - return; -} - #if defined(DEBUG_DIAGNOSTICS) || defined(DEBUG_TESTS) static int _test_item_level() { @@ -3369,8 +3364,7 @@ void makeitem_tests() _generate_armour_item(item, coinflip(), type, - level, - MAKE_ITEM_RANDOM_RACE); + level); } } #endif diff --git a/crawl-ref/source/makeitem.h b/crawl-ref/source/makeitem.h index 3f5a462..95c795c 100644 --- a/crawl-ref/source/makeitem.h +++ b/crawl-ref/source/makeitem.h @@ -8,20 +8,11 @@ #include "itemprop-enum.h" -enum item_make_species_type -{ - MAKE_ITEM_ELVEN = 1, - MAKE_ITEM_DWARVEN = 2, - MAKE_ITEM_ORCISH = 3, - - MAKE_ITEM_NO_RACE = 100, - MAKE_ITEM_RANDOM_RACE = 250, -}; - int create_item_named(string name, coord_def pos, string *error); int items(bool allow_uniques, object_class_type force_class, int force_type, - bool dont_place, int item_level, int item_race, + bool dont_place, int item_level, + int rune_type = 0, uint32_t mapmask = 0, int force_ego = 0, int agent = -1, bool mundane = false); @@ -31,7 +22,6 @@ void init_rod_mp(item_def &item, int ncharges = -1, int item_level = -1); jewellery_type get_random_ring_type(); jewellery_type get_random_amulet_type(); void item_set_appearance(item_def &item); -void maybe_set_armour_race(item_def &item, int allowed, int num_rolls = 1); bool is_weapon_brand_ok(int type, int brand, bool strict); bool is_armour_brand_ok(int type, int brand, bool strict); diff --git a/crawl-ref/source/mapdef.cc b/crawl-ref/source/mapdef.cc index 26b3709..c427806 100644 --- a/crawl-ref/source/mapdef.cc +++ b/crawl-ref/source/mapdef.cc @@ -4513,7 +4513,6 @@ item_spec &item_spec::operator = (const item_spec &other) ego = other.ego; allow_uniques = other.allow_uniques; level = other.level; - race = other.race; item_special = other.item_special; qty = other.qty; acquirement_source = other.acquirement_source; @@ -5091,8 +5090,6 @@ item_spec item_list::parse_single_spec(string s) string ego_str = strip_tag_prefix(s, "ego:"); - result.race = MAKE_ITEM_NO_RACE; - string id_str = strip_tag_prefix(s, "ident:"); if (id_str == "all") result.props["ident"].get_int() = ISFLAG_IDENT_MASK; diff --git a/crawl-ref/source/mapdef.h b/crawl-ref/source/mapdef.h index a780f2c..8a09eff 100644 --- a/crawl-ref/source/mapdef.h +++ b/crawl-ref/source/mapdef.h @@ -548,7 +548,6 @@ public: int ego; int allow_uniques; int level; - int race; int item_special; int qty; int acquirement_source; @@ -559,8 +558,7 @@ public: item_spec() : genweight(10), base_type(OBJ_RANDOM), sub_type(OBJ_RANDOM), plus(-1), plus2(-1), ego(0), allow_uniques(1), level(-1), - race(MAKE_ITEM_RANDOM_RACE), item_special(0), qty(0), - acquirement_source(0), place(), props(), + item_special(0), qty(0), acquirement_source(0), place(), props(), _corpse_monster_spec(NULL) { } diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index bb01367..4a5e225 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -111,8 +111,7 @@ static void _create_monster_hide(const item_def corpse) die("an unknown hide drop"); } - int o = items(0, OBJ_ARMOUR, type, true, 0, MAKE_ITEM_NO_RACE, 0, 0, -1, - true); + int o = items(0, OBJ_ARMOUR, type, true, 0, 0, 0, 0, -1, true); if (o == NON_ITEM) return; item_def& item = mitm[o]; diff --git a/crawl-ref/source/mon-gear.cc b/crawl-ref/source/mon-gear.cc index 0c267d5..fbee2ab 100644 --- a/crawl-ref/source/mon-gear.cc +++ b/crawl-ref/source/mon-gear.cc @@ -213,7 +213,6 @@ static item_def* make_item_for_monster( object_class_type base, int subtype, int level, - item_make_species_type race, int allow_uniques, iflags_t flags); @@ -1159,7 +1158,7 @@ static void _give_weapon(monster* mon, int level, bool melee_only = false, set_item_ego_type(item, OBJ_WEAPONS, SPWPN_FREEZING); // this might not be the best place for this logic, but: make_item_for_monster(mon, OBJ_JEWELLERY, RING_ICE, - 0, MAKE_ITEM_NO_RACE, 1, ISFLAG_KNOW_TYPE); + 0, 1, ISFLAG_KNOW_TYPE); } item.flags |= ISFLAG_KNOW_TYPE; break; @@ -1573,7 +1572,7 @@ static void _give_weapon(monster* mon, int level, bool melee_only = false, // and subtype and create a new item. - bwr const int thing_created = ((force_item) ? get_mitm_slot() : items(0, xitc, xitt, true, - level, MAKE_ITEM_NO_RACE, 0, item.special)); + level, 0, 0, item.special)); if (thing_created == NON_ITEM) return; @@ -1628,7 +1627,7 @@ static void _give_ammo(monster* mon, int level, bool mons_summoned) xitt = MI_SLING_BULLET; } - const int thing_created = items(0, xitc, xitt, true, level, MAKE_ITEM_NO_RACE); + const int thing_created = items(0, xitc, xitt, true, level); if (thing_created == NON_ITEM) return; @@ -1811,8 +1810,7 @@ static void _give_ammo(monster* mon, int level, bool mons_summoned) if (weap_type == -1) return; - const int thing_created = - items(0, OBJ_MISSILES, weap_type, true, level, MAKE_ITEM_NO_RACE); + const int thing_created = items(0, OBJ_MISSILES, weap_type, true, level); if (thing_created != NON_ITEM) { @@ -1832,7 +1830,6 @@ static item_def* make_item_for_monster( object_class_type base, int subtype, int level, - item_make_species_type race = MAKE_ITEM_NO_RACE, int allow_uniques = 0, iflags_t flags = 0) { @@ -1841,7 +1838,7 @@ static item_def* make_item_for_monster( return 0; const int thing_created = - items(allow_uniques, base, subtype, true, level, race); + items(allow_uniques, base, subtype, true, level); if (thing_created == NON_ITEM) return 0; @@ -1871,12 +1868,12 @@ static void _give_shield(monster* mon, int level) { case MONS_ASTERION: make_item_for_monster(mon, OBJ_ARMOUR, ARM_SHIELD, - level * 2 + 1, MAKE_ITEM_RANDOM_RACE, 1); + level * 2 + 1, 1); break; case MONS_DAEVA: case MONS_MENNAS: make_item_for_monster(mon, OBJ_ARMOUR, ARM_LARGE_SHIELD, - level * 2 + 1, MAKE_ITEM_NO_RACE, 1); + level * 2 + 1, 1); break; case MONS_CHERUB: @@ -1884,8 +1881,7 @@ static void _give_shield(monster* mon, int level) && main_weap->sub_type == WPN_SLING) { // Big shields interfere with ranged combat, at least theme-wise. - make_item_for_monster(mon, OBJ_ARMOUR, ARM_BUCKLER, - level, MAKE_ITEM_NO_RACE, 1); + make_item_for_monster(mon, OBJ_ARMOUR, ARM_BUCKLER, level, 1); } break; @@ -1923,7 +1919,7 @@ static void _give_shield(monster* mon, int level) { make_item_for_monster(mon, OBJ_ARMOUR, coinflip() ? ARM_LARGE_SHIELD : ARM_SHIELD, - level, MAKE_ITEM_NO_RACE); + level); } break; case MONS_TENGU_WARRIOR: @@ -1970,15 +1966,15 @@ static void _give_shield(monster* mon, int level) break; case MONS_NORRIS: make_item_for_monster(mon, OBJ_ARMOUR, ARM_BUCKLER, - level * 2 + 1, MAKE_ITEM_NO_RACE, 1); + level * 2 + 1, 1); break; case MONS_WIGLAF: make_item_for_monster(mon, OBJ_ARMOUR, ARM_SHIELD, - level * 2 + 1, MAKE_ITEM_NO_RACE, 1); + level * 2 + 1, 1); break; case MONS_LOUISE: shield = make_item_for_monster(mon, OBJ_ARMOUR, ARM_LARGE_SHIELD, - level * 2 + 1, MAKE_ITEM_NO_RACE, 1); + level * 2 + 1, 1); if (shield && !is_artefact(*shield)) { shield->props["item_tile_name"] = "lshield_louise"; @@ -1988,7 +1984,7 @@ static void _give_shield(monster* mon, int level) break; case MONS_DONALD: shield = make_item_for_monster(mon, OBJ_ARMOUR, ARM_SHIELD, - level * 2 + 1, MAKE_ITEM_NO_RACE, 1); + level * 2 + 1, 1); if (shield) { @@ -2008,7 +2004,7 @@ static void _give_shield(monster* mon, int level) break; case MONS_NIKOLA: shield = make_item_for_monster(mon, OBJ_ARMOUR, ARM_GLOVES, - level * 2 + 1, MAKE_ITEM_NO_RACE, 1); + level * 2 + 1, 1); if (shield) // gauntlets { @@ -2039,7 +2035,6 @@ static void _give_shield(monster* mon, int level) static void _give_armour(monster* mon, int level, bool spectral_orcs) { item_def item; - item_make_species_type item_race = MAKE_ITEM_RANDOM_RACE; item.base_type = OBJ_UNASSIGNED; item.quantity = 1; @@ -2054,11 +2049,11 @@ static void _give_armour(monster* mon, int level, bool spectral_orcs) { case MONS_DEEP_ELF_BLADEMASTER: case MONS_DEEP_ELF_MASTER_ARCHER: - item_race = MAKE_ITEM_NO_RACE; item.base_type = OBJ_ARMOUR; item.sub_type = ARM_LEATHER_ARMOUR; break; + case MONS_IJYB: case MONS_DUVESSA: case MONS_ELF: case MONS_DEEP_ELF_ANNIHILATOR: @@ -2072,16 +2067,9 @@ static void _give_armour(monster* mon, int level, bool spectral_orcs) case MONS_DEEP_ELF_PRIEST: case MONS_DEEP_ELF_SORCERER: case MONS_DEEP_ELF_SUMMONER: - if (item_race == MAKE_ITEM_RANDOM_RACE) - item_race = MAKE_ITEM_ELVEN; - // deliberate fall through {dlb} - - case MONS_IJYB: case MONS_ORC: case MONS_ORC_HIGH_PRIEST: case MONS_ORC_PRIEST: - if (item_race == MAKE_ITEM_RANDOM_RACE) - item_race = MAKE_ITEM_ORCISH; if (x_chance_in_y(2, 5)) { item.base_type = OBJ_ARMOUR; @@ -2102,17 +2090,14 @@ static void _give_armour(monster* mon, int level, bool spectral_orcs) level = MAKE_GOOD_ITEM; item.base_type = OBJ_ARMOUR; item.sub_type = ARM_ROBE; - item_race = MAKE_ITEM_NO_RACE; break; case MONS_HAROLD: item.base_type = OBJ_ARMOUR; item.sub_type = ARM_RING_MAIL; - item_race = MAKE_ITEM_NO_RACE; break; case MONS_GNOLL_SHAMAN: - item_race = MAKE_ITEM_NO_RACE; item.base_type = OBJ_ARMOUR; item.sub_type = coinflip() ? ARM_ROBE : ARM_LEATHER_ARMOUR; break; @@ -2122,7 +2107,6 @@ static void _give_armour(monster* mon, int level, bool spectral_orcs) // deliberate fall-through case MONS_GNOLL_SERGEANT: case MONS_TENGU_REAVER: - item_race = MAKE_ITEM_NO_RACE; item.base_type = OBJ_ARMOUR; item.sub_type = coinflip() ? ARM_RING_MAIL : ARM_SCALE_MAIL; if (type == MONS_TENGU_REAVER && one_chance_in(3)) @@ -2166,7 +2150,6 @@ static void _give_armour(monster* mon, int level, bool spectral_orcs) case MONS_WIGLAF: if (one_chance_in(3)) level = MAKE_GOOD_ITEM; - item_race = MAKE_ITEM_NO_RACE; item.base_type = OBJ_ARMOUR; item.sub_type = random_choose_weighted(8, ARM_CHAIN_MAIL, 10, ARM_PLATE_ARMOUR, @@ -2177,7 +2160,6 @@ static void _give_armour(monster* mon, int level, bool spectral_orcs) case MONS_JORGRUN: if (one_chance_in(3)) level = MAKE_GOOD_ITEM; - item_race = MAKE_ITEM_NO_RACE; item.base_type = OBJ_ARMOUR; item.sub_type = ARM_ROBE; break; @@ -2186,7 +2168,6 @@ static void _give_armour(monster* mon, int level, bool spectral_orcs) // Don't pre-equip the Lab minotaur. if (player_in_branch(BRANCH_LABYRINTH) && !(mon->flags & MF_NO_REWARD)) break; - item_race = MAKE_ITEM_NO_RACE; // deliberate fall through case MONS_ORC_WARLORD: @@ -2198,10 +2179,6 @@ static void _give_armour(monster* mon, int level, bool spectral_orcs) case MONS_ORC_KNIGHT: case MONS_ORC_WARRIOR: - if (item_race == MAKE_ITEM_RANDOM_RACE) - item_race = MAKE_ITEM_ORCISH; - // deliberate fall through {dlb} - case MONS_HELL_KNIGHT: case MONS_LOUISE: case MONS_DONALD: @@ -2243,13 +2220,11 @@ static void _give_armour(monster* mon, int level, bool spectral_orcs) case MONS_FORMICID_VENOM_MAGE: case MONS_HELLBINDER: case MONS_SALAMANDER_MYSTIC: - item_race = MAKE_ITEM_NO_RACE; item.base_type = OBJ_ARMOUR; item.sub_type = ARM_ROBE; break; case MONS_FORMICID: - item_race = MAKE_ITEM_NO_RACE; item.base_type = OBJ_ARMOUR; item.sub_type = random_choose_weighted(5, ARM_SCALE_MAIL, 3, ARM_CHAIN_MAIL, @@ -2260,7 +2235,6 @@ static void _give_armour(monster* mon, int level, bool spectral_orcs) case MONS_DWARF: case MONS_DEEP_DWARF: case MONS_DEEP_DWARF_DEATH_KNIGHT: - item_race = MAKE_ITEM_NO_RACE; item.base_type = OBJ_ARMOUR; item.sub_type = random_choose_weighted(7, ARM_CHAIN_MAIL, 1, ARM_PLATE_ARMOUR, @@ -2268,7 +2242,6 @@ static void _give_armour(monster* mon, int level, bool spectral_orcs) break; case MONS_MERFOLK_IMPALER: - item_race = MAKE_ITEM_NO_RACE; item.base_type = OBJ_ARMOUR; item.sub_type = random_choose_weighted(100, ARM_ROBE, 60, ARM_LEATHER_ARMOUR, @@ -2278,13 +2251,11 @@ static void _give_armour(monster* mon, int level, bool spectral_orcs) break; case MONS_MERFOLK_JAVELINEER: - item_race = MAKE_ITEM_NO_RACE; item.base_type = OBJ_ARMOUR; item.sub_type = ARM_LEATHER_ARMOUR; break; case MONS_OCTOPODE: - item_race = MAKE_ITEM_NO_RACE; item.base_type = OBJ_ARMOUR; item.sub_type = ARM_HAT; break; @@ -2293,14 +2264,12 @@ static void _give_armour(monster* mon, int level, bool spectral_orcs) case MONS_CHERUB: case MONS_SIGMUND: case MONS_WIGHT: - item_race = MAKE_ITEM_NO_RACE; item.base_type = OBJ_ARMOUR; item.sub_type = ARM_ROBE; break; case MONS_SERAPH: level = MAKE_GOOD_ITEM; - item_race = MAKE_ITEM_NO_RACE; item.base_type = OBJ_ARMOUR; // obscenely good, don't ever place them randomly item.sub_type = coinflip() ? ARM_PEARL_DRAGON_ARMOUR @@ -2335,7 +2304,6 @@ static void _give_armour(monster* mon, int level, bool spectral_orcs) mon->type == MONS_GREATER_NAGA ? 100 : 200)) { - item_race = MAKE_ITEM_NO_RACE; item.base_type = OBJ_ARMOUR; item.sub_type = ARM_NAGA_BARDING; } @@ -2343,7 +2311,6 @@ static void _give_armour(monster* mon, int level, bool spectral_orcs) || mon->type == MONS_NAGA_RITUALIST || one_chance_in(3)) { - item_race = MAKE_ITEM_NO_RACE; item.base_type = OBJ_ARMOUR; item.sub_type = ARM_ROBE; } @@ -2352,7 +2319,6 @@ static void _give_armour(monster* mon, int level, bool spectral_orcs) break; case MONS_VASHNIA: - item_race = MAKE_ITEM_NO_RACE; item.base_type = OBJ_ARMOUR; item.sub_type = ARM_NAGA_BARDING; level = MAKE_GOOD_ITEM; @@ -2360,7 +2326,6 @@ static void _give_armour(monster* mon, int level, bool spectral_orcs) case MONS_TENGU_WARRIOR: case MONS_DEMONSPAWN: - item_race = MAKE_ITEM_NO_RACE; item.base_type = OBJ_ARMOUR; item.sub_type = coinflip() ? ARM_LEATHER_ARMOUR : ARM_RING_MAIL; break; @@ -2373,7 +2338,6 @@ static void _give_armour(monster* mon, int level, bool spectral_orcs) } else { - item_race = MAKE_ITEM_NO_RACE; item.base_type = OBJ_ARMOUR; item.sub_type = ARM_HAT; @@ -2384,7 +2348,6 @@ static void _give_armour(monster* mon, int level, bool spectral_orcs) case MONS_MAURICE: case MONS_CRAZY_YIUF: - item_race = MAKE_ITEM_NO_RACE; item.base_type = OBJ_ARMOUR; item.sub_type = ARM_CLOAK; break; @@ -2401,8 +2364,6 @@ static void _give_armour(monster* mon, int level, bool spectral_orcs) } case MONS_DOWAN: - item_race = MAKE_ITEM_ELVEN; - // intentional fall-through case MONS_JESSICA: case MONS_KOBOLD_DEMONOLOGIST: case MONS_OGRE_MAGE: @@ -2416,8 +2377,6 @@ static void _give_armour(monster* mon, int level, bool spectral_orcs) case MONS_SPRIGGAN_ASSASSIN: case MONS_SPRIGGAN_ENCHANTER: case MONS_SPRIGGAN_DEFENDER: - if (item_race == MAKE_ITEM_RANDOM_RACE) - item_race = MAKE_ITEM_NO_RACE; item.base_type = OBJ_ARMOUR; item.sub_type = ARM_ROBE; break; @@ -2439,13 +2398,11 @@ static void _give_armour(monster* mon, int level, bool spectral_orcs) case MONS_DRACONIAN_MONK: case MONS_DRACONIAN_ZEALOT: case MONS_DRACONIAN_KNIGHT: - item_race = MAKE_ITEM_NO_RACE; item.base_type = OBJ_ARMOUR; item.sub_type = ARM_CLOAK; break; case MONS_SPRIGGAN_DRUID: - item_race = MAKE_ITEM_NO_RACE; item.base_type = OBJ_ARMOUR; item.sub_type = ARM_ROBE; break; @@ -2466,7 +2423,6 @@ static void _give_armour(monster* mon, int level, bool spectral_orcs) case MONS_ORC_WIZARD: case MONS_BLORK_THE_ORC: case MONS_NERGALLE: - item_race = MAKE_ITEM_NO_RACE; item.base_type = OBJ_ARMOUR; item.sub_type = ARM_ROBE; break; @@ -2483,19 +2439,16 @@ static void _give_armour(monster* mon, int level, bool spectral_orcs) break; case MONS_EUSTACHIO: - item_race = MAKE_ITEM_NO_RACE; item.base_type = OBJ_ARMOUR; item.sub_type = ARM_LEATHER_ARMOUR; break; case MONS_NESSOS: - item_race = MAKE_ITEM_NO_RACE; item.base_type = OBJ_ARMOUR; item.sub_type = ARM_CENTAUR_BARDING; break; case MONS_NIKOLA: - item_race = MAKE_ITEM_NO_RACE; item.base_type = OBJ_ARMOUR; item.sub_type = ARM_CLOAK; break; @@ -2507,7 +2460,6 @@ static void _give_armour(monster* mon, int level, bool spectral_orcs) case MONS_TORTUROUS_DEMONSPAWN: case MONS_CORRUPTER: case MONS_BLACK_SUN: - item_race = MAKE_ITEM_NO_RACE; item.base_type = OBJ_ARMOUR; item.sub_type = random_choose_weighted(2, ARM_LEATHER_ARMOUR, 3, ARM_RING_MAIL, @@ -2520,13 +2472,11 @@ static void _give_armour(monster* mon, int level, bool spectral_orcs) case MONS_BLOOD_SAINT: if (one_chance_in(3)) level = MAKE_GOOD_ITEM; - item_race = MAKE_ITEM_NO_RACE; item.base_type = OBJ_ARMOUR; item.sub_type = ARM_ROBE; break; case MONS_CHAOS_CHAMPION: - item_race = MAKE_ITEM_NO_RACE; item.base_type = OBJ_ARMOUR; if (one_chance_in(30)) { @@ -2553,7 +2503,6 @@ static void _give_armour(monster* mon, int level, bool spectral_orcs) case MONS_WARMONGER: if (coinflip()) level = MAKE_GOOD_ITEM; - item_race = MAKE_ITEM_NO_RACE; item.base_type = OBJ_ARMOUR; item.sub_type = random_choose_weighted( 50, ARM_CHAIN_MAIL, 100, ARM_PLATE_ARMOUR, @@ -2586,8 +2535,7 @@ static void _give_armour(monster* mon, int level, bool spectral_orcs) // force_item is set... otherwise we're just going to take the base // and subtype and create a new item. - bwr const int thing_created = - ((force_item) ? get_mitm_slot() : items(0, xitc, xitt, true, - level, item_race)); + ((force_item) ? get_mitm_slot() : items(0, xitc, xitt, true, level)); if (thing_created == NON_ITEM) return; diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index c66cab8..43bf255 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -1493,8 +1493,7 @@ static bool _give_nemelex_gift(bool forced = false) _show_pure_deck_chances(); #endif int thing_created = items(1, OBJ_MISCELLANY, gift_type, - true, 1, MAKE_ITEM_RANDOM_RACE, - 0, 0, GOD_NEMELEX_XOBEH); + true, 1, 0, 0, 0, GOD_NEMELEX_XOBEH); move_item_to_grid(&thing_created, you.pos(), true); @@ -2359,8 +2358,7 @@ bool do_god_gift(bool forced) else { int thing_created = items(1, OBJ_BOOKS, gift, true, 1, - MAKE_ITEM_RANDOM_RACE, - 0, 0, you.religion); + 0, 0, 0, you.religion); // Replace a Kiku gift by a custom-random book. if (you_worship(GOD_KIKUBAAQUDGHA)) { diff --git a/crawl-ref/source/wiz-item.cc b/crawl-ref/source/wiz-item.cc index f2f1224..e5a7b9a 100644 --- a/crawl-ref/source/wiz-item.cc +++ b/crawl-ref/source/wiz-item.cc @@ -45,8 +45,7 @@ static void _make_all_books() { for (int i = 0; i < NUM_FIXED_BOOKS; ++i) { - int thing = items(0, OBJ_BOOKS, i, true, 0, MAKE_ITEM_NO_RACE, - 0, 0, AQ_WIZMODE); + int thing = items(0, OBJ_BOOKS, i, true, 0, 0, 0, 0, AQ_WIZMODE); if (thing == NON_ITEM) continue; diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc index 9bd9849..73b250b 100644 --- a/crawl-ref/source/xom.cc +++ b/crawl-ref/source/xom.cc @@ -730,9 +730,7 @@ static void _xom_make_item(object_class_type base, int subtype, int power) { god_acting gdact(GOD_XOM); - int thing_created = - items(true, base, subtype, true, power, MAKE_ITEM_RANDOM_RACE, - 0, 0, GOD_XOM); + int thing_created = items(true, base, subtype, true, power, 0, 0, 0, GOD_XOM); if (feat_destroys_item(grd(you.pos()), mitm[thing_created], !silenced(you.pos()))) @@ -1653,8 +1651,7 @@ static int _xom_snakes_to_sticks(int sever, bool debug = false) : _xom_random_stickable(mi->hit_dice)); int thing_created = items(0, base_type, sub_type, true, - mi->hit_dice / 3 - 1, MAKE_ITEM_NO_RACE, - 0, -1, -1); + mi->hit_dice / 3 - 1, 0, 0, -1, -1); if (thing_created == NON_ITEM) continue; -- 1.9.0 From e2b9e1c9df77e8ea0fbfdb4188b1e3feba220c5c Mon Sep 17 00:00:00 2001 From: Chris Oelmueller <chris.oelmueller@gmail.com> Date: Mon, 24 Feb 2014 21:17:02 +0100 Subject: Schedule racial armor ISFLAG_* enums for removal or recycling --- crawl-ref/source/enum.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h index 3ccd461..499caff 100644 --- a/crawl-ref/source/enum.h +++ b/crawl-ref/source/enum.h @@ -1969,12 +1969,12 @@ enum item_status_flag_type // per item flags: ie. ident status, cursed status ISFLAG_NO_PICKUP = 0x00400000, // Monsters won't pick this up - ISFLAG_NO_RACE = 0x00000000, // used for clearing these flags - ISFLAG_ORCISH = 0x01000000, // low quality items - ISFLAG_DWARVEN = 0x02000000, // strong and robust items - ISFLAG_ELVEN = 0x04000000, // light and accurate items +#if TAG_MAJOR_VERSION == 34 + ISFLAG_UNUSED1 = 0x01000000, // was ISFLAG_ORCISH + ISFLAG_UNUSED2 = 0x02000000, // was ISFLAG_DWARVEN + ISFLAG_UNUSED3 = 0x04000000, // was ISFLAG_ELVEN ISFLAG_RACIAL_MASK = 0x07000000, // mask of racial equipment types - +#endif ISFLAG_NOTED_ID = 0x08000000, ISFLAG_NOTED_GET = 0x10000000, -- 1.9.0 |
||||||
|
Notes | |
(0025489) Kate (developer) 2014-03-06 11:25 |
Squashed (minus the corrosion change) and pushed, thanks! |
Mantis 1.1.8[^] Copyright © 2000 - 2009 Mantis Group |