summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/directn.cc
Commit message (Collapse)AuthorAgeFilesLines
* Apply my latest commits to 0.4.j-p-e-g2008-07-131-7/+20
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6531 c06c8d41-db1a-0410-9941-cceddc491573
* Add lm_props.lua and appry recent commits.j-p-e-g2008-07-111-5/+9
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6494 c06c8d41-db1a-0410-9941-cceddc491573
* Remove some of my infamous debugging statements (I keep forgettingj-p-e-g2008-07-061-2/+0
| | | | | | | | | them!) and move the new pdf files around, renaming contact.pdf to README.pdf since it's the shorter version of readme.txt, also capitalized now. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6435 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 2011722: Reallow targetting beams such that you may be hit. (There'sj-p-e-g2008-07-061-9/+12
| | | | | | | | | | | | | a new prompt now, but don't prompt a second time if you already confirmed another one before.) Fix some issues when creating items in the Abyss during GDT_GAME_START. This may or may not have played a role in 2008976. Lower spawning rate in the Abyss during GDT_GAME_START (10% spawning chance instead of guaranteed spawning per 5 turns). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6434 c06c8d41-db1a-0410-9941-cceddc491573
* Add spacing fixes.dolorous2008-07-061-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6423 c06c8d41-db1a-0410-9941-cceddc491573
* Added allow_self_target option, with possible values yes, no, prompt.haranp2008-07-021-3/+6
| | | | | | | Added brief documentation (could be improved.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6339 c06c8d41-db1a-0410-9941-cceddc491573
* Only apply targeting via monster list to spells and such wherej-p-e-g2008-07-021-2/+4
| | | | | | | targeting monsters is actually needed. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6338 c06c8d41-db1a-0410-9941-cceddc491573
* Since there's currently only one type of portal vault (labyrinths arej-p-e-g2008-07-021-1/+2
| | | | | | | | | | treated differently) change the gate description to "gateway to a bazaar", so the bazaar description can actually be searched for. Eventually we might like to include Labyrinths, portal vaults, the Abyss and Pandemonium in the branch descriptions. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6334 c06c8d41-db1a-0410-9941-cceddc491573
* Force beams of digging (wand or spell, known or unknown, also /randomj-p-e-g2008-06-301-8/+7
| | | | | | | | | | effects) to ignore the endpoint target ('.') in favour of continuing until the end of the range. Unrestrict tridents for some more species. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6265 c06c8d41-db1a-0410-9941-cceddc491573
* Misc. minor cleanups. (Yes, a huge amount of them but still...)j-p-e-g2008-06-261-6/+6
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6146 c06c8d41-db1a-0410-9941-cceddc491573
* Improve targetting via monster list, add a new option to define thej-p-e-g2008-06-251-29/+66
| | | | | | | toggle's initial setting, and update/correct the documentation a bit. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6135 c06c8d41-db1a-0410-9941-cceddc491573
* Apply patch 1952761 by jarpian (wasp): targetting with the monster list.j-p-e-g2008-06-241-5/+131
| | | | | | | | | | | | | | I've updated the patch to the current mlist code, but there are still a couple of bugs that will need to be ironed out. For example, monsters are picked by comparing their attitude and type, which is not sufficient in the case of (non-collapsed) zombies, as well as mimics or ghosts. Also if the number of monsters in the visible list is greater than its rows (because some appear in the same row) then monsters outside of the visible list can be targetted. I guess this is an unintended feature. :) I'm certain there'll be more bugs, though. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6129 c06c8d41-db1a-0410-9941-cceddc491573
* Modify quiver to only quiver ammunition explicitly chosen by the playerj-p-e-g2008-06-241-3/+10
| | | | | | | | | | | | (via (,) or i, or by the new quivering command). Ammo that just happens to come next in the fire order is not quivered anymore even if you continue firing. Add a new quiver command on Q, and while I was at it, restrict the items offered when firing (fi) or quivering to actual throwables. (This was a long outstanding FR.) I think that's it... git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6112 c06c8d41-db1a-0410-9941-cceddc491573
* Swap '.' and '!' in the targetting interface.j-p-e-g2008-06-221-2/+2
| | | | | | | | | | Forbid bats wearing hats/caps or rings. (That makes amulets the only type of equipment Vampires can keep on when transforming.) To make up for it, increase their damage stats again. Also fix it being possible to (un)equip the allowed items in Tiles while in bat form. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6055 c06c8d41-db1a-0410-9941-cceddc491573
* Remove my stupid debugging mprs (whoops), fix eyes only staring at thej-p-e-g2008-06-171-1/+0
| | | | | | | player when fleeing and make oklob plants spit again (BR 1995290) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5921 c06c8d41-db1a-0410-9941-cceddc491573
* Fix mephitic cloud allowing no self-targetting. (BR1995505)j-p-e-g2008-06-171-0/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5920 c06c8d41-db1a-0410-9941-cceddc491573
* Use more wrappers, and add more cleanups.dolorous2008-06-161-3/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5893 c06c8d41-db1a-0410-9941-cceddc491573
* Fix the Vestibule having no upstairs. o_Oj-p-e-g2008-06-151-2/+2
| | | | | | | Fix fleeing monsters shooting at you. (BR 1994462) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5861 c06c8d41-db1a-0410-9941-cceddc491573
* Added several new tutorial triggers including information on being caughtj-p-e-g2008-06-131-5/+5
| | | | | | | | | | | | | | | | | | | | | in a net, specific skills, magic resistance, and which stat to choose. In a given game you'll only ever see a small fraction of all tutorial events (we're at 71 now, and some of them are exclusive). In fact, a lot of the information is so generally useful (esp. on gods, skills and items) that I'm seriously considering opening up the general information (How do I use item x? What does Spellcasting do?) to a wider selection of characters. I don't think we'll want to explain the intricacies of Mummies, Ghouls, or Vampires, but a lot of this stuff even applies to them... (If we overhaul the tutorial, it's certainly not a 0.4 target, though.) Resetting the tutorial version to 8 as we somehow switched from digital version to binary and back to digital. It will take some time until we actually reach 110, and by then, I am sure the base files won't be save compatible anymore. :) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5777 c06c8d41-db1a-0410-9941-cceddc491573
* AutoID the curse status of a monster wielded cursed ranged weapon if saidj-p-e-g2008-06-121-1/+1
| | | | | | | | | | | monster is trying to hit you with it. Don't give away what weapon a monster is carrying if it is not actually wielding it, especially not in the form of "A goblin, wielding a sling." that is shortly followed by "The goblin wields a sling." :p git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5763 c06c8d41-db1a-0410-9941-cceddc491573
* Implement the Petrify spell in a rather basic variant, and replace the j-p-e-g2008-06-121-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | player spell "Paralyse" with it, i.e. not the wand/potion/misc. effects. Petrify is a 4th level spell of the Enchantment/Transmigrations school (a unique combination, I believe), all other values (incl. the level) were shamelessly stolen from Paralysis. Anyway, it consists of two elements (so I actually added TWO new enchantments), Petrifying and Petrified. A monster that is petrifying cannot move around but can perform actions like hitting adjacent monsters or casting spells at a slowed rate (1.5 of the normal cost). Once this sub-enchantment runs out (happens faster) the monster cannot move or act anymore, so it works like Paralysis. The damage you do during stabbing is one third of what you'd do otherwise, for both states of enchantment, and for both stabbing counts as unchivalric behaviour. It has not been implemented as a monster spell, and ghosts of characters that had it will use Paralyse instead. Consequently, the effect on the player (in self targetting) only handles the Petrified part. Numbers, esp. enchantment timeout, will need tweaking. They're currently Petrifying: cturn = 50 / _mod_speed(10, mons->speed); Petrified: cturn = std::max(8, 150 / (1 + modded_speed(mons, 5))) because I wanted the first to always run out faster than the second, but at the same time make the ratio of Petrifying/Petrified tilt in favour of the first for powerful monsters. The numbers are more or less made up, and tested with different monsters in wizard mode. Still, could be anything between too weak and overpowered, though the latter is more likely. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5761 c06c8d41-db1a-0410-9941-cceddc491573
* Remove unneeded methods (including the old resistance screen), renamej-p-e-g2008-06-121-2/+2
| | | | | | | debugging functions, and some other clean-up. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5757 c06c8d41-db1a-0410-9941-cceddc491573
* Clean-up (renaming static methods and comments) in a number of files.j-p-e-g2008-06-101-110/+109
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5703 c06c8d41-db1a-0410-9941-cceddc491573
* Moved some cloud related functions from misc.{cc,h} to cloud.{cc,h}zelgadis2008-06-091-1/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5636 c06c8d41-db1a-0410-9941-cceddc491573
* Nerf damage of the bat transformation. Reduced fromj-p-e-g2008-06-071-2/+2
| | | | | | | | | | | | | | | | 2 + skill(unarmed_combat)/3 to 2 + rnd(skill(unarmed_combat)/5 + 1) Also replace the menu_colour_prefix colouring for prompts and the like to use message_colour instead, so those "msg" abbreviations in food_colouring.txt actually have an effect now, and players can disable colouring of prompts etc. (respects channels) while leaving it on in the inventory. I'm leaving the menu_colour_prefix function in for now, in case it can be used somewhere else. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5558 c06c8d41-db1a-0410-9941-cceddc491573
* Bug 1986918: Fix "Player's ghost the Player's ghost" monster naming problem,zelgadis2008-06-061-1/+1
| | | | | | | and "Attack!" being given twice when ordering allies to attack. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5509 c06c8d41-db1a-0410-9941-cceddc491573
* Add a line on good gods disapproving of certain items to theirj-p-e-g2008-06-061-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | description (evil_item). Same for evil_eating. In another step on the way to monster pathfinding, take the shortest path and extract a vector of waypoints out of it. When experimenting with ways to do this I noticed that grid_see_grid is not symmetrical (A may see B but not vice versa); I'm not sure what effects that could have. It won't directly affect the player as the checks for monster sees player and player sees monster both use the player LoS, but it could have an effect on friendly monsters fighting enemy ones, I guess. Also, I don't think num_feats_between needs the shortest beam available (called with false now). In fact, that seemed to hurt visibility a bit, probably because of attempting to take vision obstructing shortcuts. If this reasoning is wrong, please speak up and/or correct it. (I sure hope not because the shortest beam calculation has some more overhead that can be avoided this way.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5501 c06c8d41-db1a-0410-9941-cceddc491573
* Implement pathfinding for monsters, using the A* algorithm.j-p-e-g2008-06-041-14/+23
| | | | | | | | | | | | | | | | It's not actually used anywhere yet, but I've implemented a wizmode testing function (x on monster, then 'w') that calculates the shortest path to any playerchosen destination on the level, and it seems to work quite well. The monsters tend to take zigzag paths but that should be easy enough to smooth out and in any case doesn't matter all that much since the player usually won't witness this. Oh, and though I tested the whole thing in a labyrinth, it went ridiculously fast! I'd rather doubted that but Darshan was completely right, as usually. :p Please don't remove the debugging output yet, I still need them. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5476 c06c8d41-db1a-0410-9941-cceddc491573
* Bug/FR 1947001: For damaging cards add "You draw card xy" to the prompt,j-p-e-g2008-06-031-32/+38
| | | | | | | | | | | | | | so you can reread it while targetting, and add a targetting subcommand "show prompt" that'll do just that. (Though you can already do that by looking at the help.) Fix plain coloured items highlighted in grey in prompts, and add two new colouring prefixes: evil_item (/draining, necromancy books, etc.) and evil_eating (cannibalism, intelligent being) that only apply for the good gods. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5455 c06c8d41-db1a-0410-9941-cceddc491573
* Fix a recent bug of mine that blocked the friendly fire prompts.j-p-e-g2008-06-021-2/+16
| | | | | | | | | | | | | | | | | | Fix 1943573: Weird message order when attacking charmed monsters. Fix 1826896: NOTE_ID could have line breaks in mid-word Modify the "This feature has more information" hint to mention mouseclicking for Tiles players rather than 'v' like for purists. Oh, and when trying to look into BR 1952908 (buggy trap in the Abyss) I found that traps can be generated in the Abyss after all. I don't know when that was changed but the last time I checked I remember seeing something like "if (level == ABYSS) return false" in a "Can there be traps here?" check. Is my memory playing tricks on me or was that really changed, and if so, was it intentional? git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5445 c06c8d41-db1a-0410-9941-cceddc491573
* Add new wizard targeting command 'm', to move monsters around (or tozelgadis2008-06-021-0/+11
| | | | | | | | | | move the player like wizard blink if there's no monster at the chosen square). Two monsters can be made to swap positions, and unseen monsters/squares can be targeted. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5423 c06c8d41-db1a-0410-9941-cceddc491573
* Just for kicks, reuse monster property mname to name zombies/skeletonsj-p-e-g2008-05-301-2/+5
| | | | | | | | | | | | raised from unique monster's corpses. The unique number is stored in orig_monnum, so this doesn't apply to orcish followers. I thought it would be cool to have Sigmund the human zombie in your ranks, or to fight againt Blork the orc skeleton. The corpses are currently not differentiated (just "human corpse", "orc skeleton"), just the resulting undead. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5343 c06c8d41-db1a-0410-9941-cceddc491573
* Twelve new tutorial events, plus examining a square with a cloud orzelgadis2008-05-291-1/+1
| | | | | | | | | | | | | | | | | | | a monster submerged in shallow water will give extra info during turorial mode. Might be giving too many spoilers, especially the tips on surviving in the Abyss and saying exactly what each god likes and dislikes when covnerting. There's a bug in non-tiles build where the tutorial note on branch entrances shows the '>' symbol as light-grey instead of yellow; don't know what's causing that. Also, made player::backlit() used _get_contamination_level() to stay in sync with the rest of the code. Breaks savefile compatibilty. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5320 c06c8d41-db1a-0410-9941-cceddc491573
* Yet another session of comment/whitespace cleanups.j-p-e-g2008-05-271-2/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5291 c06c8d41-db1a-0410-9941-cceddc491573
* Mention named orcs' base type in the monster descriptions.j-p-e-g2008-05-251-1/+9
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5231 c06c8d41-db1a-0410-9941-cceddc491573
* Fix monsters capable of LOS attack behind glass walls being ignored.j-p-e-g2008-05-201-39/+51
| | | | | | | | | | | Fix monsters behind glass walls being autotargetted for spells that need a path. Fix spacing in spl-data.h, and add some comments about commenting to coding_conventions.txt. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5148 c06c8d41-db1a-0410-9941-cceddc491573
* Handle the good neutral attitude properly in debugging information and dolorous2008-05-191-1/+4
| | | | | | | the wizard mode attitude toggle. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5133 c06c8d41-db1a-0410-9941-cceddc491573
* Pull code from mon->can_see(target) into a new function mon->see_grid()j-p-e-g2008-05-181-5/+5
| | | | | | | | | | | | | and use it in the checks for monster/monster visibility. I didn't have the time to test it but it should at least solve part of the problem of monsters firing through walls (if monster visibility is even checked there, which I don't know). Also (as usually), more code cleanup. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5117 c06c8d41-db1a-0410-9941-cceddc491573
* FR 1962016: Make hydra headedness more obvious.j-p-e-g2008-05-141-6/+0
| | | | | | | | | | | | | | You now get messages like "The seven-headed hydra bites." and "You slice the 12-headed hydra." FR 1963606: Take a note when you pick up a rune (or the Orb!) for the first time. There are a couple of other files I changed, but I can't remember any big stuff, so it was probably just cleanup. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5029 c06c8d41-db1a-0410-9941-cceddc491573
* Comment fix.dolorous2008-05-121-4/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5012 c06c8d41-db1a-0410-9941-cceddc491573
* Clarify halo-related messages a bit.dolorous2008-05-091-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4970 c06c8d41-db1a-0410-9941-cceddc491573
* Cleaned up monster generation functions, separate monster zombie type from ↵dshaligram2008-05-051-3/+3
| | | | | | | | | monster number. May be buggy. Allow hydra zombies (they currently do not get the right number of heads). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4872 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 1951264: Buggy uniques' wielding messages.j-p-e-g2008-04-281-5/+48
| | | | | | | | | | | | | Fix named orcs getting no descriptions. The descriptions will have to be tweaked, probably using lua, to allow for friendly orcs. The descriptions for orc priests look particularly out of place with Beogh. Viewing friendlies now also lists their quiver and alternate weapon. Dualwielders now never will pick up shields, and single wielders will drop their shield if they wield a two-handed weapon. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4755 c06c8d41-db1a-0410-9941-cceddc491573
* FR 1951252: Modify shafts to usually (50%) drop you two levels, andj-p-e-g2008-04-251-1/+1
| | | | | | | | | | | sometimes (25% each) one or three. FR 1951309: Disallow SeeInv + rPois properties for randart naga bardings since naga already have those two as innate mutations, and there's no one else capable of wearing them. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4615 c06c8d41-db1a-0410-9941-cceddc491573
* Allow christening (beoghening?) of plain orcs, after all, but make itj-p-e-g2008-04-241-4/+1
| | | | | | | rare and let the chance depend on max hp. Clean up naming some. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4588 c06c8d41-db1a-0410-9941-cceddc491573
* * Add a wizard function apply_monster_blessing to allow for easy testingj-p-e-g2008-04-241-2/+20
| | | | | | | | | | | | | | | | | | | | | | of dolorous' fabulous blessing routines. * Allow the possibility of naming monsters: A monster's random name seed is stored in its number property, and the actual name gets picked from randname.txt. (Once this leaves the experimental stage I'll move them into a file of their own.) This means that monster types that already use number for something else (hydras for #heads, manticores for #spikes, or zombies for monster type) cannot be named. Use the new functions for naming orcs blessed by Beogh. Only non-generic orcs may get named, e.g. orcs promoted to priesthood or orc warriors that get their weapon enchanted. I tried to come up with a number of thematic orcish names, and if anyone would like to contribute, they're welcome to do so. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4586 c06c8d41-db1a-0410-9941-cceddc491573
* In get_monster_desc(), display the shield a monster's wearing, if any, dolorous2008-04-211-7/+19
| | | | | | | in the full description. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4451 c06c8d41-db1a-0410-9941-cceddc491573
* Fixes to compile with Visual C++. Moved direct.cc and direct.h to directn.* ↵dshaligram2008-04-191-0/+2436
to avoid conflict with VC++ direct.h header. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4390 c06c8d41-db1a-0410-9941-cceddc491573