From f5c61bd43ba6fc429cc424c0ea9acfd426c77b2c Mon Sep 17 00:00:00 2001 From: Charles Otto Date: Sun, 8 Nov 2009 14:50:43 -0500 Subject: Fix a crash when the player is hit by a distortion weapon --- crawl-ref/source/fight.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'crawl-ref/source/fight.cc') diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index 39439c841d..8aef88b8a3 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -2256,7 +2256,8 @@ bool melee_attack::distortion_affects_defender() //jmf: blink frogs *like* distortion // I think could be amended to let blink frogs "grow" like // jellies do {dlb} - if (mons_genus(defender_as_monster()->type) == MONS_BLINK_FROG) + if (defender->atype() == ACT_MONSTER + && mons_genus(defender_as_monster()->type) == MONS_BLINK_FROG) { if (one_chance_in(5)) { -- cgit v1.2.3-54-g00ecf