insufficient spell power feedback
If attempting to cast a spell without having enough power, you get |You don't have enough energy to cast that spell. Recently that was augmented to |You don't have enough energy to cast that spell yet. if your current power is at maximum and not enough. Augment again to |You don't have enough energy to cast that spell anymore. if current power is at maximum and that maximum is less than the peak value it once had and that peak value would have been enough.
This commit is contained in:
+6
-5
@@ -977,13 +977,14 @@ spelleffects(int spell, boolean atme)
|
|||||||
* Augment the message when current energy is at maximum.
|
* Augment the message when current energy is at maximum.
|
||||||
* "yet": mainly for level 1 characters who already know a spell
|
* "yet": mainly for level 1 characters who already know a spell
|
||||||
* but don't start with enough energy to cast it.
|
* but don't start with enough energy to cast it.
|
||||||
*
|
* "anymore": maximum energy was high enough at some point but
|
||||||
* TODO: track peak energy (which can be reduced by traps or
|
* isn't now (lost energy when losing levels or polymorphing into
|
||||||
* monster attacks or loss of levels) and say "any more" instead
|
* new person or had some stripped away by traps or monsters).
|
||||||
* of "yet" if it was ever high enough to make this cast.
|
|
||||||
*/
|
*/
|
||||||
You("don't have enough energy to cast that spell%s.",
|
You("don't have enough energy to cast that spell%s.",
|
||||||
(u.uen >= u.uenmax) ? " yet" : "");
|
(u.uen < u.uenmax) ? "" /* not at full energy => normal message */
|
||||||
|
: (energy > u.uenpeak) ? " yet" /* haven't ever had enough */
|
||||||
|
: " anymore"); /* once had enough but have lost some since */
|
||||||
return res;
|
return res;
|
||||||
} else {
|
} else {
|
||||||
if (spellid(spell) != SPE_DETECT_FOOD) {
|
if (spellid(spell) != SPE_DETECT_FOOD) {
|
||||||
|
|||||||
Reference in New Issue
Block a user