summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-clone.cc
Commit message (Collapse)AuthorAgeFilesLines
* Remove stuffNicholas Feinberg2014-07-291-0/+1
| | | | | | | .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!
* The great mon-stuff migration.Shmuale Mark2014-06-221-2/+2
| | | | | | | | | 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.
* Make Mara's summoned clones time out when he dies.Neil Moore2014-06-191-0/+1
| | | | | | | Clones from chaos melee are not affected, but would be easy enough to change. Perhaps temporary clones could actually be is_summoned?
* Don't make TSO mad when attacking an illusion (RoboCicero)Nicholas Feinberg2014-06-191-10/+7
| | | | Specifically, a Mara-spawned illusion of an angel.
* New card: the IllusionShayne Halvorson2014-05-281-3/+16
| | | | Summons an illusion of the player (like Mara's ability).
* Formatting fixes (add braces).Neil Moore2014-05-121-0/+4
| | | | This fixes all the instances caught by unbrace.
* Remove fake Mara/Rakshasa monsters and associated code, refactor to use ↵DracoOmega2014-03-111-1/+1
| | | | | | | | | | | | | | | | | | | 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).
* Replace `mpr(s, ch)` with `mprf(ch, s)`Adam Borowski2013-11-291-2/+1
| | | | | | | | | 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.
* Swiftness changes.elliptic2013-11-271-1/+0
| | | | | | | | | | | | | | | | | | | | | 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.
* More formatting fixes for return (...);Neil Moore2013-11-151-4/+4
|
* Rewrite monster_iterator.Adam Borowski2013-10-311-1/+1
| | | | | It degenerated to a simple loop over menv, hardly worth any syntactic sugar. I kept it for now, though.
* Veto chaos cloning of battlespheresDracoOmega2013-02-101-2/+4
| | | | | | | 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.
* Remove unnecessary includes from header files.Jay3.14152012-10-231-0/+2
| | | | | | | | | | 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.
* Use std namespace.Raphael Langella2012-08-261-5/+5
| | | | | | | | | | | | | 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.
* Drop parentheses around scalar values in "return".Adam Borowski2012-07-051-9/+9
|
* Mindexicide: behaviour_event().Adam Borowski2012-04-211-1/+1
| | | | | This also reveals how bad the beam blaming code is, need to rewrite that soon -- mostly because of problems with reflection.
* Don't call foo->is_player() on a null pointer.Neil Moore2012-03-221-6/+0
| | | | | | | | | | 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.
* Use actor->is_player() instead of (actor == &you) as well.Adam Borowski2012-03-221-2/+2
| | | | | | | 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.
* Use actor->is_player() consistently instead of (actor->atype() == ACT_PLAYER).Adam Borowski2012-03-221-2/+2
| | | | | | | | | | 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.
* Some more mindexicide.Adam Borowski2012-01-051-8/+6
| | | | | Also, rename a variable "fmenv" in a few places, it referred to menv[f], and now only confuses grep.
* Make high-level monster creation return monster*Adam Borowski2012-01-051-5/+2
|
* Eliminate an almost empty file.Adam Borowski2012-01-031-1/+0
|
* Refactor constriction clearing, fix dead constrictions.Neil Moore2011-12-291-1/+2
| | | | | | | | | | | | | | | 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).
* Fix constriction crash on monster swapping etc.Neil Moore2011-12-281-0/+2
| | | | | | 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).
* Merge branch 'master' into unified_combat_controlRobert Burnham2011-11-161-9/+9
|\ | | | | | | | | | | | | | | | | | | 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
| * Make a bunch of functions static, delete some unused junk.Adam Borowski2011-11-111-9/+9
| |
* | Merge branch 'master' into unified_combat_controlRobert Burnham2011-10-251-2/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Disambiguate get_item_slot().Adam Borowski2011-08-171-1/+1
| | | | | | | | | | | | | | 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().
| * Adjust some whitespace and formatting.Adam Borowski2011-07-081-1/+0
| |
* | Merge branch 'master' into unified_combat_controlRobert Burnham2011-04-261-3/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Doxygenization and junk purging that was missed by my script.Adam Borowski2011-04-021-3/+4
| |
* | Replace DESC_NOCAP_THE with DESC_THERobert Burnham2011-03-251-2/+2
| |
* | Replace DESC_CAP_THE with DESC_THERobert Burnham2011-03-251-2/+2
|/ | | | | 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.
* Track the source of monster enchantments.Adam Borowski2011-02-231-1/+1
| | | | | | 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.
* Rename ENCH_CORONA_ZIN as well, it's too mistakeable for Corona.Adam Borowski2011-01-271-1/+1
|
* Reroll of Zin recite patch.Eronarn Palazzo2011-01-231-0/+1
|
* Fix ghosts not getting mids (casmith789's ghost).Darshan Shaligram2011-01-011-1/+1
|
* When cloning a monster, give it an unique id.Adam Borowski2010-12-301-0/+1
|
* Clean up transform.cc.Raphael Langella2010-12-041-1/+1
| | | | | | 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.
* The haste nerf.Adam Borowski2010-10-311-1/+1
| | | | | | | | | | | 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
* Rename DUR_BERSERKER to DUR_BERSERK.Adam Borowski2010-10-251-1/+1
|
* Massive spacing fixes: "( spaces after parentheses )".Adam Borowski2010-10-151-1/+1
| | | | | | 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.
* Rename class "monsters" to "monster".Robert Vollmert2010-09-051-15/+15
|
* Rename variables named "monster" to "mons" or similar.Robert Vollmert2010-09-051-5/+5
|
* Get rid of more longs and all "%ld"s, new gcc + Windows + them = bad mojo.Adam Borowski2010-07-161-1/+1
|
* Decouple stealth checks from drawing the view window.Adam Borowski2010-06-231-1/+1
|
* Make Mara player cloning use MONS_PLAYER_ILLUSION all the way.Robert Vollmert2010-04-091-1/+1
|
* Fix mons_summon_illusion_from use of create_monster.Robert Vollmert2010-03-171-1/+1
| | | | | | | | | 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.
* make 'game type' an enum rather than a bool, and serialize itJesse Luehrs2010-03-021-1/+1
|
* Don't allow Mara to clone Mara fakes.Darshan Shaligram2010-01-311-0/+1
|