From 3a83e92a99ce7a161f36e0bd2f1412580ef9bca0 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Mon, 20 Jul 2009 18:07:51 +0000 Subject: Apply caotto's plant god patch, for now named "Feawn". Also fix potions of porridge's menu colour being yellow for Mummies. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10355 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/player.cc | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'crawl-ref/source/player.cc') diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index e4922298df..8b1f27f332 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -7265,6 +7265,32 @@ bool player::backlit(bool check_haloed) const || (check_haloed ? haloed() : false)); } +// This is the imperative version. +void player::backlight() +{ + if (!you.duration[DUR_INVIS]) + { + if (you.duration[DUR_BACKLIGHT]) + mpr("You glow brighter."); + else + mpr("You are outlined in light."); + + you.duration[DUR_BACKLIGHT] += random_range(15, 35); + if (you.duration[DUR_BACKLIGHT] > 250) + you.duration[DUR_BACKLIGHT] = 250; + } + else + { + mpr("You feel strangely conspicuous."); + + you.duration[DUR_BACKLIGHT] += random_range(3, 5); + if (you.duration[DUR_BACKLIGHT] > 250) + you.duration[DUR_BACKLIGHT] = 250; + + + } +} + bool player::haloed() const { return (halo_radius()); -- cgit v1.2.3-54-g00ecf