diff -ruN nethack-3.4.3.orig/include/you.h nethack-3.4.3/include/you.h --- nethack-3.4.3.orig/include/you.h Sun Dec 7 18:39:13 2003 +++ nethack-3.4.3/include/you.h Mon Mar 6 13:29:45 2006 @@ -303,7 +303,7 @@ Bitfield(uinvulnerable,1); /* you're invulnerable (praying) */ Bitfield(uburied,1); /* you're buried */ Bitfield(uedibility,1); /* blessed food detection; sense unsafe food */ - /* 1 free bit! */ + Bitfield(customtitle,1); /* currently have a custom title */ unsigned udg_cnt; /* how long you have been demigod */ struct u_event uevent; /* certain events have happened */ @@ -360,6 +360,7 @@ xchar skill_record[P_SKILL_LIMIT]; /* skill advancements */ struct skills weapon_skills[P_NUM_SKILLS]; boolean twoweap; /* KMH -- Using two-weapon combat */ + char title[20]; }; /* end of `struct you' */ diff -ruN nethack-3.4.3.orig/src/botl.c nethack-3.4.3/src/botl.c --- nethack-3.4.3.orig/src/botl.c Sun Dec 7 18:39:13 2003 +++ nethack-3.4.3/src/botl.c Mon Mar 6 14:39:00 2006 @@ -71,6 +71,8 @@ register struct Role *role; register int i; + if (u.customtitle) + return (u.title); /* Find the role */ for (role = (struct Role *) roles; role->name.m; role++) diff -ruN nethack-3.4.3.orig/src/do_wear.c nethack-3.4.3/src/do_wear.c --- nethack-3.4.3.orig/src/do_wear.c Sun Dec 7 18:39:13 2003 +++ nethack-3.4.3/src/do_wear.c Mon Mar 6 21:16:56 2006 @@ -33,6 +33,18 @@ c_axe[] = "axe", c_that_[] = "that"; +char *amulet_insults[] = { "insult 1", + "insult 2", + "insult 3", + "insult 4", + "insult 5" }; + +char *amulet_compliments[] = { "compliment 1", + "compliment 2", + "compliment 3", + "compliment 4", + "compliment 5" }; + static NEARDATA const long takeoff_order[] = { WORN_BLINDF, W_WEP, WORN_SHIELD, WORN_GLOVES, LEFT_RING, RIGHT_RING, WORN_CLOAK, WORN_HELMET, WORN_AMUL, WORN_ARMOR, @@ -625,6 +637,27 @@ break; case AMULET_OF_YENDOR: break; + case AMULET_OF_CHANGE_TITLE: + // Always use one more than the number of insults/compliments. + if (uamul->cursed) + strncpy(u.title, amulet_insults[rn2(5)], sizeof(u.title)); + else if (uamul->blessed) + strncpy(u.title, amulet_compliments[rn2(5)], sizeof(u.title)); + else { + int x = rn2(2); // 0 == Insults; 1 == Compliments + if (x) + strncpy(u.title, amulet_compliments[rn2(5)], sizeof(u.title)); + else + strncpy(u.title, amulet_insults[rn2(5)], sizeof(u.title)); + } + You("are now known as %s the %s.", plname, u.title); + u.customtitle = 1; + flags.botl = 1; + + makeknown(AMULET_OF_CHANGE_TITLE); + pline_The("amulet disintegrates!"); + useup(uamul); + break; } } @@ -671,6 +704,12 @@ HSleeping = 0; return; case AMULET_OF_YENDOR: + break; + case AMULET_OF_CHANGE_TITLE: + /* + * This probably isn't necessary as the amulet + * _should_ disintegrate after being put on. + */ break; } setworn((struct obj *)0, W_AMUL); diff -ruN nethack-3.4.3.orig/src/objects.c nethack-3.4.3/src/objects.c --- nethack-3.4.3.orig/src/objects.c Sun Dec 7 18:39:13 2003 +++ nethack-3.4.3/src/objects.c Mon Mar 6 12:40:42 2006 @@ -542,12 +542,13 @@ OBJ(name,desc), BITS(0,0,0,0,1,0,0,0,0,0,0,P_NONE,IRON), power, \ AMULET_CLASS, prob, 0, 20, 150, 0, 0, 0, 0, 20, HI_METAL ) -AMULET("amulet of ESP", "circular", TELEPAT, 175), +AMULET("amulet of ESP", "circular", TELEPAT, 165), AMULET("amulet of life saving", "spherical", LIFESAVED, 75), AMULET("amulet of strangulation", "oval", STRANGLED, 135), AMULET("amulet of restful sleep", "triangular", SLEEPING, 135), -AMULET("amulet versus poison", "pyramidal", POISON_RES, 165), -AMULET("amulet of change", "square", 0, 130), +AMULET("amulet versus poison", "pyramidal", POISON_RES, 145), +AMULET("amulet of change title", "rectangular",0, 40), +AMULET("amulet of change", "square", 0, 120), /* POLYMORPH */ AMULET("amulet of unchanging", "concave", UNCHANGING, 45), AMULET("amulet of reflection", "hexagonal", REFLECTING, 75),