summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/item_use.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix messaging when enchanting weapons via god blessingChris Campbell2014-06-151-1/+1
|
* Plus2: Combine all three enchant weapon scrollsChris Oelmueller2014-06-141-1/+1
| | | | | | | | | | | | | | | 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.]
* Add an option for more consistent prompt behaviour when changing jewelleryChris Campbell2014-06-101-1/+1
| | | | | | | When enabled, you will always be prompted to choose a hand/tentacle when equipping a ring, even if you currently have some empty slots, or if one ring is cursed, etc. As a result, "Px>" should always result in "put ring x on right hand", and never "put on ring x, then go downstairs", for example.
* Remove various references to use-IDing jewellery that now identifies on equipChris Campbell2014-05-121-2/+1
| | | | There's probably a bunch more obsolete code for this still lying around.
* Disallow wearing shields with two-handed launchers.Steve Melenchuk2014-04-271-2/+0
| | | | | | | This renders it unnecessary to try and preserve the impact of shields on launcher delay. A fair bit of now-dead code goes away as a result as well.
* Drop double newlines where they seem to serve no purpose.Adam Borowski2013-12-211-2/+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.
* Remove some unused commandsChris Campbell2013-10-271-2/+0
| | | | CMD_EXAMINE_OBJECT, CMD_DISARM_TRAP and CMD_DESTROY_ITEM.
* New formula for the effect of strength on AEVP.Raphael Langella2013-04-261-1/+0
| | | | | | | | | | | | | | | | https://crawl.develz.org/wiki/doku.php?id=dcss:brainstorm:mutation:stats&#effect_of_strength_on_armour_evp New formula is: (2/5) * evp^2 / (str+3) Also, base evasion penalty is rescaled for all armours: -1 -> -4 -2 -> -7 -3 -> -11 -4 -> -15 -5 -> -17 -6 -> -19 -8 -> -24 -9 -> -27
* Handle non-item sources of -TELE.Adam Borowski2012-12-291-1/+0
| | | | | | Currently, that's only sprint, and not for blink. This fixes relevant spells and abilities being usable but then doing nothing.
* Fix aborted weapon switch leaving the player unarmed (#6187).Raphael Langella2012-12-271-1/+2
| | | | Unless the failure was caused by an incompatible and unidientifed brand.
* Use std namespace.Raphael Langella2012-08-261-1/+1
| | | | | | | | | | | | | 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.
* Make a bunch of functions static or gone.Adam Borowski2012-06-231-1/+0
|
* Make two functions static, one gone.Adam Borowski2012-05-151-2/+0
|
* Move throwing code out of item_use.ccAdam Borowski2012-05-131-43/+2
| | | | | It really needs to be ripped out and rewritten, with a stress on making the formulas sane.
* Make a few more functions static/gone.Adam Borowski2012-04-231-2/+0
|
* Fix the @ speed description applying Finesse twice for ranged combat.elliptic2012-03-101-1/+1
|
* Make a bunch of functions static, delete some unused junk.Adam Borowski2011-11-111-4/+0
|
* Always identify scrolls of enchant weapon.Adam Borowski2011-10-111-7/+1
| | | | | For spoiled players who use unarmed or have an artefact it is a no-brainer to wield a missile while read-IDing scrolls.
* Revert Ashenzari curses exceptions.Raphael Langella2011-04-111-4/+2
| | | | | They made some sense (gameplay-wise) with the skill boost, but with the current design, they are not necessary and hurt the flavour (#3792).
* Change function to be a more general check.Eronarn Palazzo2011-04-091-0/+1
|
* Make file headers doxygen-friendly, drop useless fields.Adam Borowski2011-03-281-5/+4
| | | | | | | "File:" is shown in your editor's status bar. "Written by:" was used only for the first person who changed a file. We got git for that now, and pre-DCSS history is so woefully inaccurate it doesn't really matter.
* Allow ashenzarites to butcher when wielding a cursed blunt weapon.Raphael Langella2011-03-281-2/+4
| | | | | If you're interrupted, you're not prompted and forced to switch back to your cursed weapon. Thus, this exception doesn't work with a monster in sight.
* Fix unwield message.Raphael Langella2011-03-271-1/+1
| | | | | | You can directly unwield only by clicking on your wielded weapon or from the inventory action. Also add an unwield command to make the inventory action code simpler.
* Fix an out-of-bounds assertion in only_unided_ring().Johanna Ploog2011-03-261-1/+1
|
* Warn when equipping armour with a penalty caused by low strengthChris Campbell2011-03-211-0/+1
|
* Identify rings of sust abil if they block stat loss completely.Adam Borowski2011-03-191-0/+1
|
* Reintroduce item stat loss prompts.Johanna Ploog2011-03-081-0/+1
| | | | | | While not fatal, having a stat lowered to zero or below can have nasty consequences. Thus, prompt if we're trying to put on an item known to have this effect.
* Ctrl-mouseclick asks for quantity for drop/pickup.Johanna Ploog2010-12-051-2/+2
| | | | I decided to reuse debug_prompt_for_int() for this purpose.
* Fix levitation removal prevention logic.Robert Vollmert2010-09-121-2/+1
| | | | | | | | | | | | | | Part of issue #2396. For one, it's a lot simpler and more correct now, and takes into account the updated uncancellable levitation logic. Then, it no longer duplicates the scrambling-free-logic. This is really not something the interface should know about, and if this is done, the check should not be duplicated. Finally, it now asks the player instead of outright denying. Aside from scrambling free, there are situations where you might want to stop levitation anyway (e.g. scramblable lava with enough rF+ if the item has some other bad properties).
* condense butchering messages even moreJesse Luehrs2010-09-081-1/+2
|
* Bring sanity to enums by making them diffable/patchable.Adam Borowski2010-06-081-2/+2
|
* Collect equip and unequip effects in player-equip.cc.Robert Vollmert2010-05-121-6/+0
|
* Concentrate equipping/unequipping in player-equip.cc.Robert Vollmert2010-03-131-5/+3
| | | | | The various equipping effects should eventually move there; for now, they should only be called throuh (un)equip_item.
* Make "oStasis behave more consistently with ARTP_PREVENT_TELEPORT (Textmode).Darshan Shaligram2010-02-071-2/+2
|
* Amulet of stasis, first cut.Darshan Shaligram2010-01-111-0/+5
| | | | | | | | | | | | | | | Amulets of stasis blocks: - Teleport self - Blink in all forms - Slowing - Hasting - Paralysis - Petrify - Berserker rage The amulet auto-ids the first time it triggers. The amulet does not affect existing conditions (such as an existing Haste spell or an existing post-berserk Slow).
* Give move/copy_item_to_grid responsibility for hazardous terrainStefan O'Rear2009-12-291-2/+1
| | | | We now have much less duplication of logic, yay.
* headers: fix inconsistent struct/class forward declarationsSteven Noonan2009-12-291-1/+1
| | | | | | | Some classes were erroneously referred to as 'struct' in forward declarations, and vice versa. Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* Different launchers make different amount of noiseMatthew Cline2009-11-071-0/+2
|
* Remove "called from:" comments.Vsevolod Kozlov2009-11-031-68/+1
| | | | | | These were of questionable use and freshness. Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
* Drop obsolete CVS last-committed headers ($Author$).Adam Borowski2009-10-061-2/+0
|
* Allow unrandart launchers to modify the beam of the missile they fire.zelgadis2009-07-211-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10363 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 2822832: temporary brands not being removed when thrown with LRET_FUMBLEDj-p-e-g2009-07-201-2/+3
| | | | | | | | | | | | | | plus: thrown weapon permabrand being removed when DUR_WEAPON_BRAND is active plus: double messaging of "You are now empty-handed." Fix 2810517: Added a pre-ability requirements check that handles Lugonu's enter/exit abyss, berserking, recite, breath attacks and some more. If the requirements aren't met, the check fails before the success check, thus no turn is wasted. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10360 c06c8d41-db1a-0410-9941-cceddc491573
* * Moved most hard-coded non-standard unrandart behaviour to art-func.h,zelgadis2009-06-271-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | specifically code for equipping, unequpping, an equipped unrandart doing something every time world_reacts() is called (special wield effects), melee hit effects, and evoking. Left hardcoded outside of art-func.h: * Sword of Cerebov temproarily downgrading the defender's fire resistance. * Staff of Olgreb boosting poison spells, as if it were a staff of poison. * Vampire's Tooth always getting maximal vampiric drain. * Mace of Variablity's initial pluses being chosen at creation time. * Since what used to be special wield effects is now handled very differently, noisy weapons and the lantern of shadows effects are handled with player attributes rather than SPWLD_NOISES and SPWLD_SHADOW. * Unrandarts can now have an elemental colour for their colour (currently only used for the Mace of Variability). * Unrandarts' value modification, being special, and being evil are now handled in art-data.txt rather than being hardcoded. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10055 c06c8d41-db1a-0410-9941-cceddc491573
* Since fixed artefacts are going to be folded into unrandarts, and unrandartszelgadis2009-06-081-2/+2
| | | | | | | | | | | have already become almost identical to randarts, change "randart" to "artefact" everywhere except for things that deal exclusively with randarts. Artefact related files will be renamed later. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9921 c06c8d41-db1a-0410-9941-cceddc491573
* * Tweak Xom's ideas about what makes a funny or boring death.j-p-e-g2009-04-221-2/+2
| | | | | | | | | * Add another option (*sigh*) covering whether W=T and P=R. (Defaults to false.) * Various spacing and comment fixes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9675 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 2603266: Additional '(' needed for cycling ammo after emptying thej-p-e-g2009-02-221-0/+1
| | | | | | | | | | previously quivered stack. FR 2594741: Make ')' cycle quiver backwards. The previous behaviour has been moved to '}'. The equipped inventory listing ']' now also includes the quivered item(s). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9164 c06c8d41-db1a-0410-9941-cceddc491573
* * Fix 2477235: Use inscription check when switching back from butcheringj-p-e-g2009-01-141-1/+2
| | | | | | | | | | | tool in case it was autoinscribed {!w}. * Make TSO reclaim holy wrath weapons an Elyvilon worshipper is attempting to destroy (flavour only). (FR 2497133) * Disallow Dissolution outside of the Slime Pits. * Explain 'e' as "Drain corpses" for Vampires in the command help. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8450 c06c8d41-db1a-0410-9941-cceddc491573
* Implented some ranged brands from FR #2006917 and #1891231: shadow andzelgadis2009-01-141-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | penetration (not phasing) for launchers and shadow, penetration, dispersal, exploding, steel and silver for ammo. Never randomly generated. If a launcher of venom is used to launch flame or ice ammo then the resulting bolt will be poisoned, just like poisoned ammo launched from a launcer of flame or frost. Put missile beam setup code that's common to monsters and the player in setup_missile_beam(). Removed mons_thrown_object_destroyed(), thrown_object_destroyed() is now used for both monsters and the player. The bolt struct has several new callback fields that can be set to alter the beam's behaviour; currently only used by the brands implemented in this commit, but they should be general enough to be used by anything. The bolt struct has the new field "special_explosion" which can be used to cause an explosion with flavour and/or damage dice different than the rest of the beam. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8449 c06c8d41-db1a-0410-9941-cceddc491573
* Added BEAM_CHAOS and changed chaos launchers/ammo to use that. Currently onlyzelgadis2008-12-081-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | chooses a different, random beam flavour (which undoudtedly needs to have their relative weights changed after playtesting) for each square it passes through, but in the future it might do things like bounce off walls at weird angles or animate weapons left laying on the ground. Added CLOUD_CHAOS, though it doesn't do anything yet. Monsters which are marked summoned or otherwise given ENCH_ABJ can also be marked with the type of summoning that happened, which is stored in the until-now-unused ENCH_SUMMON. This is useful for figuring out if a monster has ENCH_ABJ but isn't really summoned (like fire vortices created by Fire Storm or dancing weapons created by Tukima's Dance) so that they won't be affected by abjuration. It's also currently used to do a different "dissapears in a puff of smoke" messages for summoned monsters based on the summoning type, so that monsters summoned by Shadow Creature "dissolve into shadows" and don't leave behind any clouds, and temporary god gift monsters from good gods "dissolve into sparkling lights". In the future it might be used to do temporarily animated corpses, which turn back into a corpse when killed or when the animation runs out. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7778 c06c8d41-db1a-0410-9941-cceddc491573
* Add some chaos attacks/weapons. Missiles and launchers of chaos fire a bolt ofzelgadis2008-12-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | a random type (including enchantments, which isn't so good since they don't have a visible beam). Might want to add BEAM_CHAOS and make it a beam of that. Weapons of chaos either does a random brand effect (fire, poison, etc) or a random chaos effect (which includes cloning the attack victim). The AF_CHAOS monster attack flavour either does a random monster flavour or chaos effect (same chaos effects as for weapons). The relative frequency of all the different effects/brands/flavours no doubt needs adjustment. All of this is currently only available via Xom. 10% of all common-type demons sent in by Xom will be chaos spawn (the only kind that use AF_CHAOS, and never randomly generated otherwise). All item gifts from Xom which are generated with a brand will have their brand switched to chaos (this should probably be made to happen less than 100% of the time). And finally one of Xom's bad acts is to upgrade a non-branded weapon of a nearby hostile monster to a chaos brand (this might need to be made less (or more) common). Oh, and if a randart has a brand which would be identified if it were merely an ego weapon, it now identifies the RAP_BRAND property of the randart. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7704 c06c8d41-db1a-0410-9941-cceddc491573