Thread: 4.0.4 bugs
View Single Post
Old January 17, 2016, 15:32   #84
yyt16384
Scout
 
Join Date: Jan 2015
Posts: 38
yyt16384 is on a distinguished road
Quote:
Originally Posted by Werbaer View Post
Are monster able to kill uniques? Looks like.

Priest against Witch King, which summoned quite some things (mostly harmless), and was nearly dead:
Code:
The Witch-King of Angmar ist hit hard.
The GreatWyrm of Many Colours is hit hard.
[...]
The Witch-King of Angmar tries to cast a spell, but fails.
The Great Wyrm of Many Colours breathes fire.
The Whip burns up!
[...]
The Witch-King of Angmar is destroyed.
Well, he was still there, and probing revealed that he was at 0 HP. But the message was quite disturbing.

(note: i'm playing 4.0.3, but i didn't read about this being fixed)
I think I have found this. In project_m():

Code:
	/* Extract method of death, if the monster will be killed. */
	if (dam > mon->hp)
		context.hurt_msg = context.die_msg;

	/* Apply damage to the monster, based on who did the damage. */
	if (who > 0)
		mon_died = project_m_monster_attack(&context, m_name, m_idx);
	else
		mon_died = project_m_player_attack(&context, m_name);
However, project_m_monster_attack() may change the damage to make sure uniques are not killed by monsters, so we shouldn't modify hurt_msg there.
yyt16384 is offline   Reply With Quote