summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/directn.h
Commit message (Collapse)AuthorAgeFilesLines
* Don't cycle through corpses with Apportation (#8622)Neil Moore2014-06-091-0/+1
| | | | | | | | | | But still allow x* to cycle through all object stacks. For now * and + do the same thing when targetting apportation, but maybe it makes sense to have * keep the old behaviour. Note that SPFLAG_TARG_OBJ now uses the new DIR_MOVABLE_OBJECT targeting_type. If we add a new object-targetting spell that *can* affect corpses, we'll have to separate SPFLAG_TARG_OBJ into two flags.
* Chance function(void) to function()reaverb2014-05-241-1/+1
|
* Remove default_target and target_unshifted_dirs optionsChris Campbell2014-04-101-2/+0
| | | | | They just existed to replicate some ancient behaviour that is very unlikely to actually be desirable now.
* Drop pointless empty lines after or before a brace.Adam Borowski2013-12-211-1/+0
| | | | | I left them only where the contents is not indented, like in a namespace or a template.
* Drop double newlines where they seem to serve no purpose.Adam Borowski2013-12-211-1/+0
| | | | | 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.
* Fix spelling of "targeting" (#7837)Chris Campbell2013-12-101-14/+14
| | | | See Mantis for discussion.
* Allow viewing remembered info about out of LOS stuff.Adam Borowski2013-10-281-2/+1
|
* Evokable Jump attack abilitygammafunk2013-10-011-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Player chooses a monster target within range where there's at least one valid landing site adjacent to the target. * There must be a monster to target to use the ability, but the monster can be friendly or neutral. * A random valid landing site is chosen, the player is moved to that square, and weapon melee occurs against the target at the landing site. * Jump attacks are melee with the wielded weapon and get a 20% damage bonus * Valid landing sites are always habitable squares with no monster and no thing that's dangerous to the player. * Flying monsters or giant monsters not standing in deep water or lava can 'block' the path of a landing site by being in the ray path from the player to the landing site. * If a visible monster blocks the path to a landing site, it won't be considered as a valid landing site. * If something invisible blocks a landing site, the site will be shown as valid and can be randomly chosen, in which case the player 'rebounds off something unseen' and never leaves the starting square, but wastes a turn (delay 10aut). * If the player is adjacent to the monster, sites adjacent to the player are not valid; you have to 'jump over' the monster in this case. * Player can't jump if exhausted or standing in water/lava/liquefied ground * Exhaustion duration is set after jump (regardless of success) to prevent a second jump, with a duration formula that's the same as the breath duration. * The usual melee checks wielded weapon/friendly etc. checks are performed for the jump melee. * If any of the valid landing sites would cause problems with self-electrocution or sanctuary violation, the player is warned first. * Range is determined by evocations training; starting attack range is 3 (movement 2), and it increases by one at evocations 5 and 10. * The cost of the jump is 2MP and a hunger cost using the same calculation as for flame breath. * The delay of a successful jump is the same as melee delay. * Fail rate for the ability calculation based on evoke taken from breath fail rate code
* When selecting a monster from ctrl-x, view its square.Neil Moore2013-06-181-1/+5
| | | | | Instead of printing the terse description---that was buggy anyway because of a missing mesclr().
* Correct a commentPete Hurst2013-03-271-1/+1
|
* Remove the targetting mode cycle commandChris Campbell2012-11-071-2/+0
| | | | It doesn't appear to really be useful for anything.
* Remove unnecessary includes from header files.Jay3.14152012-10-231-4/+3
| | | | | | | | | | 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-34/+31
| | | | | | | | | | | | | 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.
* Make feature renames local to a vault rather than the whole level.Adam Borowski2012-07-051-11/+2
| | | | | | | | For technical reasons (vault_placement), subvaults use renaming data of the top-level vault, this might be changed one day; that'd require a bit more writing but would allow different renames in different subvaults. TODO: "line of fire blocked by XXX".
* Get rid of USisms in spelling of -ll- and -tt-.Adam Borowski2012-01-251-15/+15
| | | | | This mostly reverts 78d8ab06 which replaced Commonwealth "targetting" with US "targeting", although there's also "cancelLing", "levelLing", "travelLing".
* Fuzz target when reaching while confused.Neil Moore2011-11-301-1/+3
| | | | | | | | The attack goes to a random square within reaching range. If your own square is chosen, you get a different message, but don't actually hurt yourself. If there is a wall in the way, you still lose the turn.
* Merge branch 'master' into unified_combat_controlRobert Burnham2011-10-251-4/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Make Webtiles output happen in parallel to the console display, and make the ↵Florian Diebold2011-10-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | server record ttyrecs. Crawl compiled with WEBTILES=y should now be playable normally (i.e. indistinguishable from one compiled without WEBTILES) when run from a terminal. (This is not yet completely the case.) The Webtiles data is written on a Unix-domain datagram socket; the Crawl parameter -webtiles-socket determines a path on which the Crawl process receives control messages. The Webtiles server then runs Crawl in a pseudo-terminal and records its console output into a ttyrec file. The goal of all this is of course to be able to watch Webtiles games from ssh, and later the reverse.
| * A new command: "pick item at cursor" (xg).Adam Borowski2011-09-031-0/+3
| | | | | | | | | | | | | | | | | | | | | | It marks the item for autopickup then issues a move command. In case the move is interrupted, autoexplore will go there although unlike the initial movement, it won't necessarily go for it first if other valid items to pickup are closer. That's probably ok, you might have walked around (to kill the monster, etc) before restarting. TODO: what if autopickup is off (Ctrl-A)?
| * Print mindless in monster status only when using the healing ability.Raphael Langella2011-07-111-1/+6
| |
| * Fix resting 2 cells aways from a slimy wall (#4028).Raphael Langella2011-05-221-1/+1
| |
| * Fix incorrect darkening of range when a new-style targetter is used.Adam Borowski2011-05-171-1/+1
| | | | | | | | | | | | | | | | | | | | Old (beam) ranges use targetter_smite which is almost the same: it will mark scryed places as invalid. We can make it smarter (auto-hit beams, etc) later. Also, what's the reason Fedhas' spawn spores darkens view before showing the spores that will appear? It doesn't mark them differently from existing ones, it doesn't seem to do anything but hiding floor details. I did not migrate that behaviour to the new code -- should I?
* | Merge branch 'master' into unified_combat_controlRobert Burnham2011-04-261-6/+14
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Make file headers doxygen-friendly, drop useless fields.Adam Borowski2011-03-281-5/+4
| | | | | | | | | | | | | | "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.
| * New Ashenzari passive ability: identify monster equipment.Raphael Langella2011-03-201-1/+9
| | | | | | | | | | | | | | When new monsters come into view, Ashenzari has a chance to warn you if the monster's equipment is branded. The chance is boundedness/3 (guaranteed when fully bounded) for each piece of equipment. Doesn't identify wands yet.
* | Replace DESC_NOCAP_A and DESC_CAP_A with DESC_ARobert Burnham2011-03-251-3/+3
|/
* New targetting code; for now for reaching and Fire Storm.Adam Borowski2011-03-071-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | directn.cc tried to assume everything is a beam, this make it impossible to properly visualise spells/effects with different rules, like reaching, clouds, IOOD, shotgun-targetted spells, cones, etc. This interface lets every spell come with an object that answers the question: if I aim at X, will location Y be affected? There are three levels of aiming effect now: * tracer only * might be affected * will be affected unless you miss This means we can show spells that have randomized area: Freezing Cloud, Fire Storm's radius, etc. TODO: display in tiles. The old targetter has a great number of special cases, I did not replace it yet since it would be a large amount of work. The new code allows for showing explosions and bounces, but I'd start with clouds and such first. Fire Storm is a good sample. Also, this commit fixes the targetter not allowing you to reach sqrt(8) via 'f' or '.'; you had to use '!' to do that. A number of places in the code assumed that, with a special distinction for two modes of reaching.
* Giant bats are now megabats.Jude Brown2011-01-221-1/+1
| | | | | | | | | | Yup, a pretty extreme change. Reasoning: "giant X" is boring. Just because it's giant doesn't mean that it's somehow more threatening. We could comfortably leave them as "bats" but I think "megabat" is better: it's not a word people hear often, and it conjures up largeness and slightly more of a threat than you might initially think. It's also the proper name for bats, so where could we go wrong?
* Rename class "monsters" to "monster".Robert Vollmert2010-09-051-1/+1
|
* View coordinates now relative to viewport, not screen.Robert Vollmert2010-09-051-6/+0
| | | | | | | | | | Also name some bounds checking functions less terribly and move to viewgeom, and add new screen<->grid transforms. Fixes issue #2215 (Fedhas targeting with messages_at_top) and is likely to reduce the chance of future breakage with messages_at_top. Also likely to introduce bugs.
* Get rid of in_los, in_vlos.Robert Vollmert2010-09-051-4/+0
|
* Convert several functions to use monster_infoLuca Barbieri2010-07-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch converts several parts of the Crawl code to use monster_info instead of accessing monsters directly. This change is very intrusive and rewrites parts of the code. Thus, bugs are quite likely being introduced. The new code is however easier to understand and maintain and thus hopefully should be a net gain once any problems are solved. The code is probably somewhat slower, but this should be undetectable in practice. Major semantic changes: - Rakshasas/Maras fakes are fully described as if they were the unequipped base form, instead of having special cases - MR is no longer reported with perfect information, but only based on what the player sees - Flight is now always perfectly reported (it already was, except possibly for randarts giving +Lev) - Mimics may be handled a bit different (the idea is that known mimics are always monsters and unknown mimics are always items) - Wounded status in messages is now colored (started as a bug, but seems a feature to me) Possible regressions: - Name generation is totally rewritten, might have regressed - In general, all the monster UI code has been refactored, possibly with regression - Special cases like mimics, rakshasas, Maras, ghosts, pan lords, named monsters, divine minions, draconians and the arena mode are likely to be the most at risk of having regressed Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
* [1846] Fix wand targeting being unaffected by confusion (OG17).Darshan Shaligram2010-07-031-0/+1
|
* Trash direction_chooser special command repeat code.Robert Vollmert2010-06-071-1/+0
| | | | | | | | | | | | | | Fixes issue #1681. Entering junk at the "target self" y/n prompt was remaining in the repeat buffer after casting thanks to the special logic there. It would be possible to just flush the buffer after targeting, but I think it's better if the repeat code consistently does nothing but repeat keys. If we ever have a good concept of "last command performed", this can be rethought. Command repeat replays keys and nothing
* Consolidate floor covering descriptionsCharles Otto2010-05-221-2/+3
| | | | | | Do the description text for floor coverings (mold, blood) in exactly one place. Add a different description for the 'glowing mold' that shows up when ballistos die.
* Fix monster list indexing bug.Robert Vollmert2010-03-121-0/+4
| | | | | | | _mlist_index_to_letter and _mlist_letter_to_index got out of sync when 'e' was added. They're now next to each other which hopefully makes this less likely to happen in the future. If someone knows a nice way to combine both into one, that would be even better.
* Don't show descriptions in the message area if pointing at floor/walls.Johanna Ploog2010-02-261-1/+1
| | | | | | | Suppress the feature descriptions in the message window for boring features like floor and walls. Should make moving around with the mouse less likely to cover up the message area with some meaningless description you didn't even want to see.
* Fix clouds not being described when examining surroundings.Johanna Ploog2010-02-241-3/+3
| | | | Also covers sanctuary and silence.
* Show the floor description when targeting evolutionCharles Otto2010-02-111-1/+4
|
* s/targett/target/David Ploog2010-02-081-17/+17
| | | | | And take care of capital letters. This seems to be problematic, bit I learned that it's "targeting" from Darshan :)
* Merge ballistomycete changes from spore_trailsCharles Otto2010-02-071-2/+2
|\
| * Name change - spore covered to mold coveredCharles Otto2010-02-031-1/+1
| | | | | | | | Call the fprop giant spores leave behind them mold instead of spores.
| * Merge branch 'master' of ↵Charles Otto2010-02-011-12/+191
| |\ | | | | | | | | | ssh://crawl-ref.git.sourceforge.net/gitroot/crawl-ref/crawl-ref into ballistomycetes
| * | Describe squares with FPROP_SPORES as "covered in spores"Charles Otto2010-01-241-2/+2
| | |
* | | Handle monsters exposed via clouds and shallow water.Haran Pilpel2010-02-061-0/+3
| | |
* | | Make target(t)ing describe monster status, enchantments, etc.Haran Pilpel2010-02-061-2/+5
| |/ |/| | | | | Some minor refactoring in mon-stuff which hopefully didn't break anything.
* | If a monster is over deep water or laval, mention it in the Aim line.Haran Pilpel2010-01-291-0/+2
| | | | | | | | or lava.
* | Add a direction_chooser_args struct which wraps the gazillion optionsHaran Pilpel2010-01-271-20/+29
| | | | | | | | to direction(). Could still be cleaner.
* | Make the top prompt in direction() controllable by targetting_behaviour.Haran Pilpel2010-01-261-23/+33
| | | | | | | | | | Clean up fire_targetting_behaviour() and have it conform to the new interface. Also, fix a bug with cursor disappearing if Options.use_fake_cursor was set.
* | Many more changes to direction().Haran Pilpel2010-01-251-7/+30
| | | | | | | | | | | | | | | | | | | | | | | | 1. 't' is gone. 'f' now means 'fire at target'. 2. Spells now show their name when zapping. The prompt could be improved. 3. Better messaging while 'x'ing. 4. Better 'Aim:' line. 5. Object-targetted items will show items. Object-cycling (say with ';') will display information about items, once. 6. CMD_TARGET_SHOW_PROMPT now meaningless. Should be removed soon. 7. Better top prompt for some commands (e.g. Sunlight, ordering allies to attack.)