| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
.cc, moving its contents into the new stepdown.cc and strings.cc.
(The latter also got many donations from libutil.h.)
Down with stuff! Up the new flesh!
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
[Committer's note: squashed two commits. The second commit's message
was:
changed clua moninfo:spells() to return book sets/string tables like
describe.cc monster_info has_spells based on mostly on spellbooks.
describe and clua moninfo:spells's shared code moves to
mon-book.h/mon-util.cc
-neil]
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Phantom Mirror
There was quite a bit of special case code for the 'fake' monsters
which Mara and other rakshasa would create that can be subsumed
beneath the general Phantom Mirror effect (which can properly create
fake dummies of any type of monster in a unified way).
The main practical gameplay difference that will result (aside from
bugs introduced by this, of course) is that the true Mara will
actually be disguised when he splits, instead of the player knowing
for sure which one he is (until two of them blink in the same turn,
anyway). This is a Mara buff, but it seems to me that an illusion
spell of this nature shouldn't have been so easy to see through in
the first place and that this is an overall better state of affairs.
(Also, the clones do have less hp than before, if you end up killing
the wrong one first).
|
| |
|
| |
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
It differs only for some advanced tactics, and for a majority of uses
they're similar enough: they block movement, make the monster constricting
you a priority to kill, have the same blink restriction, etc.
|
|
|
|
| |
It was broken by the introduction of "holding" in addition to "constricting".
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
actor::constricting is now a pointer to a map from mids to durations;
if the actor is not constricting anything, we use a NULL pointer rather
than an empty map to save memory.
Save compatibility: Because constrictees might be loaded after
constrictors (and vice versa), we cannot convert the old constriction
arrays (which use mindex) until all the monsters have been loaded.
Instead, save the constriction data temporarily, and create the maps
at the end of tag_read_level_monsters().
|
| |
|
| |
|
| |
|
|
|
|
| |
Rather than having to parse the full m:desc() string each time.
|
|
|
|
|
|
| |
If there are two hostile nagas, one constricting you and another a summon of
yours, it was impossible to tell which one is which. And sadly, lua has
currently no way to pass "you".
|
|
|
|
| |
stabbability() provides strictly more information.
|
|
|
|
| |
Return a float 0..1 representing the stab bonus.
|
| |
|
|
|
|
| |
This really should be indexed by enum names rather than numbers.
|
|
|
|
| |
The exceptions are extern "C", multi-line macros, and json.{cc,h}.
|
|
|
|
|
|
|
| |
Previously some monsters were still not being attacked because they were
treated as safe. Checking mons_is_firewood() is better for determining which
monsters to ignore, though ballistomycetes and butterflies still need to be
special-cased.
|
|
|
|
| |
paralysed.
|
|
|
|
| |
Should help with bots.
|
|
|
|
|
|
|
| |
Added several Lua-callable functions for enhanced reasoning about items,
monsters, and player state.
Signed-off-by: Jude Brown <bookofjude@users.sourceforge.net>
|
|
|
|
|
|
|
| |
"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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changes in v3 (rob):
- update for master (bleeding, deflect missiles, ...)
- fix misled not ending
- fix all monsters getting extreme fire resistance
Changes in v2:
- add operator =
monster_info is changed from the monster list's structure to a general
purpose structure storing player-known information about a monster.
The plan is to make all the user interface code read data from
moster_info, so that:
1. There is no risk of accidental leaks, since all the sensitive code
is in one place
2. Complicated things like misled and fake monsters are correctly
handled, and the code exists once
3. The structure can be serialized for client/server play, and the
deserialized structure can be passed to the UI code (this is still
theoretical)
This will be done in a successive patch.
Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
|
| |
|
|
|
|
|
| |
Apparently, mons_is_safe was only leaking memory in case ch_mon_is_safe
was undefined.
|
|
|
|
|
|
|
| |
This reverts commit a4138c893d44489c23d6528122a8b956cd9d7390.
It was a good change, but I'm moving the mons_is_safe check
into monster_info for greater flexibility on the Lua side.
|
| |
|
|
|
|
|
|
| |
When using the autofight macro, we're probably not interested in moving
towards allies or bashing plants. Using mons_is_safe for this might be
overly restrictive, but it's a definite improvement.
|
|
|
|
|
|
| |
This is not really safe since it accesses the underlying monsters*;
it would be preferable to generate the necessary info on construction
of the monster_info instance and not storing the monsters* pointer.
|
| |
|
|
|
|
|
|
|
| |
Also extract unwind_var template to unwind.h. The latter is now
included from AppHdr.h, though it needn't really be.
This means it's now possible to use coord_def in libutil.h.
|
| |
|
| |
|
| |
|
| |
|
|
|