summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/fineff.h
Commit message (Collapse)AuthorAgeFilesLines
* Make rakshasa defense cloning a fineff and take energy (elliptic).Steve Melenchuk2014-04-081-0/+13
| | | | Prevents crashes related to tornado and monster positioning.
* Remove shock serpent lightning torrent, adjust discharge / statsDracoOmega2014-03-111-2/+8
| | | | | | | | | | | | | | | | | | | | | | Lightning torrent didn't work as well as hoped, in practice. The intent was that it be dangerous unless actively controlled by quickly hitting the serpent, but be much less threatening if you did this. However, between misses and low damage hits, it was quite possible to be attacking a serpent continuously and still fail to prevent the torrent. Even worse, if the serpent was obstructed by other monsters, there was often no good way to keep it from unleashing the attack the moment you killed what was in front of it. A fast monster with relatively threatening attacks is likely already a priority target without the need for some other specific mechanic to encourage this. Thus, lightning torrent is removed, and the retribution discharge is made dependant on the damage inflicted upon it rather than time from last discharge (with starting hits triggering a larger shock). Also raise HD (and thus AF_ELEC damage) slightly, while lowering their base melee, to shift the damage just a touch more from physical to elemental. This also fixes a bug where the discharge would not trigger on any attack that actually killed the serpent.
* Don't arc electricity when attacking with an elec weapon in waterChris Campbell2014-02-091-11/+0
| | | | | | The main thing it did was cause annoying prompts when you could hit yourself or an ally with the arc. It was rarely relevant other than that, and just made elec brand a bit more complicated unnecessarily.
* Revamp shock serpentsDracoOmega2014-01-281-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While the original version may have been conceptually interesting, it had multiple mechanical problems. Even putting aside the bugs in the implementation of monster static discharge, frying its allies when injured doesn't seem like a good mechanic to me, and the way static discharge jumps means that many messages are generated for every single event (for similar reasons I don't think it works very well as an active spell for them either). Also, shock's damage scaling meant it was basically harmless on a monster of this tier - a cantrip as best. This commit attempts to take the central concepts of the original design and make it a more effective and workable monster. Shock serpents now passively gather charge when in combat. After multiple turns of building charge, they can unleash it as an unavoidable arc of lightning aimed at their primary target (and nearby allies, in the style of dazzling spray) which does substancial damage. However, injuring the shock serpent discharges ALL of the sustained charge as a (much weaker) reprisal effect. The idea is that the player will be encouraged to suffer through the reprisal to avoid a worse attack and that it might sometimes change target priorities in a large melee or affect retreat tactics employed. In addition, I have replaced shock with a stronger electrical bolt styled after electric eels. The code duplication involved here bugs me, but shocks if far too weak and lightning bolt too strong and the electric eel bolt cannot just be made into a spell and given to both of them without reducing eel fire rate significantly. Finally, they get slight hd and melee boost, and lose the poison resistant and poisonous corpses. So much of Snake already leaves poison corpses and it doesn't seem to me that there's much need for any poison association here. Note that a great many numbers here are quite provisional, particularly charge rate and the power of lightning torrent itself.
* Restrict mpr() to literals only.Adam Borowski2013-11-291-4/+4
| | | | | The translation project is stalled, but this makes all of such static strings trivially gatherable without any extra work.
* Make Spectral Weapon damage sharing use a fineff.Ed Gonzalez2013-06-291-2/+3
| | | | | This way the order of targets in an AoE shouldn't matter for the damage sharing leaving you with at least 1hp.
* Fixed some effects being applied twice to damage.Ed Gonzalez2013-06-291-2/+5
| | | | | | | | | | | | | | When a deferred_damage_fineff is used, ::hurt is called twice. Once for the original target, and a second time for the shared target. Both calls would apply effects such as weakening from wretched and QUAD DAMAGE. While SIXTEEN TIMES damage is funny, the attacker's effects should only be applied once. Now ouch/hurt functions and the deferred_damage_fineff have an 'attacker_effects' parameter, which defaults to true. If false, then damage effects from the attacker are assumed to have already been applied. All existing uses of deferred_damage_fineff have been appropriately updated. Also applied to spectral weapon damage sharing.
* Move player hog form untransformation into a fineff (Kirke)Pete Hurst2013-05-281-1/+11
| | | | | For consistency it seems better to print the "Hogs revert" message before the player transforms.
* Use a delayed_action_fineff for Kirke and Pikel death (Mantis #5306)Pete Hurst2013-05-261-0/+20
| | | | | | | | | | | | | | | | | The issue here is that gods such as TSO *may* give penance if Kirke or Pikel are killed with an area effect, since the hogs/slaves suddenly become penance-inducing targets halfway through evaluating affected monsters. This is a) inconsistent because it depends on the sequence of monster evaluation and b) not really in the spirit of the penance because at the time you thought you were damaging things you were allowed to. Kirke and Pikel were already using a daction (to support off-level conversion of hogs/slaves), but somewhat ironically dactions are actually executed once instantly and then again later on. The new delayed_action_fineff can be used for any daction to postpone the initial execution until after other effects finish. This means all damage will occur to hogs or bound slaves *before* the death causes any still alive to get converted back, avoiding the penance issue.
* Rename kraken_damage_fineff to deferred_damage_fineffDracoOmega2013-02-211-2/+2
| | | | | There was nothing specific to kraken in the code, and there are other cases where this fineffect might be useful.
* Make starcursed masses merge with a neighbour when damaged.DracoOmega2012-12-171-0/+11
| | | | | | Whenever a starcursed mass sustains non-lethal damage, they will immediately merge with a random adjacent starcursed mass. This gives players an option to help supress their proliferation, so long as they do not ignore them for long.
* Use final effects to pass kraken damage upwards.Adam Borowski2012-10-161-0/+14
| | | | | | | | | | | | | | | | This should avoid the rest of still notorious crashes[1], and unlike DracoOmega's ideas, doesn't turn krakens into a boring summoner-with-a-swarm -of-pets we have too many examples of. (Improvements to tentacle AI and connectivity are very welcome, I just vehemently oppose making tentacles obstacles rather than parts of the kraken itself.) I did not yet purge a lot of no longer needed checks, to reduce possible conflicts. [1]. Even though such crashes are rare now, this is what killed my record Abyss stress test run after over a week and umpteen million turns.
* Fix an overload that should have been an override.Neil Moore2012-09-091-12/+1
| | | | | | | That const wasn't supposed to be there. Also, remove an enum that is no longer needed. It shouldn't have been added in the first place.
* Object-orient final_effect.Neil Moore2012-09-081-5/+125
| | | | | | | | | This is mostly to avoid the bit-packing of the previous commit. Admittedly, it's a bit overkill for that. This could probably use some cleanup: currently we store attacker, defender, and position in the base class, even though not all subclasses have those.
* Make file headers doxygen-friendly, drop useless fields.Adam Borowski2011-03-281-6/+5
| | | | | | | "File:" is shown in your editor's status bar. "Written by:" was used only for the first person who changed a file. We got git for that now, and pre-DCSS history is so woefully inaccurate it doesn't really matter.
* Use final effects to make monster Mirror Damage safe against crashes.Adam Borowski2010-09-241-3/+4
| | | | | It would remove the attacker, in the same vein as our numerous chaos brand problems.
* Turn "final effects" into a generic system. Fix water elec not working for ↵Adam Borowski2010-09-241-0/+17
monsters.