summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mutation.h
Commit message (Collapse)AuthorAgeFilesLines
* Fold mutation_def::wizname into ::short_desc.Shmuale Mark2014-07-031-1/+0
| | | | | | | | In only a few cases were the strings different, and in even fewer were they significantly so. In general, I used the short_desc for the combined one, since someone running wizmode can presumably look at mutation-data.h, except that "large and strong wings" got changed to "big wings", and "life protection" to "negative energy resistance".
* Refactor mutationsNicholas Feinberg2014-06-091-4/+26
|
* Don't suppress non-physical mutations for thirsty vampiresChris Campbell2014-05-211-3/+0
| | | | | | | Since they can now be mutated normally at all levels, also remove the distinction between physical and non-physical mutations. This was particularly complicated (specific mutations being suppressed by varying degrees depending on hunger level).
* Allow Vampires to mutate normally at all thirst levelsChris Campbell2014-05-211-1/+1
| | | | | | They're already distinct from other undead in that they can mutate sometimes, and thematically they're all about changing state and form. They could already mutate while starving via benefical mutation, even.
* Use the correct radius when sensing invisible monsters in LOS (MarvinPA).gammafunk2014-03-131-1/+1
| | | | | | | | Before we were letting the player detect all invisible enemies in LOS if they had antennae, regardless of mutation level, and were not checking either Ashenzari's detection radius nor that from the boots of the assassin at all. This commit also cleans up and documents a few related functions.
* Remove insignificant speed-up of corpse rotting with Powered by Death.Shmuale Mark2014-03-021-1/+1
|
* 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.
* Staticalize and simplify.Adam Borowski2013-10-171-1/+0
|
* Let mutation_name() return the short name.Adam Borowski2013-09-091-0/+1
| | | | | | It's internally named "wizname" but is accessible to the player, for example via the lua interface. We also have a "short desc" that often differs, but that's used only on the % screen.
* s/mutation_name()/mutation_desc()/Adam Borowski2013-09-091-1/+1
| | | | It returns a whole-sentence description.
* Re-add the message for [un]beneficial mutation for undead.Adam Borowski2013-07-131-0/+1
| | | | | | | | The message order isn't fully fixed, although it was jarring only in the undead case. ontoclasm's message is back: might be not that fitting, but the reference is worth it.
* Revert "Messages for undead who drink potions of mut or bmut."Adam Borowski2013-07-131-1/+1
| | | | | | | Breaks message order, and since vampires special-case beneficial mutation already, it's 100% deterministic so can be coded without special return values. This reverts commit 9b06fafd7d31d8775373ecf524e448a06fda836d.
* Messages for undead who drink potions of mut or bmut.ontoclasm2013-07-111-1/+1
|
* s/give_bad_mutation(/mutate(RANDOM_BAD_MUTATION, /Adam Borowski2013-05-181-7/+0
| | | | The former does nothing but makes it more work to use the full interface.
* Allow beneficial mutation to bypass rMutPete Hurst2013-04-121-1/+1
| | | | | | This is how gain foo potions previously worked. I renamed the stat_gain_potion parameter to "beneficial" to clarify its new usage. Zin, however, will still protect you from beneficial mutation (which was not the case for gain foo).
* Revert "Remove now-unused stat_gain_potion parameter from mutate()."Pete Hurst2013-04-121-2/+4
| | | | | | This reverts commit 716d182b9b57daa27e17a0830746725a9d6fda1f. The parameter is still necessary for allowing potions of beneficial mutation to bypass rMut.
* Remove now-unused stat_gain_potion parameter from mutate().David Lawrence Ramsey2013-04-051-4/+2
|
* Initial implementation of transient mutationsDracoOmega2012-10-261-1/+5
| | | | | | | | | | | | | Transient mutations are mutations which will expire on their own after a certain length of time. Currently all transient mutations are lumped into the same timer (since there is only one source of them). The player is also allowed to have transient mutations which conflict with others they have (so as to be able to reverse a -1 int mutation if you already had a +1 int mutation, instead of simply losing that one permenantly) There are still several outstanding issues both with the implementation of transient mutations (and removal from other sources) as well as the wretched star's ability to give them to you.
* Refactor choosing random mutations.Adam Borowski2012-10-231-2/+0
| | | | | | | | | | This fixes races that don't support some mutations being more resistant to mutating attempts: there will be rerolls in such a case. Conflicts with other regular mutations still decrease the chance, in line with deliberately failing such attempts when heavily mutated. The code is also quite a bit faster in all practical cases, although slower in pathological wizmode scenarios that can't possibly happen in real games.
* Use std namespace.Raphael Langella2012-08-261-9/+8
| | | | | | | | | | | | | 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 inline functions static.Adam Borowski2012-08-091-1/+1
| | | | | | | | | This avoids unnecessary non-inlined copies. Also, we had a few large functions that had no reason for inlining, let's have them be regular ones. I also made "static inline" always use the same order, for easier grepping.
* Drop a bunch of parentheses from return statements.Adam Borowski2012-08-081-2/+2
| | | | | This is incomplete, partially because of me getting bored, partially because of doubts about the point of leaving simple addition/etc in parentheses.
* Don't center the section header for mutation list in character dumps.Adam Borowski2012-07-291-1/+1
| | | | No other section is centered.
* Make a bunch of functions static or gone.Adam Borowski2012-06-231-1/+0
|
* Demonspawn mutation ordering improvements.elliptic2012-05-111-4/+4
| | | | | | | | | | | | | | | | | | | The ordering of the 15 (or 18 if monstrous) mutations a demonspawn gets is now determined as follows: each mutation is assigned a random number in some subinterval (depending on which mutation it is) of [0,1000), and then the mutations are sorted by these numbers. Mutations that we want to be given out late (tier 3 facets, demonic guardian 2 and 3) are given later intervals and mutations that we want to be given out earlier are given earlier intervals. The most noticeable effects of this change should be the following: * demonic guardian 2 will usually not be given until at least 1/3 of the way through a player's mutations; * demonic guardian 3 will usually not be given until at least 2/3 of the way through a player's mutations; * body-slot facets will usually finish before 2/3 of the way through a player's mutations. It should also be much more adjustable than the old system.
* Record the cause of mutations.Adam Borowski2012-02-271-6/+10
| | | | | Mutation descriptions end with a hardcoded dot, which makes the notes look weird. Should we chomp the dot manually?
* New Ds mutation: AugmentationShayne Halvorson2012-01-151-0/+1
|
* More mutation-form improvements.Neil Moore2011-12-181-1/+1
| | | | | | | | | | | | Only display the "*" annotation in the A screen if the player is capable of changing form (is a vampire with Bat Form, or knows a form-change spell), or is currently in another form. Never mark rough black and rugged brown scales as fully suppressed: the Dex penalty and HP bonus apply regardless of form. Mark scales on statues as fully suppressed if the mutation level is not high enough to give any effect other than AC.
* Mark scales as partially suppressed in statue form.Neil Moore2011-12-131-3/+4
| | | | | | | | | | | | This necessitates distinguishing partially-active from hunger-based activity, so add MUTACT_HUNGER and use that for non-physical mutations on vampires between satiated and very full. Also add a function to properly format fake mutations that depend on form. Note that, for these purposes, "thin skeletal structure" and "distortion field" do not count as scales (they are fully active in all forms).
* Use a formatted_scroller for the mutations screen (edlothiol).Neil Moore2011-12-131-1/+1
| | | | | | | | | | | | A Menu does not allow multiple colours per entry, so we instead use a formatted_scroller in display_mutations (for non-vampires; vampires are still treated differently). Make the '*' marking form-based mutations yellow, and the '+' marking non-physical vampire mutations lightred. Also, do not include the legend and "Press '!'..." in chardumps; and avoid duplicating the draconian AC message.
* Further clean up form/mutation interactions.Neil Moore2011-12-131-13/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mutations have a new flag, form_based, that indicates whether they depend on the player's form (and are thus suppressed by most forms). Antennae, stinger, big wings, eyeballs, acidic bite, deformed, speed, and slowness are made form-based. For consistency, yellow draconian rAcid now applies in statue form. mutation_is_fully_active() becomes mutation_activity_level(). Any special-case code for mutation-form interactions should go here if possible. player_mutation_level() returns the current active level, unless false is passed as the optional second parameter, in which case it returns the true mutation level ignoring forms and vampire thirst. In the mutation display screen ('A'), mutations are marked with "(( ))" when fully suppressed and "( )" when partially suppressed; different colours are also used (as before, except now non-innate partially suppressed mutations are coloured brown rather than lightgrey). Form-based mutations are marked with a '*', and (for vampires only) non-physical mutations with a '+'. In the status screen ('%'), fully disabled mutations are surrounded with parentheses. Fake mutations still need work; currently only yellow draconian rAcid and Naga/Draconian AC show the effects of forms.
* A new mutation "Evolution" -- brings in new mutations.Adam Borowski2011-10-311-1/+2
| | | | The mutations are usually good, but bad ones are pretty hard to remove.
* Adjust saves from before the food reform.Adam Borowski2011-10-041-0/+1
|
* Remove Evap and Fulsome from Tm starting book, add a new spell: Beastly ↵Adam Borowski2011-09-271-0/+2
| | | | | | | | | Appendage. It gives you a temporary aux mutation on an uncovered body slot. Not balanced at all, please help determine what appropriate mutation levels would be.
* Don't treat species HP modifier as a frail/robust mutation.Raphael Langella2011-06-121-2/+1
| | | | | | | | This partially reverts commit d435634b5563e69b0c64a9c3b44060b4271a5d05. HP modifier isn't shown in the A screen anymore and it isn't treated like a mutation. It also fixes the fact that frail were nastier for already frail races.
* New HP formula.Raphael Langella2011-05-241-1/+2
| | | | | | | | | | | | * Racial HP gain is linear (no more slowing down at XL13 and XL22). * HP adjustment for races is replaced by innate robust/frail mutations. * Many changes to the mutation system to allow a -3/+3 range to the innate mutations (only for frail and robust). A deep elf (frail 2) can go down to frail 5 and up to robust 1. * I tried to upgrade saves to the new system, but there may be little differences. Also if revification has been used, the lost hp is cured. https://crawl.develz.org/wiki/doku.php?id=dcss:brainstorm:misc:hp
* 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.
* Allow variable mutation scheduling within a facetRobert Burnham2010-10-251-0/+1
| | | | | | | | Facets now have an overall tier (this is the actual tier of the facet and is only used to pick mutations according to the values set forth in ct_of_tier[]) as well as the tiers array which represents the tiers of each mutation which compose the facet. The values in the tiers array should not exceed the overall tier of the facet.
* Rewrite player_aux_unarmed for maintainabilityRobert Burnham2010-05-041-1/+25
| | | | Also adds in monstrous code for DS monstrous mutation sets.
* Implement Mantis 1384.David Lawrence Ramsey2010-04-191-0/+1
| | | | | All mutations without special cases now have associated short descriptions for the "%" screen.
* mutation.cc cleanup.Robert Vollmert2010-04-051-6/+8
| | | | | | | | | | | | * Remove mutation fatality checks, obsolete without instant stat death. * Make give_bad_mutation translate to mutate(RANDOM_BAD_MUTATION). * Make mutate(RANDOM_MUTATION) use _get_random_mutation. These may change mutation chances a bit. For instance, give_bad_mutation now takes rarities into account. But better to have a consistent use of rarities and to adjust the rarities if required than the current state.
* Consolidate the counting and rotting of PbD corpses into one function.David Lawrence Ramsey2010-04-041-2/+1
|
* Fix power by death rotting code being called almost always.Robert Vollmert2010-04-041-0/+1
| | | | Also move power-by-death code out of durations.
* Demonspawn_add_powered_by_deathRobert Burnham2010-04-041-0/+1
|
* Slight mutation.cc clean-up.Robert Vollmert2010-04-031-0/+3
| | | | | Mutations without a mutation-data.h entry should cause asserts less frequently.
* Demonspawn AdditionsRobert Burnham2010-03-311-0/+3
| | | | | | | | | | Implements new demonspawn mutations, removes old scales / mutations which are deprecated. Adds some limited functionality which was necessary for new mutations which might prove useful in the future. Most notably, the monster flag forcing creature inter-level travel as the player moves up / down in the dungeon. Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
* Roll demonspawn mutations at the start of the game.Stefan O'Rear2009-10-241-1/+1
| | | | | | | All demonspawn mutations are now stored in the player data, and are determined at the same time. This makes a lot of things a lot simpler. On the other hand, it means that the influence of skills and gods on demonspawn mutations is now broken.
* Drop obsolete CVS last-committed headers ($Author$).Adam Borowski2009-10-061-2/+0
|
* Ensure the the Helix card only removes bad mutations, and that Zin's dolorous2009-07-181-1/+1
| | | | | | | | | retribution only removes good mutations, by adding a parameter to delete_mutation() to disallow mismatches of random good and bad mutations. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10287 c06c8d41-db1a-0410-9941-cceddc491573
* Give Zin a one-shot ability at piety > 160 (cf. TSO's/Lugonu's weapon dolorous2009-07-121-0/+2
| | | | | | | blessings) to remove all mutations. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10173 c06c8d41-db1a-0410-9941-cceddc491573