summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/beam.cc
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Add a few more cosmetic fixes.dolorous2008-06-111-6/+7
| | | | | | | | | Regarding fire vortices: after some thought, I'm not marking them as god gifts, as they're created by the clouds created by Fire Storm, as opposed to Fire Storm itself, which makes it an indirect result. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5720 c06c8d41-db1a-0410-9941-cceddc491573
* Comment fixes.dolorous2008-06-101-2/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5717 c06c8d41-db1a-0410-9941-cceddc491573
* Add comments documenting exceptions to the general rule of making dolorous2008-06-101-0/+2
| | | | | | | | | monster-creating spell (mis)casts produce god gifts. The exceptions are all natural phenomena treated as monsters: ball lightning, spatial vortices, and fire vortices. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5708 c06c8d41-db1a-0410-9941-cceddc491573
* Clean-up (renaming static methods and comments) in a number of files.j-p-e-g2008-06-101-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5703 c06c8d41-db1a-0410-9941-cceddc491573
* Modify Evaporate and Stinking Cloud to prompt when firing throughj-p-e-g2008-06-101-57/+55
| | | | | | | | 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
* Bug 1987918: make hellfire and magma produce steam when over water.zelgadis2008-06-091-4/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5617 c06c8d41-db1a-0410-9941-cceddc491573
* Modify Portal Projectile to use the quiver interface, so you can nowj-p-e-g2008-06-081-1/+1
| | | | | | | | 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 handling of angered monsters.dolorous2008-06-081-3/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5579 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 1986252: double "Blech! You need xy!" messagej-p-e-g2008-06-061-5/+5
| | | | | | | | | | | | | | Fix 1966204: make non-amphibious undead capable of drowning or the equivalent thereof When you see a weapon with the returning ego return (to you or a monster) set the properties known along with the brand (because artefacts can't be id'd by throwing alone, anyway). This helps alleviate BR 1958616, but doesn't solve the problem with the curse status being unknown. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5499 c06c8d41-db1a-0410-9941-cceddc491573
* Fix mimics not teleporting when attacked by reaching or airstrike, and aj-p-e-g2008-06-051-3/+6
| | | | | | | few (really) minor adjustments on monster pathfinding. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5487 c06c8d41-db1a-0410-9941-cceddc491573
* Comment fixes.dolorous2008-06-041-2/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5469 c06c8d41-db1a-0410-9941-cceddc491573
* Add minor cosmetic fixes.dolorous2008-06-041-0/+8
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5468 c06c8d41-db1a-0410-9941-cceddc491573
* Don't display the warning prompt for firing a charming beam (from e.g. a dolorous2008-06-041-5/+5
| | | | | | | | wand of enslavement) at a non-holy monster, since it doesn't generate negative conducts then. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5467 c06c8d41-db1a-0410-9941-cceddc491573