summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-cast.h
Commit message (Collapse)AuthorAgeFilesLines
* Don't cycle through corpses with Apportation (#8622)Neil Moore2014-06-091-1/+2
| | | | | | | | | | But still allow x* to cycle through all object stacks. For now * and + do the same thing when targetting apportation, but maybe it makes sense to have * keep the old behaviour. Note that SPFLAG_TARG_OBJ now uses the new DIR_MOVABLE_OBJECT targeting_type. If we add a new object-targetting spell that *can* affect corpses, we'll have to separate SPFLAG_TARG_OBJ into two flags.
* Remove a dusty & disused spellflagNicholas Feinberg2014-06-041-1/+1
|
* Remove an unused parameter.Nicholas Feinberg2014-05-271-2/+1
| | | | | | With 4ad890b14, check_range was unused again. It can easily be re-added with needed, though I'm not fond of the duplication with the checks in cast_a_spell().
* Revert "Adding Over 100 percent fails to spell descriptions"Chris Campbell2014-02-051-1/+1
| | | | | | | This information was much more likely to just be confusing than to ever be helpful, with spells above 100% fail rate being so far away from being usable. This reverts commit d8f276cafa12f398840a0ddaa43c9495a76d16e5.
* Adding Over 100 percent fails to spell descriptionsKeanan Smith2014-02-021-1/+1
|
* Don't shadow mimic spells that don't target monstersChris Campbell2014-01-291-1/+1
| | | | Which is currently just Dig, out of the previous set of mimicable spells.
* 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.
* Fix spelling of "targeting" (#7837)Chris Campbell2013-12-101-5/+5
| | | | See Mantis for discussion.
* Remove permarock from nicolae_slime_phagocytosis (78291)Neil Moore2013-09-281-1/+1
|
* Change title of some spell list screens.Neil Moore2013-08-111-0/+1
| | | | | | | When adjusting or forgetting spells, remind the user in the title why they're there. This is especially important now that Amnesia brings up the spell list by default: the player won't see the amnesia prompt first, so won't know why they're looking at a spell menu.
* Fix spacing.David Lawrence Ramsey2013-03-041-1/+1
|
* Remove spell memorisation failure (elliott)Chris Campbell2012-10-191-0/+1
| | | | | | So long as the spell can be cast, memorisation will now always succeed, with a warning prompt for spells with high miscast rates. Patch by elliott.
* Use std namespace.Raphael Langella2012-08-261-7/+7
| | | | | | | | | | | | | 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.
* Some cleanup of the new "no monster in range" checking code.Steve Melenchuk2012-07-311-1/+1
| | | | | | This fixes a bug related to non-beam spells such as Vampiric Draining wherein they would never show up as being in range, and removes a now-unused function argument.
* Remove an unused and misleading argument.Adam Borowski2012-06-221-2/+1
|
* Display spell hunger as a spellpower-style bar instead of as food typesChris Campbell2012-04-281-1/+1
| | | | | | The food type actually meant "casting this spell fives times costs at most one <foodtype>" which was very unintuitive, and food types also change in value depending on herbivore/carnivore mutations.
* Make a bunch of functions static or non-existant.Adam Borowski2012-03-151-1/+0
|
* Remove SPFLAG_CARD.Adam Borowski2012-03-081-1/+1
| | | | Its only use was incorrect: Disintegrate is a wand/monster spell, not a card.
* Get rid of USisms in spelling of -ll- and -tt-.Adam Borowski2012-01-251-5/+5
| | | | | This mostly reverts 78d8ab06 which replaced Commonwealth "targetting" with US "targeting", although there's also "cancelLing", "levelLing", "travelLing".
* Colour failure rates based on how likely the spell is to cause a dangerous ↵elliptic2012-01-161-0/+2
| | | | | | | | | | | miscast effect. In the casting and memorization list, "12%" is now coloured one of four colours based on the chance that casting the spell will cause a severity 2 or 3 miscast. This does not take into account Sif or Kiku's protection or penance. The cutoff points are currently at 0.001, 0.005, and 0.025, and the colours used are lightgrey, yellow, lightred, and red.
* Replace success adjectives with failure rate percentages. (dtsund)Michael Gagno2012-01-121-1/+1
| | | | | | | | | | | | | | This is slightly modified from the patch submitted here: https://crawl.develz.org/mantis/view.php?id=5179 The original patch uses fractions instead of percentages, but I found this to be quite visually cluttered and unhelpful. After much fretting about the best way to implement this, I settled on rounding up to 1% if your failure rate is below 1% but above 0. I tried some alternatives, but I find this way to be the easiest for me to visually parse at a quick glance at my spell list. If this is unideal, it's very easy to change.
* Consistently use a space after flow control statements.Adam Borowski2011-12-021-1/+1
|
* Make a bunch of functions static, delete some unused junk.Adam Borowski2011-11-111-2/+0
|
* Replace the unknown skill dance by skill training restrictions.Raphael Langella2011-09-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Don't miscast when the spell can still be aborted (#4281).Raphael Langella2011-07-211-0/+2
| | | | | | | | | | | | | | | | This is a significant refactoring. All the spells now return a spret_type and take a boolean which tells if the spell has actually failed. Also some code clean up in _do_cast(). All spells have their own function now. Also fix the following bugs: * Properly abort fire storm if forced casting on a wall with '!'. Also put a message for forced out of range casting (like cloud spells). * Casting summon elemental on an invisible monster aborted with no cost. * if a summoning spell aborts because create_monster fails, you don't lose a turn. You still get a chance of miscast in this rare case. * s2s, tukima and branding spells abort properly instead of consuming turn and MP when player is not wielding appropriate object. * s2s abort message when wielding a non-snakable.
* Boost the effect of evocations on wands and rods.Raphael Langella2011-06-011-1/+1
| | | | | | No more randomized power. Wand: 15 + evoc * 2.5 Rod : 5 + evoc * 3
* 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.
* Identify staff brands on wield, just like weapons and rods do.Adam Borowski2011-02-031-2/+0
| | | | | This fixes inconsistencies with TSO warning you about necro and poison on un-ided staves. It's not like you won't get that Spellcasting 1 anyway...
* Don't preselect a spell in the amnesia prompt.Johanna Ploog2011-01-181-1/+2
| | | | That's just a recipe for disaster.
* Auto-id staves if you can cast spells at all.Adam Borowski2011-01-101-1/+1
| | | | | | | It's a matter of casting any spell twenty times or so at most. Staves of channeling can be evoked with no spellcasting skills too (useful for invocations/rods/guardian spirit).
* Massive spacing fixes: "( spaces after parentheses )".Adam Borowski2010-10-151-5/+5
| | | | | | 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.
* fix display of spells from rodRaphael Langella2010-09-291-7/+9
| | | | | | | Remove schools and spell success (irrelevant for rods) Real hunger cost is displayed Average power is displayed (5+2*evoc) but real power is still randomized Range use average power
* Add noise level to spell description.Raphael Langella2010-09-291-1/+1
|
* Revert "Add noise level to spell description"Robert Vollmert2010-09-191-1/+1
| | | | | | This reverts commit cb7513472897b423502a5d5be05daaebf9695782. Pushed accidentally.
* Add noise level to spell descriptionRaphael Langella2010-09-191-1/+1
|
* Don't prompt for targeting self with some clouds. (#2487)Robert Vollmert2010-09-151-0/+2
| | | | | | | | | | There was a "really target self" prompt that was entirely independent of player state, which is clearly wrong. Instead, that should be handled by proper cloud tracers. There's now an extra spell flag that allows bypassing that prompt, applied to mephitic cloud, poisonous cloud and evaporate for now.
* Remove an unused parameter from exercise_spell().Robert Vollmert2010-09-031-2/+0
|
* Allow victory dancing Fulsome Distillation.Jude Brown2010-06-261-1/+1
| | | | | | | You can now use "Z" to cast Fulsome Distillation despite there being no corpses in view. It's rather hacky, as I've just passed the Z/z variable down the spellcasting chain until it gets to the Fulsome code. There's probably a better way to do this, but it seems to work properly for now.
* Bring sanity to enums by making them diffable/patchable.Adam Borowski2010-06-081-3/+2
|
* Split big spell cast switch out of your_spells to _do_cast.Robert Vollmert2010-03-021-1/+2
|
* spl-cast.cc/h: Get rid of some unused booleans.Johanna Ploog2010-02-171-1/+1
|
* Better error messages for tile tabs.Enne Walker2010-02-141-0/+5
| | | | | When spells can't be cast or memorised, display a better reason why. Also, add more cases where spells can't be cast or memorised.
* s/targett/target/David Ploog2010-02-081-5/+5
| | | | | And take care of capital letters. This seems to be problematic, bit I learned that it's "targeting" from Darshan :)
* Code cleanup and reorganization, mainly for process_command().Haran Pilpel2010-02-081-0/+1
|
* Make Fedhas only care about necromancy that affects corpses/chunksCharles Otto2010-02-071-1/+3
| | | | | Alter Fedhas' necromancy conduct, now Fedhas only cares about a necromancy effects that involve corpses or chunks.
* Add new targetting flag SPFLAG_TARG_OBJ for object targetting.Robert Vollmert2009-11-241-18/+19
| | | | | Also make apportation use this. Apportation now doesn't target out-of-sight objects anymore.
* tiles: spell_list() now shows spell tilesMatthew Cline2009-11-211-2/+1
| | | | Also, spell_list() now always displays in tiles mode for tiles builds.
* Split chaotic things into unclean and chaotic things.David Lawrence Ramsey2009-11-191-24/+25
| | | | | | | | | | Chaotic things are now shapeshifters, mutators, etc., while unclean things are diseasing things, rotting things, etc. Zin still hates both. As good gods treat both unholy and evil monsters as evil, he'll treat both unclean and chaotic monsters as chaotic. Note that silver will only do extra damage to chaotics, as before.
* list_spells(): tiles menu, selector callbackMatthew Cline2009-11-181-1/+6
| | | | | | | | The list_spells() menu can now optionally be a tiles menu, and it can be passed a callback to select which spells to list or not (and to select which spells should be greyed-out). Also made _calc_spell_range() a globally available function.
* Add spell flag SPFLAG_HASTY, and mark hasty spells with it.David Lawrence Ramsey2009-11-091-10/+11
|