summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/xom.cc
Commit message (Collapse)AuthorAgeFilesLines
...
* Split up view.cc.Robert Vollmert2009-11-041-0/+2
|
* Get rid of multiple-meaning "int object" in env.show.Robert Vollmert2009-11-041-2/+2
| | | | | | | | | | | | | env.show is now a class show_def that stores tagged unions of type show_type. For the moment, there's also env.show_los for use in LOS determination, but that should become an array of boolean at some point. This breaks save compatibility. Tiles and console version build and appear to work fine, but this kind of change is likely to have some side-effects.
* Allow vaults to override monster spells with spells:<xyz>Darshan Shaligram2009-11-041-1/+1
| | | | | | | | | | Vaults can now override monster spell sets, or give non-casting monsters spells, and mark monsters as wizard or priest types. The M_ACTUAL_SPELLS, M_SPELLCASTER and M_PRIEST monster class flags are converted into MF_* flags at monster creation/polymorph time, and only the per-monster flags are checked when determining wizard/priestliness. See caveats in level_design.txt.
* Move feature_def and Feature array into feature.cc from view.cc.Robert Vollmert2009-11-041-0/+1
|
* Split game_options from externs.h into options.h.Robert Vollmert2009-11-041-0/+1
|
* Move random_near_space into new teleport.cc.Robert Vollmert2009-11-021-0/+1
|
* Split up monstuff.ccMatthew Cline2009-11-011-0/+1
| | | | | | | A lot of monstuff.cc was moved into mon-abil.cc (monster abilities), mon-act.cc (the main monster loop), mon-behv.cc (monster behaviour) and mon-cast.cc (monster spells). mstuff2.cc was completely merged into other files.
* Add more minor cosmetic fixes.David Lawrence Ramsey2009-10-311-8/+8
|
* Merge mons_holiness() into monster::holiness(), and add an is_unholy()David Lawrence Ramsey2009-10-311-1/+1
| | | | convenience function.
* Combine mons_is_submerged(monsters *m) into monsters::submerged()abrahamwl2009-10-311-1/+1
| | | | | | ...and replace all references to mons_is_submerged() with submerged(). It's a dirty job, but someone's got to do it. (Thank God for regex!)
* Fix more missing includes. Sorry.Robert Vollmert2009-10-311-0/+1
|
* Simplify.David Lawrence Ramsey2009-10-301-2/+3
|
* Fix part of [2879725]: Don't let Xom close an open door if monsters orDavid Lawrence Ramsey2009-10-291-1/+2
| | | | items are in the way.
* (MONS_PROGRAM_BUG || -1) --> MONS_NO_MONSTERMatthew Cline2009-10-271-1/+1
| | | | | | | | | Change MONS_PROGRAM_BUG to MONS_NO_MONSTER when "no monster" is what was meant. Now all instances of MONS_PROGRAM_BUG should indicated some sort of failure or error. Also, fixed some places which were still using -1 instead of MONS_NO_MONSTER.
* Slightly reduce religion.cc by yanking item-handling stuff to goditem.ccAdam Borowski2009-10-211-0/+1
|
* versioning: remove SVN-specific revision data, add Git versioningSteven Noonan2009-10-181-1/+0
| | | | Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* Naming consistency.Robert Vollmert2009-10-171-19/+19
| | | | | Mostly rename functions from terrain.h that accept features of typ dgn_feature_type from grid_is_* to feat_is_*.
* Globally replace see_grid by see_cell.Robert Vollmert2009-10-171-7/+7
|
* Remove duplicated version of _move_stairs.Robert Vollmert2009-10-161-3/+6
|
* Rewrite find_ray to use precomputed cellrays.Robert Vollmert2009-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | | During precomputation, we store the minimal cellrays by target and sort them according to niceness. find_ray now simply picks the first non-blocked ray to a target, which means looping through the 10 or so minimal cellrays with that target -- this should be a lot more efficient. (An extended findray test went from 150s to 40s (debug) and 40s to 26s (profile)). The interface to find_ray has changed: cycle_dir=-1,0,1 was changed to cyle=false/true since we never cycle in the other direction anyway. find_shortest was removed: all rays to a target had the same length all along, but now we also return the straightest one automatically. The change also eliminates the duplicate corner-cutting code between ray_def::advance and find_ray as imbalance calculation now relies on ray_def::advance.
* Remove fallback calculation from find_ray.Robert Vollmert2009-10-151-1/+1
| | | | | | | | | | There is now a separate fallback_ray() that needs to be called explicitly. I've manually converted uses of find_ray with allow_fallback == true. find_ray with allow_fallback set always returned true, yet there were a number of places that used the return value, in particular in directn.cc. I'll check these later.
* Simplify.David Lawrence Ramsey2009-10-131-3/+3
|
* Add more minor cosmetic fixes.David Lawrence Ramsey2009-10-131-3/+3
|
* Xom teleportation fixes: Consolidate checks for artefacts preventingDavid Lawrence Ramsey2009-10-131-9/+27
| | | | | teleportation, and don't make the player cast Blink if such an artefact will stop it.
* Remove Haunt from Xom's spell list, as it now requires an explicit, and,David Lawrence Ramsey2009-10-131-20/+25
| | | | hence, player-controllable, target.
* xom.cc: fix 'format string not string literal' warningSteven Noonan2009-10-121-1/+1
| | | | Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* Fix non-debug compilation, broken by recent Xom changes.Adam Borowski2009-10-121-2/+0
|
* Apply jpeg's patches in [2876380] (automate Xom testing) and [2876688]David Lawrence Ramsey2009-10-111-184/+913
| | | | (new Xom effects), tweaked to fit into current trunk.
* Remove a lot of unneccessary includes.Robert Vollmert2009-10-091-1/+0
| | | | | | | The console version still compiles on Linux; both console and tiles version compile in OS X. I haven't been able to test the DOS and Windows compiles -- please fix or tell me about any errors that show up.
* Split LOS code from view.cc.Robert Vollmert2009-10-081-0/+1
| | | | | | | | | los.cc: basic raycasting algorithm; losight(), see_grid() etc. ray.cc: ray_def implementation. mon-los.cc: monster_los This includes adding a bunch of #includes; there's probably some obsolete includes of view.h now.
* Drop obsolete CVS last-committed headers ($Author$).Adam Borowski2009-10-061-2/+0
|
* move 'Kills.h' -> 'kills.h', 'Kills.cc' -> 'kills.cc' for file naming ↵Steven Noonan2009-09-291-1/+1
| | | | | | consistency Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* Add formatting fix.David Lawrence Ramsey2009-09-291-2/+3
|
* Add spelling fixes.David Lawrence Ramsey2009-09-231-2/+2
|
* Add minor cosmetic fix.dolorous2009-09-201-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10762 c06c8d41-db1a-0410-9941-cceddc491573
* Add formatting fixes.dolorous2009-09-181-4/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10722 c06c8d41-db1a-0410-9941-cceddc491573
* Fix polymorphing of (very) ugly things: When polymorphed, they now dolorous2009-09-181-1/+3
| | | | | | | | | mutate into (very) ugly things of a different color. Also, shapeshifters can no longer take their forms, and they can no longer be made shapeshifters themselves. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10718 c06c8d41-db1a-0410-9941-cceddc491573
* Commit several patches:j-p-e-g2009-09-131-2/+6
| | | | | | | | | | | | * patch 2849505 by weyrava: make submerged monsters use the correct colour * patch 2857771 by caotto: another Feawn update * patch 2838771 by camedo: add potions of brilliance/agility * BR 2841651 by bookofjude: allow Merfolk to control-tele into deep water Now we need tiles for the new potions! git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10669 c06c8d41-db1a-0410-9941-cceddc491573
* Remove four scroll-duplicate spells: Detect Curse, Remove Curse, j-p-e-g2009-08-131-2/+29
| | | | | | | | | | | | | | | | | | | | | | | | Magic Mapping, and Identify. [*] This leaves six spells in the Divinations school, of which Forescry and See Invisible could easily be moved to other schools; Detect Secret Doors could be removed; and Detect Traps/Items/Creatures should be moved to some kind of misc. item with charges (whether rechargeable or not). I didn't want to remove those until the replacement code is in. I added a hack to make sure the probabilities of Xom "casting" magic mapping remain the same. That will have to be repaired later, preferrably by handling it together with Detect Items/Creatures as a separate Xom effect. Shifts spells in saves and bones files. *) This is different from the recent addition of the scroll of silence in that these four spells pose no risk whatsoever and can be spammed safely, making even the food and magic costs negligible. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10542 c06c8d41-db1a-0410-9941-cceddc491573
* Add wands to the list of items available from acquirement. Weights arej-p-e-g2009-08-081-1/+1
| | | | | | | | assigned arbitrarily and probably much too good. (There's a 50% chance of getting one of hasting, healing, teleportation, or fireball.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10503 c06c8d41-db1a-0410-9941-cceddc491573
* Really fix Xom's teleportation journeys.j-p-e-g2009-08-031-7/+7
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10484 c06c8d41-db1a-0410-9941-cceddc491573
* * Fix infinite Xom teleportation rides. Whoops!j-p-e-g2009-08-031-2/+2
| | | | | | | | * Move unseen altar/entrance tiles to dngn.png, so they're handled correctly with magic mapping. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10482 c06c8d41-db1a-0410-9941-cceddc491573
* Don't let Xom be amused by rune loss that would keep you out of Zot if dolorous2009-07-301-1/+2
| | | | | | | you've already opened Zot. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10463 c06c8d41-db1a-0410-9941-cceddc491573
* Make sure that Xom and chaos weapons can only turn monsters with natural dolorous2009-07-271-1/+2
| | | | | | | holiness into shapeshifters. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10429 c06c8d41-db1a-0410-9941-cceddc491573
* * Fix Xom gifts not going Splash! in deep water.j-p-e-g2009-07-231-2/+14
| | | | | | | | * Limit Xom tele rounds to a maximum of 12 (unlikely, but you know...) * Update player doll for Merfolk entering/leaving water. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10379 c06c8d41-db1a-0410-9941-cceddc491573
* ATTR_RUNES_IN_ZOT is no longer needed. I couldn't decide if I shouldj-p-e-g2009-07-191-3/+2
| | | | | | | | | simply remove it or leave it for the weak save file compatibility we try to maintain within trunk, so I left its definition in enum.h. Also, change Beogh's altar tile to include the orcish idol. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10305 c06c8d41-db1a-0410-9941-cceddc491573
* A number of small bug fixes:j-p-e-g2009-07-171-0/+8
| | | | | | | | | | | | | | | | | | * 2811005: unknown mimics being stabbable * 2818709: restrict monsters picking up stuff to 2 items per turn * 2820097: reintroduce prompts for firing _in the direction_ of allies and fix message * 2821462: returning from tutorial screen swallowing a keypress * 2822771: fire elementals could be placed in shallow water Also, Azrael is no longer generated in the Shoals/Swamp Also, implement the second part of FR 2820876: Xom will no longer confuse the player if there's adjacent deep water or lava. This restriction doesn't apply if Xom is feeling nasty (penance or bored) and there's also no checks for water/lava further away. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10255 c06c8d41-db1a-0410-9941-cceddc491573
* Detected secret doors are now treated as a distinct new door type, soj-p-e-g2009-07-111-2/+2
| | | | | | | | | | | | that stupid monsters will continue to ignore them as long as they've never been opened. Shifts wall and door types of existing save files. Also apply patch by one the "nobodies" to make bloody tiles show up again. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10167 c06c8d41-db1a-0410-9941-cceddc491573
* Let god-given mutation effects override the mutation resistance mutation dolorous2009-07-111-4/+3
| | | | | | | again. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10151 c06c8d41-db1a-0410-9941-cceddc491573
* First part of the merger of fixed artefacts into unrandom artefactszelgadis2009-06-251-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (further changes will be much smaller). Breaks savefile compatibility, and bumps the major savefile version up to 6. Some changes made to some tiles files, but it hasn't been tested with a tiles build. Overview of changes: * Unrand artefacts are now defined in art-data.txt and is turned into C code via util/art-data.pl. This has the dual advantage of being more readable by humans, and that if the unrand data structure changes then you can just change util/art-data.pl and regenerate the C code rather than having to change some 70 different C structs by hand. * util/art-data.pl automatically updates NO_UNRANDARTS, and also automatically generates an enumeration of all the unrands which are equal to their item.special field. * randart.cc and randart.h have been renamed to artefact.cc and artefact.h, since the files covers all types of artefacts, and the differences between randarts, unrandarts and (former) fixed arts have been minimized since the terms were introduced. Also renamed unrand.h to art-data.h * The brands and resistances of former fixed arts are now handled via artefact properties, but the rest of their special behaviours are still hardcoded. * Unrandarts are now distinguished between normal and "special", with the special ones currently just being identical to the list of the formed fixed arts. Special unrandarts are randomly generated less often than normal unrandarts, can be generated in the Abyss if they've been lost, can't be picked up by monsters, and can't be affected by Tukima's Dance. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10035 c06c8d41-db1a-0410-9941-cceddc491573