mirror of
https://github.com/danbulant/heaventaker
synced 2026-05-27 14:02:10 +00:00
add prologue
This commit is contained in:
parent
a8216e80ac
commit
9364a1d4be
2 changed files with 44 additions and 8 deletions
|
|
@ -160,7 +160,11 @@
|
||||||
<div class="dialog" class:failure>
|
<div class="dialog" class:failure>
|
||||||
<div class="background">
|
<div class="background">
|
||||||
{#if background}
|
{#if background}
|
||||||
<img src="./images/backgrounds/{background}.webp" alt="" class="full" draggable={false}>
|
{#if d.flags && d.flags.includes("prologue")}
|
||||||
|
<img src="./images/backgrounds/{background}.webp" alt="" class="prologue-bg" draggable={false}>
|
||||||
|
{:else}
|
||||||
|
<img src="./images/backgrounds/{background}.webp" alt="" class="full" draggable={false}>
|
||||||
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
{#if art}
|
{#if art}
|
||||||
<img src=".{art}" alt="" class="character" draggable={false}>
|
<img src=".{art}" alt="" class="character" draggable={false}>
|
||||||
|
|
@ -171,7 +175,7 @@
|
||||||
<div class="data">
|
<div class="data">
|
||||||
{#if character}
|
{#if character}
|
||||||
<h1>{character.name}, {character.title}</h1>
|
<h1>{character.name}, {character.title}</h1>
|
||||||
{:else}
|
{:else if !d.flags || !d.flags.includes("prologue")}
|
||||||
<h1>???</h1>
|
<h1>???</h1>
|
||||||
{/if}
|
{/if}
|
||||||
{#if d.text}
|
{#if d.text}
|
||||||
|
|
@ -189,8 +193,7 @@
|
||||||
{#each d.buttons as button, i}
|
{#each d.buttons as button, i}
|
||||||
<Button active={i === activeButton} on:click={() => select(i)}>{button.text}</Button>
|
<Button active={i === activeButton} on:click={() => select(i)}>{button.text}</Button>
|
||||||
{/each}
|
{/each}
|
||||||
{/if}
|
{:else if d && d.flags && d.flags.includes("chapters") && chaptersDone.length}
|
||||||
{#if d && d.flags && d.flags.includes("chapters") && chaptersDone.length}
|
|
||||||
<div class="chapters">
|
<div class="chapters">
|
||||||
{#each Object.keys(chapters) as chapter, i}
|
{#each Object.keys(chapters) as chapter, i}
|
||||||
<div class="chapter" class:selected={i === activeButton} on:click={() => select(i)} class:active={chaptersDone && chaptersDone.includes(chapter)}>
|
<div class="chapter" class:selected={i === activeButton} on:click={() => select(i)} class:active={chaptersDone && chaptersDone.includes(chapter)}>
|
||||||
|
|
@ -198,6 +201,8 @@
|
||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
|
{:else}
|
||||||
|
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{#if success}
|
{#if success}
|
||||||
|
|
@ -243,11 +248,12 @@
|
||||||
max-height: 50vh;
|
max-height: 50vh;
|
||||||
}
|
}
|
||||||
.text p {
|
.text p {
|
||||||
|
margin-top: 10px;
|
||||||
font-size: inherit;
|
font-size: inherit;
|
||||||
}
|
}
|
||||||
h1 {
|
h1 {
|
||||||
color: #FFFCBE;
|
color: #FFFCBE;
|
||||||
margin: 10px 0;
|
margin: 10px 0 0 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
letter-spacing: 2px;
|
letter-spacing: 2px;
|
||||||
}
|
}
|
||||||
|
|
@ -332,6 +338,10 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
object-fit: none;
|
object-fit: none;
|
||||||
}
|
}
|
||||||
|
.background .prologue-bg {
|
||||||
|
height: 90%;
|
||||||
|
box-shadow: -5px -5px 0 0 #DFCA96;
|
||||||
|
}
|
||||||
.background .character {
|
.background .character {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
bottom: 0px;
|
bottom: 0px;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
export const chapters = {
|
export const chapters = {
|
||||||
|
prologue: 0,
|
||||||
uriel: 1,
|
uriel: 1,
|
||||||
michael: 2,
|
michael: 2,
|
||||||
uziel: 3,
|
uziel: 3,
|
||||||
|
|
@ -9,7 +10,7 @@ export const chapters = {
|
||||||
/**
|
/**
|
||||||
* @type {{
|
* @type {{
|
||||||
* name: string,
|
* name: string,
|
||||||
* background: "menu" | "heaven" | "hell",
|
* background: "menu" | "heaven" | "hell" | "prologue1" | "prologue2" | "prologue3" | "prologue4",
|
||||||
* character: typeof import("./characters").characters[number]["name"],
|
* character: typeof import("./characters").characters[number]["name"],
|
||||||
* text: string,
|
* text: string,
|
||||||
* next?: string,
|
* next?: string,
|
||||||
|
|
@ -18,7 +19,7 @@ export const chapters = {
|
||||||
* chapter?: keyof typeof chapters,
|
* chapter?: keyof typeof chapters,
|
||||||
* chapterStart?: keyof typeof chapters,
|
* chapterStart?: keyof typeof chapters,
|
||||||
* buttons: { text: string, next: string }[],
|
* buttons: { text: string, next: string }[],
|
||||||
* flags?: ("nosave" | "chapters" | "menu" | "success" | "failure")[]
|
* flags?: ("nosave" | "chapters" | "menu" | "success" | "failure" | "prologue")[]
|
||||||
* }[]}
|
* }[]}
|
||||||
*/
|
*/
|
||||||
export const dialog = [{
|
export const dialog = [{
|
||||||
|
|
@ -55,7 +56,7 @@ export const dialog = [{
|
||||||
text: "",
|
text: "",
|
||||||
buttons: [{
|
buttons: [{
|
||||||
text: "Start",
|
text: "Start",
|
||||||
next: "uriel_entrance"
|
next: "prologue1"
|
||||||
}, {
|
}, {
|
||||||
text: "Chapter select",
|
text: "Chapter select",
|
||||||
next: "chapters"
|
next: "chapters"
|
||||||
|
|
@ -69,6 +70,31 @@ export const dialog = [{
|
||||||
alt: "You must first complete a chapter to be able to solve it.",
|
alt: "You must first complete a chapter to be able to solve it.",
|
||||||
next: "menu",
|
next: "menu",
|
||||||
flags: ["chapters", "nosave"]
|
flags: ["chapters", "nosave"]
|
||||||
|
}, {
|
||||||
|
name: "prologue1",
|
||||||
|
chapterStart: "prologue",
|
||||||
|
background: "prologue1",
|
||||||
|
text: "The successful corruption of a certain angel gives Lucifer, the CEO of hell, an idea.",
|
||||||
|
next: "prologue2",
|
||||||
|
flags: ["prologue"]
|
||||||
|
}, {
|
||||||
|
name: "prologue2",
|
||||||
|
background: "prologue2",
|
||||||
|
text: "She sent you to heaven with the help of a certain nearly corrupted angel in order to find a cure, but in reality she sent you to bring a few more angels back so she could \"befriend\" them.",
|
||||||
|
next: "prologue3",
|
||||||
|
flags: ["prologue"]
|
||||||
|
}, {
|
||||||
|
name: "prologue3",
|
||||||
|
background: "prologue3",
|
||||||
|
text: "But you decided to go big or go home and kick down the front gate of heaven to take the big league archangel or even the master of heaven herself.",
|
||||||
|
next: "prologue4",
|
||||||
|
flags: ["prologue"]
|
||||||
|
}, {
|
||||||
|
name: "prologue4",
|
||||||
|
background: 'prologue4',
|
||||||
|
text: "But after seeing the first angel, you decide to run to the back gate like Lucifer originally planned.",
|
||||||
|
next: "uriel_entrance",
|
||||||
|
flags: ["prologue"]
|
||||||
}, {
|
}, {
|
||||||
name: "uriel_entrance",
|
name: "uriel_entrance",
|
||||||
chapterStart: "uriel",
|
chapterStart: "uriel",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue