]> granicus.if.org Git - nethack/commitdiff
statue gender
authorarromdee <arromdee>
Mon, 24 Mar 2003 02:02:08 +0000 (02:02 +0000)
committerarromdee <arromdee>
Mon, 24 Mar 2003 02:02:08 +0000 (02:02 +0000)
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.

dat/medusa.des
doc/fixes34.2
include/obj.h
src/objnam.c
src/trap.c
src/zap.c

index 879868faa6a13ea412185f142ff5e75912d4a39e..6134470e2c9d2a5f2fc57ac83f17d7b86d065406 100644 (file)
@@ -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
index af903f3fc821cdfa15736b01710072139b604818..d0f33b3ec500adc026888bfa6fc6f683c587077c 100644 (file)
@@ -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
index 10884317622f9b64e29826b7abda841628b3cb38..6b3f5798fad8c6a9fd0418c093d4497d301ad8de 100644 (file)
@@ -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 */
index cb34b45c1f532ae6c4deecb955370b01240a22b7..ef7de0f0b3264bf605235c2950f5c7f7c7fde422 100644 (file)
@@ -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 */
index 0f9580143bd73f06b2bc601a5e6a9334a18e41bf..9c55a4ac81a00a0f8168d36ac926dad94f650c1c 100644 (file)
@@ -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));
index 5522a6ad62c85594af4d0ccdc2b1ec89676d1275..23e992f21aaa6aaab4f516e93b2f432f0c61621a 100644 (file)
--- 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);
        }