1
0
Fork 0
mirror of https://codeberg.org/noisytoot/notnotdnethack.git synced 2025-07-28 16:32:27 +01:00

Add handling for Bokrug astral

1)Perform the ritual of detestation on all three high altars (potentially absorbing 3 lightning bolts and 3 disintegration beams in the process),
2)fight off the resulting minions,
3)return to the starting area and offer the amulet at Bokrug's Idol.

Does not require you to have completed the first stage of the ritual, but does require that you didn't crown under one of the gods.
This commit is contained in:
ChrisANG 2022-01-09 20:06:57 -05:00
parent bba6d587c5
commit e04f574e2b
6 changed files with 118 additions and 25 deletions

View file

@ -536,27 +536,27 @@ MESSAGE: "Here the High Temples of the aligned gods are located."
MESSAGE: "You sense alarm, hostility, and excitement in the air!"
GEOMETRY:center,center
MAP
---------------
|AAAAAAAAAAAAA|
|AA---------AA|
|AA|AAAAAAA|AA|
--------------- |AA|A.....A|AA| ---------------
|AAAAAAAAAAAAA| |AA|A.....A|AA| |AAAAAAAAAAAAA|
|AA---------AA-| |-------| |AA|A.....A|AA| |-------| |-AA---------AA|
|AA|AAAAAAA|AAA-| |-AAAAAAA-| |AA|AAA.AAA|AA| |-AAAAAAA-| |-AAA|AAAAAAA|AA|
|AA|A.....A|AAAA-|-AAAA.AAAA-||AA----+----AA||-AAAA.AAAA-|-AAAA|A.....A|AA|
|AA|A......+AAAAA+AAAA...AAAA||AAAAAAAAAAAAA||AAAA...AAAA+AAAAA+......A|AA|
|AA|A.....A|AAAA-|-AAAA.AAAA-|--|AAAAAAAAA|--|-AAAA.AAAA-|-AAAA|A.....A|AA|
|AA|AAAAAAA|AAA-| |-AAAAAAA-| -|---+---|- |-AAAAAAA-| |-AAA|AAAAAAA|AA|
|AA---------AA-| |---+---| |-AAAAAAA-| |---+---| |-AA---------AA|
|AAAAAAAAAAAAA| |AAA|-----|-AAAA.AAAA-|-----|AAA| |AAAAAAAAAAAAA|
--------------- |.AAAAAAAA|AAAA...AAAA|AAAAAAAA.| ---------------
-------AAA|-AAAA.AAAA-|AAA-------
|.AAA|-AAAAAAA-|AAA.|
---AAA|---+---|AAA---
|AAAAAAAAAAAAAAA|
--.AAAAAAAAAAA.--
---------------
0 ---------------
1 |AAAAAAAAAAAAA|
2 |AA---------AA|
3 |AA|AAAAAAA|AA|
4--------------- |AA|A.....A|AA| ---------------
5|AAAAAAAAAAAAA| |AA|A.....A|AA| |AAAAAAAAAAAAA|
6|AA---------AA-| |-------| |AA|A.....A|AA| |-------| |-AA---------AA|
7|AA|AAAAAAA|AAA-| |-AAAAAAA-| |AA|AAA.AAA|AA| |-AAAAAAA-| |-AAA|AAAAAAA|AA|
8|AA|A.....A|AAAA-|-AAAA.AAAA-||AA----+----AA||-AAAA.AAAA-|-AAAA|A.....A|AA|
9|AA|A......+AAAAA+AAAA...AAAA||AAAAAAAAAAAAA||AAAA...AAAA+AAAAA+......A|AA|
0|AA|A.....A|AAAA-|-AAAA.AAAA-|--|AAAAAAAAA|--|-AAAA.AAAA-|-AAAA|A.....A|AA|
1|AA|AAAAAAA|AAA-| |-AAAAAAA-| -|---+---|- |-AAAAAAA-| |-AAA|AAAAAAA|AA|
2|AA---------AA-| |---+---| |-AAAAAAA-| |---+---| |-AA---------AA|
3|AAAAAAAAAAAAA| |AAA|-----|-AAAA.AAAA-|-----|AAA| |AAAAAAAAAAAAA|
4--------------- |.AAAAAAAA|AAAA...AAAA|AAAAAAAA.| ---------------
5 -------AAA|-AAAA.AAAA-|AAA-------
6 |.AAA|-AAAAAAA-|AAA.|
7 ---AAA|---+---|AAA---
8 |AAAAAAAAAAAAAAA|
9 --.AAAAAAAAAAA.--
0 ---------------
ENDMAP
# Rider locations
RANDOM_PLACES:(23,9),(37,14),(51,9)

View file

@ -63,4 +63,9 @@ typedef struct align { /* alignment & record */
(x)==A_CHAOTIC ? RITUAL_CHAOS :\
0\
)
#define Align2hiritual(x) ( (x)==A_LAWFUL ? RITUAL_HI_LAW :\
(x)==A_NEUTRAL ? RITUAL_HI_NEUTRAL :\
(x)==A_CHAOTIC ? RITUAL_HI_CHAOS :\
0\
)
#endif /* ALIGN_H */

View file

@ -2266,7 +2266,9 @@ E const char *FDECL(gtitle, (ALIGNTYP_P));
E void FDECL(altar_wrath, (int,int));
E int FDECL(candle_on_altar, (struct obj *));
E void FDECL(goat_eat, (struct obj *, int));
E void FDECL(bokrug_offer, (struct obj *));
E boolean FDECL(goat_mouth_at, (int, int));
E boolean FDECL(bokrug_idol_at, (int, int));
E void NDECL(init_gods);
E void FDECL(save_gods, (int));
E void FDECL(restore_gods, (int));

View file

@ -390,7 +390,7 @@ NEARDATA extern coord bhitpos; /* place where throw or zap hits or stops */
#define a_shrine(x,y) (altars[levl[x][y].altar_num].shrine)
#define ugod_is_angry() (u.ualign.record < 0)
#define on_altar() (IS_ALTAR(levl[u.ux][u.uy].typ) || goat_mouth_at(u.ux, u.uy))
#define on_altar() (IS_ALTAR(levl[u.ux][u.uy].typ) || goat_mouth_at(u.ux, u.uy) || bokrug_idol_at(u.ux, u.uy))
#define on_shrine() (IS_ALTAR(levl[u.ux][u.uy].typ) && altars[levl[u.ux][u.uy].altar_num].shrine)
/* */

View file

@ -8902,7 +8902,52 @@ arti_invoke(obj)
pline("What were you going to do with it?");
}
else {
You("need to find another altar.");
if((u.detestation_ritual&RITUAL_DONE) != RITUAL_DONE)
You("need to find another altar.");
else if(!(u.detestation_ritual&HI_RITUAL_DONE))
You("need to find some more powerful altars.");
else if((u.detestation_ritual&HI_RITUAL_DONE) != HI_RITUAL_DONE)
You("need to find another high altar.");
// else nothing
}
}
else if(!Is_astralevel(&u.uz) && (u.detestation_ritual&RITUAL_DONE) == RITUAL_DONE){
pline("The ritual has run its course here on the material plane. You need to find some more powerful altars!");
}
else if(Is_astralevel(&u.uz)){
//Make sure madman astral always has these three if the player is aligned to Bokrug
int dreamgods[] = {GOD_ZO_KALAR, GOD_TAMASH, GOD_LOBON};
int godnum = altars[levl[u.ux][u.uy].altar_num].god;
int altaralign = a_align(u.ux,u.uy);
You("perform a rite in detestation of %s!", godname(godnum));
change_luck(-7);
for(int i = 0; i < 3; i++){
godlist[dreamgods[i]].anger += 3;
summon_god_minion(dreamgods[i], FALSE);
summon_god_minion(dreamgods[i], FALSE);
summon_god_minion(dreamgods[i], FALSE);
}
gods_upset(godnum);
pline("The high altar sinks into swampy water!");
levl[u.ux][u.uy].typ = PUDDLE;
levl[u.ux][u.uy].flags = 0;
newsym(u.ux, u.uy);
u.detestation_ritual |= RITUAL_STARTED;
u.detestation_ritual |= Align2hiritual(altaralign);
if((u.detestation_ritual&HI_RITUAL_DONE) == HI_RITUAL_DONE){
struct obj *statue = mksartifact(ART_IDOL_OF_BOKRUG__THE_WATER_);
statue->oerodeproof = TRUE;
statue->spe = 1;
place_object(statue, 37+rn2(7), 19+rn2(2));
You_hear("water bubbling.");
int i, j;
for(i = 0; i < COLNO; i++){
for(j = 0; j < ROWNO; j++){
if(isok(i,j) && levl[i][j].typ == AIR)
levl[i][j].typ = PUDDLE;
}
}
doredraw();
}
}
else {
@ -8949,10 +8994,10 @@ arti_invoke(obj)
godlist[GOD_ZO_KALAR].anger++;
godlist[GOD_TAMASH].anger++;
godlist[GOD_LOBON].anger++;
gods_upset(godnum);
if(u.ulevel > 20) summon_god_minion(godnum, FALSE);
if(u.ulevel >= 14) summon_god_minion(godnum, FALSE);
(void) summon_god_minion(godnum, TRUE);
(void) summon_god_minion(godnum, FALSE);
gods_upset(godnum);
angry_priest();
if(in_town(u.ux, u.uy))
(void) angry_guards(FALSE);

View file

@ -1847,6 +1847,10 @@ dosacrifice()
goat_eat(otmp, GOAT_EAT_OFFERED);
return 1;
}
if(bokrug_idol_at(u.ux, u.uy)){
bokrug_offer(otmp);
return 1;
}
if(Role_if(PM_ANACHRONONAUT) && otmp->otyp != AMULET_OF_YENDOR && flags.questprogress!=2){
You("do not give offerings to the God of the future.");
@ -3354,6 +3358,43 @@ int x, y;
return FALSE;
}
boolean
bokrug_idol_at(x, y)
int x, y;
{
struct obj *otmp;
for (otmp = level.objects[x][y]; otmp; otmp = otmp->nexthere) {
if (otmp->oartifact == ART_IDOL_OF_BOKRUG__THE_WATER_)
return TRUE;
}
return FALSE;
}
void
bokrug_offer(otmp)
struct obj *otmp;
{
if(otmp->otyp == AMULET_OF_YENDOR){
/* The final Test. Did you win? */
if(uamul == otmp) Amulet_off();
u.uevent.ascended = 1;
if(carried(otmp)) useup(otmp); /* well, it's gone now */
else useupf(otmp, 1L);
You("offer the Amulet of Yendor to Bokrug...");
adjalign(10);
#ifdef RECORD_ACHIEVE
achieve.ascended = 1;
give_ascension_trophy();
#endif
You("sink into cool lake water...");
You("don't drown. You have achieved the status of Demigod%s!",
flags.female ? "dess" : "");
done(ASCENDED);
}
//else
pline1(nothing_happens);
}
void
goat_eat(otmp, eatflag)
struct obj *otmp;