summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/itemprop.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix compilation, de-inline a function.Neil Moore2014-07-151-5/+1
| | | | | | There's no reason for this function, called only a few times at init, to be inline. More importantly, it used std::remove_if without including <algorithm>.
* Make str_to_weapon use existing item dataTanner Swett2014-07-141-0/+7
|
* Refactor weapon_skill()Nicholas Feinberg2014-07-131-2/+5
| | | | | | | | | | | | | | 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.
* Refactor item handedness codeNicholas Feinberg2014-07-131-3/+1
| | | | | | | | | | | | | | Instead of specifying HANDS_ONE or HANDS_TWO in Weapon_prop[] (which were... misleading at best), there's now a min_2h_size and min_1h_size field. The former controls the minimum size a player or monster must be to wield the weapon at all; the latter is the minimum size required to wield it with one hand. This means that giants can now wield daggers (unlike before); if necessary, a max_size field can be added, but this seems a low priority to preserve. This breaks formatting of Weapon_prop[] a bit; apologies.
* Display less misleading sling base damageNicholas Feinberg2014-07-101-0/+1
|
* Partially refactor mulchingNicholas Feinberg2014-07-101-0/+4
|
* RefactorNicholas Feinberg2014-07-101-1/+2
| | | | Make is_range_weapon and is_ranged_weapon_type use the same code.
* Refactor weapon property codeNicholas Feinberg2014-07-091-0/+4
| | | | | | Mainly relevant to chaos champions (should mean that melee_only champions no longer spawn with slings, as a bonus), but also in preparation for adding more weapon types.
* The great mon-stuff migration.Shmuale Mark2014-06-221-0/+1
| | | | | | | | | A good deal of functions move to the two new files, mon-poly and mon-message. Of the others, some go to where they are used, some to mon-util, and a few are made member methods of monster. This probably breaks Xcode compilation, and I'm not able to test the changes I made to MSVC that will (hopefully) keep it working.
* Simplify some code now that slaying only uses item.plusChris Oelmueller2014-06-131-1/+1
|
* Allow gods to rebrand blessed weapons againChris Campbell2014-06-121-1/+1
|
* Refactor a bit.Neil Moore2014-05-291-0/+1
|
* Make corpses and skeletons stationary items (minmay)gammafunk2014-05-261-1/+2
| | | | | | | | | Moving corpses and skeletons to other levels or to other locations within a level is tedious but may be optimal for corpse rot and god abilities like Kiku's corpse prayer. This commit prevents the player from picking up or apporting carrion. It generalizes the code used for nets being stationary, and cleans up and documents various bits of related item pickup code.
* Chance function(void) to function()reaverb2014-05-241-1/+1
|
* Move mon death stuff from mon-stuff.cc to mon-death.cc.Shmuale Mark2014-04-121-0/+1
| | | | | | | Touches a lot of files since their #includes have to be edited. (Pushing now since it shouldn't break anything and keeping it updated is nasty.)
* Make skill training restrictions depend on carried instead of equipped itemsChris Campbell2014-04-091-1/+0
| | | | | | For Shields in particular, carrying a shield is sufficient for training purposes. Remove a number of now-unnecessary checks, including some checks that were already obsolete for curses on wielded weapons.
* Remove throwing net degradation, instead mulch probabilisticallyDracoOmega2014-03-121-1/+0
| | | | | | | | | | | | | | Instead of throwing nets accumulating persistent damage as monsters struggled against them (and then becoming impossible to stack in your inventory afterward), they are either outright destroyed by the struggle or remain in normal condition. This should make them a little less cumbersome to use. This commit doesn't actually touch any of the escape formulas (which are an impressive snarl that could definitely use tending to), since probably they would need rewriting from scratch and I didn't want to undertake that so close to 0.14, with various other things still in the air.
* Don't generate racial armourChris Oelmueller2014-03-061-5/+2
| | | | | | | | [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]
* Rework the Horn of Geryon as an xp-charged evocable.gammafunk2014-02-281-1/+1
| | | | | | | | | | | | | | | | Previously the horn was a nearly useless item after unbarring the hells and possibly opening a trove. This version keeps the summon hell beast theme but turns it into a more useful xp-charging evocable. Evoking it when it's charged summons 1-4 hell beasts, depending on evocations, each summon having a small chance of being hostile, also depending on evocations. The chance of getting a hostile hell beast is 7 in evocations * 10 (always hostile at evocations 0). Two hell beasts get created 63% of the time at 10 evocations, three 63% of the time at 15 evocations, and 4 66% of the time at 20 evocations, with always 4 summoned at higher than 23 evocations. It could perhaps use an additional effect, but it's an always-generated item that's relatively accessible in a 3-rune game, so some care has to be taken there.
* Drop double newlines where they seem to serve no purpose.Adam Borowski2013-12-211-1/+0
| | | | | Sometimes, they're there to emphasize a break between two sections of code, which is good. In a majority of cases, though, they're just inconsistent.
* Dewing dehorn deplume helmets.Adam Borowski2013-12-181-4/+0
| | | | Note: currently, worn and in-inv tiles are out of sync.
* Throw the gauntlets.Adam Borowski2013-11-301-3/+0
| | | | This reverts commit 7f8b6d85697774a182b3f40aca21e2286d5c32a3.
* Merge branch 'master' into dwantspubby2013-08-311-1/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: crawl-ref/docs/crawl_manual.reST crawl-ref/source/abl-show.cc crawl-ref/source/dat/descript/ability.txt crawl-ref/source/delay.cc crawl-ref/source/enum.h crawl-ref/source/main.cc crawl-ref/source/mon-cast.cc crawl-ref/source/mon-gear.cc crawl-ref/source/mon-spll.h crawl-ref/source/mutation-data.h crawl-ref/source/mutation.cc crawl-ref/source/ng-restr.cc crawl-ref/source/ng-setup.cc crawl-ref/source/output.cc crawl-ref/source/player-act.cc crawl-ref/source/player.cc crawl-ref/source/species.cc crawl-ref/source/spl-data.h crawl-ref/source/wiz-you.cc
| * Make scrolls of vorpalise weapon target a weapon without having to wield itMarvinPA2013-08-211-0/+2
| | | | | | | | | | | | | | | | | | Makes it more easily and obviously cancellable, and allows cancelling the scroll without spending a turn and losing it (if it was already identified). Doesn't use the same selection menus as enchant armour, identify and recharging - since it tends to show up much later it'd almost always be known anyway (and the point here is to make it harder to accidentally remove a brand you want).
| * Let homunculi and souplings fizz away.Adam Borowski2013-07-161-1/+0
| | | | | | | | Easy to revert if anyone feels like actually implementing them.
| * Simplify is_melee_weapon and move it out of fight.ccNeil Moore2013-06-191-0/+1
| | | | | | | | | | Also, make it take a reference rather than a pointer (like is_{,ranged_}weapon) and use it in the berserk check.
* | Create Formicid species and monsters.pubby2013-08-251-3/+4
|/ | | | | | | | | | | | | | | | | | | | | | | Tavern post: https://crawl.develz.org/tavern/viewtopic.php?f=8&t=8298 Wierdness & mutations: - poison weakness - retractable antennae (can wear headgear and ignore mutation) - chitin skin (+3 AC) - most weapons 1-handed, big weapons 2-handed - permanent stasis - ability to shaft self - ability to dig - Starts with 2 curing pots 3 monster versions of formicids were added: formicid, a weak fighter formicid drone, a stronger fighter formicid venom mage, a magician with olgreb's and mass cure poison [ Pushing to a branch for experimental playtesting on CSZO. Also optimised the new tiles. -nfm ]
* Simplify with food_is_meaty, food_is_veggie functions.Neil Moore2013-05-271-0/+4
|
* Implement elemental evoker recharge via xp gainDracoOmega2013-05-261-0/+2
| | | | | | | | | | | | | | The 4 elemental evokers (fan of gales, lamp of fire, stone of tremors, and phial of floods) now expend themselves after one use an can be recharged only by gaining exp while they are in the player's possession. The formula used almost certainly needs rewriting, as this is only one step up from a placeholder, but it will hopefully scale with player xl and evocations skill in a sane enough way to test. For now, exp gained is split among all evokers, meaning that carrying two causes each to recharge twice as slowly. I am not certain this is a good thing, but is up for future adjustment.
* Purge the code for recharging weapons.Adam Borowski2013-04-261-2/+1
|
* Add PURE/IMMUTABLE to many functions in itemprop.h and refine a few types.Samuel Bronson2013-03-301-94/+97
|
* Make a few functions static or gone.Adam Borowski2013-03-141-1/+0
|
* Axe a number of unused functions.Adam Borowski2012-11-241-2/+0
|
* Simplify and reformat convert2good().Adam Borowski2012-11-201-1/+1
|
* Purge some fruit_mask cruft.Adam Borowski2012-08-291-1/+0
|
* Use std namespace.Raphael Langella2012-08-261-4/+4
| | | | | | | | | | | | | I had to rename distance() (in coord.h) to distance2() because it conflicts with the STL function to compare 2 iterators. Not a bad change given how it returns the square of the distance anyway. I also had to rename the message global variable (in message.cc) to buffer. I tried to fix and improve the coding style has much as I could, but I probably missed a few given how huge and tedious it is. I also didn't touch crawl-gdb.py, and the stuff in prebuilt, rltiles/tool and util/levcomp.*, because I have no clue about those.
* Don't use two misleading schemes for reach ranges.Adam Borowski2012-06-261-1/+0
| | | | | | | Both were scalars compatible with int, and both used the name "reach_range" is some cases. Thus, let's use 2/5/8 everywhere. This probably makes the enum obsolete.
* Make a bunch of functions static or gone.Adam Borowski2012-06-231-3/+0
|
* Remove spaces between function identifiers and arguments lists.Adam Borowski2012-06-211-4/+4
|
* Allow monsters to wear rings and amulets.Steve Melenchuk2012-06-121-0/+8
|
* Make staves and rods separate object classes.Adam Borowski2012-06-121-4/+7
| | | | | | | | | | | | They have about no overlap, more than both being usable as weapons. A vast majority of uses immediately checked item_is_rod()/item_is_staff(). I kept them shared for acquirement, for now. Also, eliminate rods of smiting -- hardly ever used, problematic theme-wise as they use "divine providence" without worship. Keeping rods of striking for now, could be used to fix artificer problems. Adding/removing rod enums is a mess due to tile handling, renaming ROD_SMITING to ROD_LIGHTNING for now.
* Make some functions static/gone.Adam Borowski2012-06-021-1/+0
|
* Make all missile brands visible.Adam Borowski2012-05-081-1/+0
| | | | | | | | | | | | | | Enchantment is still unknown. Determining the brand was a matter of shooting a single shot, and then you could keep a sample so other identical ammo would stack with it. My recent commit removed the need for the latter but only for fully identified ammunition. Note that 10 out of 16 randomly occuring brands already had this property (half of them needle-only). This was mostly contrary to what one would expect: tar/oil on flame arrows was hidden, while drugs on needles identified on sight.
* Once you have seen a +3 dart of flame, id all of those on sight.Adam Borowski2012-05-051-0/+1
| | | | | | | | | You could have kept one of each enchantment/type combination in a stash or the inventory for the same effect. Almost the same -- should we id them only on pickup? TODO: once the details of when to id are settled, purge the id on merge code.
* Make a few more functions static/gone.Adam Borowski2012-04-231-2/+0
|
* Axe a bunch of unused functions.Adam Borowski2012-04-171-7/+0
|
* Make another bunch of functions static or deleted.Adam Borowski2012-03-211-8/+0
| | | | | Looks like get_XXX_path and the like in files.cc could use some drastic simplification, or perhaps even a nuking and rewrite.
* Add utility function is_giant_club_type(); use it for giant club special cases.David Lawrence Ramsey2011-11-251-0/+1
|
* Use proper type declarations for brand_type.Adam Borowski2011-10-311-1/+1
|
* Externalize the function to determine the player's item race flag.Adam Borowski2011-10-281-0/+1
|