From 5a84dd8369d9d687616637e6a789b270c2452278 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Fri, 3 Dec 2021 20:17:15 -0300 Subject: Initial prototype of the Ambush Puzzle. --- npc/annuals/xmas/2021.txt | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'npc/annuals') diff --git a/npc/annuals/xmas/2021.txt b/npc/annuals/xmas/2021.txt index 97f5422f..1c5507fc 100644 --- a/npc/annuals/xmas/2021.txt +++ b/npc/annuals/xmas/2021.txt @@ -105,6 +105,20 @@ function script X21_SEEDS { return; } +function script X21SRLZ { + .@n=getarg(0); + switch (.@n) { + case 1: return l("first"); + case 2: return l("second"); + case 3: return l("third"); + case 4: return l("fourth"); + case 5: return l("fifth"); + case 6: return l("sixth"); + case 7: return l("seventh"); + } + return str(.@n); +} + function script X21QUESTON { // Create and setup the challenge. Allow to reset quest. XMAS2021 = X21_ACCEPTED; @@ -424,6 +438,20 @@ OnInstanceInit: 'COLORCODE[4] = rand2(0, 2); 'COLORCODE[5] = rand2(0, 2); 'OBSCURECOLOR = any(0, 1); + + /* Prepare the Ambush Chamber */ + 'AMBUSHTRI[0] = rand2(1, 17); + do + { + 'AMBUSHTRI[1] = rand2(1, 17); + } while ('AMBUSHTRI[1] == 'AMBUSHTRI[0]); + do + { + 'AMBUSHTRI[2] = rand2(1, 17); + } while ('AMBUSHTRI[2] == 'AMBUSHTRI[0] || 'AMBUSHTRI[2] == 'AMBUSHTRI[1]); + 'AMBUSH_BMASK = 0; + + /* Prepare the Enigma */ 'TRUES=0; 'TRUTHSTAT[0]=any(false, true); if ('TRUTHSTAT[0]) -- cgit v1.2.3-60-g2f50