summary refs log tree commit diff stats
path: root/res/scripts/map2.lua
blob: c929e8d09cd1d962412c7d36e758cf1d2787c261 (plain) (blame)
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
map2 = {}

function map2.off_left()
  ChangeMap("map1", "fromRight")
end

function map2.mailbox1()
  StartCutscene()
  DisplayMessage("* The mailbox lid is open...\n* Peek inside?", "", SpeakerType.NONE)
  ShowChoice("Yes", "No")
  WaitForEndOfMessage()

  if GetChoiceSelection() == 0 then
    DisplayMessage("* There are lots of postcards inside.\n* Read them?", "", SpeakerType.NONE)
    ShowChoice("Yes", "No")
    WaitForEndOfMessage()

    if GetChoiceSelection() == 0 then
      DisplayMessage("* The boy named Lucas is crying at a grave.\n\f* The boy named Lucas and his dog are loitering in the forest.\n\f* The boy named Lucas is getting into trouble in the mountains.\n\f* The boy named Lucas stole Beanoff from our garden.\n\f* The boy named Lucas is bullying animals.\n\f* The boy named Lucas learned some bad magic.\n\f* The boy named Lucas ......\n\f* The boy named Lucas ......\n\f* The boy named Lucas ......\n\f* The boy named Lucas .........\n\f* The mailbox let out a tremendous scream.", "", SpeakerType.NONE)
      WaitForEndOfMessage()
    end
  end

  HideCutsceneBars()
end

function map2.mailbox_lightning()
  StartCutscene()
  DisplayMessage("* The mailbox lid is open...\n* Peek inside?", "", SpeakerType.NONE)
  ShowChoice("Yes", "No")
  WaitForEndOfMessage()

  if GetChoiceSelection() == 1 then
    HideCutsceneBars()
    return
  end

  FadeMap(500, 0.5)
  WaitForMapFade()

  DisplayMessage("* ...?", "", SpeakerType.NONE)
  WaitForEndOfMessage()

  PlaySound("lightning_crackle.wav")
  Delay(1196)

  local lucasPos = GetPosition("lucas")
  CreateAnimatedSpriteAtPosition("lightning_from_mailbox", "lightning", lucasPos:x() + 56, lucasPos:y() - 72, "strike", Direction.DOWN_LEFT, SpriteLayer.ABOVE)

  ShakeCamera(66)
  PlaySound("lightning_explosion.wav")
  SetDirection("lucas", Direction.DOWN)
  SetAnimation("lucas", "lightning_electrocute!")
  WaitForAnimation("lucas")

  StopShakingCamera()
  DestroyNamedSprite("lightning_from_mailbox")
  SetAnimation("lucas", "lightning_collapse!")
  WaitForAnimation("lucas")

  FadeMap(500, 0.0)
  WaitForMapFade()

  DisplayMessage("* It was lightning.\n\fAh.", "", SpeakerType.NONE)
  WaitForEndOfMessage()
  HideCutsceneBars()
end

function map2.approach_doria()
  if gamestate.approached_doria then
    return
  end

  gamestate.approached_doria = true

  StartCutscene()
  PanToSprite("doria", 2000)
  WaitForPan()

  SetDirection("doria", Direction.DOWN_RIGHT)
  SetAnimation("doria", "talk")
  DisplayMessage("* Oh my!\n\f* Is that our little Kumatora I spy? `", "Doria", SpeakerType.MAN)
  WaitForEndOfMessage()

  SetAnimation("doria", "still")
  ReturnCamera(2000)
  Delay(1000)
  SetAnimation("kuma", "talk")
  DisplayMessage("* Doria...?\n\f* What the hell... You're still alive?", "Kumatora", SpeakerType.WOMAN)
  WaitForEndOfMessage()

  SetAnimation("kuma", "still")
  Delay(1000)

  SetAnimation("doria", "talk")
  DisplayMessage("* It is! It is her!\n\f* Such style! Such swagger!\nWhy, just as if she were Magifolk herself! `\n* When Ionia showed us the human she was looking after, I hardly knew what to think.", "Doria", SpeakerType.MAN)
  WaitForEndOfMessage()

  SetDirection("doria", Direction.DOWN)
  SetAnimation("doria", "hearts")
  DisplayMessage("* But what a lovely lady you've become!\n\f* You've made this old girl cry with pride! `", "Doria", SpeakerType.MAN)
  WaitForEndOfMessage()

  SetDirection("doria", Direction.DOWN_RIGHT)
  SetAnimation("doria", "talk")
  DisplayMessage("* Now I shudder to think how I'll move on once your short human life is over.\n* Ooh, get another one, I suppose!\nYes, we'll just get another human. `\nAnd the new Kumatora will be just as good, no, better than the last one!", "Doria", SpeakerType.MAN)
  WaitForEndOfMessage()

  SetDirection("doria", Direction.DOWN)
  SetAnimation("doria", "hairflip!")
  WaitForAnimation("doria")

  SetAnimation("doria", "still")
  Delay(1000)

  SetAnimation("kuma", "talk")
  DisplayMessage("* H-hey, what do you mean <new Kumatora>?", "Kumatora", SpeakerType.WOMAN)
  WaitForEndOfMessage()

  HideCutsceneBars()
end