From: arromdee Date: Mon, 24 Mar 2003 02:02:08 +0000 (+0000) Subject: statue gender X-Git-Tag: MOVE2GIT~2058 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b7fea371b6c35129350af908f489d0fdc711a9b7;p=nethack statue gender Reported on the newsgroup (a few weeks ago in the middle of a post about something else): someone turned Perseus to flesh and found out he was female. --- diff --git a/dat/medusa.des b/dat/medusa.des index 879868faa..6134470e2 100644 --- a/dat/medusa.des +++ b/dat/medusa.des @@ -53,7 +53,7 @@ BRANCH:levregion(01,00,79,20),(30,06,46,13) # Non diggable walls NON_DIGGABLE:(30,06,46,13) # Objects -CONTAINER:'`',"statue",(36,10),uncursed,"knight",1,"Perseus" +CONTAINER:'`',"statue",(36,10),uncursed,"knight",3,"Perseus" OBJECT[75%]:'[',"shield of reflection",contained,cursed,+0 OBJECT[25%]:'[',"levitation boots",contained,random,+0 OBJECT[50%]:')',"scimitar",contained,blessed,+2 @@ -151,7 +151,7 @@ BRANCH:levregion(01,00,79,20),(59,01,73,17) NON_DIGGABLE:(01,02,06,17) NON_DIGGABLE:(60,02,73,17) # Objects -CONTAINER:'`',"statue",(68,10),uncursed,"knight",1,"Perseus" +CONTAINER:'`',"statue",(68,10),uncursed,"knight",3,"Perseus" OBJECT[25%]:'[',"shield of reflection",contained,cursed,+0 OBJECT[75%]:'[',"levitation boots",contained,random,+0 OBJECT[50%]:')',"scimitar",contained,blessed,+2 diff --git a/doc/fixes34.2 b/doc/fixes34.2 index af903f3fc..d0f33b3ec 100644 --- a/doc/fixes34.2 +++ b/doc/fixes34.2 @@ -23,6 +23,7 @@ putting gold in a container on the shop floor wasn't credited the way avoid integer division rounding error when calculating carrying capacity don't lock/unlock a door while in a pit, to be consistent with door opening infravision should not make invisible player "visible" (it doesn't for monsters) +Perseus statue should always be male Platform- and/or Interface-Specific Fixes diff --git a/include/obj.h b/include/obj.h index 108843176..6b3f5798f 100644 --- a/include/obj.h +++ b/include/obj.h @@ -33,7 +33,11 @@ struct obj { marks your eggs, spinach tins royal coffers for a court ( == 2) tells which fruit a fruit is - special for uball and amulet %% BAH */ + special for uball and amulet + historic and gender for statues */ +#define STATUE_HISTORIC 0x01 +#define STATUE_MALE 0x02 +#define STATUE_FEMALE 0x04 char oclass; /* object class */ char invlet; /* designation in inventory */ char oartifact; /* artifact array index */ diff --git a/src/objnam.c b/src/objnam.c index cb34b45c1..ef7de0f0b 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -367,7 +367,7 @@ register struct obj *obj; case ROCK_CLASS: if (typ == STATUE) Sprintf(buf, "%s%s of %s%s", - (Role_if(PM_ARCHEOLOGIST) && obj->spe) ? "historic " : "" , + (Role_if(PM_ARCHEOLOGIST) && (obj->spe & STATUE_HISTORIC)) ? "historic " : "" , actualn, type_is_pname(&mons[obj->corpsenm]) ? "" : (mons[obj->corpsenm].geno & G_UNIQ) ? "the " : @@ -2507,7 +2507,7 @@ typfnd: case STATUE: otmp->corpsenm = mntmp; if (Has_contents(otmp) && verysmall(&mons[mntmp])) delete_contents(otmp); /* no spellbook */ - otmp->spe = ishistoric; + otmp->spe = ishistoric ? STATUE_HISTORIC : 0; break; case SCALE_MAIL: /* Dragon mail - depends on the order of objects */ diff --git a/src/trap.c b/src/trap.c index 0f9580143..9c55a4ac8 100644 --- a/src/trap.c +++ b/src/trap.c @@ -409,7 +409,7 @@ int *fail_reason; struct monst *mon = 0; struct obj *item; coord cc; - boolean historic = (Role_if(PM_ARCHEOLOGIST) && !flags.mon_moving && statue->spe); + boolean historic = (Role_if(PM_ARCHEOLOGIST) && !flags.mon_moving && (statue->spe & STATUE_HISTORIC)); if (statue->oxlth && statue->oattached == OATTACHED_MONST) { cc.x = x, cc.y = y; @@ -440,6 +440,11 @@ int *fail_reason; return (struct monst *)0; } + /* allow statues to be of a specific gender */ + if (statue->spe & STATUE_MALE) + mon->female = FALSE; + else if (statue->spe & STATUE_FEMALE) + mon->female = TRUE; /* if statue has been named, give same name to the monster */ if (statue->onamelth) mon = christen_monst(mon, ONAME(statue)); diff --git a/src/zap.c b/src/zap.c index 5522a6ad6..23e992f21 100644 --- a/src/zap.c +++ b/src/zap.c @@ -3755,7 +3755,7 @@ register struct obj *obj; obj_extract_self(item); place_object(item, obj->ox, obj->oy); } - if (Role_if(PM_ARCHEOLOGIST) && !flags.mon_moving && obj->spe) { + if (Role_if(PM_ARCHEOLOGIST) && !flags.mon_moving && (obj->spe & STATUE_HISTORIC)) { You_feel("guilty about damaging such a historic statue."); adjalign(-1); }