Viewing Issue Simple Details Jump to Notes ] Wiki ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0009153 [DCSS] Bug Report minor N/A 2014-11-07 16:35 2014-11-07 17:42
Reporter nagdon View Status public  
Assigned To wheals
Priority normal Resolution done  
Status closed   Product Branch 0.16 ancient branch
Summary 0009153: Player illusions created by the Illusion card are generated hostile for followers of good gods
Description I drew Illusion with a follower of Zin, and got the following messages:
You draw a card... It is the Illusion.
Jannes' ghost is enraged by your holy aura!
Suddenly you stand beside yourself.

and a hostile player illusion (note that the message mentions a ghost, but the final created monster is an illusion).

The problem is that monster::ghost_init() sets the type member variable to MONS_PLAYER_GHOST, and when it is reset later in line 210 (to MONS_PLAYER_ILLUSION) the illusion is already enraged by the player.

The mons_summon_illusion_from() function [] calls create_monster() [] which calls mons_place() [] which calls place_monster() to place the monster and does behaviour check after the monster is placed and one of these checks is calling player_angers_monster(). The place_monster() [] function handles bands and calls _place_monster_aux() [] for each band member; this helper function calls define_monster() [], and define_monster() calls the monster::ghost_init() method.

Note that there is an inaccurate comment in the define_monster() function (line 2612-2617):
    // NOTE: For player ghosts and (very) ugly things this just ensures
    // that the monster instance is valid and won't crash when used,
    // though the (very) ugly thing generated should actually work.  The
    // player ghost and (very) ugly thing code is currently only used
    // for generating a monster for MonsterMenuEntry in
    // _find_description() in

The define_monster() function seems to be called for every ugly thing and player illusion. (I don't know if it is called for player ghost creation.)
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
wheals (administrator)
2014-11-07 17:04

0.16-a0-1976-g633f41b should make the clone friendly, and removes the incorrect comment.

- Issue History
Date Modified Username Field Change
2014-11-07 16:35 nagdon New Issue
2014-11-07 17:04 wheals Note Added: 0027689
2014-11-07 17:04 wheals Status new => resolved
2014-11-07 17:04 wheals Fixed in Branch => 0.16 development branch
2014-11-07 17:04 wheals Resolution open => done
2014-11-07 17:04 wheals Assigned To => wheals
2014-11-07 17:42 nagdon Status resolved => closed

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