Viewing Issue Simple Details Jump to Notes ] Wiki ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0008301 [DCSS] Patches minor have not tried 2014-03-22 15:45 2014-05-15 13:49
Reporter DracheReborn View Status public  
Assigned To MarvinPA
Priority normal Resolution done  
Status closed   Product Branch 0.16 ancient branch
Summary 0008301: Interface patch for Sif miscast protection
Description Sif starts protecting from miscasts at 4* piety (which becomes perfect protection at 6* piety) but this is not reflected in the 'I' screen or 'M' screen. This patch colours spell failure rates that would have been yellow or red to LIGHTBLUE instead (Sif's colour) if at 4* piety, and colours all spell failure rates to LIGHTGREY (indicating perfectly safe) once 6* piety is reached. Also, the warning message from attempting to memorise a "dangerous" spell is suppressed if miscast protection is active.

I initially wanted to extend the same functionality for Kiku, but it looks like Kiku's protection is a lot more nuanced. For example, if I understand correctly, casting Bolt of Draining as a Kiku worshipper can still expose one to Conj miscasts, even if Kiku protects from Necro miscasts. So I've left Kiku off for now. Feedback appreciated.

Idea inspired by Tavern discussion.
Additional Information
Tags No tags attached.
Attached Files ? file icon 0002-Recalculate-chance-for-severe-miscast-for-Sif-worshi.patch [^] (2,160 bytes) 2014-03-23 00:34 [Show Content]
? file icon 0003-Improve-warning-messages-when-learning-difficult-spe.patch [^] (3,048 bytes) 2014-03-23 00:35 [Show Content]
? file icon 0012-Recalculate-chance-for-severe-miscast-for-Sif-worshi.patch [^] (2,164 bytes) 2014-05-08 23:19 [Show Content]
? file icon 0013-Improve-warning-messages-when-learning-difficult-spe.patch [^] (2,883 bytes) 2014-05-08 23:19 [Show Content]

- Relationships

-  Notes
(0025678)
neil (administrator)
2014-03-22 16:23
edited on: 2014-03-22 16:26

Summarising some points brought up on IRC:

* There should still be a distinction between yellow and red when your protection is imperfect. Maybe the colours could be shifted downwards, though, since they represent the probability of a high-severity miscast. If I understand correctly, you should just be able to multiply 'chance' by the probability of protection. This could even incorporate Kiku protection if you also take into account the chance that the miscast is Necro. This would also automatically handle the 6* -> lightgrey case (since the probability would multiply out to zero).

* Some message on memorisation should probably still be there even at perfect protection, since a high failure chance is sill relevant. Perhaps the message should be different, though, since casting the spell is not quite "dangerous". Perhaps taking failure chance rather than miscast chance into account?

* There should be a distinct message (rather than "nothing happens") for god-averted miscasts.

(0025681)
DracheReborn (reporter)
2014-03-23 00:48
edited on: 2014-03-23 04:42

Please ignore the first file (0001-Interface-patch-for-Sif-miscast-protection.patch) [deleted -neil].

Patch 0001-Improved-messages-when-Sif-or-Kiku-prevents-miscasts.patch
-> This replaces the canned_msg with a more god-specific message
-> Also changed Sif and Kiku's description of their respective miscast protection abilities. As there wasn't a consensus on IRC, I just went with what I liked. Feel free to change any of the text.

Patch 0002-Recalculate-chance-for-severe-miscast-for-Sif-worshi.patch
-> multiply miscast chance by (1 - protection chance) as suggested by neil.
-> Only for Sif, since I feel uncertain how to calculate Kiku's protection

0003-Improve-warning-messages-when-learning-difficult-spe.patch
-> Current warnings are kind of weird in that one addressed difficulty ("impossible to cast") while others addressed miscast danger ("very dangerous", etc). This patch makes it more explicit, with hopefully some less awkward text. The thresholds I set for difficulty are arbitrary (they more or less matched 50% and 20% displayed failure rates) and probably should be changed by someone more knowledgeable. Btw, I spent an inordinate amount of time on this patch, so I hope it makes it :p

(0025746)
dpeg (administrator)
2014-03-28 22:49

Many thanks! For intent, design and execution :)

This covers an annoying opacity in Crawl's interface (and surely contributes to players misunderstanding Sif's miscast protection).

Code review withstanding, this should really go in. (I am talking about trunk/0.15, of course.)
(0025944)
MarvinPA (developer)
2014-04-29 03:34
edited on: 2014-04-29 03:34

Pushed the first patch (0001-Improved-messages-when-Sif-or-Kiku-prevents-miscasts.patch).

The second patch (adjusting the display for Sif miscast severity) seems like a good change but I've not looked at it properly. I'm not sure how useful or necessary the third patch would be though - I don't think the spell memorisation warnings really need to be more detailed or complicated.

(0025957)
DracheReborn (reporter)
2014-04-29 11:35
edited on: 2014-04-29 11:37

Re the third patch. It is meant to address the case of memorizing a spell with high failure rate while with perfect Sif protection. Since miscast chance is 0, the spell can be memorized without a prompt with the current code.

The patch outputs 3 possible messages:
1. Difficult but not dangerous. This is the point being addressed from above.
2. Dangerous. This is a reworded version of the current message.
3. Dangerous and difficult. This is the most complicated message being output.

On reflection, I agree that 2 and 3 can probably be combined (i.e. if it's dangerous, you don't care about difficulty). That means just one new message specifically for when the character already has Sif miscast protection.

Is my wording improvement in 2 any good though? From "dangerous to cast" -> "dangerous if miscast". If it's ok, I'll simplify the patch by combining 2 and 3.

(0026103)
DracheReborn (reporter)
2014-05-08 23:23

I regenerated the 2nd patch based on current trunk (but probably didn't need it).

I changed the 3rd patch as outlined in the previous note. That is, the only new message it adds now is if there's a difficult to cast spell, but is not dangerous due to Sif's miscast protection. The 3rd patch relies on the 2nd, which perhaps I didn't make clear before.

Credit for the 2nd patch should go to archaeo in Tavern, who originally proposed the idea.
(0026114)
Reaver (developer)
2014-05-09 21:34
edited on: 2014-05-09 21:35

Ok, I'm going to try to sort through this now.

*First bit of logic: Marvin PA said he pushed the first patch so I'm going to delete that since 5 patches is confusing.

Oh huh, the last two patches appear to be updates of the first two.

Drachereborn: Can I delete the top two patches?

(0026117)
Reaver (developer)
2014-05-10 01:18

As MarvinPA mentioned, I'm not sure how necessary patch 0000003, and on ##crawl-dev it even turned to a discussion on whether keeping even the old messages around was worth it. However, I'll push patch 0000002 soon.
(0026121)
DracheReborn (reporter)
2014-05-10 10:07

Reaver: thanks for pushing. Looking at the logs, looks like I missed all the excitement :) But your version is better in the long run, I agree.
(0026176)
MarvinPA (developer)
2014-05-15 07:47

This was pushed.
(0026177)
DracheReborn (reporter)
2014-05-15 13:49

Thanks!

- Issue History
Date Modified Username Field Change
2014-03-22 15:45 DracheReborn New Issue
2014-03-22 15:45 DracheReborn File Added: 0001-Interface-patch-for-Sif-miscast-protection.patch
2014-03-22 16:23 neil Note Added: 0025678
2014-03-22 16:24 neil Note Edited: 0025678
2014-03-22 16:26 neil Note Edited: 0025678
2014-03-23 00:34 DracheReborn File Added: 0001-Improved-messages-when-Sif-or-Kiku-prevents-miscasts.patch
2014-03-23 00:34 DracheReborn File Added: 0002-Recalculate-chance-for-severe-miscast-for-Sif-worshi.patch
2014-03-23 00:35 DracheReborn File Added: 0003-Improve-warning-messages-when-learning-difficult-spe.patch
2014-03-23 00:48 DracheReborn Note Added: 0025681
2014-03-23 04:42 neil File Deleted: 0001-Interface-patch-for-Sif-miscast-protection.patch
2014-03-23 04:42 neil Note Edited: 0025681
2014-03-28 22:49 dpeg Note Added: 0025746
2014-04-06 12:40 MarvinPA Issue Monitored: MarvinPA
2014-04-29 03:34 MarvinPA Note Added: 0025944
2014-04-29 03:34 MarvinPA Note Edited: 0025944
2014-04-29 03:34 MarvinPA Note Edited: 0025944
2014-04-29 03:34 MarvinPA Note Edited: 0025944
2014-04-29 11:35 DracheReborn Note Added: 0025957
2014-04-29 11:37 DracheReborn Note Edited: 0025957
2014-05-08 23:19 DracheReborn File Added: 0012-Recalculate-chance-for-severe-miscast-for-Sif-worshi.patch
2014-05-08 23:19 DracheReborn File Added: 0013-Improve-warning-messages-when-learning-difficult-spe.patch
2014-05-08 23:23 DracheReborn Note Added: 0026103
2014-05-09 21:34 Reaver Note Added: 0026114
2014-05-09 21:34 Reaver File Deleted: 0001-Improved-messages-when-Sif-or-Kiku-prevents-miscasts.patch
2014-05-09 21:35 Reaver Note Edited: 0026114
2014-05-10 01:18 Reaver Note Added: 0026117
2014-05-10 10:07 DracheReborn Note Added: 0026121
2014-05-15 07:47 MarvinPA Issue End Monitor: MarvinPA
2014-05-15 07:47 MarvinPA Note Added: 0026176
2014-05-15 07:47 MarvinPA Status new => resolved
2014-05-15 07:47 MarvinPA Fixed in Branch => 0.15 development branch
2014-05-15 07:47 MarvinPA Resolution open => done
2014-05-15 07:47 MarvinPA Assigned To => MarvinPA
2014-05-15 13:49 DracheReborn Note Added: 0026177
2014-05-15 13:49 DracheReborn Status resolved => closed


Mantis 1.1.8[^]
Copyright © 2000 - 2009 Mantis Group
Powered by Mantis Bugtracker