diff --git "a/bundle.js" "b/bundle.js" --- "a/bundle.js" +++ "b/bundle.js" @@ -671,7 +671,7 @@ var app = (function () { /* src\VideoGradioComponentBrainstorming.svelte generated by Svelte v3.59.2 */ const { console: console_1$6 } = globals; - const file$c = "src\\VideoGradioComponentBrainstorming.svelte"; + const file$d = "src\\VideoGradioComponentBrainstorming.svelte"; function get_each_context$6(ctx, list, i) { const child_ctx = ctx.slice(); @@ -691,7 +691,7 @@ var app = (function () { t = text(t_value); option.__value = /*option*/ ctx[15]; option.value = option.__value; - add_location(option, file$c, 85, 6, 2561); + add_location(option, file$d, 85, 6, 2561); }, m: function mount(target, anchor) { insert_dev(target, option, anchor); @@ -714,7 +714,7 @@ var app = (function () { return block; } - function create_fragment$c(ctx) { + function create_fragment$d(ctx) { let h1; let t1; let div1; @@ -771,34 +771,34 @@ var app = (function () { each_blocks[i].c(); } - add_location(h1, file$c, 66, 0, 1800); + add_location(h1, file$d, 66, 0, 1800); attr_dev(track, "kind", "captions"); if (!src_url_equal(track.src, track_src_value = "path/to/your/captions/file.vtt")) attr_dev(track, "src", track_src_value); attr_dev(track, "srclang", "en"); attr_dev(track, "label", "English"); - add_location(track, file$c, 72, 4, 2006); + add_location(track, file$d, 72, 4, 2006); attr_dev(video, "id", "videoCanvas"); video.autoplay = true; attr_dev(video, "class", "svelte-ufd3fo"); - add_location(video, file$c, 70, 2, 1965); + add_location(video, file$d, 70, 2, 1965); attr_dev(div0, "id", "overlayText"); attr_dev(div0, "class", "svelte-ufd3fo"); - add_location(div0, file$c, 74, 2, 2111); + add_location(div0, file$d, 74, 2, 2111); attr_dev(div1, "id", "videoContainer"); attr_dev(div1, "class", "svelte-ufd3fo"); - add_location(div1, file$c, 68, 0, 1911); + add_location(div1, file$d, 68, 0, 1911); attr_dev(canvas_1, "id", "myCanvas"); set_style(canvas_1, "border", "2px solid black"); attr_dev(canvas_1, "width", "500"); attr_dev(canvas_1, "height", "500"); - add_location(canvas_1, file$c, 77, 0, 2186); + add_location(canvas_1, file$d, 77, 0, 2186); attr_dev(input, "type", "text"); - add_location(input, file$c, 78, 0, 2294); - add_location(button, file$c, 82, 2, 2429); + add_location(input, file$d, 78, 0, 2294); + add_location(button, file$d, 82, 2, 2429); if (/*selectedOption*/ ctx[0] === void 0) add_render_callback(() => /*select_change_handler*/ ctx[9].call(select)); - add_location(select, file$c, 83, 2, 2479); + add_location(select, file$d, 83, 2, 2479); attr_dev(div2, "id", "frameForButtons"); - add_location(div2, file$c, 81, 0, 2399); + add_location(div2, file$d, 81, 0, 2399); }, l: function claim(nodes) { throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); @@ -900,7 +900,7 @@ var app = (function () { dispatch_dev("SvelteRegisterBlock", { block, - id: create_fragment$c.name, + id: create_fragment$d.name, type: "component", source: "", ctx @@ -913,7 +913,7 @@ var app = (function () { } // Logic for 'Test OCR' button - function instance$c($$self, $$props, $$invalidate) { + function instance$d($$self, $$props, $$invalidate) { let { $$slots: slots = {}, $$scope } = $$props; validate_slots('VideoGradioComponentBrainstorming', slots, []); let selectedOption = 'Stove - lu'; // default value @@ -1046,13 +1046,13 @@ var app = (function () { class VideoGradioComponentBrainstorming extends SvelteComponentDev { constructor(options) { super(options); - init(this, options, instance$c, create_fragment$c, safe_not_equal, {}); + init(this, options, instance$d, create_fragment$d, safe_not_equal, {}); dispatch_dev("SvelteRegisterComponent", { component: this, tagName: "VideoGradioComponentBrainstorming", options, - id: create_fragment$c.name + id: create_fragment$d.name }); } } @@ -1106,9 +1106,9 @@ var app = (function () { } /* src\MovingDotPortfromReact.svelte generated by Svelte v3.59.2 */ - const file$b = "src\\MovingDotPortfromReact.svelte"; + const file$c = "src\\MovingDotPortfromReact.svelte"; - function create_fragment$b(ctx) { + function create_fragment$c(ctx) { let button; const block = { @@ -1118,7 +1118,7 @@ var app = (function () { set_style(button, "left", /*position*/ ctx[0].x + "px"); set_style(button, "top", /*position*/ ctx[0].y + "px"); attr_dev(button, "tabindex", "0"); - add_location(button, file$b, 48, 0, 1573); + add_location(button, file$c, 48, 0, 1573); }, l: function claim(nodes) { throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); @@ -1146,7 +1146,7 @@ var app = (function () { dispatch_dev("SvelteRegisterBlock", { block, - id: create_fragment$b.name, + id: create_fragment$c.name, type: "component", source: "", ctx @@ -1157,7 +1157,7 @@ var app = (function () { const step = 10; - function instance$b($$self, $$props, $$invalidate) { + function instance$c($$self, $$props, $$invalidate) { let { $$slots: slots = {}, $$scope } = $$props; validate_slots('MovingDotPortfromReact', slots, []); let { position = { x: 0, y: 0 } } = $$props; @@ -1262,13 +1262,13 @@ var app = (function () { class MovingDotPortfromReact extends SvelteComponentDev { constructor(options) { super(options); - init(this, options, instance$b, create_fragment$b, safe_not_equal, { position: 0, boundaries: 2, focusDot: 3 }); + init(this, options, instance$c, create_fragment$c, safe_not_equal, { position: 0, boundaries: 2, focusDot: 3 }); dispatch_dev("SvelteRegisterComponent", { component: this, tagName: "MovingDotPortfromReact", options, - id: create_fragment$b.name + id: create_fragment$c.name }); } @@ -1299,9 +1299,9 @@ var app = (function () { /* src\MovingDotTargetPortfromReact.svelte generated by Svelte v3.59.2 */ - const file$a = "src\\MovingDotTargetPortfromReact.svelte"; + const file$b = "src\\MovingDotTargetPortfromReact.svelte"; - function create_fragment$a(ctx) { + function create_fragment$b(ctx) { let div; const block = { @@ -1310,7 +1310,7 @@ var app = (function () { attr_dev(div, "class", "target svelte-4yc66h"); set_style(div, "left", /*position*/ ctx[0].x + "px"); set_style(div, "top", /*position*/ ctx[0].y + "px"); - add_location(div, file$a, 4, 0, 49); + add_location(div, file$b, 4, 0, 49); }, l: function claim(nodes) { throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); @@ -1336,7 +1336,7 @@ var app = (function () { dispatch_dev("SvelteRegisterBlock", { block, - id: create_fragment$a.name, + id: create_fragment$b.name, type: "component", source: "", ctx @@ -1345,7 +1345,7 @@ var app = (function () { return block; } - function instance$a($$self, $$props, $$invalidate) { + function instance$b($$self, $$props, $$invalidate) { let { $$slots: slots = {}, $$scope } = $$props; validate_slots('MovingDotTargetPortfromReact', slots, []); let { position } = $$props; @@ -1382,13 +1382,13 @@ var app = (function () { class MovingDotTargetPortfromReact extends SvelteComponentDev { constructor(options) { super(options); - init(this, options, instance$a, create_fragment$a, safe_not_equal, { position: 0 }); + init(this, options, instance$b, create_fragment$b, safe_not_equal, { position: 0 }); dispatch_dev("SvelteRegisterComponent", { component: this, tagName: "MovingDotTargetPortfromReact", options, - id: create_fragment$a.name + id: create_fragment$b.name }); } @@ -1409,6 +1409,21 @@ var app = (function () { const charisma = writable(10); const luck = writable(10); const money = writable(1000); + const fightplayerHuman = createfightPlayer(); + const fightplayerComputer = createfightPlayer(); + const fightcurrentTurn = writable('human'); // 'human' or 'computer' + + function createfightPlayer() { + return writable({ + fighthealth: 100, + fightstamina: 100, + fightisBlocking: false, + fightcooldowns: { + attack: 0, + specialAttack: 0, + }, + }); + } const inventory = writable([ // Sample inventory items @@ -1428,9 +1443,9 @@ var app = (function () { const objectives = writable([ // Sample objectives - { branch: "Seperate", name: "Visit Mountain Peak", complete: false }, - { branch: "Mission 1", name: "Intercept The Courier (Search the Locations)", complete: false }, - { branch: "Mission 1", name: "Deliver the package to Market Stall", complete: false }, + { id: "Seperate", name: "Visit Mountain Peak", complete: false }, + { id: "Mission 1", name: "Intercept The Courier (Search the Locations)", complete: false }, + { id: "Mission 1", name: "Deliver the package to Market Stall", complete: false }, // Add more objectives as needed ]); @@ -1439,18 +1454,18 @@ var app = (function () { { name: "Target 2", x: 100, y: 100, collisionType: "", collisiontext: ""}, { name: "Entrance", x: 995, y: 660, collisionType: "modal", modalConfig: { title: "Entrance", - content: "You've reached the Entrance. What's your next step?", - actions: [ - { - label: "Ask for guidance on next move", - action: "askforDirections" - }, - { - label: "Buy an Axe", - action: "buyAxeAlert" - } - // ... more actions if necessary - ]}, + content: "You've reached the Entrance. What's your next step?", + actions: [ + { + label: "Ask for guidance on next move", + action: "askforDirections" + }, + { + label: "Buy an Axe", + action: "buyAxeAlert" + }, + // ... more actions if necessary + ]}, }, { name: "Market Stall", x: 200, y: 300, collisionType: "", collisiontext: "" }, // A market stall in the bustling market area. { name: "Inn Entrance", x: 400, y: 450, collisionType: "", collisiontext: "" }, // The entrance to the inn for rest or information. @@ -1469,7 +1484,7 @@ var app = (function () { // actions.js - const themeActions = { + const themeActions = { //Editing this schema affects the change theme function in MovingDotSpace and MovingDotModal handleitemclick and the default theme in gamethemeConfig and the configuration manager in theme manager 'Default': { buyAxeAlert() { money.update(h => h - 10 > 0 ? h - 10 : 0); // Decreases health but never below 0 @@ -1490,6 +1505,11 @@ var app = (function () { // ... add more space-specific actions }, 'Medieval Fantasy': { + buyAxeAlert() { + money.update(h => h - 10 > 0 ? h - 10 : 0); // Decreases health but never below 0 + const newItem = {type: "weapon", name: "Axe", description: "A heavy, sharp axe."}; + addInventoryItem(newItem); + }, defendCastle() { // Logic to defend the castle }, @@ -1507,14 +1527,54 @@ var app = (function () { // Logic for navigating neon streets }, // ... add more cyberpunk-specific actions - } + }, // ... other themes with their specific actions + 'Fantasy Adventure': { + findBookOfEldrak() { + const newItem = {type: "book", name: "Book of Eldrak", description: "An ancient tome containing half of a map to the Artefact of Vorin."}; + addInventoryItem(newItem); + alert("You have found the Book of Eldrak hidden within the ancient library."); + }, + acquirePeculiarAmulet() { + money.update(h => h - 50 > 0 ? h - 50 : 0); // Assumes the amulet costs some currency + const newItem = {type: "amulet", name: "Peculiar Amulet", description: "Reveals unseen paths and protects against dark magic."}; + addInventoryItem(newItem); + alert("The peculiar amulet is now yours. It feels warm to the touch, humming with hidden power."); + }, + seekGuidanceFromElara() { + alert("Elara: The amulet and book you possess are keys to unlocking the Artefact's resting place. Trust in the light, even when surrounded by shadow."); + }, + choosePathInWhisperingWoods() { + const choice = confirm("Will you follow the hidden path revealed by the amulet, or tread the well-worn trail?"); + if (choice) { + alert("You chose the hidden path, where shadows dance and the air whispers secrets."); + } else { + alert("You chose the well-worn trail, where the woods seem less foreboding, yet eyes watch from the darkness."); + } + }, + confrontTheKeeper() { + const fightOrTalk = confirm("A shadowy figure blocks your path. Will you fight or attempt to communicate?"); + if (fightOrTalk) { + initiateCombat("Shadowy Figure"); + } else { + alert("Your words pierce the silence, and the figure pauses, considering your presence."); + } + }, + useArtefactWisely() { + const decision = confirm("With the Artefact of Vorin in hand, will you use its power to protect Eldoria or seek to uncover its deeper secrets?"); + if (decision) { + alert("You decide to protect Eldoria, using the Artefact to ward off shadows and bring peace."); + } else { + alert("You delve into the Artefact's secrets, seeking knowledge and truths long forgotten."); + } + }, + }, }; /* src\MovingDotSpaceSimpleModal.svelte generated by Svelte v3.59.2 */ const { console: console_1$5 } = globals; - const file$9 = "src\\MovingDotSpaceSimpleModal.svelte"; + const file$a = "src\\MovingDotSpaceSimpleModal.svelte"; function get_each_context$5(ctx, list, i) { const child_ctx = ctx.slice(); @@ -1522,8 +1582,8 @@ var app = (function () { return child_ctx; } - // (49:0) {#if isOpen} - function create_if_block$4(ctx) { + // (31:0) {#if isOpen} + function create_if_block$5(ctx) { let div3; let div2; let div0; @@ -1566,18 +1626,18 @@ var app = (function () { each_blocks[i].c(); } - add_location(h2, file$9, 52, 8, 1640); - add_location(button, file$9, 53, 8, 1666); + add_location(h2, file$a, 34, 8, 1031); + add_location(button, file$a, 35, 8, 1057); attr_dev(div0, "class", "modal-header svelte-m51ous"); - add_location(div0, file$9, 51, 6, 1604); + add_location(div0, file$a, 33, 6, 995); attr_dev(ul, "class", "modal-items"); - add_location(ul, file$9, 57, 8, 1790); + add_location(ul, file$a, 39, 8, 1181); attr_dev(div1, "class", "modal-content svelte-m51ous"); - add_location(div1, file$9, 55, 6, 1734); + add_location(div1, file$a, 37, 6, 1125); attr_dev(div2, "class", "modal svelte-m51ous"); - add_location(div2, file$9, 50, 4, 1577); + add_location(div2, file$a, 32, 4, 968); attr_dev(div3, "class", "modal-overlay svelte-m51ous"); - add_location(div3, file$9, 49, 2, 1544); + add_location(div3, file$a, 31, 2, 935); }, m: function mount(target, anchor) { insert_dev(target, div3, anchor); @@ -1642,16 +1702,16 @@ var app = (function () { dispatch_dev("SvelteRegisterBlock", { block, - id: create_if_block$4.name, + id: create_if_block$5.name, type: "if", - source: "(49:0) {#if isOpen}", + source: "(31:0) {#if isOpen}", ctx }); return block; } - // (59:10) {#each items as item} + // (41:10) {#each items as item} function create_each_block$5(ctx) { let button; let t_value = /*item*/ ctx[9].label + ""; @@ -1667,7 +1727,7 @@ var app = (function () { c: function create() { button = element("button"); t = text(t_value); - add_location(button, file$9, 59, 12, 1861); + add_location(button, file$a, 41, 12, 1252); }, m: function mount(target, anchor) { insert_dev(target, button, anchor); @@ -1693,16 +1753,16 @@ var app = (function () { block, id: create_each_block$5.name, type: "each", - source: "(59:10) {#each items as item}", + source: "(41:10) {#each items as item}", ctx }); return block; } - function create_fragment$9(ctx) { + function create_fragment$a(ctx) { let if_block_anchor; - let if_block = /*isOpen*/ ctx[0] && create_if_block$4(ctx); + let if_block = /*isOpen*/ ctx[0] && create_if_block$5(ctx); const block = { c: function create() { @@ -1721,7 +1781,7 @@ var app = (function () { if (if_block) { if_block.p(ctx, dirty); } else { - if_block = create_if_block$4(ctx); + if_block = create_if_block$5(ctx); if_block.c(); if_block.m(if_block_anchor.parentNode, if_block_anchor); } @@ -1740,7 +1800,7 @@ var app = (function () { dispatch_dev("SvelteRegisterBlock", { block, - id: create_fragment$9.name, + id: create_fragment$a.name, type: "component", source: "", ctx @@ -1749,7 +1809,7 @@ var app = (function () { return block; } - function instance$9($$self, $$props, $$invalidate) { + function instance$a($$self, $$props, $$invalidate) { let { $$slots: slots = {}, $$scope } = $$props; validate_slots('MovingDotSpaceSimpleModal', slots, []); let { isOpen = false } = $$props; @@ -1774,33 +1834,7 @@ var app = (function () { if (themeActions[currentTheme] && themeActions[currentTheme][item.action]) { themeActions[currentTheme][item.action](); } else { - switch (item.action) { - case "revealCaveLocation": - { - alert("The cave is revealed"); - break; - } - case "giveHistory": - { - alert("The History is revealed"); - break; - } - case "buyAxe": - { - money.update(h => h - 10 > 0 ? h - 10 : 0); // Decreases health but never below 0 - - const newItem = { - type: "weapon", - name: "Axe", - description: "A heavy, sharp axe." - }; - - addInventoryItem(newItem); - } - default: - console.error(`Action "${item.action}" not found for theme "${currentTheme}".`); - break; - } + console.error(`Action "${item.action}" not found for theme "${currentTheme}".`); } } @@ -1835,8 +1869,6 @@ var app = (function () { onClose, currentTheme, themeActions, - money, - addInventoryItem, closeModal, handleItemClick }); @@ -1871,7 +1903,7 @@ var app = (function () { constructor(options) { super(options); - init(this, options, instance$9, create_fragment$9, safe_not_equal, { + init(this, options, instance$a, create_fragment$a, safe_not_equal, { isOpen: 0, title: 1, content: 2, @@ -1884,7 +1916,7 @@ var app = (function () { component: this, tagName: "MovingDotSpaceSimpleModal", options, - id: create_fragment$9.name + id: create_fragment$a.name }); } @@ -1937,9 +1969,9 @@ var app = (function () { } } - /* src\MovingDotStatStoreandDisplay.svelte generated by Svelte v3.59.2 */ + /* src\MovingDotStatDisplay.svelte generated by Svelte v3.59.2 */ - const file$8 = "src\\MovingDotStatStoreandDisplay.svelte"; + const file$9 = "src\\MovingDotStatDisplay.svelte"; function get_each_context$4(ctx, list, i) { const child_ctx = ctx.slice(); @@ -1974,7 +2006,7 @@ var app = (function () { t0 = text(t0_value); t1 = text(": "); t2 = text(t2_value); - add_location(li, file$8, 22, 8, 712); + add_location(li, file$9, 22, 8, 712); }, m: function mount(target, anchor) { insert_dev(target, li, anchor); @@ -2017,7 +2049,7 @@ var app = (function () { t0 = text(t0_value); t1 = text(": "); t2 = text(t2_value); - add_location(li, file$8, 32, 10, 928); + add_location(li, file$9, 32, 10, 928); }, m: function mount(target, anchor) { insert_dev(target, li, anchor); @@ -2074,7 +2106,7 @@ var app = (function () { t4 = text(t4_value); t5 = space(); attr_dev(button, "class", "skill"); - add_location(button, file$8, 42, 8, 1167); + add_location(button, file$9, 42, 8, 1167); }, m: function mount(target, anchor) { insert_dev(target, button, anchor); @@ -2114,7 +2146,7 @@ var app = (function () { return block; } - function create_fragment$8(ctx) { + function create_fragment$9(ctx) { let div10; let div4; let div3; @@ -2241,31 +2273,31 @@ var app = (function () { each_blocks[i].c(); } - add_location(b, file$8, 12, 13, 363); - add_location(span, file$8, 12, 6, 356); - add_location(div0, file$8, 13, 6, 399); - add_location(div1, file$8, 14, 6, 543); - add_location(div2, file$8, 15, 6, 575); + add_location(b, file$9, 12, 13, 363); + add_location(span, file$9, 12, 6, 356); + add_location(div0, file$9, 13, 6, 399); + add_location(div1, file$9, 14, 6, 543); + add_location(div2, file$9, 15, 6, 575); attr_dev(div3, "class", "stats svelte-1d8rshd"); - add_location(div3, file$8, 11, 4, 329); + add_location(div3, file$9, 11, 4, 329); attr_dev(div4, "class", "grid-statsitem svelte-1d8rshd"); - add_location(div4, file$8, 10, 2, 295); - add_location(ul0, file$8, 20, 4, 663); + add_location(div4, file$9, 10, 2, 295); + add_location(ul0, file$9, 20, 4, 663); attr_dev(div5, "class", "grid-statsitem svelte-1d8rshd"); - add_location(div5, file$8, 19, 2, 629); - add_location(h20, file$8, 29, 6, 850); - add_location(ul1, file$8, 30, 6, 876); + add_location(div5, file$9, 19, 2, 629); + add_location(h20, file$9, 29, 6, 850); + add_location(ul1, file$9, 30, 6, 876); attr_dev(div6, "class", "inventory svelte-1d8rshd"); - add_location(div6, file$8, 28, 4, 819); + add_location(div6, file$9, 28, 4, 819); attr_dev(div7, "class", "grid-statsitem svelte-1d8rshd"); - add_location(div7, file$8, 27, 2, 785); - add_location(h21, file$8, 40, 6, 1094); + add_location(div7, file$9, 27, 2, 785); + add_location(h21, file$9, 40, 6, 1094); attr_dev(div8, "class", "skill-tree svelte-1d8rshd"); - add_location(div8, file$8, 39, 4, 1062); + add_location(div8, file$9, 39, 4, 1062); attr_dev(div9, "class", "grid-statsitem svelte-1d8rshd"); - add_location(div9, file$8, 38, 2, 1028); + add_location(div9, file$9, 38, 2, 1028); attr_dev(div10, "class", "grid-statsContainer svelte-1d8rshd"); - add_location(div10, file$8, 9, 0, 258); + add_location(div10, file$9, 9, 0, 258); }, l: function claim(nodes) { throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); @@ -2427,7 +2459,7 @@ var app = (function () { dispatch_dev("SvelteRegisterBlock", { block, - id: create_fragment$8.name, + id: create_fragment$9.name, type: "component", source: "", ctx @@ -2436,7 +2468,7 @@ var app = (function () { return block; } - function instance$8($$self, $$props, $$invalidate) { + function instance$9($$self, $$props, $$invalidate) { let $health; let $mana; let $strength; @@ -2471,7 +2503,7 @@ var app = (function () { validate_store(skills, 'skills'); component_subscribe($$self, skills, $$value => $$invalidate(10, $skills = $$value)); let { $$slots: slots = {}, $$scope } = $$props; - validate_slots('MovingDotStatStoreandDisplay', slots, []); + validate_slots('MovingDotStatDisplay', slots, []); function toggleSkill(skill) { skill.learned = !skill.learned; @@ -2481,7 +2513,7 @@ var app = (function () { const writable_props = []; Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); }); const click_handler = skill => toggleSkill(skill); @@ -2529,24 +2561,24 @@ var app = (function () { ]; } - class MovingDotStatStoreandDisplay extends SvelteComponentDev { + class MovingDotStatDisplay extends SvelteComponentDev { constructor(options) { super(options); - init(this, options, instance$8, create_fragment$8, safe_not_equal, {}); + init(this, options, instance$9, create_fragment$9, safe_not_equal, {}); dispatch_dev("SvelteRegisterComponent", { component: this, - tagName: "MovingDotStatStoreandDisplay", + tagName: "MovingDotStatDisplay", options, - id: create_fragment$8.name + id: create_fragment$9.name }); } } /* src\MovingDotSpaceThemeManager.svelte generated by Svelte v3.59.2 */ - const file$7 = "src\\MovingDotSpaceThemeManager.svelte"; + const file$8 = "src\\MovingDotSpaceThemeManager.svelte"; - function create_fragment$7(ctx) { + function create_fragment$8(ctx) { let form; let input0; let t0; @@ -2565,25 +2597,35 @@ var app = (function () { let div5; let div0; let t10; - let t11; let br0; + let t11; + let br1; let t12; + let br2; let t13; + let br3; + let t14; let div1; let t15; - let div2; let t16; - let br1; + let br4; let t17; - let br2; let t18; - let t19; - let div3; + let div2; let t20; - let br3; + let div3; let t21; + let br5; let t22; + let br6; + let t23; + let br7; + let t24; + let t25; let div4; + let t26; + let br8; + let t27; let mounted; let dispose; @@ -2609,59 +2651,73 @@ var app = (function () { t9 = space(); div5 = element("div"); div0 = element("div"); - t10 = text(/*ChangedContentPlaceholder*/ ctx[0]); - t11 = space(); + t10 = text("Website = multilingual support in chrome "); br0 = element("br"); - t12 = text("\r\n Example - Write a story where the main event are in this order: gosomewhere getsomething makeobservation getsomething talktosomeone makeobservation getsomething talktosomeone gosomewhere fight talktosomeone fight fight talktosomeone talktosomeone talktosomeone gosomewhere talktosomeone"); - t13 = space(); - div1 = element("div"); - div1.textContent = "Event Trigger - Collisions\r\n Combat Mechanics - Modal (aka anything)\r\n objectives = boolean\r\n Story = conflict and resolution towards solving a larger conflict\r\n basic story elements fight getsomething gosomewhere talktosomeone makeobservation - use the random count component above"; - t15 = space(); - div2 = element("div"); - t16 = text("Extra Stats "); + t11 = text("\r\n All Alert version of the game then think of modal to extend "); br1 = element("br"); - t17 = text(" \r\n Save State "); + t12 = text("\r\n ChatGPT = Random event to story then Graph with rectangles and diamonds then alert based config settings"); br2 = element("br"); - t18 = text("\r\n Clock System - based on the user movement?"); - t19 = space(); - div3 = element("div"); - t20 = text("Story Line "); + t13 = text("\r\n Modal = Component for each game mechanic "); br3 = element("br"); - t21 = text("\r\n Hard as it combines skills, targets, inventory, objectives and player interaction = = = Give ChatGPT a sample config then ask for a story and then ask to turn that story into config format"); - t22 = space(); + t14 = space(); + div1 = element("div"); + t15 = text(/*ChangedContentPlaceholder*/ ctx[0]); + t16 = space(); + br4 = element("br"); + t17 = text("\r\n Example - Write a story where the main event are in this order: gosomewhere getsomething makeobservation getsomething talktosomeone makeobservation getsomething talktosomeone gosomewhere fight talktosomeone fight fight talktosomeone talktosomeone talktosomeone gosomewhere talktosomeone"); + t18 = space(); + div2 = element("div"); + div2.textContent = "Event Trigger - Collisions\r\n Combat Mechanics - Modal (aka anything)\r\n objectives = boolean\r\n Story = conflict and resolution towards solving a larger conflict\r\n basic story elements fight getsomething gosomewhere talktosomeone makeobservation - use the random count component above"; + t20 = space(); + div3 = element("div"); + t21 = text("Extra Stats "); + br5 = element("br"); + t22 = text(" \r\n Save State "); + br6 = element("br"); + t23 = text("\r\n Clock System - based on the user movement? "); + br7 = element("br"); + t24 = text("\r\n For Learning Purposes make school, bank and retail store versions"); + t25 = space(); div4 = element("div"); - div4.textContent = "Themes inside themes = storyline aka multiple situational themes = a story"; + t26 = text("Story Line "); + br8 = element("br"); + t27 = text("\r\n Hard as it combines skills, targets, inventory, objectives and player interaction = = = Give ChatGPT a sample config then ask for a story and then ask to turn that story into config format"); attr_dev(input0, "type", "text"); attr_dev(input0, "placeholder", "Type (weapon, armor, consumable)"); - add_location(input0, file$7, 67, 4, 2591); + add_location(input0, file$8, 67, 4, 2591); attr_dev(input1, "type", "text"); attr_dev(input1, "placeholder", "Name"); - add_location(input1, file$7, 68, 4, 2691); + add_location(input1, file$8, 68, 4, 2691); attr_dev(input2, "type", "text"); attr_dev(input2, "placeholder", "Description"); - add_location(input2, file$7, 69, 4, 2763); + add_location(input2, file$8, 69, 4, 2763); attr_dev(button0, "type", "submit"); - add_location(button0, file$7, 70, 4, 2849); - add_location(form, file$7, 66, 0, 2544); - add_location(button1, file$7, 76, 0, 3028); + add_location(button0, file$8, 70, 4, 2849); + add_location(form, file$8, 66, 0, 2544); + add_location(button1, file$8, 76, 0, 3028); attr_dev(input3, "type", "file"); attr_dev(input3, "id", "fileInput"); set_style(input3, "display", "none"); - add_location(input3, file$7, 77, 0, 3102); + add_location(input3, file$8, 77, 0, 3102); attr_dev(label, "for", "fileInput"); attr_dev(label, "class", "btn"); - add_location(label, file$7, 78, 0, 3191); - add_location(br0, file$7, 82, 38, 3346); - add_location(div0, file$7, 81, 4, 3301); - add_location(div1, file$7, 86, 4, 3667); - add_location(br1, file$7, 95, 20, 4040); - add_location(br2, file$7, 96, 19, 4069); - add_location(div2, file$7, 94, 4, 4012); - add_location(br3, file$7, 101, 19, 4174); - add_location(div3, file$7, 100, 4, 4148); - add_location(div4, file$7, 105, 4, 4396); + add_location(label, file$8, 78, 0, 3191); + add_location(br0, file$8, 82, 49, 3357); + add_location(br1, file$8, 83, 68, 3431); + add_location(br2, file$8, 84, 112, 3549); + add_location(br3, file$8, 85, 49, 3604); + add_location(div0, file$8, 81, 4, 3301); + add_location(br4, file$8, 89, 38, 3673); + add_location(div1, file$8, 88, 4, 3628); + add_location(div2, file$8, 93, 4, 3994); + add_location(br5, file$8, 102, 20, 4367); + add_location(br6, file$8, 103, 19, 4396); + add_location(br7, file$8, 104, 53, 4455); + add_location(div3, file$8, 101, 4, 4339); + add_location(br8, file$8, 109, 19, 4580); + add_location(div4, file$8, 108, 4, 4554); attr_dev(div5, "class", "grid-themegridContainer svelte-1b47i4k"); - add_location(div5, file$7, 80, 0, 3258); + add_location(div5, file$8, 80, 0, 3258); }, l: function claim(nodes) { throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); @@ -2688,25 +2744,35 @@ var app = (function () { insert_dev(target, div5, anchor); append_dev(div5, div0); append_dev(div0, t10); - append_dev(div0, t11); append_dev(div0, br0); + append_dev(div0, t11); + append_dev(div0, br1); append_dev(div0, t12); - append_dev(div5, t13); + append_dev(div0, br2); + append_dev(div0, t13); + append_dev(div0, br3); + append_dev(div5, t14); append_dev(div5, div1); - append_dev(div5, t15); + append_dev(div1, t15); + append_dev(div1, t16); + append_dev(div1, br4); + append_dev(div1, t17); + append_dev(div5, t18); append_dev(div5, div2); - append_dev(div2, t16); - append_dev(div2, br1); - append_dev(div2, t17); - append_dev(div2, br2); - append_dev(div2, t18); - append_dev(div5, t19); + append_dev(div5, t20); append_dev(div5, div3); - append_dev(div3, t20); - append_dev(div3, br3); append_dev(div3, t21); - append_dev(div5, t22); + append_dev(div3, br5); + append_dev(div3, t22); + append_dev(div3, br6); + append_dev(div3, t23); + append_dev(div3, br7); + append_dev(div3, t24); + append_dev(div5, t25); append_dev(div5, div4); + append_dev(div4, t26); + append_dev(div4, br8); + append_dev(div4, t27); if (!mounted) { dispose = [ @@ -2734,7 +2800,7 @@ var app = (function () { set_input_value(input2, /*newItem*/ ctx[1].description); } - if (dirty & /*ChangedContentPlaceholder*/ 1) set_data_dev(t10, /*ChangedContentPlaceholder*/ ctx[0]); + if (dirty & /*ChangedContentPlaceholder*/ 1) set_data_dev(t15, /*ChangedContentPlaceholder*/ ctx[0]); }, i: noop, o: noop, @@ -2755,7 +2821,7 @@ var app = (function () { dispatch_dev("SvelteRegisterBlock", { block, - id: create_fragment$7.name, + id: create_fragment$8.name, type: "component", source: "", ctx @@ -2764,7 +2830,7 @@ var app = (function () { return block; } - function instance$7($$self, $$props, $$invalidate) { + function instance$8($$self, $$props, $$invalidate) { let $targets; let $objectives; let $skills; @@ -2913,13 +2979,13 @@ var app = (function () { class MovingDotSpaceThemeManager extends SvelteComponentDev { constructor(options) { super(options); - init(this, options, instance$7, create_fragment$7, safe_not_equal, { ChangedContentPlaceholder: 0 }); + init(this, options, instance$8, create_fragment$8, safe_not_equal, { ChangedContentPlaceholder: 0 }); dispatch_dev("SvelteRegisterComponent", { component: this, tagName: "MovingDotSpaceThemeManager", options, - id: create_fragment$7.name + id: create_fragment$8.name }); } @@ -2932,206 +2998,762 @@ var app = (function () { } } - // themeConfig.js - const themes = { - 'User Custom': { - background: '/path/to/space_background.png', - inventory: [ - { type: "weapon", name: "Laser Gun", description: "A powerful laser weapon." }, - // ... more space items - ], - skills: [ - { branch: "Skill Group 1", name: "Skill One", learned: false }, - // ... more space skills - ], - objectives: [ - { branch: "Mission 1", name: "Mission Details", complete: false }, - // ... more space objectives - ], - // ... and so on for targets - targets: [ - { name: "Target 1", x: 50, y: 50, collisionType: "alert", collisiontext: "First Test"}, - ], - }, - 'Default': { - background: '/AutoGameBackgrounds/1stGameLoc123.png', - inventory: [ - { type: "weapon", name: "Sword", description: "A sharp blade." }, - { type: "armor", name: "Shield", description: "Protects against attacks." }, - { type: "consumable", name: "Health Potion", description: "Restores health." }, - // ... more space items - ], - skills: [ - { branch: "Combat", name: "Basic Attack", learned: false }, - { branch: "Magic", name: "Fireball", learned: false }, - { branch: "Stealth", name: "Sneak", learned: false }, - // ... more space skills - ], - objectives: [ - { branch: "Seperate", name: "Visit Mountain Peak", complete: false }, - { branch: "Mission 1", name: "Intercept The Courier (Search the Locations)", complete: false }, - { branch: "Mission 1", name: "Deliver the package to Market Stall", complete: false }, - // ... more space objectives - ], - // ... and so on for targets - targets: [ - { name: "Target 1", x: 50, y: 50, collisionType: "alert", collisiontext: "First Test"}, - { name: "Target 2", x: 100, y: 100, collisionType: "", collisiontext: ""}, - { name: "Entrance", x: 995, y: 660, collisionType: "modal", modalConfig: { - title: "Entrance", - content: "You've reached the Entrance. What's your next step?", - actions: [ - { - label: "Ask for guidance on next move", - action: "askforDirections" - }, - { - label: "Buy an Axe", - action: "buyAxeAlert" - } - // ... more actions if necessary - ]}, - }, - { name: "Market Stall", x: 200, y: 300, collisionType: "", collisiontext: "" }, // A market stall in the bustling market area. - { name: "Inn Entrance", x: 400, y: 450, collisionType: "", collisiontext: "" }, // The entrance to the inn for rest or information. - { name: "Town Hall", x: 600, y: 350, collisionType: "", collisiontext: "" }, // The entrance to the town hall for quests. - { name: "Fountain", x: 500, y: 500, collisionType: "", collisiontext: "" }, // A fountain in the town square as a meeting point. - { name: "Bridge", x: 1100, y: 700, collisionType: "", collisiontext: "" }, // A bridge in the mystical forest area. - { name: "Waterfall", x: 1300, y: 800, collisionType: "", collisiontext: "" }, // A waterfall that could hide secrets or treasures. - { name: "Mountain Peak", x: 1500, y: 100, collisionType: "", collisiontext: "" }, - //{ name: "Mysterious Stranger", x: 350, y: 550, collisionType: "alert", collisiontext: "Beware the hidden caves in the north." }, - //{ name: "Hidden Cave", x: 1200, y: 400, collisionType: "changeBackgroundColor", color: "#0B3D91" }, - //{ name: "Ancient Tree", x: 300, y: 700, collisionType: "playSound", soundUrl: "tree_whisper.mp3" }, - //{ name: "Forgotten Monument", x: 700, y: 800, collisionType: "startAnimation", elementId: "monument", animationClass: "glow" }, - //{ name: "Wizard's Tower", x: 950, y: 150, collisionType: "rotateDot" }, - //{ name: "Lakeside", x: 1400, y: 600, collisionType: "changeDotColor", color: "#00BFFF" }, - //{ name: "Dragon's Lair", x: 1600, y: 200, collisionType: "incrementScore", incrementValue: 50 }, - //{ name: "Abandoned Shipwreck", x: 1300, y: 500, collisionType: "shrinkDot" }, - ], - }, - 'Space Odyssey': { - background: '/AutoGameBackgrounds/SpaceOdysseyGameLoc.png', - inventory: [ - { type: "weapon", name: "Laser Gun", description: "A powerful laser weapon." }, - // ... more space items - ], - skills: [ - { branch: "Piloting", name: "Astro Navigation", learned: false }, - // ... more space skills - ], - objectives: [ - { id: 1, name: "Dock at the Space Station", complete: false, progress: 0 }, - { id: 2, name: "Repair the Communication Array", complete: false, progress: 0 }, - { id: 3, name: "Collect Rare Asteroid Minerals", complete: false, progress: 0 }, - { id: 4, name: "Negotiate Peace with the Alien Species", complete: false, progress: 0 }, - { id: 5, name: "Explore the Abandoned Spaceship", complete: false, progress: 0 }, - { id: 6, name: "Survive the Meteor Shower", complete: false, progress: 0 }, - { id: 7, name: "Decrypt the Ancient Space Map", complete: false, progress: 0 }, - { id: 8, name: "Win the Space Race", complete: false, progress: 0 }, - { id: 9, name: "Defend the Colony from Space Pirates", complete: false, progress: 0 }, - { id: 10, name: "Discover a New Lifeform", complete: false, progress: 0 } - // ... more space objectives - ], - targets: [ - { name: "Target 1", x: 50, y: 50, collisionType: "alert", collisiontext: "First Test"}, - ], - }, - 'Medieval Fantasy': { - background: '/AutoGameBackgrounds/MedievalFantasyGameLoc.png', - inventory: [ - { type: "weapon", name: "Longsword", description: "A sturdy steel blade." }, - // ... more medieval items - ], - skills: [ - { branch: "Piloting", name: "Astro Navigation", learned: false }, - // ... more space skills - ], - objectives: [ - { id: 1, name: "Rescue the Captured Knight", complete: false, progress: 0 }, - { id: 2, name: "Find the Lost Artifact", complete: false, progress: 0 }, - { id: 3, name: "Defeat the Dragon", complete: false, progress: 0 }, - { id: 4, name: "Win the Archery Tournament", complete: false, progress: 0 }, - { id: 5, name: "Break the Evil Curse", complete: false, progress: 0 }, - { id: 6, name: "Uncover the Secret of the Ancient Ruins", complete: false, progress: 0 }, - { id: 7, name: "Protect the Village from Bandits", complete: false, progress: 0 }, - { id: 8, name: "Retrieve the Stolen Royal Jewels", complete: false, progress: 0 }, - { id: 9, name: "Discover the Hidden Enchanted Forest", complete: false, progress: 0 }, - { id: 10, name: "Master the Forbidden Magic Spell", complete: false, progress: 0 } - // ... more space objectives - ], - targets: [ - { name: "Target 1", x: 50, y: 50, collisionType: "alert", collisiontext: "First Test"}, - ], - // ... skills, objectives, and targets for medieval theme - }, - 'Cyberpunk': { - background: '/AutoGameBackgrounds/CyberpunkGameLoc.png', - inventory: [ - { type: "weapon", name: "Plasma Rifle", description: "A high-tech firearm with plasma rounds." }, - { type: "armor", name: "NanoSuit", description: "Protects with reactive nano technology." }, - { type: "consumable", name: "Stim Pack", description: "Enhances reflexes temporarily." }, - // ... more cyberpunk items - ], - // ... skills, objectives, and targets for cyberpunk theme - skills: [ - { branch: "Hacking", name: "Cyber Intrusion", learned: false }, - { branch: "Combat", name: "Gun Kata", learned: false }, - { branch: "Stealth", name: "Cloaking", learned: false }, - // ... more space skills - ], - objectives: [ - { id: 1, name: "Hack the Mainframe", complete: false, progress: 0 }, - { id: 2, name: "Escape the Megacorp Security", complete: false, progress: 0 }, - { id: 3, name: "Infiltrate the Underground Hacker Group", complete: false, progress: 0 }, - { id: 4, name: "Negotiate a Truce with the Rival Gang", complete: false, progress: 0 }, - { id: 5, name: "Expose the Corrupt Politician", complete: false, progress: 0 }, - { id: 6, name: "Survive the Drone Assault", complete: false, progress: 0 }, - { id: 7, name: "Retrieve the Stolen Cybernetic Tech", complete: false, progress: 0 }, - { id: 8, name: "Win the Street Race in Neo-Tokyo", complete: false, progress: 0 }, - { id: 9, name: "Decrypt the Corporate Data Files", complete: false, progress: 0 }, - { id: 10, name: "Disarm the City-Wide Neural Bomb", complete: false, progress: 0 } - - // ... more space objectives - ], - targets: [ - { name: "Target 1", x: 50, y: 50, collisionType: "alert", collisiontext: "First Test"}, - { name: "MegaCorp Server", x: 200, y: 50, collisionType: "modal", collisiontext: "First Test"}, - { name: "City Police", x: 50, y: 250, collisionType: "modal", collisiontext: "First Test"}, - { name: "Rival Gang", x: 550, y: 550, collisionType: "modal", collisiontext: "First Test"}, - ], - } - }; + /* src\MovingDotSpaceGameFight.svelte generated by Svelte v3.59.2 */ - /* src\MovingDotSpacePortfromReact.svelte generated by Svelte v3.59.2 */ + const file$7 = "src\\MovingDotSpaceGameFight.svelte"; - const { Object: Object_1$1, console: console_1$4 } = globals; - const file$6 = "src\\MovingDotSpacePortfromReact.svelte"; + // (88:8) {#if $fightcurrentTurn === 'human'} + function create_if_block$4(ctx) { + let button0; + let t1; + let button1; + let t3; + let button2; + let mounted; + let dispose; + + const block_1 = { + c: function create() { + button0 = element("button"); + button0.textContent = "Attack"; + t1 = space(); + button1 = element("button"); + button1.textContent = "Special Attack"; + t3 = space(); + button2 = element("button"); + button2.textContent = "Block"; + add_location(button0, file$7, 88, 12, 3623); + add_location(button1, file$7, 89, 12, 3730); + add_location(button2, file$7, 90, 12, 3856); + }, + m: function mount(target, anchor) { + insert_dev(target, button0, anchor); + insert_dev(target, t1, anchor); + insert_dev(target, button1, anchor); + insert_dev(target, t3, anchor); + insert_dev(target, button2, anchor); + + if (!mounted) { + dispose = [ + listen_dev(button0, "click", /*click_handler*/ ctx[5], false, false, false, false), + listen_dev(button1, "click", /*click_handler_1*/ ctx[6], false, false, false, false), + listen_dev(button2, "click", /*click_handler_2*/ ctx[7], false, false, false, false) + ]; + + mounted = true; + } + }, + p: noop, + d: function destroy(detaching) { + if (detaching) detach_dev(button0); + if (detaching) detach_dev(t1); + if (detaching) detach_dev(button1); + if (detaching) detach_dev(t3); + if (detaching) detach_dev(button2); + mounted = false; + run_all(dispose); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block: block_1, + id: create_if_block$4.name, + type: "if", + source: "(88:8) {#if $fightcurrentTurn === 'human'}", + ctx + }); + + return block_1; + } + + function create_fragment$7(ctx) { + let div4; + let div0; + let t0; + let br0; + let t1; + let t2_value = /*$fightplayerHuman*/ ctx[1].fighthealth + ""; + let t2; + let t3; + let br1; + let t4; + let t5_value = /*$fightplayerHuman*/ ctx[1].fightstamina + ""; + let t5; + let t6; + let br2; + let t7; + + let t8_value = (/*$fightplayerHuman*/ ctx[1].fightisBlocking + ? 'Blocking' + : '') + ""; + + let t8; + let t9; + let br3; + let t10; + let t11_value = /*$fightplayerHuman*/ ctx[1].fightcooldowns.attack + ""; + let t11; + let t12; + let br4; + let t13; + let div2; + let div1; + + let t14_value = (/*$fightcurrentTurn*/ ctx[0] === 'human' + ? "Your turn" + : "Computer's turn") + ""; + + let t14; + let t15; + let t16; + let div3; + let t17; + let br5; + let t18; + let t19_value = /*$fightplayerComputer*/ ctx[2].fighthealth + ""; + let t19; + let t20; + let br6; + let t21; + let t22_value = /*$fightplayerComputer*/ ctx[2].fightstamina + ""; + let t22; + let t23; + let br7; + let t24; + + let t25_value = (/*$fightplayerComputer*/ ctx[2].fightisBlocking + ? 'Blocking' + : '') + ""; + + let t25; + let t26; + let br8; + let t27; + let t28_value = /*$fightplayerComputer*/ ctx[2].fightcooldowns.attack + ""; + let t28; + let t29; + let br9; + let if_block = /*$fightcurrentTurn*/ ctx[0] === 'human' && create_if_block$4(ctx); + + const block_1 = { + c: function create() { + div4 = element("div"); + div0 = element("div"); + t0 = text("Player 1 "); + br0 = element("br"); + t1 = text("\r\n Health: "); + t2 = text(t2_value); + t3 = space(); + br1 = element("br"); + t4 = text("\r\n Stamina: "); + t5 = text(t5_value); + t6 = space(); + br2 = element("br"); + t7 = space(); + t8 = text(t8_value); + t9 = space(); + br3 = element("br"); + t10 = text("\r\n Cooldown: Attack - "); + t11 = text(t11_value); + t12 = text("s "); + br4 = element("br"); + t13 = space(); + div2 = element("div"); + div1 = element("div"); + t14 = text(t14_value); + t15 = space(); + if (if_block) if_block.c(); + t16 = space(); + div3 = element("div"); + t17 = text("Player 2 "); + br5 = element("br"); + t18 = text("\r\n Health: "); + t19 = text(t19_value); + t20 = space(); + br6 = element("br"); + t21 = text("\r\n Stamina: "); + t22 = text(t22_value); + t23 = space(); + br7 = element("br"); + t24 = space(); + t25 = text(t25_value); + t26 = space(); + br8 = element("br"); + t27 = text("\r\n Cooldown: Attack - "); + t28 = text(t28_value); + t29 = text("s "); + br9 = element("br"); + add_location(br0, file$7, 76, 17, 3171); + add_location(br1, file$7, 77, 48, 3225); + add_location(br2, file$7, 78, 50, 3281); + add_location(br3, file$7, 79, 62, 3349); + add_location(br4, file$7, 80, 70, 3425); + add_location(div0, file$7, 75, 4, 3147); + add_location(div1, file$7, 84, 8, 3464); + add_location(div2, file$7, 83, 4, 3449); + add_location(br5, file$7, 95, 17, 3978); + add_location(br6, file$7, 96, 51, 4035); + add_location(br7, file$7, 97, 53, 4094); + add_location(br8, file$7, 98, 65, 4165); + add_location(br9, file$7, 99, 73, 4244); + add_location(div3, file$7, 94, 4, 3954); + attr_dev(div4, "class", "statscontainer svelte-izilsr"); + add_location(div4, file$7, 74, 0, 3113); + }, + l: function claim(nodes) { + throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); + }, + m: function mount(target, anchor) { + insert_dev(target, div4, anchor); + append_dev(div4, div0); + append_dev(div0, t0); + append_dev(div0, br0); + append_dev(div0, t1); + append_dev(div0, t2); + append_dev(div0, t3); + append_dev(div0, br1); + append_dev(div0, t4); + append_dev(div0, t5); + append_dev(div0, t6); + append_dev(div0, br2); + append_dev(div0, t7); + append_dev(div0, t8); + append_dev(div0, t9); + append_dev(div0, br3); + append_dev(div0, t10); + append_dev(div0, t11); + append_dev(div0, t12); + append_dev(div0, br4); + append_dev(div4, t13); + append_dev(div4, div2); + append_dev(div2, div1); + append_dev(div1, t14); + append_dev(div2, t15); + if (if_block) if_block.m(div2, null); + append_dev(div4, t16); + append_dev(div4, div3); + append_dev(div3, t17); + append_dev(div3, br5); + append_dev(div3, t18); + append_dev(div3, t19); + append_dev(div3, t20); + append_dev(div3, br6); + append_dev(div3, t21); + append_dev(div3, t22); + append_dev(div3, t23); + append_dev(div3, br7); + append_dev(div3, t24); + append_dev(div3, t25); + append_dev(div3, t26); + append_dev(div3, br8); + append_dev(div3, t27); + append_dev(div3, t28); + append_dev(div3, t29); + append_dev(div3, br9); + }, + p: function update(ctx, [dirty]) { + if (dirty & /*$fightplayerHuman*/ 2 && t2_value !== (t2_value = /*$fightplayerHuman*/ ctx[1].fighthealth + "")) set_data_dev(t2, t2_value); + if (dirty & /*$fightplayerHuman*/ 2 && t5_value !== (t5_value = /*$fightplayerHuman*/ ctx[1].fightstamina + "")) set_data_dev(t5, t5_value); + + if (dirty & /*$fightplayerHuman*/ 2 && t8_value !== (t8_value = (/*$fightplayerHuman*/ ctx[1].fightisBlocking + ? 'Blocking' + : '') + "")) set_data_dev(t8, t8_value); + + if (dirty & /*$fightplayerHuman*/ 2 && t11_value !== (t11_value = /*$fightplayerHuman*/ ctx[1].fightcooldowns.attack + "")) set_data_dev(t11, t11_value); + + if (dirty & /*$fightcurrentTurn*/ 1 && t14_value !== (t14_value = (/*$fightcurrentTurn*/ ctx[0] === 'human' + ? "Your turn" + : "Computer's turn") + "")) set_data_dev(t14, t14_value); + + if (/*$fightcurrentTurn*/ ctx[0] === 'human') { + if (if_block) { + if_block.p(ctx, dirty); + } else { + if_block = create_if_block$4(ctx); + if_block.c(); + if_block.m(div2, null); + } + } else if (if_block) { + if_block.d(1); + if_block = null; + } + + if (dirty & /*$fightplayerComputer*/ 4 && t19_value !== (t19_value = /*$fightplayerComputer*/ ctx[2].fighthealth + "")) set_data_dev(t19, t19_value); + if (dirty & /*$fightplayerComputer*/ 4 && t22_value !== (t22_value = /*$fightplayerComputer*/ ctx[2].fightstamina + "")) set_data_dev(t22, t22_value); + + if (dirty & /*$fightplayerComputer*/ 4 && t25_value !== (t25_value = (/*$fightplayerComputer*/ ctx[2].fightisBlocking + ? 'Blocking' + : '') + "")) set_data_dev(t25, t25_value); + + if (dirty & /*$fightplayerComputer*/ 4 && t28_value !== (t28_value = /*$fightplayerComputer*/ ctx[2].fightcooldowns.attack + "")) set_data_dev(t28, t28_value); + }, + i: noop, + o: noop, + d: function destroy(detaching) { + if (detaching) detach_dev(div4); + if (if_block) if_block.d(); + } + }; + + dispatch_dev("SvelteRegisterBlock", { + block: block_1, + id: create_fragment$7.name, + type: "component", + source: "", + ctx + }); + + return block_1; + } + + function updatefightPlayer(player, changes) { + player.update(current => { + return { ...current, ...changes }; + }); + } + + function instance$7($$self, $$props, $$invalidate) { + let $fightcurrentTurn; + let $fightplayerHuman; + let $fightplayerComputer; + validate_store(fightcurrentTurn, 'fightcurrentTurn'); + component_subscribe($$self, fightcurrentTurn, $$value => $$invalidate(0, $fightcurrentTurn = $$value)); + validate_store(fightplayerHuman, 'fightplayerHuman'); + component_subscribe($$self, fightplayerHuman, $$value => $$invalidate(1, $fightplayerHuman = $$value)); + validate_store(fightplayerComputer, 'fightplayerComputer'); + component_subscribe($$self, fightplayerComputer, $$value => $$invalidate(2, $fightplayerComputer = $$value)); + let { $$slots: slots = {}, $$scope } = $$props; + validate_slots('MovingDotSpaceGameFight', slots, []); + + function switchTurn() { + fightcurrentTurn.update(turn => turn === 'human' ? 'computer' : 'human'); + + // Immediately after switching to computer's turn, initiate the computer's action. + if ($fightcurrentTurn === 'computer') { + setTimeout(() => computerAction(), 1000); // Simulate thinking delay for the computer's turn + } + } + + function performAttack(attacker, defender, attackType = 'normal') { + //fightcurrentTurn.update(turn => { + if ($fightcurrentTurn === 'human' && attacker === fightplayerHuman || $fightcurrentTurn === 'computer' && attacker === fightplayerComputer) { + // Perform attack logic here + attacker.update(a => { + if (a.fightstamina < 20 || a.fightcooldowns.attack > 0) { + return a; // Not enough stamina or attack is on cooldown + } + + defender.update(d => { + if (!d.fightisBlocking) { + d.fighthealth -= attackType === 'normal' ? 10 : 25; // Special attack does more damage + } + + return d; + }); + + return { + ...a, + fightstamina: a.fightstamina - 20, + fightcooldowns: { + ...a.fightcooldowns, + attack: attackType === 'normal' ? 1 : 3 + }, // Cooldown in seconds + + }; + }); + + // Start cooldown timer + setTimeout( + () => { + attacker.update(a => { + return { + ...a, + fightcooldowns: { ...a.fightcooldowns, attack: 0 } + }; + }); + }, + attackType === 'normal' ? 1000 : 3000 + ); // Cooldown period + } + + switchTurn(); + } + + function block(player) { + if ($fightcurrentTurn === 'human' && player === fightplayerHuman || $fightcurrentTurn === 'computer' && player === fightplayerComputer) { + // Perform block logic here + updatefightPlayer(player, { fightisBlocking: true }); + + setTimeout( + () => { + updatefightPlayer(player, { fightisBlocking: false }); + }, + 1000 + ); // Unblock after 1 second + } + + switchTurn(); + } + + function computerAction() { + // Simple AI: Choose to attack or block randomly + const action = Math.random() > 0.4 ? 'attack' : 'block'; + + if (action === 'attack') { + performAttack(fightplayerComputer, fightplayerHuman); + } else { + block(fightplayerComputer); + } + } //switchTurn(); // Return control to the human player + + const writable_props = []; + + Object.keys($$props).forEach(key => { + if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); + }); + + const click_handler = () => performAttack(fightplayerHuman, fightplayerComputer); + const click_handler_1 = () => performAttack(fightplayerHuman, fightplayerComputer, 'special'); + const click_handler_2 = () => block(fightplayerHuman); + + $$self.$capture_state = () => ({ + fightplayerHuman, + fightplayerComputer, + fightcurrentTurn, + switchTurn, + updatefightPlayer, + performAttack, + block, + computerAction, + $fightcurrentTurn, + $fightplayerHuman, + $fightplayerComputer + }); + + return [ + $fightcurrentTurn, + $fightplayerHuman, + $fightplayerComputer, + performAttack, + block, + click_handler, + click_handler_1, + click_handler_2 + ]; + } + + class MovingDotSpaceGameFight extends SvelteComponentDev { + constructor(options) { + super(options); + init(this, options, instance$7, create_fragment$7, safe_not_equal, {}); + + dispatch_dev("SvelteRegisterComponent", { + component: this, + tagName: "MovingDotSpaceGameFight", + options, + id: create_fragment$7.name + }); + } + } + + // themeConfig.js + const themes = { + 'User Custom': { + background: '/AutoGameBackgrounds/space_background.png', + inventory: [ + { type: "weapon", name: "Laser Gun", description: "A powerful laser weapon." }, + // ... more space items + ], + skills: [ + { branch: "Skill Group 1", name: "Skill One", learned: false }, + // ... more space skills + ], + objectives: [ + { id: "Mission 1", name: "Mission Details", complete: false }, + // ... more space objectives + ], + // ... and so on for targets + storyparttargets: { + 0: [ + { name: "Target 1", x: 50, y: 50, collisionType: "alert", collisiontext: "First Test"}, + ], + } + }, + 'Default': { + background: '/AutoGameBackgrounds/1stGameLoc123.png', + inventory: [ + { type: "weapon", name: "Sword", description: "A sharp blade." }, + { type: "armor", name: "Shield", description: "Protects against attacks." }, + { type: "consumable", name: "Health Potion", description: "Restores health." }, + // ... more space items + ], + skills: [ + { branch: "Combat", name: "Basic Attack", learned: false }, + { branch: "Magic", name: "Fireball", learned: false }, + { branch: "Stealth", name: "Sneak", learned: false }, + // ... more space skills + ], + objectives: [ + { id: "Seperate", name: "Visit Mountain Peak", complete: false }, + { id: "Mission 1", name: "Intercept The Courier (Search the Locations)", complete: false }, + { id: "Mission 1", name: "Deliver the package to Market Stall", complete: false }, + // ... more space objectives + ], + // ... and so on for targets + storyparttargets: { + 0: [ + { name: "Target 1", x: 50, y: 50, collisionType: "alert", collisiontext: "First Test"}, + { name: "Target 2", x: 100, y: 100, collisionType: "", collisiontext: ""}, + { name: "Entrance", x: 995, y: 660, collisionType: "modal", modalConfig: { + title: "Entrance", + content: "You've reached the Entrance. What's your next step?", + actions: [ + {label: "Ask for guidance on next move", action: "askforDirections"}, + {label: "Buy an Axe", action: "buyAxeAlert"}, + // ... more actions if necessary + ]}, + }, + { name: "Market Stall", x: 200, y: 300, collisionType: "", collisiontext: "" }, // A market stall in the bustling market area. + { name: "Inn Entrance", x: 400, y: 450, collisionType: "", collisiontext: "" }, // The entrance to the inn for rest or information. + { name: "Town Hall", x: 600, y: 350, collisionType: "", collisiontext: "" }, // The entrance to the town hall for quests. + { name: "Fountain", x: 500, y: 500, collisionType: "", collisiontext: "" }, // A fountain in the town square as a meeting point. + { name: "Bridge", x: 1100, y: 700, collisionType: "", collisiontext: "" }, // A bridge in the mystical forest area. + { name: "Waterfall", x: 1300, y: 800, collisionType: "", collisiontext: "" }, // A waterfall that could hide secrets or treasures. + { name: "Mountain Peak", x: 1500, y: 100, collisionType: "", collisiontext: "" }, + //{ name: "Mysterious Stranger", x: 350, y: 550, collisionType: "alert", collisiontext: "Beware the hidden caves in the north." }, + //{ name: "Hidden Cave", x: 1200, y: 400, collisionType: "changeBackgroundColor", color: "#0B3D91" }, + //{ name: "Ancient Tree", x: 300, y: 700, collisionType: "playSound", soundUrl: "tree_whisper.mp3" }, + //{ name: "Forgotten Monument", x: 700, y: 800, collisionType: "startAnimation", elementId: "monument", animationClass: "glow" }, + //{ name: "Wizard's Tower", x: 950, y: 150, collisionType: "rotateDot" }, + //{ name: "Lakeside", x: 1400, y: 600, collisionType: "changeDotColor", color: "#00BFFF" }, + //{ name: "Dragon's Lair", x: 1600, y: 200, collisionType: "incrementScore", incrementValue: 50 }, + //{ name: "Abandoned Shipwreck", x: 1300, y: 500, collisionType: "shrinkDot" }, + + { name: "Switch Test 1", x: 700, y: 700, collisionType: "storypartchange", collisiontext: "First Test", newStage: 1}, + ], + 1: [ + { name: "Target 1", x: 50, y: 50, collisionType: "alert", collisiontext: "First Test"}, + { name: "Switch Back Test 1", x: 600, y: 400, collisionType: "storypartchange", collisiontext: "First Test", newStage: 0}, + ], + }, + }, + 'Space Odyssey': { + background: '/AutoGameBackgrounds/SpaceOdysseyGameLoc.png', + inventory: [ + { type: "weapon", name: "Laser Gun", description: "A powerful laser weapon." }, + // ... more space items + ], + skills: [ + { branch: "Piloting", name: "Astro Navigation", learned: false }, + // ... more space skills + ], + objectives: [ + { id: 1, name: "Dock at the Space Station", complete: false, progress: 0 }, + { id: 2, name: "Repair the Communication Array", complete: false, progress: 0 }, + { id: 3, name: "Collect Rare Asteroid Minerals", complete: false, progress: 0 }, + { id: 4, name: "Negotiate Peace with the Alien Species", complete: false, progress: 0 }, + { id: 5, name: "Explore the Abandoned Spaceship", complete: false, progress: 0 }, + { id: 6, name: "Survive the Meteor Shower", complete: false, progress: 0 }, + { id: 7, name: "Decrypt the Ancient Space Map", complete: false, progress: 0 }, + { id: 8, name: "Win the Space Race", complete: false, progress: 0 }, + { id: 9, name: "Defend the Colony from Space Pirates", complete: false, progress: 0 }, + { id: 10, name: "Discover a New Lifeform", complete: false, progress: 0 } + // ... more space objectives + ], + storyparttargets: { + 0: [ + { name: "Target 1", x: 50, y: 50, collisionType: "alert", collisiontext: "First Test"}, + ], + }, + }, + 'Medieval Fantasy': { + background: '/AutoGameBackgrounds/MedievalFantasyGameLoc.png', + inventory: [ + { type: "weapon", name: "Longsword", description: "A sturdy steel blade." }, + // ... more medieval items + ], + skills: [ + { branch: "Piloting", name: "Astro Navigation", learned: false }, + // ... more space skills + ], + objectives: [ + { id: 1, name: "Rescue the Captured Knight", complete: false, progress: 0 }, + { id: 2, name: "Find the Lost Artifact", complete: false, progress: 0 }, + { id: 3, name: "Defeat the Dragon", complete: false, progress: 0 }, + { id: 4, name: "Win the Archery Tournament", complete: false, progress: 0 }, + { id: 5, name: "Break the Evil Curse", complete: false, progress: 0 }, + { id: 6, name: "Uncover the Secret of the Ancient Ruins", complete: false, progress: 0 }, + { id: 7, name: "Protect the Village from Bandits", complete: false, progress: 0 }, + { id: 8, name: "Retrieve the Stolen Royal Jewels", complete: false, progress: 0 }, + { id: 9, name: "Discover the Hidden Enchanted Forest", complete: false, progress: 0 }, + { id: 10, name: "Master the Forbidden Magic Spell", complete: false, progress: 0 } + // ... more space objectives + ], + storyparttargets: { + 0: [ + { name: "Castle", x: 940, y: 460, collisionType: "alert", collisiontext: "The King of this land has summoned you to find and release his champion Daryl the Knight. Find him and free him"}, + { name: "Hidden Space", x: 460, y: 570, collisionType: "alert", collisiontext: "Seems like a hidden space. Nobody is here currently."}, + { name: "Home", x: 640, y: 500, collisionType: "modal", modalConfig: { + title: "Your Space", + content: "Rest and prepare for your tasks. Sometimes you hear noises in the area but this is the area with least interference", + actions: [ + {label: "Ask for guidance on next move", action: "askforDirections"}, + {label: "Buy an Axe", action: "buyAxeAlert"}, + // ... more actions if necessary + ]}, + }, + ], + }, + // ... skills, objectives, and targets for medieval theme + }, + 'Cyberpunk': { + background: '/AutoGameBackgrounds/CyberpunkGameLoc.png', + inventory: [ + { type: "weapon", name: "Plasma Rifle", description: "A high-tech firearm with plasma rounds." }, + { type: "armor", name: "NanoSuit", description: "Protects with reactive nano technology." }, + { type: "consumable", name: "Stim Pack", description: "Enhances reflexes temporarily." }, + // ... more cyberpunk items + ], + // ... skills, objectives, and targets for cyberpunk theme + skills: [ + { branch: "Hacking", name: "Cyber Intrusion", learned: false }, + { branch: "Combat", name: "Gun Kata", learned: false }, + { branch: "Stealth", name: "Cloaking", learned: false }, + // ... more space skills + ], + objectives: [ + { id: 1, name: "Hack the Mainframe", complete: false, progress: 0 }, + { id: 2, name: "Escape the Megacorp Security", complete: false, progress: 0 }, + { id: 3, name: "Infiltrate the Underground Hacker Group", complete: false, progress: 0 }, + { id: 4, name: "Negotiate a Truce with the Rival Gang", complete: false, progress: 0 }, + { id: 5, name: "Expose the Corrupt Politician", complete: false, progress: 0 }, + { id: 6, name: "Survive the Drone Assault", complete: false, progress: 0 }, + { id: 7, name: "Retrieve the Stolen Cybernetic Tech", complete: false, progress: 0 }, + { id: 8, name: "Win the Street Race in Neo-Tokyo", complete: false, progress: 0 }, + { id: 9, name: "Decrypt the Corporate Data Files", complete: false, progress: 0 }, + { id: 10, name: "Disarm the City-Wide Neural Bomb", complete: false, progress: 0 } + + // ... more space objectives + ], + storyparttargets: { + 0: [ + { name: "Target 1", x: 50, y: 50, collisionType: "alert", collisiontext: "First Test"}, + { name: "MegaCorp Server", x: 200, y: 50, collisionType: "alert", collisiontext: "First Test"}, + { name: "City Police", x: 50, y: 250, collisionType: "alert", collisiontext: "First Test"}, + { name: "Rival Gang", x: 550, y: 550, collisionType: "alert", collisiontext: "First Test"}, + ], + }, + }, + 'Super Teacher': { + background: '/AutoGameBackgrounds/SuperTeacherGameLoc.png', + inventory: [ + { type: "book", name: "Math Advice", description: "Useful topical knowledge." }, + { type: "book", name: "Science Advice", description: "Useful topical knowledge." }, + { type: "book", name: "English Advice", description: "Useful topical knowledge." }, + { type: "book", name: "Economics Advice", description: "Useful topical knowledge." }, + // ... more space items + ], + skills: [ + { branch: "Multitask", name: "Movement Speed", learned: false }, + { branch: "Multitask", name: "Stop Window Interference for 1 min", learned: false }, + // ... more space skills + ], + objectives: [ + { id: "Mission 1", name: "Get the children to grade one 1 level", complete: false }, + { id: "Mission 2", name: "Get the children to grade one 2 level", complete: false }, + { id: "Mission 3", name: "Get the children to grade one 3 level", complete: false }, + // ... more space objectives + ], + // ... and so on for targets + storyparttargets: { + 0: [ + { name: "Super Teacher Toolkit", x: 1000, y: 330, collisionType: "alert", collisiontext: "First Test"}, + { name: "Random Noise Interference", x: 250, y: 110, collisionType: "alert", collisiontext: "First Test"}, + { name: "Student 1", x: 310, y: 620, collisionType: "alert", collisiontext: "Attention fully restored. Needs reasoning help with english"}, + { name: "Student 2", x: 660, y: 610, collisionType: "alert", collisiontext: "Attention fully restored. Doesnt speak english."}, + { name: "Student 3", x: 1010, y: 620, collisionType: "alert", collisiontext: "Attention fully restored. Needs reasoning help with math"}, + ], + } + }, + 'Fantasy Adventure': { + background: '/AutoGameBackgrounds/eldoria_background.png', + inventory: [ + { type: "book", name: "Book of Eldrak", description: "An ancient tome containing half of a map." }, + { type: "amulet", name: "Peculiar Amulet", description: "A mysterious amulet bought in Meridia, reveals the unseen." }, + // ... more fantasy items + ], + skills: [ + { branch: "Combat", name: "Sword Mastery", learned: false }, + { branch: "Magic", name: "Elemental Control", learned: false }, + // ... more fantasy skills + ], + objectives: [ + { id: "FindBook", name: "Find the Book of Eldrak", complete: false }, + { id: "GetAmulet", name: "Acquire the Peculiar Amulet", complete: false }, + { id: "DiscoverArtefact", name: "Uncover the Artefact of Vorin", complete: false }, + // ... more fantasy objectives + ], + storyparttargets: { + 0: [ + { name: "Eldoria Main Square", x: 410, y: 590, collisionType: "alert", collisiontext: "The heart of Eldoria, bustling with townsfolk and traders."}, + { name: "Lila's Home", x: 460, y: 600, collisionType: "alert", collisiontext: "A cozy cottage where Lila's quest for knowledge begins."}, + { name: "Eldoria Library", x: 360, y: 620, collisionType: "alert", collisiontext: "A treasure trove of books and maps. Lila spends hours here."}, + { name: "Whispering Forest Edge", x: 830, y: 700, collisionType: "alert", collisiontext: "The mysterious forest that borders Eldoria. Lila feels drawn to its secrets."}, + { name: "Serene Hills", x: 520, y: 490, collisionType: "alert", collisiontext: "Gentle hills that promise adventure beyond Eldoria. Lila often gazes here, dreaming of what lies beyond."}, + { name: "Marketplace", x: 360, y: 560, collisionType: "alert", collisiontext: "A place of trade and gossip. Lila hears rumors of ancient artifacts here."}, + { name: "Eldoria", x: 490, y: 420, collisionType: "storypartchange", collisiontext: "Your journey begins in the quaint town of Eldoria.", newStage: 1}, + { name: "Old Sage's Hut", x: 600, y: 480, collisionType: "modal", collisiontext: "The home of Eldoria's oldest sage. Lila seeks his wisdom for her journey."}, + ], + 1: [ + { name: "Library of Eldrak", x: 620, y: 600, collisionType: "alert", collisiontext: "You discover the ancient Book of Eldrak."}, + { name: "Meridia Market", x: 750, y: 590, collisionType: "alert", collisiontext: "A peculiar amulet catches your eye, promising to reveal the unseen."}, + { name: "Suspicious Place", x: 810, y: 530, collisionType: "decision", collisiontext: "Do you know why you came here?"}, + ], + 2: [ + { name: "Whispering Woods", x: 400, y: 300, collisionType: "modal", collisiontext: "The woods are dense and mysterious, hiding both allies and secrets."}, + ], + 3: [ + { name: "Shadowed Caverns", x: 600, y: 400, collisionType: "fight", collisiontext: "The lair of the Keepers. A test of strength and wit awaits."}, + ], + 4: [ + { name: "Return to Eldoria", x: 100, y: 500, collisionType: "end", collisiontext: "With the Artefact of Vorin, you return, forever changed by your journey."}, + ], + // ... additional story parts as needed + } + }, + }; + + /* src\MovingDotSpacePortfromReact.svelte generated by Svelte v3.59.2 */ + + const { Object: Object_1$1, console: console_1$4 } = globals; + + const file$6 = "src\\MovingDotSpacePortfromReact.svelte"; function get_each_context$3(ctx, list, i) { const child_ctx = ctx.slice(); - child_ctx[23] = list[i]; + child_ctx[25] = list[i]; return child_ctx; } function get_each_context_1(ctx, list, i) { const child_ctx = ctx.slice(); - child_ctx[26] = list[i]; + child_ctx[28] = list[i]; return child_ctx; } - // (149:4) {#each themeKeys as key} + // (166:4) {#each themeKeys as key} function create_each_block_1(ctx) { let option; - let t_value = /*key*/ ctx[26] + ""; + let t_value = /*key*/ ctx[28] + ""; let t; const block = { c: function create() { option = element("option"); t = text(t_value); - option.__value = /*key*/ ctx[26]; + option.__value = /*key*/ ctx[28]; option.value = option.__value; - add_location(option, file$6, 149, 8, 5561); + add_location(option, file$6, 166, 8, 6409); }, m: function mount(target, anchor) { insert_dev(target, option, anchor); @@ -3147,25 +3769,25 @@ var app = (function () { block, id: create_each_block_1.name, type: "each", - source: "(149:4) {#each themeKeys as key}", + source: "(166:4) {#each themeKeys as key}", ctx }); return block; } - // (159:4) {#each $targets as target (target.name)} + // (176:4) {#each $targets as target (target.name)} function create_each_block$3(key_1, ctx) { let first; let target; let t0; let span; - let t1_value = /*target*/ ctx[23].name + ""; + let t1_value = /*target*/ ctx[25].name + ""; let t1; let current; target = new MovingDotTargetPortfromReact({ - props: { position: /*target*/ ctx[23] }, + props: { position: /*target*/ ctx[25] }, $$inline: true }); @@ -3179,9 +3801,9 @@ var app = (function () { span = element("span"); t1 = text(t1_value); set_style(span, "position", "absolute"); - set_style(span, "left", /*target*/ ctx[23].x + "px"); - set_style(span, "top", /*target*/ ctx[23].y + "px"); - add_location(span, file$6, 160, 8, 6607); + set_style(span, "left", /*target*/ ctx[25].x + "px"); + set_style(span, "top", /*target*/ ctx[25].y + "px"); + add_location(span, file$6, 177, 8, 7455); this.first = first; }, m: function mount(target$1, anchor) { @@ -3195,16 +3817,16 @@ var app = (function () { p: function update(new_ctx, dirty) { ctx = new_ctx; const target_changes = {}; - if (dirty & /*$targets*/ 512) target_changes.position = /*target*/ ctx[23]; + if (dirty & /*$targets*/ 1024) target_changes.position = /*target*/ ctx[25]; target.$set(target_changes); - if ((!current || dirty & /*$targets*/ 512) && t1_value !== (t1_value = /*target*/ ctx[23].name + "")) set_data_dev(t1, t1_value); + if ((!current || dirty & /*$targets*/ 1024) && t1_value !== (t1_value = /*target*/ ctx[25].name + "")) set_data_dev(t1, t1_value); - if (!current || dirty & /*$targets*/ 512) { - set_style(span, "left", /*target*/ ctx[23].x + "px"); + if (!current || dirty & /*$targets*/ 1024) { + set_style(span, "left", /*target*/ ctx[25].x + "px"); } - if (!current || dirty & /*$targets*/ 512) { - set_style(span, "top", /*target*/ ctx[23].y + "px"); + if (!current || dirty & /*$targets*/ 1024) { + set_style(span, "top", /*target*/ ctx[25].y + "px"); } }, i: function intro(local) { @@ -3228,14 +3850,14 @@ var app = (function () { block, id: create_each_block$3.name, type: "each", - source: "(159:4) {#each $targets as target (target.name)}", + source: "(176:4) {#each $targets as target (target.name)}", ctx }); return block; } - // (165:4) {#if isModalOpen} + // (182:4) {#if isModalOpen} function create_if_block$3(ctx) { let modal; let current; @@ -3243,11 +3865,11 @@ var app = (function () { modal = new MovingDotSpaceSimpleModal({ props: { isOpen: /*isModalOpen*/ ctx[3], - onClose: /*handleModalClose*/ ctx[15], - title: "Test Collision", - content: /*currentcollisiontext*/ ctx[4], - items: /*currentcollisionitems*/ ctx[5], - currentTheme: /*currentTheme*/ ctx[7] + onClose: /*handleModalClose*/ ctx[16], + title: /*currentcollisiontitletext*/ ctx[4], + content: /*currentcollisiontext*/ ctx[5], + items: /*currentcollisionitems*/ ctx[6], + currentTheme: /*currentTheme*/ ctx[8] }, $$inline: true }); @@ -3263,9 +3885,10 @@ var app = (function () { p: function update(ctx, dirty) { const modal_changes = {}; if (dirty & /*isModalOpen*/ 8) modal_changes.isOpen = /*isModalOpen*/ ctx[3]; - if (dirty & /*currentcollisiontext*/ 16) modal_changes.content = /*currentcollisiontext*/ ctx[4]; - if (dirty & /*currentcollisionitems*/ 32) modal_changes.items = /*currentcollisionitems*/ ctx[5]; - if (dirty & /*currentTheme*/ 128) modal_changes.currentTheme = /*currentTheme*/ ctx[7]; + if (dirty & /*currentcollisiontitletext*/ 16) modal_changes.title = /*currentcollisiontitletext*/ ctx[4]; + if (dirty & /*currentcollisiontext*/ 32) modal_changes.content = /*currentcollisiontext*/ ctx[5]; + if (dirty & /*currentcollisionitems*/ 64) modal_changes.items = /*currentcollisionitems*/ ctx[6]; + if (dirty & /*currentTheme*/ 256) modal_changes.currentTheme = /*currentTheme*/ ctx[8]; modal.$set(modal_changes); }, i: function intro(local) { @@ -3286,7 +3909,7 @@ var app = (function () { block, id: create_if_block$3.name, type: "if", - source: "(165:4) {#if isModalOpen}", + source: "(182:4) {#if isModalOpen}", ctx }); @@ -3294,33 +3917,36 @@ var app = (function () { } function create_fragment$6(ctx) { - let select; let t0; - let dotgamethememanager; + let select; let t1; + let dotgamethememanager; + let t2; let div1; let canvas_1; - let t2; - let movingdot; let t3; - let div0; + let movingdot; let t4; - let t5_value = /*$dotPosition*/ ctx[0].x + ""; + let div0; let t5; + let t6_value = /*$dotPosition*/ ctx[0].x + ""; let t6; - let t7_value = /*$dotPosition*/ ctx[0].y + ""; let t7; + let t8_value = /*$dotPosition*/ ctx[0].y + ""; let t8; let t9; + let t10; let each_blocks = []; let each1_lookup = new Map(); - let t10; let t11; + let t12; let movingdotstats; + let t13; + let fighttest; let current; let mounted; let dispose; - let each_value_1 = /*themeKeys*/ ctx[12]; + let each_value_1 = /*themeKeys*/ ctx[13]; validate_each_argument(each_value_1); let each_blocks_1 = []; @@ -3337,15 +3963,15 @@ var app = (function () { let movingdot_props = { position: /*$dotPosition*/ ctx[0], - boundaries: /*boundaries*/ ctx[11] + boundaries: /*boundaries*/ ctx[12] }; movingdot = new MovingDotPortfromReact({ props: movingdot_props, $$inline: true }); - /*movingdot_binding*/ ctx[19](movingdot); - movingdot.$on("move", /*move_handler*/ ctx[20]); - let each_value = /*$targets*/ ctx[9]; + /*movingdot_binding*/ ctx[20](movingdot); + movingdot.$on("move", /*move_handler*/ ctx[21]); + let each_value = /*$targets*/ ctx[10]; validate_each_argument(each_value); - const get_key = ctx => /*target*/ ctx[23].name; + const get_key = ctx => /*target*/ ctx[25].name; validate_each_keys(ctx, each_value, get_each_context$3, get_key); for (let i = 0; i < each_value.length; i += 1) { @@ -3355,64 +3981,69 @@ var app = (function () { } let if_block = /*isModalOpen*/ ctx[3] && create_if_block$3(ctx); - movingdotstats = new MovingDotStatStoreandDisplay({ $$inline: true }); + movingdotstats = new MovingDotStatDisplay({ $$inline: true }); + fighttest = new MovingDotSpaceGameFight({ $$inline: true }); const block = { c: function create() { + t0 = text("Game Selector\r\n"); select = element("select"); for (let i = 0; i < each_blocks_1.length; i += 1) { each_blocks_1[i].c(); } - t0 = space(); - create_component(dotgamethememanager.$$.fragment); t1 = space(); + create_component(dotgamethememanager.$$.fragment); + t2 = space(); div1 = element("div"); canvas_1 = element("canvas"); - t2 = space(); - create_component(movingdot.$$.fragment); t3 = space(); + create_component(movingdot.$$.fragment); + t4 = space(); div0 = element("div"); - t4 = text("Minor Game Events Log for player ||| Position for Developer "); - t5 = text(t5_value); - t6 = space(); - t7 = text(t7_value); - t8 = text(" - TODO - Story Line / Avatars? / Clock System ||| For Job Experience focused Stats can be Emotions Stress Frustration Relief Tiredness Confidence (Percieved Skill) Experience (Actual Skill)"); - t9 = space(); + t5 = text("Minor Game Events Log for player ||| Position for Developer "); + t6 = text(t6_value); + t7 = space(); + t8 = text(t8_value); + t9 = text(" - TODO - Story Line / Avatars? / Clock System ||| For Job Experience focused Stats can be Emotions Stress Frustration Relief Tiredness Confidence (Percieved Skill) Experience (Actual Skill)"); + t10 = space(); for (let i = 0; i < each_blocks.length; i += 1) { each_blocks[i].c(); } - t10 = space(); - if (if_block) if_block.c(); t11 = space(); + if (if_block) if_block.c(); + t12 = space(); create_component(movingdotstats.$$.fragment); - if (/*currentTheme*/ ctx[7] === void 0) add_render_callback(() => /*select_change_handler*/ ctx[17].call(select)); - add_location(select, file$6, 147, 0, 5463); + t13 = space(); + create_component(fighttest.$$.fragment); + if (/*currentTheme*/ ctx[8] === void 0) add_render_callback(() => /*select_change_handler*/ ctx[18].call(select)); + add_location(select, file$6, 164, 0, 6311); set_style(canvas_1, "width", "100%"); set_style(canvas_1, "height", "100%"); attr_dev(canvas_1, "tabindex", "0"); - add_location(canvas_1, file$6, 155, 4, 5943); + add_location(canvas_1, file$6, 172, 4, 6791); attr_dev(div0, "id", "overlayText"); attr_dev(div0, "class", "svelte-c2nwl9"); - add_location(div0, file$6, 157, 4, 6201); + add_location(div0, file$6, 174, 4, 7049); attr_dev(div1, "id", "game-container"); set_style(div1, "position", "relative"); set_style(div1, "width", "100%"); set_style(div1, "height", "100vh"); set_style(div1, "border", "1px solid black"); set_style(div1, "overflow", "hidden"); - set_style(div1, "background-image", "url('" + /*CurrentGameBackground*/ ctx[8] + "')"); + set_style(div1, "background-image", "url('" + /*CurrentGameBackground*/ ctx[9] + "')"); set_style(div1, "background-size", "cover"); set_style(div1, "background-position", "center"); - add_location(div1, file$6, 154, 0, 5710); + add_location(div1, file$6, 171, 0, 6558); }, l: function claim(nodes) { throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); }, m: function mount(target, anchor) { + insert_dev(target, t0, anchor); insert_dev(target, select, anchor); for (let i = 0; i < each_blocks_1.length; i += 1) { @@ -3421,23 +4052,23 @@ var app = (function () { } } - select_option(select, /*currentTheme*/ ctx[7], true); - insert_dev(target, t0, anchor); - mount_component(dotgamethememanager, target, anchor); + select_option(select, /*currentTheme*/ ctx[8], true); insert_dev(target, t1, anchor); + mount_component(dotgamethememanager, target, anchor); + insert_dev(target, t2, anchor); insert_dev(target, div1, anchor); append_dev(div1, canvas_1); - /*canvas_1_binding*/ ctx[18](canvas_1); - append_dev(div1, t2); - mount_component(movingdot, div1, null); + /*canvas_1_binding*/ ctx[19](canvas_1); append_dev(div1, t3); + mount_component(movingdot, div1, null); + append_dev(div1, t4); append_dev(div1, div0); - append_dev(div0, t4); append_dev(div0, t5); append_dev(div0, t6); append_dev(div0, t7); append_dev(div0, t8); - append_dev(div1, t9); + append_dev(div0, t9); + append_dev(div1, t10); for (let i = 0; i < each_blocks.length; i += 1) { if (each_blocks[i]) { @@ -3445,25 +4076,27 @@ var app = (function () { } } - append_dev(div1, t10); + append_dev(div1, t11); if (if_block) if_block.m(div1, null); - insert_dev(target, t11, anchor); + insert_dev(target, t12, anchor); mount_component(movingdotstats, target, anchor); + insert_dev(target, t13, anchor); + mount_component(fighttest, target, anchor); current = true; if (!mounted) { dispose = [ - listen_dev(select, "change", /*select_change_handler*/ ctx[17]), - listen_dev(select, "change", /*changeTheme*/ ctx[13], false, false, false, false), - listen_dev(canvas_1, "click", /*handleSpaceClick*/ ctx[14], false, false, false, false) + listen_dev(select, "change", /*select_change_handler*/ ctx[18]), + listen_dev(select, "change", /*changeTheme*/ ctx[14], false, false, false, false), + listen_dev(canvas_1, "click", /*handleSpaceClick*/ ctx[15], false, false, false, false) ]; mounted = true; } }, p: function update(ctx, [dirty]) { - if (dirty & /*themeKeys*/ 4096) { - each_value_1 = /*themeKeys*/ ctx[12]; + if (dirty & /*themeKeys*/ 8192) { + each_value_1 = /*themeKeys*/ ctx[13]; validate_each_argument(each_value_1); let i; @@ -3486,8 +4119,8 @@ var app = (function () { each_blocks_1.length = each_value_1.length; } - if (dirty & /*currentTheme, themeKeys*/ 4224) { - select_option(select, /*currentTheme*/ ctx[7]); + if (dirty & /*currentTheme, themeKeys*/ 8448) { + select_option(select, /*currentTheme*/ ctx[8]); } const dotgamethememanager_changes = {}; @@ -3496,15 +4129,15 @@ var app = (function () { const movingdot_changes = {}; if (dirty & /*$dotPosition*/ 1) movingdot_changes.position = /*$dotPosition*/ ctx[0]; movingdot.$set(movingdot_changes); - if ((!current || dirty & /*$dotPosition*/ 1) && t5_value !== (t5_value = /*$dotPosition*/ ctx[0].x + "")) set_data_dev(t5, t5_value); - if ((!current || dirty & /*$dotPosition*/ 1) && t7_value !== (t7_value = /*$dotPosition*/ ctx[0].y + "")) set_data_dev(t7, t7_value); + if ((!current || dirty & /*$dotPosition*/ 1) && t6_value !== (t6_value = /*$dotPosition*/ ctx[0].x + "")) set_data_dev(t6, t6_value); + if ((!current || dirty & /*$dotPosition*/ 1) && t8_value !== (t8_value = /*$dotPosition*/ ctx[0].y + "")) set_data_dev(t8, t8_value); - if (dirty & /*$targets*/ 512) { - each_value = /*$targets*/ ctx[9]; + if (dirty & /*$targets*/ 1024) { + each_value = /*$targets*/ ctx[10]; validate_each_argument(each_value); group_outros(); validate_each_keys(ctx, each_value, get_each_context$3, get_key); - each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each1_lookup, div1, outro_and_destroy_block, create_each_block$3, t10, get_each_context$3); + each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each1_lookup, div1, outro_and_destroy_block, create_each_block$3, t11, get_each_context$3); check_outros(); } @@ -3531,8 +4164,8 @@ var app = (function () { check_outros(); } - if (!current || dirty & /*CurrentGameBackground*/ 256) { - set_style(div1, "background-image", "url('" + /*CurrentGameBackground*/ ctx[8] + "')"); + if (!current || dirty & /*CurrentGameBackground*/ 512) { + set_style(div1, "background-image", "url('" + /*CurrentGameBackground*/ ctx[9] + "')"); } }, i: function intro(local) { @@ -3546,6 +4179,7 @@ var app = (function () { transition_in(if_block); transition_in(movingdotstats.$$.fragment, local); + transition_in(fighttest.$$.fragment, local); current = true; }, o: function outro(local) { @@ -3558,17 +4192,19 @@ var app = (function () { transition_out(if_block); transition_out(movingdotstats.$$.fragment, local); + transition_out(fighttest.$$.fragment, local); current = false; }, d: function destroy(detaching) { + if (detaching) detach_dev(t0); if (detaching) detach_dev(select); destroy_each(each_blocks_1, detaching); - if (detaching) detach_dev(t0); - destroy_component(dotgamethememanager, detaching); if (detaching) detach_dev(t1); + destroy_component(dotgamethememanager, detaching); + if (detaching) detach_dev(t2); if (detaching) detach_dev(div1); - /*canvas_1_binding*/ ctx[18](null); - /*movingdot_binding*/ ctx[19](null); + /*canvas_1_binding*/ ctx[19](null); + /*movingdot_binding*/ ctx[20](null); destroy_component(movingdot); for (let i = 0; i < each_blocks.length; i += 1) { @@ -3576,8 +4212,10 @@ var app = (function () { } if (if_block) if_block.d(); - if (detaching) detach_dev(t11); + if (detaching) detach_dev(t12); destroy_component(movingdotstats, detaching); + if (detaching) detach_dev(t13); + destroy_component(fighttest, detaching); mounted = false; run_all(dispose); } @@ -3598,7 +4236,7 @@ var app = (function () { let $dotPosition; let $targets; validate_store(targets, 'targets'); - component_subscribe($$self, targets, $$value => $$invalidate(9, $targets = $$value)); + component_subscribe($$self, targets, $$value => $$invalidate(10, $targets = $$value)); let { $$slots: slots = {}, $$scope } = $$props; validate_slots('MovingDotSpacePortfromReact', slots, []); let ChangedContentPlaceholdertoSend = "No changes"; @@ -3608,24 +4246,28 @@ var app = (function () { component_subscribe($$self, dotPosition, value => $$invalidate(0, $dotPosition = value)); let boundaries = { maxX: 1835, maxY: 890, minX: 0, minY: 0 }; let isModalOpen = false; + let currentcollisiontitletext; let currentcollisiontext; let currentcollisionitems = []; let movingDotElement; - let currentTheme = 'Default'; // default theme + let currentTheme = 'Super Teacher'; // default theme + let currentThemeStage = 0; let themeKeys = Object.keys(themes); - let CurrentGameBackground = themes["Default"].background; //GameBackgrounds[0].url; + let CurrentGameBackground = themes[currentTheme].background; //GameBackgrounds[0].url; + inventory.set(themes[currentTheme].inventory); + skills.set(themes[currentTheme].skills); + objectives.set(themes[currentTheme].objectives); + targets.set(themes[currentTheme].storyparttargets[0]); function changeTheme(event) { - $$invalidate(7, currentTheme = event.target.value); + $$invalidate(8, currentTheme = event.target.value); const theme = themes[currentTheme]; inventory.set(theme.inventory); skills.set(theme.skills); objectives.set(theme.objectives); - targets.set(theme.targets); - - // ... and so on for other stores - $$invalidate(8, CurrentGameBackground = theme.background); - + currentThemeStage = 0; // Resetting currentThemeStage to 0 + targets.set(theme.storyparttargets[0]); + $$invalidate(9, CurrentGameBackground = theme.background); $$invalidate(1, ChangedContentPlaceholdertoSend = "TODO is all other variables to change"); } @@ -3661,10 +4303,22 @@ var app = (function () { case "alert": alert(target.collisiontext); break; + case "decision": + if (confirm(target.collisiontext)) { + alert("You said yes"); + } else { + alert("You said no"); + } + break; case "modal": $$invalidate(3, isModalOpen = true); - $$invalidate(4, currentcollisiontext = target.collisiontext); - $$invalidate(5, currentcollisionitems = target.modalConfig.actions); + $$invalidate(4, currentcollisiontitletext = target.modalConfig.title); + $$invalidate(5, currentcollisiontext = target.modalConfig.content); + $$invalidate(6, currentcollisionitems = target.modalConfig.actions); + break; + case "storypartchange": + currentThemeStage = target.newStage; + targets.set(themes[currentTheme].storyparttargets[currentThemeStage]); break; } // Handle other permanent UI elements here }; // ... @@ -3680,8 +4334,8 @@ var app = (function () { function select_change_handler() { currentTheme = select_value(this); - $$invalidate(7, currentTheme); - $$invalidate(12, themeKeys); + $$invalidate(8, currentTheme); + $$invalidate(13, themeKeys); } function canvas_1_binding($$value) { @@ -3694,7 +4348,7 @@ var app = (function () { function movingdot_binding($$value) { binding_callbacks[$$value ? 'unshift' : 'push'](() => { movingDotElement = $$value; - $$invalidate(6, movingDotElement); + $$invalidate(7, movingDotElement); }); } @@ -3706,10 +4360,10 @@ var app = (function () { MovingDot: MovingDotPortfromReact, Target: MovingDotTargetPortfromReact, Modal: MovingDotSpaceSimpleModal, - MovingDotStats: MovingDotStatStoreandDisplay, + MovingDotStats: MovingDotStatDisplay, DotGameThemeManager: MovingDotSpaceThemeManager, + FightTest: MovingDotSpaceGameFight, themes, - themeActions, inventory, skills, objectives, @@ -3719,10 +4373,12 @@ var app = (function () { dotPosition, boundaries, isModalOpen, + currentcollisiontitletext, currentcollisiontext, currentcollisionitems, movingDotElement, currentTheme, + currentThemeStage, themeKeys, CurrentGameBackground, changeTheme, @@ -3738,15 +4394,17 @@ var app = (function () { $$self.$inject_state = $$props => { if ('ChangedContentPlaceholdertoSend' in $$props) $$invalidate(1, ChangedContentPlaceholdertoSend = $$props.ChangedContentPlaceholdertoSend); if ('canvas' in $$props) $$invalidate(2, canvas = $$props.canvas); - if ('dotPosition' in $$props) $$invalidate(10, dotPosition = $$props.dotPosition); - if ('boundaries' in $$props) $$invalidate(11, boundaries = $$props.boundaries); + if ('dotPosition' in $$props) $$invalidate(11, dotPosition = $$props.dotPosition); + if ('boundaries' in $$props) $$invalidate(12, boundaries = $$props.boundaries); if ('isModalOpen' in $$props) $$invalidate(3, isModalOpen = $$props.isModalOpen); - if ('currentcollisiontext' in $$props) $$invalidate(4, currentcollisiontext = $$props.currentcollisiontext); - if ('currentcollisionitems' in $$props) $$invalidate(5, currentcollisionitems = $$props.currentcollisionitems); - if ('movingDotElement' in $$props) $$invalidate(6, movingDotElement = $$props.movingDotElement); - if ('currentTheme' in $$props) $$invalidate(7, currentTheme = $$props.currentTheme); - if ('themeKeys' in $$props) $$invalidate(12, themeKeys = $$props.themeKeys); - if ('CurrentGameBackground' in $$props) $$invalidate(8, CurrentGameBackground = $$props.CurrentGameBackground); + if ('currentcollisiontitletext' in $$props) $$invalidate(4, currentcollisiontitletext = $$props.currentcollisiontitletext); + if ('currentcollisiontext' in $$props) $$invalidate(5, currentcollisiontext = $$props.currentcollisiontext); + if ('currentcollisionitems' in $$props) $$invalidate(6, currentcollisionitems = $$props.currentcollisionitems); + if ('movingDotElement' in $$props) $$invalidate(7, movingDotElement = $$props.movingDotElement); + if ('currentTheme' in $$props) $$invalidate(8, currentTheme = $$props.currentTheme); + if ('currentThemeStage' in $$props) currentThemeStage = $$props.currentThemeStage; + if ('themeKeys' in $$props) $$invalidate(13, themeKeys = $$props.themeKeys); + if ('CurrentGameBackground' in $$props) $$invalidate(9, CurrentGameBackground = $$props.CurrentGameBackground); }; if ($$props && "$$inject" in $$props) { @@ -3806,6 +4464,7 @@ var app = (function () { ChangedContentPlaceholdertoSend, canvas, isModalOpen, + currentcollisiontitletext, currentcollisiontext, currentcollisionitems, movingDotElement, @@ -3877,64 +4536,66 @@ var app = (function () { let t17; let t18; let t19; + let div4; + let t21; let button1; - let t23; + let t25; let button2; - let t27; - let t28; let t29; - let t30_value = /*timestamps*/ ctx[11].length + ""; let t30; let t31; - let br1; + let t32_value = /*timestamps*/ ctx[11].length + ""; let t32; - let button3; + let t33; + let br1; let t34; + let button3; + let t36; let button4; - let t35; + let t37; let button4_class_value; let button4_disabled_value; - let t36; + let t38; let button5; - let t37; + let t39; let button5_class_value; let button5_disabled_value; - let t38; + let t40; let button6; - let t39; + let t41; let button6_class_value; let button6_disabled_value; - let t40; - let t41; let t42; - let t43_value = /*userTimestamps*/ ctx[1].length + ""; let t43; let t44; - let br2; + let t45_value = /*userTimestamps*/ ctx[1].length + ""; let t45; let t46; + let br2; let t47; - let t48_value = /*r2userTimestamps*/ ctx[12].length + ""; let t48; let t49; - let br3; + let t50_value = /*r2userTimestamps*/ ctx[12].length + ""; let t50; - let br4; let t51; - let button7; + let br3; + let t52; + let br4; let t53; - let button8; + let button7; let t55; + let button8; + let t57; let input2; - let t56; + let t58; let br5; - let t57; + let t59; let input3; - let t58; + let t60; let input4; - let t59; + let t61; let input5; - let t60; + let t62; let input6; let mounted; let dispose; @@ -3973,60 +4634,63 @@ var app = (function () { t17 = space(); t18 = text(/*currentWord*/ ctx[7]); t19 = space(); + div4 = element("div"); + div4.textContent = "Placeholder for image subtitle - each word or each noun in the sentence as collage (Dall-E 3) or sentence meaning as an image"; + t21 = space(); button1 = element("button"); button1.textContent = `Previous Auto Timestamp - ${/*interval*/ ctx[19]}s`; - t23 = space(); + t25 = space(); button2 = element("button"); button2.textContent = `Next Auto Timestamp - ${/*interval*/ ctx[19]}s`; - t27 = text("\r\nAuto Timestamps: "); - t28 = text(/*currentIndex*/ ctx[10]); - t29 = text(" / "); - t30 = text(t30_value); - t31 = space(); + t29 = text("\r\nAuto Timestamps: "); + t30 = text(/*currentIndex*/ ctx[10]); + t31 = text(" / "); + t32 = text(t32_value); + t33 = space(); br1 = element("br"); - t32 = space(); + t34 = space(); button3 = element("button"); button3.textContent = "Add Timestamp"; - t34 = space(); - button4 = element("button"); - t35 = text("Current User Timestamp (incomplete)"); t36 = space(); - button5 = element("button"); - t37 = text("Previous User Timestamp"); + button4 = element("button"); + t37 = text("Current User Timestamp (incomplete)"); t38 = space(); + button5 = element("button"); + t39 = text("Previous User Timestamp"); + t40 = space(); button6 = element("button"); - t39 = text("Next User Timestamp"); - t40 = text("\r\nUser Timestamps: "); - t41 = text(/*currentuserIndex*/ ctx[0]); - t42 = text(" / "); - t43 = text(t43_value); - t44 = space(); + t41 = text("Next User Timestamp"); + t42 = text("\r\nUser Timestamps: "); + t43 = text(/*currentuserIndex*/ ctx[0]); + t44 = text(" / "); + t45 = text(t45_value); + t46 = space(); br2 = element("br"); - t45 = text(" Round 2 (/n) User Timestamps: "); - t46 = text(/*currentuserIndex*/ ctx[0]); - t47 = text(" / "); - t48 = text(t48_value); - t49 = space(); + t47 = text(" Round 2 (/n) User Timestamps: "); + t48 = text(/*currentuserIndex*/ ctx[0]); + t49 = text(" / "); + t50 = text(t50_value); + t51 = space(); br3 = element("br"); - t50 = text("A list of one messes up the logic for the counter in conjuction with the user timestamp button reactivity "); + t52 = text("A list of one messes up the logic for the counter in conjuction with the user timestamp button reactivity "); br4 = element("br"); - t51 = space(); + t53 = space(); button7 = element("button"); button7.textContent = "Export Timestamps"; - t53 = space(); + t55 = space(); button8 = element("button"); button8.textContent = "Export Round 2 Timestamps"; - t55 = text(" Import Timestamps (Incomplete) "); + t57 = text(" Import Timestamps (Incomplete) "); input2 = element("input"); - t56 = space(); + t58 = space(); br5 = element("br"); - t57 = text(" Interval Repeat "); + t59 = text(" Interval Repeat "); input3 = element("input"); - t58 = text(" ||| Start "); + t60 = text(" ||| Start "); input4 = element("input"); - t59 = text(" End "); + t61 = text(" End "); input5 = element("input"); - t60 = text(" Reps "); + t62 = text(" Reps "); input6 = element("input"); add_location(h1, file$5, 333, 0, 11319); attr_dev(input0, "type", "text"); @@ -4036,7 +4700,7 @@ var app = (function () { attr_dev(textarea, "placeholder", "Enter transcript here..."); add_location(textarea, file$5, 344, 4, 11911); add_location(button0, file$5, 345, 4, 12001); - attr_dev(pre, "class", "transcriptpre svelte-alwc6b"); + attr_dev(pre, "class", "transcriptpre svelte-udvqea"); add_location(pre, file$5, 346, 4, 12067); add_location(label, file$5, 335, 0, 11382); attr_dev(div0, "id", "youtube-player"); @@ -4059,42 +4723,44 @@ var app = (function () { add_location(div2, file$5, 354, 4, 12414); set_style(div3, "position", "relative"); add_location(div3, file$5, 349, 0, 12126); - add_location(button1, file$5, 361, 0, 12681); - add_location(button2, file$5, 362, 0, 12774); - add_location(br1, file$5, 365, 0, 12916); - add_location(button3, file$5, 366, 0, 12922); - attr_dev(button4, "class", button4_class_value = "" + (null_to_empty(/*currentindexButtonClass*/ ctx[16]) + " svelte-alwc6b")); + attr_dev(div4, "class", "imagesubtitle svelte-udvqea"); + add_location(div4, file$5, 359, 0, 12604); + add_location(button1, file$5, 364, 0, 12849); + add_location(button2, file$5, 365, 0, 12942); + add_location(br1, file$5, 368, 0, 13084); + add_location(button3, file$5, 369, 0, 13090); + attr_dev(button4, "class", button4_class_value = "" + (null_to_empty(/*currentindexButtonClass*/ ctx[16]) + " svelte-udvqea")); button4.disabled = button4_disabled_value = /*currentuserIndex*/ ctx[0] <= 0; - add_location(button4, file$5, 367, 0, 12982); - attr_dev(button5, "class", button5_class_value = "" + (null_to_empty(/*previousindexButtonClass*/ ctx[17]) + " svelte-alwc6b")); + add_location(button4, file$5, 370, 0, 13150); + attr_dev(button5, "class", button5_class_value = "" + (null_to_empty(/*previousindexButtonClass*/ ctx[17]) + " svelte-udvqea")); button5.disabled = button5_disabled_value = /*currentuserIndex*/ ctx[0] <= 0; - add_location(button5, file$5, 368, 0, 13137); - attr_dev(button6, "class", button6_class_value = "" + (null_to_empty(/*nextindexButtonClass*/ ctx[18]) + " svelte-alwc6b")); + add_location(button5, file$5, 371, 0, 13305); + attr_dev(button6, "class", button6_class_value = "" + (null_to_empty(/*nextindexButtonClass*/ ctx[18]) + " svelte-udvqea")); button6.disabled = button6_disabled_value = /*currentuserIndex*/ ctx[0] >= /*userTimestamps*/ ctx[1].length - 1; - add_location(button6, file$5, 369, 0, 13282); - add_location(br2, file$5, 372, 0, 13505); - add_location(br3, file$5, 372, 82, 13587); - add_location(br4, file$5, 372, 192, 13697); - add_location(button7, file$5, 373, 0, 13703); - add_location(button8, file$5, 373, 63, 13766); + add_location(button6, file$5, 372, 0, 13450); + add_location(br2, file$5, 375, 0, 13673); + add_location(br3, file$5, 375, 82, 13755); + add_location(br4, file$5, 375, 192, 13865); + add_location(button7, file$5, 376, 0, 13871); + add_location(button8, file$5, 376, 63, 13934); attr_dev(input2, "type", "file"); attr_dev(input2, "accept", ".json"); - add_location(input2, file$5, 373, 167, 13870); - add_location(br5, file$5, 374, 0, 13935); + add_location(input2, file$5, 376, 167, 14038); + add_location(br5, file$5, 377, 0, 14103); attr_dev(input3, "type", "checkbox"); - add_location(input3, file$5, 374, 21, 13956); + add_location(input3, file$5, 377, 21, 14124); attr_dev(input4, "type", "number"); - attr_dev(input4, "class", "numberinput svelte-alwc6b"); + attr_dev(input4, "class", "numberinput svelte-udvqea"); attr_dev(input4, "min", "0"); - add_location(input4, file$5, 374, 82, 14017); + add_location(input4, file$5, 377, 82, 14185); attr_dev(input5, "type", "number"); - attr_dev(input5, "class", "numberinput svelte-alwc6b"); + attr_dev(input5, "class", "numberinput svelte-udvqea"); attr_dev(input5, "min", "0"); - add_location(input5, file$5, 374, 162, 14097); + add_location(input5, file$5, 377, 162, 14265); attr_dev(input6, "type", "number"); - attr_dev(input6, "class", "numberinput svelte-alwc6b"); + attr_dev(input6, "class", "numberinput svelte-udvqea"); attr_dev(input6, "min", "0"); - add_location(input6, file$5, 374, 241, 14176); + add_location(input6, file$5, 377, 241, 14344); }, l: function claim(nodes) { throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); @@ -4133,58 +4799,60 @@ var app = (function () { append_dev(div2, t17); append_dev(div2, t18); insert_dev(target, t19, anchor); + insert_dev(target, div4, anchor); + insert_dev(target, t21, anchor); insert_dev(target, button1, anchor); - insert_dev(target, t23, anchor); + insert_dev(target, t25, anchor); insert_dev(target, button2, anchor); - insert_dev(target, t27, anchor); - insert_dev(target, t28, anchor); insert_dev(target, t29, anchor); insert_dev(target, t30, anchor); insert_dev(target, t31, anchor); - insert_dev(target, br1, anchor); insert_dev(target, t32, anchor); - insert_dev(target, button3, anchor); + insert_dev(target, t33, anchor); + insert_dev(target, br1, anchor); insert_dev(target, t34, anchor); - insert_dev(target, button4, anchor); - append_dev(button4, t35); + insert_dev(target, button3, anchor); insert_dev(target, t36, anchor); - insert_dev(target, button5, anchor); - append_dev(button5, t37); + insert_dev(target, button4, anchor); + append_dev(button4, t37); insert_dev(target, t38, anchor); - insert_dev(target, button6, anchor); - append_dev(button6, t39); + insert_dev(target, button5, anchor); + append_dev(button5, t39); insert_dev(target, t40, anchor); - insert_dev(target, t41, anchor); + insert_dev(target, button6, anchor); + append_dev(button6, t41); insert_dev(target, t42, anchor); insert_dev(target, t43, anchor); insert_dev(target, t44, anchor); - insert_dev(target, br2, anchor); insert_dev(target, t45, anchor); insert_dev(target, t46, anchor); + insert_dev(target, br2, anchor); insert_dev(target, t47, anchor); insert_dev(target, t48, anchor); insert_dev(target, t49, anchor); - insert_dev(target, br3, anchor); insert_dev(target, t50, anchor); - insert_dev(target, br4, anchor); insert_dev(target, t51, anchor); - insert_dev(target, button7, anchor); + insert_dev(target, br3, anchor); + insert_dev(target, t52, anchor); + insert_dev(target, br4, anchor); insert_dev(target, t53, anchor); - insert_dev(target, button8, anchor); + insert_dev(target, button7, anchor); insert_dev(target, t55, anchor); + insert_dev(target, button8, anchor); + insert_dev(target, t57, anchor); insert_dev(target, input2, anchor); - insert_dev(target, t56, anchor); + insert_dev(target, t58, anchor); insert_dev(target, br5, anchor); - insert_dev(target, t57, anchor); + insert_dev(target, t59, anchor); insert_dev(target, input3, anchor); input3.checked = /*isRepeating*/ ctx[3]; - insert_dev(target, t58, anchor); + insert_dev(target, t60, anchor); insert_dev(target, input4, anchor); set_input_value(input4, /*repstartTime*/ ctx[13]); - insert_dev(target, t59, anchor); + insert_dev(target, t61, anchor); insert_dev(target, input5, anchor); set_input_value(input5, /*rependTime*/ ctx[14]); - insert_dev(target, t60, anchor); + insert_dev(target, t62, anchor); insert_dev(target, input6, anchor); set_input_value(input6, /*repetitions*/ ctx[15]); @@ -4230,10 +4898,10 @@ var app = (function () { if (dirty[0] & /*currentTime*/ 16 && t12_value !== (t12_value = /*currentTime*/ ctx[4].toFixed(2) + "")) set_data_dev(t12, t12_value); if (dirty[0] & /*line*/ 256) set_data_dev(t15, /*line*/ ctx[8]); if (dirty[0] & /*currentWord*/ 128) set_data_dev(t18, /*currentWord*/ ctx[7]); - if (dirty[0] & /*currentIndex*/ 1024) set_data_dev(t28, /*currentIndex*/ ctx[10]); - if (dirty[0] & /*timestamps*/ 2048 && t30_value !== (t30_value = /*timestamps*/ ctx[11].length + "")) set_data_dev(t30, t30_value); + if (dirty[0] & /*currentIndex*/ 1024) set_data_dev(t30, /*currentIndex*/ ctx[10]); + if (dirty[0] & /*timestamps*/ 2048 && t32_value !== (t32_value = /*timestamps*/ ctx[11].length + "")) set_data_dev(t32, t32_value); - if (dirty[0] & /*currentindexButtonClass*/ 65536 && button4_class_value !== (button4_class_value = "" + (null_to_empty(/*currentindexButtonClass*/ ctx[16]) + " svelte-alwc6b"))) { + if (dirty[0] & /*currentindexButtonClass*/ 65536 && button4_class_value !== (button4_class_value = "" + (null_to_empty(/*currentindexButtonClass*/ ctx[16]) + " svelte-udvqea"))) { attr_dev(button4, "class", button4_class_value); } @@ -4241,7 +4909,7 @@ var app = (function () { prop_dev(button4, "disabled", button4_disabled_value); } - if (dirty[0] & /*previousindexButtonClass*/ 131072 && button5_class_value !== (button5_class_value = "" + (null_to_empty(/*previousindexButtonClass*/ ctx[17]) + " svelte-alwc6b"))) { + if (dirty[0] & /*previousindexButtonClass*/ 131072 && button5_class_value !== (button5_class_value = "" + (null_to_empty(/*previousindexButtonClass*/ ctx[17]) + " svelte-udvqea"))) { attr_dev(button5, "class", button5_class_value); } @@ -4249,7 +4917,7 @@ var app = (function () { prop_dev(button5, "disabled", button5_disabled_value); } - if (dirty[0] & /*nextindexButtonClass*/ 262144 && button6_class_value !== (button6_class_value = "" + (null_to_empty(/*nextindexButtonClass*/ ctx[18]) + " svelte-alwc6b"))) { + if (dirty[0] & /*nextindexButtonClass*/ 262144 && button6_class_value !== (button6_class_value = "" + (null_to_empty(/*nextindexButtonClass*/ ctx[18]) + " svelte-udvqea"))) { attr_dev(button6, "class", button6_class_value); } @@ -4257,10 +4925,10 @@ var app = (function () { prop_dev(button6, "disabled", button6_disabled_value); } - if (dirty[0] & /*currentuserIndex*/ 1) set_data_dev(t41, /*currentuserIndex*/ ctx[0]); - if (dirty[0] & /*userTimestamps*/ 2 && t43_value !== (t43_value = /*userTimestamps*/ ctx[1].length + "")) set_data_dev(t43, t43_value); - if (dirty[0] & /*currentuserIndex*/ 1) set_data_dev(t46, /*currentuserIndex*/ ctx[0]); - if (dirty[0] & /*r2userTimestamps*/ 4096 && t48_value !== (t48_value = /*r2userTimestamps*/ ctx[12].length + "")) set_data_dev(t48, t48_value); + if (dirty[0] & /*currentuserIndex*/ 1) set_data_dev(t43, /*currentuserIndex*/ ctx[0]); + if (dirty[0] & /*userTimestamps*/ 2 && t45_value !== (t45_value = /*userTimestamps*/ ctx[1].length + "")) set_data_dev(t45, t45_value); + if (dirty[0] & /*currentuserIndex*/ 1) set_data_dev(t48, /*currentuserIndex*/ ctx[0]); + if (dirty[0] & /*r2userTimestamps*/ 4096 && t50_value !== (t50_value = /*r2userTimestamps*/ ctx[12].length + "")) set_data_dev(t50, t50_value); if (dirty[0] & /*isRepeating*/ 8) { input3.checked = /*isRepeating*/ ctx[3]; @@ -4287,52 +4955,54 @@ var app = (function () { if (detaching) detach_dev(t9); if (detaching) detach_dev(div3); if (detaching) detach_dev(t19); + if (detaching) detach_dev(div4); + if (detaching) detach_dev(t21); if (detaching) detach_dev(button1); - if (detaching) detach_dev(t23); + if (detaching) detach_dev(t25); if (detaching) detach_dev(button2); - if (detaching) detach_dev(t27); - if (detaching) detach_dev(t28); if (detaching) detach_dev(t29); if (detaching) detach_dev(t30); if (detaching) detach_dev(t31); - if (detaching) detach_dev(br1); if (detaching) detach_dev(t32); - if (detaching) detach_dev(button3); + if (detaching) detach_dev(t33); + if (detaching) detach_dev(br1); if (detaching) detach_dev(t34); - if (detaching) detach_dev(button4); + if (detaching) detach_dev(button3); if (detaching) detach_dev(t36); - if (detaching) detach_dev(button5); + if (detaching) detach_dev(button4); if (detaching) detach_dev(t38); - if (detaching) detach_dev(button6); + if (detaching) detach_dev(button5); if (detaching) detach_dev(t40); - if (detaching) detach_dev(t41); + if (detaching) detach_dev(button6); if (detaching) detach_dev(t42); if (detaching) detach_dev(t43); if (detaching) detach_dev(t44); - if (detaching) detach_dev(br2); if (detaching) detach_dev(t45); if (detaching) detach_dev(t46); + if (detaching) detach_dev(br2); if (detaching) detach_dev(t47); if (detaching) detach_dev(t48); if (detaching) detach_dev(t49); - if (detaching) detach_dev(br3); if (detaching) detach_dev(t50); - if (detaching) detach_dev(br4); if (detaching) detach_dev(t51); - if (detaching) detach_dev(button7); + if (detaching) detach_dev(br3); + if (detaching) detach_dev(t52); + if (detaching) detach_dev(br4); if (detaching) detach_dev(t53); - if (detaching) detach_dev(button8); + if (detaching) detach_dev(button7); if (detaching) detach_dev(t55); + if (detaching) detach_dev(button8); + if (detaching) detach_dev(t57); if (detaching) detach_dev(input2); - if (detaching) detach_dev(t56); + if (detaching) detach_dev(t58); if (detaching) detach_dev(br5); - if (detaching) detach_dev(t57); + if (detaching) detach_dev(t59); if (detaching) detach_dev(input3); - if (detaching) detach_dev(t58); + if (detaching) detach_dev(t60); if (detaching) detach_dev(input4); - if (detaching) detach_dev(t59); + if (detaching) detach_dev(t61); if (detaching) detach_dev(input5); - if (detaching) detach_dev(t60); + if (detaching) detach_dev(t62); if (detaching) detach_dev(input6); mounted = false; run_all(dispose);