summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/transfor.cc
Commit message (Collapse)AuthorAgeFilesLines
* Recheck the terrain after all transformations, not just dragons, to dolorous2008-06-271-5/+3
| | | | | | | | | handle other forms that fly, such as bats, as well as any future forms that may place the player in inhospitable terrain when the transformation wears off. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6161 c06c8d41-db1a-0410-9941-cceddc491573
* Fix [2003446]: Don't bother trying to take boots off a formerly dolorous2008-06-271-3/+5
| | | | | | | | transformed centaur (or naga) if they have nothing equipped in the boots slot. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6160 c06c8d41-db1a-0410-9941-cceddc491573
* Remove unneeded blank line.dolorous2008-06-271-1/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6159 c06c8d41-db1a-0410-9941-cceddc491573
* Misc. minor cleanups. (Yes, a huge amount of them but still...)j-p-e-g2008-06-261-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6146 c06c8d41-db1a-0410-9941-cceddc491573
* Tweak Trog's Berserk description - he doesn't routinely preventj-p-e-g2008-06-231-1/+2
| | | | | | | followers from passing out, though the chance eventually reaches 100%. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6084 c06c8d41-db1a-0410-9941-cceddc491573
* Swap '.' and '!' in the targetting interface.j-p-e-g2008-06-221-6/+3
| | | | | | | | | | 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
* Re-enable batform when drawing the Metamorphosis card but add aj-p-e-g2008-06-131-30/+77
| | | | | | | | | | | | fail-safe mechanism for *any* transformation to abort if it would cause death by stat loss. (For other transformations this could happen because of the auto-removal of statboosting equipment.) Note that the Flight card already has a chance of turning you into a bat (or a spider). Of course the same applies here, as well as when casting spells. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5791 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 1992604: monster_los asserting for positions out of bounds.j-p-e-g2008-06-131-1/+8
| | | | | | | Mark bees created in bee hives as patrolling. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5789 c06c8d41-db1a-0410-9941-cceddc491573
* Improve performance by only checking whether there are lava or deepj-p-e-g2008-06-121-1/+1
| | | | | | | | | | | | | water grids nearby if the player recently moved (or restarted a game) and if a non-adjacent monster tries to reach the player. Remove now unneeded lua code (was used for the old pickup.lua) and make monsters switch away from ranged weapons when engaging you in melee. If a monster will still insist on hitting you with a sling it's a sure sign said sling is cursed (doesn't autoID, though). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5755 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 1974137: Stat-lowering transformations resulting in death by statj-p-e-g2008-05-271-43/+154
| | | | | | | | | | | | | | | loss. Now take to-be-removed equipment in account and don't transform in the removed equipment or the stat loss or both in combination would decrease one of your stats to (below) 0. For the vampire bat transformation, this check only happens after the ability failure check, so this could be improved. In any case, it's better than dying. Also, fix wrongly treating armour as worn when checking for stat loss by wearing. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5294 c06c8d41-db1a-0410-9941-cceddc491573
* Add another comment fix.dolorous2008-05-241-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5202 c06c8d41-db1a-0410-9941-cceddc491573
* Add more comment fixes.dolorous2008-05-231-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5199 c06c8d41-db1a-0410-9941-cceddc491573
* Add minor cosmetic fixes.dolorous2008-04-231-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4544 c06c8d41-db1a-0410-9941-cceddc491573
* Fixes to compile with Visual C++. Moved direct.cc and direct.h to directn.* ↵dshaligram2008-04-191-1/+1
| | | | | | 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
* Allow vampires to mutate when Satiated or higher, and make non-physicalj-p-e-g2008-04-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | mutations only apply at these hunger levels, too. Differentiated mutations into physical (affecting a character's appearance and stuff: scales, hooves, wings, ...) and internal (resistances etc.). I guess this is what people usually refer to as "cosmetic", which I think is an inaccurate description since it makes it sound like they were completely superficial and had no real effect. Here's a list of arbitrarily chosen "physical" mutations: * tough skin, all scales, and fur * strong/clever/agile, and weak/dopey/clumsy * deformed * strong but stiff, and flexible but weak * frail, and robust * claws, fangs, hooves, talons, and horns * stinger, wings * blue/green marks Mutations currently not applying are still listed on the 'A' screen, though in darkgrey and in (brackets). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4246 c06c8d41-db1a-0410-9941-cceddc491573
* Bug 1941782: Allow vampires to learn spells such as Berserk and j-p-e-g2008-04-141-26/+28
| | | | | | | | | | Transmigrations, but let them only cast them while full or more. (Once satiated is reached, they automatically time out.) Bug 1941885: Don't give vampires nutrition from quaffing non-blood potions. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4235 c06c8d41-db1a-0410-9941-cceddc491573
* Another one of those mixed commits.j-p-e-g2008-03-201-1/+5
| | | | | | | | | | | | | | | * Fix 1915277: Blade Hands time-out removing bardings. * Ely's Lesser Healing costs range(0,1) piety (avg. 0.5) * Allow synonym for "yes" in yesnoquit(), and use it for eating (e=y). Also, in preparation for 0.4 (yes, I can't wait) finally disallow random generation of weapons of orc slaying. Demon lords use a check of their own and as a randart property it's also allowed, which I think is fine. Allow random generation of nets and increase shop prices for nets and javelins. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3766 c06c8d41-db1a-0410-9941-cceddc491573
* Implement FR 1897310: auto-travel through clouds if you are (semi)permanentlyj-p-e-g2008-03-101-12/+20
| | | | | | | | | | | | | | immune to them, i.e. your equipment and/or mutations confer resistance at the necessary level. Implement FR 1872840: When transforming, only remove clothes you cannot wear when transformed. Also fix some inconsistencies in what you could keep wearing and what you could put on while transformed. And a few more monspeak/wpnnoise replacements. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3588 c06c8d41-db1a-0410-9941-cceddc491573
* Further improvements of vampires:j-p-e-g2008-03-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) Quaffing and eating * They now get full effect of potions unless hungry (er, thirsty) or worse, in which case the effect gets halved as before. * Potions of blood heal on the level of heal wounds or healing, depending on hunger state. Healing always heals rotting and removes confusion - the chances involved were just frustrating to players. * Draining corpses has the same nutrition value as eating the (random) amount of chunks you get out of dissecting, but takes longer (and all at once, so draining your corpses in the middle of a battle is extremely risky). I guess this is still too good (when do you ever get to eat all chunks you get out of, say, an ogre or centaur?) so will have to be nerfed. 2) Resistances Resistances depend more strongly on hunger states now. Vampires are always poison resistant and can always see invisible. Additionally, they gain * rCold 1 at Hungry or worse, and rCold 2 at Near Starving or worse (The latter comes with susceptibility to fire.) * life protection 1 when satiated, 2 when hungry or worse, and 3 when near starving or worse * At starving they also get torment res. * Hungry vampires and vampires in bat form are stealthier, and starving vampires are even more stealthy. As before, they get the Necromancy boost (like Mummies do) at xl 13 and 26. Also, vampires can now cast spells while starving, but suffer a failure increase akin to that of Blade Hands. (I've no idea what these numbers actually mean, so this will most likely have to be changed as well.) Updated tables.txt. Still TODO: * Add special biting attack for successful stabbing. * Add distilling blood ability, and possibly distinguish between old and new potions (new food type, maybe). * Allow vampires to mutate, but these mutations to only take effect when Full, Very Full or Engorged. * Update manual. Apart from that, they are ready for playtesting once again. As always, feedback would be much appreciated. :) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3528 c06c8d41-db1a-0410-9941-cceddc491573
* List quiver in status section like you do for the hand weapon.j-p-e-g2008-01-091-1/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3234 c06c8d41-db1a-0410-9941-cceddc491573
* make player::has_claws() and player::has_usable_claws() take a bool dolorous2007-11-221-1/+1
| | | | | | | | | indicating whether claws from transformations should be taken into account; this removes the need for more special cases dealing with trolls' and ghouls' built-in claws git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2891 c06c8d41-db1a-0410-9941-cceddc491573
* Transform fixes for trunk.dshaligram2007-10-281-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2644 c06c8d41-db1a-0410-9941-cceddc491573
* Adding two new mutations for the heck of it:j-p-e-g2007-10-261-13/+2
| | | | | | | | | | | | | | | | | * MUT_PAWS: "You have soft paws in place of feet." Similar to HOOVES and TALONS - incidentally, I resorted a few mutations for better grouping - but increases stealth. * MUT_EXTRA_EYES: grow up to three extra eyes that increase depth perception and thus accuracy. I'm still looking for a drawback to this mutation (other than looking weird). Also, could be related to ACUTE/BLURRY VISION somehow. Breaks saves, or at least mutations. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2606 c06c8d41-db1a-0410-9941-cceddc491573
* [1818982] Kenku talons as mutation (dolorous).dshaligram2007-10-251-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2561 c06c8d41-db1a-0410-9941-cceddc491573
* Adding Vampire aptitudes to tables.txt (Bug 1816344). j-p-e-g2007-10-231-1/+0
| | | | | | | | | | | | | | | | | | | Also changed Ranged Combat to Throwing, while I was at it. Fixing 1817775: portaled projectile treats returning weapons like any other projectile (no duplicates any more, but also no returning). I think this makes sense, seeing how the spell teleports it somewhere so how should it know the path back. Fixing 1817995: starting items not stacking correctly. Question: Why is the flag BEEN_IN_INV even set for starting inventory? Applying two patches by dolorous: 1818736: comment fix for MUT_SAPROVOROUS 1818667: remove redundant MUT_HOOVES check git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2526 c06c8d41-db1a-0410-9941-cceddc491573
* Added additional optional parameter to item_def::name(), ignore_flags,zelgadis2007-09-221-18/+36
| | | | | | | | | | | | | | | | | | | | which will cause the name to be constructed as if those item flags had been unset. Give an auxiliary cause of death for a stat going below 1. (Death by stat loss is already pretty rare, and death by stat loss with confusion as to what caused the stat loss must be *really* rare, but still, if you were confused about what caused the stat loss that lead to death, that'd be pretty frustrating) ouch() is now called from within modify_stat() and lose_stat() right after the stat is lowered, rather than when the stat is updated on the screen. This incidentally fixes the minor annoyance of saying "no" to stat loss death in wizard mode, only to be asked if you want to die every time the screen is updated until you fix having a non-positive stat. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2179 c06c8d41-db1a-0410-9941-cceddc491573
* Fixing a number of bugs on throwing nets, so it's all in j-p-e-g2007-09-191-0/+19
| | | | | | | | | | | | | | | all a net improvement. ;) I'm reusing item.plus2 as a marker for trapping monsters or not. AFAIK, missiles don't need those, and it makes stacking so much easier. Gladiators start with Throwing skill 1, except for Kobolds (don't get a net) who get an additional level at Dodging. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2149 c06c8d41-db1a-0410-9941-cceddc491573
* Applying patches by dolorous:j-p-e-g2007-09-161-1/+2
| | | | | | | | | | | | | | 1794789: Move "Xom is BORED" message into god channel 1795785: remove redundant check for potions of blood 1795673: claw-related clean-ups and enforcing consistency in transformations and claws (Lich and Statue retain claws, Ice Beast doesn't). I also added a check for hooves and claws mutation for the % and [ you_can_wear output. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2114 c06c8d41-db1a-0410-9941-cceddc491573
* Split off portions of externs.h and enum.h into other files. Thezelgadis2007-09-151-0/+1
| | | | | | | | | | | | | crawl_environment, player and monsters classes have been left in externs.h, which necessitates that all of the enums references by those classes stay in enums.h, since you can't forward declare an enum. However, it's a start. Also, portions of misc.{cc,h} have been split off into traps.{cc,h}, place.{cc,h} and terrain.{cc,h} git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2095 c06c8d41-db1a-0410-9941-cceddc491573
* Changed unwield_item() to actually unwield the item, and to have itharanp2007-09-131-3/+2
| | | | | | | | | | | | | | | | | unwield your weapon rather than something arbitrary (I found no cases in the code where this wasn't what was wanted.) Implemented some of David's deck changes: - decks weigh half as much - names changed - Draw Card doesn't cost piety; cost upped to 2 MP - Nemelex card power bonus now applies even when not praying - Damnation can now banish extra targets (your own chance of banishment remains the same.) - Nemelex doesn't accept sacrificed decks. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2082 c06c8d41-db1a-0410-9941-cceddc491573
* More equipment information on the % screen, this time for j-p-e-g2007-08-141-10/+27
| | | | | | | | transformations, plus additional curse checks. Also added "mutation" messages for hungry vampires. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1999 c06c8d41-db1a-0410-9941-cceddc491573
* Fixed acquirement giving unwearable armour (Iaido).dshaligram2007-08-041-18/+21
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1961 c06c8d41-db1a-0410-9941-cceddc491573
* Some more vampire tweaks, mostly concerning food.j-p-e-g2007-07-161-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1884 c06c8d41-db1a-0410-9941-cceddc491573
* Vampires, yay! Credit mostly goes to Jarmo, thoughj-p-e-g2007-07-141-1/+32
| | | | | | | | | | | | | | | | there are a few traces of things I've changed (that I've included and then commented out). There's still lots of stuff to be added, but they should be playable right now. I notice that their vampiric bite attack needs to be made more probable. Feel free to comment on anything that looks weird, is plain wrong, or goes against the spirit of Crawl/Stonesoup. Positive feedback will be appreciated as well. :) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1870 c06c8d41-db1a-0410-9941-cceddc491573
* Transformation cleanup.haranp2007-07-091-45/+60
| | | | | | | Fixed a bad bug in cloak/body armour wearing interaction (oops.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1813 c06c8d41-db1a-0410-9941-cceddc491573
* Stop butcher delays when blade hands wears off (Eva).dshaligram2007-07-081-1/+15
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1801 c06c8d41-db1a-0410-9941-cceddc491573
* Lots of things which used to be members (invis, conf, confusing_touch, etc.)haranp2007-06-231-1/+1
| | | | | | | | are now durations. Removed some unnecessary limitations. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1626 c06c8d41-db1a-0410-9941-cceddc491573
* Teeny bit more typesafety.haranp2007-04-291-1/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1392 c06c8d41-db1a-0410-9941-cceddc491573
* Rewrite of item_def::name() (the old itemname()). Much, much cleaner now.haranp2007-04-271-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1376 c06c8d41-db1a-0410-9941-cceddc491573
* Eliminated it_name(), in_name(), item_name(). The function to use isharanp2007-04-211-6/+2
| | | | | | | | now item_def::name(). Cleaned up a lot of code in the process. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1341 c06c8d41-db1a-0410-9941-cceddc491573
* When untransforming, player's hp is scaled back down by the same amount it wasdshaligram2007-03-041-0/+20
| | | | | | scaled up. We should eventually clean up the transform system like 4.1 does. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@978 c06c8d41-db1a-0410-9941-cceddc491573
* Break up you_attack() into a slew of smaller functions. The functions aredshaligram2007-02-121-2/+7
| | | | | | | | | | | | | still fairly tangled, but they're better than the old monster. The idea is to also put monster-vs-player and monster-vs-monster into the melee_attack framework so that refactoring combat code with elements of 4.1 becomes easier. This is a big refactoring, so it's likely to be buggy. Some of the combat diagnostics - notably the damage rolls - are also AWOL. Will fix going forward. Note: The combat code is still classic b26. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@950 c06c8d41-db1a-0410-9941-cceddc491573
* Changed minotaur horns so that they're a standard mutation by abusingharanp2006-12-051-1/+0
| | | | | | | demon_pow[]. This also means that the horns can now grow (but not shrink.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@571 c06c8d41-db1a-0410-9941-cceddc491573
* Merged stone_soup r15:451 into trunk.dshaligram2006-11-221-35/+65
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@452 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up a mistake in the SVN import.nlanza2006-08-131-0/+551
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10 c06c8d41-db1a-0410-9941-cceddc491573