From 938d297d2b1dbb2fc080e3f4aa9b5bd5e6a98a71 Mon Sep 17 00:00:00 2001 From: dolorous Date: Sat, 17 Jan 2009 00:41:44 +0000 Subject: Add an unchivalric attack type for petrifying monsters. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8479 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/fight.cc | 6 +++++- crawl-ref/source/fight.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'crawl-ref/source') diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index c8d748cd07..8e370819bc 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -291,9 +291,13 @@ unchivalric_attack_type is_unchivalric_attack(const actor *attacker, unchivalric = UCAT_INVISIBLE; // held in a net - if (mons_is_caught(def) || mons_is_petrifying(def)) + if (mons_is_caught(def)) unchivalric = UCAT_HELD_IN_NET; + // petrifying + if (mons_is_petrifying(def)) + unchivalric = UCAT_PETRIFYING; + // paralysed if (def->cannot_act()) unchivalric = UCAT_PARALYSED; diff --git a/crawl-ref/source/fight.h b/crawl-ref/source/fight.h index 30607497ae..8fb863ae74 100644 --- a/crawl-ref/source/fight.h +++ b/crawl-ref/source/fight.h @@ -33,6 +33,7 @@ enum unchivalric_attack_type UCAT_FLEEING, UCAT_INVISIBLE, UCAT_HELD_IN_NET, + UCAT_PETRIFYING, UCAT_PARALYSED, UCAT_SLEEPING }; -- cgit v1.2.3-54-g00ecf