Skip to content

Releases: InfusedStormblessed/Cosmere-Game

Anrdoid

Choose a tag to compare

@InfusedStormblessed InfusedStormblessed released this 11 Feb 04:02
40adf48

I'm not 100% sure this will work yet, but I know it works on PC and Apple, so I am trying to get it on Android now.

MAIN GAME

Choose a tag to compare

@InfusedStormblessed InfusedStormblessed released this 05 Feb 21:51
ce83c42

This is where all regular updates will be, if you would like to play the regular game, come here, if you want to play en experimental or broken, or even beta versions, you can go somewhere else.

New experimental release

Pre-release

Choose a tag to compare

@InfusedStormblessed InfusedStormblessed released this 05 Feb 18:33
ce83c42

It doesn't work and I am honestly not sure why, but I added an EXP bar. If anyone knows how to fix it, please help me.

`

<title>Cosmere Adventure</title> <style> /* Basic CSS styling to make the game look nicer */ body { font-family: Arial, sans-serif; background-color: #000080; }
    h1 {
        color: #ffffff;
    }

    #gameOutput {
        font-size: 20px;
        font-weight: bold;
        text-align: center;
        margin: 20px;
        background-color: #fff;
        border: 1px solid #ccc;
        border-radius: 5px;
        padding: 15px;
    }

    .button-container {
        display: flex;
        justify-content: center;
        margin: 10px 0;
    }

    button {
        background-color: #4CAF50;
        color: white;
        padding: 10px 20px;
        border: none;
        border-radius: 5px;
        cursor: pointer;
        margin: 0 5px;
    }

    button:hover {
        background-color: #45a049;
    }

    #endGameButton {
        background-color: #f44336;
    }

    #endGameButton:hover {
        background-color: #e91e63;
    }

    #healthBars {
        display: flex;
        justify-content: space-between;
        margin: 20px;
        font-weight: bold;
    }

    .health {
        width: 200px;
        height: 20px;
        background-color: #ddd;
        border-radius: 5px;
        position: relative;
    }

    .health span {
        height: 100%;
        display: block;
        border-radius: 5px;
    }

    #expBar {
        width: 100%;
        height: 20px;
        background-color: #ddd;
        border-radius: 5px;
        margin: 20px 0;
    }

    #expSpan {
        height: 100%;
        display: block;
        background-color: #4CAF50;
        border-radius: 5px;
        width: 0; /* Initial width of the EXP bar */
    }

    #attackMenu {
        display: none;
        background-color: white;
        border: 1px solid #ccc;
        border-radius: 5px;
        padding: 10px;
        position: absolute;
    }

    .attackOption {
        cursor: pointer;
        padding: 5px;
    }

    .attackOption:hover {
        background-color: #f0f0f0;
    }
</style>

Cosmere Adventure

Welcome to your adventure! Select a character to begin.

<div class="button-container">
    <button id="characterSelectionButton">Character Selection</button>
    <button id="exploreButton" disabled>Explore</button>
    <button id="loadGameButton" disabled>Load Game</button>
    <button id="saveGameButton" disabled>Save Game</button>
    <button id="inventoryButton" disabled>Inventory</button>
    <button id="endGameButton">End Game</button>
</div>

<div id="healthBars" style="display: none;">
    <div id="playerHealthBar" class="health">
        <span id="playerHealthSpan" style="background-color: green; width: 100%;"></span>
    </div>
    <div id="enemyHealthBar" class="health">
        <span id="enemyHealthSpan" style="background-color: red; width: 100%;"></span>
    </div>
</div>

<!-- Experience Bar -->
<div id="expBar">
    <span id="expSpan"></span>
</div>

<div id="attackMenu" style="display: none;">
    <p>Select an attack:</p>
    <div id="attackOptionsContainer"></div>
    <button id="closeAttackMenuButton">Close</button>
</div>

<div id="locationSelection" style="display: none;">
    <p>Choose a location to explore:</p>
    <button id="luthadelButton" style="display: none;">Luthadel</button>
    <button id="stormlandsButton">Stormlands</button>
    <button id="rithmatistButton">Rithmatist's Academy</button>
    <button id="elendelButton" style="display: none;">Elendel</button>
    <button id="alethkarButton">Alethkar</button>
    <button id="urithiruButton">Urithiru</button>
    <button id="kholinarButton">Kholinar</button>
    <button id="thaylenCityButton">Thaylen City</button>
    <button id="scadrialButton" style="display: none;">Scadrial (General)</button>
</div>

<div id="postBattleChoices" style="display: none;">
    <p>What do you do?</p>
    <button id="attackButton">Attack</button>
    <button id="defendButton">Defend</button>
    <button id="specialButton">Use Special Ability</button>
</div>

<div id="npcInteraction" style="display: none;">
    <p>You encounter an NPC! What do you want to do?</p>
    <button id="talkButton">Talk</button>
    <button id="ignoreButton">Ignore</button>
    <p id="npcLoreOutput" style="margin-top: 10px;"></p>
</div>

<script>
    document.addEventListener("DOMContentLoaded", function() {
        // Game variables
        let player = null;
        let playerHealth = 100;
        let playerDamage = 0;
        let playerDefence = 0;
        let playerLevel = 1;
        let playerEXP = 0;
        let playerGold = 10;
        let currentEnemyHealth = null;
        let currentEnemyType = "";
        let playerInventory = [];
        let loreIndex = 0; // To track which lore to display next

        // Lore segments for NPC interaction
        const loreSegments = [
            "The Stormlight Archive is a high fantasy series by Brandon Sanderson.",
            "The series takes place in a world called Roshar, where large storms called Highstorms frequent.",
            "The main character, Kaladin, is a soldier who discovers he has the ability to manipulate the winds."
        ];

        // Attacks for each character
        const attacks = {
            Vin: ["Steel Swipe", "Iron Blast", "Copper Charm", "Atium Shadow", "Tin Enhancements", "Mistborn Assault", "God Metal Strike"],
            Kaladin: ["Wind Slash", "Storm Slam", "Shield Bash", "Protective Shield", "Cleansing Storm", "Syl's Embrace", "Radiant Destruction"],
            Szeth: ["Honorblade Strike", "Windrunner's Fury", "Fury of the Honorblade", "Skybreaker's Visage", "Transcendent Blade", "Gift of the Stormfather"],
            Dalinar: ["Bondsmith's Wield", "Armored Charge", "Forging Strength", "Call of the Thrill", "Unyielding Resolve", "Blackthorn's Wrath"],
        };

        // Unique Abilities
        const specialAbilities = {
            Vin: [
                { name: "Allomantic Burst", description: "Unleash a powerful Allomantic energy burst.", bonusDamage: 15, unlockedAtLevel: 2 },
                { name: "Atium Rush", description: "Burn the powerful metal, Atium, making yourself invincible for a time.", bonusDamage: 40, unlockedAtLevel: 5 },
            ],
            Kaladin: [
                { name: "Wave of Stormlight", description: "Generate a wave of Stormlight that damages and pushes back enemies.", bonusDamage: 18, unlockedAtLevel: 1 },
                { name: "Cleansing Storm", description: "Create a storm that heals allies.", healAmount                    { name: "Cleansing Storm", description: "Create a storm that heals allies.", healAmount: 20, unlockedAtLevel: 3 },
            ],
            Szeth: [
                { name: "Well of Ascension", description: "Attack with the power of the Honorblade, dealing devastating damage.", bonusDamage: 20, unlockedAtLevel: 1 },
                { name: "Transcendent Blade", description: "Unleash a powerful strike with your Honorblade.", bonusDamage: 25, unlockedAtLevel: 4 },
            ],
            Dalinar: [
                { name: "Bondsmith's Resolve", description: "Rally your strength to heal and bolster defenses.", healAmount: 20, unlockedAtLevel: 1 },
                { name: "Call of the Thrill", description: "Unleash a frenzy of power, gaining additional attack for a short time.", bonusDamage: 10, unlockedAtLevel: 3 },
            ]
        };

        // Save/Load system
        const saveGame = () => {
            const gameData                const gameData = {
                player,
                playerHealth,
                playerDamage,
                playerDefence,
                playerLevel,
                playerEXP,
                playerGold,
                playerInventory,
                loreIndex // Save the current lore index
            };
            localStorage.setItem('savedGame', JSON.stringify(gameData));
            document.getElementById("gameOutput").innerText = "Game saved successfully!";
        };

        const loadGame = () => {
            const savedData = JSON.parse(localStorage.getItem('savedGame'));
            if (savedData) {
                Object.assign(window, savedData);
                document.getElementById("gameOutput").innerText = "Game loaded successfully!";
                updateDisplay();
            } else {
                document.getElementById("gameOutput").innerText = "No saved game found.";
            }
        };

        const updateDisplay = () => {
            document.getElementById("gameOutput").innerText = `Welcome back, ${player}! Your health: ${playerHealth}, Level: ${playerLevel}, EXP: ${playerEXP}`;
            exploreButt...
Read more

Experimental v1.1

Experimental v1.1 Pre-release
Pre-release

Choose a tag to compare

@InfusedStormblessed InfusedStormblessed released this 04 Feb 23:50
817df59
Pre-Prelease

Update index.html