diff --git a/include/patchlevel.h b/include/patchlevel.h index 339095f25..4992b7f3a 100644 --- a/include/patchlevel.h +++ b/include/patchlevel.h @@ -17,7 +17,7 @@ * Incrementing EDITLEVEL can be used to force invalidation of old bones * and save files. */ -#define EDITLEVEL 126 +#define EDITLEVEL 127 /* * Development status possibilities. diff --git a/include/you.h b/include/you.h index 2683eec8f..bbd679d8f 100644 --- a/include/you.h +++ b/include/you.h @@ -52,6 +52,9 @@ struct u_event { Bitfield(udemigod, 1); /* killed the wiz */ Bitfield(uvibrated, 1); /* stepped on "vibrating square" */ Bitfield(ascended, 1); /* has offered the Amulet */ + + Bitfield(amulet_wish, 1); /* has gained a wish from the Amulet */ + /* 7 free bits */ }; /* diff --git a/src/allmain.c b/src/allmain.c index 5620e1eac..d80e50a78 100644 --- a/src/allmain.c +++ b/src/allmain.c @@ -428,6 +428,13 @@ moveloop_core(void) /****************************************/ clear_splitobjs(); + + /* the Amulet of Yendor gives a wish when initially picked up */ + if (u.uhave.amulet && !u.uevent.amulet_wish) { + u.uevent.amulet_wish = 1; + makewish(); + } + find_ac(); if (!svc.context.mv || Blind) { /* redo monsters if hallu or wearing a helm of telepathy */ diff --git a/src/u_init.c b/src/u_init.c index 1d0913f80..e4d60dd62 100644 --- a/src/u_init.c +++ b/src/u_init.c @@ -963,6 +963,7 @@ u_init(void) u.uevent.uheard_tune = 0; u.uevent.uopened_dbridge = 0; u.uevent.udemigod = 0; /* not a demi-god yet... */ + u.uevent.amulet_wish = 0; u.udg_cnt = 0; u.mh = u.mhmax = u.mtimedone = 0; u.uz.dnum = u.uz0.dnum = 0;