Viewing Issue Simple Details Jump to Notes ] Wiki ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0005025 [DCSS] Bug Report trivial always 2011-12-08 17:16 2012-02-10 19:22
Reporter XuaXua View Status public  
Assigned To neil
Priority normal Resolution done  
Status closed   Product Branch 0.10 ancient branch
Summary 0005025: Unique Auto Level Annotation still remains if Unique was polymorphed and killed
Description Scroll of Vulnerability + Wand of Polymorph the Royal Jelly.

Kill resulting creature.

Leave Slime:6

Re-enter Slime:6

"Level annotation: royal jelly" still remains. It should not.

This may happen with other uniques as well (untested)
Additional Information
Tags No tags attached.
Attached Files ? file icon 0001-Fix-unique-annotations-for-polymorphed-royal-jelly-B.patch [^] (1,354 bytes) 2011-12-09 18:38 [Show Content]
? file icon 0001-For-unique-annotations-check-whether-monster-has-eve.patch [^] (1,263 bytes) 2011-12-09 19:20 [Show Content]
? file icon 0001-Fix-annotation-name-for-Serpent-of-Hell.patch [^] (884 bytes) 2011-12-09 19:36 [Show Content]

- Relationships
has duplicate 0004898closedGalefury Polymorphing the Royal Jelly leaves annotation 

-  Notes
(0016176)
GreatZebu (updater)
2011-12-09 18:38

This problem is due to the way names are handled after polymorphing for certain uniques like the royal jelly, the Lernaean hydra, and Blork the orc. I've attached a patch to fix the issue.
(0016178)
XuaXua (reporter)
2011-12-09 18:56
edited on: 2011-12-09 19:00

Regarding your patch

1) value assigned to name for Serpent of Hell is set to Lernaen hydra

2) In your else block, why wouldn't you create a new char array variable to all uppercase value of variable "name" and compare against all cap names (rather than varying case checks) in the subsequent IF statements rather than call c_str() several times?

(0016179)
GreatZebu (updater)
2011-12-09 19:35

XuaXua: thanks for the catch on the Serpent of Hell name. For the string comparisons, your suggestion would also work fine, but I wanted to avoid extra memory allocations, and since c_str just returns a pointer to the string's internal representation, it has essentially no overhead.
(0016180)
XuaXua (reporter)
2011-12-09 20:10

I figured maintaining multiple names would be more programmatic / maintenance overhead.
(0016181)
XuaXua (reporter)
2011-12-09 20:12

Also, if Serpent of Hell is somehow polymorphed, will its name screw up like Royal Jelly and if so, shouldn't that be accounted for?
(0016182)
neil (administrator)
2011-12-09 20:29

Patches are in, thanks. If someone ever creates another unique with 'the' in its name, this code will have to be updated.
(0016965)
XuaXua (reporter)
2012-02-10 19:22

I haven't tested this in forever, but I'm sure someone will. I bet it works.

- Issue History
Date Modified Username Field Change
2011-12-08 17:16 XuaXua New Issue
2011-12-09 18:38 GreatZebu File Added: 0001-Fix-unique-annotations-for-polymorphed-royal-jelly-B.patch
2011-12-09 18:38 GreatZebu Note Added: 0016176
2011-12-09 18:56 XuaXua Note Added: 0016178
2011-12-09 18:56 XuaXua Status new => feedback
2011-12-09 18:57 XuaXua Note Edited: 0016178
2011-12-09 19:00 XuaXua Note Edited: 0016178
2011-12-09 19:20 GreatZebu File Added: 0001-For-unique-annotations-check-whether-monster-has-eve.patch
2011-12-09 19:35 GreatZebu Note Added: 0016179
2011-12-09 19:36 GreatZebu File Added: 0001-Fix-annotation-name-for-Serpent-of-Hell.patch
2011-12-09 20:10 XuaXua Note Added: 0016180
2011-12-09 20:12 XuaXua Note Added: 0016181
2011-12-09 20:12 XuaXua Status feedback => acknowledged
2011-12-09 20:29 neil Note Added: 0016182
2011-12-09 20:29 neil Status acknowledged => resolved
2011-12-09 20:29 neil Fixed in Branch => 0.10 development branch
2011-12-09 20:29 neil Resolution open => done
2011-12-09 20:29 neil Assigned To => neil
2012-02-10 11:02 Galefury Relationship added has duplicate 0004898
2012-02-10 19:22 XuaXua Note Added: 0016965
2012-02-10 19:22 XuaXua Status resolved => closed


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