]> granicus.if.org Git - nethack/commitdiff
Merge branch 'master' of https://rodney.nethack.org:20040/git/NHsource into paxed...
authorPasi Kallinen <paxed@alt.org>
Tue, 24 Mar 2015 17:46:38 +0000 (19:46 +0200)
committerPasi Kallinen <paxed@alt.org>
Tue, 24 Mar 2015 17:46:38 +0000 (19:46 +0200)
Conflicts:
doc/fixes35.0
include/extern.h
include/ntconf.h
include/obj.h
include/patchlevel.h
src/dig.c
src/do.c
src/files.c
src/fountain.c
src/mklev.c
src/objnam.c
src/options.c
src/potion.c
src/rumors.c
src/save.c
src/topten.c
src/trap.c
src/wield.c
sys/share/pcmain.c
sys/unix/unixmain.c
sys/winnt/Makefile.msc
util/lev_main.c
util/makedefs.c

1  2 
include/extern.h
src/hacklib.c
src/mon.c
src/sp_lev.c
src/trap.c
util/lev_main.c

Simple merge
diff --cc src/hacklib.c
Simple merge
diff --cc src/mon.c
Simple merge
diff --cc src/sp_lev.c
index 46334a4ab15dec568833d34906ebd4ac7e438cf4,c495d5c997628b0a17951f690e345bca9f71a815..8278a344bc1d8a31e8394c24791ba98c0eededd7
@@@ -1614,45 -1042,80 +1614,57 @@@ struct mkroom        *croom
             * resistant (if they were, we'd have to reset the name as well as
             * setting corpsenm).
             */
 -          for (wastyp = otmp->corpsenm; ; wastyp = rndmonnum()) {
 +          for (wastyp = otmp->corpsenm; i < 1000 ; i++, wastyp = rndmonnum()) {
                /* makemon without rndmonst() might create a group */
                was = makemon(&mons[wastyp], 0, 0, MM_NOCOUNTBIRTH);
 -              if (!resists_ston(was)) {
 +              if (was) {
 +                  if (!resists_ston(was)) {
                        (void) propagate(wastyp, TRUE, FALSE);
                        break;
 +                  }
 +                  mongone(was);
 +                  was = NULL;
                }
 -              mongone(was);
            }
 -          set_corpsenm(otmp, wastyp);
 -          while(was->minvent) {
 -              obj = was->minvent;
 -              obj->owornmask = 0;
 -              obj_extract_self(obj);
 -              (void) add_to_container(otmp, obj);
 +          if (was) {
 +              set_corpsenm(otmp, wastyp);
 +              while(was->minvent) {
 +                  obj = was->minvent;
 +                  obj->owornmask = 0;
 +                  obj_extract_self(obj);
 +                  (void) add_to_container(otmp, obj);
 +              }
 +              otmp->owt = weight(otmp);
 +              mongone(was);
            }
 -          otmp->owt = weight(otmp);
 -          mongone(was);
        }
  
+       /* Nasty hack here: try to determine if this is the Mines or Sokoban
+        * "prize" and then set record_achieve_special (maps to corpsenm)
+        * for the object.  That field will later be checked to find out if
+        * the player obtained the prize. */
+       if(otmp->otyp == LUCKSTONE && Is_mineend_level(&u.uz)) {
+           otmp->record_achieve_special = 1;
+       } else if((otmp->otyp == AMULET_OF_REFLECTION ||
+                  otmp->otyp == BAG_OF_HOLDING) &&
+                       Is_sokoend_level(&u.uz)) {
+           otmp->record_achieve_special = 1;
+         }
        stackobj(otmp);
  
 -    }         /* if (rn2(100) < o->chance) */
 - o_done:
 -    Free(o->name.str);
 -}
 -
 -/*
 - * Randomly place a specific engraving, then release its memory.
 - */
 -STATIC_OVL void
 -create_engraving(e, croom)
 -engraving *e;
 -struct mkroom *croom;
 -{
 -      xchar x, y;
 -
 -      x = e->x,  y = e->y;
 -      if (croom)
 -          get_room_loc(&x, &y, croom);
 -      else
 -          get_location(&x, &y, DRY);
 -
 -      make_engr_at(x, y, e->engr.str, 0L, e->etype);
 -      free((genericptr_t) e->engr.str);
 -}
 -
 -/*
 - * Create stairs in a room.
 - *
 - */
 +      if (o->lit) {
 +          begin_burn(otmp, FALSE);
 +      }
  
 -STATIC_OVL void
 -create_stairs(s,croom)
 -stair *s;
 -struct mkroom *croom;
 -{
 -      schar           x,y;
 +      if (o->buried) {
 +          boolean dealloced;
 +          (void) bury_an_obj(otmp, &dealloced);
 +          if (dealloced && container_idx) {
 +              container_obj[container_idx-1] = NULL;
 +          }
 +      }
  
 -      x = s->x; y = s->y;
 -      get_free_room_loc(&x, &y, croom);
 -      mkstairs(x,y,(char)s->up, croom);
  }
  
  /*
diff --cc src/trap.c
index 8fa07cbe44f3cebbf45e471f119f6d39ff92fc5a,a0c6fa1b1d4d66372eda8bdfc29f056b8978635a..60022b95509e49f56b88cd3f83bbab9686fe26fb
@@@ -3157,7 -3165,7 +3165,8 @@@ struct obj *obj
  const char *ostr;
  boolean force;
  {
 +      boolean exploded = FALSE;
+       if (!obj) return ER_NOTHING;
  
          if (snuff_lit(obj))
              return ER_DAMAGED;
diff --cc util/lev_main.c
Simple merge