summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/beam.h
Commit message (Collapse)AuthorAgeFilesLines
* Trees don't reflect electricity; for bolts of lightning they ignite instead.Adam Borowski2010-01-121-0/+1
|
* headers: fix inconsistent struct/class forward declarationsSteven Noonan2009-12-291-1/+1
| | | | | | | Some classes were erroneously referred to as 'struct' in forward declarations, and vice versa. Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* Merfolk (water/ice) elementalists join the Shoals guard.Darshan Shaligram2009-12-291-0/+6
|
* Revert beams to not affect the source cell.Robert Vollmert2009-12-261-1/+1
| | | | | | | | The change was originally done to allow hostile oklobs to target the player if he happens to be standing in the same cell, but they appear to do that successfully regardless. Fixes issue #133, issue #246.
* ammo mulch changesjohnny shelley2009-11-201-0/+2
| | | | | | | | | | fire / frost / electric / reaping are not auto mulch flame has chance to save reduced by 2 frost has chance to save reduced by 1 reaping has chance to save reduced by 3 electric has standard chance as it only procs 1 in 3 added was_missile to beam properties in order to not auto mulch other beam types than BEAM_MISSILE Signed-off-by: Matthew Cline <zelgadis@sourceforge.net>
* beam: new member source_nameMatthew Cline2009-11-131-0/+4
| | | | | | | New bolt class member source_name, which is automatically set if the monster which created the beam kills itself. Currently only used when Fire Storm places fire vortexes, so that they'll have a monster name for summon blaming.
* Bug 2852602: wall stopped beam gets two chancesMatthew Cline2009-11-081-1/+1
| | | | | | If a wall stopped an item beam, and there was an actor right in front of the wall, then the beam would try to hit the actor with the item, even if the beam had already missed.
* Remove duplicated logic for DMsl/RMslStefan O'Rear2009-11-081-3/+0
| | | | Also fix a bug where Kirke's DMsl was incorrect for bolts.
* Sound overhaul: sound where spell hitsMatthew Cline2009-11-041-0/+4
| | | | | | | | | | Directed spells now do noise where they hit a monster/player, rather than where they're cast (enchantment spells have 0 noise when they hit); casting these spells generates a noise of loudness 1 where the spell caster is. The noise level is hard-coded in beam.cc's zap_data array (and setup by zapping()), and is constant regardless of the amount of damage done or the beam's power. Beam-ish spells generates a seperate sound event for each target hit. Spells which miss generate no noise.
* Splitting up stuff.cc.Robert Vollmert2009-10-301-2/+1
| | | | New: colour.cc, coord.cc, coordit.cc, random.cc, rng.cc.
* Simplify.David Lawrence Ramsey2009-10-281-3/+3
|
* Beams can be assigned custom hit verbs nowabrahamwl2009-10-281-0/+4
| | | | If a beam is not, old behavior is default.
* Electrocution discharge in water ala FR 1637214abrahamwl2009-10-281-0/+4
| | | | | | | | | | | | | | | | | | | Weapons of electrocution now discharge in water, if the target is touching the water and not rElec, hitting all adjacent water-touching non-rElec creatures for about half the normal electrocution damage. Particularly notable new code is the implementation of an area-of-effect callback for beams, as well as a function and structure for weapon effects that should only happen after the target would have died, if it was going to die, and therefore cannot safely make use of its data. Issues that still need to be decided: - How doe Xom feel about this? (eg. If creatures hurt themselves this way.) - Should it ask you if you want to attack when you know the discharge will hit yourself?
* Remove chain-lightning specific LOS test from beam.cc.Robert Vollmert2009-10-171-1/+0
| | | | | | There's now a spell-specific _lightning_los which may require some fine-tuning -- I'm not quite sure of the intention of the original check.
* Drop obsolete CVS last-committed headers ($Author$).Adam Borowski2009-10-061-2/+0
|
* Make miasma and miasma resistance more consistent. It no longer dependsDavid Lawrence Ramsey2009-09-291-0/+1
| | | | on negative energy resistance, but on rotting resistance.
* Add spelling fixes.David Lawrence Ramsey2009-09-231-1/+1
|
* Commit several patches:j-p-e-g2009-09-131-1/+1
| | | | | | | | | | | | * patch 2849505 by weyrava: make submerged monsters use the correct colour * patch 2857771 by caotto: another Feawn update * patch 2838771 by camedo: add potions of brilliance/agility * BR 2841651 by bookofjude: allow Merfolk to control-tele into deep water Now we need tiles for the new potions! git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10669 c06c8d41-db1a-0410-9941-cceddc491573
* Apply caotto's patch in [2827204] to finish the plant god, with some dolorous2009-07-281-0/+4
| | | | | | | cleanups added by me. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10442 c06c8d41-db1a-0410-9941-cceddc491573
* Apply my recent commits to trunk.j-p-e-g2009-06-151-0/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9984 c06c8d41-db1a-0410-9941-cceddc491573
* Merge r9975 from 0.5 branch: fix spurious line-of-fire warning bug.zelgadis2009-06-141-0/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9977 c06c8d41-db1a-0410-9941-cceddc491573
* * Fix non-prompting when firing through allies.j-p-e-g2009-04-201-9/+0
| | | | | | | | | * Don't autopickup chunks if starving. (Yes, I died because of that. Xom was very much amused...) * Some spacing fixes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9668 c06c8d41-db1a-0410-9941-cceddc491573
* Comment fix.dolorous2009-02-071-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8954 c06c8d41-db1a-0410-9941-cceddc491573
* Implented some ranged brands from FR #2006917 and #1891231: shadow andzelgadis2009-01-141-2/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | penetration (not phasing) for launchers and shadow, penetration, dispersal, exploding, steel and silver for ammo. Never randomly generated. If a launcher of venom is used to launch flame or ice ammo then the resulting bolt will be poisoned, just like poisoned ammo launched from a launcer of flame or frost. Put missile beam setup code that's common to monsters and the player in setup_missile_beam(). Removed mons_thrown_object_destroyed(), thrown_object_destroyed() is now used for both monsters and the player. The bolt struct has several new callback fields that can be set to alter the beam's behaviour; currently only used by the brands implemented in this commit, but they should be general enough to be used by anything. The bolt struct has the new field "special_explosion" which can be used to cause an explosion with flavour and/or damage dice different than the rest of the beam. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8449 c06c8d41-db1a-0410-9941-cceddc491573
* More code cleanups.haranp2009-01-131-5/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8446 c06c8d41-db1a-0410-9941-cceddc491573
* Factored out bolt tracer variables into tracer_info struct.haranp2009-01-021-10/+18
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8113 c06c8d41-db1a-0410-9941-cceddc491573
* Add member path_taken to the bolt class, a coord_def vector defining the pathzelgadis2009-01-011-0/+2
| | | | | | | | | | the beam took. In mons_cast_noise(), if the spell's target isn't a dead-on hit for anything, then fire a tracer to figure out who it *looks* like the spell is aimed at. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8074 c06c8d41-db1a-0410-9941-cceddc491573
* Implement divination miscasts for orange statues, fix silver and orange ↵dshaligram2008-12-291-2/+3
| | | | | | statues to attack monsters as they attack the player. Also fix clouds not being cleared on level reset in dungeon.cc. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8017 c06c8d41-db1a-0410-9941-cceddc491573
* Complete rewrite of the beam code, making it considerably saner.haranp2008-12-251-22/+117
| | | | | | | However, there might be quite a few bugs lurking in this rewrite. Sorry. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7975 c06c8d41-db1a-0410-9941-cceddc491573
* Added "The Stairs" card (not yet in any deck), eventually to be the card whichzelgadis2008-12-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | re-arranges all stairs on the level, but now is just used to test the code used to move stairs in LOS away or towards the player. Added beam flavour BEAM_VISUAL for animating someting moving in a line which doesn't have any effects on its own, and removed BEAM_LINE_OF_SIGHT, which was no longer being used. Added bolt structure field "delay", which can be used to change the delay between animating each square in a beam from the default of 15 msec. For eventual use as a Xom effect added the stairs-are-avoiding-you durations DUR_REPEL_STAIRS_MOVE and DUR_REPEL_STAIRS_CLIMB. If DUR_REPEL_STAIRS_MOVE alone is set then stepping onto a stairs/portal/etc has a 50% chance of making it move away in a random direction. If DUR_REPEL_STAIRS_CLIMB alone is set then attempting to climb a stairs/etc has a 50% chance of making it move away before you can get through it (and ending your turn in the process). If both are set then moving onto it and attempting to climb each have a 29% chance of making it move, for a combined chance of 49.59% of a move-and-climb making the stairs move away. Once a stair is successfully taken there's a 50% chance of the stair on the other end moving away from the player, and then both durations are reset to 0. These can be tested by drawing The Stairs card ("&c stair"), which will set DUR_REPEL_STAIRS_CLIMB if you're on top of a stair or DUR_REPEL_STAIRS_MOVE if your'e not. Added a few wizard targetting command placeholders. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7865 c06c8d41-db1a-0410-9941-cceddc491573
* Dragons and draconians now give a breath message of "breathes @beam@ atzelgadis2008-12-141-0/+9
| | | | | | | | | | @target@." instead of merely "breathes." If an invisible monster on a square visible to the player fires a visible beam then give a message to the player about it. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7829 c06c8d41-db1a-0410-9941-cceddc491573
* Added BEAM_CHAOS and changed chaos launchers/ammo to use that. Currently onlyzelgadis2008-12-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | chooses a different, random beam flavour (which undoudtedly needs to have their relative weights changed after playtesting) for each square it passes through, but in the future it might do things like bounce off walls at weird angles or animate weapons left laying on the ground. Added CLOUD_CHAOS, though it doesn't do anything yet. Monsters which are marked summoned or otherwise given ENCH_ABJ can also be marked with the type of summoning that happened, which is stored in the until-now-unused ENCH_SUMMON. This is useful for figuring out if a monster has ENCH_ABJ but isn't really summoned (like fire vortices created by Fire Storm or dancing weapons created by Tukima's Dance) so that they won't be affected by abjuration. It's also currently used to do a different "dissapears in a puff of smoke" messages for summoned monsters based on the summoning type, so that monsters summoned by Shadow Creature "dissolve into shadows" and don't leave behind any clouds, and temporary god gift monsters from good gods "dissolve into sparkling lights". In the future it might be used to do temporarily animated corpses, which turn back into a corpse when killed or when the animation runs out. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7778 c06c8d41-db1a-0410-9941-cceddc491573
* Added shields of reflection, though they're not randomly generated and have nozelgadis2008-12-011-5/+22
| | | | | | | | | | | | | | | | valuation is shopping.cc. It currently only reflects missiles that are blocked with the shield. They could also reflect the brand effects of blocked melee weapons, but I'm not sure if that's a good idea. drop_item and the item to be dropped have been moved from fire_beam()'s parameters into the bolt structure, along with the beam's remaining range. Seems to work fine, but it might still lead to some buggyness. The game now distinguishes between killing yourself by hitting yourself with a beam bounced off a wall versus other forms of self targeting. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7705 c06c8d41-db1a-0410-9941-cceddc491573
* Add a few more poison-related cleanups.dolorous2008-11-161-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7449 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up sticky flame handling.dolorous2008-11-071-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7409 c06c8d41-db1a-0410-9941-cceddc491573
* Add poison-related cleanups.dolorous2008-11-071-2/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7400 c06c8d41-db1a-0410-9941-cceddc491573
* Decouple zap_type from wand_type prepatory to a big beam() rewrite.haranp2008-10-091-71/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7200 c06c8d41-db1a-0410-9941-cceddc491573
* Redid monster death idiom so that monsters::hurt can implicitlyharanp2008-10-041-47/+15
| | | | | | | | call monster_die(). (This behaviour can be overriden.) Minor code cleanups elsewhere, removal of dead code from bolt. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7123 c06c8d41-db1a-0410-9941-cceddc491573
* Ranges redone. bolt no longer has a rangeMax, just a range.haranp2008-09-251-2/+1
| | | | | | | | | Almost all ranges are now capped by LOS. There are still some things missing, most noticeably randomizing ranges for the range-1-to-2 spells (e.g. Flame Tongue.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6984 c06c8d41-db1a-0410-9941-cceddc491573
* Remove pre-Stone Soup change history from source files, and push it allj-p-e-g2008-09-141-4/+0
| | | | | | | | | | into a file crawlhistory.txt in docs/obsolete. I used a perl script to do this under the assumption that all these change logs used the same system following the keyword "Change History". git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6930 c06c8d41-db1a-0410-9941-cceddc491573
* Add the flaming corpse monster, as specified in FR [1746720], with dolorous2008-09-061-0/+4
| | | | | | | | | | | | | | | several tweaks: its resistances are the inverse of the freezing wraith's, but with sticky flame resistance added, and its console character is a lightred 'z'. As specified, it uses a sticky flame melee attack: AF_NAPALM. Note that it needs a tile. Also, expand the list of servants that Yredelemnul can send, as specified by Lemuel awhile ago (including the flaming corpse). This expansion allows the sending of more than one creature per instance, currently only used for Yred's flying skulls. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6873 c06c8d41-db1a-0410-9941-cceddc491573
* * Force ?immolation to never burn scrolls, whether in inventory or on j-p-e-g2008-08-181-2/+4
| | | | | | | | | the floor. * List new amount of charges when recharging identified wands. * Tweak some checks for travel_path to be on the safe side. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6834 c06c8d41-db1a-0410-9941-cceddc491573
* Massive overhaul to move towards coord_def().haranp2008-07-301-13/+3
| | | | | | | | | | This might have introduced some bugs: I now get intermittent crashes on startup (this might have to do with the changes to special_room.) Sorry about that - committing before I need to do any more big conflict resolutions. Fixes coming later. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6732 c06c8d41-db1a-0410-9941-cceddc491573
* Massive change from using x and y to using coord_defs(). Not quite tested,haranp2008-07-221-3/+8
| | | | | | | | most likely broken in some places and might break tiles. Will fix in the near future. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6636 c06c8d41-db1a-0410-9941-cceddc491573
* Pan overhaul:dshaligram2008-07-201-1/+2
| | | | | | | | | | | | | | | Allow monsters (including player ghosts) to use fire storm and ice storm, give Lom Lobon ice storm and Cerebov fire storm. Lom Lobon also gets conjure ball lightning. Mnoleg gets Summon Horrible Things instead of polymorph/shadow creatures. Gloorx gets symbol of torment instead of summon demon. Hellion hellfire burst now behaves the same way for both hellion vs player and hellion vs monster. Merged monster vs player and m vs m handling for direct spell effects such as smiting. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6621 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 2011722: Reallow targetting beams such that you may be hit. (There'sj-p-e-g2008-07-061-0/+1
| | | | | | | | | | | | | 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-1/+1
| | | | | | 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
* Make tracer beams call stop_attack_prompt() for foes as well as forzelgadis2008-07-011-5/+10
| | | | | | | | | | 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
* Add minor cosmetic fixes.dolorous2008-06-191-3/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5985 c06c8d41-db1a-0410-9941-cceddc491573
* Apply beam tracer prompt to helpless/fleeing etc. creatures whenj-p-e-g2008-05-231-7/+0
| | | | | | | | | | | | | worshipping an appropriate god. I'm simply reusing dolorous unchivalric methods here. :) Also, don't prompt for harmless beams. Still TODO: Make the message differentiate between target and obstacles, and clean up the code a bit. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5193 c06c8d41-db1a-0410-9941-cceddc491573