diff options
author | Chris Oelmueller <chris.oelmueller@gmail.com> | 2014-02-12 19:32:20 +0100 |
---|---|---|
committer | Chris Campbell <chriscampbell89@gmail.com> | 2014-03-06 08:00:41 +0000 |
commit | 49e238f2a21cc04e99c3c945041b9d7e274b07b4 (patch) | |
tree | fb9c8db4f2a8feab049df88e63cdc404d2a5cf61 | |
parent | 12b0153de6c791cdc964519012ee819591b7a6f8 (diff) | |
download | crawl-ref-49e238f2a21cc04e99c3c945041b9d7e274b07b4.tar.gz crawl-ref-49e238f2a21cc04e99c3c945041b9d7e274b07b4.zip |
Don't generate racial armour
[It had much the same problems as racial weapons, with only very slightly more
significant effects. Some of the old effects of racial armour could potentially
be rethought and made into a new armour ego. Beogh still gives a (slightly
smaller than before) bonus for armour use, without the orcish requirement.
-MarvinPA]
43 files changed, 139 insertions, 720 deletions
diff --git a/crawl-ref/source/acquire.cc b/crawl-ref/source/acquire.cc index 8966ce835b..1fb5240bd5 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)) { @@ -1265,10 +1263,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/artefact.cc b/crawl-ref/source/artefact.cc index e539a9459b..63d354085b 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/dat/des/branches/abyss.des b/crawl-ref/source/dat/des/branches/abyss.des index 8530f434fd..4ec3d3ffd3 100644 --- a/crawl-ref/source/dat/des/branches/abyss.des +++ b/crawl-ref/source/dat/des/branches/abyss.des @@ -1330,7 +1330,7 @@ KITEM: 24d = scroll of random uselessness w:15 q:1 / sultana q:1 w:5 / \ 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 b9744ca1cd..c51ff1138e 100644 --- a/crawl-ref/source/dat/des/branches/forest.des +++ b/crawl-ref/source/dat/des/branches/forest.des @@ -761,10 +761,9 @@ SUBST: ' = '''B, . = ....b 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 7202fbd376..fbdae1c1f9 100644 --- a/crawl-ref/source/dat/des/branches/hell.des +++ b/crawl-ref/source/dat/des/branches/hell.des @@ -240,9 +240,8 @@ MONS: sun demon 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 f40e5a2a72..4f75ad50c1 100644 --- a/crawl-ref/source/dat/des/branches/orc.des +++ b/crawl-ref/source/dat/des/branches/orc.des @@ -663,7 +663,7 @@ MONS: patrolling orc high priest 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 078bf5ab98..fb3a0f8bb5 100644 --- a/crawl-ref/source/dat/des/branches/spider.des +++ b/crawl-ref/source/dat/des/branches/spider.des @@ -641,8 +641,7 @@ SUBST: z = v:1 z:14 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 @@ SUBST: z = v:1 z:14 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 @@ SUBST: z = v:1 z:14 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 0c1eb942ed..05bc1823c5 100644 --- a/crawl-ref/source/dat/des/portals/bailey.des +++ b/crawl-ref/source/dat/des/portals/bailey.des @@ -98,30 +98,20 @@ end 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 @@ end 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 @@ NSUBST: E = 1:+ / *:c : 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 8805e6d8ea..5705a8b123 100644 --- a/crawl-ref/source/dat/des/portals/lab.des +++ b/crawl-ref/source/dat/des/portals/lab.des @@ -239,10 +239,10 @@ dgn.delayed_decay_extra(_G, 'A', 'dwarf skeleton', 'battleaxe / ' .. "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 @@ dgn.delayed_decay_extra(_G, 'I', 'human skeleton', 'any armour, any weapon, ' -- 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 9bdb4fd757..11a8e64c16 100644 --- a/crawl-ref/source/dat/des/portals/volcano.des +++ b/crawl-ref/source/dat/des/portals/volcano.des @@ -238,12 +238,12 @@ function fiery_guardians (e, village) 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 @@ function fiery_guardians (e, village) .. " . 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 54e384d4cc..80cc17fad6 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 @@ function arena_sprint_init_boss_table() 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 7062523c95..6605e24f7b 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 abd795ce92..0a47041dda 100644 --- a/crawl-ref/source/dat/des/sprint/zigsprint.des +++ b/crawl-ref/source/dat/des/sprint/zigsprint.des @@ -711,15 +711,15 @@ KFEAT: p = altar_jiyva 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 0945c95a6d..9856a69735 100644 --- a/crawl-ref/source/dat/des/tutorial/lesson3.des +++ b/crawl-ref/source/dat/des/tutorial/lesson3.des @@ -29,7 +29,7 @@ ORIENT: encompass 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 992eab7473..5cb0dc526b 100644 --- a/crawl-ref/source/dat/des/tutorial/lesson4.des +++ b/crawl-ref/source/dat/des/tutorial/lesson4.des @@ -105,8 +105,8 @@ ITEM: scroll of amnesia ident:type 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 47950b6ee2..28a0049d07 100644 --- a/crawl-ref/source/dat/des/variable/grated_community.des +++ b/crawl-ref/source/dat/des/variable/grated_community.des @@ -283,8 +283,8 @@ KITEM: % = w:12 animal skin / hammer / hand axe /\ 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 e5d8271778..0515c610e5 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 @@ TAGS: no_monster_gen 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 @@ TAGS: transparent patrolling 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 @@ TAGS: no_monster_gen no_item_gen patrolling 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 @@ DEPTH: Depths, Crypt 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/decks.cc b/crawl-ref/source/decks.cc index 38367a7535..b3af43531c 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/describe.cc b/crawl-ref/source/describe.cc index a34e018c33..9bf82b566c 100644 --- a/crawl-ref/source/describe.cc +++ b/crawl-ref/source/describe.cc @@ -767,11 +767,6 @@ static string _corrosion_resistance_string(const item_def &item) 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)) @@ -1348,32 +1343,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"; - 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 += "."; - } - - 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/dgn-labyrinth.cc b/crawl-ref/source/dgn-labyrinth.cc index 4678c605be..3026d145ec 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 e6ccb8dc46..23472ef64d 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/enum.h b/crawl-ref/source/enum.h index 2d52e1ca78..b93cfa2943 100644 --- a/crawl-ref/source/enum.h +++ b/crawl-ref/source/enum.h @@ -1984,12 +1984,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, diff --git a/crawl-ref/source/godprayer.cc b/crawl-ref/source/godprayer.cc index cc86729375..c1b12b3473 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/itemname.cc b/crawl-ref/source/itemname.cc index 73e83519e4..d258a2e8e6 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 c3e46bed15..80a81b150c 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 6e10387c89..b97e0d4e1f 100644 --- a/crawl-ref/source/itemprop.cc +++ b/crawl-ref/source/itemprop.cc @@ -788,58 +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) -{ - 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; -} - void set_equip_desc(item_def &item, iflags_t flags) { ASSERT((flags & ~ISFLAG_COSMETIC_MASK) == 0); @@ -848,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; @@ -2589,15 +2536,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: diff --git a/crawl-ref/source/itemprop.h b/crawl-ref/source/itemprop.h index d89b631b7a..af136c161d 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/items.cc b/crawl-ref/source/items.cc index 278033dd1c..aff1438ea2 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -4107,8 +4107,7 @@ void corrode_item(item_def &item, actor *holder) // Corrosion-resistant items. if (item.base_type == OBJ_ARMOUR - && (item.sub_type == ARM_CRYSTAL_PLATE_ARMOUR - || get_equip_race(item) == ISFLAG_DWARVEN) + && item.sub_type == ARM_CRYSTAL_PLATE_ARMOUR && !one_chance_in(5)) { return; diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc index 484629d1ba..316e8c7dbe 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, @@ -1859,105 +1855,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 +2055,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 +2092,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 +2100,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 +2136,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 +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 / armour racial categories - // item_race also gives 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 @@ -3028,8 +2912,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: @@ -3415,25 +3298,6 @@ 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; - } -} - #if defined(DEBUG_DIAGNOSTICS) || defined(DEBUG_TESTS) static int _test_item_level() { @@ -3500,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 3f5a462b52..95c795c716 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 cd2a9bcc72..46ce9849dd 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; @@ -5090,21 +5089,6 @@ 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; - } string id_str = strip_tag_prefix(s, "ident:"); if (id_str == "all") diff --git a/crawl-ref/source/mapdef.h b/crawl-ref/source/mapdef.h index a780f2c991..8a09eff37b 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 bb013675bf..4a5e225975 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 057ededc14..fbee2abc43 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,16 +1881,14 @@ 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; 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; @@ -1911,15 +1906,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: @@ -1927,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: @@ -1941,25 +1933,17 @@ 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 - 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); - } + make_item_for_monster(mon, OBJ_ARMOUR, ARM_BUCKLER, level); break; + case MONS_TENGU_CONJURER: 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: @@ -1972,7 +1956,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"; @@ -1982,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_RANDOM_RACE, 1); + level * 2 + 1, 1); break; case MONS_WIGLAF: make_item_for_monster(mon, OBJ_ARMOUR, ARM_SHIELD, - level * 2 + 1, MAKE_ITEM_DWARVEN, 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_RANDOM_RACE, 1); + level * 2 + 1, 1); if (shield && !is_artefact(*shield)) { shield->props["item_tile_name"] = "lshield_louise"; @@ -2000,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_RANDOM_RACE, 1); + level * 2 + 1, 1); if (shield) { @@ -2020,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 { @@ -2035,15 +2019,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; @@ -2053,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; @@ -2068,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_ELVEN; 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: @@ -2086,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; @@ -2116,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; @@ -2136,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,9 +2136,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 +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_DWARVEN; item.base_type = OBJ_ARMOUR; item.sub_type = random_choose_weighted(8, ARM_CHAIN_MAIL, 10, ARM_PLATE_ARMOUR, @@ -2194,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; @@ -2203,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: @@ -2215,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: @@ -2260,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, @@ -2277,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_DWARVEN; item.base_type = OBJ_ARMOUR; item.sub_type = random_choose_weighted(7, ARM_CHAIN_MAIL, 1, ARM_PLATE_ARMOUR, @@ -2285,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, @@ -2295,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; @@ -2310,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 @@ -2352,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; } @@ -2360,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; } @@ -2369,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; @@ -2377,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; @@ -2390,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; @@ -2401,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; @@ -2413,14 +2359,11 @@ 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; } case MONS_DOWAN: - item_race = MAKE_ITEM_ELVEN; - // intentional fall-through case MONS_JESSICA: case MONS_KOBOLD_DEMONOLOGIST: case MONS_OGRE_MAGE: @@ -2434,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; @@ -2457,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; @@ -2484,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_ORCISH; item.base_type = OBJ_ARMOUR; item.sub_type = ARM_ROBE; break; @@ -2501,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; @@ -2525,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, @@ -2538,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)) { @@ -2571,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, @@ -2604,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/monster.cc b/crawl-ref/source/monster.cc index ad7ff35bd0..f13f827fe5 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. @@ -1954,22 +1940,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)) diff --git a/crawl-ref/source/ng-setup.cc b/crawl-ref/source/ng-setup.cc index 89fd6251b6..a5fe0904af 100644 --- a/crawl-ref/source/ng-setup.cc +++ b/crawl-ref/source/ng-setup.cc @@ -1098,31 +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_ARMOUR - || 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 @@ -1338,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) diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index a25c9343df..0e09517299 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) - { - // 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; + // an additional bonus for Beogh worshippers + if (you_worship(GOD_BEOGH) && !player_under_penance()) + { + 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; @@ -2652,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() @@ -2681,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) @@ -3882,7 +3841,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 +3857,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 +3880,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) diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index c66cab8ad6..43bf255d4f 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/rltiles/dc-item.txt b/crawl-ref/source/rltiles/dc-item.txt index 8c9fe93139..13831f62e5 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 @@ -359,38 +357,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 @@ -438,15 +420,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 365e0142a5..97a4dc5766 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: diff --git a/crawl-ref/source/wiz-item.cc b/crawl-ref/source/wiz-item.cc index f2f1224d2c..e5a7b9a22f 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/wiz-mon.cc b/crawl-ref/source/wiz-mon.cc index dd74504df4..b3429a6d20 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: diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc index f4987b6c14..7df0e78401 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; |