summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/quiver.cc
Commit message (Collapse)AuthorAgeFilesLines
* Remove stuffNicholas Feinberg2014-07-291-2/+1
| | | | | | | .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!
* Move letter <-> index from stuff.cc to prompt.cc (wheals)Nicholas Feinberg2014-07-281-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.
* Rebalance slingsNicholas Feinberg2014-07-091-1/+2
| | | | | | | | | | | | | | | 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!
* Remove darts.Shmuale Mark2014-05-301-2/+0
| | | | | | | | | | 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.
* Rename "bow" to "shortbow"Chris Oelmueller2014-05-051-1/+1
| | | | For a clear distinction of "bows" the skill, and from "longbow" the weapon.
* Replace `mpr(s, ch)` with `mprf(ch, s)`Adam Borowski2013-11-291-1/+1
| | | | | | | | | Also simplify quite a few cases. It turns out in >90% cases of non-literals the argument had .c_str(), which meant it was pointlessly malloc()ed and converted from and to std::string. I believe a sprintf is faster, so even the argument of miniscule speed-up doesn't apply.
* More formatting fixes for return (...);Neil Moore2013-11-151-1/+1
|
* Purge obsolete code for quivering weapons.Adam Borowski2013-09-221-68/+22
|
* A new throwing missile, tentantively named "tomahawk".Adam Borowski2013-09-221-3/+1
| | | | | | | | | | The name is somewhat problematic, as real tomahawks were fit for melee (just like hand axes...). It's mostly because a few bailey_axe vaults want something that resembles an axe, but I'd rather axe or redesign those vaults than have them block better alternatives. The balance purpose is to have something between darts (damage 2) and javelins (damage 10), for use by orcs, orc warriors and merfolk.
* Stale pies are inedible.Adam Borowski2013-09-071-0/+2
|
* Turn pairs of assertions with x > min, x <= max into ASSERT_RANGE.Adam Borowski2013-06-081-2/+1
| | | | | The perl regexp to do so is: s&ASSERT\(([^\n]+) >= ([^\n]+)\);\s*ASSERT\(\1 < ([^\n]+)\);&ASSERT_RANGE($1, $2, $3);&sg;
* Refactor ASSERT(a && b) -> ASSERT(a); ASSERT(b);Brendan Hickey2013-04-281-1/+2
| | | | | | | Convert conjunctive assertions into separate assertions. This ought to be correctness preserving. I ran the stress tests and didn't notice anything unusual. While I have confidence in it, if you are the slightest bit suspicious of this, please roll it back. Found instances with `ASSERT(\([^(|]*\) && \([^)|]*\))` Manually inspected each instance.
* Revert "Prevent selecting inventory items that cannot be used, including ↵Adam Borowski2013-04-261-1/+2
| | | | | | | | | | | | | | | | | | | | | melded items for scrolls" Doing this in the filter causes severe regressions: * no failure messages are given anymore. This includes cases that are unobvious to new players, like, say, why that bright green or red chunk is inedible. * if a chunk rots without you noticing, the menu interface will consume any keys you pressed subsequently, making you waste permafood. This can happen for other item types too, it's just chunks being ingrained so hard into muscle memory that people don't read prompts carefully. Having the menu filter duplicate the work is not good either, but until this mess is refactored, the filter has not enough data. Proposed interface: const char* why_not_use(CMD_EAT, item) which returns null if you can actually use the item. This reverts commit bab355256aed893ee730059d95111987b32c3815.
* Merge branch 'master' into jesterDavid Lawrence Ramsey2013-03-311-1/+2
|\
| * Don't prevent arbitrary items being quiveredPete Hurst2013-03-311-1/+2
| | | | | | | | Missed this one because you _could_ quiver anything so long as you weren't carrying any thrown missiles.
* | Reorder firing type enums a bit; they're not saved in games anyway.David Lawrence Ramsey2013-03-311-3/+2
| |
* | Allow specifying pies in firing order.David Lawrence Ramsey2013-03-301-1/+1
| |
* | Remove unneeded brackets.David Lawrence Ramsey2013-03-301-2/+0
| |
* | Custard PiesBrendan Hickey2013-03-291-0/+5
|/ | | | A new missile type. Inflicts blindness on monsters. Always mulches.
* Respect =f even on items similar to what was quivered before.Samuel Bronson2013-03-201-0/+4
|
* Simplify a couple of things in quiver.ccSamuel Bronson2013-03-201-9/+5
|
* Remove unnecessary includes from header files.Jay3.14152012-10-231-0/+1
| | | | | | | | | | For most header files, this only saves on having to recompile a small number of source files, but there are also a few headers where small changes would now take significantly less time. This is most obvious for the Tiles build for which the dependencies have been greatly reduced, so that the only additional includes when compared to console are strictly library or tile related.
* Use std namespace.Raphael Langella2012-08-261-11/+8
| | | | | | | | | | | | | 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.
* Bump save compat, in order to recover from monster_spells.Adam Borowski2012-08-191-8/+0
| | | | | | | | | The problematic spells happen to be the same that add a massive number of enchantments and alter save structure, adding save compat for those would require a lot of work and be risky. Thus, it's easier to rewind, and then re-apply parts that we do want to keep.
* Avoid a crash after wielding the quivered weapon.Neil Moore2012-08-011-1/+12
| | | | | | | | | | Wielding the currently-quivered weapon would result in player_quiver::m_last_used_of_type[AMMO_THROW] containing an item_def with quantity 0. Since 485c763, trying to marshall such an item asserts, as it is not valid. Avoid this by also setting the base type to OBJ_UNASSIGNED. Furthermore, fix this up when loading old saves. Fixes #6007.
* Some more return deparenthesization.Adam Borowski2012-07-051-1/+1
|
* Drop parentheses around scalar values in "return".Adam Borowski2012-07-051-13/+13
|
* Remove a good deal of header inclusion.Adam Borowski2012-05-231-1/+0
| | | | | | | | | These accumulate but never get removed; no wonder compilation times keep rising. The includes.sh script has lots of false negatives (and positives...), and can't check .h files which cause the biggest slowdown, it'd be nice to run multidelta on those somehow.
* Move throwing code out of item_use.ccAdam Borowski2012-05-131-0/+1
| | | | | It really needs to be ripped out and rewritten, with a stress on making the formulas sane.
* Split =f/+f into =f/+f (autoquiver) and =F/+F (ammo cycling).Adam Borowski2012-04-211-11/+15
| | | | | | With autothrow, you (practically) don't get to review the item anymore, and have a stronger reason to keep good/special ammo kinds easily selectable ('Q' is anything but handy).
* Drop pointless braces after else/else if as well.Adam Borowski2012-04-201-2/+0
|
* Adjust some whitespace and formatting.Adam Borowski2011-07-081-1/+0
|
* cppcheck: fix inefficient checking for emptiness.Adam Borowski2011-07-051-2/+2
| | | | | On some STL structures size() is slow. I did not bother limitting sed, so innocent bystanders got pulled into the machine, but there's no loss.
* Don't require ", c1" in COMPILE_CHECK().Adam Borowski2011-06-091-2/+2
|
* s/SP_CAT/SP_FELID/Adam Borowski2011-06-071-3/+3
| | | | | I did not change this when the species' name was in flux, but it's kind of set in stone now, so let's be consistent.
* Don't let Felids autoquiver anything; suppress "(quivered)" status.Johanna Ploog2011-04-151-0/+11
|
* Block the quiver commands for Felids.Johanna Ploog2011-04-151-0/+5
|
* Make file headers doxygen-friendly, drop useless fields.Adam Borowski2011-03-281-7/+7
| | | | | | | "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.
* Get rid of some more longs.Adam Borowski2011-01-301-1/+1
|
* Massive spacing fixes: "( spaces after parentheses )".Adam Borowski2010-10-151-2/+2
| | | | | | I did review it manually to find places where they made sense (like some tables), but for a massive sed job like this there might be places that I missed.
* Perform actions on item from the inventoryRaphael Langella2010-10-081-16/+20
| | | | Mantis 2156
* s/marshallLong/marshallInt/, since this confusion tends to cause bugs.Adam Borowski2010-06-201-4/+4
| | | | | | | Actually, it should be named marshallInt32_t as that's what it does, but that's hard to read, no architecture with smaller ints can conceivably run Crawl and the only architecture with bigger ints is long dead. And in even in such a case, everything will be fine except for name confusion...
* Rename item_def::is_valid() to item_def::defined(). (Enne)Robert Vollmert2010-06-171-6/+6
|
* For the quiver, take the remembered item itself if possible.Robert Vollmert2010-04-031-0/+3
| | | | This should fix some quiver misbehaviour.
* Code readability: it's unobvious EQ_CLOAK..EQ_BODY_ARMOUR means "all armours",Adam Borowski2010-01-271-1/+1
| | | | replace such uses with proper defines.
* Don't autoquiver the wielded weapon (if it's similar to the quiver one).Johanna Ploog2010-01-261-7/+18
|
* Remove hand crossbows.Jude Brown2009-12-311-6/+2
| | | | | | | | | | | | | | | | | | This involves a lot of changes, and also increments TAG_MAJOR_VERSION to 13. The unrand "Sniper" is now a crossbow (hopefully its current title is still suitable for this task), and thieves no longer start with hand crossbows (but still retain darts). Wanderers with crossbow skills will now get a crossbow and bolts. This may be overpowered, but I didn't want to change the code here too much. It can always be adjusted. This removes the "quiver_type" enum from enum.h, and uses NUM_AMMO in the player.h quiver vector instead. Random elves that generated with hand crossbows before no longer do so, and this has not been replaced by normal crossbows. I hope that's everything!
* Remove unnecessary header-header includes.Robert Vollmert2009-11-271-0/+2
|
* Redraw quiver even if an item that was unquivered is only awkwardly throwable.Vsevolod Kozlov2009-11-131-7/+0
|