-
Notifications
You must be signed in to change notification settings - Fork 0
/
temp
2057 lines (1784 loc) · 84.4 KB
/
temp
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
require "library.Polygamy.init" "./library/Polygamy/"
gui = require "quickie"
soundmanager = {}
soundmanager.currentsong = nil
function love.conf(t)
t.identity = "Canterbury Trails" -- The name of the save directory (string)
t.version = "0.9.1" -- The LÖVE version this game was made for (string)
t.console = false -- Attach a console (boolean, Windows only)
t.window.title = "Canterbury Trails" -- The window title (string)
t.window.icon = "assets/splashLogo.png" -- Filepath to an image to use as the window's icon (string)
t.window.width = 800 -- The window width (number)
t.window.height = 600 -- The window height (number)
t.window.borderless = true -- Remove all border visuals from the window (boolean)
t.window.resizable = false -- Let the window be user-resizable (boolean)
t.window.minwidth = 800 -- Minimum window width if the window is resizable (number)
t.window.minheight = 600 -- Minimum window height if the window is resizable (number)
t.window.fullscreen = false -- Enable fullscreen (boolean)
t.window.fullscreentype = "normal" -- Standard fullscreen or desktop fullscreen mode (string)
t.window.vsync = true -- Enable vertical sync (boolean)
t.window.fsaa = 8 -- The number of samples to use with multi-sampled antialiasing (number)
t.window.display = 1 -- Index of the monitor to show the window in (number)
t.window.highdpi = true -- Enable high-dpi mode for the window on a Retina display (boolean). Added in 0.9.1
t.window.srgb = true -- Enable sRGB gamma correction when drawing to the screen (boolean). Added in 0.9.1
end
function soundmanager:play(sndData)
if soundmanager.currentSong ~= nil then
love.audio.stop(soundmanager.currentSong)
end
soundmanager.currentSong = sndData
love.audio.play(sndData)
end
--update
function soundmanager:update()
if soundmanager.currentSong:isStopped() then love.audio.play(soundmanager.currentSong) end
end
theEnd = Polygamy.state( "End" )
function theEnd.before()
timer = 7
end
function theEnd.update(dt)
timer = timer - dt
if timer < 0 then
Polygamy.state.polyStateSet("Credits") end
gui.Label{text = "The End", align="center", pos = gui.screenPercent({0.25,0.1}), size=gui.screenPercent({0.5,0.3}) }
gui.Image{ pos = {0,0}, size= gui.screenPercent({1,1}), image=canterburyIMG }
end
function theEnd.draw()
gui.preDraw()
gui.postDraw()
end
function theEnd.after()
end
--{name, character, text, options = {{"string", functioN() 2 3...}, resault = {1 2, 3...} }
function newChatState(w)
state = Polygamy.state(w.name)
state.before = function()
end
state.update = function(dt)
if(type(w.choices) == "table")
then
n = #w.choices
else
n = 0
end
panelTop = (0.6-(n*0.075))
gui.Panel({text = w.character.name, align="left", pos = gui.screenPercent({0.1, panelTop}), size=gui.screenPercent({0.2, 0.05})})
gui.Panel({text = w.text, pos = gui.screenPercent({0.1, panelTop+0.05}), size=gui.screenPercent({0.8, 0.3})})
if n>0 then
for key,value in pairs(w.choices) do
if gui.Button{text = w.choices[key][1], pos=gui.screenPercent({0.1,(0.90-(3*n*0.025))+key*3*0.025}), size=gui.screenPercent({0.8,0.05}), widgetHit=nil, draw=nil} then
w.choices[key][2]()
end
end
end
gui.Image{ pos = {(gui.screenWidth()-(gui.imageSizeH(panelTop+0.35,w.character.image)[1]))/2, 0}, size= gui.imageSizeH(panelTop+0.35,w.character.image), image=w.character.image }
gui.Image{ pos = gui.screenPercent({0,0}), size= gui.screenPercent({1,1}), image=backgroundIMG }
end
state.draw = function()
gui.preDraw()
gui.postDraw()
end
state.after = function()
end
return state
end
--[[Geoffrey Pilgrim
Host
Reeve
Knight
Squire
Merchant
Monk
Miller
Prioress
Nun's Priest
Wife of Bath
Prioress
--]]
characters = {}
characters.host = {}
characters.host.image = love.graphics.newImage("assets/host.png")
characters.host.name = "The Host"
characters.reeve = {}
characters.reeve.image = love.graphics.newImage("assets/reeve.png")
characters.reeve.name = "The Reeve"
characters.knight = {}
characters.knight.image = love.graphics.newImage("assets/knight.png")
characters.knight.name = "Knight"
characters.squire = {}
characters.squire.image = love.graphics.newImage("assets/squire.png")
characters.squire.name = "The Squire"
characters.merchant = {}
characters.merchant.image = love.graphics.newImage("assets/merchent.png")
characters.merchant.name = "The Merchant"
characters.monk = {}
characters.monk.image = love.graphics.newImage("assets/monk.png")
characters.monk.name = "The Monk"
characters.miller = {}
characters.miller.image = love.graphics.newImage("assets/miller.png")
characters.miller.name = "The Miller"
characters.prioress = {}
characters.prioress.image = love.graphics.newImage("assets/prioress.png")
characters.prioress.name = "The Prioress"
characters.nunsPreist = {}
characters.nunsPreist.image = love.graphics.newImage("assets/nunPriest.png")
characters.nunsPreist.name = "Nun's Priest"
characters.wifeOfBath = {}
characters.wifeOfBath.image = love.graphics.newImage("assets/wife.png")
characters.wifeOfBath.name = "Wife of Bath"
characters.pardoner = {}
characters.pardoner.image = love.graphics.newImage("assets/pardoner.png")
characters.pardoner.name = "The Pardoner"
stages = {}
stages[1] = {}
stages[2] = {}
stages[3] = {}
stages[4] = {}
stages[5] = {}
stages[6] = {}
stages[7] = {}
stages[1].nextStage = stages[2]
stages[2].nextStage = stages[3]
stages[3].nextStage = stages[4]
stages[4].nextStage = stages[5]
stages[5].nextStage = stages[6]
stages[6].nextStage = stages[7]
stages[7].nextStage = nil
stages[1].avalibleCharacters = {}
stages[2].avalibleCharacters = {}
stages[3].avalibleCharacters = {}
stages[4].avalibleCharacters = {}
stages[5].avalibleCharacters = {}
stages[6].avalibleCharacters = {}
stages[7].avalibleCharacters = {}
stages[1].characterAction = {}
stages[2].characterAction = {}
stages[3].characterAction = {}
stages[4].characterAction = {}
stages[5].characterAction = {}
stages[6].characterAction = {}
stages[7].characterAction = {}
stages[1].stageMusic = town
stages[2].stageMusic = town
stages[3].stageMusic = road
stages[4].stageMusic = town
stages[5].stageMusic = road
stages[6].stageMusic = town
stages[7].stageMusic = road
stages[1].merchentShopUnlocked = false
stages[2].merchentShopUnlocked = true
stages[3].merchentShopUnlocked = false
stages[4].merchentShopUnlocked = true
stages[5].merchentShopUnlocked = false
stages[6].merchentShopUnlocked = true
stages[7].merchentShopUnlocked = false
stages[1].stateMapText = "Your party is taking a short break."
stages[1].introMapText = "Your journey continues... Your party decides to take a short break."
stages[1].continueRejection = "Shouldn't you talk to the knight first?"
stages[1].avalibleCharacters[1] = characters.knight
stages[1].characterAction[1] = function()
Polygamy.state.polyStateSet("Knight1-1")
end
newChatState({ name = "Knight1-1", character = characters.knight, text = "Hello, Geoffrey! A pleasure to see you, as always.", choices = {
{"Hello, Sir Knight. How are you doing?", function()
Polygamy.state.polyStateSet("Knight1-2") end},
{"Tell me more about yourself.", function()
Polygamy.state.polyStateSet("Knight1-3") end},
{"Tell me a story.", function()
canContinue = true
Polygamy.state.polyStateSet("KnightInstructions") end},
{"Goodbye.", function()
Polygamy.state.polyStateSet("Menu") end}
}})
newChatState({ name = "Knight1-2", character = characters.knight, text = "I’m fairly good, thanks. Just worried about my son. Prancing around like he’s the salt of the earth. You know how kids are…", choices = {
{"So, tell me more about yourself.", function()
Polygamy.state.polyStateSet("Knight1-3") end},
{"Tell me a story.", function()
canContinue = true
Polygamy.state.polyStateSet("KnightInstructions") end},
{"Goodbye.", function()
Polygamy.state.polyStateSet("Menu") end}
}})
newChatState({ name = "Knight1-3", character = characters.knight, text = "Myself? Well, I’ve seen many a battle. I was at the conquering of Alexandria, quite by accident actually. I’m honestly not as great of a knight as others seem to think I am. I was only at the table in Prussia because I was invited by a friend. I actually served most of my time as a mercenary. I’m really not a great knight.", choices = {
{"...", function()
Polygamy.state.polyStateSet("Knight1-4") end}
}})
newChatState({ name = "Knight1-4", character = characters.squire, text = "Dad, stop being so humble! I’ll tell you myself: he was at Ayas and Attalia when they were won. He’s fought more in Lithuania and Russia than any other Christian Knight. He’s fought in Turkey, Granada, Benmarin, and the Mediterranean, all with great success. He’s an amazing knight! Of course, he’s far too meek to tell you any of this himself.", choices = {
{"...", function()
Polygamy.state.polyStateSet("Knight1-5") end}
}})
newChatState({ name = "Knight1-5", character = characters.knight, text = "[The Knight seems embarrassed by this exposition of his talents. You shouldn’t press him much further.]", choices = {
{"Tell me a story.", function()
canContinue = true
Polygamy.state.polyStateSet("KnightInstructions") end},
{"Goodbye.", function()
Polygamy.state.polyStateSet("Menu") end}
}})
----------------------------------------------------------------------------------------------------------------------------
stages[2].avalibleCharacters[1] = characters.squire
stages[2].avalibleCharacters[2] = characters.monk
stages[2].characterAction[1] = function()
Polygamy.state.polyStateSet("Squire1-1")
end
stages[2].characterAction[2] = function()
Polygamy.state.polyStateSet("Monk1-1")
end
talkedtoMonk = false
talkedtoSquire = false
stages[2].stateMapText = "You are resting at a small tavern"
stages[2].introMapText = "Your journey continues... Your party rests at a small tavern."
stages[2].continueRejection = "You should talk to the Squire and the Monk first!"
newChatState({ name = "Squire1-1", character = characters.squire, text = "Hullo, Mr. Pilgrim. Seen any young women about lately?", choices = {
{"No, why do yo ask?", function()
Polygamy.state.polyStateSet("Squire1-2") end},
{"Tell me about yourself.", function()
Polygamy.state.polyStateSet("Squire1-3") end},
{"Goodbye.", function()
Polygamy.state.polyStateSet("Menu") end}
}})
newChatState({ name = "Squire1-2", character = characters.squire, text = "Darn. I just wrote this amazing love ballad and I was hoping that you’d know of a nice lady I could court. Do you want to hear it?", choices = {
{"No, that's okay. Tell me about yourself.", function()
Polygamy.state.polyStateSet("Squire1-3") end},
{"No thanks. Goodbye.", function()
Polygamy.state.polyStateSet("Menu") end}
}})
newChatState({ name = "Squire1-3", character = characters.squire, text = "Oh, okay! Well, I’m a great songwriter and musician, if I do say so myself. I’ve been on several cavalry raids already, and I even have a lady waiting for me back home! Of course, that doesn’t mean that I can’t flirt once or twice while I’m on the road with my father. I can even draw and write. Are you sure you don’t want to hear that song?", choices = {
{"Sure, I'd love to hear it.", function()
Polygamy.state.polyStateSet("Squire1-4") end}
}})
newChatState({ name = "Squire1-4", character = characters.squire, text = "Wonderous! *The Squire begins to sing a song.* Thanks for listening!", choices = {
{"A pleasure. Goodbye.", function()
talkedToSquire = true
stages[2].continueRejection = "You should talk to the Monk first!"
stages[2].continueRejection = "You should talk to the Monk first!"
if talkedToSquire and talkedToMonk then
canContinue = true
end
Polygamy.state.polyStateSet("Menu") end}
}})
newChatState({ name = "Monk1-1", character = characters.monk, text = "Greetings, Mr. Pilgrim. Pleasure to meet you again.", choices = {
{"Tell me about yourself.", function()
Polygamy.state.polyStateSet("Monk1-2") end},
{"Teach me how to hunt.", function()
Polygamy.state.polyStateSet("Monk1-3") end},
{"Goodbye.", function()
Polygamy.state.polyStateSet("Menu") end}
}})
newChatState({ name = "Monk1-2", character = characters.monk, text = " Well, the first thing that you should know about me is that I do enjoy a good spot of hunting every once in a while. All those books that those old stuffy monks wrote about living in cells aren’t worth an oyster! Why shouldn’t we get out and do good in the world once in a while? There are many sights to see in the world, and many beautiful women to meet. My favorite activity, above all, is hunting. The thrill of the chase is like no other.", choices = {
{"Teach me how to hunt.", function()
Polygamy.state.polyStateSet("Monk1-3") end},
{"Interesting. Goodbye.", function()
Polygamy.state.polyStateSet("Menu") end}
}})
newChatState({ name = "Monk1-3", character = characters.monk, text = "Sure thing...\n\n***HUNTING UNLOCKED***", choices = {
{"Thank you so much. Goodbye.", function()
canHunt = true
stages[2].continueRejection = "You should talk to the Squire first!"
talkedToMonk = true
if talkedToSquire and talkedToMonk then
canContinue = true
end
Polygamy.state.polyStateSet("Menu") end}
}})
----------------------------------------------------------------------------------------------------------------------------------------------------
stages[3].avalibleCharacters[1] = characters.miller
stages[3].characterAction[1] = function()
Polygamy.state.polyStateSet("Miller1-1")
end
stages[3].stateMapText = "Your party is taking a short break."
stages[3].introMapText = "Your journey continues... Your party decides to take a short break."
stages[3].continueRejection = "You should talk to the Miller first!"
newChatState({ name = "Miller1-1", character = characters.miller, text = "Hey! Who bothers me now - oh, it’s just you. Well, I guess you’re alright.", choices = {
{"Tell me about yourself.", function()
Polygamy.state.polyStateSet("Miller1-2") end},
{"Tell me a story.", function()
canContinue=true
Polygamy.state.polyStateSet("MillerInstructions") end},
{"Goodbye.", function()
Polygamy.state.polyStateSet("Menu") end}
}})
newChatState({ name = "Miller1-2", character = characters.miller, text = "Oh, well I like to play the bagpipes, and I’m quite good at grinding grain for folks. Sometimes I even grind too much, and end up with the leftovers! On the other hand, when I don’t grind enough, I mix some old grain in with the new, but don’t tell the customers that… (He nudges you and winks.) I do love a good joke, as well. Have you heard the one about the cuckold and the eunuch? So, an eunuch, a cuckold, and a wench walk into a tavern… \n(You really don’t want to hear this joke. It’s bound to be absolutely vulgar. )", choices = {
{"Nevermind that. Tell me a story.", function()
canContinue=true
Polygamy.state.polyStateSet("MillerInstructions") end},
{"Goodbye.", function()
Polygamy.state.polyStateSet("Menu") end}
}})
----------------------------------------------------------------------------------------------------------------------------------------------------------
stages[4].avalibleCharacters[1] = characters.pardoner
stages[4].avalibleCharacters[2] = characters.reeve
stages[4].stateMapText = "You are resting at a small tavern"
stages[4].introMapText = "Your journey continues... Your party rests at a small tavern."
stages[4].continueRejection = "You should talk to the Pardoner and the Reeve first!"
talkedToPardoner = false
talkedToReeve = false
stages[4].characterAction[1] = function()
Polygamy.state.polyStateSet("Pardoner1-1")
end
newChatState({ name = "Pardoner1-1", character = characters.pardoner, text = "Well, hello there, good sir.", choices = {
{"Tell me about yourself.", function()
Polygamy.state.polyStateSet("Pardoner1-2") end},
{"Tell me a story.", function()
Polygamy.state.polyStateSet("Pardoner1-3") end},
{"Goodbye.", function()
Polygamy.state.polyStateSet("Menu") end}
}})
newChatState({ name = "Pardoner1-2", character = characters.pardoner, text = "I have all sorts of relics. I have everything from the shoulder bone of a holy Jew’s sheep to a piece of the shroud of the Virgin Mary herself. Would you be interested in buying a pardon?... is what I would say if you were in the crowds of people that throng about when I visit churches. You seem to have a good head about you, lad, so I won’t try to sell you anything just yet.", choices = {
{"Tell me a story.", function()
Polygamy.state.polyStateSet("Pardoner1-3") end},
{"Goodbye.", function()
Polygamy.state.polyStateSet("Menu") end}
}})
newChatState({ name = "Pardoner1-3", character = characters.pardoner, text = "You’re going to need to hand me a draught of moist and malty ale before I tell you any stories.", choices = {
{"Give the Pardoner some of your Ale", function() --This should detract ale from your inbox...
Polygamy.state.polyStateSet("Pardoner1-4") end},
{"I don't have any ale. Goodbye.", function()
Polygamy.state.polyStateSet("Menu") end}
}})
newChatState({ name = "Pardoner1-4", character = characters.pardoner, text = "Alright, I’ve had some ale, so I’ll show you a bit of my sermon. ", choices = {
{"...", function()
Polygamy.state.polyStateSet("Pardoner1-5") end}
}})
newChatState({ name = "Pardoner1-5", character = characters.pardoner, text = "I usually tell them this story about these three guys who find “death” underneath a tree, but death is really a pile of gold. The moral of the story is that you should never give in to the evils of greed and avarice. Of course, my very job involves greed, since the pardons I sell aren’t actually real. The people are so gullible, aren’t they? In all seriousness, you do want to buy a pardon, don’t you? (He calls over to the Host.) Hey, most gracious host, why don’t you become the first customer? Step right up and open up your purse!", choices = {
{"...", function()
Polygamy.state.polyStateSet("Pardoner1-6") end}
}})
newChatState({ name = "Pardoner1-6", character = characters.host, text = "Who do you think you are?!? Why I oughta… I’d rather hold your severed testicles than any holy object of yours!", choices = {
{"...", function()
Polygamy.state.polyStateSet("Pardoner1-7") end},
}})
newChatState({ name = "Pardoner1-7", character = characters.knight, text = "Calm down, calm down. Come on you two, be gracious to each other. We still have quite a ways to go.", choices = {
{"...", function()
Polygamy.state.polyStateSet("Pardoner1-8") end},
}})
newChatState({ name = "Pardoner1-8", character = characters.host, text = "...Alright, fine. I guess I’ll let it slide this time.", choices = {
{"...", function()
Polygamy.state.polyStateSet("Pardoner1-9") end},
}})
newChatState({ name = "Pardoner1-9", character = characters.pardoner, text = "Well, I never knew our host could be so rude. So, do you want to buy a pardon? You never know when you might need it!", choices = {
{"No thank you. Goodbye.", function()
pardonerShopUnlocked = true
talkedToPardoner = true
if talkedToPardoner and talkedToReeve then
canContinue = true
end
Polygamy.state.polyStateSet("Menu") end}
}})
stages[4].characterAction[2] = function()
Polygamy.state.polyStateSet("Reeve1-1")
end
newChatState({ name = "Reeve1-1", character = characters.reeve, text = "grumble grumble… mutter… that stupid Miller, oh how i hate him… grumble", choices = {
{"Hello?", function()
Polygamy.state.polyStateSet("Reeve1-2") end}
}})
newChatState({ name = "Reeve1-2", character = characters.reeve, text = "What? Huh? Oh, it’s you. You’re a pretty decent fellow.", choices = {
{"How are you doing?", function()
Polygamy.state.polyStateSet("Reeve1-3") end},
{"Tell me more about yourself.", function()
Polygamy.state.polyStateSet("Reeve1-8") end},
{"Tell me a story.", function()
Polygamy.state.polyStateSet("Reeve1-9") end},
{"Goodbye.", function()
Polygamy.state.polyStateSet("Menu") end}
}})
newChatState({ name = "Reeve1-3", character = characters.reeve, text = "To tell the truth, I’m pretty angry right now. That Miller just made a complete fool of me. ", choices = {
{"...", function()
Polygamy.state.polyStateSet("Reeve1-4") end}
}})
newChatState({ name = "Reeve1-4", character = characters.miller, text = "Hey, Oswald, you still beating yourself up over that story? Calm down, it was just a joke!", choices = {
{"...", function()
Polygamy.state.polyStateSet("Reeve1-5") end}
}})
newChatState({ name = "Reeve1-5", character = characters.reeve, text = "Go away, or I might tell a story of a miller being tricked as well.", choices = {
{"...", function()
Polygamy.state.polyStateSet("Reeve1-6") end}
}})
newChatState({ name = "Reeve1-6", character = characters.miller, text = "What harm can that do? I should say that you should be proud of the carpenter in my story! He managed to snag himself a beautiful woman, and what do you have? ", choices = {
{"...", function()
Polygamy.state.polyStateSet("Reeve1-7") end}
}})
newChatState({ name = "Reeve1-7", character = characters.reeve, text = "You’re making a fool of yourself. Go away; you’re drunk. \n\n(The Miller leaves.)\n\nHe makes me so angry!", choices = {
{"Tell me about yourself.", function()
Polygamy.state.polyStateSet("Reeve1-8") end},
{"Tell me a story.", function()
Polygamy.state.polyStateSet("Reeve1-9") end},
{"Goodbye.", function()
Polygamy.state.polyStateSet("Menu") end}
}})
newChatState({ name = "Reeve1-8", character = characters.reeve, text = "I used to be a carpenter, but I managed to get a job as a reeve quite a few years back. I’m quite feared by the common people, and I do a very good job of keeping tabs on my lord’s property. He actually rewarded me with this cloak I’m wearing. I originally hail from Norfolk, near the town of Bawdswell. I always try to stay as far away from that stupid Miller as possible, since he always manages to infuriate me.", choices = {
{"Tell me a story.", function()
Polygamy.state.polyStateSet("Reeve1-9") end},
{"Goodbye.", function()
Polygamy.state.polyStateSet("Menu") end}
}})
newChatState({ name = "Reeve1-9", character = characters.reeve, text = "Agh, I’m so mad, I don’t think I can tell a coherent story right now. I’m certainly too old for this. It would probably be a story about making a cuckold and a fool out of a miller.", choices = {
{"Goodbye.", function()
stages[4].continueRejection = "You should talk to the Pardoner first!"
talkedToReeve = true
if talkedToPardoner and talkedToReeve then
canContinue = true
end
Polygamy.state.polyStateSet("Menu") end}
}})
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
stages[5].avalibleCharacters[1] = characters.wifeOfBath
stages[5].stateMapText = "Your party is taking a short break."
stages[5].introMapText = "Your journey continues... Your party decides to take a short break."
stages[5].continueRejection = "You should talk to the Wife of Bath first!"
stages[5].characterAction[1] = function()
Polygamy.state.polyStateSet("Wife-1")
end
newChatState({ name = "Wife-1", character = characters.wifeOfBath, text = "Well, hello there, love. You seem like a fine young man. ", choices = {
{"How are you doing?", function()
Polygamy.state.polyStateSet("Wife-2") end},
{"Tell me more about yourself.", function()
Polygamy.state.polyStateSet("Wife-3") end},
{"Tell me a story.", function()
Polygamy.state.polyStateSet("WifeOfBathInstructions") end},
{"Goodbye.", function()
Polygamy.state.polyStateSet("Menu") end}
}})
newChatState({ name = "Wife-2", character = characters.wifeOfBath, text = "Oh, quite well, thank you. This trip is turning out to be fun, isn’t it? (The Wife of Bath winks at the Squire, who blushes and turns away.)", choices = {
{"So, tell me more about yourself.", function()
Polygamy.state.polyStateSet("Wife-3") end},
{"Tell me a story.", function()
canContinue = true
Polygamy.state.polyStateSet("WifeOfBathInstructions") end},
{"Goodbye.", function()
Polygamy.state.polyStateSet("Menu") end}
}})
newChatState({ name = "Wife-3", character = characters.wifeOfBath, text = "Of course I can tell you a little about myself, love. I’ve had five husbands since I was twelve years old, so I find myself very qualified to discuss the important matters of chastity and marriage. I believe first and foremost that chastity is overrated. The Apostle only suggests that chastity is a good idea. The people who want to remain chaste can go right ahead. As the Bible states, a lord has wooden dishes in his house as well as gold. I say that if we have the organs for it, we should use them! God gave us reproductive capabilities for a reason. I also say that the woman should have control over her husband’s body for all his life, just as the Apostle says. (You think to yourself that her Bible interpretations are a bit of a stretch.)", choices = {
{"...", function()
Polygamy.state.polyStateSet("Wife-4") end}
}})
newChatState({ name = "Wife-4", character = characters.pardoner, text = "Now, Miss, you are quite good at preaching on this subject. I might even say you are a better preacher than myself. I was actually about to take a wife, but your story has convinced me that it would be more punishment than reward to do so!", choices = {
{"...", function()
Polygamy.state.polyStateSet("Wife-5") end}
}})
newChatState({ name = "Wife-5", character = characters.wifeOfBath, text = "My story hasn’t even started yet! Return to your spot in line. I will tell you after I’ve finished talking to the kind Pilgrim here.\n(The Pardoner leaves.)\nWhat a poor sap. You remember what I said about having the organs for it? Well, he is one that was... meant to be chaste. Poor soul.\nAny questions?", choices = {
{"Tell me more about your husbands.", function()
canContinue = true
Polygamy.state.polyStateSet("WifeOfBathInstructions") end},
{"Goodbye.", function()
Polygamy.state.polyStateSet("Menu") end}
}})
--------------------------------------------------------------------------------------------------------------------------------------------------------------
stages[6].avalibleCharacters[1] = characters.prioress
stages[6].avalibleCharacters[2] = characters.host
stages[6].stateMapText = "You are resting at a small tavern"
stages[6].introMapText = "Your journey continues... Your party rests at a small tavern."
stages[6].continueRejection = "You should talk to the Prioress and the Host first!"
talkedToPrioress = false
talkedToHost = false
stages[6].characterAction[1] = function()
Polygamy.state.polyStateSet("Prioress-1")
end
newChatState({ name = "Prioress-1", character = characters.prioress, text = "BONJOUR, MON AMI. COMMENT ALLEZ-VOUS?", choices = {
{"Please talk in English.", function()
Polygamy.state.polyStateSet("Prioress-2") end},
}})
newChatState({ name = "Prioress-2", character = characters.prioress, text = "Oh, JE ME EXCUSE, dear. I was just practicing my French. Hello, dear. How are you doing?", choices = {
{"Fine, thanks. And you?", function()
Polygamy.state.polyStateSet("Prioress-3") end},
{"Tell me about yourself.", function()
Polygamy.state.polyStateSet("Prioress-4") end},
{"Goodbye.", function()
Polygamy.state.polyStateSet("Menu") end}
}})
newChatState({ name = "Prioress-3", character = characters.prioress, text = " I’m doing quite well myself, thank you for asking. My pooch and I were about to share a nice piece of fantaisie dried steak. (She pulls out a piece of beef jerky.) They told me not to bring any pups, but I managed to sneak my favorite dog with me on the trip. Isn’t that right, poochy woochy? \n(She blows kisses inside her bag. A small yelp comes from inside.)", choices = {
{"Tell me about yourself.", function()
Polygamy.state.polyStateSet("Prioress-4") end},
{"Goodbye.", function()
Polygamy.state.polyStateSet("Menu") end}
}})
newChatState({ name = "Prioress-4", character = characters.prioress, text = "Me? Oh, well my name is Madam Eglantine, and I absolutely adore the French language. I have never been to Paris proper, but I’ve studied French and can speak it quite well, vous ne pensez pas? It’s very important to be a proper lady, such as the ladies in the courts of France. Naturally, I always eat politely, and finish every last crumb on my plate, for to do otherwise would be rude. I also have several pups, who are only to be fed with the finest bread and meat possible. They’re absolutely adorable, aren’t they, poochy smoochy wooch! \n(She blows more kisses to her dog.) \nOh yes, and I have a nun and three priests accompanying me. They help me fetch food for my dogs.", choices = {
{"Thank you. Goodbye.", function()
talkedToPrioress = true
if talkedToPrioress and talkedToHost then
canContinue = true
end
Polygamy.state.polyStateSet("Menu") end}
}})
stages[6].characterAction[2] = function()
Polygamy.state.polyStateSet("Host-1")
end
newChatState({ name = "Host-1", character = characters.host, text = "Well, hello there! Are you enjoying the trip so far?", choices = {
{"Yes, it’s quite nice.", function()
Polygamy.state.polyStateSet("Host-2") end},
{"Yes. How are you doing?", function()
Polygamy.state.polyStateSet("Host-3") end},
{"Tell me about yourself.", function()
Polygamy.state.polyStateSet("Host-4") end},
{"Goodbye.", function()
Polygamy.state.polyStateSet("Menu") end}
}})
newChatState({ name = "Host-2", character = characters.host, text = "It truly is. You know, I doubted myself at first when I decided to lead all of you to Canterbury, but I figured that everyone would return to my inn afterwards if I came along. It’s good business, good business indeed.", choices = {
{"How are you doing?", function()
Polygamy.state.polyStateSet("Host-3") end},
{"Tell me about yourself.", function()
Polygamy.state.polyStateSet("Host-4") end},
{"Goodbye.", function()
Polygamy.state.polyStateSet("Menu") end}
}})
newChatState({ name = "Host-3", character = characters.host, text = "I’m doing quite well, thank you. It’s nice to get out of the inn once in a while.", choices = {
{"Tell me about yourself.", function()
Polygamy.state.polyStateSet("Host-4") end},
{"Goodbye.", function()
Polygamy.state.polyStateSet("Menu") end}
}})
newChatState({ name = "Host-4", character = characters.host, text = "Alright! As you know, I am the owner of the inn that you met this group at. I love to tell jokes, and I came up with the idea for everyone to tell stories to one another. It really makes the trip go by faster. I’m certainly glad I came along with you all, as long as you buy a nice hearty supper the minute we get back to the inn! (He laughs)", choices = {
{"Thank you. Goodbye.", function()
talkedToHost = true
if talkedToPrioress and talkedToHost then
canContinue = true
end
Polygamy.state.polyStateSet("Menu") end}
}})
------------------------------------------------------------------------------------------------------------------------------------------------------------
stages[7].avalibleCharacters[1] = characters.nunsPreist
stages[7].stateMapText = "Your party is taking a short break."
stages[7].introMapText = "Your journey continues... Your party decides to take a short break."
stages[7].continueRejection = "You should talk to the Nun's Preist first!"
stages[7].characterAction[1] = function()
Polygamy.state.polyStateSet("Priest-1")
end
newChatState({ name = "Priest-1", character = characters.prioress, text = "Priest, fetch me a new steak and the finest bread for my pooch! Immediately- oh, hello, Mr. Geoffrey. I didn’t see you there. How are you?", choices = {
{"Fine, thanks. Mind if I borrow your priest for a bit?", function()
Polygamy.state.polyStateSet("Priest-2") end},
}})
newChatState({ name = "Priest-2", character = characters.prioress, text = "Oh, PAS DU TOUT, not at all! As they say in France, L'EAU SOUS LE PONT.", choices = {
{"...", function()
Polygamy.state.polyStateSet("Priest-3") end},
}})
newChatState({ name = "Priest-3", character = characters.nunsPreist, text = "Thanks for getting me out of there. I really appreciate it.", choices = {
{"Tell me about yourself.", function()
Polygamy.state.polyStateSet("Priest-4") end},
{"Tell me a story.", function()
canContinue = true
Polygamy.state.polyStateSet("PriestInstructions") end},
{"Goodbye.", function()
Polygamy.state.polyStateSet("Menu") end}
}})
newChatState({ name = "Priest-4", character = characters.nunsPreist, text = "Oh, I don’t do much. I just assist the Prioress.", choices = {
{"Tell me a story.", function()
canContinue = true;
Polygamy.state.polyStateSet("PriestInstructions") end},
{"Goodbye.", function()
Polygamy.state.polyStateSet("Menu") end}
}})
welcome = Polygamy.state( "Welcome Screen" )
function welcome.before()
soundmanager:play(mainMenu)
end
function welcome.update(dt)
gui.Label{text = "Canterbury Trails", align="center", pos = gui.screenPercent({0.25,0.1}), size=gui.screenPercent({0.5,0.3}) }
if gui.Button{text = "Begin Your Pilgrimage", pos=gui.screenPercent({0.25,0.5}), size=gui.screenPercent({0.5,0.5/4}), widgetHit=nil, draw=nil} then
Polygamy.state.polyStateSet("Character Select")
end
if gui.Button{text = "Options", pos=gui.screenPercent({0.25,0.5+(0.5/4)*2}), size=gui.screenPercent({0.5/5,0.5/4}), widgetHit=nil, draw=nil} then
Polygamy.state.polyStateSet("Options")
end
if gui.Button{text = "High Scores", pos=gui.screenPercent({0.25+0.5/5*4,0.5+(0.5/4)*2}), size=gui.screenPercent({0.5/5,0.5/4}), widgetHit=nil, draw=nil} then
Polygamy.state.polyStateSet("High Scores")
end
if gui.Button{text = "Credits", pos=gui.screenPercent({0.25+0.5/5*2,0.5+(0.5/4)*2}), size=gui.screenPercent({0.5/5,0.5/4}), widgetHit=nil, draw=nil} then
Polygamy.state.polyStateSet("Credits")
end
gui.Image{ pos = {0,0}, size= gui.screenPercent({1,1}), image=backgroundIMG }
end
function welcome.draw()
gui.preDraw()
gui.postDraw()
end
function welcome.after()
end
welcome = Polygamy.state( "Map" )
mapText = "Your journy conintues... until you stop for a rest at a small tavern...."
function welcome.before()
end
function welcome.update(dt)
gui.Label{text = mapText, align = "center", pos = gui.screenPercent({0.1,0}), size = gui.screenPercent({0.8,0.2})}
if gui.Button{text = "Close map", pos=gui.screenPercent({0.1,(0.90-(3*1*0.025))+1*3*0.025}), size=gui.screenPercent({0.8,0.05})} then
Polygamy.state.polyStateSet("Menu")
end
gui.Image{ pos = gui.screenPercent({0.2,0.2}), size= gui.screenPercent({0.6,0.6}), image=mapImg }
end
function welcome.draw()
gui.preDraw()
gui.postDraw()
end
function welcome.after()
end
scores = Polygamy.state( "Character Select" )
function scores.before()
end
function scores.update(dt)
if gui.Button{text = "Select", pos=gui.screenPercent({0.21-0.128,0.888-.1077}), size=gui.screenPercent({0.138,0.1277}),} then
Polygamy.state.polyStateSet("Begin")
end
gui.Image{ pos = {0,0}, size= gui.screenPercent({1,1}), image=selectIMG }
end
function scores.draw()
gui.preDraw()
gui.postDraw()
end
function welcome.after()
end
welcome = Polygamy.state( "Options" )
function welcome.before()
end
fullCheck = false
sliderData = {value = 1, min = 0, max = 1, step = 1/20}
function welcome.update(dt)
if gui.Checkbox{checked= fullCheck, nil, "CENTER", pos=gui.screenPercent({0.40,0.4}), size=gui.screenPercent({0.1,0.1})} then
fullCheck = not fullCheck
love.window.setFullscreen(fullCheck)
end
gui.Label{text = "Fullscreen", align="left", pos = gui.screenPercent({0.25,0.4}), size=gui.screenPercent({0.15,0.1}) }
gui.Label{text = "Volume", align="left", pos = gui.screenPercent({0.25,0.5}), size=gui.screenPercent({0.15,0.1}) }
if gui.Slider{info = sliderData, vertical=false, pos = gui.screenPercent({0.40,0.5}), size=gui.screenPercent({0.3,0.1})} then
love.audio.setVolume(sliderData.value)
end
if gui.Button{text = "Back", pos=gui.screenPercent({0.25+0.5/5*2,0.5+(0.5/4)*2}), size=gui.screenPercent({0.5/5,0.5/4}),} then
Polygamy.state.polyStateSet("Welcome Screen")
end
gui.Image{ pos = {0,0}, size= gui.screenPercent({1,1}), image=optionsIMG }
end
function welcome.draw()
gui.preDraw()
gui.postDraw()
end
function welcome.after()
end
welcome = Polygamy.state( "Credits" )
function welcome.before()
h = 1
end
function welcome.update(dt)
h = h- dt*0.1
if h < -3.5 then
Polygamy.state.polyStateSet("Splash Screen")
end
end
function welcome.draw()
gui.preDraw()
gui.Label{text = "Canterbury Trails", align="center", pos = gui.screenPercent({0,h}), size=gui.screenPercent({1,0.1}) }
gui.Label{text = "Avery Whitaker - Executive Software Producer", align="center", pos = gui.screenPercent({0,h+0.2}), size=gui.screenPercent({1,0.05}) }
gui.Label{text = "Emily Newman - Executive Writer and Occasional Codemonkey", align="center", pos = gui.screenPercent({0,h+0.3}), size=gui.screenPercent({1,0.05}) }
gui.Label{text = "Ada Seger-Brown - Executive Artist", align="center", pos = gui.screenPercent({0,h+0.4}), size=gui.screenPercent({1,0.05}) }
gui.Label{text = "Ms. Vail - Commissioner and Bestower of A+s", align="center", pos = gui.screenPercent({0,h+0.5}), size=gui.screenPercent({1,0.05}) }
gui.Label{text = "Geoffrey Chaucer - Chief Author", align="center", pos = gui.screenPercent({0,h+0.6}), size=gui.screenPercent({1,0.05}) }
gui.Label{text = "Music", align="center", pos = gui.screenPercent({0,h+0.8}), size=gui.screenPercent({1,0.1}) }
gui.Label{text = "Oizen by Barbarian Pipe Band ", align="center", pos = gui.screenPercent({0,h+0.9}), size=gui.screenPercent({1,0.05}) }
gui.Label{text = "Mitdans by Barbarian Pipe Band", align="center", pos = gui.screenPercent({0,h+1.0}), size=gui.screenPercent({1,0.05}) }
gui.Label{text = "Der Trollentanz by Castle Dreams", align="center", pos = gui.screenPercent({0,h+1.1}), size=gui.screenPercent({1,0.05}) }
gui.Label{text = "Anon by Firesea ", align="center", pos = gui.screenPercent({0,h+1.2}), size=gui.screenPercent({1,0.05}) }
gui.Label{text = "Gweharall by Mervent", align="center", pos = gui.screenPercent({0,h+1.3}), size=gui.screenPercent({1,0.05}) }
gui.Label{text = "Cantec din vremea ciumei by Miezul Noptii", align="center", pos = gui.screenPercent({0,h+1.4}), size=gui.screenPercent({1,0.05}) }
gui.Label{text = "Cetatea de Colt by Miezul Noptii", align="center", pos = gui.screenPercent({0,h+1.5}), size=gui.screenPercent({1,0.05}) }
gui.Label{text = "Impromptus II by Miezul Noptii", align="center", pos = gui.screenPercent({0,h+1.6}), size=gui.screenPercent({1,0.05}) }
gui.Label{text = "Maravillos et piadosos by Trouvere", align="center", pos = gui.screenPercent({0,h+1.7}), size=gui.screenPercent({1,0.05}) }
gui.Label{text = "Rokatanc by Vox Vulgaris", align="center", pos = gui.screenPercent({0,h+1.8}), size=gui.screenPercent({1,0.05}) }
gui.Label{text = "Made with LÖVE", align="center", pos = gui.screenPercent({0,h+2.0}), size=gui.screenPercent({1,0.1}) }
gui.Label{text = "Game Engine: love2D https://www.love2d.org/", align="center", pos = gui.screenPercent({0,h+2.1}), size=gui.screenPercent({1,0.05}) }
gui.Label{text = "Polygamy library: Pierre-Yves Gérardy", align="center", pos = gui.screenPercent({0,h+2.2}), size=gui.screenPercent({1,0.05}) }
gui.Label{text = "Deborah Alexander: Fox, Egg and Chicken Sprites", align="center", pos = gui.screenPercent({0,h+2.3}), size=gui.screenPercent({1,0.05}) }
gui.Label{text = "-", align="center", pos = gui.screenPercent({0,h+2.4}), size=gui.screenPercent({1,0.1}) }
gui.postDraw()
end
function welcome.after()
end
scores = Polygamy.state( "High Scores" )
function scores.before() end
fullCheck = false
volume=0
function scores.update(dt)
if gui.Button{text = "Back", pos=gui.screenPercent({0.25+0.5/5*2,0.5+(0.5/4)*2}), size=gui.screenPercent({0.5/5,0.5/4}),} then
Polygamy.state.polyStateSet("Welcome Screen") end
gui.Image{ pos = {0,0}, size= gui.screenPercent({1,1}), image=scoreIMG }
end
function scores.draw()
gui.preDraw()
gui.postDraw()
end
function welcome.after()
end
splash = Polygamy.state( "Splash Screen" )
function splash.before()
loveFont = love.graphics.newFont("assets/ThrowMyHandsUpintheAirBold.ttf", 30)
love.graphics.setFont(loveFont)
intro.logox = intro.logo:getWidth()
intro.logoy = intro.logo:getHeight()
intro.cColor = {0,0,0,255}
intro.tColor = {131,192,240,0}
intro.lColor = {255,255,255,255}
time = 0
end
intro = {logo = love.graphics.newImage("assets/splashLogo.png"),
r = 0,
scalex = 0.75,
scaley = 0.75,
}
function splash.update(dt)
intro.sizex = intro.logox * intro.scalex
intro.sizey = intro.logoy * intro.scaley
intro.x = (love.graphics.getWidth()/2) - (intro.sizex/2)
intro.y = (love.graphics.getHeight()/2) - (intro.sizey/2)
intro.cx = love.graphics.getWidth()/2
intro.cy = love.graphics.getHeight()/2
if time > 70 and time <= 120 then
intro.cColor[1] = intro.cColor[1] + (1 * 255/51)
intro.cColor[2] = intro.cColor[2] + (1 * 255/51)
intro.cColor[3] = intro.cColor[3] + (1 * 255/51)
elseif time > 150 and time < 250 then
intro.cColor[4] = intro.cColor[4] - (1 * 256/99)
elseif time > 300 and time < 400 then
intro.tColor[4] = intro.tColor[4] + (1 * 255/100)
elseif time > 800 and time < 1000 then
intro.lColor[4] = intro.lColor[4] - (1 * 255/200)
intro.tColor[4] = intro.tColor[4] - (1 * 255/201)
elseif time > 1100 then
Polygamy.state.polyStateSet("Welcome Screen")
end
time = time + 1
delta = dt
end
function splash.draw()
love.graphics.setColor(intro.lColor)
love.graphics.draw(intro.logo, intro.x, intro.y, 0, intro.scalex, intro.scaley, 0,0)
love.graphics.setColor(intro.cColor)
love.graphics.circle("fill", intro.cx-2, intro.cy-2, (intro.sizex/2)+5, 100)
love.graphics.setColor(intro.tColor)
love.graphics.printf( "Brought to you by the Humanities", (love.graphics.getWidth()/2) - (intro.sizex - 50), (love.graphics.getHeight()/2) + (intro.sizey/2), 600, "center", 0, 1, 1, 0, 0, 0, 0 )
love.graphics.setColor(255,255,255,255)
end
function splash.after()
w,h = love.window.getDesktopDimensions()
love.window.setMode(w,h, {resizable = true, borderless = false, minwidth = 400, minheight = 300, x = 0, y = 0})
end
millerGame = Polygamy.state( "Miller" )
function newMan(i,j, t)
table.insert(men, {x = i, y = j, status = "down", type = t})
end
function millerGame.before()
men = {}
playerX=0.5
womanX=0.5
womanTarget=0.5
playerW=0.05
gameScore = 0
powX=-1
heartX=-1
heartBadX=-1
lose = false
powTimer = 0
heartTimer = 0
womanTimer = 0
womanTime = 1
spawnCounter = 0
speed = 0.001
Polygamy.keyboard.use( "Miller" )
physicsWorld = love.physics.newWorld(-800,-600,800,600,0,1.1)
end
function millerGame.after()
Polygamy.keyboard.use( "" )
soundmanager:play(stageMusic)
end
function millerGame.update(dt)
if lose == false then
gameScore = gameScore + dt*speed*1000
end
playerMove = dt*7*0.1
physicsWorld:update(dt)
spawnCounter = spawnCounter + dt
womanTimer = womanTimer - dt
if womanTimer < 0 and lose == false then
heartX=womanX
heartTimer = 0
womanTarget = math.random()*0.8+0.1
womanTimer = (math.random()*4+6)*(speed*1000)
womanTime = womanTimer
end
womanX = womanX+ (womanTarget-womanX)*((womanTime-womanTimer)/womanTime)
if spawnCounter > 1 then
spawnCounter = spawnCounter - 1
if math.random() < 0.2 then
newMan(math.random()*0.8+0.1, -0.25,"super")
else
newMan(math.random()*0.8+0.1, -0.25,"normal")
end
speed = speed*1.01
end
powTimer = powTimer + dt
heartTimer = heartTimer + dt
if(powTimer > 0.1) then
powX = -1
end
if(heartX+playerW > playerX and heartX < playerX+playerW) then
heartX = -1
gameScore = gameScore + 20
end
if(heartTimer > 3) then
heartX = -1
end
for key, value in ipairs(men) do
if(value.y > 0.8) then
value.status="lost"
lose = true
heartBadX = value.x-0.025
womanTarget = value.x-0.05
end
if(value.x+playerW > playerX and value.x < playerX+playerW and value.y > 0.45 and value.status == "down") then
value.status = "hit"
powX = value.x
powTimer = 0
end
if(value.status == "down" and lose == false) then
if value.type == "super" then
value.y = value.y + speed*2
else
value.y = value.y + speed
end
elseif value.status == "hit" or value.status == "down" and lose == true then
value.y = value.y - speed * 10
else
value.y = 0.8
end
end
end
Polygamy.keyboard( "Miller" ):setConfig( "held", {
["right"] = function() if playerX + playerMove < 1-playerW then playerX = playerX + playerMove end end,
["left"] = function() if playerX + playerMove > 0 then playerX = playerX - playerMove end end
})
function millerGame.draw()
gui.preDraw()
if lose == true then