| 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!
|
|
|
|
| |
As part of a wider scheme to make draining temporary.
|
|
|
|
|
| |
They had all the same problems as big fish or other melee liquid-only
monsters.
|
|
|
|
|
| |
Mostly by joining short lines in places where that would let us remove
braces.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
This fixes all the instances caught by unbrace.
|
|
|
|
|
|
|
|
|
|
|
| |
Trees are in some ways yet another type of transparent wall, and, as
MarvinPA has said, "in general having areas full of trees where you
can see lots of enemies but not target them just plays badly."
There were two differences between trees and mangroves, besides LOS:
the latter didn't start forest fires and left shallow water when
destroyed. That behaviour is kept, instead checking whether
the tree (technically, the player) is in Swamp.
|
|
|
|
|
| |
A lot of this is duplicated from do_mon_str_replacements(), possibly
that should be cleaned up somehow.
|
|
|
|
|
|
|
| |
It was very unlikely to ever trigger - caused by a monster somehow being
made to bleed just out of your LOS in the blood sense case, or a monster
being caught in a web while you are in spider form in the web sense case,
and even less likely to actually be useful if it did somehow trigger.
|
|
|
|
|
|
|
|
|
|
|
| |
The flag no longer makes the monster automatically notice the player as soon
as the player enters sight. Instead, it divides the chance of the monster
forgetting about an out-of-sight player by 3. (The flag also still has the
effect of making the monster's foe_memory not decrease with time.)
This affects only one monster currently: curse skull. The purpose of the flag
is to make the monster handle being out of the player's sight better, so
possibly wandering mushroom should gain it too.
|
|
|
|
|
| |
So that players will understand what is actually triggering it without
already knowing.
|
|
|
|
|
| |
It looks like it was assuming everything was out of range if it had
any distance at all.
|
|
|
|
|
| |
They now don't give messages or make noise at all when just travelling or
exploring, only when hitting things. Also reduce their noise level slightly.
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
Also simplify quite a few cases.
It turns out in >90% cases of non-literals the argument had .c_str(),
which meant it was pointlessly malloc()ed and converted from and to
std::string. I believe a sprintf is faster, so even the argument of
miniscule speed-up doesn't apply.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This way it can get cleared a lot faster: we have a loop to remove it from
every monster every turn, which shows up this prominently on qw profiles:
[4] 59.6 0.07 14.57 21662 handle_monsters(bool) [4]
0.31 9.15 1263185/2072593 monster::del_ench(enchant_type, bool, bool)
This commit merely optimizes it without improving the complexity: inventing
some field last_slept could allow setting this only when the monster gets
hibernated. For now I went the easy but lame way; having the query
encapsulated means a stronger optimization can be done easier.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Suppression is a hugely complicated and inconsistent mechanic. Its
original purpose was to be a way of overriding rPois in Spider but
there are now plenty of monsters that do this effectively (and much more
simply).
[1KB: I moved this to trunk, as it made an already extremely hard to review
branch massively more so. There's nothing but a single enum to preserve,
so compat break doesn't make this removal any easier or harder.]
|
| |
|
| |
|
|
|
|
|
| |
It degenerated to a simple loop over menv, hardly worth any syntactic sugar.
I kept it for now, though.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Does the "in view" part of functionality of monster_iterator, is simpler,
allows using los models other than LOS_DEFAULT, and gets rid of a lot of
uses of get_los().
The code is nearly identical as actor_near_iterator, but the old delegation
used more code than either of those. Still, perhaps templating could work?
This commit also fixes a buttload of ignoring invis / see invis / sense invis
(ie, visible_to()) and act-through-glass bugs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Minus gargoyle clinging, of course.
With monster clinging back, it would be inconsistency for inconsistency sake.
Player clinging:
* is what people expect spiders to be able to do (if monsters can). Count on
bug reports about this.
* allows people to learn monster mechanics on their own
* is useful in the early game, or later if you don't have that particular
spell. People don't tend to lug heavy potions of Flight either.
* is actually fun
|
| |
|
|
|
|
|
| |
Pull 'you.religion [!=]= FOO' checks into a function: you_worship(FOO).
This change is part of a large plan to clean up religion.
|
|
|
|
| |
Yay for monster speech having a list of replacements on its own.
|
|
|
|
|
|
|
|
|
| |
As a player mechanic, it's almost never relevant and in the few cases
where it can be relevant it's quickly obsoleted by fairly common
sources of flight, as well as being unnecessarily complicated (no
diagonal clinging for some reason?). As a race-specific mechanic it
also results in a lot of annoying message spam ("You open the door. You
fall off the door.").
|
|
|
|
|
|
|
| |
Allow a single head to temporarily act by setting ghost.acting_part;
this allows the introductory shout messages to actually reference
the three monster types. Improved the chimera name display slightly
by changing it to "chimera (foo, bar, baz)".
|
|
|
|
|
|
| |
Causes the three heads to announce themselves when the chimera
is released; gives you a flavourful hint as to what the components
are without specifically checking.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This flag makes a monster always wake up when the player comes into
LoS and never naturally forget about them (though stairs and teleports
and such still work)
This is intended at the moment for curse skulls, to simulate their
previous behavior of generating awake, but also to keep them from
simply wandering off if you wait long enough while one is outside your
LoS. Possibly it could eventually make sense for other magical sentinels
(eg: golems, once golems are better)
|
|
|
|
|
|
|
| |
This allows the chimera to take the legs of one of their parts.
This can give them the base speed of the legs monster,
also enables clinging, and for jumping spiders, will flavour a
self-blink as a jump instead of a blink.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In monster data it changes to S_RANDOM; this is fine for most purposes
for which this is used, e.g. determining whether or not a monster is
silent.
In handle_monster_shouts itself, the shout type is substituted for the
shout of one of the constituent parts.
There is a question mark over do_mon_str_replacements -- in most of the
places it's called from, chimera are irrelevant, and when it's called
from handle_monster_shouts the shout type we already determined is
passed in. So there shouldn't be any strange cases, unless perhaps
someone made something new that used sentient monsters as chimera
components. Would need to refactor mons_shouts to accept a monster
instead of a monster_type to make this any better.
|
|
|
|
|
| |
These print the out-of-bounds coordinate as part of the assertion
message.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some spells (e.g. dig and Lee's Rapid Deconstruction (LRD)) can be used
on the very edge of the level (permarock/open sea/lava sea). This is by
design. LRD can use permarock to make explosions, but cannot destroy it.
The bolt class wanted these spells to cause noise, and it was attempting
to center the noise on the border tile, which is technically
out-of-bounds. Because the noise code did not check for out of bounds
positions, the bolt class was successful.
When the resulting noise disturbed a monster, the out-of-bounds sound's
out-of-bounds location would be passed to behaviour_event through its
src_pos argument, triggering this assertion:
"ASSERT(in_bounds(src_pos) || src_pos.origin());".
Changes:
1. Added an assertion in noisy in sound.cc to ensure that all sounds
are in-bounds.
2. Made these spells only generate noises in-bounds. If a noise needs
to be generated out-of-bounds, it will instead be generated nearby, but
in-bounds.
Maybe this messes things up by changing who can hear the sound in certain
situations?
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These are the watch captains of the vault, similar in stats to a
greater vault guard, with more HD and slightly better equipment.
They can evoke a rune of sealing which slams shut doors near the
player and seals them closed. Sealed doors cannot be opened by the
player by any means (though they can still be destroyed in the usual
ways), although monsters can open them freely.
The seals will expire after a number of turns, or instantly upon
the death of the warden which sealed them.
|
|
|
|
|
|
| |
Stealth should stop monsters from noticing you, not from shouting after they
do notice you. The shouting chance is now fixed at what it was with 6 Stealth
skill previously (80% chance).
|
| |
|
|
|
|
|
|
|
|
|
|
| |
For most header files, this only saves on having to recompile a
small number of source files, but there are also a few headers
where small changes would now take significantly less time.
This is most obvious for the Tiles build for which the dependencies
have been greatly reduced, so that the only additional includes
when compared to console are strictly library or tile related.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. @The_monster@ shouts, "I hate you, @CAPS@ @player_name@ @NOCAPS@!"
will result in the actual player name being capitalized.
(Spaces are trimmed.)
2. @The_monster@ says, "I am [very ||really ] hungry."
will randomly result in "I am very hungry", "I am hungry" or
"I am really hungry".
If the pattern turns up a lot, you need to assign weights to the
different choices, or you require nested random sets, you'll need to
stick to the old fallback of defining ad hoc @keywords@.
Otherwise, this should make things somewhat simpler.
Works for both monster and weapon speech, including shouts, noisy
weapons and the Singing Sword.
I've also taken the liberty to update the speech documentation, which
still listed the old website (!) and pointed users looking for advice
to the newsgroup).
Conflicts:
crawl-ref/source/art-func.h
crawl-ref/source/libutil.cc
crawl-ref/source/libutil.h
Signed-off-by: Florian Diebold <flodiebold@gmail.com>
|
|\
| |
| |
| | |
Yay for conflicts galore (wax removal, std:: purge, tileidx changes).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
They're meant to stop autoexplore, and maybe request a confirmation for
being opened. This is not yet implemented, but we can use them for
converting secret doors that were used for marking a place as interesting.
|
|/ |
|
| |
|
| |
|
|
|
|
|
| |
Since these are opaque (and therefore behave differently from normal trees),
a renaming is warranted.
|