Duration-Based Spell Reform

Summary How to improve duration-based spell (permanent effect, effect of power).
Added by galehar
Added on 2010-09-13 15:30

There are several issues with duration-based spells. I set up this page to talk about the effect of the spell power, but there is a lot of comments on how to make the effects permanent, so I've reorganized the page. It now needs to be renamed, but I don't know how to do it.

Permanent effect

b0rsuk, dpeg and evilmike have made interesting comments. I'll try to summarize everything and make a complete design.

Possible abuses

We don't want to encourage players to cast a permanent effect and cancel it shortly afterwards. So we have to be careful to not make food and MP costs cheaper.

Why keep the old way of casting enchantments ? — b0rsuk 2010-09-15 23:54
Because it is not true that you want those effects permanent in all cases. If we change completely to the new (permanent) system, we create interface woes by forcing players to switch off some spells all the time and then recover MP. That's why I suggest to provide both a temporary and a permanent version (distinguished by 'z' and 'Z', for example). — dpeg 2010-09-16 04:35

z cast a temporary spell, Z cast a permanent one. It's simple and efficient. How to cancel an effect is more complicated.

  • Recasting. I don't like it. Should I use z or Z? What if I want to victory dance an active spell? Also, not intuitive and prone to errors.
    • This is the most natural choice. Type of spell does not matter, both z and Z should switch off the effect. Two keystrokes, and players know very well what they are doing. — dpeg 2010-09-16 04:37
    • Fine. But switching off shouldn't cost anything. Also does the spell is immediately cancelled, after a turn (like forms) or does it starts expiring? — galehar 2010-09-16 09:29
  • Like forms, each active spell have a separate ability to deactivate it. It's simple, but will clutter the ability screen when you have lot of active effects.
  • A single ability to cancel active spells. It brings you to a menu, similar to drop/pickup, where you can select one, several or all the spells you want to cancel. Downside is it takes 4 keystrokes to cancel one effect. On the other hand, it's not something you're going to do very often. And you can cancel any number of effects in a single turn.
MP cost

When casting a permanent spell, you pay the normal MP cost, and your max MP is reduced by half the amount. Casting Deflect Missiles at 50/50 would bring you to 44/47. It's rounded up, but after adding all the spells. So one L3 spell cost 2 max MP, one L5 spell cost 3 max MP and both of them cost 4 max MP. Questions: is half a good factor (I think it is)? Should it be scaled to something like spellcasting skill (I don't think so)? Should Sif get an ability at max piety to make it a third (definitely!)?

I'm afraid it's a wee bit more complicated. Duration is different for some spells, and has been adjusted on a spell by spell basis (each spell separately). For instance Condensation Shield used to have awful duration, not just effectiveness. Then I complained and I think someone has changed it. Spell level alone is not enough, although making this uniform has benefits. — b0rsuk 2010-09-15 23:54
So we need to consider spells individually. Spells with very short duration will have a max MP cost much closer (or equal?) to the normal MP cost. Also, when an effect is disabled, max MP are restored immediately, and normal MP have to regenerate. — galehar 2010-09-16 09:29

A different way of paying spell upkeep: right now, if you walk around with full MP, you are “wasting” your mana that would've been regenerated. Game can instead use that extra mana to prolongate your buffs: every time you would gain an extra mana point, add it to the duration of all current buffs with appropriate coefficient(with a maximum limit to that stored duration); this should also train your casting skills. Once you are in battle and start casting away, you can run out of that reserve and might have to recast your buffs. This keeps the whole system as close to the current one as possible, while eliminating the micromanaging. —SinsI 2011-04-05 16:58

So basically, you cast some buffs, wait for your mana to regenerate, and then you wait until duration is maxed. You're trading some food and tedium for increased duration of all buffs. — galehar 2011-04-05 17:52
Not necessarily. That limit can be dependent on initial duration(the one gained from casting), or even less than that(i.e. equal to the duration remaining at the first renewal moment). —[user:SinsI]] 2011-04-05 20:26
Hunger cost

Upon casting, you pay the normal nutrition cost, and after, you get a hunger effect which is as close as possible to (normal cost/duration). So if you keep the permanent effect as long as a single casting of the temporary one, you've paid it twice. I think that's OK. If you keep it long enough, it should be negligible. Also, it's mandatory for Necromutation which obviously can't have a hunger effect. Wielding the staff of energy should cancel the hunger effect of permanent spells.

Success and miscasts

Permanent casting should only be available for spells for which you have at least great (or excellent?) success. That's when miscasts are rare and harmless. If you have to use a wizardry item to reach it, then you have to keep wearing it for the spell to keep its permanent effect. When the wizardry item is removed, the spell success should be checked again (skills might have trained). If it's below the threshold, the spell starts expiring.

An idea to simulate miscasts: flickering. It's fairly easy to enable an enchantment, but if your success chance is too low you get random turns where it consumes MP and satiation but provides no effect. It could be like this: Rmsl, Rmsl, None, Rmsl, None, Rmsl, Rmsl, None. You could even make flickering turns produce glow or some other effect. — b0rsuk 2010-09-15 23:54
There's a lot of things that can happen while a permanent spell is active which can change spell success: change of armour, wizardy items, stat drain, skill training and blade hands for example. We don't want somebody casting permanent buffs and then putting a plate mail, but on the other hand, we don't want to forbid blade hands users to cast permanent buffs. Here is how it could work.
When the permanent spell reaches the end of the normal duration, a recast is simulated. If it succeed, nothing happen, the spell is maintain for another duration. If it fails, you get a warning message that you have some difficulty maintaining this spell and it start to flicker for a few turns. It gives you a chance to cancel blade hands, or put back this ring of wizardry or whatever to increase you spell success. After the few turns have passed, another recast is simulated. If it succeeds, you get a message that you have regained control of the spell. If it fails, you get more flickering, you lose some MP and might also get a miscast. 1 or 2 more recast simulation are made and if they keep failing, you lose the spell.
With this system, spells at great and excellent will sometimes have some flickering, and rarely a miscast. Spell at good or very good will have more flickering and miscasts and will rarely be lost. Spells at fair or lower will have a lot of miscasts and will probably expire after at most a few cycles.
Now, about the miscasts, maybe they should be capped so you never get the worse ones. I can imagine someone casting teleport control with a staff of wizardry, and then getting banished because he forgot to cancel blade hands. Or maybe when you get the first warning and the flickering, if you're at risk of a bad miscast, the message is different and in red. — galehar 2010-09-16 21:49
Skill training

Active permanent spells should passively train the relevant skills on their own, a bit like Stealth.

Oh, I never considered this before. So it looks like this implementation could be easy and convenient for players, but rather complicated for developers to implement. — b0rsuk 2010-09-15 23:54
Yes, it is not easy. Partially, that is because we are trying to modify an existing system rather than inventing a new system. But I believe it is worth the effort. The guideline should be that the resulting interface is very easy to understand and use. (This is also why I suggest providing both temporary and permanent effects. To give you an analogon: when we designed Elyvilon's interface for healing, we eventually took the one with most options: heal yourself, heal other, greater heal yourself, greater heal other. That is inefficient in a sense (four abilities!), but it saves a lot of keystrokes and is very easy to grasp.) — dpeg 2010-09-16 04:37

Temporary spells require spending a turn every now and then. I believe this is too minor to worry about.

Spell power and enhancer

Right now, spell power of most duration-based spell only affect duration, so for a permanent spell it becomes completely irrelevant. If some of the proposals below to make the spell power have more effect are accepted, then any enhancer should have an effect only when equipped, not when casting. This should apply for temporary effects too by the way (see also Spell Enhancers).


Some spells are noisy to cast. What about the permanent version, should they reduce stealth? Probably not. But then very noisy spells shouldn't have a permanent version. Unless they have significant drawbacks that you will want to switch it off sometimes anyway (blade hands).

Effect of confuse and paralyse
  • When you get confused, each of the active spell has a chance to start expiring and rarely to be cancelled outright (or not?). What can be factored in are: power of confusion (monster HD?), MR, spell success (which has to be high, but perfect spells can still resist more easily than great ones).
  • Paralyse is already nasty, there's no way it should remove your buffs, but on the other hand, if confuse do, it's hard to explain why paralyse wouldn't. I say all active spells start expiring, but with enough delay so they should still be active at the end of the paralyse. Immediate cancellation should be impossible or extremely rare.
Which spells

What are the spells that can be cast permanently?

  • All the ones that can already be extended: swiftness, levitation, flight, repel and deflect missiles, Ozocubu's armour, insulation, resist poison, see invisible, control teleport, stoneskin.
  • All the form spells: spider form, ice form, blade hands, statue form, dragon form, necromutation.
  • Some spells can be extended, but only by a short time, so you can't really keep them permanent with extension. Is this for balance? Should they get a permanent version? Those spells are: condensation shield, phase shift, ring of flames and all weapon branding spells.
    • Very short duration spells shouldn't be able to be made permanent. Or, they should have a proportionately higher upkeep. Phase shift is a good example of this. As for weapon brands, the same thing probably applies. It definitely applies to excruciating wounds, since it creates a lot of noise on casting. Finally, death's door, haste, and invisibility should remain temporary, for obvious reasons. — evilmike 2010-09-16 00:37
    • I forgot regeneration, but I don't think you should be able to cast it permanently. — galehar 2010-09-16 09:29
  • Spells which you can already cast at success rate >= X (where X may or may not be Perfect ) — b0rsuk 2010-09-15 23:54

galehar 2010-09-15 23:24/


What if permanent spells added a small amount of glow while they're on, modified by Charms skill (or Transmutations for form spells).

  • I'll suggest Charms/3 for the number of spell levels you can have permanent without causing glowing so at Charms 6 you could make swiftness or levitation permanent, at Charms 18 you could have the swiftness and flight combo or deflect missiles on all the time. Permanent spells beyond that level would periodically add glow (with higher spell levels adding more).
  • This also gives some reason to boost the Charms skill to more than what is necessary to just cast the spell.
  • With this it might be possible to make most of these spells only castable as permanent effects which the player can cancel if glow gets too high.
I object to charms/3. This would negatively affect play, requiring archmages (like my DEFE) to have significantly higher charms skill just to use the swiftfly combo. At charms 13, I was able to, with a single casting of swift and flight, to keep it going for multiple dungeon levels. With this change, I would be unable to do that, and may even just resort to temporary castings of both spells so as not to glow. Charms/2 would be a much better solution. — ZChris13 2011-05-17 00:48

Alternate implementation

This implementation should be simpler to code and balance. When you cast the spell with Z, you pay the normal price, but your MP regeneration and max MP are reduced (see below). When the spell reach the expiration threshold (when you get the warning message), a recast is done behind the scene. It doesn't take a turn and doesn't cost any MP but costs hunger and trains skills (for auto mode). If it succeeds, the duration is silently renewed. If it fails, you get a normal miscast and the normal expiration message. You can choose to manually recast it or let it expire.


Your max MP is reduced to the average of what it would be over the course of the normal duration (minus expiration threshold). If you cast a L5 spell which lasts 50 turns before the threshold and you can regenerate the 5MP in 20 turns, then your MP is reduced by (5/2)*20/50 = 1. We might use floats here because we'll have to make the calculation for each spell (they have different duration), sum them all and round up at the end.
Your MP regeneration is reduced by spell_level / duration. You're paying for the next recast. In the previous example, your MP regeneration would be reduced by 0.1 MP per turn (the tmp variable in _regenerate_hp_and_mp is reduced by 10).
I think having the 2 costs is important. The point is that you are either at full MP or regenerating. So you're either paying one, or the other but never both at the same time. Keeping too many buffs might lead to negative regeneration. In that case, we should print a message.

I don't see the point in the max MP reduction. Reducing MP regeneration should make the cost equivalent to what is currently paid by people who manually recast buffs. If the spell_level / duration cost of their buffs is more than what is naturally regenerated, then they will never get to full MP anyway without unnatural MP regeneration; if it's less, then you force them to manually recast and then rest in order to obtain full MP. Furthermore, for those who frequently utilize a source of channeling, this reduction makes permabuffs clearly strategically undesirable compared to manual recasting. — Mumcon 2013-03-15 00:57
There are powerful arguments for implementing duration spells with max MP cost reduction: 1) simplicity and micromanagement, it heavily cuts down on repetitive actions which are very rarely of tactical importance, 2) clarity and transparency, Crawl is supposedly a tactical game and not a simulation so don't make mechanics more opaque than they need to be. Transparent rules are required for players to make informed decisions. Informed decisions which have interesting results are important to have a fun game. Go try Tome4, it uses max MP reduction buffs all over the place, you can try it in practice. — b0rsuk 2013-05-23 09:24


I think this system is as fair as possible. You do gain a small advantage by not wasting turns to renew. If this is too good, we can increase the MP cost by simply reducing the duration and use this lever as a balance. Players keeping many buffs active might be seen as a balance problem, but tedium shouldn't be used to balance the game. It's already possible to do so and this system only makes it less annoying. If buffs are too good, we can nerf the spells (as have been done recently with the swiftfly combo), or add some glow. — galehar 2011-09-07 13:24

Well, if we're trying to maintain the status quo and just reduce tedium, I think the MaxMP costs (not the regeneration) should be quite a bit higher than suggested, perhaps up to even 100-300% more. Under these equations, if you were entering Vaults: 8 or something, you could really enter (by precasting then resting to full MP) with DeflectM, PhaseS, stoneskin, insulation, haste(by cast), and ozocubus armor, all with enough MP to spammals a bit, stair dance, and do two or 3 control blinks. This type of strategy would be unsustainable except in these types of situations, but this is something no player could normally do. MP regen doesn't hurt so much, since you just hit 5, channel, sublimation. — greepish 2011-12-06 15:46
Note that channeling also lets you quickly regenerate MP after casting non-permanent buffs. So the “problem” with channeling/sublimation/cboe (I don't think this is one) isn't that it lets you avoid most of the penalty of permabuffs, it's that it doesn't let you avoid all of the penalty (the max MP penalty remains).
Getting to full MP (minus the penalty) by mashing 5, with buffs that wont run out anytime soon (or ever, actually), does indeed sound like a problem. But this is already what would currently happen if instead of just mashing 5 you would recast your buffs when you get the expiration message. Your average MP when casting no other spells but the buffs you want to keep up for a long time would be what you get as max MP with permabuffs. So once again, this is already possible without permabuffs, just very tedious.
The only actual ingame advantages from permabuffs are the free turns you would usually have to spend on recasting buffs (possibly having to compensate for these somehow is mentioned in the proposal), and the insurance that your buff wont run out at a bad time (except on miscast). A bigger max MP penalty might be better compensation than bigger regen reduction. Simply adjusting the effective duration of buffs would affect both. How big these advantages are and whether they need to be compensated for would have to be determined by playtesting. Theorycrafting can only get you so far. — Galefury 2011-12-06 17:17
Yeah you got a point about channeling/sublim. In any case, in the two or three games I've played in my life that had permacast buffs that were normally temp, the MaxMP reduction was always exactly the casting cast. Crawl is different than most games of course, but my “wild guess” would be that a flat SpellLevel/2 deduction from MaxMP is good enough and is easily understandable, the only superlong duration spells are low level so they don't matter. — greepish 2011-12-06 17:21
The most important point in favor of this alternate implementation is that it tries to be as close to manual recasting as possible while removing the tedium, and I don't think it can get much closer to this goal. If this proposal is found to need changes it would probably make more sense to just go with the original proposal (modified by stuff said in comments), it has several advantages over this one (clearer mechanics, even less tedium). Note that simply using level/2 as the maxMP cost is in the original proposal and was shown to be problematic in a comment. I prefer this version (at least on paper) because easy balancing and near-equivalency of permanent and temporary casts are very valuable advantages. — Galefury 2011-12-06 23:34
Noise is a complicated issue that needs to be addressed. There was a thread about a desire for more noise info in the Tavern recently, but it's even more of a problem if you have 3-4 buffs up and they all produce noise spontaneously with no synchronization (and would there be an indication?). If possible, you should not ask those who value stealth to sacrifice the convenience of permabuffs. A simple solution, if unfair, would be to remove all post-casting noise. A more fair, yet complicated, one would be for all spell noise to happen the same turn in sequence, with a period equal to the average duration of the buffs, and perhaps with a ~6-8-turn warning (enough for the player to move away from nearby monsters). The warning could be toggle-able to not inconvenience unstealthy players. — Mumcon 2013-03-15 00:57

Spell power

Right now, the spell power of most duration-based spells has only an effect on the duration. This means that once you can reliably cast the enchantment spells you want (usually haste and deflect missiles), there's little reason to keep training enchantment. Below, I'll list all the duration-based spells that could have their effect scaled to their power. Most of the spells in this list are from the enchantment school, but feel free to add spells from other schools if they fit in.

How Spell Power could affect simple buffs

For spells like Ozocubu's Armour, Stoneskin, Forescry (Phase Shift?) I think there's a simple way to make spell power relevant. The magnitude of the effect would be random. So instead of being stuck with the same +5 AC from Stoneskin for basically 95% of the game, you would get a random increase from a range determined by spell power. Recasting would reroll the effect. Variation could be quite small, for example not so high Stoneskin would yield a 3-5 increase. Later you would get 4-5, and then always +5. On spell information screen it could be described a lot like ranges are. For example, “3-5 stoneskin” would have ”###**..” which would mean “at least 3 no matter what, up to 2 more, and potentially 2 more if you increase your spell power”. (I don't claim I know the exact numbers behind stoneskin.)

This method would be complicated to implement with “permanent spells” which just drain MP upkeep or slow mana regeneration. So yes, while I don't like to admit it the current system has some (potential) benefits.

Spell list

  • Swiftness (and Fly): At low power grants only 1 point of speed bonus and has no synergy with fly. At medium power, 2 points. At high power, it has synergy with fly, but only for a total of 3 points. At max power the synergy with fly is as of now (4 points). This is a nerf, but is probably needed anyway.
  • Deflect and Repel Missiles: efficiency
  • Control Teleport: precision
  • Haste: a consensus has been reached that haste shouldn't be scaled with power (see the Haste Nerf page)
  • Berserker Rage: all bonuses (speed multiplier, strength, damage and HP) are scaled to power. The drawbacks too (duration of slowness, risk of losing consciousness, and even nutrition cost). So at low power, it's less efficient, but also less dangerous. Like haste, this is probably too hard to balance.
  • Regeneration: rate

Ozocubu's Armour and Condensation shield

I've put those spells in a separate section because their strength (AC/SH boost) depends on the ice magic skill and not the spell power. Here is my suggestions about them.

  • Ice enhancers boost the strength (AC/SH) of the spell (see Spell Enhancers).
  • When cast with high ice magic skill, the spell is more resilient against weak fire attacks. Of course, even a strong ice armour has little chance of resisting a fireball (and no chance at all of resisting fire storm or hellfire), but it's a bit silly to have both your armour and your shield entirely dissipated by a weak puff of flame. It has a chance of completely resisting or only get weakened (reduced AC/SH and/or duration). And if you lose the shield, the armour has more chance of resisting.
kilobyte suggested that each point of fire damage reduce the duration of the spell by 10 aum. This number could also be reduced by a high ice magic skill. — galehar 2010-11-07 00:32

Sticky Flame

If a cold shield/effect on oneself is affected by heat attacks, then a sticky flame on oneself should be affected/damaged by cold attacks, such as those from wands or even ozocuba's armor. — XuaXua 2011-04-15 05:03


The current situation

If you rely on enchantment (as most casters and hybrids do), and you find a staff of enchantment, it's a no-brainer that you should carry it, and switch to it before casting buff spells or casting extension to boost duration. Even if it's not a big boost, there's almost no downside: weapon switching is fast, you usually cast buff before the fight and it can be macro'd if you find it annoying. The weight is even counterbalance by it's great MR.

The new situation

If some or all the above is implemented, it will make spell power more relevant and enhancers even more attractive (which is a good thing IMHO). Not only the staff of enchantment, but also ring/staff of ice (and maybe staff of earth for stoneskin? I don't really know about this one). To avoid increasing the degenerate play of the current situation, the enhancer should be effective only when equipped, so it creates an interesting choice (you can also switch to it after the casting and still get the boost). A fire elementalist would have to choose between a staff of fire (offence) and a staff of enchantment (defence). A crusader could choose to use a ring of ice (defence) and could even switch to a staff of ice while retreating to further boost his defence.

Logged in as: Anonymous (VIEWER)
dcss/brainstorm/magic/power_duration.txt · Last modified: 2013-05-23 09:31 by b0rsuk
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki