summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/skills.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove dead codeBrendan Hickey2014-05-111-1/+0
| | | | Delete train_skill, an unused function.
* 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.
* Always study all manuals in the inventoryPekka Lampila2013-06-061-0/+2
| | | | | | Multiple manuals for different skills can be used at once. If there are multiple manuals for the same skill, the one with least charges is used up first.
* Use std namespace.Raphael Langella2012-08-261-2/+2
| | | | | | | | | | | | | 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.
* Don't force Troglodytes to train magic skills.Neil Moore2012-08-031-0/+2
| | | | | | | | Also, remove a few special cases that considered Spellcasting to be non-magic below level one for Troglodytes; this hasn't been necessary since scrolls stopped training Spellcasting in ee84c39. This reverts commit 1d240c20e937d950ff3de459d85665fcc06969ff.
* Make a bunch of functions static or gone.Adam Borowski2012-06-231-1/+0
|
* Allow float input when setting skills with wizmode commands.Raphael Langella2012-02-091-1/+1
|
* Properly update skill cost when changing skill level with the wizmode command.Raphael Langella2012-02-061-0/+1
|
* Calculate skill cost based on experience instead of skill points.Raphael Langella2012-02-021-2/+1
| | | | | | | | | | | | So it's not influenced by cross/anti training and manuals anymore. Early game cost will raise at the same rate for all backgrounds too. The ones with low skill levels used to have a low cost for a longer time, allowing them to catch up more quickly to the others. Globally, early game cost will raise a bit faster, so this might need to be balanced a bit (although I'm not sure how). On the other hand, the new system is cleaner and simpler. Also, in wizmode, changing skill levels don't have any effect on skill cost anymore, however, changing XL does.
* When no skill is enabled, call the skill menu. (#5246)Raphael Langella2012-01-241-1/+1
| | | | | | Instead of forcing the first one. Also, if all your skills are maxxed or untrainable, but at least one could be trained, put a message, because the XP won't accumulate in the hidden pool anymore.
* Fix many skill bugs with fsim.Raphael Langella2011-10-071-0/+1
|
* Skill training code clean-up and tweaks.Raphael Langella2011-10-061-4/+4
| | | | | | | | | | Some general refactoring and simplification. Simplified initialisation of the various arrays and exercise queue. No more "You stop training foo" messages at startup. Skills are displayed in grey whenever their training percentage is nil. Skills that start with some points but with a level < 1.0 still get some training percentage. More generally, there shouldn't be any special case for "unknown" skills anymore.
* Don't disable spellcasting when we stop reading a manual (#4655).Raphael Langella2011-10-021-0/+1
|
* Replace the unknown skill dance by skill training restrictions.Raphael Langella2011-09-281-10/+5
| | | | | | | | | | | | | | | | | | | | | | | There's no more restriction on training unknown skills. By default, they are disabled in manual mode and enabled in auto mode, but they can be freely toggled if restrictions are met. A skill can be trained if there's any available mean of exercising it. Fighting, throwing, dodging, stealth, stabbing, T&D, UC and spellcasting can always be trained. Weapon skills require carrying a weapon of the type. Armour requires wearing an armour with an evasion penalty. Shields needs either wearing a shield, knowing condensation shield or being able to cast it from a rod of warding or having the divine shield ability. Evocations requires carrying an evocable item, or having a Nemelex ability. Spell schools require knowing a spell of the school (Necromancy can be trained with having a Kiku ability). Invocations requires having any divine ability that exercises it. For edge cases, requirements are a bit loose. No need to carry missiles to train throwing (or it disables itself when you run out), no minimum spell success, no cap on skill level with buckler and leather for example.
* Revert "Hide training percentage for unknown skills."Raphael Langella2011-09-211-1/+1
| | | | This reverts commit 9e8371aef827bd406ea52ac882227487bcca14f8.
* Hide training percentage for unknown skills.Raphael Langella2011-09-191-1/+1
| | | | It's quite useless and confusing, better to just hide it.
* Calculate the skill cost at the end of the transfer not at each iteration.Raphael Langella2011-08-281-0/+1
| | | | | And not at all when just simulating. This should fix this assert: ASSERT(next_level > 0) in 'skills.cc' at line 618 failed.
* Allow choosing skills to train after using a card/potion of experience.Raphael Langella2011-07-221-2/+2
| | | | | | | The skill menu is shown and the player can toggle skills and use focus. The level reached by each skill is showned. This is to prevent players from having to adjust skills before quaff iding or drawing from wonders in case of experience.
* Skill studied from manual are known and can be selected for training.Raphael Langella2011-07-211-0/+13
|
* Properly handle losing a skill.Raphael Langella2011-07-181-0/+1
| | | | | It can happen when a draconian turns red or white and his weak skill is at level 1. With the aptitude change, the skill lose its level.
* Fix Sage card.Raphael Langella2011-07-171-0/+1
|
* Make sure all skills get equal skill cost when gaining a lot of XP.Raphael Langella2011-07-171-0/+1
| | | | | | | | | | When a lot of XP is gained at once, the skill cost level can raise several time over the course of training all skills. We split it up so that all skills pay the same cost. We still need to randomize the order in case of bonus skill points from manual or crosstraining which can make the cost higher for the last trained skill.
* Make sure that there is always one skill selected.Raphael Langella2011-07-091-0/+1
|
* New skill training system.Raphael Langella2011-07-041-1/+4
| | | | | | | Exercised are stored in a queue and skills are trained immediately when XP is gained. There's a manual mode in which only the selected skills are trained. No XP pool. No victory dancing.
* New skill costs.Raphael Langella2011-06-231-1/+1
| | | | | | | | | | The cost in XP of a skill point is no longer dependent on the skill level. Skill training order is no longer relevant, end result will be the same. Also, the cost in skill point of the first level has been greatly reduced, so gaining a skill is no longer a penalty. See the wiki for a detailed discussion: https://crawl.develz.org/wiki/doku.php?id=dcss:brainstorm:skills:experience_system#new_skill_cost
* 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 setting skills from the tutorial map.Johanna Ploog2011-01-261-0/+1
| | | | | | This is a hacky solution and only handles Spellcasting, Conjurations, and Invocations. Also, for the default skills already set in ng-setup reassess_starting_skills (now moved to skills.cc) is applied twice.
* Removes an obsolete parameter in the exercise functionRaphael Langella2010-11-301-1/+1
| | | | It's not needed anymore now that reskilling doesn't use exercise.
* Ash's progressive reskillingRaphael Langella2010-11-121-0/+1
| | | | | | Transfering skill points isn't instantaneous anymore, it's done each time you earn some XP. The rate might need some adjustment. It increases TAG_MINOR_VERSION
* Show cross/anti training as aptitude bonus/malus on the m-screenRaphael Langella2010-11-121-4/+0
|
* Refactor Ashenzari transfer knowledge abiliyRaphael Langella2010-11-111-2/+2
| | | | | Make it compatible with the new anti-training system. It is also much simpler and don't use the exercise function anymore.
* Renamed _weap_crosstrain_bonus to crosstrain_bonusRaphael Langella2010-11-101-0/+2
|
* Anti-training refactoringRaphael Langella2010-11-101-0/+4
| | | | | Removed all the slower training conditions for magic schools and replaced it with double XP cost but only for opposite elemental schools.
* Make the check_skill_level_change function publicRaphael Langella2010-11-101-1/+1
| | | | | It also now takes a just_check boolean as an optional parameter, and return the number of level gained/lost. Not used right now, but it will be.
* Replace int by skill_type whenever possibleRaphael Langella2010-10-271-1/+1
|
* Ash transfer knowledge abilityRaphael Langella2010-10-231-1/+3
|
* Massive spacing fixes: "( spaces after parentheses )".Adam Borowski2010-10-151-2/+2
| | | | | | I did review it manually to find places where they made sense (like some tables), but for a massive sed job like this there might be places that I missed.
* Remove "called from:" comments.Vsevolod Kozlov2009-11-031-5/+0
| | | | | | These were of questionable use and freshness. Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
* Drop obsolete CVS last-committed headers ($Author$).Adam Borowski2009-10-061-2/+0
|
* * Tweak spell number of randart books some more.j-p-e-g2009-02-211-1/+0
| | | | | | | | | | | | * Loosen restrictions on spell levels of unknown spells for normal books, so there are more matches even for untrained schools. * Add a new option dump_book_spells that, if set to true (default), will dump the spells even for non-randart book. Useful if you don't know the books' contents by heart and want to know spells at your disposal without checking some spoilers. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9143 c06c8d41-db1a-0410-9941-cceddc491573
* Remove pre-Stone Soup change history from source files, and push it allj-p-e-g2008-09-141-4/+0
| | | | | | | | | | into a file crawlhistory.txt in docs/obsolete. I used a perl script to do this under the assumption that all these change logs used the same system following the keyword "Change History". git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6930 c06c8d41-db1a-0410-9941-cceddc491573
* [Bug 1907221] Add "Modified for Crawl Reference" statement and author to aj-p-e-g2008-03-081-1/+1
| | | | | | | | huge number of files. Also correct file name comments. No coding changes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3539 c06c8d41-db1a-0410-9941-cceddc491573
* Merged stone_soup r15:451 into trunk.dshaligram2006-11-221-1/+3
| | | | 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/+26
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10 c06c8d41-db1a-0410-9941-cceddc491573