via 657d8beadbe8d70eccd70a608c32a868828e6ed9 (commit) via 9d8a9bff0b1fdc5416628ab0e42487ce9dc0a8b7 (commit) from fe0f9defb0c538cf9e8af9c8b2a60b8ea37dd591 (commit)
----------------------------------------------------------------------- commit 657d8beadbe8d70eccd70a608c32a868828e6ed9 Author: elliptic <hyperellipti...@gmail.com> Date: Tue Feb 15 01:03:36 2011 -0500 Trove price changes. commit 9d8a9bff0b1fdc5416628ab0e42487ce9dc0a8b7 Author: Chris Campbell <chriscampbel...@gmail.com> Date: Wed Feb 9 21:27:42 2011 +0000 Remove paladins at the next major save version ----------------------------------------------------------------------- Summary of changes: crawl-ref/docs/crawl_manual.txt | 8 +-- crawl-ref/source/dat/clua/lm_trove.lua | 52 ++++++++- crawl-ref/source/dat/des/portals/trove.des | 141 ++++++++---------------- crawl-ref/source/dat/descript/backgrounds.txt | 4 - crawl-ref/source/enum.h | 2 + crawl-ref/source/initfile.cc | 5 + crawl-ref/source/jobs.cc | 13 ++- crawl-ref/source/ng-restr.cc | 24 ---- crawl-ref/source/ng-setup.cc | 22 ---- crawl-ref/source/tilepick-p.cc | 2 + 10 files changed, 114 insertions(+), 159 deletions(-) diff --git a/crawl-ref/docs/crawl_manual.txt b/crawl-ref/docs/crawl_manual.txt index 2c70956..57ec756 100644 --- a/crawl-ref/docs/crawl_manual.txt +++ b/crawl-ref/docs/crawl_manual.txt @@ -1135,7 +1135,7 @@ You will be asked afterwards if you really want to attend this circle. Note that the good gods will not accept demonic or undead devotees. If you like to start the game with a religion, choose your background -from Healer, Priest, Paladin, Berserker or Chaos Knight. +from Healer, Priest, Berserker or Chaos Knight. ------------------------------------------------------------------------ @@ -1932,12 +1932,6 @@ should they prove worthy), but who forbids the use of spell magic. They usually enter the dungeon with a mace or axe, and dressed in animal skins. -Paladins: ---------- -The Paladin is a servant of the Shining One, and has many of the -abilities of the Fighter and the Priest. He or she enters the dungeon -with a long sword, a shield, a ring mail or robe, and a healing potion. - Priests: -------- Priests serve either Zin, the ancient and revered God of Law, or diff --git a/crawl-ref/source/dat/clua/lm_trove.lua b/crawl-ref/source/dat/clua/lm_trove.lua index 3ce7a80..baaa1b3 100644 --- a/crawl-ref/source/dat/clua/lm_trove.lua +++ b/crawl-ref/source/dat/clua/lm_trove.lua @@ -10,6 +10,7 @@ -- any scroll -- any potion -- any wand +-- runes and the horn of Geryon ------------------------------------------------------------------------------ require('clua/lm_1way.lua') @@ -197,6 +198,22 @@ function TroveMarker:item_name(do_grammar) s = s .. item.quantity end + if item.sub_type == "rune of Zot" then + if do_grammar == false then + return item.ego_type .. " rune of Zot" + else + return crawl.grammar(item.ego_type .. " rune of Zot", "a") + end + end + + if item.sub_type == "silver horn" then + if do_grammar == false then + return "horn of Geryon" + else + return "the horn of Geryon" + end + end + if item.artefact_name ~= false then if string.find(item.artefact_name, "'s") or do_grammar == false then return item.artefact_name @@ -297,6 +314,13 @@ function TroveMarker:check_item(marker, pname, position, dry_run) for it in iter.invent_iterator:new(iter_table) do local iplus1, iplus2 = it.pluses() local this_item = true + -- For misc items we check plus1 and nothing else. + if it.base_type == "miscellaneous" then + if iplus1 ~= false and item.plus1 ~= false and iplus1 ~= item.plus1 then + this_item = false + crawl.mpr("abc") + end + else if dry_run ~= nil then crawl.mpr("Checking item: " .. it.name()) end if not it.identified("type properties pluses") then @@ -367,7 +391,7 @@ function TroveMarker:check_item(marker, pname, position, dry_run) this_item = false end end - + end -- Now all we need to do is to make sure that the item -- is the one we're looking for if this_item and item.sub_type == it.sub_type @@ -432,9 +456,13 @@ function TroveMarker:check_item(marker, pname, position, dry_run) end function TroveMarker:accept_item (it) - crawl.mpr("The portal accepts the item" .. self:plural() .. - " and buzzes to life!") - it.dec_quantity(self.props.toll_item.quantity) + -- We don't take misc items away from people. + if it.base_type == "miscellaneous" then + crawl.mpr("The portal draws power from the presence of the item" .. self:plural() .. " and buzzes to life!") + else + crawl.mpr("The portal accepts the item" .. self:plural() .. " and buzzes to life!") + it.dec_quantity(self.props.toll_item.quantity) + end return true end @@ -452,7 +480,20 @@ function TroveMarker:check_veto(marker, pname) local _x, _y = marker:pos() - -- Let's check to see if there's an item at our current position + -- The message is slightly different for items that aren't actually taken by the trove (currently misc items). + if self.props.toll_item.base_type == "miscellaneous" then + if crawl.yesno("This trove requires the presence of " .. self:item_name() .. + " to function. Show it the item" .. + self:plural() .. "?", true, "n") then + if self:check_item(marker, pname, "inventory") == true then + return + else + crawl.mpr("You don't have " .. self:item_name() .. + " with you.") + return "veto" + end + end + else if crawl.yesno("This trove needs " .. self:item_name() .. " to function. Give it the item" .. self:plural() .. "?", true, "n") then @@ -464,6 +505,7 @@ function TroveMarker:check_veto(marker, pname) return "veto" end end + end return "veto" end diff --git a/crawl-ref/source/dat/des/portals/trove.des b/crawl-ref/source/dat/des/portals/trove.des index 449e4d5..192616f 100644 --- a/crawl-ref/source/dat/des/portals/trove.des +++ b/crawl-ref/source/dat/des/portals/trove.des @@ -18,7 +18,7 @@ trove = {} function trove.get_trove_item(e, value, base_item) -- This function should return a table with the following values: -- quantity=0 (number of items, 1 unless consumables) - -- base_type="armour" (armour, weapon, potion, scroll, jewellery or book) + -- base_type="armour" (armour, weapon, potion, scroll, jewellery, book, or miscellaneous) -- sub_type="robe" (short sword, etc) -- ego_type="resistance" (or false) -- plus1=4 (or false) @@ -49,28 +49,8 @@ function trove.get_trove_item(e, value, base_item) return item end - if you.skill("armour") > 10 and crawl.one_chance_in(4) then - return { - quantity=1, - base_type="armour", - sub_type="gold dragon armour", - ego_type=false, - plus1=3+crawl.random2(3), - plus2=false, - artefact_name=false - } - elseif you.skill("dodging") > 10 and crawl.one_chance_in(4) then - return { - quantity=1, - base_type="armour", - sub_type="robe", - ego_type="resistance", - plus1=2, - plus2=false, - artefact_name=false - } - end - + -- 1/3 chance of trying to get a shop item + if crawl.one_chance_in(3) then local floorlist, shoplist floorlist, shoplist = dgn.stash_items(value, true) if #shoplist ~= 0 then @@ -117,80 +97,53 @@ function trove.get_trove_item(e, value, base_item) end end end + end - -- Default to consumables. local d = crawl.roll_dice - -- Generation chances from makeitem.cc listed as comments; we don't - -- have to follow too closely, as we randomise quantities anyway. - -- Note that scrolls and potions can come in stacks of 2 or 3. + -- base is item.base_type, type is item.sub_type, quant is an additional parameter (quantity, charges, etc) + -- currently 22% armour, 22% weapon, 44% consumable, 11% miscellaneous (which are not actually taken from the player) + local prices = { + {base="armour", type="gold dragon armour", quant=1+d(3), weight=1}, + {base="armour", type="storm dragon armour", quant=1+d(3), weight=1}, + {base="armour", type="ice dragon armour", quant=2+d(3), weight=2}, + {base="armour", type="dragon armour", quant=2+d(3), weight=2}, - local wands = { - {wand="healing", charges=5+d(3)}, -- max 8 - {wand="hasting", charges=5+d(3)} } -- max 8 + {base="weapon", type="demon whip", quant=3+d(3), weight=2}, + {base="weapon", type="demon trident", quant=3+d(3), weight=2}, + {base="weapon", type="demon blade", quant=3+d(3), weight=2}, - local potions = { - {potion="healing", quantity=12+d(4)+d(4)}, -- 23% - {potion="heal wounds", quantity=8+d(3)+d(3)}, -- 11% - {potion="might", quantity=6+d(3)+d(3)}, -- 5% - {potion="agility", quantity=6+d(3)+d(3)}, -- 5% - {potion="brilliance", quantity=6+d(3)+d(3)}, -- 5% - {potion="speed", quantity=3+d(3)+d(2)}, -- 5% - {potion="resistance", quantity=3+d(3)+d(2)}, -- 2% - {potion="levitation", quantity=3+d(3)+d(2)}, -- 2% - {potion="magic", quantity=3+d(3)+d(2)}, -- 2% - {potion="cure mutation", quantity=d(2)}, -- 1% - {potion="gain strength", quantity=1, weight=1}, -- <1%, single - {potion="gain dexterity", quantity=1, weight=1}, -- <1%, single - {potion="gain strength", quantity=1, weight=1}, -- <1%, single - {potion="experience", quantity=1, weight=1} } -- <1%, single + {base="wand", type="healing", quant=7+d(2), weight=1}, + {base="potion", type="healing", quant=12+d(4)+d(4), weight=1}, + {base="potion", type="heal wounds", quant=8+d(3)+d(3), weight=2}, - local scrolls = { - {scroll="identify", quantity=12+d(4)+d(4)}, -- 18% - {scroll="remove curse", quantity=12+d(3)+d(3)}, -- 13% - {scroll="fear", quantity=6+d(3)}, -- 3% - {scroll="fog", quantity=6+d(3)}, -- 3% - {scroll="magic mapping", quantity=6+d(3)}, -- 3% - {scroll="blinking", quantity=3+d(3)}, -- 3% - {scroll="recharging", quantity=3+d(3)}, -- 3% - {scroll="enchant weapon I", quantity=3+d(3)+d(2)}, -- 3% - {scroll="enchant weapon II", quantity=3+d(3)+d(2)}, -- 3% - {scroll="enchant armour", quantity=3+d(3)+d(2)}, -- 3% - {scroll="enchant weapon III", quantity=d(2), weight=1}, -- 1%, single - {scroll="vorpalise weapon", quantity=d(2), weight=1}, -- 1%, single - {scroll="acquirement", quantity=d(2), weight=1} } -- 1%, single + {base="wand", type="hasting", quant=7+d(2), weight=1}, + {base="potion", type="speed", quant=3+d(3)+d(2), weight=2}, + {base="scroll", type="blinking", quant=3+d(3), weight=2}, - if not crawl.one_chance_in(3) then - local chosen = util.random_weighted_from('weight', potions) - item.base_type = "potion" - item.sub_type = chosen.potion - if chosen.quantity == nil then - item.quantity = 8 + crawl.random2(6) - else - item.quantity = chosen.quantity - end - else - if crawl.one_chance_in(5) then - local chosen = util.random_weighted_from('weight', wands) - item.base_type = "wand" - item.sub_type = chosen.wand - if chosen.charges == nil then - item.plus1 = d(5) - else - item.plus1 = chosen.charges - end - else - local chosen = util.random_weighted_from('weight', scrolls) - item.base_type = "scroll" - item.sub_type = chosen.scroll - if chosen.quantity == nil then - item.quantity = 4 + crawl.random2(4) - else - item.quantity = chosen.quantity - end - end - end + {base="potion", type="cure mutation", quant=2, weight=1}, + {base="scroll", type="acquirement", quant=2, weight=1}, + {base="scroll", type="identify", quant=12+d(4)+d(4), weight=1}, + + {base="miscellaneous", type="rune of Zot", quant=3, name="slimy", weight=1}, + {base="miscellaneous", type="rune of Zot", quant=11, name="abyssal", weight=1}, + {base="miscellaneous", type="silver horn", weight=1} } + local chosen = util.random_weighted_from('weight', prices) + item.base_type = chosen.base + item.sub_type = chosen.type + if chosen.base == "armour" or chosen.base == "wand" then + item.plus1 = chosen.quant + elseif chosen.base == "weapon" then + item.plus1 = chosen.quant + item.plus2 = chosen.quant + elseif chosen.base == "scroll" or chosen.base == "potion" then + item.quantity = chosen.quant + end + if chosen.type == "rune of Zot" then + item.plus1 = chosen.quant + item.ego_type = chosen.name -- not an actual ego, just the name of the rune + end return item end @@ -199,7 +152,7 @@ function trove.portal(e) The secrets of the gateways died with him when his fellow thieves, disgusted at his betrayal of their 'ideals', had him murdered. With his death, the now-uncontrolled portals began moving rapidly from one dimension to the next, stopping only long enough to absorb magical energy.]] - local item = trove.get_trove_item(e, 800) + local item = trove.get_trove_item(e, 1000) local function stair () return trove_marker { diff --git a/crawl-ref/source/dat/descript/backgrounds.txt b/crawl-ref/source/dat/descript/backgrounds.txt index d46ed04..1ebd325 100644 --- a/crawl-ref/source/dat/descript/backgrounds.txt +++ b/crawl-ref/source/dat/descript/backgrounds.txt @@ -71,10 +71,6 @@ Necromancer Necromancers are wizards specializing in the practice of death magic. They start out with the Pain spell. %%%% -Paladin - -Paladins are righteous warriors joining the Shining One's crusade against evil. -%%%% Priest Priests are followers of Zin, Yredelemnul, or the orc god Beogh. diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h index cd9198e..c7d0db7 100644 --- a/crawl-ref/source/enum.h +++ b/crawl-ref/source/enum.h @@ -1617,7 +1617,9 @@ enum job_type JOB_PRIEST, JOB_GLADIATOR, JOB_NECROMANCER, +#if TAG_MAJOR_VERSION == 32 JOB_PALADIN, +#endif JOB_ASSASSIN, JOB_BERSERKER, JOB_HUNTER, diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc index 046a638..1c82cfc 100644 --- a/crawl-ref/source/initfile.cc +++ b/crawl-ref/source/initfile.cc @@ -374,6 +374,11 @@ static job_type _str_to_job(const std::string &str) if (job == JOB_UNKNOWN) job = get_job_by_name(str.c_str()); +#if TAG_MAJOR_VERSION == 32 + if (job == JOB_PALADIN) + job = JOB_UNKNOWN; +#endif + if (job == JOB_UNKNOWN) fprintf(stderr, "Unknown background choice: %s\n", str.c_str()); diff --git a/crawl-ref/source/jobs.cc b/crawl-ref/source/jobs.cc index 22ee083..12b5e3f 100644 --- a/crawl-ref/source/jobs.cc +++ b/crawl-ref/source/jobs.cc @@ -11,7 +11,7 @@ static job_type jobs_order[] = { JOB_FIGHTER, JOB_GLADIATOR, JOB_MONK, JOB_BERSERKER, // religious professions (incl. Berserker above) - JOB_PALADIN, JOB_PRIEST, + JOB_PRIEST, JOB_HEALER, JOB_CHAOS_KNIGHT, JOB_CRUSADER, // general and niche spellcasters (incl. Crusader above) @@ -38,7 +38,11 @@ job_type get_job(const int index) static const char * Job_Abbrev_List[ NUM_JOBS ] = { "Fi", "Wz", "Pr", - "Gl", "Ne", "Pa", "As", "Be", "Hu", + "Gl", "Ne", +#if TAG_MAJOR_VERSION == 32 + "Pa", +#endif + "As", "Be", "Hu", "Cj", "En", "FE", "IE", "Su", "AE", "EE", "Cr", "VM", "CK", "Tm", "He", "Re", "St", "Mo", "Wr", "Wn", "Ar", "AM" }; @@ -46,7 +50,10 @@ static const char * Job_Abbrev_List[ NUM_JOBS ] = static const char * Job_Name_List[ NUM_JOBS ] = { "Fighter", "Wizard", "Priest", "Gladiator", "Necromancer", - "Paladin", "Assassin", "Berserker", "Hunter", "Conjurer", "Enchanter", +#if TAG_MAJOR_VERSION == 32 + "Paladin", +#endif + "Assassin", "Berserker", "Hunter", "Conjurer", "Enchanter", "Fire Elementalist", "Ice Elementalist", "Summoner", "Air Elementalist", "Earth Elementalist", "Crusader", "Venom Mage", diff --git a/crawl-ref/source/ng-restr.cc b/crawl-ref/source/ng-restr.cc index 35874f4..68806c4 100644 --- a/crawl-ref/source/ng-restr.cc +++ b/crawl-ref/source/ng-restr.cc @@ -104,30 +104,6 @@ char_choice_restriction job_allowed(species_type speci, job_type job) return (CC_UNRESTRICTED); } - case JOB_PALADIN: - switch (speci) - { - case SP_DEMIGOD: - case SP_DEMONSPAWN: - case SP_MUMMY: - case SP_GHOUL: - case SP_VAMPIRE: - return (CC_BANNED); - case SP_DEEP_ELF: - case SP_SLUDGE_ELF: - case SP_HALFLING: - case SP_KOBOLD: - case SP_SPRIGGAN: - case SP_NAGA: - case SP_OGRE: - case SP_TROLL: - case SP_KENKU: - case SP_CAT: - return (CC_RESTRICTED); - default: - return (CC_UNRESTRICTED); - } - case JOB_PRIEST: switch (speci) { diff --git a/crawl-ref/source/ng-setup.cc b/crawl-ref/source/ng-setup.cc index e696ab1..7533e84 100644 --- a/crawl-ref/source/ng-setup.cc +++ b/crawl-ref/source/ng-setup.cc @@ -117,7 +117,6 @@ static void _give_last_paycheck(job_type which_job) you.gold = 20; break; - case JOB_PALADIN: case JOB_MONK: you.gold = 0; break; @@ -153,7 +152,6 @@ static void _jobs_stat_init(job_type which_job) case JOB_FIGHTER: s = 8; i = 0; d = 4; hp = 15; mp = 0; break; case JOB_BERSERKER: s = 9; i = -1; d = 4; hp = 15; mp = 0; break; case JOB_GLADIATOR: s = 7; i = 0; d = 5; hp = 14; mp = 0; break; - case JOB_PALADIN: s = 7; i = 2; d = 3; hp = 14; mp = 0; break; case JOB_CRUSADER: s = 4; i = 4; d = 4; hp = 13; mp = 1; break; case JOB_CHAOS_KNIGHT: s = 4; i = 4; d = 4; hp = 13; mp = 1; break; @@ -554,26 +552,6 @@ static void _give_items_skills(const newgame_def& ng) } break; - case JOB_PALADIN: - you.religion = GOD_SHINING_ONE; - you.piety = 28; - - // Equipment. - newgame_make_item(0, EQ_WEAPON, OBJ_WEAPONS, WPN_FALCHION); - newgame_make_item(1, EQ_BODY_ARMOUR, OBJ_ARMOUR, ARM_RING_MAIL, - ARM_ROBE); - newgame_make_item(2, EQ_SHIELD, OBJ_ARMOUR, ARM_SHIELD, ARM_BUCKLER); - newgame_make_item(3, EQ_NONE, OBJ_POTIONS, POT_HEALING); - - // Skills. - you.skills[(player_effectively_in_light_armour() - ? SK_DODGING : SK_ARMOUR)] = 2; - you.skills[SK_FIGHTING] = 2; - you.skills[SK_SHIELDS] = 2; - you.skills[SK_LONG_BLADES] = 3; - you.skills[SK_INVOCATIONS] = 2; - break; - case JOB_PRIEST: you.religion = ng.religion; you.piety = 45; diff --git a/crawl-ref/source/tilepick-p.cc b/crawl-ref/source/tilepick-p.cc index bb00eef..cc8e80f 100644 --- a/crawl-ref/source/tilepick-p.cc +++ b/crawl-ref/source/tilepick-p.cc @@ -663,6 +663,7 @@ void tilep_job_default(int job, dolls_data *doll) parts[TILEP_PART_CLOAK] = TILEP_CLOAK_BLUE; break; +#if TAG_MAJOR_VERSION == 32 case JOB_PALADIN: parts[TILEP_PART_BODY] = TILEP_BODY_ROBE_WHITE; parts[TILEP_PART_LEG] = TILEP_LEG_PANTS_BROWN; @@ -671,6 +672,7 @@ void tilep_job_default(int job, dolls_data *doll) parts[TILEP_PART_BOOTS] = TILEP_BOOTS_MIDDLE_GRAY; parts[TILEP_PART_CLOAK] = TILEP_CLOAK_BLUE; break; +#endif case JOB_CHAOS_KNIGHT: parts[TILEP_PART_BODY] = TILEP_BODY_BELT1; -- Dungeon Crawl Stone Soup ------------------------------------------------------------------------------ The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb _______________________________________________ Crawl-ref-discuss mailing list Crawl-ref-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/crawl-ref-discuss