Add missing requirement to Infighting.
[heroik.git] / scenarios.js
index 2b24e6f..12bfa3e 100644 (file)
@@ -151,7 +151,7 @@ var EVENTS = [
       unique: true },
     { name: "Infighting.",
       effect: "Greenskins have <strong>Undead&nbsp;+1</strong>, <strong>Demons&nbsp;-1</strong>. Demons have <strong>Greenskins&nbsp;+1</strong>, <strong>Undead&nbsp;-1</strong>. Undead have <strong>Demons&nbsp;+1</strong>, <strong>Greenskins&nbsp;-1</strong>.",
-      requires: ["noncanonical"],
+      requires: ["noncanonical", "demons", "undead"],
       unique: true },
     { name: "New moon.",
       effect: "Demons have <strong>Veil of Shadow</strong>.",
@@ -182,11 +182,15 @@ var EVENTS = [
 var NOP = [
     { name: "Nothing happens." },
     { name: "A draft blows down the hallway.",
-      requires: ["noncanonical"] },
+      unique: true, requires: ["noncanonical"] },
     { name: "You sneeze.",
-      requires: ["noncanonical"] },
+      unique: true, requires: ["noncanonical"] },
     { name: "There's a skittering in the distance.",
-      requires: ["noncanonical"] },
+      unique: true,  requires: ["noncanonical"] },
+    { name: "The torch flickers.",
+      unique: true, requires: ["noncanonical"] },
+    { name: "Shadows dance across the walls.",
+      unique: true, requires: ["noncanonical"] },
 ];
 
 var HELPFUL = [
@@ -223,7 +227,7 @@ function generate (flags, events, nop) {
     function canStillHappen (event) {
         return issubset(event.requires || [], flags)
             && !(event.unique && contains.call(chosen, event))
-            && !intersects(event.lock || [], locks);
+            && !(event.lock && intersects(event.lock || [], locks));
     }
 
     for (i = 0; i < events; ++i) {