summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-30 05:16:55 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-30 05:16:55 +0000
commit9f6def7c5dbe99977cce9f974b12303433f013b7 (patch)
treed18c9bb29ecffb54df9b9596e92f65b2dc5d7c57 /crawl-ref/source
parent38ebcee4627305ea124f2802fc9498e1acb97764 (diff)
downloadcrawl-ref-9f6def7c5dbe99977cce9f974b12303433f013b7.tar.gz
crawl-ref-9f6def7c5dbe99977cce9f974b12303433f013b7.zip
Added a "your god is growing displeased" tutorial event, so that turorial
players will get a warning about piety growing low before they get excommunicated. Breaks tutorial compatibility, but otherwise maintains savefile compatibilty. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5338 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/enum.h27
-rw-r--r--crawl-ref/source/religion.cc3
-rw-r--r--crawl-ref/source/tutorial.cc22
3 files changed, 38 insertions, 14 deletions
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index 52760c212f..f5a60d8ed7 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -2698,38 +2698,39 @@ enum tutorial_event_type
TUT_FLEEING_MONSTER,
TUT_ROTTEN_FOOD,
TUT_CONVERT,
- TUT_EXCOMMUNICATE, // 35
+ TUT_GOD_DISPLEASED, // 35
+ TUT_EXCOMMUNICATE,
TUT_SPELL_MISCAST,
TUT_SPELL_HUNGER,
TUT_GLOWING,
// status changes
- TUT_YOU_ENCHANTED,
- TUT_YOU_SICK, // 40
+ TUT_YOU_ENCHANTED, // 40
+ TUT_YOU_SICK,
TUT_YOU_POISON,
TUT_YOU_ROTTING,
TUT_YOU_CURSED,
- TUT_YOU_HUNGRY,
- TUT_YOU_STARVING, // 45
+ TUT_YOU_HUNGRY, // 45
+ TUT_YOU_STARVING,
TUT_YOU_MUTATED,
TUT_POSTBERSERK,
// warning
TUT_RUN_AWAY,
- TUT_RETREAT_CASTER,
- TUT_WIELD_WEAPON, // 50
+ TUT_RETREAT_CASTER, // 50
+ TUT_WIELD_WEAPON,
TUT_NEED_HEALING,
TUT_NEED_POISON_HEALING,
TUT_INVISIBLE_DANGER,
- TUT_NEED_HEALING_INVIS,
- TUT_ABYSS, // 55
+ TUT_NEED_HEALING_INVIS, // 55
+ TUT_ABYSS,
// interface
TUT_MULTI_PICKUP,
TUT_HEAVY_LOAD,
TUT_SHIFT_RUN,
- TUT_MAP_VIEW,
- TUT_DONE_EXPLORE, // 60
+ TUT_MAP_VIEW, // 60
+ TUT_DONE_EXPLORE,
TUT_STAIR_BRAND,
- TUT_EVENTS_NUM // 62
-}; // for numbers higher than 50 change size of tutorial_events in externs.h
+ TUT_EVENTS_NUM // 63
+}; // for numbers higher than 70 change size of tutorial_events in externs.h
enum tutorial_types
{
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 7ac6aa2350..347e230057 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -2943,6 +2943,9 @@ void lose_piety(int pgn)
}
}
+ if (you.piety > 0 && you.piety <= 5)
+ learned_something_new(TUT_GOD_DISPLEASED);
+
if ( you.religion == GOD_BEOGH )
{
// every piety level change also affects AC from orcish gear
diff --git a/crawl-ref/source/tutorial.cc b/crawl-ref/source/tutorial.cc
index d7cf5b96c8..a90bbf1508 100644
--- a/crawl-ref/source/tutorial.cc
+++ b/crawl-ref/source/tutorial.cc
@@ -52,7 +52,7 @@ static void _tutorial_describe_cloud(int x, int y);
static bool _water_is_disturbed(int x, int y);
//#define TUTORIAL_DEBUG
-#define TUTORIAL_VERSION 112
+#define TUTORIAL_VERSION 113
static int _get_tutorial_cols()
{
@@ -411,6 +411,8 @@ static std::string _tut_debug_list(int event)
return "seen first friendly monster";
case TUT_CONVERT:
return "converted to a god";
+ case TUT_GOD_DISPLEASED:
+ return "piety ran low";
case TUT_EXCOMMUNICATE:
return "excommunicated by a god";
case TUT_SPELL_MISCAST:
@@ -2465,6 +2467,24 @@ void learned_something_new(tutorial_event_type seen_what, int x, int y)
_new_god_conduct();
break;
+ case TUT_GOD_DISPLEASED:
+ text << "Uh-oh, " << god_name(you.religion) << " is growing displead "
+ "because your piety is running low. This can be caused by "
+ "you doing things to annoy him";
+
+ if (!is_good_god(you.religion))
+ {
+ // Piety decreases over time for non-good gods
+ text << ", not doing things to please him frequently enough, or "
+ "a combination of the two";
+ }
+ text << ". ";
+
+ text << "If your piety goes to zero then you'll be excomunnicated. "
+ "Better get cracking on raising your piety and/or stop "
+ "annoying annoying your god.";
+ break;
+
case TUT_EXCOMMUNICATE:
{
const god_type new_god = (god_type) x;