summaryrefslogtreecommitdiff
path: root/game/soul.rpy
blob: 00c0c6a1af110c3d0a30c5a126d33ce062077193 (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
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
#################################################################################
#     This file is part of Mana Launcher.
#     Copyright (C) 2021  Jesusalva <jesusalva@tmw2.org>
#
#     Distributed under the MIT license, except for Steam parts.
#################################################################################
screen soulmsg(smessage):
    zorder 100
    if mySoul is not None:
      fixed:
        frame:
            background Frame("images/default.png", 0, 0)
            xalign 0.5
            yalign 0.5
            xminimum 0.85
            xmaximum 0.85
            yminimum 0.8
            ymaximum 0.8
            label "{color=#FFF}%s{/color}" % smessage:
                xalign 0.5
                yalign 0.5
        frame:
            yalign 0.9
            xalign 0.9
            xmaximum 240
            button:
                xmaximum 240
                ymaximum 40
                action Return(None)
                fixed:
                    #add Frame("gui/button/choice_hover_background.png", 0, 0)
                    text _("OK »"):
                        color "#000"
                        xalign 0.5
                        yalign 0.5



#################################################################################
screen soul_linking(smessage):
    zorder 100
    if mySoul is not None:
      fixed:
        frame:
            background Frame("images/default.png", 0, 0)
            xalign 0.5
            yalign 0.5
            xminimum 0.85
            xmaximum 0.85
            yminimum 0.8
            ymaximum 0.8
            label "{color=#FFF}%s{/color}" % smessage:
                xalign 0.5
                yalign 0.0
            vbox:
              xalign 0.1
              yalign 0.5
              hbox:
                label _("Email: ")
                $ input=Input(
                    value=UEditorInputValue("mail", "a@a.com", "str"),
                    copypaste=True,
                    allow="qwertyuiopasdfghjklçzxcvbnm QWERTYUIOPASDFGHJKLÇZXCVBNM1234567890-+=!(),.:;@_",
                    length=52)
                button:
                    #key_events True
                    action input.enable
                    add input
              hbox:
                spacing 10
                label _("Username: ")
                # For some reason, we don't accept all ascii special codes
                # WARNING: Non-ascii will break the hashing.
                $ input=Input(
                    value=UEditorInputValue("pasd", "user", "str"),
                    copypaste=True,
                    allow="qwertyuiopasdfghjklçzxcvbnm QWERTYUIOPASDFGHJKLÇZXCVBNM1234567890-+=!(),.:;@*^_|",
                    length=52)
                button:
                    #key_events True
                    action input.enable
                    add input
        frame:
            yalign 0.9
            xalign 0.9
            xmaximum 240
            button:
                xmaximum 240
                ymaximum 40
                action Return(None)
                fixed:
                    #add Frame("gui/button/choice_hover_background.png", 0, 0)
                    text _("OK »"):
                        color "#000"
                        xalign 0.5
                        yalign 0.5



#################################################################################
screen souldata():
    zorder 100
    if mySoul is not None:
      fixed:
        frame:
            background Frame("images/default.png", 0, 0)
            xalign 0.5
            yalign 0.5
            xminimum 0.85
            xmaximum 0.85
            yminimum 0.8
            ymaximum 0.8
            hbox:
                null width 320
                null width 40
                vbox:
                    null height 20
                    label "{b}{color=#FFF}%s{/color}{/b}" % mySoul["name"]
                    null height 20
                    hbox:
                        label "{color=#FFF}0{/color}"
                        null width 20
                        bar:
                            value mySoul["exp"]
                            range mySoul["next"]
                            xmaximum 0.5
                        null width 20
                        label "{color=#FFF}%d{/color}" % mySoul["next"]
                    null height 30
                    hbox:
                        label "{color=#FFF}%s %d{/color}" % (_("Level"), mySoul["level"])
                        #button Level up
                        null width 60
                        label "{color=#FFF}%s %s{/color}" % (_("Home world: "), mySoul["home"])
                        if mySoul["home"] in ["Not Set", _("Not Set")]:
                            null width 30
                            textbutton _("Set »"):
                                background Frame("gui/frame.png", 0, 0)
                                xysize (100, 40)
                                action Return("sethome")
                                tooltip _("Sets a homeworld")
                    null height 30
                    ## TODO: Linking, Unlinking, 2FA, Password
                    hbox:
                        textbutton _("Manage Account"):
                            background Frame("gui/frame.png", 0, 0)
                            xysize (300, 40)
                            action Return("managevault")
                            tooltip _("Changes your account settings")
                        #textbutton _("Contact Support"):
                        #    background Frame("gui/frame.png", 0, 0)
                        #    xysize (100, 40)
                        #    action None
                        #    tooltip _("Contacts support staff")
                    ## TODO: Other stuff
                    null height 30
                    label "{color=#FFF}%s{/color}" % _("Scene Recollection")
                    vpgrid:
                        cols 2
                        spacing 5
                        draggable True
                        mousewheel True
                        scrollbars "vertical"
                        side_xalign 0.5
                        if mySoul["level"] >= 0:
                            textbutton _("Prologue"):
                                background Frame("gui/frame.png", 0, 0)
                                xysize (200, 40)
                                action Return("intro")
                                tooltip _("Replay the prologue.")
                        if persistent.firstlake:
                            textbutton _("First Lake"):
                                background Frame("gui/frame.png", 0, 0)
                                xysize (200, 40)
                                action Return("ch1lake")
                                tooltip _("Replay the first lake.")
                        if mySoul["level"] >= 1:
                            textbutton _("Chapt. 2"):
                                background Frame("gui/frame.png", 0, 0)
                                xysize (200, 40)
                                action Return("ch2intro")
                                tooltip _("Replay the 2nd Intro.")
                        if persistent.secondlake:
                            textbutton _("Second Lake"):
                                background Frame("gui/frame.png", 0, 0)
                                xysize (200, 40)
                                action Return("ch2lake")
                                tooltip _("Replay the 2nd lake.")
        frame:
            yalign 0.9
            xalign 0.9
            xmaximum 240
            button:
                xmaximum 240
                ymaximum 40
                action Return(None)
                fixed:
                    #add Frame("gui/button/choice_hover_background.png", 0, 0)
                    text _("Return »"):
                        color "#000"
                        xalign 0.5
                        yalign 0.5



#################################################################################
screen accountdata():
    zorder 100
    if mySoul is not None:
      fixed:
        frame:
            background Frame("images/default.png", 0, 0)
            xalign 0.5
            yalign 0.5
            xminimum 0.85
            xmaximum 0.85
            yminimum 0.8
            ymaximum 0.8
            vbox:
                null height 20
                if not persistent.steam:
                    label "{b}{color=#FFF}%s{/color}{/b}" % _("Account Management")
                    null height 20
                    ## TODO: 2FA, Password, etc (hbox)
                    hbox:
                        spacing 5
                        textbutton _("Reset password"):
                            background Frame("gui/frame.png", 0, 0)
                            xysize (250, 40)
                            action None
                            tooltip _("Changes your password")
                        textbutton _("Reset Two Factor"):
                            background Frame("gui/frame.png", 0, 0)
                            xysize (250, 40)
                            action Return(["2fa", None])
                            tooltip _("Enables or disables 2FA")
                else:
                    label "{b}{color=#FFF}%s{/color}{/b}" % _("Steam Account")

                null height 30
                label "{b}{color=#FFF}%s{/color}{/b}" % _("World Management")
                null height 30
                ## Link/Unlink
                vpgrid:
                    cols 3
                    yspacing 30
                    xspacing 10
                    draggable True
                    mousewheel True
                    scrollbars "vertical"
                    side_xalign 0.5
                    left_margin 60
                    xfill True
                    ymaximum 0.6
                    for srv in persistent.serverlist:
                        ## CR cannot be linked/unlinked
                        if srv["Name"] in ["The Crossroads", "Crossroads"]:
                            continue
                        ## Worlds and options
                        label "{size=-6}{a=%s}%s{/a}{/size}" % (srv["Link"], srv["Name"])
                        textbutton _("Link Account"):
                            background Frame("gui/frame.png", 0, 0)
                            xysize (200, 40)
                            action Return(["link", srv])
                            tooltip _("Links an external account to Vault")
                        textbutton _("Unlink"):
                            background Frame("gui/frame.png", 0, 0)
                            xysize (200, 40)
                            action Return(["unlink", srv])
                            tooltip _("Removes a Vault account for manual login")
                    null height 40 # Padding
        frame:
            yalign 0.9
            xalign 0.9
            xmaximum 240
            button:
                xmaximum 240
                ymaximum 40
                action Return(None)
                fixed:
                    #add Frame("gui/button/choice_hover_background.png", 0, 0)
                    text _("Return »"):
                        color "#000"
                        xalign 0.5
                        yalign 0.5



#################################################################################
init python:
    class ManaSparkle(object):
        def __init__(self, spd=25, multi=True):
            self.sm = SpriteManager(update=self.update)
            self.items = [ ]
            if multi:
                d = Transform("images/EnBallBlue.png", zoom=.05)
                for i in range(0, 80):
                    self.add(d, renpy.random.randint(spd, spd*2))
            d = Transform("images/EnBallBlue.png", zoom=.10)
            for i in range(0, 45):
                self.add(d, renpy.random.randint(spd, spd*2))
            d = Transform("images/EnBallBlue.png", zoom=.25)
            for i in range(0, 10):
                self.add(d, renpy.random.randint(spd, spd*2))
            d = Transform("images/EnBallBlue.png", zoom=.40)
            for i in range(0, 5):
                self.add(d, renpy.random.randint(spd, spd*2))
        def add(self, d, speed):
            s = self.sm.create(d)
            startx = renpy.random.randint(0, 1200)
            starty = renpy.random.randint(400, 720)
            vect = renpy.random.randint(0, 4)
            self.items.append((s, startx, starty, vect, speed))
        def update(self, st):
            for s, startx, starty, vect, speed in self.items:
                if vect % 2 == 0:
                    s.x = (startx + speed * st) % 1300
                else:
                    s.x = (startx - speed * st) % 1300
                if vect % 2 == 1:
                    s.y = (starty - speed * st) % 800
                else:
                    s.y = (starty + speed * st) % 800
            return 0

#################################################################################
label thevoid:
    $ progress = 0
    $ mySoul = None
    $ renpy.invoke_in_thread(load_souldata)
    scene DKBG
    show expression (ManaSparkle().sm) as flare
    with Dissolve(1.0)
    # Block the main thread until the socket connection is done
    show expression Text(_("{color=#FFF}Loading user data...{/color}")) at truecenter as loader
    with None
    python:
        while progress < 100:
            if responsive:
                sdelay()
            else:
                responsive = True
                break
    hide loader with None
    if mySoul is not None:
        ## Setup
        python:
            if persistent.steam:
                mySoul["name"] = steam.get_persona_name()
            else:
                mySoul["name"] = _("Wanderer")

        ## You may have leveled up - catch it first and show cutscene
        if mySoul["up"]:
            if (mySoul["level"] == 0):
                call intro
            elif (mySoul["level"] == 1):
                call ch2intro

        ## Loop
        $ loop = True
        while loop:
            call screen souldata()
            if isinstance(_return, str):
                $ renpy.call_in_new_context(_return)
            else:
                $ loop = False
        $ del loop
    scene black with Dissolve(1.5)
    pause 0.15
    return

#################################################################################
label sethome:
    centered "{color=#fff}{b}{size=+25}WARNING!{/size}{/b}\n\nSetting a home world is {u}irreversible{/u}. Please make sure you understand the consequences before proceeding.{/color}{fast}"
    centered "{color=#fff}{b}{size=+25}HOME WORLD{/size}{/b}\n\nEveryone yarns for a place to call home.\nWhen you finally find such place, you may set it as your home world.\n\nSetting a home world is {u}irreversible{/u} so choose wisely.\n\nOnce you have a homeworld, every other world in the Mirror Lake will sync their game progress based on your home world progress. This allows you to play through all the universes.{/color}{fast}"
    centered "{color=#fff}{b}{size=+25}WARNING!{/size}{/b}\n\nSetting a home world is {u}irreversible{/u}.\n\nThis greatly boosts you on all other worlds, but only if your progress on the home world is advanced enough.{/color}{fast}"
    python:
        opt=[("{color=#f00}Do not set a home world{/color}", 0)]
        for s in persistent.serverlist:
            opt.append(("{color=#000}%s{/color}" % s["Name"], (s["UUID"], s["Name"])))
        fin=renpy.display_menu(opt)
    if not fin:
        return
    call screen confirm(_("{b}{size=+10}HOME WORLD{/size}{/b}\n\nAre you sure you want to set your home world to: {b}{i}%s{/i}{/b}?\nThis action is {u}irreversible{/u}, so choose carefully!" % fin[1]), Return(True), Return(False))
    if _return:
        python:
            vault.post(VAULT_HOST+"/sethome", json={"vaultId": vaultId, "token": vaultToken, "home": fin[0]}, timeout=15.0)
            mySoul["home"]=fin[1] # Actually fake
    return

#################################################################################
label managevault:
    $ vault_loop = True
    while vault_loop:
        call screen accountdata()
        if isinstance(_return, list):
            $ _cmd = _return[0]
            $ _arg = _return[1]
            if _cmd is None:
                $ vault_loop = False
            #####################################################################
            elif _cmd == "2fa":
                call screen soulmsg(_("{b}Two Factor Authentication{/b}\n\nIf you have two factor authentication enabled, it'll be disabled.\nIf it is disabled, it'll be enabled, and you'll receive an {b}email{/b} with instructions to generate TOTP tokens.\n\nIf enabled, you will not be able to login without the authentication token."))
                call screen confirm(_("{b}Two Factor Authentication{/b}\n\nAre you sure you want to change this setting?"), [SetVariable("_arg", True), Return()], [SetVariable("_arg", False), Return()])
                if _arg:
                  python:
                    auth = {"vaultId": vaultId,
                            "token": vaultToken,
                            "totp": calcOTP(vaultOTP)}

                    ## Make the POST request
                    r=vault.post(VAULT_HOST+"/toggle2fa", json=auth, timeout=15.0)
                    if r.status_code != 200:
                        dat={}
                    else:
                        dat=r.json()
                  if r.status_code == 200:
                    call screen soulmsg(_("Your 2FA settings were updated.\n\nPlease check your email."))
                  elif r.status_code == 400:
                    call screen soulmsg(_("An error on the client happened and the request was rejected. Are you logged in, and using the latest version?"))
                  elif r.status_code == 429:
                    call screen soulmsg(_("You are being rate-limited, and the change was not possible. Please wait a minute before trying again."))
                  else:
                    call screen soulmsg(_("An internal error happened, please report (code: %d)" % r.status_code))
            #####################################################################
            elif _cmd == "link":
                $ world = _arg["UUID"]
                ## A mail will be sent with a link to complete linking
                $ uedit["mail"] = ""
                $ uedit["pasd"] = ""
                if _arg["Type"] == "tmwathena":
                    call screen notice(_("{b}DISCLAIMER{/b}\n\nTmwAthena does not support username changes. If the vault already created an account for you, it'll always take precedence and {b}will never be truly unlinked{/b}.\nIf the Vault already created an account for you, linking will not work adequately.")))
                call screen soul_linking(_("{b}External Account Linking{/b}\n\n{size=-3}Use this if you used an account with ManaVerse or ManaPlus previously, and want to use it with the Mana Launcher. Keep in mind that if you already have an account with the Launcher, nothing will happen. Both the launcher and the game account must have valid email addresses, but they don't need to be the same. Once linked, you'll no longer be able to login using ManaPlus or ManaVerse directly. The home world account cannot be (un)linked from the Vault. Once done, you'll receive an email with further instructions. To cancel, empty any of the fields.{/size}"))
                #call screen notice(_("Sorry, not yet implemented!\n\nMail: %s\nUser: %s\nWorld: %s" % (uedit["mail"], uedit["pasd"], world)))
                #call screen soulmsg(_("Currently, you cannot link external accounts. Keep in mind that if you already have an account, nothing will happen."))
                python:
                  sCode=400
                  try:
                    assert len(uedit["mail"]) > 4
                    assert len(uedit["pasd"]) > 4
                    assert "@" in uedit["mail"]
                    auth = {"vaultId": vaultId,
                            "token": vaultToken,
                            "totp": calcOTP(vaultOTP),
                            "world": world,
                            "email": uedit["mail"],
                            "user": uedit["pasd"]}

                    ## Make the POST request
                    r=vault.post(VAULT_HOST+"/link", json=auth, timeout=15.0)
                    ## Parse status codes and show proper notice
                    sCode = r.status_code
                  except:
                    sCode=502
                    traceback.print_exc()
                if sCode == 200:
                    call screen soulmsg(_("A link was sent to your email.\n\nPlease follow it before trying to access the world in the Launcher.\nIf you don't, THEN LINKING WILL BE RENDERED IMPOSSIBLE.\n\nAfter a successful linking, an Error Response 200 OK will be shown on your browser."))
                elif sCode == 400:
                    call screen soulmsg(_("An error on the client happened and the request was rejected. Are you logged in, and using the latest version?"))
                elif sCode == 403:
                    call screen soulmsg(_("You are not authorized to perform this operation. Please try again later, in three minutes."))
                elif sCode == 404:
                    call screen soulmsg(_("To prevent cheating, you cannot link nor unlink your home world. Please contact staff."))
                elif sCode == 429:
                    call screen soulmsg(_("You are being rate-limited, and the change was not possible. Please wait a minute before trying again."))
                else:
                    call screen soulmsg(_("An internal error happened, please report (code: %d)" % sCode))
                $ del sCode
                $ uedit["mail"] = ""
                $ uedit["pasd"] = ""
                pass
            #####################################################################
            elif _cmd == "unlink":
                $ world = _arg["UUID"]
                $ uedit["mail"] = ""
                $ uedit["pasd"] = ""
                if _arg["Type"] == "tmwathena":
                    call screen notice(_("{b}DISCLAIMER{/b}\n\nTmwAthena does not support username changes. If the vault already created an account for you, it'll always take precedence and {b}will never be truly unlinked{/b}.\nUnlinking a TmwAthena account will disable some Mirror Lake features, but will NOT prevent the Launcher from logging in!")))
                call screen soul_linking(_("{b}World Account Unlinking{/b}\n\n{size=-3}This allows you to unlink a game account from your Vault account. Keep in mind that if you do not have an account with the Launcher, nothing will happen. Once unlinked, a new password will be made and sent to the supplied email. You must agree to the {a=%s}Terms of Service{/a}. To cancel, empty any of the fields.{/size}" % (_arg["Policy"])))
                #call screen notice(_("Sorry, not yet implemented!\n\nMail: %s\nUser: %s\nWorld: %s" % (uedit["mail"], uedit["pasd"], world)))
                #call screen soulmsg(_("Currently, you cannot unlink accounts. Keep in mind that if you do not have an account, nothing will happen."))
                python:
                  sCode=400
                  try:
                    assert len(uedit["mail"]) > 4
                    assert len(uedit["pasd"]) > 4
                    assert "@" in uedit["mail"]
                    auth = {"vaultId": vaultId,
                            "token": vaultToken,
                            "totp": calcOTP(vaultOTP),
                            "world": world,
                            "email": uedit["mail"],
                            "user": uedit["pasd"]}

                    ## Make the POST request
                    r=vault.post(VAULT_HOST+"/unlink", json=auth, timeout=15.0)
                    ## Parse status codes and show proper notice
                    sCode = r.status_code
                  except:
                    sCode=502
                    traceback.print_exc()
                if sCode == 200:
                    call screen soulmsg(_("A link was sent to your email.\n\nPlease follow it before trying to access the world in the Launcher.\nIf you don't, THEN LINKING WILL BE RENDERED IMPOSSIBLE.\n\nAfter a successful linking, an Error Response 200 OK will be shown on your browser."))
                elif sCode == 400:
                    call screen soulmsg(_("An error on the client happened and the request was rejected. Are you logged in, and using the latest version?"))
                elif sCode == 403:
                    call screen soulmsg(_("You are not authorized to perform this operation. Please try again later, in three minutes."))
                elif sCode == 404:
                    call screen soulmsg(_("To prevent cheating, you cannot link nor unlink your home world. Please contact staff."))
                elif sCode == 429:
                    call screen soulmsg(_("You are being rate-limited, and the change was not possible. Please wait a minute before trying again."))
                else:
                    call screen soulmsg(_("An internal error happened, please report (code: %d)" % sCode))
                $ del sCode
                $ uedit["mail"] = ""
                $ uedit["pasd"] = ""
                pass
            else:
                $ stdout("%s unrecognized" % _cmd)
        else:
            $ vault_loop = False
    $ del vault_loop
    return
#################################################################################
label intro:
    $ RPCUpdate("The Void", "launcher")
    scene DKBG
    show expression (ManaSparkle().sm) as flare
    show DKSD at left
    with Dissolve(1.0)
    evil "{cps=80}Look at this... All this mana... Doesn't it look peaceful?{/cps}"
    evil "{cps=80}What do you think that would happen if I mess with it... like this?!{/cps}{nw}"
    hide flare
    show expression (ManaSparkle(spd=100).sm) as flare behind DKSD
    with None
    evil "What do you think that would happen if I mess with it... like this?!{fast}{nw}" with vpunch
    evil "What do you think that would happen if I mess with it... like this?!{fast}{nw}" with hpunch
    evil "What do you think that would happen if I mess with it... like this?!{fast}{nw}" with vpunch
    evil "What do you think that would happen if I mess with it... like this?!{fast}" with hpunch
    evil "{cps=80}...What? No, you cannot stop me.{/cps}"
    evil "{i}*evil grin*{/i} {cps=80}Hey, let's play a game.{/cps}"
    evil "{cps=80}I'll shatter your Soul and I want see if you can catch me!{/cps}"
    evil "{cps=80}HAHAHAHAHAHA--{/cps}{w=.5}{nw}"
    hide flare with dissolve
    show black behind DKSD with dissolve
    scene black with None # fade out to black
    evil "HAHAHAHAHAHA{fast}{cps=80}HAHAHAHAHAHAHAH!{/cps}"
    window hide
    show MLP at truecenter with Dissolve(1.0) # TODO: Locale
    pause 2.5
    scene black with Dissolve(1.0)
    show expression (ManaSparkle(spd=10, multi=False).sm) as flare
    with Dissolve(5.0)
    centered "{color=#fff}{cps=80}Having your soul shattered to pieces, you drift along the void...{p=1.5}\n\
Your soul was shattered, your memories forfeit, but your willpower remained.{p=1.5}\n\
That's right - You have a task to do, a mission to accomplish.{p=1.5}\n\
\"This is not the end.\" You think to yourself.{p=1.5}\n\
So, you dive in the Mirror Lake, allowing your willpower to become part of the worlds which came to be...{/cps}{/color}"
    window hide
    pause 0.5
    hide flare with dissolve
    centered "{color=#fff}{b}Tutorial{/b}\n\n\
In the next screen, you'll be at the Mirror Lake Interface.\nThe worlds are listed to the left, and a description is available at right.\n\
Select any world, and allow your willpower to take form on the world, as one of its inhabitants.\n\
Each world is different from each other, there is no consistency on gameplay rules, art style or history.\n\
\n\
And eventually, your power shall return to you...{/color}{fast}"
    centered "{color=#f35}{b}DISCLAIMER{/b}{/color}\n\n\
{color=#fff}The worlds may be operated by different staff, and are in an eternal mutation state.\n\
Be sure to read each subworld specific rules and complete the tutorial to spot the differences!\n\
\n\
Attempt to restore your soul as you try to stop the evil which threatens the multiverse.\n\
Soul Level remains constant regardless of the subworld you're at.{/color}{fast}"
    scene black
    return

#################################################################################
label ch1lake:
    $ RPCUpdate("The Void", "launcher")
    scene black
    show aethyr1
    #show aethyr2
    show expression (ManaSparkle().sm) as flare
    with Dissolve(1.0)
    centered "{color=#fff}{cps=80}As you move through the worlds, you can't help but notice the precarious state it is in.{p=1.5}\n\
Maybe, from within, everything seemed alright. Or just manageable. But...{p=1.5}\n\
No, the situation is much more dire than you thought.{p=1.5}\n\
Because from the Mirror Lake, you can see.{p=1.5}\n\
The foundation of the world is rotting, without anyone noticing.{/cps}{/color}"
    window hide
    pause 0.5
    hide aethyr1
    with dissolve
    hide flare
    with dissolve
    scene DKBG with dissolve
    centered "{color=#fff}{cps=80}A slow death, where the colors from the world slowly vanish.{p=1.5}\n\
The wind grows silent, the restlessness of the living slowly drifts in the peaceful calm of the dead...{p=1.5}\n\
...Is this how everything will end?{p=1.5}\n\
...Isn't there anything you can do?{/cps}{/color}"
    window hide
    pause 0.5
    show expression (ManaSparkle(spd=120).sm) as flare at bgobj
    with Dissolve(3.0)
    centered "{color=#fff}{cps=80}\"It's useless. He'll do as he pleases, even if half of the multiverse dies from it.\"{p=1.5}\n\
No. That will not happen.{p=1.5}\n\
And it won't happen, because {i}you{/i} noticed it.{p=1.5}\n\
As long as you know, as long as you breathe, something can be done.{p=1.5}\n\
Even without knowing from where to start...{/cps}{/color}"
    hide flare with dissolve
    centered "{color=#fff}{cps=80}You may be the only one left who can at least try.{/cps}{/color}"
    return


#    centered "{color=#fff}{cps=80}\
#{p=1.5}\n\
#{/cps}{/color}"
#################################################################################
label ch2intro:
    $ RPCUpdate("The Void", "launcher")
    scene black with None # fade out to black
    scene DKBG
    window hide
    show expression (ManaSparkle(spd=10, multi=False).sm) as flare
    with Dissolve(1.0)
    centered "{color=#fff}{cps=80}\
...Where am I?{p=1.5}\n\
...Oh, that's right.{p=1.5}\n\
We're at the void. The space between the universes.\
{/cps}{/color}"
    centered "{color=#fff}{cps=80}\
...How many universes are out there?{p=1.5}\n\
Now, isn't that a silly question? There are as many as there could be.{p=1.5}\n\
That's the not the real question. The real question would be...{p=1.5}\n\
...From which one do I come from...?{p=1.5}\n\
{/cps}{/color}"
    window hide
    pause 0.5
    centered "{color=#fff}{cps=80}\
The multiverse seems inquiet.{p=1.5}\n\
Has it always been this way?{p=1.5}\n\
Who is this shadow I keep remembering during my dreams?{p=1.5}\n\
{/cps}{/color}"
    centered "{color=#fff}{cps=80}\
Many questions, but few answers.{p=1.5}\n\
With what should we worry most, the past or the present?{p=1.5}\n\
However... These universes must hold a clue.{p=1.5}\n\
Coincidences are mere opportunities waiting to be explored; To reveal a new perspective to you.{p=1.5}\n\
We should investigate these Mirror Lakes, the location where we move between worlds.{p=1.5}\n\
If I want a clue... Yes, that'll be the first place to search.{p=1.5}\n\
{/cps}{/color}"
    pause 0.5
    hide flare
    show expression Text(_("{color=#fff}{cps=80}Your memories still aren't back; But you're not going to be defeated so easily.{w=0.5}\n\nYou'll get to the bottom of this. Nothing can stop you now.{/cps}{/color}")) at truecenter as laby
    with Dissolve(3.0)
    pause 2.0
    hide laby with dissolve
    centered "{color=#fff}CHAPTER 2\nSHADOWS OF THE PAST{/color}"
    scene black
    return

#################################################################################
label ch2lake:
    $ RPCUpdate("The Void", "launcher")
    scene black
    show aethyr1
    #show aethyr2
    show expression (ManaSparkle(spd=20, multi=False).sm) as flare
    with Dissolve(1.0)
    centered "{color=#fff}{cps=80}We made many acquaintances and friends lately.{p=1.5}\n\
\"Your friends shall be your strength\".{p=1.5}\n\
 Where have I heard that before?{p=1.5}\n\
And on the meanwhile, the world slowly rots, willing to take all my acquaintances into a silent death...{/cps}{/color}"
    window hide
    pause 0.5
    hide flare
    with dissolve
    centered "{color=#fff}{cps=80}But something changed.{p=1.5}\n\
This lake is less rotten than the first time.{p=1.5}\n\
...Is this my own doing?{p=1.5}\n\
...Am I truly capable to breath new life in this world?{/cps}{/color}"
    window hide
    pause 0.5
    show expression (ManaSparkle(spd=90).sm) as flare at bgobj
    with Dissolve(3.0)
    centered "{color=#fff}{cps=80}\"Either try or give up, there's no middle term between both\".{p=1.5}\n\
I can feel despair, the imminent chaos approaching...{p=1.5}\n\
But I don't have to be alone.{p=1.5}\n\
Protecting the worlds... My native acquaintances likely could help.{p=1.5}\n\
I should find those whom can help, and prepare an army.{p=1.5}\n\
Because... Whatever is coming, is coming soon.{/cps}{/color}"
    hide aethyr1 with Dissolve(3.0)
    centered "{color=#fff}{cps=80}A ray of hope.\n\nThis is not what you asked to be, but you will fulfill the role given to you.\n\n\nAnd thus, you dive again, in the depths of the Mirror Lake...{/cps}{/color}"
    return