diff options
Diffstat (limited to 'res/scripts')
| -rw-r--r-- | res/scripts/common.lua | 21 | ||||
| -rw-r--r-- | res/scripts/hallucination_hot_spring.lua | 26 | ||||
| -rw-r--r-- | res/scripts/underwater.lua | 21 | ||||
| -rw-r--r-- | res/scripts/underwater_start.lua | 8 |
4 files changed, 56 insertions, 20 deletions
| diff --git a/res/scripts/common.lua b/res/scripts/common.lua index af25333..e95f6f1 100644 --- a/res/scripts/common.lua +++ b/res/scripts/common.lua | |||
| @@ -34,6 +34,10 @@ CutsceneOptions = { | |||
| 34 | DO_NOT_CHANGE_ANIMATION = 1 -- Prevents player party animation being set to "frozen" at the start of a cutscene or "still" at the end | 34 | DO_NOT_CHANGE_ANIMATION = 1 -- Prevents player party animation being set to "frozen" at the start of a cutscene or "still" at the end |
| 35 | } | 35 | } |
| 36 | 36 | ||
| 37 | ChangeMapOptions = { | ||
| 38 | DO_NOT_FADE = 1 -- Prevents fading to and from black | ||
| 39 | } | ||
| 40 | |||
| 37 | gamestate = {} | 41 | gamestate = {} |
| 38 | 42 | ||
| 39 | --- Yields until the specified amount of time has passed. | 43 | --- Yields until the specified amount of time has passed. |
| @@ -129,6 +133,11 @@ function GetPosition(spriteName) | |||
| 129 | return sprite.loc | 133 | return sprite.loc |
| 130 | end | 134 | end |
| 131 | 135 | ||
| 136 | function SetPosition(spriteName, x, y) | ||
| 137 | local spriteId = getSpriteByAlias(spriteName) | ||
| 138 | transform():moveSprite(spriteId, vec2i.new(x, y)) | ||
| 139 | end | ||
| 140 | |||
| 132 | function SetDirection(spriteName, dir) | 141 | function SetDirection(spriteName, dir) |
| 133 | local spriteId = getSpriteByAlias(spriteName) | 142 | local spriteId = getSpriteByAlias(spriteName) |
| 134 | animation():setSpriteDirection(spriteId, dir) | 143 | animation():setSpriteDirection(spriteId, dir) |
| @@ -239,18 +248,24 @@ function SetPartyAnimation(spriteId, animName) | |||
| 239 | end | 248 | end |
| 240 | end | 249 | end |
| 241 | 250 | ||
| 242 | function ChangeMap(map, warp) | 251 | function ChangeMap(map, warp, options) |
| 252 | options = options or 0 | ||
| 253 | |||
| 243 | local playerId = getPlayerSprite() | 254 | local playerId = getPlayerSprite() |
| 244 | local playerSprite = getSprite(playerId) | 255 | local playerSprite = getSprite(playerId) |
| 245 | local direction = playerSprite.dir | 256 | local direction = playerSprite.dir |
| 246 | 257 | ||
| 247 | playerSprite.controllable = false | 258 | playerSprite.controllable = false |
| 248 | FadeToBlack(150) | 259 | if (options & ChangeMapOptions.DO_NOT_FADE == 0) then |
| 260 | FadeToBlack(150) | ||
| 261 | end | ||
| 249 | loadMap(map) | 262 | loadMap(map) |
| 250 | character():transplantParty(playerId, getWarpPoint(warp), direction) | 263 | character():transplantParty(playerId, getWarpPoint(warp), direction) |
| 251 | 264 | ||
| 252 | coroutine.yield() | 265 | coroutine.yield() |
| 253 | RemoveFadeout(150) | 266 | if (options & ChangeMapOptions.DO_NOT_FADE == 0) then |
| 267 | RemoveFadeout(150) | ||
| 268 | end | ||
| 254 | playerSprite.controllable = true | 269 | playerSprite.controllable = true |
| 255 | end | 270 | end |
| 256 | 271 | ||
| diff --git a/res/scripts/hallucination_hot_spring.lua b/res/scripts/hallucination_hot_spring.lua index df4084c..4e3ca44 100644 --- a/res/scripts/hallucination_hot_spring.lua +++ b/res/scripts/hallucination_hot_spring.lua | |||
| @@ -15,15 +15,20 @@ end | |||
| 15 | 15 | ||
| 16 | function hallucination_hot_spring.enter_hot_spring() | 16 | function hallucination_hot_spring.enter_hot_spring() |
| 17 | if gamestate.ionia_in_water then | 17 | if gamestate.ionia_in_water then |
| 18 | StartCutscene(CutsceneOptions.DO_NOT_CHANGE_ANIMATION) | 18 | -- Soft cutscene start; don't show bars but do take away control |
| 19 | getSprite(getPlayerSprite()).controllable = false | ||
| 20 | character():halt(getPlayerSprite()) | ||
| 21 | |||
| 22 | -- Leave the rest of the party behind and have Lucas wade into the hot spring | ||
| 19 | character():breakUpParty(getPlayerSprite()) | 23 | character():breakUpParty(getPlayerSprite()) |
| 20 | getSprite(getPlayerSprite()).paused = false | ||
| 21 | character():moveInDirection(getPlayerSprite(), Direction.UP) | 24 | character():moveInDirection(getPlayerSprite(), Direction.UP) |
| 22 | Delay(500) | 25 | Delay(500) |
| 23 | character():stopDirecting(getPlayerSprite()) | 26 | character():stopDirecting(getPlayerSprite()) |
| 24 | getSprite(getPlayerSprite()).paused = true | ||
| 25 | SetDirection("lucas", Direction.DOWN) | 27 | SetDirection("lucas", Direction.DOWN) |
| 26 | Delay(1000) | 28 | Delay(1000) |
| 29 | |||
| 30 | -- Show the cutscene bars when he gets surprised | ||
| 31 | StartCutscene(CutsceneOptions.DO_NOT_CHANGE_ANIMATION) | ||
| 27 | ShowExpression("lucas", "surprise") | 32 | ShowExpression("lucas", "surprise") |
| 28 | Delay(1000) | 33 | Delay(1000) |
| 29 | RemoveExpression("lucas") | 34 | RemoveExpression("lucas") |
| @@ -32,6 +37,21 @@ function hallucination_hot_spring.enter_hot_spring() | |||
| 32 | Delay(200) | 37 | Delay(200) |
| 33 | PlaySound("splash_submerge.wav") | 38 | PlaySound("splash_submerge.wav") |
| 34 | WaitForAnimation("lucas") | 39 | WaitForAnimation("lucas") |
| 40 | Delay(1000) | ||
| 41 | |||
| 42 | -- After we fade to black, move the rest of the party offscreen. | ||
| 43 | -- We need to remove control again right after the map change because | ||
| 44 | -- ChangeMap automatically gives it back. | ||
| 45 | FadeToBlack(1000) | ||
| 46 | HideCutsceneBars() | ||
| 47 | SetPosition("kuma", -100, -100) | ||
| 48 | SetPosition("duster", -100, -100) | ||
| 49 | SetPosition("boney", -100, -100) | ||
| 50 | ChangeMap("underwater_start", "spawn", ChangeMapOptions.DO_NOT_FADE) | ||
| 51 | getSprite(getPlayerSprite()).controllable = false | ||
| 52 | Delay(500) | ||
| 53 | RemoveFadeout(1000) | ||
| 54 | getSprite(getPlayerSprite()).controllable = true | ||
| 35 | end | 55 | end |
| 36 | end | 56 | end |
| 37 | 57 | ||
| diff --git a/res/scripts/underwater.lua b/res/scripts/underwater.lua index cc6d085..602c8d4 100644 --- a/res/scripts/underwater.lua +++ b/res/scripts/underwater.lua | |||
| @@ -1,57 +1,50 @@ | |||
| 1 | underwater = {} | 1 | underwater = {} |
| 2 | 2 | ||
| 3 | function underwater.fish1() | ||
| 4 | StartCutscene() | ||
| 5 | DisplayMessage("* You deserved what she did to you.", "Fish", SpeakerType.BOY) | ||
| 6 | WaitForEndOfMessages() | ||
| 7 | HideCutsceneBars() | ||
| 8 | end | ||
| 9 | |||
| 10 | function underwater.fish2() | 3 | function underwater.fish2() |
| 11 | StartCutscene() | 4 | StartCutscene() |
| 12 | DisplayMessage("* What are you complaining about?\nYou're so powerful now...\n\fYou owe it all to her.", "Fish", SpeakerType.BOY) | 5 | DisplayMessage("* What are you complaining about?\nYou're so powerful now...\n\fYou owe it all to her.", "Fish", SpeakerType.BOY) |
| 13 | WaitForEndOfMessages() | 6 | WaitForEndOfMessage() |
| 14 | HideCutsceneBars() | 7 | HideCutsceneBars() |
| 15 | end | 8 | end |
| 16 | 9 | ||
| 17 | function underwater.fish3() | 10 | function underwater.fish3() |
| 18 | StartCutscene() | 11 | StartCutscene() |
| 19 | DisplayMessage("* You wanted to become stronger, and now you're stronger. Quit crying.\n\f* Oh wait, that wasn't you.\n\fThat was Claus.\n\fYou were totally willing to stay at home and cry.", "Fish", SpeakerType.BOY) | 12 | DisplayMessage("* You wanted to become stronger, and now you're stronger. Quit crying.\n\f* Oh wait, that wasn't you.\n\fThat was Claus.\n\fYou were totally willing to stay at home and cry.", "Fish", SpeakerType.BOY) |
| 20 | WaitForEndOfMessages() | 13 | WaitForEndOfMessage() |
| 21 | HideCutsceneBars() | 14 | HideCutsceneBars() |
| 22 | end | 15 | end |
| 23 | 16 | ||
| 24 | function underwater.fish4() | 17 | function underwater.fish4() |
| 25 | StartCutscene() | 18 | StartCutscene() |
| 26 | DisplayMessage("* You think it hurt when your PSI unlocked?\n\fJust picture what it was like for Claus.", "Fish", SpeakerType.BOY) | 19 | DisplayMessage("* You think it hurt when your PSI unlocked?\n\fJust picture what it was like for Claus.", "Fish", SpeakerType.BOY) |
| 27 | WaitForEndOfMessages() | 20 | WaitForEndOfMessage() |
| 28 | HideCutsceneBars() | 21 | HideCutsceneBars() |
| 29 | end | 22 | end |
| 30 | 23 | ||
| 31 | function underwater.fish5() | 24 | function underwater.fish5() |
| 32 | StartCutscene() | 25 | StartCutscene() |
| 33 | DisplayMessage("* What did Aeolia do to your brother?\n\fStrangle him?\n\fPush him down a flight of stairs?\n\fMaybe it was in the hot spring just like you.", "Fish", SpeakerType.BOY) | 26 | DisplayMessage("* What did Aeolia do to your brother?\n\fStrangle him?\n\fPush him down a flight of stairs?\n\fMaybe it was in the hot spring just like you.", "Fish", SpeakerType.BOY) |
| 34 | WaitForEndOfMessages() | 27 | WaitForEndOfMessage() |
| 35 | HideCutsceneBars() | 28 | HideCutsceneBars() |
| 36 | end | 29 | end |
| 37 | 30 | ||
| 38 | function underwater.fish6() | 31 | function underwater.fish6() |
| 39 | StartCutscene() | 32 | StartCutscene() |
| 40 | DisplayMessage("* Still, you're probably eager to get your revenge. You don't fool me.\n\f* You have everyone else fooled but you can't fool yourself.", "Fish", SpeakerType.BOY) | 33 | DisplayMessage("* Still, you're probably eager to get your revenge. You don't fool me.\n\f* You have everyone else fooled but you can't fool yourself.", "Fish", SpeakerType.BOY) |
| 41 | WaitForEndOfMessages() | 34 | WaitForEndOfMessage() |
| 42 | HideCutsceneBars() | 35 | HideCutsceneBars() |
| 43 | end | 36 | end |
| 44 | 37 | ||
| 45 | function underwater.fish7() | 38 | function underwater.fish7() |
| 46 | StartCutscene() | 39 | StartCutscene() |
| 47 | DisplayMessage("* There's only three left.\nAnd after Mixolydia, it'll be her.", "Fish", SpeakerType.BOY) | 40 | DisplayMessage("* There's only three left.\nAnd after Mixolydia, it'll be her.", "Fish", SpeakerType.BOY) |
| 48 | WaitForEndOfMessages() | 41 | WaitForEndOfMessage() |
| 49 | HideCutsceneBars() | 42 | HideCutsceneBars() |
| 50 | end | 43 | end |
| 51 | 44 | ||
| 52 | function underwater.fish8() | 45 | function underwater.fish8() |
| 53 | StartCutscene() | 46 | StartCutscene() |
| 54 | DisplayMessage("* I bet you can't wait to wrap your hands around her needle,\n\fand\n\fpull\n\fas\n\fhard\n\fas\n\fyou\n\fcan.", "Fish", SpeakerType.BOY) | 47 | DisplayMessage("* I bet you can't wait to wrap your hands around her needle,\n\fand\n\fpull\n\fas\n\fhard\n\fas\n\fyou\n\fcan.", "Fish", SpeakerType.BOY) |
| 55 | WaitForEndOfMessages() | 48 | WaitForEndOfMessage() |
| 56 | HideCutsceneBars() | 49 | HideCutsceneBars() |
| 57 | end | 50 | end |
| diff --git a/res/scripts/underwater_start.lua b/res/scripts/underwater_start.lua new file mode 100644 index 0000000..fe582ab --- /dev/null +++ b/res/scripts/underwater_start.lua | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | underwater_start = {} | ||
| 2 | |||
| 3 | function underwater_start.talk_to_fish1() | ||
| 4 | StartCutscene() | ||
| 5 | DisplayMessage("* You deserved what she did to you.", "Fish", SpeakerType.BOY) | ||
| 6 | WaitForEndOfMessage() | ||
| 7 | HideCutsceneBars() | ||
| 8 | end \ No newline at end of file | ||
