Dungeon Crawl Stone Soup Tracker - DCSS
Viewing Issue Advanced Details
8446 Bug Report minor always 2014-04-26 08:30 2014-05-06 15:09
PleasingFungus Both  
Kate All  
normal Both  
resolved 0.15 ancient branch  
0.15-a0-210-gb09f9d7 done  
none    
none 0.15 ancient branch  
0008446: De-hogged enemies can walk around while unable to move
If one of kirke's hogs is in a web, paralyzed, petrified/petrifying when Kirke is killed, they keep the enchantment but aren't affected by it; they wander around happy as can be, even though they're described/shown as being entangled/paralyzed/petrified (respectively.)

If they're netted, they will happily wander out of the net, after which they're described as 'entangled in a web'.

The effect seems to last indefinitely, until you save and quit, or leave/re-enter the level; then the effect vanishes after a few turns. (Presumably some short default duration is set...)

The relevant function is dactions.cc:_daction_hog_to_human() (which explicitly preserves all enchantments), but I'm not familiar enough with the relevant code to know what needs to be changed.
? file icon 8446_dehogged_enchantment_fix [^] (1,392 bytes) 2014-04-30 08:57
Issue History
2014-04-26 08:30 PleasingFungus New Issue
2014-04-30 08:27 qoala Note Added: 0025980
2014-04-30 08:57 qoala File Added: 8446_dehogged_enchantment_fix
2014-04-30 09:07 qoala Note Added: 0025983
2014-05-04 09:03 wheals Note Added: 0026040
2014-05-06 15:09 Kate Note Added: 0026069
2014-05-06 15:09 Kate Status new => resolved
2014-05-06 15:09 Kate Fixed in Branch => 0.15 development branch
2014-05-06 15:09 Kate Resolution open => done
2014-05-06 15:09 Kate Assigned To => Kate

Notes
(0025980)
qoala   
2014-04-30 08:27   
Looking through the monster enchantment code, it looks like it might be the fact that the enchantment list is copied over, but not the cache of which enchantments the monster had.

I'll test this and submit a patch when I'm done.
(0025983)
qoala   
2014-04-30 09:07   
Patch uploaded.

Since the enchantment cache wasn't copied over, none of the enchantments were being checked during the monster::apply_enchantments() loop for duration updates or available to monster::has_ench(...). (Among other things, the cache allows the update loop to only check pre-existing enchantments when previous steps of the loop can add additional enchantments) On game reload, the cache is generated from the current enchantment list, so that restores behavior.

I checked around the code base, and it appears that everywhere else the enchantments are being copied, the cache is copied as well.
(0026040)
wheals   
2014-05-04 09:03   
Seems fine, committed.
(0026069)
Kate   
2014-05-06 15:09   
Resolving since this was committed.