summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells4.cc
Commit message (Collapse)AuthorAgeFilesLines
* Another clean up, and add some new weapon speech.j-p-e-g2008-07-071-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6439 c06c8d41-db1a-0410-9941-cceddc491573
* Add a function x_chance_in_y(x,y) to replace the variousj-p-e-g2008-07-061-3/+3
| | | | | | | | random2(y) < x checks, e.g. x_chance_in_y(weight, totalweight). This should make things a bit more readable. Apply it to a number of files. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6428 c06c8d41-db1a-0410-9941-cceddc491573
* A few more cleanups.haranp2008-07-021-13/+6
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6349 c06c8d41-db1a-0410-9941-cceddc491573
* Fix ?immolation not being autoID'd upon reading.j-p-e-g2008-06-221-2/+3
| | | | | | | Fix ?uselessness not using the misc. descriptions. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6051 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up handling of killing mutators or rotters (i.e., chaotic beings), dolorous2008-06-121-1/+1
| | | | | | | | and make them become enraged by your lawful aura if you start worshipping Zin. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5750 c06c8d41-db1a-0410-9941-cceddc491573
* Add still more minor cosmetic fixes.dolorous2008-06-101-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5719 c06c8d41-db1a-0410-9941-cceddc491573
* Clean-up (renaming static methods and comments) in a number of files.j-p-e-g2008-06-101-107/+113
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5703 c06c8d41-db1a-0410-9941-cceddc491573
* Reorder spells in your_spells() and clean up.j-p-e-g2008-06-101-49/+59
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5702 c06c8d41-db1a-0410-9941-cceddc491573
* Modify Evaporate and Stinking Cloud to prompt when firing throughj-p-e-g2008-06-101-22/+42
| | | | | | | | allies. Note: This does still not handle the actual clouds, just the basic beam. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5701 c06c8d41-db1a-0410-9941-cceddc491573
* Modify Portal Projectile to use the quiver interface, so you can nowj-p-e-g2008-06-081-23/+19
| | | | | | | | choose your projectiles and are no longer prompted when "firing through" friendlies. (FR 1816789) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5615 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up "Conjure Ball Lightning".dolorous2008-06-081-49/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5592 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up "Sticks to Snakes", too.dolorous2008-06-081-119/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5587 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up handling of angered monsters.dolorous2008-06-081-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5579 c06c8d41-db1a-0410-9941-cceddc491573
* Consolidate "Call Canine Familiar" into summon_general_creature().dolorous2008-06-071-38/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5525 c06c8d41-db1a-0410-9941-cceddc491573
* Consolidate "Summon Dragon" into summon_general_creature() as well.dolorous2008-06-071-22/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5523 c06c8d41-db1a-0410-9941-cceddc491573
* Consolidate "Summon Butterflies" into summon_general_creature().dolorous2008-06-071-15/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5521 c06c8d41-db1a-0410-9941-cceddc491573
* Fix zombies of wrong habitat on land. It turns out that all thosej-p-e-g2008-06-041-0/+9
| | | | | | | | | | | | | | | careful checks for habitat were ignored (default is HT_LAND) because the base type for undead wasn't chosen until after the position. I now added another habitat check during the base type selection loop and now everything works. :) Add a warning inscription !D that ignores such items during actions like sacrificing items, destroying weapons (Ely), burning books (Trog) or casting sticks to snakes. The failure messages are very clumsy now, but they do get the point across, I hope. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5472 c06c8d41-db1a-0410-9941-cceddc491573
* For (some) consistency, make monster::foe an unsigned short, since that dolorous2008-06-031-3/+4
| | | | | | | | matches player::pet_target, and because tags.cc seems to save monster::foe as a short anyway. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5461 c06c8d41-db1a-0410-9941-cceddc491573
* Revert the previous int -> unsigned in changes, as they don't match some dolorous2008-06-031-2/+1
| | | | | | | | | | | | | | | of the code elsewhere. Weird bits: monsters::foe and player::pet_target are used interchangeably, but the former is an unsigned int, while the latter is an unsigned short. Both of these can be set using the return value of monster_index(), which is a signed int. Most of the functions that use these expect signed ints, as well. ??? git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5459 c06c8d41-db1a-0410-9941-cceddc491573
* Add type fix: attacking targets are unsigned ints, not ints.dolorous2008-06-031-4/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5447 c06c8d41-db1a-0410-9941-cceddc491573
* Fix a recent bug of mine that blocked the friendly fire prompts.j-p-e-g2008-06-021-2/+2
| | | | | | | | | | | | | | | | | | Fix 1943573: Weird message order when attacking charmed monsters. Fix 1826896: NOTE_ID could have line breaks in mid-word Modify the "This feature has more information" hint to mention mouseclicking for Tiles players rather than 'v' like for purists. Oh, and when trying to look into BR 1952908 (buggy trap in the Abyss) I found that traps can be generated in the Abyss after all. I don't know when that was changed but the last time I checked I remember seeing something like "if (level == ABYSS) return false" in a "Can there be traps here?" check. Is my memory playing tricks on me or was that really changed, and if so, was it intentional? git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5445 c06c8d41-db1a-0410-9941-cceddc491573
* Consolidate all cases where corpses are turned into skeletons, asj-p-e-g2008-05-311-5/+1
| | | | | | | | | | | | | | | | | | suggested by dolorous in BR 1977925, and turn coloured draconian corpses into plain draconian skeletons. Same when the game attempts to create coloured draconian skeletons or simulacrums. Added autoinscription to the single inscription command ('{') - this is necessary for items with long descriptions that can't autoinscribed otherwise. Added a small hack to make death cobs (%) appear correctly in the monster list. The rest is cleanup, I believe. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5376 c06c8d41-db1a-0410-9941-cceddc491573
* Add more noise-related cleanups.dolorous2008-05-281-5/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5318 c06c8d41-db1a-0410-9941-cceddc491573
* Yet another session of comment/whitespace cleanups.j-p-e-g2008-05-271-10/+8
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5291 c06c8d41-db1a-0410-9941-cceddc491573
* Improve player beam tracer for firing through friendlies:j-p-e-g2008-05-221-5/+8
| | | | | | | | | | | | | | * name the monster you're firing through ("your goblin zombie") * use maximum possible range * make it work for spells and abilities, as well Still todo: * apply the same logic to firing missiles * don't prompt for monsters that wouldn't be harmed (e.g. living allies for Dispel Undead, etc.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5177 c06c8d41-db1a-0410-9941-cceddc491573
* Remove unneeded blank line.dolorous2008-05-181-1/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5121 c06c8d41-db1a-0410-9941-cceddc491573
* Pull code from mon->can_see(target) into a new function mon->see_grid()j-p-e-g2008-05-181-61/+61
| | | | | | | | | | | | | and use it in the checks for monster/monster visibility. I didn't have the time to test it but it should at least solve part of the problem of monsters firing through walls (if monster visibility is even checked there, which I don't know). Also (as usually), more code cleanup. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5117 c06c8d41-db1a-0410-9941-cceddc491573
* Fix BR 1959133 (Shiori): change Ancus to Ankus.dploog2008-05-161-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5085 c06c8d41-db1a-0410-9941-cceddc491573
* Fix messages for expiring divine robustness and disappearing divine dolorous2008-05-151-1/+1
| | | | | | | shields. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5069 c06c8d41-db1a-0410-9941-cceddc491573
* When placed under penance or excommunicated by Zin, remove divine dolorous2008-05-151-0/+8
| | | | | | | | stamina. Also, consolidate the routines for removing Zin's divine robustness, Zin's divine stamina, and TSO's divine shield. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5059 c06c8d41-db1a-0410-9941-cceddc491573
* Reorder snake selection to favour the nastier snakes when sticks to snakes ↵dshaligram2008-05-101-7/+7
| | | | | | works on big sticks. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4993 c06c8d41-db1a-0410-9941-cceddc491573
* Make Sticks to Snakes stronger.dshaligram2008-05-101-4/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4992 c06c8d41-db1a-0410-9941-cceddc491573
* Simplify handling of monsters angered by the player, and expand it to dolorous2008-05-071-2/+1
| | | | | | | not allow Trog worshippers to have magic-using followers. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4898 c06c8d41-db1a-0410-9941-cceddc491573
* Cleaned up monster generation functions, separate monster zombie type from ↵dshaligram2008-05-051-43/+22
| | | | | | | | | monster number. May be buggy. Allow hydra zombies (they currently do not get the right number of heads). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4872 c06c8d41-db1a-0410-9941-cceddc491573
* First attempt at making vampire feeding interruptible. It doesn't workj-p-e-g2008-05-051-4/+2
| | | | | | | | | | | yet (I had "You stop feeding" followed by "You continue feeding" including full effects), but it's probably better to commit now anyway. Known potions of blood or porridge cannot be quaffed when engorged (alive). Also clean up blood potions check. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4871 c06c8d41-db1a-0410-9941-cceddc491573
* Move your_hand() from spells4.cc to misc.cc.dolorous2008-05-041-43/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4870 c06c8d41-db1a-0410-9941-cceddc491573
* Simplify checks for monsters susceptible to Ignite Poison.dolorous2008-04-291-9/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4760 c06c8d41-db1a-0410-9941-cceddc491573
* Add minor cosmetic fixes.dolorous2008-04-291-3/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4759 c06c8d41-db1a-0410-9941-cceddc491573
* Fixed ignite poison not affecting swamp dragons and drakes (jarpiain).dshaligram2008-04-261-0/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4675 c06c8d41-db1a-0410-9941-cceddc491573
* Add mesilliac's patch in [1944555] for improved handling of dolorous2008-04-211-1/+2
| | | | | | | | followers/summoned creatures, with one minor tweak to take good neutral monsters into account. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4444 c06c8d41-db1a-0410-9941-cceddc491573
* More Divine Shield adjustments. The maximum power is now back at 8, but dolorous2008-04-211-4/+4
| | | | | | | the durtion is now from 35 to 80 turns, the same as a potion of might. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4428 c06c8d41-db1a-0410-9941-cceddc491573
* Improve TSO's divine shield a bit. Now, the bonus goes up as far as 9 dolorous2008-04-201-4/+4
| | | | | | | instead of 8, and it can last as long as 27 turns instead of 18. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4413 c06c8d41-db1a-0410-9941-cceddc491573
* Fixes to compile with Visual C++. Moved direct.cc and direct.h to directn.* ↵dshaligram2008-04-191-2/+2
| | | | | | 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
* Add a few more spell cleanups.dolorous2008-04-191-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4379 c06c8d41-db1a-0410-9941-cceddc491573
* Add more summoning spell cleanups.dolorous2008-04-191-21/+30
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4378 c06c8d41-db1a-0410-9941-cceddc491573
* Allow vampires to mutate when Satiated or higher, and make non-physicalj-p-e-g2008-04-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | mutations only apply at these hunger levels, too. Differentiated mutations into physical (affecting a character's appearance and stuff: scales, hooves, wings, ...) and internal (resistances etc.). I guess this is what people usually refer to as "cosmetic", which I think is an inaccurate description since it makes it sound like they were completely superficial and had no real effect. Here's a list of arbitrarily chosen "physical" mutations: * tough skin, all scales, and fur * strong/clever/agile, and weak/dopey/clumsy * deformed * strong but stiff, and flexible but weak * frail, and robust * claws, fangs, hooves, talons, and horns * stinger, wings * blue/green marks Mutations currently not applying are still listed on the 'A' screen, though in darkgrey and in (brackets). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4246 c06c8d41-db1a-0410-9941-cceddc491573
* Apply Horst von Brand's (first) patch 1887488: gcc-4.3 compile failures.j-p-e-g2008-04-141-0/+1
| | | | | | | I'm not sure what to do about the rest of that tracker item. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4233 c06c8d41-db1a-0410-9941-cceddc491573
* Fix compile (oops) and numerous whitespace changes.j-p-e-g2008-04-141-64/+64
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4229 c06c8d41-db1a-0410-9941-cceddc491573
* Overhaul blood potions to work completely differently.j-p-e-g2008-04-141-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of storing age in item.special they now use a dynamic vector (item.props, like decks do), so that a stack of potions doesn't have to coagulate all at once. Rather than counting down the timers every 20 turns or so, the time-out turn is calculated at creation, and comparison is done against the current turncount. Any action changing a stack (quaffing, firing, Evaporate, picking up, dropping) will always extract the oldest values from the vector, which is likely to be what the player wants. Blood potions now last about 2000 turns (a bit more if drawn from fresh corpses), and coagulate 500 turns before rotting away. I ran a lot of tests in wiz mode and out, but of course there may still be problems. I've added methods to calculate the new timers from old style age counters (item.special), but I'm not sure that they actually work... Oh well... if worst comes to worst, this commit breaks saves. Also: * vampires are not susceptible to fire anymore when Bloodless * make tile_plant_colour also apply for remembered plants out of LOS * fix 1941759: buggy orc dialogue git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4228 c06c8d41-db1a-0410-9941-cceddc491573
* + allocate and initializepauldubois2008-04-111-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | + _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