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

function finale.init()
  character():breakUpParty(getPlayerSprite())

  AddEnclosureZone("lucas", "hotspring_enclosure")

  MoveSpriteToWarp("kuma", "kumatora_start")
  SetDirection("kuma", Direction.UP)
  SetAnimation("kuma", "swim_still")
  MakeSpriteSolid("kuma")
  SetInteractionScript("kuma", "talk_to_kuma")

  MoveSpriteToWarp("duster", "duster_start")
  SetDirection("duster", Direction.RIGHT)
  SetAnimation("duster", "swim_still")
  MakeSpriteSolid("duster")
  SetInteractionScript("duster", "talk_to_duster")

  MoveSpriteToWarp("boney", "boney_start")
  SetDirection("boney", Direction.DOWN)
  SetAnimation("boney", "asleep")

  finale.WaitForMovement(15000)

  StartCutscene()

  if gamestate.approached_doria then
    DisplayMessage("* Kuma?\n\f* ... You know that people love you, right?", "Duster", SpeakerType.MAN)
    WaitForEndOfMessage()

    Delay(1000)

    SetDirection("kuma", Direction.UP_RIGHT)
    Delay(100)

    SetDirection("kuma", Direction.RIGHT)
    Delay(1000)

    DisplayMessage("* ......... Fuck you, Duster.", "Kumatora", SpeakerType.WOMAN)
    WaitForEndOfMessage()

    Delay(1000)

    SetDirection("kuma", Direction.UP_RIGHT)
    Delay(100)

    SetDirection("kuma", Direction.UP)
    Delay(1000)

    DisplayMessage("* Yeah... fuck me, I guess.", "Duster", SpeakerType.MAN)
    WaitForEndOfMessage()
  end

  HideCutsceneBars()
end

function finale.WaitForMovement(length)
  sprite = getSprite(getSpriteByAlias("lucas"))
  while length > 0 do
    dt = coroutine.yield()
    if sprite.characterState == CharacterState.WALKING then
      length = length - dt
    end
  end
end

function finale.talk_to_kuma()
  SetDirection("kuma", Direction.UP)
  StartCutscene()
  DisplayMessage("* Kumatora doesn't respond.\n\f* She is grumbling to herself, and picking at the grass growing over the wall.", "", SpeakerType.NONE)
  WaitForEndOfMessage()
  HideCutsceneBars()
end

function finale.talk_to_duster()
  SetDirection("duster", Direction.RIGHT)
  StartCutscene()
  DisplayMessage("* Duster doesn't respond.\n\f* He is simply staring at his own reflection in the water.", "", SpeakerType.NONE)
  WaitForEndOfMessage()
  HideCutsceneBars()
end