-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain-en.strand
3848 lines (3605 loc) · 127 KB
/
main-en.strand
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
::start
// some info for if you want to mod it:
//
// basic syntax examples:
// ::passage title
// [[basic link]]
// [[link with different label>passage title]]
// [[link with different action|this.something=true;this.goto('passage title');]]
// <<if this.something>><<elseif this.somethingElse>><<endif>>
// <<do this.something=true;>>
// <<print this.something>>
// >passage break
//
// js examples:
// this.goto('passage')
// this.show('texture', { duration, x, y, scale, animate, freq })
// this.scrim(amount, duration)
// this.tween(object, 'property', to, duration, from, ease)
// this.gameObject - npc/interrupt that triggered the dialog
// this.scene - game scene
// this.voice - audio to play as letters tick in
// this.ease - easing functions
//
// game object stuff:
// this.Area(name, [objects])
// this.Npc({ passage, x, y )
// this.Goto({ area, x, y }, { x, y, width, height })
// this.Prop({ texture, x, y, alpha, scale, flip, blur, animate, offset })
// this.PropParallax({ texture, alpha, scale, flip, blur, mult, animate, offset }),
// this.Block({ x, y, width, height, type, radius })
// this.Poly({ x, y, width, verts })
// this.Interrupt({ passage, x, y, width, height })
<<if !this.started>>
<<do
// save location on refresh when debugging
if (this.debug && !window.debugUnload) {
window.debugUnload = true;
window.addEventListener('beforeunload', () => {
// if (window.scene.strand.cleared) return;
// window.scene.strand.savestate.area = window.scene.strand.scene.area;
// window.scene.strand.savestate.x = window.scene.strand.scene.player.transform.x;
// window.scene.strand.savestate.y = window.scene.strand.scene.player.transform.y;
// window.scene.strand.save();
});
}
// middle mouse click to go back in debug
if (this.debug && !window.debugBack) {
window.debugBack = true;
window.addEventListener('pointerdown', (event) => {
if (event.button === 1) {
window.scene.strand.back();
}
});
}
const PropParallaxAuto = (options) => {
const start = Date.now();
const gameObject = this.PropParallax(options);
gameObject.scripts.push({
gameObject,
update() {
gameObject.spr.tilePosition.x = (Date.now()-start)/1000 * options.speed;
},
});
return gameObject;
};
const Musicer = (key, num, options) => {
let sfxs = [];
let mounted = false;
const go = this.Updater(() => {
if (!mounted) {
mounted = true;
go.ambientTimeout = setTimeout(() => {
go.ambientTimeout = null;
}, 5000);
return;
}
if (go.ambientTimeout) return;
if (!sfxs.length) {
sfxs = new Array(num).fill(0).map((i, idx) => `${key}.${idx+1}`);
sfxs = sfxs.concat(sfxs);
sfxs = this.shuffle(sfxs);
}
const sfx = sfxs.pop();
this.sfx(sfx, options);
go.ambientTimeout = setTimeout(() => {
go.ambientTimeout = null;
}, this.randRange(9000, 12000));
});
return go;
};
this.Area('empty', []);
this.Area('no one', [
this.slither = this.Audio({ sfx: 'slither', volume: 0, maxDistance: this.size.x*10 }),
(() => {
const h = this.Hotspot({ label: 'no one', texture: 'blank', x: 27, y: -214, offset: 10000, use: {
'moon-dried tomato': ['goto:give tomato'],
'soap': ['goto:give soap'],
'half-eaten tuna fish sandwich': ['goto:give sandwich'],
}, });
this.noone = h;
h.spr.width = 200;
h.spr.height = 200;
return h;
})(),
this.Prop({ freq: 1/100, texture: 'no one Head', x: 112, y: -48, offset: 1000 }),
this.Prop({ freq: 1/200, texture: 'no one UL', y: -112, offset: 500 }),
this.Prop({ freq: 1/190, texture: 'no one LL', offset: 2000 }),
this.Prop({ freq: 1/180, texture: 'no one LR', x: 248, offset: 1500 }),
this.Updater(() => {
if (this.gameObject === this.noone) {
const t = game.app.ticker.lastTime;
this.scene.dialogue.strText = this.scene.dialogue.strText.split('').map((i, idx) => Math.floor(idx/5 -t/300 - Math.sin(t/300)*0.5 - Math.sin(t/400)*0.2) % 3 ? i.toLowerCase() : i.toUpperCase()).join('');
}
}),
]);
this.Area('menu', [
this.Audio({ sfx: 'outdoors', maxDistance: this.size.x*10 }),
this.Prop({ texture: 'mat', x: 0, y: -46, offset: -10000 }),
this.Prop({ texture: 'doorClosed', x: 0, y: -128, offset: -10000 }),
this.Prop({ texture: 'doorOpen', freq: 1/200, alpha: 0, x: 0, y: -128, offset: -10000 }),
this.Prop({ name: 'playerText', texture: 'blank', x: -74, y: -154, offset: -10000 }),
this.nooneMenu = this.Prop({ name: 'nooneText', texture: 'blank', x: 58, y: -335, offset: -10000 }),
(() => {
const h = this.Hotspot({ label: 'start', texture: 'blank', x: -2, y: -228, offset: 10000, use: {
undefined: ['goto:start game'],
}, });
h.spr.width = 100;
h.spr.height = 160;
return h;
})(),
(() => {
const h = this.Hotspot({ label: 'about', texture: 'blank', x: -4, y: -45, offset: 10000, use: {
undefined: ['goto:credits'],
}, });
h.spr.width = 300;
h.spr.height = 80;
return h;
})(),
this.Updater(() => {
if (this.gameObject === this.nooneMenu) {
const t = game.app.ticker.lastTime;
this.scene.dialogue.strText = this.scene.dialogue.strText.split('').map((i, idx) => Math.floor(idx/5 -t/300 - Math.sin(t/300)*0.5 - Math.sin(t/400)*0.2) % 3 ? i.toLowerCase() : i.toUpperCase()).join('');
}
}),
]);
this.Area('ending', [
this.Audio({ sfx: 'outdoors', maxDistance: this.size.x*10 }),
this.Prop({ texture: 'mat', x: 0, y: -46, offset: -10000 }),
this.Prop({ texture: 'doorClosed', x: 0, y: -128, offset: -10000 }),
this.Prop({ texture: 'doorOpen', freq: 1/200, alpha: 0, x: 0, y: -128, offset: -10000 }),
this.Prop({ name: 'playerText', texture: 'blank', x: -74, y: -154, offset: -10000 }),
]);
this.Area('credits', [
this.Audio({ sfx: 'outdoors', maxDistance: this.size.x*10 }),
this.Text(`
made by Sean, Michael & IAN
of Sweet♥Heart Squad \n
for A Game By Its Cover 2023\n
based on Famicase artwork
by AQUILES`, { x: 0, y: -400}),
this.creditsBackText = this.Text(`back`, { x: -260, y: -475 }),
(() => {
const h = this.Hotspot({ label: 'back', texture: 'blank', x: -260, y: -475+40, use: {
undefined: ['goto:credits-back'],
}, });
this.creditsBackBtn = h;
h.spr.width = 80;
h.spr.height = 60;
return h;
})(),
this.Prop({ texture: 'toctoc_white', x: 5, y: -390}),
this.Hotspot({ label: 'Sweet♥Heart Squad', texture: 'SweetHeart Squad', x: -96, y: -30, offset: 10000, use: {
undefined: ['goto:credits-sweetheartsquad'],
}, }),
this.Hotspot({ label: 'AQUILES', texture: 'AQUILES', x: 103, y: -30, offset: 10000, use: {
undefined: ['goto:credits-aquiles'],
}, }),
]);
const rays = () => {
let slGodRay = this.Prop({ texture: 'godRayL', x: -270, y: 0, offset: 1000000 });
let scGodRay = this.Prop({ texture: 'godRayC', x: -160, y: -122, offset: 1000000 });
let srGodRay = this.Prop({ texture: 'godRayR', x: -43, y: -222, offset: 1000000 });
return [
slGodRay,
scGodRay,
srGodRay,
this.Updater(() => {
slGodRay.display.container.alpha = Math.sin(game.app.ticker.lastTime*0.0015 + 1.0)*0.1 + 0.25;
scGodRay.display.container.alpha = Math.sin(game.app.ticker.lastTime*0.0015 + 0.5)*0.1 + 0.25;
srGodRay.display.container.alpha = Math.sin(game.app.ticker.lastTime*0.0015 + 0.0)*0.1 + 0.25;
}),
];
};
const Rockspot = ({ spot, x, y }) => {
const h = this.Hotspot({ label: 'spot', texture: 'stone_tile', offset: -100, x, y, use: {
undefined: [`p:"looks like something could go here"`],
thimble: [`p:"it's too big for the tile"`],
die: [`p:"it's too big for the tile"`],
glass: [`p:"that's not a short cut"`],
hat: [`p:"i'm getting ahead of myself"`],
'big rock': ['goto:place big rock'],
'medium rock': ['goto:place medium rock'],
'little rock': ['goto:place little rock'],
}, });
h.spot = spot;
return h;
};
this.flamingoMouthPoly = this.Poly({ verts: [37,-319, 18,-261, 40,-234, 75,-257, 131,-264, 209,-272, 239,-286] });
this.Area('gnome puzzle', [
this.Audio({ sfx: 'outdoors', maxDistance: this.size.x*10 }),
Musicer('gnome_flute', 25, { volume: 0.025 }),
// border
this.Poly({ verts: [205,-275, 17,-290, -90,-287, -217,-247, -292,-175, -328,-93, -296,-38, -121,-14, 93,-11, 238,-55, 253,-98, 268,-184, 242,-238, 201,-276] }),
this.flamingoMouthPoly,
this.Prop({ texture: 'bg_gnome_puzzle_open_BACK', offset: -1000000 }),
this.Prop({ texture: 'bg_gnome_puzzle_FORE', offset: 1000000 }),
this.Prop({ texture: 'bg_gnome_puzzle_closed_BACK', offset: -1000000 }),
this.Prop({ texture: 'bg_gnome_puzzle_worm_gone', x: -303, y: -182, offset: 0 }),
this.Hotspot({ label: 'worm', texture: 'bg_gnome_puzzle_worm', x: -286, y: -159, offset: 0, use: {
hat: ['goto:worm hat'],
undefined: [`"wish i had a hat to go out in"`, `"i wanna look good before i head out"`],
die: [`"i don't have hands dude"`],
thimble: [`"kind of a bummer hat no offense"`],
glass: [`"whoa dude don't hurt me"`],
'safety pin': [`"whoa dude don't hurt me"`],
'cut flower': [`"im not really a flower guy"`],
'little rock': [`"you gonna finish that?"`],
'medium rock': [`"you gonna finish that?"`],
'big rock': [`"you gonna finish that?"`],
}, }),
this.Hotspot({ label: 'flower', texture: 'bg_gnome_puzzle_flower', x: -57, y: -266, offset: -10, use: {
glass: ['goto:cut flower'],
undefined: [`p:"cute flower!"`],
thimble: [`p:"i think it's a daisy, not a thimble flower"`],
'little rock': [`p:"i don't want to crush it"`],
'medium rock': [`p:"i don't want to crush it"`],
'big rock': [`p:"i don't want to crush it"`],
'safety pin': [`p:"it's tough to cut it with that"`],
}, }),
this.Hotspot({ label: 'leaf', texture: 'leaf', x: 122, y: -175, offset: 10, use: {
undefined: ['goto:move leaf'],
other: [`p:"i can probably just move it with my hands"`],
}, }),
this.Npc({ name: 'fiery gnome', body: 'gnome_top', tint: 0xcd836f, x: -162, y: -224, use: {
'die': [`"no time for games!"`],
'glass': [`"hey! watch where you swing that!"`],
'safety pin': [`"hey! watch where you swing that!"`],
undefined: [`"i know where the rocks go!"`,`"don't listen to the other guy."`, `"we'll never get into the temple..."`, `"ugh, that worm creeps me out..."`],
'big rock': [`"my rock? use it right!"`],
'medium rock': [`"hey! that's my- oh, maybe not."`],
'little rock': [`"don't listen to the other guy."`],
thimble: [`"i don't need a new hat!"`],
hat: [`"i don't need a new hat!"`],
'cut flower': [`"that's cute. i hate it!"`],
}, }),
this.Npc({ name: 'numb gnome', body: 'gnome_bottom', tint: 0x6f79cd, x: 180, y: -100, flip: true, use: {
'cut flower': [`goto:remove-hat`],
'die': [`"don't wanna play dice right now."`],
'thimble': [`"cool hat. too big for me though..."`],
'glass': [`"careful with that..."`],
'safety pin': [`"hmm, that's not really a hat..."`],
undefined: [`"he won't put his rock on that tile..."`,`"my solution is right but whatever..."`,`"i hope there's a cute hat in there..."`],
'big rock': [`"he won't put his rock on that tile..."`],
'medium rock': [`"oh, you have one too..."`],
'little rock': [`"my rock? you can use it i guess..."`],
hat: [`"nah... i like the new one better"`],
}, }),
this.Item({ texture: 'big rock', x: -109, y: -219, use: {
undefined: ['goto:take big rock'],
player: [`p:"it's a rock the size of a large pebble"`],
'cut flower': [`p:"i don't want to crush it"`],
'little rock': [`p:"wouldn't want to get between these two"`],
'medium rock': [`p:"wouldn't want to get between these two"`],
glass: [`p:"not a house, but i still shouldn't throw it"`],
die: [`p:"rock and roll!"`],
}, }),
this.Item({ texture: 'little rock', x: 100, y: -110, use: {
undefined: ['goto:take little rock'],
player: [`p:"it's a rock the size of a tiny pebble"`],
'cut flower': [`p:"i don't want to crush it"`],
'big rock': [`p:"wouldn't want to get between these two"`],
'medium rock': [`p:"wouldn't want to get between these two"`],
glass: [`p:"not a house, but i still shouldn't throw it"`],
die: [`p:"rock and roll!"`],
}, }),
this.glassPoly = this.Poly({ verts: [-179,-82, -209,-84, -205,-66, -179,-84], width: 10 }),
this.Item({ texture: 'glass', x: -190, y: -50, offset: -35, use: {
player: [`p:"it's a sharp piece of broken glass"`],
'little rock': [`p:"not a house, but i still shouldn't throw it"`],
'medium rock': [`p:"not a house, but i still shouldn't throw it"`],
'big rock': [`p:"not a house, but i still shouldn't throw it"`],
die: [`p:"that's not how die cuts work"`],
'safety pin': [`p:"they're both pretty sharp..."`],
}, }),
//junk
this.Item({ texture: 'thimble', x: 290, y: -20, offset: 10000000, use: {
player: [`p:"hats aren't really my style..."`, `p:"not this hat, anyway"`],
die: [`p:"yahtzee!"`],
'cut flower': [`p:"i think it's a daisy, not a thimble flower"`],
'safety pin': [`p:"wrong type of needle for that"`],
hat: [`p:"fashion is so complicated"`],
}, }),
this.Item({ texture: 'die', x: -304, y: -103, offset: 100000000, use: {
player: [`p:"i'd rather not think about that right now"`],
thimble: [`p:"yahtzee!"`],
'little rock': [`p:"rock and roll!"`],
'medium rock': [`p:"rock and roll!"`],
'big rock': [`p:"rock and roll!"`],
glass: [`p:"that's not how die cuts work"`],
other: [`p:"now's not the time to be playing around"`],
otherTarget: [`p:"now's not the time to be playing around"`],
}, }),
this.Item({ texture: 'safety pin', x: 50, y: -50, offset: -35, use: {
player: [`p:"ouch!"`, `p:"doesn't seem that safe to me..."`],
'cut flower': [`p:"it's too big for that"`],
glass: [`p:"they're both pretty sharp..."`],
thimble: [`p:"wrong type of needle for that"`],
hat: [`p:"it doesn't need a pin to stay on"`],
}, }),
this.Hotspot({ label: 'dragonfly', texture: 'dragonfly', x: 261, y:-290, offset: 100000000, use: {
undefined: ['p:"what a pretty dragonfly..."'],
glass: [`p:"i don't wanna hurt it..."`],
die: [`p:"i don't think it wants to play"`],
thimble: [`p:"i don't think it can sew"`],
'safety pin': [`p:"the pin kinda looks like a wing..."`],
}, }),
(() => {
const h = this.Hotspot({ label: 'entrance', texture: 'blank', x: 134, y: -240, use: {
other: [`goto:flamingo`],
}, });
h.spr.width = 200;
h.spr.height = 200;
return h;
})(),
Rockspot({ spot: '11', x: -110, y: -125, }),
Rockspot({ spot: '12', x: -64, y: -149, }),
Rockspot({ spot: '13', x: -25, y: -171, }),
Rockspot({ spot: '21', x: -67, y: -97, }),
Rockspot({ spot: '22', x: -23, y: -121, }),
Rockspot({ spot: '23', x: 23, y: -146, }),
Rockspot({ spot: '31', x: -20, y: -69, }),
Rockspot({ spot: '32', x: 27, y: -95, }),
Rockspot({ spot: '33', x: 70, y: -120, }),
]);
this.Area('tomato', [
this.Prop({ texture: 'tomatoRoom', offset: -1000000 }),
this.Item({ label: 'moon-dried tomato', texture: 'tomatoItem', x: 135, y: -347, use: {
undefined: ['goto:moon-dried tomato'],
player: ['goto:no one item cancel'],
} }),
...rays(),
]);
this.HookItem = (props) => {
const i = this.Item({ ...props, offset: 100000 - props.hookY });
i.display.container.pivot.y = -props.hookY;
i.hookY = props.hookY;
i.scripts.push({
gameObject: i,
update() {
this.gameObject.spr.scale.x = Math.abs(this.gameObject.spr.scale.x) * ((this.gameObject.transform.x > 0 && this.gameObject.transform.x < 290) ? 1 : -1);
},
});
return i;
};
this.HookSpot = (props, item) => {
const h = this.Hotspot({ texture: 'hook', x: props.x, y: props.y, offset: 100000, use: {
undefined: [`p:"it's hook on the wall"`, `p:"looks like it could hold something"`, `p:"there's a bunch of these hooks here"`],
'cowboy hat': ['goto:place on hook'],
'poster': ['goto:place on hook'],
'horseshoe': ['goto:place on hook'],
'rope': ['goto:place on hook'],
'wheel': ['goto:place on hook'],
other: [`p:"i don't see how to hook it up"`],
}, });
h.display.container.pivot.y = -15;
h.spot = props.spot;
h.scripts.push({
gameObject: h,
update() {
this.gameObject.spr.scale.x = Math.abs(this.gameObject.spr.scale.x) * ((this.gameObject.transform.x > 0 && this.gameObject.transform.x < 290) ? 1 : -1);
},
});
if (item) {
h.item = item.name;
item.transform.x = h.transform.x;
item.transform.y = h.transform.y;
item.hookspot = h;
h.btn.enabled = false;
return [h, item];
}
return [h];
};
this.Area('dustbun heist', [
this.Audio({ sfx: 'wind', maxDistance: this.size.x*10 }),
Musicer('western', 13, { volume: 0.1 }),
this.fusesfx = this.Audio({ sfx: 'burn', volume: 0, maxDistance: this.size.x*10 }),
// main walls
this.Poly({ verts: [-247,-132, -74,-239, 58,-241, 162,-283, 348,-153, -2,-4, -249,-122] }),
this.Prop({ texture: 'heist_bg', offset: -1000000 }),
this.Prop({ texture: 'heist_vault', x: -212, y: -84, offset: -168 }),
this.Prop({ texture: 'heist_window', x: 0, y: -211, offset: -66 }),
this.Prop({ texture: 'heist_tubes', x: 237, y: -198, offset: -40 }),
this.Prop({ texture: 'chandelier', x: -94, y: -320, offset: 1000 }),
this.Poly({ verts: [-214,-117, -193,-140] }), // tnt
this.Hotspot({ texture: 'tnt', x: -202, y: -109, offset: -25, use: {
undefined: [`p:"are they gonna blow the door?"`, `p:"high-power explosives really change a room's energy"`, `p:"i'm having a blast, how about you?"`, `p:"...sorry, that one was a dud"`],
candle: [`p:"um!!! bad idea"`, `p:"i'd rather not blow up!!"`, `p:"if only there was a way to do that remotely..."`],
oil: [`p:"tnt doesn't need more grease"`],
rope: [`p:"that's what the fuse is for"`],
'cowboy hat': [`p:"it's out of style to wear a hat with bangs"`],
'bread slice': [`p:"there are better ways to make toast"`],
}, }),
this.Prop({ texture: 'fuse', x: -146, y: -80, offset: -60 }),
this.Hotspot({ label: 'fuse', texture: 'spark', freq: 1/50, alpha: 0, x: -73, y: -80, offset: -5, use: {
undefined: [`p:"it's a fuse"`, `p:"it's definitely a fuse"`, `p:"i'm not confused"`, `p:"...my fuse is shorter than this"`],
candle: ['goto:light fuse'],
oil: [`p:"i dunno if that would make it burn better or worse"`, `p:"either way, not gonna try it"`],
rope: [`p:"i think the fuse is long enough"`],
other: [`p:"that's not gonna light it"`, `p:"fusing those won't do anything"`],
}, }),
this.Poly({ verts: [221,-114, 253,-120, 233,-133] }), // oil
this.Item({ texture: 'oil', x: 235, y: -114, offset: 0, use: {
player: [`p:"smells like... paint thinner?"`, `p:"i don't wanna know where this came from"`],
undefined: ['goto:take oil'],
other: [`goto:use on oil`],
otherTarget: [`p:"that doesn't need oiling"`],
}, }),
this.Hotspot({ label: 'trophy mount', texture: 'beetle', x: 184, y: -317, use: {
undefined: [`p:"gross..."`, `p:"there's a little plaque near the bottom"`, `p:"says 'Megasoma Elephas'"`],
candle: [`p:"bit late for a pyre"`],
'cowboy hat': [`p:"the horn would get in the way"`],
rope: [`p:"someone already caught it"`],
horseshoe: [`p:"it'd need feet for that"`],
}, }),
this.Hotspot({ texture: 'peanut', x: 168, y: -239, offset: -5, use: {
undefined: [`p:"that's a lotta nut!"`, `p:"it's a peanut"`, `p:"it looks kinda mushy..."`],
candle: [`p:"a hot nut never helped anyone"`],
rope: [`p:"why would i tie up someone's nut?"`],
wheel: [`p:"this is driving me nuts..."`],
horseshoe: [`p:"i'm not heavy enough to just step on it"`],
}, }),
this.Poly({ verts: [-44,-39, 18,-13] }), // shelf
this.Prop({ texture: 'shelf', y: -11, offset: 9000 + 11 }),
this.Hotspot({ texture: 'bread', x: -30, y: -100, offset: 10000, use: {
undefined: [`p:"it's a bread box"`, `p:"it's shut tight"`, `p:"i thought this was a bank, not a bakery..."`],
other: [`p:"that won't help get that bread"`],
}, }),
this.Hotspot({ label: 'vault', texture: 'heist_vault_door', x: -170, y: -152, offset: -75, use: {
undefined: ['goto:open vault'],
oil: ['goto:oil vault'],
wheel: [`p:"yep. they're both circles."`, `p:"i see zero other connection here"`],
candle: [`p:"it'd need to be much hotter to burn that"`],
other: [`p:"that's not gonna open it"`],
}, }),
this.Npc({ name: 'snake oil\nsalesbun', body: 'dustbun_oil', tint: 0x746568, x: 290, y: -130, shadow: false, flip: true, use: {
undefined: [`"can't believe dis..."`, `"past lunch already..."`, `"s'posed to be makin' deals today"`, `"got me waitin' on steals..."`],
'bread slice': ['goto:give bread'],
poster: [`"dat reward's nuddin ta sneeze at"`, `"nah... let da sheriff deal with dat"`],
candle: [`"ey watch it, dat's hot!!"`],
rope: [`p:"they probably wouldn't appreciate being tied up"`],
'cowboy hat': [`"no thanks, i prefer oiling my tufts up"`],
oil: [`"it's 'genuine'!"`],
other: [`"get outta here with dat junk!"`, `"dis trash ain't worth dust..."`, `"more trash? where's da dough?!"`],
}, }),
this.Npc({ name: 'scared hare', body: 'dustbun_scared', tint: 0x746568, x: -30, y: -215, flip: true, use: {
other: [`"oh golly gee oh no oh no"`, `"ohh dear betsy buggy sue protect me"`, `"ohhhhh nooooo"`, `p:"...they seem a bit pre-occupied"`],
}, }),
this.Npc({ name: 'crook', body: 'dustbun_boss', tint: 0x9485A2, x: 125, y: -215, flip: true, use: {
undefined: [`"if dat vault ain't open on da count of five..."`, `"one..."`, `"two..."`, `"tree....."`, `"fohhh......."`, `"...you tink ahm kiddin' around!?"`, `"ah won't say it again!"`],
poster: [`"not a bad likeness"`, `"gonna try ta claim dat reward?"`, `"hehehe, don't make me laugh"`],
rope: [`p:"i think they'd overpower me..."`, `p:"better knot risk it"`],
'cowboy hat': [`"'preciate da gesture, but not mah colour"`],
candle: [`"pa never tell ya not ta play with fire?"`, `"mine neither, heh"`],
oil: [`"gotta respect da classics"`, `"ah go for bigger scores dese days"`],
'bread slice': [`"no thanks, ah ate before we came"`, `"nevah do a heist on an empty stomach"`],
}, }),
this.Npc({ name: 'mook', body: 'dustbun_mook', tint: 0xE6E2A4, x: -139, y: -115, use: {
undefined: [`"ey step back kiddo"`, `"dis stuff's dangerous"`],
rope: [`p:"i think they'd overpower me..."`, `p:"better knot risk it"`],
'cowboy hat': [`"hats're more da boss's style"`],
candle: [`"uh. c-careful with dat."`, `"s-seriously..."`],
'bread slice': [`"da boss don't let me eat on da job"`],
poster: [`"how come da boss gets all da credit..."`],
}, }),
this.Npc({ name: 'teller', body: 'dustbun_teller', tint: 0xC6A89D, shadow: false, offset: -100, x: 94, y: -247, use: {
undefined: [`"i told ya, da door's stuck!"`, `"already unlocked, nuddin else ta do!"`, `"arghh won't anybunny help me??"`],
other: [`p:"nah, they're pretty locked up in there"`],
}, }),
this.Hotspot({ texture: 'ladder', x: 45, y: -36, offset: 1000, use: {
undefined: [`p:"a rickety, rotten ladder"`, `p:"i'm not gonna step on that"`],
rope: [`p:"that's not how you make a rope ladder"`],
other: [`p:"that won't work... i gotta step it up"`],
}, }),
...this.HookSpot({ spot: 'r1', x: 45, y: -144 },
// empty
),
...this.HookSpot({ spot: 'r2', x: 177, y: -190 },
this.HookItem({ texture: 'rope', hookY: 128, use: {
player: [`p:"nice rope"`, `p:"probably strong enough for a tightrope act"`, `p:"it's rope"`],
'cowboy hat': [`p:"just missing the cow"`],
candle: [`p:"bit overkill for a wick"`],
horseshoe: [`p:"those shoes don't need laces"`],
wheel: [`p:"uhh... reel wope? no, that's nothing"`],
}, }),
),
...this.HookSpot({ spot: 'r3', x: 287, y: -231 },
this.HookItem({ texture: 'horseshoe', hookY: 30, use: {
player: [`p:"do they even have horses here?"`, `p:"it's a lucky horseshoe!"`],
rope: [`p:"those shoes don't need laces"`],
other: [`p:"nah, might be bad luck"`],
otherTarget: [`p:"nah, might be bad luck"`],
}, }),
),
...this.HookSpot({ spot: 'r4', x: 299, y: -335 },
this.HookItem({ texture: 'poster', hookY: 37, use: {
player: [`p:"says 'WANTED - REWARD 100 BARS'"`, `p:"now where have i seen that face before..."`],
candle: [`p:"got a feeling that would also be a crime"`],
}, }),
),
...this.HookSpot({ spot: 'l1', x: -33, y: -209 },
this.HookItem({ texture: 'wheel', hookY: 103, use: {
player: [`p:"it's a big ol' wheel"`],
rope: [`p:"uhh... reel wope? no, that's nothing"`],
peanut: [`p:"this is driving me nuts..."`],
otherTarget: [`p:"that wheely won't work"`, `p:"feels a bit round-a-bout..."`, `p:"try again, i'm on a roll"`, `p:"feel like i'm going in circles with this idea"`, `p:"wish i spoke to someone about it first..."`],
}, }),
),
...this.HookSpot({ spot: 'l2', x: -132, y: -250 },
// empty
),
...this.HookSpot({ spot: 'l3', x: -259, y: -298 },
this.HookItem({ texture: 'cowboy hat', hookY: 58, use: {
player: [`p:"yeehaw"`, `p:"oh it doesn't fit me... yeenaw"`],
rope: [`p:"just missing the cow"`],
}, }),
),
this.miterun = this.Audio({ sfx: 'miterun', volume: 0, rate: 1, maxDistance: this.size.x*10 }),
this.mite = this.Npc({ name: 'dust mite', body: 'mite', x: 3, y: -448, roam: 50, offset: 90000, bodyCollision: { isStatic: false, isSensor: true }, use: {
undefined: ['goto:mite run'],
other: [`p:"it seems content to ignore that"`, `p:"got its own priorities"`, `p:"it doesn't get it"`],
}, }),
this.Prop({ texture: 'heist_fg', offset: 10000 }),
]);
this.Area('soap', [
this.Prop({ texture: 'noItemSoap', offset: -1000000 }),
this.Item({ label: 'soap', texture: 'soapItem', x: 54, y: -304, use: {
undefined: ['goto:soap'],
player: ['goto:no one item cancel'],
} }),
(() => {
const h = this.Hotspot({ label: 'liquid assets', texture: 'blank', x: 87, y: -402, use: {
undefined: [`p:"they must be very solvent..."`],
}, });
h.spr.width = 50;
h.spr.height = 50;
return h;
})(),
(() => {
const h = this.Hotspot({ label: 'liquid assets', texture: 'blank', x: 171, y: -360, use: {
undefined: [`p:"they must be very solvent..."`],
}, });
h.spr.width = 50;
h.spr.height = 50;
return h;
})(),
(() => {
const h = this.Hotspot({ label: 'bath bonds', texture: 'blank', x: 26, y: -365, use: {
undefined: [`p:"i never really understood those..."`],
}, });
h.spr.width = 30;
h.spr.height = 30;
return h;
})(),
(() => {
const h = this.Hotspot({ label: 'bath bonds', texture: 'blank', x: 20, y: -402, use: {
undefined: [`p:"i never really understood those..."`],
}, });
h.spr.width = 30;
h.spr.height = 30;
return h;
})(),
(() => {
const h = this.Hotspot({ label: 'bath bonds', texture: 'blank', x: 99, y: -326, use: {
undefined: [`p:"i never really understood those..."`],
}, });
h.spr.width = 30;
h.spr.height = 30;
return h;
})(),
(() => {
const h = this.Hotspot({ label: 'bath bonds', texture: 'blank', x: 157, y: -344, use: {
undefined: [`p:"i never really understood those..."`],
}, });
h.spr.width = 30;
h.spr.height = 30;
return h;
})(),
(() => {
const h = this.Hotspot({ label: 'bath bonds', texture: 'blank', x: 121, y: -372, use: {
undefined: [`p:"i never really understood those..."`],
}, });
h.spr.width = 30;
h.spr.height = 30;
return h;
})(),
(() => {
const h = this.Hotspot({ label: 'bath bonds', texture: 'blank', x: 196, y: -398, use: {
undefined: [`p:"i never really understood those..."`],
}, });
h.spr.width = 30;
h.spr.height = 30;
return h;
})(),
(() => {
const h = this.Hotspot({ label: 'bath bonds', texture: 'blank', x: 59, y: -383, use: {
undefined: [`p:"i never really understood those..."`],
}, });
h.spr.width = 30;
h.spr.height = 30;
return h;
})(),
(() => {
const h = this.Hotspot({ label: 'bath bonds', texture: 'blank', x: 116, y: -404, use: {
undefined: [`p:"i never really understood those..."`],
}, });
h.spr.width = 30;
h.spr.height = 30;
return h;
})(),
(() => {
const h = this.Hotspot({ label: 'gold bubbllion', texture: 'blank', x: 94, y: -362, use: {
undefined: [`p:"i can't even imagine laundering this much..."`],
}, });
h.spr.width = 50;
h.spr.height = 50;
return h;
})(),
(() => {
const h = this.Hotspot({ label: 'gold bubbllion', texture: 'blank', x: 155, y: -413, use: {
undefined: [`p:"i can't even imagine laundering this much..."`],
}, });
h.spr.width = 50;
h.spr.height = 50;
return h;
})(),
(() => {
const h = this.Hotspot({ label: 'gold bubbllion', texture: 'blank', x: 206, y: -327, use: {
undefined: [`p:"i can't even imagine laundering this much..."`],
}, });
h.spr.width = 50;
h.spr.height = 50;
return h;
})(),
(() => {
const h = this.Hotspot({ label: 'gold bubbllion', texture: 'blank', x: 244, y: -302, use: {
undefined: [`p:"i can't even imagine laundering this much..."`],
}, });
h.spr.width = 50;
h.spr.height = 50;
return h;
})(),
...rays(),
]);
this.Area('mouse town center', [
Musicer('mouse', 12, { volume: 0.22 }),
this.Poly({ verts: [349,-265, -23,-499, -350,-301, -350,15, 350,15, 350,-266] }), // walls
this.Prop({ texture: 'bg', offset: -1000000 }),
this.Prop({ texture: 'buttons', x: 44, y: -339, offset: -30 }),
this.Poly({ verts: [-23,-472] }), // egg
this.Item({ texture: 'easter egg', x: -23, y: -463, offset: -10, use: {
player: [`p:"it's an easter egg"`, `p:"it's just an easter egg"`, `p:"it's still just an easter egg"`],
matchbox: [`p:"i don't want to melt that..."`],
otherTarget: [`p:"maybe... no, nothing"`, `p:"what if... no, that couldn't be it"`, `p:"thought it might do something special... guess not"`],
}, }),
this.Poly({ verts: [-24,-105, 42,-111], width: 5, }), // knife
this.Prop({ texture: 'butter knife', x: 66, y: -94, offset: -30 }),
this.Poly({ verts: [-337,-45, -255,-26, -291,-5], width: 7 }), // chapstick
this.Prop({ texture: 'chapstick', x: -284, y: -10, offset: -10 }),
this.Poly({ verts: [15,-390, 4,-395, 15,-398, 24,-395, 16,-390] }), // bottle cap
this.Item({ texture: 'bottle cap', x: 15, y: -378, offset: -10, use: {
player: [`p:"it's a bottle cap"`, `p:"it could probably hold something"`],
juice: [`p:"it's already in a cup"`],
}, }),
this.Interrupt({ passage: 'gatehouse interrupt', type: 'poly', verts: [84,-324, 141,-283, 178,-298, 236,-342, 162,-384] }),
this.Poly({ verts: [286,-306, 221,-271, 172,-299, 237,-345, 166,-385, 98,-347, 39,-382, 111,-423] }), // gate
this.Prop({ texture: 'gatehouse', x: 164, y: -259, offset: -120 }),
this.Prop({ texture: 'pushPins', x: 62, y: -420, offset: 41 }),
this.Poly({ verts: [258,-268, 293,-282], width: 10 }), // toothpicks
this.Item({ texture: 'toothpicks', x: 273, y: -247, offset: -87, use: {
player: [`p:"i don't think i should put it in my mouth..."`],
matchbox: [`p:"i could burn them, but i shouldn't"`],
foil: [`p:"hm... maybe if it were more malleable..."`],
anvil: [`p:"maybe the smith could use it"`],
cheese: [`p:"i'm not here to make hors d'oeuvres"`],
}, }),
this.Poly({ verts: [321,-245, 333,-245] }), // salt shaker
this.Prop({ texture: 'salt shaker', x: 328, y: -232, offset: -10 }),
this.Block({ type: 'circle', x: -10, y: -435, radius: 2, }), // crayon SL
this.Block({ type: 'circle', x: 311, y: -235, radius: 2, }), // crayon SR
this.Prop({ texture: 'shelfCrayonSL', x: -9, y: -430, offset: -4 }),
this.Prop({ texture: 'shelfCrayonSR', x: 312, y: -230, offset: -4 }),
this.Prop({ texture: 'shelfBg', x: 157, y: -288, offset: 75 }),
this.Prop({ texture: 'pushPinsTop', x: 30, y: -498, offset: 375 }),
this.Prop({ texture: 'pepper shaker', x: 192, y: -456, offset: 275 }),
this.Hotspot({ texture: 'pill bottle', x: 100, y: -437, offset: 275, use: {
undefined: [`p:"it's a bottle of pills"`, `p:"the label says 'sleepmaxx 2000'"`, `p:"they're probably expired"`],
'bottle cap': [`p:"guess it fell down here"`],
pill: [`p:"there's more of them in there"`],
other: [`p:"i can't reach it up there"`],
}, }),
this.Item({ texture: 'pill', x: 179, y: -385, offset: 275, use: {
player: [`p:"it's a sleeping pill"`, `p:"i don't need a nap..."`],
undefined: ['goto:take pill'],
other: [`p:"i can't reach it up there"`],
otherTarget: [`p:"i don't think it'll reach that"`],
}, }),
this.Poly({ verts: [-105,-368, -56,-368], width: 55 }), // can
this.Prop({ texture: 'can back', x: -83, y: -372, offset: -10 }),
this.Prop({ texture: 'can front wKey', x: -81, y: -334, offset: -25 }),
(() => {
// key
const h = this.Item({ label: 'key', texture: 'blank', carrying: 'key_carrying', x: -55, y: -360, offset: 100, use: {
undefined: ['goto:take key'],
player: [`p:"it's a windup key"`, `p:"where could it go..."`],
otherTarget: [`p:"there's no keyhole for that"`],
}, });
h.spr.width = 40;
h.spr.height = 20;
return h;
})(),
this.Poly({ verts: [12,-175, 54,-180, 80,-198, 87,-219, 78,-239, 54,-257, 20,-263, -13,-259, -39,-246, -57,-224, -50,-196, -26,-182, 8,-174] }), // fountain
this.Poly({ verts: [-79,-199, 111,-234], width: 15 }), // altars
this.sfxWater = this.Audio({ sfx: 'water', x: 19, y: -227, volume: 0.5, maxDistance: 400 }),
this.sfxHeater = this.Audio({ sfx: 'heater', x: 310, y: 0, volume: 0, maxDistance: 400 }),
this.Prop({ texture: 'fountainWater', x: 15, y: -164, freq: 1/100, offset: -45 }),
this.Item({ texture: 'fountain', x: 15, y: -164, alpha: 0, offset: -45, use: {
undefined: [`goto:pickup coin`],
'bottle cap': [`goto:fill cap`],
player: [`p:"it's a shiny coin"`, `p:"what kind of mice use currency..."`],
matchbox: [`p:"i'm not sure i need a wet match"`],
juice: [`p:"no one likes when it's watered down"`],
}, }),
this.Hotspot({ label: 'left altar', texture: 'pizzaTableSL', x: -79, y: -189, offset: -7, use: {
undefined: [`goto:cheese poem`],
cheese: ['goto:place cheese'],
'easter egg': [`p:"no... chocolate is poisonous to mice"`],
other: [`p:"that doesn't seem to fit"`],
}, }),
this.Hotspot({ label: 'right altar', texture: 'pizzaTableSR', x: 110, y: -222, offset: -7, use: {
undefined: [`goto:star poem`],
star: ['goto:place star'],
other: [`p:"that doesn't seem to fit"`],
}, }),
this.Poly({ verts: [218,-166, 192,-184, 271,-237, 298,-218, 219,-166], width: 5 }), // matchbox
this.Item({ texture: 'matchbox', x: 246, y: -161, offset: -25, use: {
player: [`p:"mom said not to play with matches..."`, `p:"oh well"`],
matchbox: [`goto:light match`],
toothpicks: [`p:"i think a match would work better"`],
other: [`p:"no, that doesn't match up"`, `p:"not exactly the match of the century..."`, `p:"doesn't make a good match"`],
otherTarget: [`p:"no, that doesn't match up"`, `p:"not exactly the match of the century..."`, `p:"doesn't make a good match"`],
}, }),
this.Block({ type: 'circle', x: -219, y: -339, radius: 2, }), // candle green
this.Block({ type: 'circle', x: -321, y: -278, radius: 2, }), // candle blue
this.Block({ type: 'circle', x: -245, y: -229, radius: 2, }), // candle purple
this.Block({ type: 'circle', x: -142, y: -292, radius: 2, }), // candle red
this.Poly({ verts: [-184,-230, -119,-272, -149,-287, -218,-249, -185,-231], width: 5 }), // juicebox
this.Prop({ texture: 'candleColumnBlue', x: -320, y: -272, offset: -4 }),
this.Prop({ texture: 'candleColumnGreen', x: -218, y: -335, offset: -4 }),
this.Prop({ texture: 'candleColumnPurple', x: -244, y: -225, offset: -4 }),
this.Prop({ texture: 'candleColumnRed', x: -142, y: -287, offset: -4 }),
this.Poly({ verts: [-212,-308, -260,-313, -292,-287], width: 14 }), // foil
this.Poly({ verts: [-307,-365, -263,-316] }), // extra foil wall
this.Item({ texture: 'foil', x: -253, y: -274, offset: -25, use: {
player: [`p:"it's some tin foil"`],
toothpicks: [`p:"hm... maybe if it were more malleable..."`],
matchbox: [`p:"it's not hot enough to do anything"`],
}, }),
this.Prop({ texture: 'juicebox', x: -168, y: -225, offset: -47 }),
this.Prop({ texture: 'juiceboxL', x: -168, y: -225, offset: -27 }),
this.Item({ texture: 'juice', x: -152, y: -265, offset: -5, use: {
undefined: ['goto:take juice'],
player: [`goto:player-slurp`, `p:"tastes pretty good actually"`],
'bottle cap': [`p:"it's already in a cup"`],
matchbox: [`p:"seems better cold"`],
}, }),
this.Prop({ texture: 'candle foil top', x: -227, y: -300, offset: 300 }),
this.cartPoly = this.Poly({ verts: [-142,-11, -100,-40, -191,-71, -245,-110, -209,-123, -252,-149, -336,-88] }), // cart
this.Prop({ texture: 'cheeseCart', x: -235, y: 0, offset: -115 }),
this.Prop({ texture: 'horseNoKey', x: -128, y: 0, offset: -35 }),
(() => {
// horse
const h = this.Hotspot({ label: 'horse', texture: 'blank', x: -155, y: -30, offset: 0, use: {
undefined: [`p:"it's a horse"`, `"..."`, `p:"must be tired"`, `"..."`],
key: ['goto:windup key'],
toothpicks: [`p:"that seems mean..."`],
spoon: [`p:"that seems mean..."`],
fork: [`p:"that seems mean..."`],
'cool sword': [`p:"that seems mean..."`],
anvil: [`p:"that seems mean..."`],
matchbox: [`p:"that seems mean..."`],
juice: [`p:"its owner might not like that"`],
'easter egg': [`p:"its owner might not like that"`],
}, });
h.spr.width = 130;
h.spr.height = 100;
return h;
})(),
(() => {
// cart cheese
const h = this.Hotspot({ label: 'cart', texture: 'blank', x: -266, y: -93, offset: 0, use: {
other: [`goto:cart reject`],
}, });
h.spr.width = 130;
h.spr.height = 100;
return h;
})(),
this.polyWax = this.Poly({ verts: [-180,-336, -176,-327, -110,-292, -119,-297, -94,-316, -150,-353, -180,-336], width: 12 }), // candles
this.Hotspot({ texture: 'birthday candles', x: -132, y: -288, offset: -33, use: {
undefined: [`p:"happy birthday!"`, `p:"that's a lot of candles..."`],
'cookie cutter': [`p:"maybe if they were melted..."`],
matchbox: [`goto:melt wax`],
'easter egg': [`p:"they have enough wax already"`],
}, }),
// bottom right
this.Prop({ texture: 'cutter snowman 1', x: 274, y: -102, alpha: 0, offset: 202 }),
this.Prop({ texture: 'cutter star 1', x: 274, y: -101, alpha: 1, offset: 201 }),
this.Prop({ texture: 'cutter tree 1', x: 279, y: -107, alpha: 0, offset: 207 }),
// left
this.polyCutter = this.Poly({ verts: [-344,-211, -320,-215, -311,-242, -296,-259, -309,-266, -348,-237] }), // snowman
this.Prop({ texture: 'cutter snowman 2', x: -298, y: -129, alpha: 1, offset: -125 }),
this.Prop({ texture: 'cutter star 2', x: -286, y: -126, alpha: 0, offset: -115 }),
this.Prop({ texture: 'cutter tree 2', x: -293, y: -129, alpha: 0, offset: -125 }),
// top right
this.Prop({ texture: 'cutter snowman 3', x: 289, y: -324, alpha: 0, offset: 300 }),
this.Prop({ texture: 'cutter star 3', x: 281, y: -300, alpha: 0, offset: 314 }),
this.Prop({ texture: 'cutter tree 3', x: 284, y: -303, alpha: 1, offset: 300 }),
(() => {
// bottom right
const h = this.Item({ label: 'cookie cutter', texture: 'blank', x: 311, y: -145, offset: 1000, use: {
player: [`p:"with i had some cookie dough..."`],
'cookie cutter': ['goto:swap cutter'],
'wax wad': [`p:"it'd need to be flat for that"`],
}, });
h.pos = 1;
h.cookie = 'star';
h.carrying = 'cutter star carrying';
h.spr.width = 100;
h.spr.height = 100;
return h;
})(),
(() => {
// left
const h = this.Item({ label: 'cookie cutter', texture: 'blank', x: -314, y: -214, offset: 1000, use: {
player: [`p:"with i had some cookie dough..."`],
'cookie cutter': ['goto:swap cutter'],
'wax wad': ['goto:shape wax'],
}, });
h.pos = 2;
h.cookie = 'snowman';
h.carrying = 'cutter snowman carrying';
h.spr.width = 100;
h.spr.height = 100;
return h;
})(),
(() => {
// top right
const h = this.Item({ label: 'cookie cutter', texture: 'blank', x: 310, y: -346, offset: 1000, use: {
player: [`p:"with i had some cookie dough..."`],
'cookie cutter': ['goto:swap cutter'],
'wax wad': [`p:"it'd need to be flat for that"`],
other: [`p:"i can't do much with it up there"`],
}, });
h.pos = 3;
h.cookie = 'tree';
h.carrying = 'cutter tree carrying';
h.spr.width = 100;
h.spr.height = 120;
return h;
})(),
// hacky fix for getting stuck behind cutter during swap
this.Updater(() => {
if (this.scene.player.x < -299 && this.scene.player.y < -227) {
this.scene.player.x = -258;
this.scene.player.y = -195;
}
}),
this.Poly({ verts: [348,-187, 37,7] }), // stove ledge
this.Prop({ texture: 'stoveFloor', x: 175, y: 0, offset: 0 }),
this.Hotspot({ label: 'hob', texture: 'stoveHob', x: 310, y: 0, offset: 0, use: {
undefined: [`p:"it's a gas hob"`, `p:"it's not lit right now"`],
matchbox: [`goto:light stove`],
}, }),
this.Prop({ texture: 'spoonForkStoveProng', x: 218, y: 0, offset: 1 }),
this.Prop({ texture: 'anvilStoveProng', x: 306, y: -45, offset: 47 }),
(() => {
const h = this.Item({ label: 'anvil', texture: 'blank', carrying: 'anvil_carrying', x: 295, y: -52, offset: 100, use: {
player: [`p:"ouch!"`, `p:"fool me once..."`, `p:"ouch!"`, `p:"fool me twice..."`, `p:"i'm not doing that again"`, `p:"..."`],
other: [`p:"better leave it to the smith"`],
otherTarget: [`p:"why would i hit that?"`],
}, });
h.spr.width = 50;
h.spr.height = 30;
return h;
})(),
// cutlery
(() => {
const h = this.Item({ label: 'fork', texture: 'blank', carrying: 'fork_carrying', x: 197, y: -64, offset: 1000, use: {
player: [`p:"i wonder what's for dinner..."`, `p:"it's a fork"`],
}, });
h.spr.width = 30;
h.spr.height = 30;
return h;
})(),
(() => {
const h = this.Item({ label: 'spoon', texture: 'blank', carrying: 'spoon_carrying', x: 217, y: -61, offset: 1000, use: {
player: [`p:"i wonder what's for dinner..."`, `p:"it's a spoon"`],
}, });
h.spr.width = 30;
h.spr.height = 30;
return h;
})(),
(() => {
const h = this.Item({ label: 'spoon', texture: 'blank', carrying: 'spoon_carrying', x: 241, y: -58, offset: 1000, use: {
player: [`p:"i wonder what's for dinner..."`, `p:"it's a spoon"`],
}, });
h.spr.width = 30;
h.spr.height = 30;
return h;
})(),
(() => {
const h = this.Item({ label: 'spoon', texture: 'blank', carrying: 'spoon_carrying', x: 192, y: -14, offset: 1000, use: {
player: [`p:"i wonder what's for dinner..."`, `p:"it's a spoon"`],
}, });
h.spr.width = 30;
h.spr.height = 60;
return h;
})(),
(() => {
const h = this.Item({ label: 'fork', texture: 'blank', carrying: 'fork_carrying', x: 218, y: -13, offset: 1000, use: {
player: [`p:"i wonder what's for dinner..."`, `p:"it's a fork"`],
}, });
h.spr.width = 30;
h.spr.height = 60;
return h;