summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/quiver.cc
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Rename is_valid_item to item_def::is_valid.Vsevolod Kozlov2009-11-061-6/+6
| | | | Signed-off-by: Jude Brown <bookofjude@users.sourceforge.net>
* Split game_options from externs.h into options.h.Robert Vollmert2009-11-041-0/+1
|
* versioning: remove SVN-specific revision data, add Git versioningSteven Noonan2009-10-181-1/+0
| | | | Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* Drop obsolete CVS last-committed headers ($Author$).Adam Borowski2009-10-061-2/+0
|
* * Fix wielding a quivered weapon not changing the quiver.j-p-e-g2009-05-141-1/+1
| | | | | | | * Change Ely ability slots. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9763 c06c8d41-db1a-0410-9941-cceddc491573
* Add minor cosmetic fixes.dolorous2009-05-081-4/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9753 c06c8d41-db1a-0410-9941-cceddc491573
* * Allow fleeing monster to push past higher ranked monsters of the samej-p-e-g2009-04-031-8/+20
| | | | | | | | | | | type. * Allow quivering of wielded missiles (stones for Sandblast etc.) and wielded weapons of returning if your throwing skill is > 0. * Add stairs/gates/shops to the 'V' command, mostly for the convenience of the easy travel feature. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9574 c06c8d41-db1a-0410-9941-cceddc491573
* Setting all .h/.cc files in source to have a consistent keyword propset.ennewalker2009-01-041-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8218 c06c8d41-db1a-0410-9941-cceddc491573
* Adding REVISION() macro to all source files.ennewalker2009-01-041-0/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8217 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up handling of thrown items (mostly large rocks) again.dolorous2008-11-171-2/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7467 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 2162827: tag length calculation was incorrect.haranp2008-10-131-2/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7230 c06c8d41-db1a-0410-9941-cceddc491573
* Fix Evaporate prompt doing the opposite of the player's answer.j-p-e-g2008-07-151-6/+1
| | | | | | | | Fix some more instances of crashes resulting from PROMPT_NOTHING. Change shadow dragon corpse type to rotting. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6569 c06c8d41-db1a-0410-9941-cceddc491573
* Fix occasional jelly crash on unarmed characters.j-p-e-g2008-07-101-0/+6
| | | | | | | | Fix quiver hanging on unthrowable missiles (e.g. javelins, nets for small species). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6478 c06c8d41-db1a-0410-9941-cceddc491573
* Don't offer the wielded weapon for quivering (even if throwable) sincej-p-e-g2008-06-301-2/+2
| | | | | | | | | you can't quiver it anyway. Fix !porridge being highlighted as preferred food if unidentified. Tweak change log a bit. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6259 c06c8d41-db1a-0410-9941-cceddc491573
* When reading a "modification scroll" (prompt: Use on which item?)j-p-e-g2008-06-301-2/+2
| | | | | | | | | | | don't list the scroll you just read as one to use it on. This fixes the ugly issue where the player, forgetting the slot of the scroll just read, uses identify on itself, thereby wasting the scroll. For enchant armour and recharging it's a moot point as they don't work on scrolls anyway, but this way you can't figure out the subtype. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6251 c06c8d41-db1a-0410-9941-cceddc491573
* Force quiver to attempt to use the exact same item in inventory (slotj-p-e-g2008-06-291-5/+19
| | | | | | | | and all, if it still exists) before accepting any item that happens to have the same properties (base + subtype, plusses etc.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6220 c06c8d41-db1a-0410-9941-cceddc491573
* Fix good random secondary choices during character selection.j-p-e-g2008-06-291-1/+4
| | | | | | | | Re-enable quivering with '(' - still buggy, and I'm trying to work out why, but at least it works for some ammo now. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6218 c06c8d41-db1a-0410-9941-cceddc491573
* Add a new command for firing without quivering on 'F'.j-p-e-g2008-06-271-13/+13
| | | | | | | Use puff of fire/ice tiles for ammo of flame/ice being fired. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6169 c06c8d41-db1a-0410-9941-cceddc491573
* Use "!Q" inscription to force a prompt before quivering an item instead ofzelgadis2008-06-271-1/+1
| | | | | | | | | | "!f". Update docs on addition of "!Q", on "!z" changing to "!Z" and "!E" changing to "!v", and on "=f" preventing an item from being auto-quivered. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6163 c06c8d41-db1a-0410-9941-cceddc491573
* Disallow quivering equipped items. (You can still (fi)re your wieldedj-p-e-g2008-06-261-0/+16
| | | | | | | | weapon if you insist, you just can't quiver it.) And another general clean-up. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6149 c06c8d41-db1a-0410-9941-cceddc491573
* Misc. minor cleanups. (Yes, a huge amount of them but still...)j-p-e-g2008-06-261-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6146 c06c8d41-db1a-0410-9941-cceddc491573
* Tweak quiver command some more (allow clearing quiver).j-p-e-g2008-06-241-7/+27
| | | | | | | Update documentation. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6113 c06c8d41-db1a-0410-9941-cceddc491573
* Modify quiver to only quiver ammunition explicitly chosen by the playerj-p-e-g2008-06-241-4/+60
| | | | | | | | | | | | (via (,) or i, or by the new quivering command). Ammo that just happens to come next in the fire order is not quivered anymore even if you continue firing. Add a new quiver command on Q, and while I was at it, restrict the items offered when firing (fi) or quivering to actual throwables. (This was a long outstanding FR.) I think that's it... git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6112 c06c8d41-db1a-0410-9941-cceddc491573
* Force update of the quiver by picking up throwable items. This mightj-p-e-g2008-06-241-11/+18
| | | | | | | | | | | | | | hamper performance and is still not optimal: Wielding a sling, running out of stones, firing darts instead and then picking up some new stones won't make the quiver switch away from the darts because you "explicitly" fired them. Also, can someone please tell me whether "(" or ")" are supposed to loop to the correct next item? I haven't been able to work that out from the quiver behaviour alone - it's not all that consistent, unfortunately. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6108 c06c8d41-db1a-0410-9941-cceddc491573
* Change quiver output to that of the next item actually fired. Currentlyj-p-e-g2008-06-241-11/+18
| | | | | | | updates correctly on firing and dropping quivered items. May be buggy. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6107 c06c8d41-db1a-0410-9941-cceddc491573
* Fix monster emergency spells not checking for ENCH_TP, thus allowingj-p-e-g2008-06-231-26/+58
| | | | | | | | | | monsters to cancel their teleportation without meaning to. (BR 2000428) Fix the quiver not being cleared when wielding the only quiverable (and thus previously quivered) item. (Un)wielding such an item now switches nicely between "Nothing wielded" and "Nothing quivered", as it should be. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6089 c06c8d41-db1a-0410-9941-cceddc491573
* Yikes, so many files! And all I did was add more item evaluationj-p-e-g2008-06-091-22/+24
| | | | | | | | | | | | | | | | | | | | | | | functions for menu colouring and pickup... Added: emergency_item, good_item, dangerous_item, bad_item, and useless_item, all taking into account player species and mutations, so e.g. =see invisible is useless for Naga, and !poison is always bad but only useless if you don't know Evaporate. Never autopickup useless, dangerous (e.g. ?immolation) or inedible items, and simplify the item colour/pickup options accordingly. I'll have to see if pickup.lua is still even needed after this. Removed the menu_colour_prefix_id option as I can't see any reason to turn it off. Oh, and fixed a bug where Kenku were unable to stop levitating if they gained level 15 while levitating. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5658 c06c8d41-db1a-0410-9941-cceddc491573
* Fixes to compile with Visual C++. Moved direct.cc and direct.h to directn.* ↵dshaligram2008-04-191-9/+11
| | | | | | to avoid conflict with VC++ direct.h header. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4390 c06c8d41-db1a-0410-9941-cceddc491573
* Fix case where quiver stored items with quantity other than 1pauldubois2008-04-191-0/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4356 c06c8d41-db1a-0410-9941-cceddc491573
* Fix g++ carping about overflow in implicit constant conversion for the ↵dshaligram2008-04-181-1/+1
| | | | | | quiver cookie. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4329 c06c8d41-db1a-0410-9941-cceddc491573
* Another code cleanup.j-p-e-g2008-04-151-30/+25
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4244 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 1942290pauldubois2008-04-151-19/+10
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4237 c06c8d41-db1a-0410-9941-cceddc491573
* Quiver work:pauldubois2008-04-141-8/+89
| | | | | | | | | | | | | | + bug: if wield sling and no quiver, then pick up stones: should quiver + implement: save and load (does not break saves) + remove: fire_quiver_best + remove: you.quiver + bug: identifying items doesn't update quiver properly + rename: you.quiver_change -> you.redraw_quiver + test no item because of =f git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4227 c06c8d41-db1a-0410-9941-cceddc491573
* + allocate and initializepauldubois2008-04-111-50/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | + _fire_prompt_for_item returns -1, not ENDOFPACK + remove _fire_get_noitem_reason() + remove get_current_fire_item() + fix get_next_fire_item + remove _get_fire_order() + remove _fire_item_matches() + verify: no use of ENDOFPACK, use -1 + on_item_fired - implement: tags stuff + bug: wielding sling with stones = empty quiver - bug: wield sling, no quiver, pick up stones: should quiver + bug: wield sling, pick up stones: update # stones + bug: wield sling, stones quivered, drop stones: should update - feature: explicitly dropping all of ammo stack should remove it from quiver - move get_next_fire_item into quiver.cc? - remove: fire_quiver_best - remove: you.quiver - rename: you.quiver_change -> you.redraw_quiver - test no item because of fire_order_begin, =f, etc - find better place for on_weapon_changed - polish Qv: display, the command change - PROBLEM: cast_portal_projectile uses empty quiver slot? (test this) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4191 c06c8d41-db1a-0410-9941-cceddc491573
* Freshly-rewritten quiver code. This is just a checkpoint, and it'spauldubois2008-04-091-0/+296
used from anywhere yet. It should compile. Let me know if it doesn't, or if I've modified the makefiles incorrectly. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4161 c06c8d41-db1a-0410-9941-cceddc491573