| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
...by moving bloodspatter functions into their own file.
Death to misc.cc! Long live the new file hierarchy!
|
|
|
|
|
|
|
|
|
| |
A good deal of functions move to the two new files, mon-poly and
mon-message. Of the others, some go to where they are used, some to
mon-util, and a few are made member methods of monster.
This probably breaks Xcode compilation, and I'm not able to test
the changes I made to MSVC that will (hopefully) keep it working.
|
|
|
|
| |
Doesn't seem like this ever matters, but it's the principle.
|
| |
|
|
|
|
|
| |
Yredelemnul presumably doesn't want damage bouncing back and forth like
this.
|
|
|
|
| |
Prevents crashes related to tornado and monster positioning.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Partly this is to (somewhat) make the Abyss a little easier. Teleports
still take longer than orbrun teleports to kick in on average, and
in general letting the player know what an action will do is a good
thing.
But the main reason is that, due to maprot, same-area abyss teleports
are a pretty awful interface screw. You are prevented from remembering
what monsters were around (this was quite annoying when being marked
was more common in the abyss), and though you can see for one second
what direction you came from, immediately after the screen refreshes
and you can't anymore.
Possibly this could lead to improving/removing altogether maprot.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Sometimes, they're there to emphasize a break between two sections of code,
which is good. In a majority of cases, though, they're just inconsistent.
|
|
|
|
|
| |
The translation project is stalled, but this makes all of such static strings
trivially gatherable without any extra work.
|
|
|
|
|
| |
This way the order of targets in an AoE shouldn't matter for the damage
sharing leaving you with at least 1hp.
|
|
|
|
| |
Merging now checks that both have the same state for attacker_effects.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
For consistency it seems better to print the "Hogs revert"
message before the player transforms.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Convert conjunctive assertions into separate assertions. This ought to be correctness preserving. I ran the stress tests and didn't notice anything unusual. While I have confidence in it, if you are the slightest bit suspicious of this, please roll it back.
Found instances with `ASSERT(\([^(|]*\) && \([^)|]*\))`
Manually inspected each instance.
|
|
|
|
|
| |
There was nothing specific to kraken in the code, and there are other
cases where this fineffect might be useful.
|
|
|
|
|
|
| |
"It" is not appropriate for monsters with gender or uniques, and we
can't get the proper pronoun if the monster is dead from the damage
anyway.
|
|
|
|
|
| |
KILLED_BY_REFLECTION was intended for shields of reflection, and
produced awkward messages for mirror damage deaths.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It was possible to cause a neutral TRJ to take damage out of LOS,
resulting in hostile jellies that would then attack it.
If TRJ was friendly (it is possible though very difficult with a
combination of scroll of vulnerability, HD reduction from draining, and
enslavement), yield no jellies whatsoever; this is preferable to
creating permanent allies from temporary enslavement.
If TRJ was killed by the attack that triggered the spawning, its
attitude is no longer available; just make the jellies hostile in that
event.
Fixes #6491.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
If one would merge with an existing one, the extra would be ignored.
|
|
|
|
|
|
|
|
| |
We could end up with a pointer to a deleted object in the final effects
vector. Instead of replacing the old fineff with the new one, merge the
new one into the old one then delete the new one. This means that
fineff::schedule() may delete "this", so should only be called as
(new blah_fineff())->schedule()
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
Killing a kraken with an attack on one of its tentacles was crashing
when the attack caused bleeding, because the tentacle was killed
by monster::hurt() and hence its position was invalid.
See !lm @78291 crash 20 -log for an example.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I had to rename distance() (in coord.h) to distance2() because it conflicts
with the STL function to compare 2 iterators. Not a bad change given how it
returns the square of the distance anyway.
I also had to rename the message global variable (in message.cc) to buffer.
I tried to fix and improve the coding style has much as I could, but I
probably missed a few given how huge and tedious it is.
I also didn't touch crawl-gdb.py, and the stuff in prebuilt, rltiles/tool
and util/levcomp.*, because I have no clue about those.
|
|
|
|
|
| |
We were passing _place_monster_aux() a bad monster index as the foe,
triggering an assert.
|
|
|
|
|
|
|
|
|
| |
This means they can't be damaged by the same attack or spell that spawned
them.
Also, use div_rand_round() instead of fixed thresholds every 12 hp. They
worked well when TRJ couldn't heal, but now it can repeatedly go over the
same threshold.
|
|
|
|
|
| |
They can possibly cause an Abyss shift, removing the attacker in the middle
of a combat call.
|
| |
|
|
|
|
|
|
| |
This avoids crashes if he lands in a trap or in a shaft.
The defender blinking is AFAIK safe.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes crashes if either was moved off-level. It does _not_ fix a
random monster with the same mindex continuing wuth the next attack on the
level you dropped to -- combat code is sprinkled with
attacked/defender->alive() which happily uses a stale pointer which, while
currently always pointing to an actor struct (you or menv[x]), may refer to
another monster which can happen to be alive and in range.
Also, for some reason attacker following doesn't obey traps. This is more
fixable than it used to be, though.
|
|
|
|
|
| |
They aren't implemented in the Webtiles interface, but they should
still be there for equivalence with normal console.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Pre-increment looks worse than post-increment, but on a C++ object the
latter forces an allocation plus copy that is completely unnecessary but the
compiler doesn't know that yet.
Note that I did change some of our iterators to return void rather than the old
or new value for exactly this performance reason before, breaking the expected
behaviour. If that's an issue, tell me, we can use preincrements instead which
have very little penalty.
|
| |
|
|
|
|
| |
Don't unnecessarily call the foreign object, too.
|
|
|
|
|
|
| |
Since these are very short lived, this shouldn't happen outside of some very
far-fetched scenarios: something would have to kill a monster with a final
effect and spawn a new one.
|
|
|
|
|
|
|
| |
"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.
|
|
|
|
|
|
| |
This also reduces the piety cost in that case somewhat.
It should also protect against crashes or DEAD MONSTER messages in some
obscure cases (and potentially introduce other bugs...).
|
|
|
|
| |
Also, this caps elec water discharges for monsters with multiple attacks to one.
|