Viewing Issue Simple Details Jump to Notes ] Wiki ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0006579 [DCSS] Implementables feature N/A 2013-01-28 19:56 2013-08-24 21:41
Reporter dpeg View Status public  
Assigned To neil
Priority normal Resolution done  
Status resolved   Product Branch 0.12 ancient branch
Summary 0006579: List monster spells in monster descriptions
Description Make monster descriptions (what you get from 'xv') more useful by listing spell sets. It has been agreed on ##crawl-dev that spells are crucial information players have to get from the bots otherwise (and compared to AC etc., this information is easy to assess).

Some monsters (like ancient liches) can have several spell sets. In this case, it seems to be best to list all sets, seperately. This avoids any game-play issues at this point.
Additional Information
Tags No tags attached.
Attached Files ? file icon Describe-monster-spells-and-spell-like-abilities.patch [^] (15,704 bytes) 2013-07-17 01:05 [Show Content]
? file icon 0001-Display-monster-spells-and-magical-abilities-with-x-.patch [^] (14,123 bytes) 2013-07-19 05:26 [Show Content]
? file icon 0001-Display-monster-spells-and-abilities-fix-format.patch [^] (14,502 bytes) 2013-07-26 18:40 [Show Content]

- Relationships

-  Notes
(0023428)
cjo (reporter)
2013-07-11 21:32
edited on: 2013-07-11 21:33

Is anyone working on this? I'm interested, because I would enjoy having this myself. I have a couple questions, though. (Because of that, I didn't attach a patch yet.)

Right now, monsters that have only one spellbook get the book specified in mon-data.h. But monsters that have multiple spellbooks instead get the tag MST_NO_SPELLS. Then mon-util.cc checks for the combination of the spellcaster flag with the MST_NO_SPELLS flag. The only link between the monster and the multiple possible spellbooks is in a case:switch statement in mon-util.cc, which does not output a spellbook list.

So I changed the case:switch statement to push back values into a vector, so I could make a list of spellbooks available elsewhere.

Is that an okay approach? Another way would be to reorganize data so that all possible monster spellbooks for each monster are kept in a .h file... I didn't want to go in the wrong direction.

(0023455)
mumra (developer)
2013-07-15 17:13

You might want to post code; it's a bit difficult to envisage. But this sounds like a reasonable solution. Anything that cleans up the current mess is a bonus!
(0023469)
cjo (reporter)
2013-07-17 01:12

OK, I'm attaching a patch.

It's not so much that the current code is a mess as that it wasn't designed to keep track of spellbooks. I'll also speculate that when mon-data.h was created, probably the idea was that each monster would only have one spellbook. Thus any easy way to accomode multiples is a little clunky.

I did both comment my own code and add comments to some other files to try to clarify how the files relate.

I also wrote a version where I pulled the data for multiple spellbooks into a separate .h file, but I felt like I moved a lot of stuff around for minimal benefit. I think I like this one better.
(0023485)
cjo (reporter)
2013-07-18 03:38

The patch I uploaded has issues; please ignore it. I will upload a new one once it's fixed.
(0023492)
cjo (reporter)
2013-07-19 05:29

OK, I think I fixed the issues. Would appreciate someone who knows what they're doing looking at it closely though! Please ignore the first uploaded file.
(0023569)
cjo (reporter)
2013-07-26 18:57

Gos some feedback concerning formatting issues. Third file again replaces the first two.
(0023859)
Galefury (updater)
2013-08-24 17:27

Soooo, anyone looking at this? Because it sure would be nice to have.
(0023860)
neil (administrator)
2013-08-24 20:36
edited on: 2013-08-24 20:36

Applied in trunk (0.13-a0-2786-g2774ec9), thanks! I made a minor fix so that priests have "divine", not "magical", abilities; and to handle a (not currently relevant) case where a non-actual caster has multiple "spell" lists.

It would be nice to eventually handle non-actually-spells abilities: compare dragon (no abilities listed) to iron dragon (Metal Splinters listed). But I think that's outside the scope of this implementable.

(0023862)
chris (updater)
2013-08-24 21:41

Thanks for working on this, cjo!

- Issue History
Date Modified Username Field Change
2013-01-28 19:56 dpeg New Issue
2013-07-11 21:32 cjo Note Added: 0023428
2013-07-11 21:33 cjo Note Edited: 0023428
2013-07-12 00:06 cjo Issue Monitored: cjo
2013-07-15 17:13 mumra Note Added: 0023455
2013-07-17 01:05 cjo File Added: Describe-monster-spells-and-spell-like-abilities.patch
2013-07-17 01:12 cjo Note Added: 0023469
2013-07-18 03:38 cjo Note Added: 0023485
2013-07-19 05:26 cjo File Added: 0001-Display-monster-spells-and-magical-abilities-with-x-.patch
2013-07-19 05:29 cjo Note Added: 0023492
2013-07-26 18:40 cjo File Added: 0001-Display-monster-spells-and-abilities-fix-format.patch
2013-07-26 18:57 cjo Note Added: 0023569
2013-08-05 18:04 MarvinPA Issue Monitored: MarvinPA
2013-08-24 17:27 Galefury Note Added: 0023859
2013-08-24 20:07 neil Status new => assigned
2013-08-24 20:07 neil Assigned To => neil
2013-08-24 20:36 neil Note Added: 0023860
2013-08-24 20:36 neil Status assigned => resolved
2013-08-24 20:36 neil Fixed in Branch => 0.13 development branch
2013-08-24 20:36 neil Resolution open => done
2013-08-24 20:36 neil Note Edited: 0023860
2013-08-24 21:41 chris Note Added: 0023862
2013-08-27 19:55 MarvinPA Issue End Monitor: MarvinPA


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