Don't generate rings or randarts with *TELE in Sprint.
authorAdam Borowski <kilobyte@angband.pl>
Wed, 15 Aug 2012 19:57:21 +0000 (21:57 +0200)
committerAdam Borowski <kilobyte@angband.pl>
Wed, 15 Aug 2012 20:00:59 +0000 (22:00 +0200)
They just cause unnecessary spam.  Scrolls of teleportation already get skipped.

crawl-ref/source/artefact.cc
crawl-ref/source/makeitem.cc

index a4851e7..edcbd42 100644 (file)
@@ -1024,7 +1024,7 @@ static void _get_randart_properties(const item_def &item,
             proprt[ARTP_PREVENT_SPELLCASTING] = 1;
             break;
         case 2:                     // random teleport
-            if (aclass != OBJ_WEAPONS)
+            if (aclass != OBJ_WEAPONS || crawl_state.game_is_sprint())
                 break;
             proprt[ARTP_CAUSE_TELEPORTATION] = 5 + random2(15);
             break;
index daf9d63..ad70559 100644 (file)
@@ -3397,7 +3397,10 @@ jewellery_type get_random_amulet_type()
 
 static jewellery_type _get_raw_random_ring_type()
 {
-    return (jewellery_type) (RING_REGENERATION + random2(NUM_RINGS));
+    jewellery_type ring;
+    do ring = (jewellery_type)(RING_REGENERATION + random2(NUM_RINGS));
+        while (ring == RING_TELEPORTATION && crawl_state.game_is_sprint());
+    return ring;
 }
 
 jewellery_type get_random_ring_type()