]> granicus.if.org Git - nethack/commitdiff
doomed quest
authornethack.allison <nethack.allison>
Sat, 31 Aug 2002 20:14:17 +0000 (20:14 +0000)
committernethack.allison <nethack.allison>
Sat, 31 Aug 2002 20:14:17 +0000 (20:14 +0000)
Your quest leader would tell you to return later, even after you
were converted, which would be futile, and could mislead new
players.

This patch:
1. Causes the quest leader to banish you the first time you
encounter him/her following a conversion, since you cannot ever
complete the quest anyway in the current game.
2. Adds a new general QT_BANISHED message to be delivered, in
which you are told that you won't be able to get the Amulet without
the Bell now.

This helps resolve the complaint about not knowing that your game
cannot be won.

dat/quest.txt
doc/fixes34.1
include/qtext.h
src/quest.c

index 1ae167cefd9f4622b4af97092b49521c741701bf..dfc0def92290dd838bb6d2940e402a048f145f23 100644 (file)
@@ -3459,7 +3459,21 @@ essential in locating the Amulet of Yendor."
 %Cp - 00049
 "Why search for the Amulet?  Thou wouldst but lose it, cretin."
 %E
+#
+#      Banishment message (for converted hero)
+#
+%Cc - 00060
+"You have betrayed all those who hold allegiance to %d, as you once did.
+My allegiance to %d holds fast and I cannot condone or accept what you 
+have done.
 
+Leave this place.  You shall never set foot at %H again.
+That which you seek is now lost forever, for without the Bell of Opening, 
+you will never be able to enter the place where he who has the Amulet 
+resides.
+
+Go now!  You are banished from this place.
+%E
 #
 #      TEST PATTERN
 #
index ffc3bda5fbf988c482c738ce065820c0273d70ab..f643d811b0e53ce4d0823043924567573ff0bf1d 100644 (file)
@@ -230,6 +230,8 @@ kicking a tree could produce 0 to 4 killer bees but it should have been 1 to 5
 mounting a steed allowed hero to make moves that would otherwise be disallowed
        including mounting diagonally in a shop doorway
 monsters lose intrinsic speed when pertrified
+if you have converted, the quest leader banishes you instead of asking you
+       to come back later, and tells you that you won't succeed without Bell
 
 
 Platform- and/or Interface-Specific Fixes
index 28ff0bf62bb859a64a68b4724d0ea8257cd81b1f..0b149c20fe2d1dd3761421364fd01c58861b2c4b 100644 (file)
@@ -106,6 +106,7 @@ struct      qtlists {
 #define QT_DEMONIC     30
 #define QTN_DEMONIC    20
 
+#define QT_BANISHED    60
 #endif /***** !MAKEDEFS *****/
 
 #endif /* QTEXT_H */
index 01d8bf7fd7bda5d4dd8d1f08a0a192cd2ee8e814..13597ac0993312ce41e2ddd3ab8a6a22409170dd 100644 (file)
@@ -16,7 +16,7 @@ STATIC_DCL void NDECL(on_start);
 STATIC_DCL void NDECL(on_locate);
 STATIC_DCL void NDECL(on_goal);
 STATIC_DCL boolean NDECL(not_capable);
-STATIC_DCL boolean FDECL(is_pure, (BOOLEAN_P));
+STATIC_DCL int FDECL(is_pure, (BOOLEAN_P));
 STATIC_DCL void FDECL(expulsion, (BOOLEAN_P));
 STATIC_DCL void NDECL(chat_with_leader);
 STATIC_DCL void NDECL(chat_with_nemesis);
@@ -96,7 +96,7 @@ boolean
 ok_to_quest()
 {
        return((boolean)((Qstat(got_quest) || Qstat(got_thanks)))
-                       && is_pure(FALSE));
+                       && (is_pure(FALSE) > 0));
 }
 
 STATIC_OVL boolean
@@ -105,10 +105,11 @@ not_capable()
        return((boolean)(u.ulevel < MIN_QUEST_LEVEL));
 }
 
-STATIC_OVL boolean
+STATIC_OVL int
 is_pure(talk)
 boolean talk;
 {
+    int purity;
     aligntyp original_alignment = u.ualignbase[A_ORIGINAL];
 
 #ifdef WIZARD
@@ -126,9 +127,11 @@ boolean talk;
        }
     }
 #endif
-    return (boolean)(u.ualign.record >= MIN_QUEST_ALIGN &&
-                    u.ualign.type == original_alignment &&
-                    u.ualignbase[A_CURRENT] == original_alignment);
+    purity = (u.ualign.record >= MIN_QUEST_ALIGN &&
+             u.ualign.type == original_alignment &&
+             u.ualignbase[A_CURRENT] == original_alignment) ?  1 :
+            (u.ualignbase[A_CURRENT] != original_alignment) ? -1 : 0;
+    return purity;
 }
 
 /*
@@ -245,7 +248,10 @@ chat_with_leader()
            qt_pager(QT_BADLEVEL);
            exercise(A_WIS, TRUE);
            expulsion(FALSE);
-         } else if(!is_pure(TRUE)) {
+         } else if(is_pure(TRUE) < 0) {
+           com_pager(QT_BANISHED);
+           expulsion(TRUE);
+         } else if(is_pure(TRUE) == 0) {
            qt_pager(QT_BADALIGN);
            if(Qstat(not_ready) == MAX_QUEST_TRIES) {
              qt_pager(QT_LASTLEADER);