summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/beam.cc
Commit message (Collapse)AuthorAgeFilesLines
* Apply more commits into 0.4 branch, again mostly by Haran:j-p-e-g2008-12-081-1/+1
| | | | | | | | | | | | | | | | | 6950, 6954, 6959, 6962, 6963, 6965, 6968, 6970 (partly), 6997, 6998, 7001, 7061, 7065, 7071, 7132 (partly), 7174, 7186, 7213, 7233, 7268, 7268, 7293, 7319, 7339, 7358, 7393 (partly) * Tweak a few monster flags. * Fix autoswapping jewellery taking longer than manual swapping. * Fix crash when attempting to create nonexisting monster in wizmode. * Make ego armour descriptions follow abbreviation guidelines. * Fixed buggy monster movement away from the player. * Disabled traps in the Abyss. * Fixed a few other minor bugs, and improves messaging. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@7788 c06c8d41-db1a-0410-9941-cceddc491573
* Trunk->0.4 r6859: Fix crash when tracer hits monster with negative AC ↵dshaligram2008-08-241-3/+3
| | | | | | (Ekaterin). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6860 c06c8d41-db1a-0410-9941-cceddc491573
* Apply Haran's commits 6773 and 6777-6784 to 0.4.j-p-e-g2008-08-071-0/+3
| | | | | | | | | | | | | | | | * Fix 2037104: amulet of Controlled Flight not autoIDing. * Fix 2038973: explosive tracers leaking information about invisible monsters. * Fix 2039217: check shield status for non-weapons before wielding * Fix 2039734: non-Spriggan transmuters being cheated on UC * Fix 2037845: unstackedness was overriding finishing a deck * Fix 2038476: semicontrolled blink. * Fix 2038962: casting Divine Shield wasn't refreshing AC. * Fix 2038651: real/fake rakshasa identity being leaked in descriptions. * Fix 2035976: doubled inscriptions in equipped items in dump. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6792 c06c8d41-db1a-0410-9941-cceddc491573
* Trunk->0.4 r6729: Fix evaporate trailing clouds before explosion (sorear).dshaligram2008-07-301-0/+5
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6730 c06c8d41-db1a-0410-9941-cceddc491573
* Apply r6700 and r6706: Cleansing Flame harming helpless monsters andj-p-e-g2008-07-281-2/+6
| | | | | | | angering TSO, !blood counting towards decks of summoning. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6710 c06c8d41-db1a-0410-9941-cceddc491573
* Apply r6627, r6635, r6638 and r6645 (among others) to 0.4.j-p-e-g2008-07-241-48/+97
| | | | | | | | | Fixes Selective Amnesia crash, claws/ankus in the weapon option, randart bardings pretending to be boots and smaller stuff. Includes indication of monsters seeing/sensing invisible. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6665 c06c8d41-db1a-0410-9941-cceddc491573
* Trunk->0.4 r6643: Reduce bounciness of beams - bouncing kills twice as much ↵dshaligram2008-07-231-2/+1
| | | | | | beam travel. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6647 c06c8d41-db1a-0410-9941-cceddc491573
* Trunk->0.4 r6642,6644: Only bolt of cold gets freezing cloud, cloud duration ↵dshaligram2008-07-231-2/+7
| | | | | | is much reduced. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6646 c06c8d41-db1a-0410-9941-cceddc491573
* Applying r6613 to 0.4.ennewalker2008-07-191-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6614 c06c8d41-db1a-0410-9941-cceddc491573
* Applying r6611 to 0.4.ennewalker2008-07-191-8/+13
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6612 c06c8d41-db1a-0410-9941-cceddc491573
* Apply r6579 to 0.4.1, and revert my local makefile change (oops!)j-p-e-g2008-07-171-1/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6581 c06c8d41-db1a-0410-9941-cceddc491573
* Apply commit r6569 to 0.4 trunk.j-p-e-g2008-07-151-13/+13
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6570 c06c8d41-db1a-0410-9941-cceddc491573
* r6551 for 0.4.haranp2008-07-151-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6552 c06c8d41-db1a-0410-9941-cceddc491573
* Add lm_props.lua and appry recent commits.j-p-e-g2008-07-111-7/+14
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6494 c06c8d41-db1a-0410-9941-cceddc491573
* Update documentation for 0.4.j-p-e-g2008-07-081-2/+6
| | | | | | | Apply recent commits. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6458 c06c8d41-db1a-0410-9941-cceddc491573
* Another clean up, and add some new weapon speech.j-p-e-g2008-07-071-10/+9
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6439 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 2011722: Reallow targetting beams such that you may be hit. (There'sj-p-e-g2008-07-061-3/+11
| | | | | | | | | | | | | a new prompt now, but don't prompt a second time if you already confirmed another one before.) Fix some issues when creating items in the Abyss during GDT_GAME_START. This may or may not have played a role in 2008976. Lower spawning rate in the Abyss during GDT_GAME_START (10% spawning chance instead of guaranteed spawning per 5 turns). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6434 c06c8d41-db1a-0410-9941-cceddc491573
* [2010192] Fixing issue where cancelling a ranged attack (e.g. "Really fire ↵ennewalker2008-07-051-5/+11
| | | | | | on...?") wouldn't really cancel the attack. Also, s/beam_stopped/beam_cancelled/ for clarity. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6409 c06c8d41-db1a-0410-9941-cceddc491573
* Disallow vampires from draining summoned creatures to be consistent withj-p-e-g2008-07-041-18/+19
| | | | | | | | | | | | | summoned creatures being incapable of bleeding on the floor. This makes things more difficult for Vampires; on the other hand there was a (more or less) recent change that lets them regain 1 hp *per turn* when draining corpses. We might also increase the duration of blood potions... Apart from that, various clean-ups. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6393 c06c8d41-db1a-0410-9941-cceddc491573
* Remove apparent debugging statement.dolorous2008-07-041-5/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6383 c06c8d41-db1a-0410-9941-cceddc491573
* Remove debugging statement, minor clean up.j-p-e-g2008-07-031-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6369 c06c8d41-db1a-0410-9941-cceddc491573
* Revert the change on ammo handling for Tiles, and replace it with a morej-p-e-g2008-07-021-3/+4
| | | | | | | | | | | | | | | generic logic that uses item tiles for BEAM_MISSILE, else bolts according to flavour. Identify monster fired ammunition ego if the launcher ego is known, not that it has much of an effect because plain ammo gets no special description. In the message list the fired item as it will look to the player (i.e. "arrow of ice" for a plain arrow fired off a bow of frost), even though the item actually dropped will still be a plain one. I hope this isn't too confusing. (And if it is, it should be easy to revert. :p) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6331 c06c8d41-db1a-0410-9941-cceddc491573
* If an explosion has its center in Sanctuary then give a message aboutzelgadis2008-07-021-0/+9
| | | | | | | | | Zin containing the explosion. Mainly for miscast effects which cause explosions, but also catches the player casting spells which cause explosions. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6323 c06c8d41-db1a-0410-9941-cceddc491573
* Typo fix.dolorous2008-07-021-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6315 c06c8d41-db1a-0410-9941-cceddc491573
* Add more miscellaneous minor fixes.dolorous2008-07-021-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6314 c06c8d41-db1a-0410-9941-cceddc491573
* When laying down Sanctuary make all pets inside it stop attacking and movezelgadis2008-07-021-2/+4
| | | | | | | | | | | | | | | | | | | towards you. You can get them to attack while inside Sanctuary by giving them an order to attack a specific monster, and if they do attack and violate Sanctuary then it will be removed. Attempting to give such an order will give a warning that it might violate Sanctuary. Prevent confused and berserking pets from violating Sanctuary, since you can't order them not to. Prevent monsters fleeing Sanctuary from attacking monsters which are blocking their flight path. The player attacking him/her-self because of confusion no longer vilates Sanctuary. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6312 c06c8d41-db1a-0410-9941-cceddc491573
* Make tracer beams call stop_attack_prompt() for foes as well as forzelgadis2008-07-011-12/+29
| | | | | | | | | | friends, to check for attacking foes while in sanctuary. The way it's done means that if you or an enemy is in sanctuary and the beam also passes through an ally then it will prompt you twice, once for the first friend and once for the first foe, but that shouldn't be too much of a problem. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6287 c06c8d41-db1a-0410-9941-cceddc491573
* Make initial sanctuary be circular in shape rather than square.zelgadis2008-07-011-0/+4
| | | | | | | | | | | | | | Remove non-harmless clouds when laying down sanctuary, and don't allow non-harmless clouds to speard into sanctuary or be placed on it. Don't let explosions spread into sanctuary (probably needs a flavour message). If a giant spore or ball lightning somehow explodes while in sanctuary then give a message about Zin containing it's explosion, and skip the call to explosion(). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6284 c06c8d41-db1a-0410-9941-cceddc491573
* Bug 2006092: beam.fr_count and beam.foe_count were being unecessarilyzelgadis2008-07-011-14/+0
| | | | | | | | incremented, leading to stop_attack_prompt() not always being called when it should be. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6276 c06c8d41-db1a-0410-9941-cceddc491573
* Force beams of digging (wand or spell, known or unknown, also /randomj-p-e-g2008-06-301-0/+2
| | | | | | | | | | effects) to ignore the endpoint target ('.') in favour of continuing until the end of the range. Unrestrict tridents for some more species. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6265 c06c8d41-db1a-0410-9941-cceddc491573
* In response to BR 2005224 (TSO penance from shooting unseen underwaterj-p-e-g2008-06-281-3/+6
| | | | | | | | | | enemies) use player_visible_monster() as parameter known when setting conducts in beam.cc, so the player isn't punished for attacking monsters he didn't know were there, or if he did, had no idea about their current behaviour (fleeing perhaps?) Might be too nice, again, but I think it's okay. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6190 c06c8d41-db1a-0410-9941-cceddc491573
* [2001518] #ifdefing out a put_colour_ch in the beam routine to fix spurious ↵ennewalker2008-06-281-1/+2
| | | | | | tiles asterisk when beams are drawn. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6184 c06c8d41-db1a-0410-9941-cceddc491573
* Bug 2004889: hack to make beam.fr_count negative if the player answeredzelgadis2008-06-281-5/+5
| | | | | | | | | "no" to a "really fire beam" prompt; this allows fr_count to be used to also actaully count how many friends would be hit when firing a player tracer, instead of only indicating if a beam was canceled. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6179 c06c8d41-db1a-0410-9941-cceddc491573
* Update beam.fr_count and beam.foe_count for beams fired by the playerzelgadis2008-06-271-13/+14
| | | | | | | as well as beams fired by monsters. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6166 c06c8d41-db1a-0410-9941-cceddc491573
* Misc. minor cleanups. (Yes, a huge amount of them but still...)j-p-e-g2008-06-261-7/+7
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6146 c06c8d41-db1a-0410-9941-cceddc491573
* Add minor cosmetic fixes.dolorous2008-06-191-17/+14
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5985 c06c8d41-db1a-0410-9941-cceddc491573
* Simplify.dolorous2008-06-191-4/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5983 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 1996837: Allow equipping spellcasters with ammunition on generation.j-p-e-g2008-06-191-7/+7
| | | | | | | Fix 1997179: Merge zombies correctly in the monster list. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5977 c06c8d41-db1a-0410-9941-cceddc491573
* Fix mephitic cloud allowing no self-targetting. (BR1995505)j-p-e-g2008-06-171-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5920 c06c8d41-db1a-0410-9941-cceddc491573
* Simplify.dolorous2008-06-171-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5918 c06c8d41-db1a-0410-9941-cceddc491573
* Fix attack conduct handling to register more than one conduct for an dolorous2008-06-171-8/+8
| | | | | | | | | | | | | | | attack again. For example, if you make an unchivalric attack on a neutral monster, both the "unchivalric attack" and "attack neutral" conducts will be handled again, instead of just the former (big oops). Passing a constant-sized array of god_conduct_triggers and adding wrapper functions to enable and disable them all is not the most elegant solution, but I don't quite have the time or the understanding right now to rewrite the god_conduct_trigger class to handle more than one conduct at once, and this does work in the meantime. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5914 c06c8d41-db1a-0410-9941-cceddc491573
* Use more wrappers, and add more cleanups.dolorous2008-06-161-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5893 c06c8d41-db1a-0410-9941-cceddc491573
* Don't change beam names for tracers. (Fixes 1994978.)j-p-e-g2008-06-161-13/+12
| | | | | | | | | | | Clean up the vampire ability screen a bit. Special case naga bardings of running (according to makeitem.cc they can exist) to be called "naga barding of speedy slithering" instead. Yes, it's a hack, and yes, the name is rather unwieldy, but it makes more sense this way. I hope. :p git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5880 c06c8d41-db1a-0410-9941-cceddc491573
* Add more god gift-related fixes. First, expand mgen_data::hostile_at() dolorous2008-06-141-1/+6
| | | | | | | | | | | | | to allow specifying more parameters, and merge it with mgen_data::alert_hostile_at(), since their only difference after expansion is the hostile monster's target. Second, if a god makes you cast Fire Storm, any fire vortices produced will finally be marked as god gifts. Third, for consistency, don't immediately alert miscast-produced spatial vortices to your presence, since the aforementioned fire vortices aren't. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5818 c06c8d41-db1a-0410-9941-cceddc491573
* Add explanatory comments to the pathfinding routines. I might have gonej-p-e-g2008-06-121-20/+30
| | | | | | | | overboard here :) - but I figured that it could be useful to occasionally explain *why* I implemented something a certain way. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5767 c06c8d41-db1a-0410-9941-cceddc491573
* Implement the Petrify spell in a rather basic variant, and replace the j-p-e-g2008-06-121-4/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | player spell "Paralyse" with it, i.e. not the wand/potion/misc. effects. Petrify is a 4th level spell of the Enchantment/Transmigrations school (a unique combination, I believe), all other values (incl. the level) were shamelessly stolen from Paralysis. Anyway, it consists of two elements (so I actually added TWO new enchantments), Petrifying and Petrified. A monster that is petrifying cannot move around but can perform actions like hitting adjacent monsters or casting spells at a slowed rate (1.5 of the normal cost). Once this sub-enchantment runs out (happens faster) the monster cannot move or act anymore, so it works like Paralysis. The damage you do during stabbing is one third of what you'd do otherwise, for both states of enchantment, and for both stabbing counts as unchivalric behaviour. It has not been implemented as a monster spell, and ghosts of characters that had it will use Paralyse instead. Consequently, the effect on the player (in self targetting) only handles the Petrified part. Numbers, esp. enchantment timeout, will need tweaking. They're currently Petrifying: cturn = 50 / _mod_speed(10, mons->speed); Petrified: cturn = std::max(8, 150 / (1 + modded_speed(mons, 5))) because I wanted the first to always run out faster than the second, but at the same time make the ratio of Petrifying/Petrified tilt in favour of the first for powerful monsters. The numbers are more or less made up, and tested with different monsters in wizard mode. Still, could be anything between too weak and overpowered, though the latter is more likely. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5761 c06c8d41-db1a-0410-9941-cceddc491573
* Oops, don't touch beam.foe_count if the "beam" is actually a missile.zelgadis2008-06-121-1/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5760 c06c8d41-db1a-0410-9941-cceddc491573
* beam.foe_count (and related members) weren't being updated when a monsterzelgadis2008-06-121-0/+11
| | | | | | | was in the path of a non-enchantment beam. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5758 c06c8d41-db1a-0410-9941-cceddc491573
* Remove unneeded methods (including the old resistance screen), renamej-p-e-g2008-06-121-5/+5
| | | | | | | debugging functions, and some other clean-up. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5757 c06c8d41-db1a-0410-9941-cceddc491573
* Add spacing fixes.dolorous2008-06-111-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5721 c06c8d41-db1a-0410-9941-cceddc491573