| 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!
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Clones from chaos melee are not affected, but would be easy enough to
change.
Perhaps temporary clones could actually be is_summoned?
|
|
|
|
| |
Specifically, a Mara-spawned illusion of an angel.
|
|
|
|
| |
Summons an illusion of the player (like Mara's ability).
|
|
|
|
| |
This fixes all the instances caught by unbrace.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A L2 buff that could easily be kept up permanently and gave a very powerful
effect for the entire game was problematic for a few reasons. The stealth
and trapfinding penalties were supposed to help with this, but they didn't
really succeed, so let's try something else.
Now Swiftness has two stages, of equal duration. In the first stage it
decreases movement delay by 25% and in the second stage it increases
movement delay by 50%. This has the effect that the spell is speed-neutral
over the two stages combined if you are moving the entire time, so you
cannot simply use the spell to kite monsters forever. It still provides a
powerful short-term boost to movement speed and the balance between the
two stages can be broken in a few ways, including simply taking more
non-movement actions during the second stage.
Of course, the spell cannot be recast while either stage is in effect.
The penalties to stealth and trapfinding have been removed and the spell
is now castable by Formicids.
|
| |
|
|
|
|
|
| |
It degenerated to a simple loop over menv, hardly worth any syntactic sugar.
I kept it for now, though.
|
|
|
|
|
|
|
| |
Several assumptions of the spell rely on there never being more than
one battlesphere belonging to a single actor. If a battlesphere became
cloned, the expiry of the effect would only remove the first one, and
this would cause a crash when you tried to recast.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
This also reveals how bad the beam blaming code is, need to rewrite that soon
-- mostly because of problems with reflection.
|
|
|
|
|
|
|
|
|
|
| |
Many of the instances of (foo == &you) were in contexts where foo could
be NULL. In those cases, include a test for foo being non-null.
Also, remove a few now-useless assertions; and add assertions to a few
cases that require but do not check for non-NULL pointers.
Fixes #5471.
|
|
|
|
|
|
|
| |
Not so sure here as the latter is a bit faster (comparison with a constant
vs a virtual method call), but consistency is good. Perhaps we should use
the latter way after all? In any case, it should be the same everywhere
-- if someone has some insight, say a word so we can sed it again.
|
|
|
|
|
|
|
|
|
|
| |
Shorter and more readable.
I did not change the similar comparison with ACT_MONSTER yet -- are we ever
going to have other actor types? God acts may work as well with a fake
monster, but multiplayer/arena can possibly want a third such type. On the
other hand, code assumes that non-player implies monster and vice versa,
though, so I'm probably worrying without a point.
|
|
|
|
|
| |
Also, rename a variable "fmenv" in a few places, it referred to menv[f],
and now only confuses grep.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Split clear_specific_constrictions() into stop_contricting() and
stop_being_constricted() (and clear_all_constrictions() into
stop_constricting_all() and stop_being_constricted()). Also,
better distinguish between intentional and accidental loss of
constriction (for messaging purposes).
Try much harder to keep the constrictor's and constrictee's data in
sync. This fixes a bug where you could still be constricting
DEAD_MONSTER even though all its constrictions were cleared when it
died.
Finally, clear constrictions when changing levels (e.g. banishment).
|
|
|
|
|
|
| |
There were some ways to be moved that didn't involve a call to moveto().
Clear nonadjacent constrictions in those cases (and in the case of
monster cloning).
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
crawl-ref/source/fight.cc
crawl-ref/source/food.cc
crawl-ref/source/libutil.cc
crawl-ref/source/melee_attack.h
crawl-ref/source/mon-stuff.cc
crawl-ref/source/spl-damage.cc
|
| | |
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
crawl-ref/source/Makefile.obj
crawl-ref/source/dbg-scan.cc
crawl-ref/source/decks.cc
crawl-ref/source/describe.cc
crawl-ref/source/directn.cc
crawl-ref/source/evoke.cc
crawl-ref/source/fight.cc
crawl-ref/source/fight.h
crawl-ref/source/ghost.cc
crawl-ref/source/ghost.h
crawl-ref/source/item_use.cc
crawl-ref/source/items.cc
crawl-ref/source/map_knowledge.cc
crawl-ref/source/melee_attack.h
crawl-ref/source/mon-abil.cc
crawl-ref/source/mon-act.cc
crawl-ref/source/mon-stuff.cc
crawl-ref/source/monster.cc
crawl-ref/source/monster.h
crawl-ref/source/player.cc
crawl-ref/source/player.h
crawl-ref/source/shopping.cc
crawl-ref/source/spl-damage.cc
crawl-ref/source/spl-summoning.cc
crawl-ref/source/spl-transloc.cc
crawl-ref/source/stairs.cc
crawl-ref/source/stuff.cc
crawl-ref/source/tags.cc
crawl-ref/source/traps.cc
crawl-ref/source/xom.cc
|
| |
| |
| |
| |
| |
| |
| | |
There were two functions by that name:
* getting equipment slot of an item
* allocating a new entry in the mitm array
-- the latter is now get_mitm_slot().
|
| | |
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
crawl-ref/source/actor.cc
crawl-ref/source/delay.cc
crawl-ref/source/directn.cc
crawl-ref/source/directn.h
crawl-ref/source/fight.cc
crawl-ref/source/files.cc
crawl-ref/source/mon-act.cc
crawl-ref/source/monster.cc
crawl-ref/source/mpr.h
crawl-ref/source/player.cc
crawl-ref/source/shopping.cc
|
| | |
|
| | |
|
|/
|
|
|
| |
Also makes some replacements for DESC_CAP_YOUR, DESC_NOCAP_YOUR, DESC_CAP_A,
DESC_NOCAP_A as was convenient...so don't expect this to compile...at all.
|
|
|
|
|
|
| |
This fixes Injury Mirror not working for delayed damage, kills done
by undead/demon allies not counting as such, damage tracking not handling
ench damage, etc.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Renamed all the transform_can_foo functions into form_can_foo.
Give default argument to each function to check the player's form.
Some simplifying and consistency.
|
|
|
|
|
|
|
|
|
|
|
| |
Haste now makes you go at x1.5 speed, not x2 as before.
Slow makes you only 1.5 times slower, not 2.
Berserk is unchanged -- x2 speed.
Issues:
* monster berserk is still haste+might
* in some cases monster speed may be permanently affected due to round-off errors
* the compensation for high-end monsters haven't been applied yet
|
| |
|
|
|
|
|
|
| |
I did review it manually to find places where they made sense (like some
tables), but for a massive sed job like this there might be places that
I missed.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
It was checking the return value against NON_MONSTER instead of -1,
so a failed summon illusion would cause it to overwrite the end of
env.items, likely leading to issue #1089. In debug builds, this
triggered an assertion.
Fixes issue #1089.
|
| |
|
| |
|