summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/makeitem.cc
Commit message (Collapse)AuthorAgeFilesLines
* Refactor whip brand generation codereaverb2014-08-091-26/+13
| | | | Mostly because it is low hanging fruit.
* Fix mundane items sometimes being runed/glowing (|amethyst)reaverb2014-08-091-0/+1
|
* Remove 2 more parameters from items()reaverb2014-08-081-11/+4
| | | | | They were only used in one place, and the relevant code was moved to that one place in the previous commit.
* Move item placement code from items() to the only place it is usedreaverb2014-08-081-21/+1
|
* Add a Doxygen comment to items()reaverb2014-08-081-7/+20
|
* Remove a parameter from items() (mundane)reaverb2014-08-081-10/+16
|
* Recolour stones brown.Neil Moore2014-08-041-0/+1
|
* Recolour sling bullets cyan.Shmuale Mark2014-08-031-6/+5
| | | | Now that darts are gone, all ammo types can have their own colour.
* Don't spawn triple crossbows (& greatslings) with uber-egosNicholas Feinberg2014-07-301-12/+3
| | | | | | | They're quite strong enough without! More review of launcher brand code is needed, truthfully... and perhaps brand code generally.
* Remove stuffNicholas Feinberg2014-07-291-1/+2
| | | | | | | .cc, moving its contents into the new stepdown.cc and strings.cc. (The latter also got many donations from libutil.h.) Down with stuff! Up the new flesh!
* Generate triple crossbows like greatslings (PleasingFungus)Neil Moore2014-07-131-0/+1
|
* Rebalance crossbowsNicholas Feinberg2014-07-131-1/+3
| | | | | | | | | | | | | | | | | | | | | | Again as a result of the ranged weapons rebalance, crossbows needed to change. The analogy here is long blades' to bows' m&f; better return on skill investment & a higher power cap, but rarer. Hand crossbows are added as a starting type, "something like an armour-piercing dagger"; crossbows are upgraded to arbalests (a little worse than a glaive), and a new rare triple crossbow type is added on the top end (a little worse than a bardiche, though with a lower skill cost.) Please note that the triple crossbow historically existed & is extremely verisimilitudinous. Hellfire is now an arbalest, and Sniper is now a triple crossbow (well, a "heavy crossbow", since it has mindelay of 27 instead of 22, and since I didn't want to have to change the sprite). All crossbows have a mindelay of at least 1.0; this is an attempt to differentiate them. Possibly something more ambitious will be attempted in 1.6, but this is a first step.
* Refactor weapon_skill()Nicholas Feinberg2014-07-131-52/+25
| | | | | | | | | | | | | | This function was misleadingly named (it only provided the skill used for melee weapons, not ranged weapons), and incomplete; code along the lines of "is_ranged_weapon(*it) ? range_skill(*it) : weapon_skill(*it)" was scattered in about half a dozen different functions. I've corrected both of those problems (renaming weapon_ skill() to melee_skill() and adding item_weapon_skill()), and also possibly fixed two bugs in the process - an l_you.cc function that claimed to provide the skill used for the starting weapon (but actually only gave the melee skill), and unrand creation code that checked if a potential unrand swap used the same (melee) skill as the weapon type being generated.
* Record objects for objstat after the level builder has completedgammafunk2014-07-121-9/+0
| | | | | | | | Previously we were recording during the monster and item creation functions, but this resulted in some excess counting, due to (probably) objects placed in vaults on levels that were eventually rejected. We now iterate over objects after the level generation is complete.
* Rebalance slingsNicholas Feinberg2014-07-091-9/+16
| | | | | | | | | | | | | | | Slings numbers (along with the other launchers') needed to be rebalanced after the recent ranged combat rework. The approach here is essentially analogous to the staves skill; good return for xp investment, but a limited power cap, especially if you don't find the rare upgrade weapon type. Slings renamed to 'hunting slings' and upgraded from 2->5 base damage (and 12 base delay); new, rare "greatsling" added, with 8 base damage and 14 base delay. Punk upgraded to the latter type. Thanks to Lasty for providing a baseline math suggestion!
* Extinguish cursed clubsNicholas Feinberg2014-07-081-7/+5
| | | | | | | | No need to let cursed clubs glow. (The armour change is for reasons of symmetry only.) Clubs with plusses can still glow/be runed; this should only be relevant for vaults and uniques, so basically Ijyb.
* Refactor plus-squashing codeNicholas Feinberg2014-07-081-32/+36
| | | | | | | | | | | | Move it into the actual item-generation code, which is probably a more sensible place for it to be. Probably the actual behaviour should be rethought at some point; it'd be nice to support item shops selling items with plusses again, and it might be interesting to play around with generating more high-plus no-ego items, which are very rare at the moment. Might also make sense to tweak the threshold for aux armour up to +2, to avoid people getting too jaded by glowing gloves/etc.
* Replace potions of paralysis with potions of cancellation.Shmuale Mark2014-07-061-1/+1
| | | | | | | | | | | | !para was sort of problematic in that in combat, it would basically be a game-over effect, especially at the low HP people generally panic-quaff at, and almost entirely harmless outside of combat. Neither effect is very interesting. Dispelling has the potential to be bad, if you hadn't identified it and had used some other buffing potions, and lends itself to many more interesting tactical situations. "Cancellation" is just the first thing that popped into my head; feel free to send buckets of paint to recolour the bikeshed with.
* Remove potions of strong poison.Shmuale Mark2014-07-061-3/+1
| | | | | | | | | | | | Their peculiar depth restriction meant that when you found them, they were quite harmless. Even if the restriction were removed, they would be basically the same as potions of poison, since when they might be harmful the player would have little enough HP that the weaker potion could kill them. Their weight is distributed evenly among all other potions -- a very slight buff seems like a fine thing to do, especially since potion generation at D:2-10 isn't considered too good.
* Simplify blood potion initializationNicholas Feinberg2014-07-041-4/+0
| | | | | The back-compat code was hardly needed when it was added, much less now.
* Move blood rotting into a new fileNicholas Feinberg2014-07-011-1/+1
|
* Reduce potion and scroll generation.gammafunk2014-06-291-54/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to the removal of inventory weight and item destruction, scrolls and potions need a downward adjustment. This commit decreases the number of potions generated by 12%, the number of scrolls generated by 11.2%, and reworks the weights of the subtypes in both classes. Considering the branches typically seen in a 3-rune game: D, Lair, Orc, Snake, Swamp, Vaults, Depths, Crypt, Elf, Zot, Sewer, Ossuary, Lab, Bailey, IceCv, Volcano we see about 250 potions and 360 scrolls. After this commit, we're making about 30 fewer potions: 20 less curing and 10 less heal wounds. We're also making 40 fewer scrolls, broken down this way (numbers are how many fewer): 8 remove curse, 6 identify, 6 teleportation, 3 fear, 3 blinking, 3 noise, 3 random useless, 3 fog, 3 immolation, 2 vulnerability. I've distributed the reduced weight reduced from potions and scrolls to gold, weapons, and armour, increasing the gold by 10%, armour and weapons both by 6%. The identify and remove curse scrolls aren't tactical, but still warrant some reduction. The identify reduction is modest given its the frequency, and we're still seeing large numbers of excess remove curse in non-Ashenzari games. If this reduction is problematic for Ashenazari worshipers, we can revising this number or consider adding giving Ash a remove curse ability at high piety. Further details are in the following spreadsheet: https://docs.google.com/spreadsheets/d/1jUi7mNUQasl4XBgG0aojW-v9AZxhCGraC94a5oNPtgQ/edit?usp=sharing
* Remove an unused argument from the items() functiongammafunk2014-06-291-1/+0
|
* Make enchanted cloaks glowChris Campbell2014-06-271-2/+1
| | | | They should be treated the same way as other aux armour.
* Illuminate weapon/armour glow codeNicholas Feinberg2014-06-261-9/+26
| | | | | | Simplified it to a simple plus threshold per armour class (body, shield, etc), rather than a weird mix of random chance and poorly- specified thresholds. Likewise set a threshold for weapons.
* Clean up function and variable names for objstatgammafunk2014-06-251-2/+2
| | | | | | | | | We now consistently use objstat_ as a prefix for non-static functions and don't use prefixes for static functions and variables. Various enums, classes, and defines have also been renamed to more clearly reflect their function. I also added command-line help documentation for mapstat and objstat
* Write object statistics in one file per branchgammafunk2014-06-251-2/+2
| | | | | | All output in a single file was difficult to view and work with. Each file uses a common prefix of "objstat_", and the file names are printed to stdout.
* objstat: Item and monster generation statisticsgammafunk2014-06-251-0/+9
| | | | | | | | The -objstat command-line option will generate iterations of the given levels, compiling stats on every item and monster generated, and average the results over the iterations. It's only available in debug builds and uses the same map specification format as -mapstat. The default number of iterations is 100.
* Unsquash +1 hatsNicholas Feinberg2014-06-251-1/+5
| | | | | | | | And other pieces of +1 aux armour. (Since they're rare enough that it won't be annoying to have too many glowing gloves, etc around.) +1 cloaks still have their plusses squashed, mainly because of Zot.
* Unsquash artefacts (reaverb)Nicholas Feinberg2014-06-241-1/+1
|
* Mark +2 aux armour as glowing/runed instead of squashing it.Shmuale Mark2014-06-241-1/+4
|
* Ditch an old use of plus2.Shmuale Mark2014-06-241-1/+1
|
* Unsquash clubs (minmay)Nicholas Feinberg2014-06-231-3/+0
| | | | | Let them glow, since they wouldn't be able to generate with enchants now otherwise!
* Squash plusses on boring items (Hirsch)Nicholas Feinberg2014-06-231-0/+7
| | | | | | The intent seems to have been to simulate 'mundane' good/bad items, but in practice they encouraged trying on every found armour in the hope of scrounging out a few points of AC, early on.
* Allow rings of slaying to be up to +8.Shmuale Mark2014-06-221-3/+5
| | | | But only quite rarely.
* Remove the dragon slaying brandreaverb2014-06-181-11/+3
| | | | | | | | Generally it doesn't create interesting decisions because dragons are such a small group and are mostly a subset of monsters slowed by the freezing brand. In addition, it has rather arbitrary effects against players, hitting some for an degenerate amount of damage while ignoring others.
* Make enchant weapon scrolls always succeed, reduce generationChris Campbell2014-06-151-4/+3
| | | | For consistency with enchant armour, and to remove the breakpoint at +4.
* Rename "vampiricism" to "vampirism" (ChrisOelmueller, #8435)reaverb2014-06-151-9/+9
| | | | | | | Chris Oelmueller made an excellent patch for this, but unfortunately it was rather rotted by the time somebody decided to look at it. It was easier to recreate than update. I've also added some tiles stuff which was missed in the original patch.
* Plus2: Combine all three enchant weapon scrollsChris Oelmueller2014-06-141-4/+2
| | | | | | | | | | | | | | | New item is just called "scroll of enchant weapon". It increases both accuracy and damage by 1. Enchant weapon III scrolls have been converted to stacks of 2 enchant weapon scrolls where placed in vaults, and if already generated will act like a common "scroll of enchant weapon" as well for sake of simplicity. Scroll weights have been adjusted a bit; this almost certainly needs to be revisited. [Committer's note: merged a few commits into this, where it seemed sensible. Also reworked the scroll weights, but yeah, that needs another pass.]
* Plus2: Make weapons only generate with one plusChris Oelmueller2014-06-141-36/+7
| | | | [Committer's note: Merged a few commits into this.]
* Simplify some code now that slaying only uses item.plusChris Oelmueller2014-06-131-4/+1
|
* Combine plus/plus2 for rings of slaying, and Acc+/Dam+ on artefactsChris Oelmueller2014-06-131-28/+0
| | | | | | | | | | Phase out ARTP_ACCURACY, rename ARTP_DAMAGE to ARTP_SLAYING which now combines both Acc+ and Dam+ bonuses. Bracers of archery are +4 now instead of +5,+3. [Committer's note: fixed a description and cleaned up various other small issues.]
* Revert "Make random_choose_weighted() end on -1 weight"reaverb2014-06-101-16/+16
| | | | | | | This reverts commit 7e81480cda18144ff185f5248639a072b654deff. Turns out I missed some calls to random_choose_weighted(), this change might not even be worth doing.
* Make random_choose_weighted() end on -1 weightreaverb2014-06-101-16/+16
| | | | For consistency with random_choose().
* Combine the frost/flame and freezing/flaming brands.Shmuale Mark2014-06-101-16/+10
| | | | | | | Elec and venom launchers already use the same brands, and with ranged code more similar to melee code this change actually simplifies most code. There should be no gameplay change though some weird brand picking code for launchers was refactored, which might have some effect.
* Fix some random_choose() calls to not crashreaverb2014-06-101-3/+3
| | | | | Oops, for some reason the crash disappeared with the old version even though it apparently didn't solve the problem.
* Refactor _determine_weapon_subtype() a bitreaverb2014-06-091-50/+36
|
* Inline _got_distortion_roll()reaverb2014-06-091-13/+8
| | | | | | Having a one_chance_in() which is later overridden is completely nonsensical and meaningless, inlining this would be a prerequisite to any saner weapon brand schemes.
* Remove darts.Shmuale Mark2014-05-301-23/+16
| | | | | | | | | | They don't have much use outside the first level of D (possibly also the second): popping spores, killing slow things, waking up sleeping monsters, etc. are all served just as well by stones, and anybody who really wants to do damage with throwing would be better served with tomahawks before they find javelins. For one case where they could be useful (dispersal), tomahawks have been given a chance at the dispersal brand.
* Reduce fruit amounts, increase nutrition.Shmuale Mark2014-05-291-1/+1
| | | | | | | | | | | | | | | | | It seemed that the amount of fruit generated after the change was a bit too much, so the average stack size is being reduced while increasing the nutrition to keep spriggans around the same while trying to bring Fedhas back to around where things were before. For reference, this is the old version, with, in order, nutrition, herbivore III nutrition, occurence out of 100 (times stack size), and average spriggan nutrition from it per 100 food items generated: 250 | 400 | 10*(d13) | 28000 and now: 850 | 1000 | 10*(d5) | 30000