Unlock your quest by killing your quest leader
Allow killing your quest leader, just to make games winnable if you converted before doing the quest. Boost the quest leaders and give them some equipment. King Arthur gets Excalibur. Killing quest leader gives really bad luck and makes your god angry at you, and killing quest guardians gives smaller penalties. This is based on both the EvilHack implementation by k21971 <keith.simpson1971@gmail.com>, and xNetHack implementation by copperwater <aosdict@gmail.com>.
This commit is contained in:
56
src/quest.c
56
src/quest.c
@@ -17,7 +17,7 @@ static void on_goal(void);
|
||||
static boolean not_capable(void);
|
||||
static int is_pure(boolean);
|
||||
static void expulsion(boolean);
|
||||
static void chat_with_leader(void);
|
||||
static void chat_with_leader(struct monst *);
|
||||
static void chat_with_nemesis(void);
|
||||
static void chat_with_guardian(void);
|
||||
static void prisoner_speaks(struct monst *);
|
||||
@@ -112,6 +112,15 @@ nemdead(void)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
leaddead(void)
|
||||
{
|
||||
if (!Qstat(killed_leader)) {
|
||||
Qstat(killed_leader) = TRUE;
|
||||
/* TODO: qt_pager("killed_leader"); ? */
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
artitouch(struct obj *obj)
|
||||
{
|
||||
@@ -130,8 +139,8 @@ artitouch(struct obj *obj)
|
||||
boolean
|
||||
ok_to_quest(void)
|
||||
{
|
||||
return (boolean) ((Qstat(got_quest) || Qstat(got_thanks))
|
||||
&& is_pure(FALSE) > 0);
|
||||
return (boolean) (((Qstat(got_quest) || Qstat(got_thanks))
|
||||
&& is_pure(FALSE) > 0) || Qstat(killed_leader));
|
||||
}
|
||||
|
||||
static boolean
|
||||
@@ -240,8 +249,11 @@ finish_quest(struct obj *obj) /* quest artifact; possibly null if carrying
|
||||
}
|
||||
|
||||
static void
|
||||
chat_with_leader(void)
|
||||
chat_with_leader(struct monst *mtmp)
|
||||
{
|
||||
if (!mtmp->mpeaceful || Qstat(pissed_off))
|
||||
return;
|
||||
|
||||
/* Rule 0: Cheater checks. */
|
||||
if (u.uhave.questart && !Qstat(met_nemesis))
|
||||
Qstat(cheater) = TRUE;
|
||||
@@ -293,18 +305,16 @@ chat_with_leader(void)
|
||||
exercise(A_WIS, TRUE);
|
||||
expulsion(FALSE);
|
||||
} else if ((purity = is_pure(TRUE)) < 0) {
|
||||
com_pager("banished");
|
||||
expulsion(TRUE);
|
||||
} else if (purity == 0) {
|
||||
qt_pager("badalign");
|
||||
if (Qstat(not_ready) == MAX_QUEST_TRIES) {
|
||||
qt_pager("leader_last");
|
||||
expulsion(TRUE);
|
||||
} else {
|
||||
Qstat(not_ready)++;
|
||||
exercise(A_WIS, TRUE);
|
||||
if (!Qstat(pissed_off)) {
|
||||
com_pager("banished");
|
||||
Qstat(pissed_off) = TRUE;
|
||||
expulsion(FALSE);
|
||||
}
|
||||
} else if (purity == 0) {
|
||||
qt_pager("badalign");
|
||||
Qstat(not_ready) = 1;
|
||||
exercise(A_WIS, TRUE);
|
||||
expulsion(FALSE);
|
||||
} else { /* You are worthy! */
|
||||
qt_pager("assignquest");
|
||||
exercise(A_WIS, TRUE);
|
||||
@@ -318,6 +328,12 @@ leader_speaks(struct monst *mtmp)
|
||||
{
|
||||
/* maybe you attacked leader? */
|
||||
if (!mtmp->mpeaceful) {
|
||||
if (!Qstat(pissed_off)) {
|
||||
/* again, don't end it permanently if the leader gets angry
|
||||
* since you're going to have to kill him to go questing... :)
|
||||
* ...but do only show this crap once. */
|
||||
qt_pager("leader_last");
|
||||
}
|
||||
Qstat(pissed_off) = TRUE;
|
||||
mtmp->mstrategy &= ~STRAT_WAITMASK; /* end the inaction */
|
||||
}
|
||||
@@ -326,11 +342,8 @@ leader_speaks(struct monst *mtmp)
|
||||
if (!on_level(&u.uz, &qstart_level))
|
||||
return;
|
||||
|
||||
if (Qstat(pissed_off)) {
|
||||
qt_pager("leader_last");
|
||||
expulsion(TRUE);
|
||||
} else
|
||||
chat_with_leader();
|
||||
if (!Qstat(pissed_off))
|
||||
chat_with_leader(mtmp);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -399,7 +412,10 @@ void
|
||||
quest_chat(struct monst *mtmp)
|
||||
{
|
||||
if (mtmp->m_id == Qstat(leader_m_id)) {
|
||||
chat_with_leader();
|
||||
chat_with_leader(mtmp);
|
||||
/* leader might have become pissed during the chat */
|
||||
if (Qstat(pissed_off))
|
||||
setmangry(mtmp, FALSE);
|
||||
return;
|
||||
}
|
||||
switch (mtmp->data->msound) {
|
||||
|
||||
Reference in New Issue
Block a user