JavaScript must be enabled to play.
Browser lacks capabilities required to play.
Upgrade or switch to another browser.
Loading…
:: StoryInit <<set $settlementLevel = 1>> <!-- 1=Wooden, 2=Stone, 3=Metallic --> /* Settings Variables */ <<set $autoSave = true>> <<set $nsfwContent = true>> <<include "Heropacks">> /* make sure this matches the exact name of the pack passage */ <<set $invasionDone = false>> <<set $day = 1>> <<set $jobReports = []>> <<set $events = []>> /* Job System Variables */ <<set $jobsCompletedToday = false>> <<set $jobOutcomes = []>> /* ------------------------- GLOBAL COLLECTIONS ------------------------- */ /* invasion daily lock */ <<if typeof $invasionDoneToday === "undefined">> <<set $invasionDoneToday = false>> <</if>> <<set $party = []>> /* Where hired heroes live (use this everywhere) */ <<set $tavernHeroes = []>> /* Recruits available in tavern */ <<set $heroPacks = $heroPacks || []>> /* loaded by HeroPacks passage */ /* Names, titles, classes (keep your existing arrays) */ <<set $firstNames = [ "Selene","Alina","Lyra","Seraphina","Kaela", "Isolde","Nerissa","Elara","Veyra","Lilith", "Aurora","Sylvara","Morrigan","Thalia","Nyx", "Fiora","Ravena","Elandra","Kallista","Zyra" ]>> <<set $titles = [ "the Blade","the Witch","the Fallen","the Seer","the Wanderer", "the Storm","the Silent","the Shadow","the Moonkissed","the Cursed", "the Flame","the Iron Maiden","the Dread","the Veil","the Tempest", "the Bloodrose","the Pale","the Enchantress","the Dreamer","the Forsaken" ]>> // Classes <<set $classes = ["Tank","Healer","Assassin","Mage","Druid","Ranger"]>> /* ------------------------- HERO GENERATOR ------------------------- */ // Creates a new hero object window.createHero = function () { // Pick random pack let pack = either(...$heroPacks); // Pick name, title, class let name = either(...$firstNames); let title = either(...$titles); let heroClass = either(...$classes); // Build hero object let hero = { id: "hero-" + (State.variables.heroes.length + 1), name: name + " " + title, class: heroClass, packId: pack.id, portrait: pack.portrait, jobs: pack.jobs, brothel: pack.brothel, romance: pack.romance, assignments: pack.assignments, invasions: pack.invasions, location: "tavern" // default starting location }; return hero; }; /* ------------------------- HIRE HERO FUNCTION ------------------------- */ // Hire a hero and store in $heroes window.hireHero = function () { let hero = createHero(); $heroes.push(hero); return hero; }; <<set $campEntries = [ { message: "Due to low moral the men have taken one of the villager's daughter... she hasnt been seen since", img: '<img src="Assets/CampEntryImages/men_uneasy.png" alt="Soldiers" style="max-width:500px;">' }, { message: "A girl from the village lifts up her skirt in hopes you will give her something..", img: '<img src="Assets/CampEntryImages/village_girl.png" alt="Camp Image" style="max-width:500px;">' }, { message: "The innkeeper’s daughter seems to have chosen a rather… revealing outfit today.", img: '<img src="Assets/CampEntryImages/innkeeper_daughter.png" alt="Camp Image" style="max-width:500px;">' }, { message: "🌙 A faint laugh drifts from the tavern. Someone’s neckline seems a little more daring than yesterday.", img: '<img src="Assets/CampEntryImages/tavern_night.png" alt="Camp Image" style="max-width:500px;">' }, { message: "A slave trainer from Ranna passes by and decides to let you try out his latest project..", img: '<img src="Assets/CampEntryImages/Ranna1.png" alt="Camp Image" style="max-width:500px;">' }, { message: "A slave trainer from Ranna passes by a decides to let you try out his latest project..", img: '<img src="Assets/CampEntryImages/Ranna2.png" alt="Camp Image" style="max-width:500px;">' }, { message: "You wake up to a nice suprise.", img: '<img src="Assets/CampEntryImages/MorningBlow.png" alt="Camp Image" style="max-width:500px;">' }, { message: "You wake up to a nice suprise.", img: '<img src="Assets/CampEntryImages/MorningBlow2.png" alt="Camp Image" style="max-width:500px;">' }, { message: "A local thief was caught by one of the merchants. Fortunately, they worked something out..", img: '<img src="Assets/CampEntryImages/ThiefCaught1.png" alt="Camp Image" style="max-width:500px;">' }, { message: "Rumors of your massive weapon bemore wildly .", img: '<img src="Assets/CampEntryImages/CockWorship.png" alt="Camp Image" style="max-width:500px;">' }, { message: "❌ One of the female guards failed to apprehend a gang member, though she did find her true calling.", img: '<img src="Assets/CampEntryImages/Guardfailed1.png" alt="Camp Image" style="max-width:500px;">' }, { message: "❌ While one of the guards failed to capture the elusive gang member, her failure unexpectedly led her to discover her real purpose..", img: '<img src="Assets/CampEntryImages/Guardfailed2.png" alt="Camp Image" style="max-width:500px;">' }, { message: "Rumors of your massive weapon be more wide spread .", img: '<img src="Assets/CampEntryImages/CockWorship.png" alt="Camp Image" style="max-width:500px;">' }, { message: "The nobles are demanding for more entertainment...", img: '<img src="Assets/CampEntryImages/TheRich.png" alt="Camp Image" style="max-width:500px;">' }, { message: "A slave trader passes by and shows you his goods.", img: '<img src="Assets/CampEntryImages/Trader1.png" alt="Camp Image" style="max-width:500px;">' }, { message: "One of barmaids was too drunk, and so were you...", img: '<img src="Assets/CampEntryImages/Barmaid1.png" alt="Camp Image" style="max-width:500px;">' } ]>> /* Resources */ <<set $gold = 60>> <<set $wood = 5>> <<set $stone = 5>> <<set $food = 20>> <<set $hope = 25>> <<set $loyalty = 25>> <<set $soldiers = 10>> <<set $gifts = 0>> /* Actions */ <<set $interactionActions = 3>> <<set $assignmentActions = 5>> /* Settlement upgrades */ <<set $settlementLevel = 1>> <!-- 1 = Village, 2 = Town, 3 = City --> <<set $churchLevel = 0>> <<set $barracksLevel = 0>> <<set $wallsLevel = 0>> /* Daily Quest System */ <<set $dailyQuests = []>> <<set $activeQuests = []>> /* Quests currently being undertaken */ <<set $questRewards = []>> /* Store quest outcomes for EndDay */ /* Expanded Quest Pool */ <<<set $quests = [ { title: "Clear the Rats", type: "combat", soldiers: 2, rewardGold: 10, rewardHope: 2, failHope: -6, failLoyalty: 0, nsfw: false, successText: "Your soldiers return with rat tails strung on wire. The people cheer.", failText: "The rats infested deeper than expected — your men return bloodied and ashamed.", successImg: "images/quests/rats_success.png", failImg: "images/quests/rats_fail.png" }, { title: "Bandit Ambush", type: "combat", soldiers: 5, rewardGold: 25, rewardHope: 5, failHope: -10, nsfw: false, successText: "The bandits' camp burns. Survivors kneel before your might.", failText: "Your troops were outmaneuvered. Some never returned.", successImg: "images/quests/bandits_success.png", failImg: "images/quests/bandits_fail.png" }, { title: "Escort Merchants", type: "escort", soldiers: 3, rewardGold: 18, rewardHope: 1, rewardLoyalty: 1, failHope: -4, failLoyalty: -6, nsfw: false, successText: "The merchants arrive safely, grateful for your protection.", failText: "Bandits attacked the caravan. Goods were lost and merchants injured.", successImg: "images/quests/escort_success.png", failImg: "images/quests/escort_fail.png" }, { title: "Hunt for Food", type: "hunting", soldiers: 4, rewardGold: 8, rewardHope: 4, rewardLoyalty: 2, food: 5, failHope: -8, failFood: -10, nsfw: false, successText: "The hunt is successful, bringing much-needed meat to the settlement.", failText: "The game was scarce. Your hunters return empty-handed.", successImg: "images/quests/hunt_success.png", failImg: "images/quests/hunt_fail.png" }, { title: "Guard the Village", type: "defense", soldiers: 6, rewardGold: 20, rewardHope: 3, rewardLoyalty: 4, failHope: -12, failLoyalty: -16, nsfw: false, successText: "Your vigilance prevents any attacks. The villagers sleep soundly.", failText: "Raiders slipped past your guards. Several homes were looted.", successImg: "images/quests/guard_success.png", failImg: "images/quests/guard_fail.png" }, { title: "Clear the Ruins", type: "exploration", soldiers: 8, rewardGold: 38, rewardHope: 2, rewardLoyalty: 1, failHope: -16, failLoyalty: -10, nsfw: false, successText: "Ancient artifacts and treasures recovered from the ruins.", failText: "The ruins were more dangerous than expected. Casualties were high.", successImg: "images/quests/ruins_success.png", failImg: "images/quests/ruins_fail.png" }, { title: "Rescue Captives", type: "rescue", soldiers: 7, rewardGold: 30, rewardHope: 6, rewardLoyalty: 5, failHope: -20, failLoyalty: -24, nsfw: false, successText: "The captives are freed and returned to their families.", failText: "The rescue failed. The captives were moved to an unknown location.", successImg: "images/quests/rescue_success.png", failImg: "images/quests/rescue_fail.png" }, { title: "Patrol the Borders", type: "patrol", soldiers: 4, rewardGold: 12, rewardHope: 2, rewardLoyalty: 3, failHope: -6, failLoyalty: -8, nsfw: false, successText: "The borders are secure. No threats detected.", failText: "Enemy scouts were spotted but escaped. Increased vigilance needed.", successImg: "images/quests/patrol_success.png", failImg: "images/quests/patrol_fail.png" }, { title: "Destroy Monster Nest", type: "combat", soldiers: 10, rewardGold: 50, rewardHope: 7, rewardLoyalty: 6, failHope: -24, failLoyalty: -20, nsfw: false, successText: "The nest is destroyed, making the roads safer for travel.", failText: "The monsters were too numerous. Your forces had to retreat.", successImg: "images/quests/nest_success.png", failImg: "images/quests/nest_fail.png" }, { title: "Gather Resources", type: "gathering", soldiers: 3, rewardGold: 10, wood: 3, stone: 3, rewardHope: 1, failHope: -4, nsfw: false, successText: "Valuable resources gathered from the nearby forests and quarries.", failText: "Bad weather and terrain made gathering impossible.", successImg: "images/quests/gather_success.png", failImg: "images/quests/gather_fail.png" } ]>> /* Party + Tavern heroes start empty */ <<set $party = []>> <<set $tavernHeroes = []>> /* Random Events Pool */ <<set $randomEvents = [ /* --- Positive Events --- */ { title: "A Scholar Arrives", text: "A wandering scholar shares forgotten lore with your people. Hope rises.", hope: +5, loyalty: 0, gold: 0, food: 0, soldiers: 0, img: "Assets/images/events/scholar.png" }, { title: "Festival Night", text: "The people gather for songs and firelight. Spirits soar.", hope: +8, loyalty: +3, gold: -5, food: -5, soldiers: 0, img: "Assets/images/events/festival.png" }, { title: "Generous Merchant", text: "A passing trader donates supplies in hopes of future favor.", hope: +2, loyalty: 0, gold: +40, food: +10, soldiers: 0, img: "Assets/images/events/merchant.png" }, { title: "Blessing of Fertility", text: "A wandering priestess blesses the camp in strange rites. Families whisper of swelling bellies and new strength.", hope: +6, loyalty: +2, gold: -5, food: 0, soldiers: +1, img: "Assets/images/events/fertility.png" }, { title: "Tavern Revelry", text: "A wild night of drink and pleasure fills the tavern. Morale surges in the morning.", hope: +7, loyalty: +3, gold: -10, food: -5, soldiers: 0, img: "Assets/images/events/tavern.png" }, { title: "Tavern party", text: "A rich noble men walks into the tavern and buys rounds for everyone.After awhile everyone is caught up in the heat of the moment leading to a 16 hour orgy.", hope: +7, loyalty: +6, gold: -10, food: -15, soldiers: +2, img: "Assets/images/events/tavernParty.png" }, /* --- Negative Events --- */ { title: "Goblin Raid", text: "Goblins attack in the night! Many soldiers die, and villagers are dragged into the dark.", hope: -5, loyalty: -5, gold: -10, food: -5, soldiers: -3, img: "Assets/images/events/goblin_raid.png" }, { title: "Goblin Attack", text: "The Goblins attacked a noble's carriage on the way to a local village... the completely ravaged the carriage.", hope: -5, loyalty: -5, gold: -10, food: -5, soldiers: -3, img: "Assets/images/events/goblin_raid2.png" }, { title: "Plague Outbreak", text: "A strange illness spreads through the camp. Some soldiers perish, and morale crumbles.", hope: -10, loyalty: -5, gold: 0, food: 0, soldiers: -2, img: "Assets/images/events/plague.png" }, { title: "Famine", text: "Supplies run low. Women are selling their bodies just to feed their families.", hope: -6, loyalty: -4, gold: 0, food: -15, soldiers: 0, img: "Assets/images/events/famine.png" }, { title: "Famine rules over the people", text: "Many families are hungry and many are resorting to depraving acts in order to feed their families....", hope: -6, loyalty: -4, gold: 0, food: -15, soldiers: 0, img: "Assets/images/events/famine2.png" }, { title: "Assassination Attempt", text: "An assassin strikes in the night! A trusted soldier is slain in your defense.", hope: -3, loyalty: -5, gold: 0, food: 0, soldiers: -1, img: "Assets/images/events/assassin.png" }, { title: "Brothel Scandal", text: "A noble is caught in scandalous acts at the brothel. The people whisper of corruption.", hope: -2, loyalty: -6, gold: +15, food: 0, soldiers: 0, img: "Assets/images/events/brothel_scandal.png" }, /* --- Mixed Events --- */ { title: "Battle-Hardened Veterans", text: "Returning mercenaries bring spoils but also grim tales of loss.", hope: +2, loyalty: 0, gold: +25, food: 0, soldiers: -1, img: "Assets/images/events/veterans.png" }, { title: "Forbidden Ritual", text: "A witch performs rites for your followers. Power surges… but some grow afraid.", hope: +4, loyalty: -3, gold: 0, food: 0, soldiers: 0, img: "Assets/images/events/ritual.png" }, { title: "Captured Bandits", text: "Your men capture a band of raiders. Executing them brings peace, sparing them wins loyalty.", hope: +3, loyalty: +5, gold: +10, food: 0, soldiers: 0, img: "Assets/images/events/bandits.png" }, { title: "Night of Passion", text: "An intoxicating night spreads through camp — laughter, song, and pleasure in equal measure. Some duties are neglected.", hope: +6, loyalty: +2, gold: -10, food: -5, soldiers: 0, img: "Assets/images/events/passion.png" }, { title: "Slave Market", text: "Traveling slavers offer captives for coin. Buying them swells your ranks but sows unease.", hope: -4, loyalty: -3, gold: -30, food: 0, soldiers: +2, img: "Assets/images/events/slavers.png" } ]>> :: Jobs <<if !$jobs>> <<set $jobs = []>> <</if>> <<set $jobs = [ { id: "job1", name: "Entertain the Nobles", desc: [ "The nobles feast and laugh as the hero entertains them with more… personal performances.", "The nobles drink deeply and clap as the hero’s dance grows more daring by the hour." ], rewards: { gold: 25, hope: 5, loyalty: 0 }, imgIndex: 0 }, { id: "job2", name: "Clear a Local Infestation", desc: [ "The villagers sigh with relief as the pests are cleared, though the hero returns a little bloodied.", "The hero smashes nests and drives off vermin, earning cheers and respect." ], rewards: { gold: 0, hope: 8, loyalty: 4 }, imgIndex: 1 }, { id: "job3", name: "Guard the Marketplace", desc: [ "Merchants smile as the hero keeps the peace, though a few disputes are settled with more… creative methods.", "Thieves are driven away, and the hero’s stern gaze keeps the market calm." ], rewards: { gold: 15, hope: 3, loyalty: 2 }, imgIndex: 2 }, { id: "job4", name: "Help Recruit New Soldiers", desc: [ "The hero rallies young men to the cause with fiery speeches and suggestive promises.", "Training exercises quickly turn intense, but the hero leaves with more recruits at the barracks." ], rewards: { gold: 0, hope: 5, loyalty: 5, soldiers: 2 }, imgIndex: 3 }, { id: "job5", name: "Helping Someone Lose Their Virginity", desc: [ "The blushing villager thanks the hero profusely, stumbling back to their hut satisfied.", "Word spreads quickly — the hero has given someone an unforgettable first night." ], rewards: { gold: 10, hope: 6, loyalty: 2 }, imgIndex: 4 }, { id: "job6", name: "Boosting Soldier Morale", desc: [ "The camp is filled with laughter, cheering, and relieved sighs after the hero spends the night with the men.", "The hero moves from tent to tent, making sure each soldier feels… appreciated." ], rewards: { gold: 0, hope: 4, loyalty: 6 }, imgIndex: 5 }, { id: "job7", name: "Free Use – The Men of the Village Need a Boost", desc: [ "The men line up eagerly, spirits soaring as the hero is made available to all.", "Laughter and groans echo into the night — the village will be very satisfied come morning." ], rewards: { gold: 0, hope: 10, loyalty: 3 }, imgIndex: 6 } ]>> <<set $uniqueHeroes = [ { name: "Lyra the Veil", class: "Shadowblade", desc: "A mysterious assassin who moves unseen between worlds.", cost: 0, portrait: "Assets/UniqueHero/Lyra/portrait.png", jobs: [ "Assets/UniqueHero/Lyra/jobs/job1.png", "Assets/UniqueHero/Lyra/jobs/job2.png", "Assets/UniqueHero/Lyra/jobs/job3.png", "Assets/UniqueHero/Lyra/jobs/job4.png", "Assets/UniqueHero/Lyra/jobs/job5.png", "Assets/UniqueHero/Lyra/jobs/job6.png", "Assets/UniqueHero/Lyra/jobs/job7.png" ], brothel: [ "Assets/UniqueHero/Lyra/brothel/brothel1.png", "Assets/UniqueHero/Lyra/brothel/brothel2.png", "Assets/UniqueHero/Lyra/brothel/brothel3.png", "Assets/UniqueHero/Lyra/brothel/brothel4.png", "Assets/UniqueHero/Lyra/brothel/brothel5.png" ], romance: [ "Assets/UniqueHero/Lyra/romance/romance1.png", "Assets/UniqueHero/Lyra/romance/romance2.png", "Assets/UniqueHero/Lyra/romance/romance3.png" ], assignments: { assignment1: { success: "Assets/UniqueHero/Lyra/assignments/assignment1_success.png", fail: "Assets/UniqueHero/Lyra/assignments/assignment1_fail.png" }, assignment2: { success: "Assets/UniqueHero/Lyra/assignments/assignment2_success.png", fail: "Assets/UniqueHero/Lyra/assignments/assignment2_fail.png" }, assignment3: { success: "Assets/UniqueHero/Lyra/assignments/assignment3_success.png", fail: "Assets/UniqueHero/Lyra/assignments/assignment3_fail.png" }, assignment4: { success: "Assets/UniqueHero/Lyra/assignments/assignment4_success.png", fail: "Assets/UniqueHero/Lyra/assignments/assignment4_fail.png" }, assignment5: { success: "Assets/UniqueHero/Lyra/assignments/assignment5_success.png", fail: "Assets/UniqueHero/Lyra/assignments/assignment5_fail.png" } }, invasions: { invasion1: { success: "Assets/UniqueHero/Lyra/invasions/invasion1_success.png", fail: "Assets/UniqueHero/Lyra/invasions/invasion1_fail.png" }, invasion2: { success: "Assets/UniqueHero/Lyra/invasions/invasion2_success.png", fail: "Assets/UniqueHero/Lyra/invasions/invasion2_fail.png" }, invasion3: { success: "Assets/UniqueHero/Lyra/invasions/invasion3_success.png", fail: "Assets/UniqueHero/Lyra/invasions/invasion3_fail.png" }, invasion4: { success: "Assets/UniqueHero/Lyra/invasions/invasion4_success.png", fail: "Assets/UniqueHero/Lyra/invasions/invasion4_fail.png" }, invasion5: { success: "Assets/UniqueHero/Lyra/invasions/invasion5_success.png", fail: "Assets/UniqueHero/Lyra/invasions/invasion5_fail.png" }, invasion6: { success: "Assets/UniqueHero/Lyra/invasions/invasion6_success.png", fail: "Assets/UniqueHero/Lyra/invasions/invasion6_fail.png" } }, recruited: false, power: 120, gear: "Shadowfang Daggers", // ROMANCE PROPERTIES affection: 0, romanceStage: 0, personalQuestDone: false, moralChoiceDone: false, pactEventDone: false, quirks: ["mysterious", "guarded", "observant", "deadly", "secretive"], preferredGifts: ["dagger", "shadow-cloak", "ancient-text", "poison-vial", "silent-boots"], mood: "neutral", unlockedLore: [], unlockedScenes: [], currentDialogueSet: "neutral" }, { name: "Kaelen the Flame", class: "Warrior", desc: "A fearless fighter whose blade blazes with fury.", cost: 150, portrait: "Assets/UniqueHero/Kaelen/portrait.png", jobs: [ "Assets/UniqueHero/Kaelen/jobs/job1.png", "Assets/UniqueHero/Kaelen/jobs/job2.png", "Assets/UniqueHero/Kaelen/jobs/job3.png", "Assets/UniqueHero/Kaelen/jobs/job4.png", "Assets/UniqueHero/Kaelen/jobs/job5.png", "Assets/UniqueHero/Kaelen/jobs/job6.png", "Assets/UniqueHero/Kaelen/jobs/job7.png" ], brothel: [ "Assets/UniqueHero/Kaelen/brothel/brothel1.png", "Assets/UniqueHero/Kaelen/brothel/brothel2.png", "Assets/UniqueHero/Kaelen/brothel/brothel3.png", "Assets/UniqueHero/Kaelen/brothel/brothel4.png", "Assets/UniqueHero/Kaelen/brothel/brothel5.png" ], romance: [ "Assets/UniqueHero/Kaelen/romance/romance1.png", "Assets/UniqueHero/Kaelen/romance/romance2.png", "Assets/UniqueHero/Kaelen/romance/romance3.png" ], assignments: { assignment1: { success: "Assets/UniqueHero/Kaelen/assignments/assignment1_success.png", fail: "Assets/UniqueHero/Kaelen/assignments/assignment1_fail.png" }, assignment2: { success: "Assets/UniqueHero/Kaelen/assignments/assignment2_success.png", fail: "Assets/UniqueHero/Kaelen/assignments/assignment2_fail.png" }, assignment3: { success: "Assets/UniqueHero/Kaelen/assignments/assignment3_success.png", fail: "Assets/UniqueHero/Kaelen/assignments/assignment3_fail.png" }, assignment4: { success: "Assets/UniqueHero/Kaelen/assignments/assignment4_success.png", fail: "Assets/UniqueHero/Kaelen/assignments/assignment4_fail.png" }, assignment5: { success: "Assets/UniqueHero/Kaelen/assignments/assignment5_success.png", fail: "Assets/UniqueHero/Kaelen/assignments/assignment5_fail.png" } }, invasions: { invasion1: { success: "Assets/UniqueHero/Kaelen/invasions/invasion1_success.png", fail: "Assets/UniqueHero/Kaelen/invasions/invasion1_fail.png" }, invasion2: { success: "Assets/UniqueHero/Kaelen/invasions/invasion2_success.png", fail: "Assets/UniqueHero/Kaelen/invasions/invasion2_fail.png" }, invasion3: { success: "Assets/UniqueHero/Kaelen/invasions/invasion3_success.png", fail: "Assets/UniqueHero/Kaelen/invasions/invasion3_fail.png" }, invasion4: { success: "Assets/UniqueHero/Kaelen/invasions/invasion4_success.png", fail: "Assets/UniqueHero/Kaelen/invasions/invasion4_fail.png" }, invasion5: { success: "Assets/UniqueHero/Kaelen/invasions/invasion5_success.png", fail: "Assets/UniqueHero/Kaelen/invasions/invasion5_fail.png" }, invasion6: { success: "Assets/UniqueHero/Kaelen/invasions/invasion6_success.png", fail: "Assets/UniqueHero/Kaelen/invasions/invasion6_fail.png" } }, recruited: false, power: 100, gear: "Blazing Greatsword", // ROMANCE PROPERTIES affection: 0, romanceStage: 0, personalQuestDone: false, moralChoiceDone: false, pactEventDone: false, quirks: ["passionate", "honorable", "protective", "impulsive", "loyal"], preferredGifts: ["greatsword", "fire-rune", "battle-manual", "ale", "trophy"], mood: "neutral", unlockedLore: [], unlockedScenes: [], currentDialogueSet: "neutral" }, { name: "Selene the Light", class: "Healer", desc: "A gentle soul who brings hope and restores life with divine radiance.", cost: 250, portrait: "Assets/UniqueHero/Selene/portrait.png", jobs: [ "Assets/UniqueHero/Selene/jobs/job1.png", "Assets/UniqueHero/Selene/jobs/job2.png", "Assets/UniqueHero/Selene/jobs/job3.png", "Assets/UniqueHero/Selene/jobs/job4.png", "Assets/UniqueHero/Selene/jobs/job5.png", "Assets/UniqueHero/Selene/jobs/job6.png", "Assets/UniqueHero/Selene/jobs/job7.png" ], brothel: [ "Assets/UniqueHero/Selene/brothel/brothel1.png", "Assets/UniqueHero/Selene/brothel/brothel2.png", "Assets/UniqueHero/Selene/brothel/brothel3.png", "Assets/UniqueHero/Selene/brothel/brothel4.png", "Assets/UniqueHero/Selene/brothel/brothel5.png" ], romance: [ "Assets/UniqueHero/Selene/romance/romance1.png", "Assets/UniqueHero/Selene/romance/romance2.png", "Assets/UniqueHero/Selene/romance/romance3.png" ], assignments: { assignment1: { success: "Assets/UniqueHero/Selene/assignments/assignment1_success.png", fail: "Assets/UniqueHero/Selene/assignments/assignment1_fail.png" }, assignment2: { success: "Assets/UniqueHero/Selene/assignments/assignment2_success.png", fail: "Assets/UniqueHero/Selene/assignments/assignment2_fail.png" }, assignment3: { success: "Assets/UniqueHero/Selene/assignments/assignment3_success.png", fail: "Assets/UniqueHero/Selene/assignments/assignment3_fail.png" }, assignment4: { success: "Assets/UniqueHero/Selene/assignments/assignment4_success.png", fail: "Assets/UniqueHero/Selene/assignments/assignment4_fail.png" }, assignment5: { success: "Assets/UniqueHero/Selene/assignments/assignment5_success.png", fail: "Assets/UniqueHero/Selene/assignments/assignment5_fail.png" } }, invasions: { invasion1: { success: "Assets/UniqueHero/Selene/invasions/invasion1_success.png", fail: "Assets/UniqueHero/Selene/invasions/invasion1_fail.png" }, invasion2: { success: "Assets/UniqueHero/Selene/invasions/invasion2_success.png", fail: "Assets/UniqueHero/Selene/invasions/invasion2_fail.png" }, invasion3: { success: "Assets/UniqueHero/Selene/invasions/invasion3_success.png", fail: "Assets/UniqueHero/Selene/invasions/invasion3_fail.png" }, invasion4: { success: "Assets/UniqueHero/Selene/invasions/invasion4_success.png", fail: "Assets/UniqueHero/Selene/invasions/invasion4_fail.png" }, invasion5: { success: "Assets/UniqueHero/Selene/invasions/invasion5_success.png", fail: "Assets/UniqueHero/Selene/invasions/invasion5_fail.png" }, invasion6: { success: "Assets/UniqueHero/Selene/invasions/invasion6_success.png", fail: "Assets/UniqueHero/Selene/invasions/invasion6_fail.png" } }, recruited: false, power: 80, gear: "Radiant Staff", // ROMANCE PROPERTIES affection: 0, romanceStage: 0, personalQuestDone: false, moralChoiceDone: false, pactEventDone: false, quirks: ["compassionate", "wise", "serene", "forgiving", "hopeful"], preferredGifts: ["healing-crystal", "holy-symbol", "herbs", "prayer-beads", "light-tome"], mood: "neutral", unlockedLore: [], unlockedScenes: [], currentDialogueSet: "neutral" }, { name: "Nyx the Fallen", class: "Dark Mage", desc: "A master of forbidden sorcery, feared and respected in equal measure.", cost: 350, portrait: "Assets/UniqueHero/Nyx/portrait.png", jobs: [ "Assets/UniqueHero/Nyx/jobs/job1.png", "Assets/UniqueHero/Nyx/jobs/job2.png", "Assets/UniqueHero/Nyx/jobs/job3.png", "Assets/UniqueHero/Nyx/jobs/job4.png", "Assets/UniqueHero/Nyx/jobs/job5.png", "Assets/UniqueHero/Nyx/jobs/job6.png", "Assets/UniqueHero/Nyx/jobs/job7.png" ], brothel: [ "Assets/UniqueHero/Nyx/brothel/brothel1.png", "Assets/UniqueHero/Nyx/brothel/brothel2.png", "Assets/UniqueHero/Nyx/brothel/brothel3.png", "Assets/UniqueHero/Nyx/brothel/brothel4.png", "Assets/UniqueHero/Nyx/brothel/brothel5.png" ], romance: [ "Assets/UniqueHero/Nyx/romance/romance1.png", "Assets/UniqueHero/Nyx/romance/romance2.png", "Assets/UniqueHero/Nyx/romance/romance3.png" ], assignments: { assignment1: { success: "Assets/UniqueHero/Nyx/assignments/assignment1_success.png", fail: "Assets/UniqueHero/Nyx/assignments/assignment1_fail.png" }, assignment2: { success: "Assets/UniqueHero/Nyx/assignments/assignment2_success.png", fail: "Assets/UniqueHero/Nyx/assignments/assignment2_fail.png" }, assignment3: { success: "Assets/UniqueHero/Nyx/assignments/assignment3_success.png", fail: "Assets/UniqueHero/Nyx/assignments/assignment3_fail.png" }, assignment4: { success: "Assets/UniqueHero/Nyx/assignments/assignment4_success.png", fail: "Assets/UniqueHero/Nyx/assignments/assignment4_fail.png" }, assignment5: { success: "Assets/UniqueHero/Nyx/assignments/assignment5_success.png", fail: "Assets/UniqueHero/Nyx/assignments/assignment5_fail.png" } }, invasions: { invasion1: { success: "Assets/UniqueHero/Nyx/invasions/invasion1_success.png", fail: "Assets/UniqueHero/Nyx/invasions/invasion1_fail.png" }, invasion2: { success: "Assets/UniqueHero/Nyx/invasions/invasion2_success.png", fail: "Assets/UniqueHero/Nyx/invasions/invasion2_fail.png" }, invasion3: { success: "Assets/UniqueHero/Nyx/invasions/invasion3_success.png", fail: "Assets/UniqueHero/Nyx/invasions/invasion3_fail.png" }, invasion4: { success: "Assets/UniqueHero/Nyx/invasions/invasion4_success.png", fail: "Assets/UniqueHero/Nyx/invasions/invasion4_fail.png" }, invasion5: { success: "Assets/UniqueHero/Nyx/invasions/invasion5_success.png", fail: "Assets/UniqueHero/Nyx/invasions/invasion5_fail.png" }, invasion6: { success: "Assets/UniqueHero/Nyx/invasions/invasion6_success.png", fail: "Assets/UniqueHero/Nyx/invasions/invasion6_fail.png" } }, recruited: false, power: 150, gear: "Cursed Grimoire", // ROMANCE PROPERTIES affection: 0, romanceStage: 0, personalQuestDone: false, moralChoiceDone: false, pactEventDone: false, quirks: ["brooding", "intellectual", "ambitious", "pragmatic", "mysterious"], preferredGifts: ["dark-tome", "soul-gem", "cursed-artifact", "obsidian", "necronomicon"], mood: "neutral", unlockedLore: [], unlockedScenes: [], currentDialogueSet: "neutral" }, { name: "Syndra the Storm", class: "Battle Mage", desc: "Harnesses destructive storms to lay waste to her enemies.", cost: 450, portrait: "Assets/UniqueHero/Syndra/portrait.png", jobs: [ "Assets/UniqueHero/Syndra/jobs/job1.png", "Assets/UniqueHero/Syndra/jobs/job2.png", "Assets/UniqueHero/Syndra/jobs/job3.png", "Assets/UniqueHero/Syndra/jobs/job4.png", "Assets/UniqueHero/Syndra/jobs/job5.png", "Assets/UniqueHero/Syndra/jobs/job6.png", "Assets/UniqueHero/Syndra/jobs/job7.png" ], brothel: [ "Assets/UniqueHero/Syndra/brothel/brothel1.png", "Assets/UniqueHero/Syndra/brothel/brothel2.png", "Assets/UniqueHero/Syndra/brothel/brothel3.png", "Assets/UniqueHero/Syndra/brothel/brothel4.png", "Assets/UniqueHero/Syndra/brothel/brothel5.png" ], romance: [ "Assets/UniqueHero/Syndra/romance/romance1.png", "Assets/UniqueHero/Syndra/romance/romance2.png", "Assets/UniqueHero/Syndra/romance/romance3.png" ], assignments: { assignment1: { success: "Assets/UniqueHero/Syndra/assignments/assignment1_success.png", fail: "Assets/UniqueHero/Syndra/assignments/assignment1_fail.png" }, assignment2: { success: "Assets/UniqueHero/Syndra/assignments/assignment2_success.png", fail: "Assets/UniqueHero/Syndra/assignments/assignment2_fail.png" }, assignment3: { success: "Assets/UniqueHero/Syndra/assignments/assignment3_success.png", fail: "Assets/UniqueHero/Syndra/assignments/assignment3_fail.png" }, assignment4: { success: "Assets/UniqueHero/Syndra/assignments/assignment4_success.png", fail: "Assets/UniqueHero/Syndra/assignments/assignment4_fail.png" }, assignment5: { success: "Assets/UniqueHero/Syndra/assignments/assignment5_success.png", fail: "Assets/UniqueHero/Syndra/assignments/assignment5_fail.png" } }, invasions: { invasion1: { success: "Assets/UniqueHero/Syndra/invasions/invasion1_success.png", fail: "Assets/UniqueHero/Syndra/invasions/invasion1_fail.png" }, invasion2: { success: "Assets/UniqueHero/Syndra/invasions/invasion2_success.png", fail: "Assets/UniqueHero/Syndra/invasions/invasion2_fail.png" }, invasion3: { success: "Assets/UniqueHero/Syndra/invasions/invasion3_success.png", fail: "Assets/UniqueHero/Syndra/invasions/invasion3_fail.png" }, invasion4: { success: "Assets/UniqueHero/Syndra/invasions/invasion4_success.png", fail: "Assets/UniqueHero/Syndra/invasions/invasion4_fail.png" }, invasion5: { success: "Assets/UniqueHero/Syndra/invasions/invasion5_success.png", fail: "Assets/UniqueHero/Syndra/invasions/invasion5_fail.png" }, invasion6: { success: "Assets/UniqueHero/Syndra/invasions/invasion6_success.png", fail: "Assets/UniqueHero/Syndra/invasions/invasion6_fail.png" } }, recruited: false, power: 140, gear: "Stormforged Staff", // ROMANCE PROPERTIES affection: 0, romanceStage: 0, personalQuestDone: false, moralChoiceDone: false, pactEventDone: false, quirks: ["tempestuous", "confident", "unpredictable", "power-hungry", "charismatic"], preferredGifts: ["lightning-rod", "storm-crystal", "tempest-scroll", "conductive-ore", "wind-charm"], mood: "neutral", unlockedLore: [], unlockedScenes: [], currentDialogueSet: "neutral" }, { name: "Elandra Whisperwind", class: "Ranger", desc: "A huntress who strikes with precision and vanishes like mist.", cost: 600, portrait: "Assets/UniqueHero/Elandra/portrait.png", jobs: [ "Assets/UniqueHero/Elandra/jobs/job1.png", "Assets/UniqueHero/Elandra/jobs/job2.png", "Assets/UniqueHero/Elandra/jobs/job3.png", "Assets/UniqueHero/Elandra/jobs/job4.png", "Assets/UniqueHero/Elandra/jobs/job5.png", "Assets/UniqueHero/Elandra/jobs/job6.png", "Assets/UniqueHero/Elandra/jobs/job7.png" ], brothel: [ "Assets/UniqueHero/Elandra/brothel/brothel1.png", "Assets/UniqueHero/Elandra/brothel/brothel2.png", "Assets/UniqueHero/Elandra/brothel/brothel3.png", "Assets/UniqueHero/Elandra/brothel/brothel4.png", "Assets/UniqueHero/Elandra/brothel/brothel5.png" ], romance: [ "Assets/UniqueHero/Elandra/romance/romance1.png", "Assets/UniqueHero/Elandra/romance/romance2.png", "Assets/UniqueHero/Elandra/romance/romance3.png" ], assignments: { assignment1: { success: "Assets/UniqueHero/Elandra/assignments/assignment1_success.png", fail: "Assets/UniqueHero/Elandra/assignments/assignment1_fail.png" }, assignment2: { success: "Assets/UniqueHero/Elandra/assignments/assignment2_success.png", fail: "Assets/UniqueHero/Elandra/assignments/assignment2_fail.png" }, assignment3: { success: "Assets/UniqueHero/Elandra/assignments/assignment3_success.png", fail: "Assets/UniqueHero/Elandra/assignments/assignment3_fail.png" }, assignment4: { success: "Assets/UniqueHero/Elandra/assignments/assignment4_success.png", fail: "Assets/UniqueHero/Elandra/assignments/assignment4_fail.png" }, assignment5: { success: "Assets/UniqueHero/Elandra/assignments/assignment5_success.png", fail: "Assets/UniqueHero/Elandra/assignments/assignment5_fail.png" } }, invasions: { invasion1: { success: "Assets/UniqueHero/Elandra/invasions/invasion1_success.png", fail: "Assets/UniqueHero/Elandra/invasions/invasion1_fail.png" }, invasion2: { success: "Assets/UniqueHero/Elandra/invasions/invasion2_success.png", fail: "Assets/UniqueHero/Elandra/invasions/invasion2_fail.png" }, invasion3: { success: "Assets/UniqueHero/Elandra/invasions/invasion3_success.png", fail: "Assets/UniqueHero/Elandra/invasions/invasion3_fail.png" }, invasion4: { success: "Assets/UniqueHero/Elandra/invasions/invasion4_success.png", fail: "Assets/UniqueHero/Elandra/invasions/invasion4_fail.png" }, invasion5: { success: "Assets/UniqueHero/Elandra/invasions/invasion5_success.png", fail: "Assets/UniqueHero/Elandra/invasions/invasion5_fail.png" }, invasion6: { success: "Assets/UniqueHero/Elandra/invasions/invasion6_success.png", fail: "Assets/UniqueHero/Elandra/invasions/invasion6_fail.png" } }, recruited: false, power: 130, gear: "Whisperwind Bow", // ROMANCE PROPERTIES affection: 0, romanceStage: 0, personalQuestDone: false, moralChoiceDone: false, pactEventDone: false, quirks: ["elusive", "perceptive", "independent", "stealthy", "wild"], preferredGifts: ["silver-arrow", "camouflage-cloak", "tracking-manual", "forest-talisman", "hawk-feather"], mood: "neutral", unlockedLore: [], unlockedScenes: [], currentDialogueSet: "neutral" } ] >> /* Shopkeeper setup */ <<set $shopkeeper = { name: "Elara", relation: 0, /* relationship points */ romanceStage: 0 /* 0 = stranger, 1 = friendly, 2 = romantic, 3 = lover */ }>> /* NPCs */ <<set $npcs = {}>> /* ------------------------- TAVERN RECRUITMENT SYSTEM ------------------------- */ <<set setup.recruitHero = function(heroIndex) { // Get the hero by index to avoid reference issues const hero = variables().uniqueHeroes[heroIndex]; if (!hero) { console.error('Hero not found at index:', heroIndex); return false; } if (variables().gold >= hero.cost && !hero.recruited) { // Deduct gold variables().gold -= hero.cost; // Mark hero as recruited (by index to avoid reference issues) variables().uniqueHeroes[heroIndex].recruited = true; // Add to party if (!variables().party) variables().party = []; variables().party.push({ name: hero.name, class: hero.class, power: hero.power, gear: hero.gear, portrait: hero.portrait }); // Store which hero was just recruited variables().lastRecruitedHero = hero.name; return true; } return false; }>> <<set $lastRecruitedHero = "">>
<div class="main-container settlement-level-<<= $settlementLevel >>"> <!-- Resources Header --> <div class="resources"> <strong>Resources:</strong><br> 💰 Gold: <<= $gold>> | 🪵 Wood: <<= $wood>> | ⚒️ Stone: <<= $stone>><br> 🍖 Food: <<= $food>> | ✨ Hope: <<= $hope>> | ❤️ Loyalty: <<= $loyalty>><br> ⚔️ Soldiers: <<= $soldiers>> | 🎁 Gifts: <<= $gifts>> </div> <!-- Day Display --> <div class="day-display"> 📅 It is Day <<= $day>><br><br> <<set _index = random(0, $campEntries.length - 1)>> <<= $campEntries[_index].img >> <<= $campEntries[_index].message >> </div> <!-- Actions --> <div class="actions-section"> <div class="actions-title">🎯 Actions Today:</div> <div>- Interactions left: <<print $interactionActions>></div> <div>- Assignments left: <<print $assignmentActions>></div> </div> <!-- Navigation - NO PURPLE --> <div class="options-container"> <div class="option-box">🦸 [[Heros|Interact]]</div> <div class="option-box">👷 [[Desperate Pleas|Jobs]]</div> <div class="option-box">🛡️ [[Hero Quests|Assignments]]</div> <div class="option-box">🗡️ [[Quests|Quests]]</div> <div class="option-box">🏗️ [[Upgrade Settlement|Upgrades]]</div> <div class="option-box">⚒️ [[Blacksmith|Blacksmith]]</div> <div class="option-box">🛒 [[Shopkeeper|shopkeeper]]</div> <div class="option-box">🍺 [[Tavern|Tavern]]</div> <div class="option-box">💋 [[Brothel|Brothel]]</div> <div class="option-box">⚔️ [[Invasion|Invasion]]</div> <div class="option-box">🌙 [[End the Day|EndDay]]</div> <div class="option-box">⚙️ [[Settings]]</div> </div> </div>
:: Hero Interactions <div class="romance-container"> <h2 class="romance-header">Hero Interactions</h2> <div class="resources"> <strong>Interactions left today:</strong> <<print $interactionActions>> </div> <div class="actions-section"> <h3 class="actions-title">Unique Heroes</h3> <<for _hero range $uniqueHeroes>> <<if _hero.recruited>> <div class="hero-interaction-card"> <div class="hero-card-header"> <strong><<print _hero.name>></strong> — <<print _hero.class>> </div> <div class="hero-card-stats"> <div class="stat-row"> <span class="stat-label">Affection:</span> <div class="progress-bar-container"> <div class="progress-bar-fill" style="width: <<print _hero.affection>>%;"></div> </div> <span class="stat-value"><<print _hero.affection>>%</span> </div> <div class="stat-row"> <span class="stat-label">Stage:</span> <span class="romance-stage"> <<if _hero.romanceStage == 0>>Neutral<</if>> <<if _hero.romanceStage == 1>>Interest<</if>> <<if _hero.romanceStage == 2>>Bond<</if>> <<if _hero.romanceStage == 3>>Intimacy<</if>> <<if _hero.romanceStage == 4>>Commitment<</if>> </span> </div> <div class="stat-row"> <span class="stat-label">Mood:</span> <span class="mood-indicator mood-<<print _hero.mood>>"> <<print _hero.mood>> </span> </div> </div> <div class="interaction-buttons-small"> <<set _heroIndex = $uniqueHeroes.indexOf(_hero)>> [[Chat|Hero Chat][$currentHeroIndex = _heroIndex]] [[Date|Hero Date][$currentHeroIndex = _heroIndex]] [[Romance|Hero Romance][$currentHeroIndex = _heroIndex]] [[Gift|Hero Gifts][$currentHeroIndex = _heroIndex]] </div> </div> <</if>> <</for>> </div> <div class="actions-section"> <h3 class="actions-title">Random Heroes (W.I.P)</h3> <p>Random interactions coming soon…</p> </div> <div class="options-container"> <div class="option-box"> <a href="Camp">⬅️ Back to Camp</a> </div> </div> </div>
<div class="location-header"> <h2>💼 Desperate Pleas</h2> <p>The desperate and needy gather at your command post. Their survival depends on your decisions.</p> </div> <!-- Resources Display --> <div class="resources"> <strong>Gold: <<print $gold>></strong> | <strong>Hope: <<print $hope>></strong> | <strong>Food: <<print $food>></strong> | <strong>Loyalty: <<print $loyalty>></strong> </div> <<if $jobsCompletedToday>> <div class="tavern-section" style="text-align: center;"> <h3>⚰️ The Day's Burdens Are Done</h3> <p>You've already addressed the people's pleas today. More desperate souls will come tomorrow.</p> [[Return to Camp|Camp]] </div> <<else>> <div class="tavern-section"> <h3>🎭 Choose a Desperate Soul to Aid</h3> <p>Each decision carries weight. Choose wisely, for you can only help one today.</p> <div class="jobs-grid"> <!-- Gold Job --> <<if $gold < 30>> <div class="job-card"> <div class="job-header"> <h4>💰 The Begging Merchant</h4> <img src="Assets/images/jobs/begging_merchant.png" alt="Begging Merchant" style="width: 100px; height: 100px; object-fit: cover;"> </div> <div class="job-content"> <p><em>"Please, my lord," a gaunt merchant kneels before you, his fine clothes now rags. "The bandits took everything. My family will starve without coin. I beg you, grant me just enough to buy bread for my children."</em></p> <div class="job-rewards"> <strong>Reward:</strong> +15 Gold<br> <strong>Cost:</strong> -5 Hope (The merchant's despair is contagious) </div> <<link "Help the Merchant">> <<set $gold += 15>> <<set $hope -= 5>> <<set $jobsCompletedToday = true>> <<set $jobOutcomes.push({ title: "The Begging Merchant", text: "You toss the merchant a small purse of coins. He weeps with gratitude, but you feel the weight of another soul dependent on your charity.", img: "Assets/images/jobs/merchant_success.png", rewards: { gold: 15, hope: -5 } })>> <<goto "JobComplete">> <</link>> </div> </div> <</if>> <!-- Hope Job --> <<if $hope < 30>> <div class="job-card"> <div class="job-header"> <h4>✨ The Despairing Priest</h4> <img src="Assets/images/jobs/despairing_priest.png" alt="Despairing Priest" style="width: 100px; height: 100px; object-fit: cover;"> </div> <div class="job-content"> <p><em>A broken priest clutches his ruined holy symbol. "The gods have abandoned us," he whispers. "The people need hope, but I have none left to give. Help me restore their faith before they turn to darker things."</em></p> <div class="job-rewards"> <strong>Reward:</strong> +10 Hope<br> <strong>Cost:</strong> -10 Gold (for ceremonial supplies) </div> <<link "Support the Priest">> <<set $hope += 10>> <<set $gold -= 10>> <<set $jobsCompletedToday = true>> <<set $jobOutcomes.push({ title: "The Despairing Priest", text: "You fund a small ceremony. The priest's words are hollow, but the people cling to any semblance of hope in these dark times.", img: "Assets/images/jobs/priest_success.png", rewards: { hope: 10, gold: -10 } })>> <<goto "JobComplete">> <</link>> </div> </div> <</if>> <!-- Food Job --> <<if $food < 20>> <div class="job-card"> <div class="job-header"> <h4>🍖 The Starving Mother</h4> <img src="Assets/images/jobs/starving_mother.png" alt="Starving Mother" style="width: 100px; height: 100px; object-fit: cover;"> </div> <div class="job-content"> <p><em>A mother clutching a listless child approaches. "My baby hasn't eaten in three days," she sobs. "The other children... they already stopped crying. Please, anything you can spare. I'll do anything."</em></p> <div class="job-rewards"> <strong>Reward:</strong> +8 Food<br> <strong>Cost:</strong> -5 Loyalty (others resent the favoritism) </div> <<link "Feed the Family">> <<set $food += 8>> <<set $loyalty -= 5>> <<set $jobsCompletedToday = true>> <<set $jobOutcomes.push({ title: "The Starving Mother", text: "You give the woman provisions from your personal stores. She kisses your hands, but you hear whispers of jealousy from the crowd.", img: "Assets/images/jobs/mother_success.png", rewards: { food: 8, loyalty: -5 } })>> <<goto "JobComplete">> <</link>> </div> </div> <</if>> <!-- Loyalty Job --> <<if $loyalty < 30>> <div class="job-card"> <div class="job-header"> <h4>❤️ The Disgruntled Guardsman</h4> <img src="Assets/images/jobs/disgruntled_guard.png" alt="Disgruntled Guard" style="width: 100px; height: 100px; object-fit: cover;"> </div> <div class="job-content"> <p><em>A veteran guardsman stands stiffly, his armor dented. "The men are talking, my lord. They see the empty coffers and full graves. They need to know you still value their service... before they value it elsewhere."</em></p> <div class="job-rewards"> <strong>Reward:</strong> +8 Loyalty<br> <strong>Cost:</strong> -15 Gold (for bonuses and repairs) </div> <<link "Pay the Guard">> <<set $loyalty += 8>> <<set $gold -= 15>> <<set $jobsCompletedToday = true>> <<set $jobOutcomes.push({ title: "The Disgruntled Guardsman", text: "You distribute silver to the guards. Their gratitude is measured, but the murmuring stops for now.", img: "Assets/images/jobs/guard_success.png", rewards: { loyalty: 8, gold: -15 } })>> <<goto "JobComplete">> <</link>> </div> </div> <</if>> <!-- Wood Job --> <<if $wood < 10>> <div class="job-card"> <div class="job-header"> <h4>🪵 The Freezing Carpenter</h4> <img src="Assets/images/jobs/freezing_carpenter.png" alt="Freezing Carpenter" style="width: 100px; height: 100px; object-fit: cover;"> </div> <div class="job-content"> <p><em>A carpenter with frostbitten fingers shows you his broken tools. "The last trees within reach are gone, my lord. Without wood, we can't repair the huts. People will freeze tonight. The children first."</em></p> <div class="job-rewards"> <strong>Reward:</strong> +6 Wood<br> <strong>Cost:</strong> -3 Soldiers (sent on dangerous gathering mission) </div> <<link "Send for Timber">> <<set $wood += 6>> <<set $soldiers -= 3>> <<set $jobsCompletedToday = true>> <<set $jobOutcomes.push({ title: "The Freezing Carpenter", text: "You dispatch soldiers to the haunted woods. They return with timber, but three fewer than left.", img: "Assets/images/jobs/carpenter_success.png", rewards: { wood: 6, soldiers: -3 } })>> <<goto "JobComplete">> <</link>> </div> </div> <</if>> <!-- Stone Job --> <<if $stone < 10>> <div class="job-card"> <div class="job-header"> <h4>⛰️ The Desperate Mason</h4> <img src="Assets/images/jobs/desperate_mason.png" alt="Desperate Mason" style="width: 100px; height: 100px; object-fit: cover;"> </div> <div class="job-content"> <p><em>A mason covered in stone dust points to crumbling walls. "The foundations are giving way, my lord. The next storm will bury families alive. We need stone now, even if we must quarry in the cursed mountains."</em></p> <div class="job-rewards"> <strong>Reward:</strong> +5 Stone<br> <strong>Cost:</strong> -5 Hope (the quarry is known to be haunted) </div> <<link "Quarry the Stone">> <<set $stone += 5>> <<set $hope -= 5>> <<set $jobsCompletedToday = true>> <<set $jobOutcomes.push({ title: "The Desperate Mason", text: "The masons return with stone, but they speak of whispers in the quarry and shadows that moved without men to cast them.", img: "Assets/images/jobs/mason_success.png", rewards: { stone: 5, hope: -5 } })>> <<goto "JobComplete">> <</link>> </div> </div> <</if>> <!-- Soldiers Job --> <<if $soldiers < 15>> <div class="job-card"> <div class="job-header"> <h4>⚔️ The Recruiting Sergeant</h4> <img src="Assets/images/jobs/recruiting_sergeant.png" alt="Recruiting Sergeant" style="width: 100px; height: 100px; object-fit: cover;"> </div> <div class="job-content"> <p><em>A grim sergeant gestures to the thin ranks. "We're bleeding soldiers faster than we can replace them, my lord. The desperate will fight for coin and food. They'll die quickly, but they might buy us time."</em></p> <div class="job-rewards"> <strong>Reward:</strong> +4 Soldiers<br> <strong>Cost:</strong> -10 Gold, -5 Food (for new recruits) </div> <<link "Press Gang Recruits">> <<set $soldiers += 4>> <<set $gold -= 10>> <<set $food -= 5>> <<set $jobsCompletedToday = true>> <<set $jobOutcomes.push({ title: "The Recruiting Sergeant", text: "You authorize desperate measures. The new 'recruits' are more prisoners than soldiers, but they'll hold a line if threatened enough.", img: "Assets/images/jobs/sergeant_success.png", rewards: { soldiers: 4, gold: -10, food: -5 } })>> <<goto "JobComplete">> <</link>> </div> </div> <</if>> </div> <!-- Fallback if no jobs available --> <<set _availableJobs = 0>> <<if $gold < 30>><<set _availableJobs++>><</if>> <<if $hope < 30>><<set _availableJobs++>><</if>> <<if $food < 20>><<set _availableJobs++>><</if>> <<if $loyalty < 30>><<set _availableJobs++>><</if>> <<if $wood < 10>><<set _availableJobs++>><</if>> <<if $stone < 10>><<set _availableJobs++>><</if>> <<if $soldiers < 15>><<set _availableJobs++>><</if>> <<if _availableJobs == 0>> <div class="job-card" style="text-align: center;"> <h4>🎭 Momentary Respite</h4> <p><em>For once, no desperate souls clamor for your attention. The needs of your settlement are... manageable. This peace won't last.</em></p> <p>All resources are at acceptable levels. No urgent pleas require your intervention today.</p> [[Return to Camp|Camp]] </div> <</if>> </div> <</if>> <!-- Navigation --> <div class="tavern-navigation"> <hr> [[Return to Camp|Camp]] </div> <style> .jobs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 20px; margin-top: 15px; justify-content: center; justify-items: center; } .job-card { border: 1px solid #5c2d2d; border-radius: 8px; padding: 15px; background: linear-gradient(135deg, #2a1a1a 0%, #3a2a2a 100%); box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3); width: 100%; max-width: 500px; } .job-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; border-bottom: 1px solid #5c2d2d; padding-bottom: 10px; } .job-header h4 { color: #d4af37; margin: 0; } .job-content p { font-style: italic; color: #ccc; margin: 10px 0; } .job-rewards { margin: 15px 0; padding: 10px; background: rgba(139, 69, 19, 0.2); border-radius: 4px; border-left: 4px solid #8b4513; } .job-rewards strong { color: #d4af37; } .location-header { text-align: center; margin-bottom: 20px; } .resources { text-align: center; font-size: 1.1em; margin-bottom: 20px; color: #d4af37; background: rgba(139, 69, 19, 0.1); padding: 10px; border-radius: 4px; } .tavern-section { text-align: center; } .tavern-section h3, .tavern-section p { text-align: center; } </style>
<div class="location-header"> <h2>📜 Daily Quests</h2> <p>The notice board creaks with requests for aid. Assign your soldiers to earn rewards.</p> <p><strong>Quests Remaining Today: <<print 2 - $activeQuests.length>>/2</strong></p> </div> <!-- Resources Display --> <div class="resources"> <strong>Available Soldiers: <<print $soldiers>></strong> | <strong>Gold: <<print $gold>></strong> </div> <!-- Available Quests --> <div class="tavern-section"> <h3>📋 Today's Available Quests</h3> <<if $dailyQuests.length == 0>> <p>No quests are currently available. New quests will appear tomorrow.</p> <<else>> <div class="quests-grid"> <<for _i = 0; _i < $dailyQuests.length; _i++>> <<set _quest = $dailyQuests[_i]>> <div class="quest-card"> <h4><<print _quest.title>></h4> <p><strong>Type:</strong> <<print _quest.type>></p> <p><strong>Required Soldiers:</strong> <<print _quest.soldiers>></p> <p><<print _quest.description>></p> <!-- Rewards --> <div class="quest-rewards"> <strong>Success Rewards:</strong> <<if _quest.rewardGold>>💰 <span>Gold: +<<print _quest.rewardGold>></span><<endif>> <<if _quest.rewardHope>>✨ <span>Hope: +<<print _quest.rewardHope>></span><<endif>> <<if _quest.rewardLoyalty>>❤️ <span>Loyalty: +<<print _quest.rewardLoyalty>></span><<endif>> <<if _quest.food>>🍖 <span>Food: +<<print _quest.food>></span><<endif>> <<if _quest.wood>>🪵 <span>Wood: +<<print _quest.wood>></span><<endif>> <<if _quest.stone>>⛰️ <span>Stone: +<<print _quest.stone>></span><<endif>> </div> <!-- Failure Penalties --> <div class="quest-penalties"> <strong>Failure Penalties:</strong> <<if _quest.failHope>>✨ <span>Hope: <<print _quest.failHope>></span><<endif>> <<if _quest.failLoyalty>>❤️ <span>Loyalty: <<print _quest.failLoyalty>></span><<endif>> <<if _quest.failFood>>🍖 <span>Food: <<print _quest.failFood>></span><<endif>> </div> <!-- Assign Soldiers Button --> <<if $soldiers >= _quest.soldiers && $activeQuests.length < 2>> <<link "Assign " + _quest.soldiers + " Soldiers">> <<set $soldiers -= _quest.soldiers>> <<set $activeQuests.push({ title: _quest.title, soldiers: _quest.soldiers, questData: _quest, assignedDay: $day })>> <<set $dailyQuests.splice(_i, 1)>> <<goto "QuestAssigned">> <</link>> <<elseif $activeQuests.length >= 2>> <button class="btn-disabled" disabled>Quest limit reached (2/2)</button> <<else>> <button class="btn-disabled" disabled> Need <<print _quest.soldiers - $soldiers>> more soldiers </button> <</if>> </div> <</for>> </div> <</if>> </div> <!-- Active Quests --> <div class="tavern-section"> <h3>⚔️ Currently Active Quests</h3> <<if $activeQuests.length > 0>> <div class="active-quests"> <<for _quest range $activeQuests>> <div class="active-quest"> <strong><<print _quest.title>></strong><br> <em>Assigned: <<print _quest.soldiers>> soldiers | Day: <<print _quest.assignedDay>></em> </div> <</for>> </div> <<else>> <p>No active quests. Assign soldiers to quests above.</p> <</if>> </div> <!-- Navigation --> <div class="tavern-navigation"> <hr> [[Return to Camp|Camp]] </div> <style> .quests-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 15px; margin-top: 15px; } .quest-card { border: 1px solid #8B4513; border-radius: 8px; padding: 15px; background: rgba(139, 69, 19, 0.1); } .quest-rewards { margin: 10px 0; padding: 8px; background: rgba(0, 255, 0, 0.1); border-radius: 4px; } .quest-penalties { margin: 10px 0; padding: 8px; background: rgba(255, 0, 0, 0.1); border-radius: 4px; } .quest-rewards span, .quest-penalties span { margin-right: 10px; display: inline-block; } .active-quests { display: grid; gap: 10px; } .active-quest { padding: 10px; background: rgba(212, 175, 55, 0.2); border-radius: 4px; border-left: 4px solid #D4AF37; } .btn-disabled { background: #666; color: #999; border: none; padding: 8px 15px; border-radius: 4px; cursor: not-allowed; } </style>
<div class="main-container settlement-level-<<= $settlementLevel >>"> <div class="resources"> <strong>Settlement Status:</strong><br> 🏰 Your settlement stands at: <strong><<print ["Village","Town","City"][$settlementLevel - 1]>></strong><br> 📅 Next invasion in: <strong><<print 7 - ($day % 7)>> days</strong><br> 🛡️ Defense Rating: <strong><<print $defenseRating>></strong> </div> <div class="day-display"> <h3>🏗️ SETTLEMENT UPGRADES</h3> <p>Choose an upgrade to strengthen your settlement against incoming invasions</p> </div> <!-- Core Settlement Upgrades --> <div class="grim-section"> <h4>🏰 CORE SETTLEMENT</h4> <div class="options-container"> <<if $settlementLevel < 2>> <div class="option-box"> 🏘️ [[Upgrade to Town|UpgradeSettlementTown]]<br> <small>Cost: 100 wood, 50 stone</small> </div> <</if>> <<if $settlementLevel < 3>> <div class="option-box"> 🏙️ [[Upgrade to City|UpgradeSettlementCity]]<br> <small>Cost: 200 wood, 150 stone</small> </div> <</if>> </div> </div> <!-- Building Upgrades --> <div class="grim-section"> <h4>🏛️ BUILDINGS</h4> <div class="options-container"> <<if $churchLevel == 0>> <div class="option-box"> ⛪ [[Build Church|BuildChurch]]<br> <small>Cost: 30 stone | Unlocks: Prayer & Blessings</small> </div> <<else>> <div class="option-box"> ⛪ [[Upgrade Church (Level <<print $churchLevel>>)|UpgradeChurch]]<br> <small>Next: <<print $churchLevel * 50>> stone</small> </div> <</if>> <<if $barracksLevel == 0>> <div class="option-box"> ⚔️ [[Build Barracks|BuildBarracks]]<br> <small>Cost: 50 wood, 30 stone | +5 soldiers/turn</small> </div> <<else>> <div class="option-box"> ⚔️ [[Upgrade Barracks (Level <<print $barracksLevel>>)|UpgradeBarracks]]<br> <small>Next: <<print $barracksLevel * 75>> wood, <<print $barracksLevel * 40>> stone</small> </div> <</if>> <<if $wallsLevel == 0>> <div class="option-box"> 🧱 [[Build Defensive Walls|BuildWalls]]<br> <small>Cost: 80 stone | +10 defense</small> </div> <<else>> <div class="option-box"> 🧱 [[Upgrade Walls (Level <<print $wallsLevel>>)|UpgradeWalls]]<br> <small>Next: <<print $wallsLevel * 100>> stone</small> </div> <</if>> </div> </div> <!-- Invasion Info --> <div class="actions-section"> <div class="actions-title">⚔️ INVASION SCALING SYSTEM</div> <p><strong>Current Invasion Strength Multiplier:</strong> <<print $invasionMultiplier>>x</p> <p>Invasions scale based on your settlement level and total upgrades.</p> <p><strong>Next invasion will be:</strong> <<print $nextInvasionFaction>> faction</p> </div> <div class="options-container"> <div class="option-box">[[Return to Camp|Camp]]</div> </div> </div>
<<set _blacksmithMessages = [ "Hey " + $playerName + ", what can I do for you today?", "Ah, " + $playerName + "! Busy day, huh? Need something forged?", "Welcome back, " + $playerName + ". Looking for supplies or tools?", "Good timing, " + $playerName + ". I’ve got a few new pieces ready for you." ]>> <<set _blacksmithImages = [ '<img src="Assets/Blacksmith/Idle/IDLE1.png" alt="Daughter smiling" style="max-width:400px;">', '<img src="Assets/Blacksmith/Idle/IDLE2.png" alt="Daughter at the counter" style="max-width:400px;">', '<img src="Assets/Blacksmith/Idle/IDLE3.png" alt="Daughter waving" style="max-width:400px;">', '<img src="Assets/Blacksmith/Idle/IDLE4.png" alt="Daughter thoughtful" style="max-width:400px;">' ]>> <<set _msgIndex = random(0, _blacksmithMessages.length - 1)>> <<= _blacksmithImages[_msgIndex]>> <p><<= _blacksmithMessages[_msgIndex]>></p> **Gold:** <<= $gold>> **Gifts Owned:** <<= $gifts>> --- [[Buy/Sell Goods (W.I.P)|BlacksmithShop]] [[Interact with the Blacksmith's Daughter (W.I.P)|BlacksmithInteract]] [[View Upgrades (W.I.P)|BlacksmithUpgrades]] [[Leave|Camp]]
<div class="main-container settlement-level-<<= $settlementLevel >>"> <!-- Tavern Header --> <div class="location-header"> <h2>🛡️ THE RUSTY BLADE TAVERN</h2> <p>A smoky haven where mercenaries, adventurers, and those with particular skills gather.</p> </div> <!-- Resources Display --> <div class="resources"> <strong>YOUR TREASURY: <<print $gold>> GOLD</strong> </div> <!-- Available Heroes Section --> <div class="grim-section"> <h3>🪙 AVAILABLE FOR RECRUITMENT</h3> <p>These seasoned warriors are currently in the tavern. Each has their price and unique abilities.</p> <div class="grim-heroes-grid"> <!-- Hero 1: Lyra the Veil --> <<if !$uniqueHeroes[0].recruited>> <div class="grim-hero-card"> <div class="grim-hero-content"> <div class="grim-hero-portrait"> <img src="Assets\UniqueHero\Lyra\portrait.png" alt="<<print $uniqueHeroes[0].name>>" style="max-width: 400px; max-height: 400px;"> </div> <div class="grim-hero-details"> <div class="grim-hero-info"> <h4 title="<<print $uniqueHeroes[0].name>>"><<print $uniqueHeroes[0].name>></h4> <div class="grim-hero-stats"> <p><strong>Class:</strong> <<print $uniqueHeroes[0].class>></p> <p><strong>Power:</strong> <<print $uniqueHeroes[0].power>></p> <p><strong>Gear:</strong> <<print $uniqueHeroes[0].gear>></p> </div> <p class="grim-hero-desc"><<print $uniqueHeroes[0].desc>></p> <p class="grim-cost"><strong>Recruitment Cost:</strong> <<print $uniqueHeroes[0].cost>> gold</p> </div> <div class="grim-hero-actions"> <<if $gold >= $uniqueHeroes[0].cost>> <<link "RECRUIT " + $uniqueHeroes[0].name>> <<set $gold -= $uniqueHeroes[0].cost>> <<set $uniqueHeroes[0].recruited = true>> <<set $party.push({ name: $uniqueHeroes[0].name, class: $uniqueHeroes[0].class, power: $uniqueHeroes[0].power, gear: $uniqueHeroes[0].gear, portrait: "Assets\UniqueHero\Lyra\portrait.png" })>> <<set $lastRecruitedHero = $uniqueHeroes[0].name>> <<goto "TavernRecruit">> <</link>> <<else>> <div class="grim-btn-disabled"> NEED <<print $uniqueHeroes[0].cost - $gold>> MORE GOLD </div> <</if>> </div> </div> </div> </div> <</if>> <!-- Hero 2: Kaelen the Flame --> <<if !$uniqueHeroes[1].recruited>> <div class="grim-hero-card"> <div class="grim-hero-content"> <div class="grim-hero-portrait"> <img src="Assets\UniqueHero\Kaelen\portrait.png" alt="<<print $uniqueHeroes[1].name>>" style="max-width: 400px; max-height: 400px;"> </div> <div class="grim-hero-details"> <div class="grim-hero-info"> <h4 title="<<print $uniqueHeroes[1].name>>"><<print $uniqueHeroes[1].name>></h4> <div class="grim-hero-stats"> <p><strong>Class:</strong> <<print $uniqueHeroes[1].class>></p> <p><strong>Power:</strong> <<print $uniqueHeroes[1].power>></p> <p><strong>Gear:</strong> <<print $uniqueHeroes[1].gear>></p> </div> <p class="grim-hero-desc"><<print $uniqueHeroes[1].desc>></p> <p class="grim-cost"><strong>Recruitment Cost:</strong> <<print $uniqueHeroes[1].cost>> gold</p> </div> <div class="grim-hero-actions"> <<if $gold >= $uniqueHeroes[1].cost>> <<link "RECRUIT " + $uniqueHeroes[1].name>> <<set $gold -= $uniqueHeroes[1].cost>> <<set $uniqueHeroes[1].recruited = true>> <<set $party.push({ name: $uniqueHeroes[1].name, class: $uniqueHeroes[1].class, power: $uniqueHeroes[1].power, gear: $uniqueHeroes[1].gear, portrait: "Assets\UniqueHero\Kaelen\portrait.png" })>> <<set $lastRecruitedHero = $uniqueHeroes[1].name>> <<goto "TavernRecruit">> <</link>> <<else>> <div class="grim-btn-disabled"> NEED <<print $uniqueHeroes[1].cost - $gold>> MORE GOLD </div> <</if>> </div> </div> </div> </div> <</if>> <!-- Hero 3: Selene the Light --> <<if !$uniqueHeroes[2].recruited>> <div class="grim-hero-card"> <div class="grim-hero-content"> <div class="grim-hero-portrait"> <img src="Assets\UniqueHero\Selene\portrait.png" alt="<<print $uniqueHeroes[2].name>>" style="max-width: 400px; max-height: 400px;"> </div> <div class="grim-hero-details"> <div class="grim-hero-info"> <h4 title="<<print $uniqueHeroes[2].name>>"><<print $uniqueHeroes[2].name>></h4> <div class="grim-hero-stats"> <p><strong>Class:</strong> <<print $uniqueHeroes[2].class>></p> <p><strong>Power:</strong> <<print $uniqueHeroes[2].power>></p> <p><strong>Gear:</strong> <<print $uniqueHeroes[2].gear>></p> </div> <p class="grim-hero-desc"><<print $uniqueHeroes[2].desc>></p> <p class="grim-cost"><strong>Recruitment Cost:</strong> <<print $uniqueHeroes[2].cost>> gold</p> </div> <div class="grim-hero-actions"> <<if $gold >= $uniqueHeroes[2].cost>> <<link "RECRUIT " + $uniqueHeroes[2].name>> <<set $gold -= $uniqueHeroes[2].cost>> <<set $uniqueHeroes[2].recruited = true>> <<set $party.push({ name: $uniqueHeroes[2].name, class: $uniqueHeroes[2].class, power: $uniqueHeroes[2].power, gear: $uniqueHeroes[2].gear, portrait: "Assets\UniqueHero\Selene\portrait.png" })>> <<set $lastRecruitedHero = $uniqueHeroes[2].name>> <<goto "TavernRecruit">> <</link>> <<else>> <div class="grim-btn-disabled"> NEED <<print $uniqueHeroes[2].cost - $gold>> MORE GOLD </div> <</if>> </div> </div> </div> </div> <</if>> <!-- Hero 4: Nyx the Fallen --> <<if !$uniqueHeroes[3].recruited>> <div class="grim-hero-card"> <div class="grim-hero-content"> <div class="grim-hero-portrait"> <img src="Assets\UniqueHero\Nyx\portrait.png" alt="<<print $uniqueHeroes[3].name>>" style="max-width: 400px; max-height: 400px;"> </div> <div class="grim-hero-details"> <div class="grim-hero-info"> <h4 title="<<print $uniqueHeroes[3].name>>"><<print $uniqueHeroes[3].name>></h4> <div class="grim-hero-stats"> <p><strong>Class:</strong> <<print $uniqueHeroes[3].class>></p> <p><strong>Power:</strong> <<print $uniqueHeroes[3].power>></p> <p><strong>Gear:</strong> <<print $uniqueHeroes[3].gear>></p> </div> <p class="grim-hero-desc"><<print $uniqueHeroes[3].desc>></p> <p class="grim-cost"><strong>Recruitment Cost:</strong> <<print $uniqueHeroes[3].cost>> gold</p> </div> <div class="grim-hero-actions"> <<if $gold >= $uniqueHeroes[3].cost>> <<link "RECRUIT " + $uniqueHeroes[3].name>> <<set $gold -= $uniqueHeroes[3].cost>> <<set $uniqueHeroes[3].recruited = true>> <<set $party.push({ name: $uniqueHeroes[3].name, class: $uniqueHeroes[3].class, power: $uniqueHeroes[3].power, gear: $uniqueHeroes[3].gear, portrait: "Assets\UniqueHero\Nyx\portrait.png" })>> <<set $lastRecruitedHero = $uniqueHeroes[3].name>> <<goto "TavernRecruit">> <</link>> <<else>> <div class="grim-btn-disabled"> NEED <<print $uniqueHeroes[3].cost - $gold>> MORE GOLD </div> <</if>> </div> </div> </div> </div> <</if>> <!-- Hero 5: Syndra the Storm --> <<if !$uniqueHeroes[4].recruited>> <div class="grim-hero-card"> <div class="grim-hero-content"> <div class="grim-hero-portrait"> <img src="Assets\UniqueHero\Syndra\portrait.png" alt="<<print $uniqueHeroes[4].name>>" style="max-width: 400px; max-height: 400px;"> </div> <div class="grim-hero-details"> <div class="grim-hero-info"> <h4 title="<<print $uniqueHeroes[4].name>>"><<print $uniqueHeroes[4].name>></h4> <div class="grim-hero-stats"> <p><strong>Class:</strong> <<print $uniqueHeroes[4].class>></p> <p><strong>Power:</strong> <<print $uniqueHeroes[4].power>></p> <p><strong>Gear:</strong> <<print $uniqueHeroes[4].gear>></p> </div> <p class="grim-hero-desc"><<print $uniqueHeroes[4].desc>></p> <p class="grim-cost"><strong>Recruitment Cost:</strong> <<print $uniqueHeroes[4].cost>> gold</p> </div> <div class="grim-hero-actions"> <<if $gold >= $uniqueHeroes[4].cost>> <<link "RECRUIT " + $uniqueHeroes[4].name>> <<set $gold -= $uniqueHeroes[4].cost>> <<set $uniqueHeroes[4].recruited = true>> <<set $party.push({ name: $uniqueHeroes[4].name, class: $uniqueHeroes[4].class, power: $uniqueHeroes[4].power, gear: $uniqueHeroes[4].gear, portrait: "Assets\UniqueHero\Syndra\portrait.png" })>> <<set $lastRecruitedHero = $uniqueHeroes[4].name>> <<goto "TavernRecruit">> <</link>> <<else>> <div class="grim-btn-disabled"> NEED <<print $uniqueHeroes[4].cost - $gold>> MORE GOLD </div> <</if>> </div> </div> </div> </div> <</if>> <!-- Hero 6: Elandra Whisperwind --> <<if !$uniqueHeroes[5].recruited>> <div class="grim-hero-card"> <div class="grim-hero-content"> <div class="grim-hero-portrait"> <img src="Assets\UniqueHero\Elandra\portrait.png" alt="<<print $uniqueHeroes[5].name>>" style="max-width: 400px; max-height: 400px;"> </div> <div class="grim-hero-details"> <div class="grim-hero-info"> <h4 title="<<print $uniqueHeroes[5].name>>"><<print $uniqueHeroes[5].name>></h4> <div class="grim-hero-stats"> <p><strong>Class:</strong> <<print $uniqueHeroes[5].class>></p> <p><strong>Power:</strong> <<print $uniqueHeroes[5].power>></p> <p><strong>Gear:</strong> <<print $uniqueHeroes[5].gear>></p> </div> <p class="grim-hero-desc"><<print $uniqueHeroes[5].desc>></p> <p class="grim-cost"><strong>Recruitment Cost:</strong> <<print $uniqueHeroes[5].cost>> gold</p> </div> <div class="grim-hero-actions"> <<if $gold >= $uniqueHeroes[5].cost>> <<link "RECRUIT " + $uniqueHeroes[5].name>> <<set $gold -= $uniqueHeroes[5].cost>> <<set $uniqueHeroes[5].recruited = true>> <<set $party.push({ name: $uniqueHeroes[5].name, class: $uniqueHeroes[5].class, power: $uniqueHeroes[5].power, gear: $uniqueHeroes[5].gear, portrait: "Assets\UniqueHero\Elandra\portrait.png" })>> <<set $lastRecruitedHero = $uniqueHeroes[5].name>> <<goto "TavernRecruit">> <</link>> <<else>> <div class="grim-btn-disabled"> NEED <<print $uniqueHeroes[5].cost - $gold>> MORE GOLD </div> <</if>> </div> </div> </div> </div> <</if>> </div> </div> <!-- Already Recruited Heroes --> <div class="grim-section"> <h3>✅ HEROES IN YOUR SERVICE</h3> <<set _recruitedHeroes = $uniqueHeroes.filter(hero => hero.recruited)>> <<if _recruitedHeroes.length > 0>> <div class="grim-recruited-heroes"> <<for _hero range _recruitedHeroes>> <div class="grim-recruited-hero"> <img src="<<print _hero.portrait>>" alt="<<print _hero.name>>" style="max-width: 400px; max-height: 400px;"> <span><<print _hero.name>> - <<print _hero.class>></span> </div> <</for>> </div> <<else>> <p class="grim-no-heroes">You haven't recruited any unique heroes yet.</p> <</if>> </div> <!-- Navigation --> <div class="grim-navigation"> <hr> <p>What would you like to do?</p> <div class="grim-nav-buttons"> <<link "RETURN TO CAMP">><<goto "Camp">><</link>> <<link "VIEW ASSIGNMENTS">><<goto "Assignments">><</link>> <<link "MANAGE HEROES">><<goto "Interact">><</link>> </div> </div> </div> <style> /* Clean Portrait Layout */ .grim-heroes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(600px, 1fr)); gap: 20px; margin-top: 20px; } .grim-hero-card { background: linear-gradient(135deg, #2A2A2A, #1A1A1A); border: 1px solid var(--dd-border); border-radius: 0; padding: 0; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4); transition: all 0.3s ease; height: auto; min-height: 180px; } .grim-hero-content { display: flex; height: auto; min-height: 180px; } /* Clean Portrait Area - No background/border */ .grim-hero-portrait { flex: 0 0 120px; display: flex; align-items: center; justify-content: center; padding: 20px; } .grim-hero-portrait img { width: 100px; height: 100px; object-fit: cover; border: 2px solid var(--dd-gold); box-shadow: 0 0 10px rgba(212, 175, 55, 0.3); max-width: 400px; max-height: 400px; } /* Details Area - Full utilization of space */ .grim-hero-details { flex: 1; display: flex; flex-direction: column; padding: 20px 20px 20px 0; min-height: 180px; border-left: 1px solid var(--dd-border); } .grim-hero-info h4 { color: var(--dd-gold); margin: 0 0 12px 0; border-bottom: 1px solid var(--dd-border); padding-bottom: 8px; text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8); font-size: 1.2em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .grim-hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; } .grim-hero-stats p { margin: 0; color: var(--dd-text); font-size: 0.9em; line-height: 1.3; } .grim-hero-desc { color: var(--dd-text-dim); font-size: 0.9em; line-height: 1.4; margin: 0 0 12px 0; font-style: italic; flex: 1; min-height: 40px; overflow-y: auto; padding-right: 5px; max-height: 80px; } .grim-cost { color: var(--dd-gold) !important; font-weight: bold; margin: 0 0 10px 0 !important; font-size: 1em; border-top: 1px solid var(--dd-border); padding-top: 10px; } .grim-hero-actions { margin-top: auto; } .grim-hero-actions a { display: block; background: linear-gradient(135deg, var(--dd-gold), var(--dd-gold-dark)); color: #2a1a1a; text-align: center; padding: 12px; border: none; border-radius: 0; text-decoration: none; font-weight: bold; font-family: 'Dwarven Axe BB', serif; transition: all 0.3s ease; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); font-size: 1em; } .grim-hero-actions a:hover { background: linear-gradient(135deg, #FFD700, #D4AF37); box-shadow: 0 4px 10px rgba(212, 175, 55, 0.4); transform: translateY(-1px); } .grim-btn-disabled { background: linear-gradient(135deg, #333, #555); color: #777; text-align: center; padding: 12px; border: 1px solid #444; border-radius: 0; font-weight: bold; font-family: 'Dwarven Axe BB', serif; cursor: not-allowed; font-size: 0.9em; } /* Recruited Heroes */ .grim-recruited-heroes { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 15px; } .grim-recruited-hero { display: flex; align-items: center; gap: 10px; padding: 10px 15px; background: linear-gradient(135deg, #2A2A2A, #1A1A1A); border: 1px solid var(--dd-border); border-radius: 0; min-width: 200px; } .grim-recruited-hero img { width: 40px; height: 40px; object-fit: cover; border: 1px solid var(--dd-gold); max-width: 400px; max-height: 400px; } .grim-no-heroes { text-align: center; color: var(--dd-text-dim); font-style: italic; margin: 20px 0; } /* Navigation */ .grim-navigation { text-align: center; margin-top: 30px; padding-top: 20px; border-top: 2px solid var(--dd-purple-accent); } .grim-navigation p { color: var(--dd-text-dim); margin-bottom: 15px; font-style: italic; } .grim-nav-buttons { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; } .grim-nav-buttons a { background: linear-gradient(135deg, var(--dd-stone-dark), #2A2A2A); border: 1px solid var(--dd-border); color: var(--dd-text); padding: 10px 20px; text-decoration: none; font-family: 'Dwarven Axe BB', serif; transition: all 0.3s ease; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); } .grim-nav-buttons a:hover { border-color: var(--dd-gold); box-shadow: 0 4px 10px rgba(212, 175, 55, 0.2); transform: translateY(-1px); } /* Responsive */ @media (max-width: 768px) { .grim-heroes-grid { grid-template-columns: 1fr; } .grim-hero-content { flex-direction: row; min-height: 150px; } .grim-hero-portrait { flex: 0 0 80px; padding: 15px; } .grim-hero-portrait img { width: 60px; height: 60px; } .grim-hero-details { padding: 15px 15px 15px 0; } .grim-hero-stats { grid-template-columns: 1fr; gap: 4px; } .grim-hero-desc { max-height: 60px; font-size: 0.85em; } } </style>
<<if $invasionDoneToday>> ⚔️ You have already faced today's invasion. Rest and prepare for tomorrow. <br><br> [[Back to Camp|Camp]] <<else>> <h3>Choose the invading faction</h3> <<link "Orcs & Goblins — The Grinding Horde">> <<set $invasionFaction = "Orcs & Goblins">> <<set $invasionNum = 1>> <<set $invasionDifficulty = 50>> <<goto "AssignHero">> <</link>> <br> <<link "Elves — The Eternal Weepers">> <<set $invasionFaction = "Elves">> <<set $invasionNum = 2>> <<set $invasionDifficulty = 90>> <<goto "AssignHero">> <</link>> <br> <<link "The Ossuary Empire — Bone Crafters">> <<set $invasionFaction = "Ossuary Empire">> <<set $invasionNum = 3>> <<set $invasionDifficulty = 130>> <<goto "AssignHero">> <</link>> <br> <<link "Drowned Choir — Abyssal Dwellers">> <<set $invasionFaction = "Drowned Choir">> <<set $invasionNum = 4>> <<set $invasionDifficulty = 170>> <<goto "AssignHero">> <</link>> <br> <<link "The Dark Lord — Legion of Absolute Order (Final)">> <<set $invasionFaction = "Dark Lord">> <<set $invasionNum = 5>> <<set $invasionDifficulty = 220>> <<goto "AssignHero">> <</link>> <br> [[Back to Camp|Camp]] <</if>>
:: EndDay <<goto "EndDayLogic">>
:: UpgradeSettlementTown <<if $wood >= 100 && $stone >= 50>> <<set $wood -= 100>> <<set $stone -= 50>> <<set $settlementLevel = 2>> <<set $defenseRating += 20>> <<set $invasionMultiplier += 0.3>> <!-- Bigger jump for settlement level --> <div class="main-container settlement-level-<<= $settlementLevel >>"> <div class="day-display"> <h3>🏘️ Settlement Upgraded to Town!</h3> </div> <div class="resources"> <p>Your settlement has grown into a proper town with better infrastructure!</p> <p><strong>Major Improvements:</strong></p> <ul> <li>🏘️ <strong>New Status:</strong> Your settlement is now a Town</li> <li>🛡️ <strong>Defense Rating:</strong> +20</li> <li>🏠 <strong>Expansion:</strong> More buildings and better organization</li> <li>💰 <strong>Economy:</strong> Improved trade and resource generation</li> <li>⚠️ <strong>Warning:</strong> Invasions are significantly stronger now</li> </ul> </div> <div class="options-container"> <div class="option-box">[[Continue|Upgrades]]</div> </div> </div> <<else>> <div class="main-container"> <div class="day-display"> <h3>❌ Not Enough Resources</h3> </div> <div class="resources"> <p>You need 100 wood and 50 stone to upgrade to a Town.</p> <p><strong>Missing:</strong></p> <ul> <<if $wood < 100>><li>🪵 Wood: <<print 100 - $wood>></li><</if>> <<if $stone < 50>><li>⛰️ Stone: <<print 50 - $stone>></li><</if>> </ul> </div> <div class="options-container"> <div class="option-box">[[Return to Upgrades|Upgrades]]</div> </div> </div> <</if>>
:: UpgradeSettlementCity <<if $wood >= 200 && $stone >= 150>> <<set $wood -= 200>> <<set $stone -= 150>> <<set $settlementLevel = 3>> <<set $defenseRating += 40>> <<set $invasionMultiplier += 0.5>> <!-- Biggest jump for city level --> <div class="main-container settlement-level-<<= $settlementLevel >>"> <div class="day-display"> <h3>🏙️ Settlement Upgraded to City!</h3> </div> <div class="resources"> <p>Your town has flourished into a mighty city with formidable defenses!</p> <p><strong>Major Improvements:</strong></p> <ul> <li>🏙️ <strong>New Status:</strong> Your settlement is now a City</li> <li>🛡️ <strong>Defense Rating:</strong> +40</li> <li>🏰 <strong>Fortifications:</strong> Advanced defensive structures</li> <li>⚔️ <strong>Military:</strong> Expanded military capabilities</li> <li>💰 <strong>Prosperity:</strong> Major economic growth</li> <li>⚠️ <strong>Warning:</strong> Invasions are now extremely powerful</li> </ul> </div> <div class="options-container"> <div class="option-box">[[Continue|Upgrades]]</div> </div> </div> <<else>> <div class="main-container"> <div class="day-display"> <h3>❌ Not Enough Resources</h3> </div> <div class="resources"> <p>You need 200 wood and 150 stone to upgrade to a City.</p> <p><strong>Missing:</strong></p> <ul> <<if $wood < 200>><li>🪵 Wood: <<print 200 - $wood>></li><</if>> <<if $stone < 150>><li>⛰️ Stone: <<print 150 - $stone>></li><</if>> </ul> </div> <div class="options-container"> <div class="option-box">[[Return to Upgrades|Upgrades]]</div> </div> </div> <</if>>
<<if $stone >= 30>> <<set $stone -= 30>> <<set $churchLevel = 1>> <<set $defenseRating += 5>> <<set $invasionMultiplier += 0.1>> <div class="main-container"> <div class="day-display"> <h3>⛪ Church Built!</h3> </div> <div class="resources"> <p>You have constructed a Church! Your settlers feel more hopeful.</p> <p><strong>New feature unlocked:</strong> Visit the Church for prayers and blessings</p> <p><strong>Defense Rating:</strong> +5</p> </div> <div class="options-container"> <div class="option-box">[[Continue|Upgrades]]</div> </div> </div> <<else>> <div class="main-container"> <div class="day-display"> <h3>❌ Not Enough Resources</h3> </div> <div class="resources"> <p>You need 30 stone to build a Church.</p> <p><strong>Missing:</strong> <<print 30 - $stone>> stone</p> </div> <div class="options-container"> <div class="option-box">[[Return to Upgrades|Upgrades]]</div> </div> </div> <</if>>
:: UpgradeChurch <<if $churchLevel == 1 and $stone >= 50>> <<set $stone -= 50>> <<set $churchLevel = 2>> The church is expanded with tall spires, lifting hearts higher. Hope has increased further. <<set $hope += 20>> <<elseif $churchLevel >= 2>> The church cannot be upgraded further yet. <<else>> You lack the resources to upgrade the church. <</if>> [[Return to Camp|Camp]]
:: BuildBarracks <<if $wood >= 50 && $stone >= 30>> <<set $wood -= 50>> <<set $stone -= 30>> <<set $barracksLevel = 1>> <<set $defenseRating += 5>> <<set $invasionMultiplier += 0.1>> <div class="main-container settlement-level-<<= $settlementLevel >>"> <div class="day-display"> <h3>⚔️ Barracks Constructed!</h3> </div> <div class="resources"> <p>You have built a barracks to train and house your soldiers!</p> <p><strong>Benefits:</strong></p> <ul> <li>⚔️ <strong>Soldier Training:</strong> +5 soldiers per day</li> <li>🛡️ <strong>Defense Rating:</strong> +5</li> <li>🏠 <strong>Housing:</strong> Better living conditions for troops</li> <li>⚠️ <strong>Warning:</strong> Invasions will now be slightly stronger</li> </ul> </div> <div class="options-container"> <div class="option-box">[[Continue|Upgrades]]</div> </div> </div> <<else>> <div class="main-container settlement-level-<<= $settlementLevel >>"> <div class="day-display"> <h3>❌ Not Enough Resources</h3> </div> <div class="resources"> <p>You need 50 wood and 30 stone to build barracks.</p> <p><strong>Missing:</strong></p> <ul> <<if $wood < 50>><li>🪵 Wood: <<print 50 - $wood>></li><</if>> <<if $stone < 30>><li>⛰️ Stone: <<print 30 - $stone>></li><</if>> </ul> </div> <div class="options-container"> <div class="option-box">[[Return to Upgrades|Upgrades]]</div> </div> </div> <</if>> :: UpgradeBarracks <<set _woodCost = $barracksLevel * 75>> <<set _stoneCost = $barracksLevel * 40>> <<if $wood >= _woodCost && $stone >= _stoneCost>> <<set $wood -= _woodCost>> <<set $stone -= _stoneCost>> <<set $barracksLevel += 1>> <<set $defenseRating += 8>> <!-- Higher bonus for upgrades --> <<set $invasionMultiplier += 0.15>> <!-- Slightly higher scaling for upgrades --> <div class="main-container settlement-level-<<= $settlementLevel >>"> <div class="day-display"> <h3>⚔️ Barracks Upgraded to Level <<print $barracksLevel>>!</h3> </div> <div class="resources"> <p>You have expanded and improved your military training facilities!</p> <p><strong>Improvements:</strong></p> <ul> <li>⚔️ <strong>Enhanced Training:</strong> Soldiers train more effectively</li> <li>🛡️ <strong>Defense Rating:</strong> +8</li> <li>🏹 <strong>Training Grounds:</strong> Added archery ranges and sparring areas</li> <li>🍖 <strong>Mess Hall:</strong> Improved soldier morale and health</li> <li>⚠️ <strong>Warning:</strong> Invasions continue to scale with your military strength</li> </ul> <p><strong>New Defense Rating:</strong> <<print $defenseRating>></p> </div> <div class="options-container"> <div class="option-box">[[Continue|Upgrades]]</div> </div> </div> <<else>> <div class="main-container settlement-level-<<= $settlementLevel >>"> <div class="day-display"> <h3>❌ Not Enough Resources</h3> </div> <div class="resources"> <p>You need <<print _woodCost>> wood and <<print _stoneCost>> stone to upgrade barracks to level <<print $barracksLevel + 1>>.</p> <p><strong>Missing:</strong></p> <ul> <<if $wood < _woodCost>><li>🪵 Wood: <<print _woodCost - $wood>></li><</if>> <<if $stone < _stoneCost>><li>⛰️ Stone: <<print _stoneCost - $stone>></li><</if>> </ul> </div> <div class="options-container"> <div class="option-box">[[Return to Upgrades|Upgrades]]</div> </div> </div> <</if>>
:: BuildWalls <<if $stone >= 80>> <<set $stone -= 80>> <<set $wallsLevel = 1>> <<set $defenseRating += 10>> <<set $invasionMultiplier += 0.1>> <div class="main-container settlement-level-<<= $settlementLevel >>"> <div class="day-display"> <h3>🧱 Defensive Walls Built!</h3> </div> <div class="resources"> <p>You have constructed basic defensive walls around your settlement!</p> <p><strong>Benefits:</strong></p> <ul> <li>🛡️ <strong>Defense Rating:</strong> +10</li> <li>🏰 <strong>Protection:</strong> Better protection against invasions</li> <li>⚠️ <strong>Warning:</strong> Invasions will now be slightly stronger</li> </ul> </div> <div class="options-container"> <div class="option-box">[[Continue|Upgrades]]</div> </div> </div> <<else>> <div class="main-container settlement-level-<<= $settlementLevel >>"> <div class="day-display"> <h3>❌ Not Enough Stone</h3> </div> <div class="resources"> <p>You need 80 stone to build defensive walls.</p> <p><strong>Missing:</strong> <<print 80 - $stone>> stone</p> </div> <div class="options-container"> <div class="option-box">[[Return to Upgrades|Upgrades]]</div> </div> </div> <</if>> :: UpgradeWalls <<set _upgradeCost = $wallsLevel * 100>> <<if $stone >= _upgradeCost>> <<set $stone -= _upgradeCost>> <<set $wallsLevel += 1>> <<set $defenseRating += 15>> <!-- Higher bonus for upgrades --> <<set $invasionMultiplier += 0.15>> <!-- Slightly higher scaling for upgrades --> <div class="main-container settlement-level-<<= $settlementLevel >>"> <div class="day-display"> <h3>🧱 Walls Upgraded to Level <<print $wallsLevel>>!</h3> </div> <div class="resources"> <p>You have reinforced and expanded your defensive walls!</p> <p><strong>Improvements:</strong></p> <ul> <li>🛡️ <strong>Defense Rating:</strong> +15</li> <li>🏗️ <strong>Structure:</strong> Stronger gates and taller walls</li> <li>🎯 <strong>Archer Positions:</strong> Added defensive positions</li> <li>⚠️ <strong>Warning:</strong> Invasions continue to scale with your defenses</li> </ul> <p><strong>New Defense Rating:</strong> <<print $defenseRating>></p> </div> <div class="options-container"> <div class="option-box">[[Continue|Upgrades]]</div> </div> </div> <<else>> <div class="main-container settlement-level-<<= $settlementLevel >>"> <div class="day-display"> <h3>❌ Not Enough Stone</h3> </div> <div class="resources"> <p>You need <<print _upgradeCost>> stone to upgrade walls to level <<print $wallsLevel + 1>>.</p> <p><strong>Missing:</strong> <<print _upgradeCost - $stone>> stone</p> </div> <div class="options-container"> <div class="option-box">[[Return to Upgrades|Upgrades]]</div> </div> </div> <</if>>
:: EventHope20 Crime festers in the streets. With hope so low, the people turn on one another. <<set $loyalty -= 5>> [[Continue|Camp]]
:: EventHope5 Despair grips your people. Riots break out, and corpses litter the mud. <<set $loyalty -= 10>> [[Continue|Camp]]
:: EventGold10 Broke and desperate, your army threatens to revolt. <<set $loyalty -= 10>> [[Continue|Camp]]
:: EventGold50 Your coffers grow thin. Soldiers mutter about unpaid wages. <<set $loyalty -= 5>> [[Continue|Camp]]
:: DailyEvents The day ends. Fires burn low, and the camp grows quiet... But not all is well. <<if $events.length > 0>> <<for _i = 0; _i < $events.length; _i++>> <<= $events[_i]>><br><br> <</for>> <<else>> Nothing of note happened tonight. The camp rests peacefully. <</if>> Another dawn rises — it is now **Day <<print $day>>**. [[Continue|Camp]]
<<set _q = $quest>> /* Check if enough soldiers */ <<if $soldiers >= _q.soldiers>> <<set $soldiers -= _q.soldiers>> <<set _success = random(0,1)>> <!-- coin flip --> <<if _success == 1>> <<set $gold += _q.rewardGold>> <<set $hope += (_q.rewardHope or 0)>> <img src="<<=_q.successImg>>" alt="Success"> <<= _q.successText>> **Rewards:** +<<=_q.rewardGold>> Gold, +<<= (_q.rewardHope or 0)>> Hope. <<else>> <<set $hope += (_q.failHope or 0)>> <<set $loyalty += (_q.failLoyalty or 0)>> <img src="<<=_q.failImg>>" alt="Failure"> <<= _q.failText>> **Penalties applied.** <</if>> <<else>> You don’t have enough soldiers for this quest. <</if>> [[Return to Camp|Camp]]
<div class="main-container settlement-level-<<= $settlementLevel >>"> <div class="day-display"> <h2>🎉 Success!</h2> </div> <<set _recruitedHero = $uniqueHeroes.find(h => h.name === $lastRecruitedHero)>> <<if _recruitedHero>> <div class="resources" style="text-align: center;"> <p>You have successfully recruited <strong><<print _recruitedHero.name>></strong>!</p> <p>They have joined your party and are ready for assignments.</p> </div> <div class="grim-hero-card" style="max-width: 400px; margin: 20px auto;"> <div class="grim-hero-content"> <div class="grim-hero-portrait"> <img src="<<print _recruitedHero.portrait>>" alt="<<print _recruitedHero.name>>" style="width: 150px; height: 150px; object-fit: cover; border-radius: 8px;"> </div> <div class="grim-hero-details"> <div class="grim-hero-info"> <h4><<print _recruitedHero.name>></h4> <div class="grim-hero-stats"> <p><strong>Class:</strong> <<print _recruitedHero.class>></p> <p><strong>Power:</strong> <<print _recruitedHero.power>></p> <p><strong>Gear:</strong> <<print _recruitedHero.gear>></p> </div> <p class="grim-hero-desc"><<print _recruitedHero.desc>></p> </div> </div> </div> </div> <<else>> <div class="resources" style="text-align: center;"> <p>Hero recruitment was successful!</p> </div> <</if>> <div class="options-container" style="max-width: 300px; margin: 30px auto;"> <div class="option-box">[[Return to Tavern|Tavern]]</div> <div class="option-box">[[Go to Camp|Camp]]</div> </div> </div>
<div class="resources"> <strong>Day:</strong> $day<br> <strong>💰Gold:</strong> $gold<br> <strong>🪵Wood:</strong> $wood<br> <strong>🪨Stone:</strong> $stone<br> <strong>🍖 Food:</strong> $food<br> <strong>✨Hope:</strong> $hope<br> <strong>🤝Loyalty:</strong> $loyalty<br> <strong>⚔️Soldiers:</strong> $soldiers<br> </div>
<<set _shopMessages = [ "Hey " + $playerName + ", what can I do for you today?", "Ah, " + $playerName + "! Always a pleasure to see you. Need supplies?", "Welcome back, " + $playerName + ". You look like you’ve had quite the day.", "Good timing, " + $playerName + ". I’ve set aside something special just for you." ]>> <<set _shopImages = [ '<img src="Assets/ShopKeeper/Idle/IDLE1.png" alt="Elara smiling" style="max-width:400px;">', '<img src="Assets/ShopKeeper/Idle/IDLE2.png" alt="Elara behind the counter" style="max-width:400px;">', '<img src="Assets/ShopKeeper/Idle/IDLE3.png" alt="Elara waving" style="max-width:400px;">', '<img src="Assets/ShopKeeper/Idle/IDLE4.png" alt="Elara thoughtful" style="max-width:400px;">' ]>> <<set _msgIndex = random(0, _shopMessages.length - 1)>> <<= _shopImages[_msgIndex]>> <p><<= _shopMessages[_msgIndex]>></p> **Gold:** <<= $gold>> **Gifts Owned:** <<= $gifts>> --- [[Buy/Sell Goods|ShopMenu]] [[Interact with Elara|ShopInteract]] [[Leave|Camp]]
What do you want to buy or sell? **Gold:** $<<= $gold>> • [[Buy Gifts (20 gold)|ShopBuyGifts]] • [[Buy Food (5 gold)|ShopBuyFood]] • [[Buy Wood (10 gold)|ShopBuyWood]] • [[Buy Stone (15 gold)|ShopBuyStone]] • [[Sell Gift (10 gold)|ShopSellGifts]] [[Back|shopkeeper]]
<img src="Assets/ShopKeeper/Idle/IDLE1.png" alt="Elara smiling" style="max-width:400px;"> Elara looks at you with a curious smile. Her affection: <<= $shopkeeper.relation>> [[Give Gift|ShopGift]] [[Chat|ShopChat]] <<if $shopkeeper.relation >= 20 and $shopkeeper.romanceStage == 0>> [[Ask Her Out (Date)|ShopDate]] <</if>> <<if $shopkeeper.relation >= 40 and $shopkeeper.romanceStage == 1>> [[Kiss Her|ShopKiss]] <</if>> <<if $shopkeeper.relation >= 70 and $shopkeeper.romanceStage == 2>> [[Spend the Night Together|ShopRomance]] <</if>> [[Back|shopkeeper]]
<<if $gold >= 20>> <<set $gold -= 20>> <<set $gifts += 1>> You purchase a small gift. <<else>> Not enough gold. <</if>> [[Back to Shop|ShopMenu]]
:: ShopBuyFood <<if $gold >= 5>> <<set $gold -= 5>> <<set $food += 1>> You buy some food. <<else>> Not enough gold. <</if>> [[Back to Shop|ShopMenu]]
:: ShopBuyWood <<if $gold >= 10>> <<set $gold -= 10>> <<set $wood += 1>> You buy a bundle of wood. <<else>> Not enough gold. <</if>> [[Back to Shop|ShopMenu]]
:: ShopBuyStone <<if $gold >= 15>> <<set $gold -= 15>> <<set $stone += 1>> You buy a chunk of stone. <<else>> Not enough gold. <</if>> [[Back to Shop|ShopMenu]]
<<if $gifts > 0>> <<set $gifts -= 1>> <<set $gold += 10>> You sell one of your gifts. <<else>> You have no gifts to sell. <</if>> [[Back to Shop|ShopMenu]]
:: ShopGift <<if $gifts > 0>> <<set $gifts -= 1>> <<set $shopkeeper.relation += 5>> You hand her a gift. She blushes and thanks you warmly. <<else>> You have no gifts to give. <</if>> [[Back|ShopInteract]]
:: ShopChat <<if $interactionActions > 0>> <<set $interactionActions -= 1>> <<set $shopkeeper.relation += 1>> You chat with Elara. She laughs and shares stories with you. <br><br> Interactions remaining today: <<= $interactionActions>> <<else>> Elara smiles politely, but you’ve already had all your interactions for today. You spend some time talking with Elara. She seems to enjoy your company. <</if>> [[Back|shopkeeper]]
:: ShopDate <<set $shopkeeper.romanceStage = 1>> <div class="fade scene"> You and Elara walk side by side through the village. At first, the silence is heavy — she glances at you, then quickly looks away. Every time your eyes meet, her cheeks flush a little deeper. <br><br> <img src="Assets/ShopKeeper/DateWalk.png" alt="Elara Walk" style="max-width:600px;"> </div> <<link "Continue">> <<append "#story">> <div class="fade scene"> Inside the tavern, the mood shifts. The warmth of ale and laughter surrounds you both. Elara relaxes as you trade stories, and soon she’s laughing freely — her shyness melting into playful smiles. <br><br> <img src="Assets/ShopKeeper/DateTavern.png" alt="Elara Tavern" style="max-width:600px;"> </div> <<link "Continue">> <<append "#story">> <div class="fade scene"> The night deepens. Elara shyly takes your hand as you walk back. At her door, she hesitates, her voice barely a whisper: *“Would you… like to come in?”* <br><br> <img src="Assets/ShopKeeper/DateDoor.png" alt="Elara Door" style="max-width:600px;"> </div> <<link "Continue">> <<append "#story">> <div class="fade scene"> Her room is dimly lit, carrying the faint scent of herbs and flowers. She fidgets nervously, then meets your eyes with determination. Piece by piece, she begins to undress — her shyness giving way to something deeper. <br><br> <img src="Assets/ShopKeeper/DateBedroom.png" alt="Elara Bedroom" style="max-width:600px;"> </div> <<link "Continue">> <<append "#story">> <div class="fade scene"> she gets down on the floor eagerly undressing you trying to get to your cock. the eager ness in her eyes makes you hard, then finally she pull out your cock. The sound of gasp was enough to make you decide what you wanted to do. <br><br> <img src="Assets/ShopKeeper/DateNSFW1.png" alt="Elara NSFW 1" style="max-width:600px;"> </div> <<link "Continue">> <<append "#story">> <div class="fade scene"> <!-- 🔞 Your second NSFW scene goes here --> (Placeholder for your explicit text.) <br><br> <img src="Assets/ShopKeeper/DateNSFW2.png" alt="Elara NSFW 2" style="max-width:600px;"> </div> <br> [[Return to Camp|Camp]] <</append>> <</link>> <</append>> <</link>> <</append>> <</link>> <</append>> <</link>> <</append>> <</link>>
<<set $shopkeeper.romanceStage = 2>> Elara leans closer, and your lips meet. She smiles afterwards, cheeks flushed. [[Leave|Camp]]
<<set $shopkeeper.romanceStage = 3>> That night, you and Elara share an intimate evening together, sealing your bond. [[Leave|Camp]]
Are you 18 or older? * [[Yes|NameSetup]] * [[No|TooYoung]]
Before we begin, what is your name? <<textbox "$playerName" "">> <<if $playerName isnot "">> <<else>> Please enter a name first. <</if>> <div class="options-container"> <div class="option-box option-hero"> [[Continue|A Tale Begins]]</div> </div>
Sorry, you must be 18 or older to play. Game Over.
:: HeroDebug <<link "Hire a new hero">> <<set _newHero = hireHero()>> ✅ Hired <<= _newHero.name >> (<== _newHero.class >)<br> <img src="<<=_newHero.portrait>>" style="max-width:150px;"><br><br> <</link>> <hr> <<for _h range $party>> <b>Name:</b> <<= _h.name >> (<<= _h.class >>)<br> <b>Pack:</b> <<= _h.packId >><br> <img src="<<=_h.portrait>>" style="max-width:150px;"><br> <b>Location:</b> <<= _h.location >><br><br> <</for>> :: PartyDebug <pre><<print JSON.stringify($party, null, 2)>></pre> <<if $party.length == 0>> You have no party members. <<else>> <b>Party count:</b> <<= $party.length>><br> <<for _h range $party>> • <<= _h.name >> — <<= _h.class >> — location: <<= _h.location >> — busy: <<= _h.busy ? "yes" : "no" >><br> <</for>> <</if>> <<for _h range $party>> <b>Name:</b> <<= _h.name >> (<== _h.class >)<br> <b>Pack:</b> <<= _h.packId >><br> <img src="<<=_h.portrait>>" style="max-width:150px;"><br> <b>Location:</b> <<= _h.location >><br><br> <</for>>
:: HeroPacks /* Female Names */ <<set $firstNames = [ "Selene","Alina","Lyra","Seraphina","Kaela", "Isolde","Nerissa","Elara","Veyra","Lilith", "Aurora","Sylvara","Morrigan","Thalia","Nyx", "Fiora","Ravena","Elandra","Kallista","Zyra" ]>> /* Hero Titles */ <<set $titles = [ "the Blade","the Witch","the Fallen","the Seer","the Wanderer", "the Storm","the Silent","the Shadow","the Moonkissed","the Cursed", "the Flame","the Iron Maiden","the Dread","the Veil","the Tempest", "the Bloodrose","the Pale","the Enchantress","the Dreamer","the Forsaken" ]>> /* Hero Classes */ <<set $classes = [ "Tank", "Healer", "Assassin", "Mage", "Druid", "Ranger" ]>> /* Example Hero Pack */ <<set $heroPacks = [ { id: "pack1", portrait: "Assets/heropacks/images/pack1/portrait.png", jobs: [ "Assets/heropacks/images/pack1/jobs/job1.png", "Assets/heropacks/images/pack1/jobs/job2.png", "Assets/heropacks/images/pack1/jobs/job3.png", "Assets/heropacks/images/pack1/jobs/job4.png", "Assets/heropacks/images/pack1/jobs/job5.png", "Assets/heropacks/images/pack1/jobs/job6.png", "Assets/heropacks/images/pack1/jobs/job7.png" ], brothel: [ "Assets/heropacks/images/pack1/brothel/brothel1.png", "Assets/heropacks/images/pack1/brothel/brothel2.png", "Assets/heropacks/images/pack1/brothel/brothel3.png", "Assets/heropacks/images/pack1/brothel/brothel4.png", "Assets/heropacks/images/pack1/brothel/brothel5.png" ], romance: [ "Assets/heropacks/images/pack1/romance/romance1.png", "Assets/heropacks/images/pack1/romance/romance2.png", "Assets/heropacks/images/pack1/romance/romance3.png" ], assignments: { assignment1: { success: "Assets/heropacks/images/pack1/assignments/assignment1_success.png", fail: "Assets/heropacks/images/pack1/assignments/assignment1_fail.png" }, assignment2: { success: "Assets/heropacks/images/pack1/assignments/assignment2_success.png", fail: "Assets/heropacks/images/pack1/assignments/assignment2_fail.png" }, assignment3: { success: "Assets/heropacks/images/pack1/assignments/assignment3_success.png", fail: "Assets/heropacks/images/pack1/assignments/assignment3_fail.png" }, assignment4: { success: "Assets/heropacks/images/pack1/assignments/assignment4_success.png", fail: "Assets/heropacks/images/pack1/assignments/assignment4_fail.png" }, assignment5: { success: "Assets/heropacks/images/pack1/assignments/assignment5_success.png", fail: "Assets/heropacks/images/pack1/assignments/assignment5_fail.png" } }, invasions: { invasion1: { success: "Assets/heropacks/images/pack1/invasions/invasion1_success.png", fail: "Assets/heropacks/images/pack1/invasions/invasion1_fail.png" }, invasion2: { success: "Assets/heropacks/images/pack1/invasions/invasion2_success.png", fail: "Assets/heropacks/images/pack1/invasions/invasion2_fail.png" }, invasion3: { success: "Assets/heropacks/images/pack1/invasions/invasion3_success.png", fail: "Assets/heropacks/images/pack1/invasions/invasion3_fail.png" }, invasion4: { success: "Assets/heropacks/images/pack1/invasions/invasion4_success.png", fail: "Assets/heropacks/images/pack1/invasions/invasion4_fail.png" }, invasion5: { success: "Assets/heropacks/images/pack1/invasions/invasion5_success.png", fail: "Assets/heropacks/images/pack1/invasions/invasion5_fail.png" }, invasion6: { success: "Assets/heropacks/images/pack1/invasions/invasion6_success.png", fail: "Assets/heropacks/images/pack1/invasions/invasion6_fail.png" } } } ]>>
:: EndDayDebug <<script>> /* Run EndDay logic inside a try/catch and store debugging info into $enddayLog / $enddayError */ (function () { State.variables.enddayLog = []; State.variables.enddayError = null; try { /* Day increment */ State.variables.day = (State.variables.day || 0) + 1; State.variables.enddayLog.push("Step: increment day -> " + State.variables.day); /* Ensure collections exist */ if (!Array.isArray(State.variables.party)) { State.variables.enddayLog.push("Info: $party missing; creating empty array"); State.variables.party = []; } else { State.variables.enddayLog.push("$party length = " + State.variables.party.length); } if (!Array.isArray(State.variables.jobs)) { State.variables.enddayLog.push("Info: $jobs missing; creating empty array"); State.variables.jobs = []; } else { State.variables.enddayLog.push("$jobs length = " + State.variables.jobs.length); } if (!Array.isArray(State.variables.randomEvents)) { State.variables.enddayLog.push("Info: $randomEvents missing; creating empty array"); State.variables.randomEvents = []; } else { State.variables.enddayLog.push("$randomEvents length = " + State.variables.randomEvents.length); } /* Prepare job reports array */ State.variables.jobReports = []; /* Resolve jobs for each party member (JS loop for safety) */ State.variables.party.forEach(function (h, idx) { State.variables.enddayLog.push("Inspect party[" + idx + "]: " + (h ? h.name : "NULL")); if (h && h.busy) { /* Find job by id safely */ var job = null; for (var i = 0; i < State.variables.jobs.length; i++) { if (State.variables.jobs[i].id === h.currentJob) { job = State.variables.jobs[i]; break; } } var desc = "", jobName = ""; if (!job) { desc = "The assignment was strange and unrecorded."; jobName = h.currentJob || "Unknown Task"; State.variables.enddayLog.push("Warning: job not found for " + h.name + " (currentJob: " + h.currentJob + ")"); } else { /* pick a description */ if (Array.isArray(job.desc) && job.desc.length) { desc = job.desc[Math.floor(Math.random() * job.desc.length)]; } else { desc = "Task completed."; } jobName = job.name || "Unnamed Job"; /* Apply rewards safely */ State.variables.gold = (State.variables.gold || 0) + (job.rewards && job.rewards.gold ? job.rewards.gold : 0); State.variables.hope = (State.variables.hope || 0) + (job.rewards && job.rewards.hope ? job.rewards.hope : 0); State.variables.loyalty = (State.variables.loyalty || 0) + (job.rewards && job.rewards.loyalty ? job.rewards.loyalty : 0); State.variables.soldiers = (State.variables.soldiers || 0) + (job.rewards && job.rewards.soldiers ? job.rewards.soldiers : 0); State.variables.enddayLog.push("Applied rewards for " + h.name + " from job " + jobName); } /* Choose job image from hero pack jobs array if available, otherwise portrait */ var img = h && h.portrait ? h.portrait : ""; if (job && typeof job.imgIndex !== "undefined" && Array.isArray(h.jobs) && h.jobs[job.imgIndex]) { img = h.jobs[job.imgIndex]; } State.variables.jobReports.push({ hero: h ? h.name : "Unknown", jobName: jobName, text: desc, img: img }); /* free the hero */ if (h) { h.busy = false; delete h.currentJob; } State.variables.enddayLog.push("Processed job for " + (h ? h.name : "unknown")); } }); State.variables.enddayLog.push("Job reports generated: " + State.variables.jobReports.length); /* Re-generate tavern offers (simplified) */ State.variables.tavernHeroes = []; for (var t = 0; t < 3; t++) { var pack = Array.isArray(State.variables.heroPacks) && State.variables.heroPacks.length ? State.variables.heroPacks[Math.floor(Math.random() * State.variables.heroPacks.length)] : null; var fname = Array.isArray(State.variables.firstNames) && State.variables.firstNames.length ? State.variables.firstNames[Math.floor(Math.random() * State.variables.firstNames.length)] : "Anon"; var title = Array.isArray(State.variables.titles) && State.variables.titles.length ? State.variables.titles[Math.floor(Math.random() * State.variables.titles.length)] : ""; var name = fname + " " + title; var cost = 20 + Math.floor(Math.random() * 100); var jobImg = pack && Array.isArray(pack.jobs) && pack.jobs.length ? pack.jobs[Math.floor(Math.random() * pack.jobs.length)] : ""; var bImg = pack && Array.isArray(pack.brothel) && pack.brothel.length ? pack.brothel[Math.floor(Math.random() * pack.brothel.length)] : ""; var rImg = pack && Array.isArray(pack.romance) && pack.romance.length ? pack.romance[Math.floor(Math.random() * pack.romance.length)] : ""; State.variables.tavernHeroes.push({ name: name, cost: cost, desc: "A wandering soul", pack: pack, currentJobImg: jobImg, currentBrothelImg: bImg, currentRomanceImg: rImg }); } State.variables.enddayLog.push("Tavern regenerated: " + State.variables.tavernHeroes.length + " offers"); /* basic upkeep (keep simple while debugging) */ State.variables.food = (State.variables.food || 0) - (State.variables.soldiers || 0); if (State.variables.food < 0) { State.variables.hope = (State.variables.hope || 0) - 5; State.variables.loyalty = (State.variables.loyalty || 0) - 5; State.variables.food = 0; State.variables.enddayLog.push("Food shortage applied"); } /* done */ State.variables.enddayLog.push("EndDay successful."); } catch (err) { State.variables.enddayError = String(err) + (err && err.stack ? ("\n" + err.stack) : ""); State.variables.enddayLog.push("Exception thrown: " + String(err)); } })(); <</script>> <h2>Day <<= $day >></h2> <h3>Debug log</h3> <pre style="white-space:pre-wrap;"><<print JSON.stringify($enddayLog, null, 2)>></pre> <<if $enddayError>> <h3 style="color:red">Runtime Error Caught</h3> <pre style="white-space:pre-wrap;"><<print $enddayError>></pre> <</if>> <h3>Job reports</h3> <<if $jobReports.length > 0>> <<for _r range $jobReports>> <b><<= _r.hero >></b> — <<= _r.jobName >><br> <<= _r.text >><br> <<if _r.img>><img src="<<=_r.img>>" style="max-width:220px;"><br><br><</if>> <</for>> <<else>> <p>No jobs were completed today.</p> <</if>> [[Continue|Camp]]
<<set $day += 1>> /* Reset brothel flags */ <<set $brothelHeroUsed = false>> <<set $brothelHopeUsed = false>> /* Reset actions */ <<set $interactionActions = 3>> <<set $assignmentActions = 5>> <<set $invasionDoneToday = false>> /* Make sure arrays exist */ <<if !$party>><<set $party = []>><</if>> <<if !$jobs>><<set $jobs = []>><</if>> <<if !$randomEvents>><<set $randomEvents = []>><</if>> /* Process hero assignments */ <<set $assignmentReports = []>> <<if $assignmentResults>> <<for _result range $assignmentResults>> <<set $assignmentReports.push(_result)>> <</for>> <<set $assignmentResults = []>> <</if>> /* Generate soldiers from barracks */ <<if $barracksLevel > 0>> <<set _soldiersGenerated = $barracksLevel * 5>> <<set $soldiers += _soldiersGenerated>> <<set $events.push("⚔️ Barracks training produced " + _soldiersGenerated + " new soldiers")>> <</if>> /* Reset quest reports */ <<set $questRewards = []>> /* Process Active Quests */ <<for _i = $activeQuests.length - 1; _i >= 0; _i-->> <<set _quest = $activeQuests[_i]>> <<set _success = random(1, 100) <= 75>> /* 75% base success chance */ /* Adjust success chance based on soldiers assigned vs required */ <<if _quest.soldiers > _quest.questData.soldiers>> <<set _success = random(1, 100) <= 85>> /* Bonus for extra soldiers */ <<elseif _quest.soldiers < _quest.questData.soldiers>> <<set _success = random(1, 100) <= 60>> /* Penalty for insufficient soldiers */ <</if>> <<if _success>> /* Quest Success */ <<set $gold += (_quest.questData.rewardGold || 0)>> <<set $hope += (_quest.questData.rewardHope || 0)>> <<set $loyalty += (_quest.questData.rewardLoyalty || 0)>> <<set $food += (_quest.questData.food || 0)>> <<set $wood += (_quest.questData.wood || 0)>> <<set $stone += (_quest.questData.stone || 0)>> /* Return soldiers plus potential recruits */ <<set $soldiers += _quest.soldiers>> <<if random(1, 100) <= 30>> /* 30% chance to gain recruits */ <<set _newRecruits = Math.max(1, Math.floor(_quest.soldiers / 3))>> <<set $soldiers += _newRecruits>> <<set _recruitText = " Gained " + _newRecruits + " new recruits!">> <<else>> <<set _recruitText = "">> <</if>> <<set $questRewards.push({ title: _quest.title, success: true, text: _quest.questData.successText + _recruitText, img: _quest.questData.successImg, rewards: { gold: _quest.questData.rewardGold || 0, hope: _quest.questData.rewardHope || 0, loyalty: _quest.questData.rewardLoyalty || 0, food: _quest.questData.food || 0, wood: _quest.questData.wood || 0, stone: _quest.questData.stone || 0, soldiers: _newRecruits || 0 } })>> <<else>> /* Quest Failure */ <<set $hope += (_quest.questData.failHope || 0)>> <<set $loyalty += (_quest.questData.failLoyalty || 0)>> <<set $food += (_quest.questData.failFood || 0)>> /* Soldier casualties */ <<set _casualties = Math.max(1, Math.floor(_quest.soldiers * 0.3))>> /* 30% casualties */ <<set $soldiers += (_quest.soldiers - _casualties)>> <<set $questRewards.push({ title: _quest.title, success: false, text: _quest.questData.failText + " Lost " + _casualties + " soldiers.", img: _quest.questData.failImg, penalties: { hope: _quest.questData.failHope || 0, loyalty: _quest.questData.failLoyalty || 0, food: _quest.questData.failFood || 0, soldiers: _casualties } })>> <</if>> /* Remove from active quests */ <<set $activeQuests.splice(_i, 1)>> <</for>> /* Generate New Daily Quests (3 random quests each day) */ <<set $dailyQuests = []>> <<for _i = 0; _i < 3; _i++>> <<set _randomQuest = $quests[random(0, $quests.length - 1)]>> <<set $dailyQuests.push({ title: _randomQuest.title, type: _randomQuest.type, soldiers: _randomQuest.soldiers, description: "A " + _randomQuest.type + " mission requiring " + _randomQuest.soldiers + " soldiers.", rewardGold: _randomQuest.rewardGold, rewardHope: _randomQuest.rewardHope, rewardLoyalty: _randomQuest.rewardLoyalty, food: _randomQuest.food, wood: _randomQuest.wood, stone: _randomQuest.stone, failHope: _randomQuest.failHope, failLoyalty: _randomQuest.failLoyalty, failFood: _randomQuest.failFood, successText: _randomQuest.successText, failText: _randomQuest.failText, successImg: _randomQuest.successImg, failImg: _randomQuest.failImg })>> <</for>> /* Process Jobs (your existing job system) */ <<set $jobReports = []>> <<for _h range $party>> <<if _h.busy>> <<set _job = $jobs.filter(j => j.id == _h.currentJob)[0]>> <<set _desc = _job ? _job.desc[random(0, _job.desc.length - 1)] : "The assignment was strange and unrecorded.">> /* Apply rewards */ <<if _job>> <<set $gold += (_job.rewards.gold || 0)>> <<set $hope += (_job.rewards.hope || 0)>> <<set $loyalty += (_job.rewards.loyalty || 0)>> <<set $soldiers += (_job.rewards.soldiers || 0)>> <</if>> /* Pick image */ <<set _img = (_h.jobs && _job) ? _h.jobs[random(0,_h.jobs.length-1)] : _h.portrait>> <<set $jobReports.push({ hero: _h.name, jobName: _job ? _job.name : _h.currentJob, text: _desc, img: _img })>> /* Free hero */ <<set _h.busy = false>> <<unset _h.currentJob>> <</if>> <</for>> /* Reset tavern heroes */ <<set $tavernHeroes = []>> <<for _i = 0; _i < 3; _i++>> <<set _pack = $heroPacks[random(0,$heroPacks.length-1)]>> <<set _name = $firstNames[random(0,$firstNames.length-1)] + " " + $titles[random(0,$titles.length-1)]>> <<set _cost = 20 + random(0,100)>> <<set $tavernHeroes.push({ name:_name, cost:_cost, desc:"A wandering soul with uncertain loyalties.", pack:_pack })>> <</for>> /* Food upkeep */ <<set $food -= $soldiers>> <<if $food < 0>> <<set $hope -= 5>> <<set $loyalty -= 5>> <<set $food = 0>> <</if>> /* Events */ <<set $events = []>> <<if $hope < 5>> <<set $loyalty -= 10>> <<set $events.push("Despair grips your people. Riots break out, and corpses litter the mud. Loyalty -10")>> <<elseif $hope < 20>> <<set $loyalty -= 5>> <<set $events.push("Crime festers in the streets. With hope so low, the people turn on one another. Loyalty -5")>> <</if>> <<if $gold < 10>> <<set $loyalty -= 10>> <<set $events.push("Broke and desperate, your army threatens to revolt. Loyalty -10")>> <<elseif $gold < 50>> <<set $loyalty -= 5>> <<set $events.push("Your coffers grow thin. Soldiers mutter about unpaid wages. Loyalty -5")>> <</if>> /* Random event chance */ <<if random(0,100) < 30>> <<set _event = $randomEvents[random(0, $randomEvents.length - 1)]>> <<set $hope += _event.hope>> <<set $loyalty += _event.loyalty>> <<set $gold += _event.gold>> <<set $food += _event.food>> <<set $soldiers += _event.soldiers>> <<set $events.push("<br><b>" + _event.title + "</b><br>" + _event.text)>> <</if>> /* Reset job system for new day */ <<set $jobsCompletedToday = false>> <<set $jobOutcomes = []>> /* Free busy heroes at end of day */ <<for _h range $party>> <<if _h.busy>> <<set _h.busy = false>> <</if>> <</for>> <<goto "EndDayDisplay">>
:: EndDayDisplay <!-- Events First --> <<if $events and $events.length > 0>> <div class="actions-section"> <h3>📢 Daily Events</h3> <<for _e range $events>> <<= _e >><br><br> <</for>> </div> <</if>> <!-- Quest Results Second --> <<if $questRewards.length > 0>> <div class="actions-section"> <h3>📜 Quest Reports</h3> <<for _report range $questRewards>> <div class="quest-report <<if _report.success>>quest-success<<else>>quest-failure<</if>>"> <h4><<print _report.title>></h4> <<if _report.success>> <p style="color: green;">✅ <strong>Success!</strong></p> <p><<print _report.text>></p> <div class="rewards"> <<if _report.rewards.gold>>💰 <strong>Gold:</strong> +<<print _report.rewards.gold>><<endif>> <<if _report.rewards.hope>> ✨ <strong>Hope:</strong> +<<print _report.rewards.hope>><<endif>> <<if _report.rewards.loyalty>> ❤️ <strong>Loyalty:</strong> +<<print _report.rewards.loyalty>><<endif>> <<if _report.rewards.food>> 🍖 <strong>Food:</strong> +<<print _report.rewards.food>><<endif>> <<if _report.rewards.wood>> 🪵 <strong>Wood:</strong> +<<print _report.rewards.wood>><<endif>> <<if _report.rewards.stone>> ⛰️ <strong>Stone:</strong> +<<print _report.rewards.stone>><<endif>> <<if _report.rewards.soldiers>> ⚔️ <strong>Recruits:</strong> +<<print _report.rewards.soldiers>><<endif>> </div> <<else>> <p style="color: red;">❌ <strong>Failed!</strong></p> <p><<print _report.text>></p> <div class="penalties"> <<if _report.penalties.hope>>✨ <strong>Hope:</strong> <<print _report.penalties.hope>><<endif>> <<if _report.penalties.loyalty>> ❤️ <strong>Loyalty:</strong> <<print _report.penalties.loyalty>><<endif>> <<if _report.penalties.food>> 🍖 <strong>Food:</strong> <<print _report.penalties.food>><<endif>> <<if _report.penalties.soldiers>> ⚔️ <strong>Casualties:</strong> <<print _report.penalties.soldiers>><<endif>> </div> <</if>> <<if _report.img>> <img src="<<print _report.img>>" style="max-width: 300px; margin: 10px 0;"><br> <</if>> </div> <hr> <</for>> </div> <<else>> <p>No quests were completed today.</p> <</if>> <!-- Job Reports Third --> <<if $jobReports and $jobReports.length > 0>> <div class="actions-section"> <h3>💼 Job Reports</h3> <<for _r range $jobReports>> <b><<= _r.hero >></b> — <<= _r.jobName >><br> <<= _r.text >><br> <<if _r.img>> <img src="<<=_r.img>>" style="max-width:220px;"><br><br> <</if>> <</for>> </div> <</if>> <!-- Invasion Results --> <<if $invasionDoneToday>> <div class="actions-section" style="border-color: #8B0000;"> <h3>⚔️ Invasion Battle Results</h3> <<if _victory>> <p style="color: green;"><strong>🎉 VICTORY!</strong> You successfully defended against the <<print $currentInvasion.faction>>!</p> <<else>> <p style="color: red;"><strong>💀 DEFEAT</strong> The <<print $currentInvasion.faction>> has damaged your settlement!</p> <</if>> <p><strong>Enemy Strength:</strong> <<print $currentInvasion.strength>> | <strong>Your Defense:</strong> <<print _totalDefense>></p> </div> <</if>> <!-- Assignment Results --> <<if $assignmentReports.length > 0>> <div class="actions-section"> <h3>🕵️♂️ Assignment Reports</h3> <<for _report range $assignmentReports>> <div class="quest-report <<if _report.success>>quest-success<<else>>quest-failure<</if>>"> <h4><<print _report.hero>> - <<print _report.mission>></h4> <<if _report.situationalImage>> <img src="<<print _report.situationalImage>>" alt="<<print _report.hero>>'s Mission" style="max-width: 400px; border: 2px solid var(--gold-primary); margin: 10px 0;"> <</if>> <<if _report.success>> <p style="color: green;">✅ <strong>Success!</strong></p> <p><<print _report.story>></p> <div class="rewards"> <<if _report.gold>>💰 <strong>Gold:</strong> +<<print _report.gold>><<endif>> <<if _report.hope>> ✨ <strong>Hope:</strong> +<<print _report.hope>><<endif>> <<if _report.loyalty>> ❤️ <strong>Loyalty:</strong> +<<print _report.loyalty>><<endif>> </div> <<else>> <p style="color: red;">❌ <strong>Failed!</strong></p> <p><<print _report.story>></p> <div class="penalties"> <<if _report.hope>>✨ <strong>Hope:</strong> <<print _report.hope>><<endif>> </div> <</if>> </div> <hr> <</for>> </div> <<endif>> [[Continue|Camp]] <style> .actions-section { margin: 20px 0; padding: 15px; border: 1px solid #8B4513; border-radius: 8px; background: rgba(139, 69, 19, 0.1); } .quest-report { margin: 15px 0; padding: 15px; border-radius: 8px; } .quest-success { border: 2px solid green; background: rgba(0, 255, 0, 0.1); } .quest-failure { border: 2px solid red; background: rgba(255, 0, 0, 0.1); } .rewards, .penalties { margin: 10px 0; padding: 8px; border-radius: 4px; } .rewards { background: rgba(0, 255, 0, 0.2); } .penalties { background: rgba(255, 0, 0, 0.2); } </style>
:: PartyDebug <h3>Debug</h3> <p><b>selected index:</b> <<= $selectedTavernIndex >></p> <pre><<print JSON.stringify($tavernHeroes, null, 2)>></pre> <pre><<print JSON.stringify($party, null, 2)>></pre> [[Back|Camp]]
:: BlacksmithChat <<if $interactionActions > 0>> <<set $interactionActions -= 1>> <<set $blacksmith.relation += 1>> You chat with the blacksmith. He wipes the soot from his brow and tells you tales of war, steel, and fire. <br><br> Interactions remaining today: <<= $interactionActions>> <<else>> The blacksmith grunts, polishing a blade. “You’ve taken enough of my time today. Come back tomorrow if you want more stories.” <</if>> [[Back|BlacksmithInteract]]
:: RandomEventsDebug <<if $randomEvents.length == 0>> ❌ No random events loaded. <<else>> ✅ Loaded random events: <<= $randomEvents.length>> <br><br> <<for _event range $randomEvents>> <hr> <b>Title:</b> <<= _event.title>><br> <b>Text:</b> <<= _event.text>><br> <b>Hope:</b> <<= _event.hope>><br> <b>Loyalty:</b> <<= _event.loyalty>><br> <b>Gold:</b> <<= _event.gold>><br> <b>Food:</b> <<= _event.food>><br> <b>Soldiers:</b> <<= _event.soldiers>><br> <b>Image:</b><br> <<= '<img src="' + _event.img + '" style="max-width:200px;">'>><br><br> <</for>> <</if>>
: AssignHero <<if !$invasionFaction>> <<set $invasionFaction = "Unknown">> <<set $invasionNum = 1>> <<set $invasionDifficulty = 50>> <</if>> <h2>⚔️ Prepare for Invasion: <<= $invasionFaction>></h2> <<if !$party || $party.length == 0>> <div class="error-message"> <h3>❌ No Heroes Available</h3> <p>You have no recruited heroes in your party. Visit the tavern to recruit heroes first.</p> [[Visit Tavern|Tavern]] | [[Back to Camp|Camp]] </div> <<else>> <div class="invasion-instructions"> <h3>Choose Your Champion</h3> <p>Select one hero to lead the defense against the <<= $invasionFaction>>. The chosen hero will be unavailable until tomorrow.</p> </div> <<set _availableHeroes = 0>> <<for _i = 0; _i < $party.length; _i++>> <<set _h = $party[_i]>> <<if _h && _h.name>> <!-- Basic check for valid hero object --> <div class="hero-selection-card"> <div class="hero-header"> <<if _h.portrait>> <img src="<<= _h.portrait>>" class="hero-portrait" alt="<<= _h.name>>"> <</if>> <div class="hero-info"> <h4><<= _h.name>></h4> <p class="hero-class"><<= _h.class || "Adventurer">></p> <p class="hero-stats"> ⚔️ Power: <<= _h.power || 50>> | 🛡️ Gear: <<= _h.gear || "Basic">> </p> </div> </div> <<if _h.busy>> <div class="hero-status busy"> ⏳ Currently assigned to other duties </div> <<else>> <<set _availableHeroes++>> <div class="hero-actions"> <<link "Send <<= _h.name>> to Battle">> /* Ensure hero object has all required properties */ <<set $party[_i] = { name: _h.name, class: _h.class || "Adventurer", power: _h.power || 50, gear: _h.gear || "Basic", portrait: _h.portrait || "", busy: true, currentMission: "Invasion against " + $invasionFaction, missionDay: $day, invasions: _h.invasions || {} }>> /* Store the hero index for the invasion resolution */ <<set $selectedHeroIndex = _i>> /* Go to the invasion resolution */ <<goto "ResolveInvasion">> <</link>> </div> <</if>> </div> <</if>> <</for>> <<if _availableHeroes == 0>> <div class="no-heroes-available"> <h3>⏳ All Heroes Are Busy</h3> <p>Every hero in your party is currently assigned to other missions or duties.</p> <p>Heroes become available again after you end the current day.</p> [[End Day|EndDay]] | [[Back to Camp|Camp]] </div> <</if>> <div class="navigation"> [[Back to Invasion Selection|Invasion]] | [[Back to Camp|Camp]] </div> <</if>> <style> .error-message { text-align: center; padding: 20px; background: rgba(244, 67, 54, 0.1); border: 1px solid #f44336; border-radius: 8px; margin: 20px 0; } .invasion-instructions { text-align: center; margin: 20px 0; padding: 15px; background: rgba(139, 69, 19, 0.1); border-radius: 8px; } .hero-selection-card { border: 1px solid #8B4513; border-radius: 8px; padding: 15px; margin: 15px 0; background: linear-gradient(135deg, #2a1a1a 0%, #3a2a2a 100%); } .hero-header { display: flex; align-items: center; gap: 15px; margin-bottom: 10px; } .hero-portrait { width: 80px; height: 80px; object-fit: cover; border-radius: 4px; border: 2px solid #D4AF37; } .hero-info h4 { color: #D4AF37; margin: 0 0 5px 0; } .hero-class { color: #ccc; font-style: italic; margin: 0; } .hero-stats { color: #aaa; font-size: 0.9em; margin: 5px 0 0 0; } .hero-status { padding: 8px; text-align: center; border-radius: 4px; margin: 10px 0; } .hero-status.busy { background: rgba(255, 193, 7, 0.2); border: 1px solid #FFC107; color: #FFC107; } .hero-actions { text-align: center; margin: 10px 0; } .hero-actions a { display: inline-block; background: linear-gradient(135deg, #D4AF37 0%, #FFD700 100%); color: #2a1a1a; padding: 10px 20px; border-radius: 4px; text-decoration: none; font-weight: bold; border: none; cursor: pointer; } .hero-actions a:hover { background: linear-gradient(135deg, #FFD700 0%, #FFF8DC 100%); } .no-heroes-available { text-align: center; padding: 20px; background: rgba(255, 193, 7, 0.1); border: 1px solid #FFC107; border-radius: 8px; margin: 20px 0; } .navigation { text-align: center; margin-top: 30px; padding-top: 20px; border-top: 1px solid #8B4513; } .navigation a { display: inline-block; margin: 0 10px; padding: 8px 16px; background: #8B4513; color: white; text-decoration: none; border-radius: 4px; } </style>
:: ResolveInvasion <<if $selectedHeroIndex === undefined || !$party[$selectedHeroIndex]>> ❌ No hero selected or hero not found. Go back and pick a hero. <br><br> [[Back|AssignHero]] <<else>> /* Prevent double attempts in same day */ <<if $invasionDoneToday>> ⚔️ An invasion has already been attempted today. Wait until tomorrow. <br><br> [[Back to Camp|Camp]] <<else>> /* Ensure hero object is properly initialized */ <<set _hero = $party[$selectedHeroIndex]>> <<set _hero = { name: _hero.name || "Unknown Hero", class: _hero.class || "Adventurer", power: _hero.power || 50, portrait: _hero.portrait || "", invasions: _hero.invasions || {}, busy: _hero.busy || false }>> <<set $party[$selectedHeroIndex] = _hero>> <<set _invKey = "invasion" + ($invasionNum ? $invasionNum : 1)>> /* compute hero power safely (fallbacks) */ <<set _heroBase = _hero.power || 0>> <<set _heroPower = _heroBase + (typeof $soldiers === "number" ? Math.min($soldiers, 20) : 0) + (typeof $hope === "number" ? Math.min($hope, 30) : 0)>> <<set _enemyPower = $invasionDifficulty || 50>> <div class="invasion-header"> <h2>⚔️ The <<= $invasionFaction>> Approaches!</h2> <p><strong><<= _hero.name>> the <<= _hero.class>></strong> stands ready to face the horde...</p> </div> /* Probability — keep a chance to fail even when strong */ <<set _winProb = (_heroPower / (_heroPower + _enemyPower))>> <<if _winProb < 0.10>><<set _winProb = 0.10>><</if>> <<if _winProb > 0.90>><<set _winProb = 0.90>><</if>> <<set _roll = random(0,99)>> <<if _roll < _winProb * 100>> <div class="victory-section"> <h3 style="color: #4CAF50;">✅ Victory!</h3> <p><em>Through blood and steel, <<= _hero.name>> has prevailed against the <<= $invasionFaction>>. The enemy retreats, leaving their dead behind.</em></p> /* rewards scaling */ <<set _goldGain = Math.max(25, Math.floor(_enemyPower * 2))>> <<set _hopeGain = Math.max(5, Math.floor(_enemyPower / 10))>> <<set _loyaltyGain = Math.max(3, Math.floor(_enemyPower / 15))>> <<set $gold += _goldGain>> <<set $hope += _hopeGain>> <<set $loyalty += _loyaltyGain>> /* show hero's success image if available */ <<set _img = _hero.portrait>> /* Default to portrait */ <<if _hero.invasions && _hero.invasions[_invKey] && _hero.invasions[_invKey].success>> <<set _img = _hero.invasions[_invKey].success>> <</if>> <<if _img>> <div style="text-align: center; margin: 20px 0;"> <img src="<<= _img>>" alt="Victory" style="max-width: 400px; border-radius: 8px;"> </div> <</if>> <div class="rewards"> <h4>Rewards:</h4> <p>💰 Gold: +<<= _goldGain>></p> <p>✨ Hope: +<<= _hopeGain>></p> <p>❤️ Loyalty: +<<= _loyaltyGain>></p> </div> /* Mark invasion as done for today */ <<set $invasionDoneToday = true>> <br> [[Back to Camp|Camp]] </div> <<else>> <div class="defeat-section"> <h3 style="color: #f44336;">❌ Defeat!</h3> <p><em><<= _hero.name>> fought valiantly but was overwhelmed by the <<= $invasionFaction>>. The enemy advances, and hope dwindles.</em></p> /* penalties */ <<set _hopeLoss = Math.max(10, Math.floor(_enemyPower / 8))>> <<set _loyaltyLoss = Math.max(5, Math.floor(_enemyPower / 12))>> <<set $hope -= _hopeLoss>> <<set $loyalty -= _loyaltyLoss>> /* Ensure values don't go below 0 */ <<if $hope < 0>><<set $hope = 0>><</if>> <<if $loyalty < 0>><<set $loyalty = 0>><</if>> /* show hero's failure image if available */ <<set _img = _hero.portrait>> /* Default to portrait */ <<if _hero.invasions && _hero.invasions[_invKey] && _hero.invasions[_invKey].fail>> <<set _img = _hero.invasions[_invKey].fail>> <</if>> <<if _img>> <div style="text-align: center; margin: 20px 0;"> <img src="<<= _img>>" alt="Defeat" style="max-width: 400px; border-radius: 8px;"> </div> <</if>> <div class="penalties"> <h4>Losses:</h4> <p>✨ Hope: -<<= _hopeLoss>></p> <p>❤️ Loyalty: -<<= _loyaltyLoss>></p> </div> /* Mark invasion as done for today */ <<set $invasionDoneToday = true>> <br> [[Back to Camp|Camp]] </div> <</if>> <</if>> <</if>> <style> .invasion-header { text-align: center; margin: 20px 0; padding: 20px; background: rgba(139, 69, 19, 0.2); border-radius: 8px; } .victory-section, .defeat-section { text-align: center; padding: 20px; margin: 20px 0; border-radius: 8px; } .victory-section { background: rgba(76, 175, 80, 0.1); border: 1px solid #4CAF50; } .defeat-section { background: rgba(244, 67, 54, 0.1); border: 1px solid #f44336; } .rewards, .penalties { display: inline-block; margin: 15px 0; padding: 15px; background: rgba(0, 0, 0, 0.3); border-radius: 4px; } .rewards h4, .penalties h4 { margin: 0 0 10px 0; color: #D4AF37; } </style>
:: QuestAssigned <div style="text-align: center; padding: 40px;"> <h2>✅ Quest Assigned!</h2> <p>Your soldiers have been dispatched on the mission.</p> <p>They will return with a report at the end of the day.</p> <div style="margin-top: 30px;"> [[Back to Quests|Quests]] [[Return to Camp|Camp]] </div> </div>
:: JobComplete <div style="text-align: center; padding: 40px;"> <h2>⚰️ Decision Made</h2> <<set _outcome = $jobOutcomes[$jobOutcomes.length - 1]>> <<if _outcome>> <div style="margin: 20px;"> <<if _outcome.img>> <img src="<<print _outcome.img>>" alt="<<print _outcome.title>>" style="max-width: 300px; border-radius: 8px; margin: 10px 0;"> <</if>> <h3><<print _outcome.title>></h3> <p><<print _outcome.text>></p> <div style="margin: 20px; padding: 15px; background: rgba(139, 69, 19, 0.2); border-radius: 8px;"> <strong>Outcome:</strong><br> <<if _outcome.rewards.gold>>💰 Gold: <<if _outcome.rewards.gold > 0>>+<</if>><<print _outcome.rewards.gold>><br><</if>> <<if _outcome.rewards.hope>>✨ Hope: <<if _outcome.rewards.hope > 0>>+<</if>><<print _outcome.rewards.hope>><br><</if>> <<if _outcome.rewards.food>>🍖 Food: <<if _outcome.rewards.food > 0>>+<</if>><<print _outcome.rewards.food>><br><</if>> <<if _outcome.rewards.loyalty>>❤️ Loyalty: <<if _outcome.rewards.loyalty > 0>>+<</if>><<print _outcome.rewards.loyalty>><br><</if>> <<if _outcome.rewards.wood>>🪵 Wood: <<if _outcome.rewards.wood > 0>>+<</if>><<print _outcome.rewards.wood>><br><</if>> <<if _outcome.rewards.stone>>⛰️ Stone: <<if _outcome.rewards.stone > 0>>+<</if>><<print _outcome.rewards.stone>><br><</if>> <<if _outcome.rewards.soldiers>>⚔️ Soldiers: <<if _outcome.rewards.soldiers > 0>>+<</if>><<print _outcome.rewards.soldiers>><br><</if>> </div> </div> <</if>> <p><em>Another day, another compromise. The weight of leadership grows heavier.</em></p> <div style="margin-top: 30px;"> [[Return to Camp|Camp]] </div> </div>
:: Settings <div class="settings-overlay"> <div class="settings-modal"> <h2>⚙️ Game Settings</h2> [[HeroPackDebug|HeroPackDebug]] [[EndDayDebug|EndDayDebug]] [[RandomEventsDebug|RandomEventsDebug]] <div class="settings-section"> <h3>Gameplay</h3> <label> <input type="checkbox" id="autoSave" <<if $autoSave>>checked<</if>> onchange="State.variables.autoSave = this.checked"> Auto-save progress </label> <br> <label> <input type="checkbox" id="nsfwContent" <<if $nsfwContent>>checked<</if>> onchange="State.variables.nsfwContent = this.checked"> Show NSFW content </label> </div> <div class="settings-section"> <h3>Display</h3> <label> Text Size: <select onchange="document.documentElement.style.fontSize = this.value + 'px'"> <option value="14">Small</option> <option value="16" selected>Medium</option> <option value="18">Large</option> <option value="20">X-Large</option> </select> </label> <br><br> <label> Theme: <select onchange="document.body.className = this.value"> <option value="theme-dark">Dark</option> <option value="theme-light">Light</option> <option value="theme-medieval">Medieval</option> </select> </label> </div> <div class="settings-section"> <h3>Game Data</h3> <button onclick="saveGame()">💾 Save Game</button> <button onclick="loadGame()">📂 Load Game</button> <button onclick="resetGame()">🔄 Reset Game</button> </div> <div class="settings-buttons"> <button onclick="closeSettings()">Close</button> </div> </div> </div> <script> function closeSettings() { history.back(); } function saveGame() { const saveData = JSON.stringify(State.variables); localStorage.setItem('twineGameSave', saveData); alert('Game saved successfully!'); } function loadGame() { const saveData = localStorage.getItem('twineGameSave'); if (saveData) { Object.assign(State.variables, JSON.parse(saveData)); alert('Game loaded successfully!'); location.reload(); } else { alert('No save data found!'); } } function resetGame() { if (confirm('Are you sure you want to reset the game? All progress will be lost!')) { localStorage.removeItem('twineGameSave'); alert('Game reset! Refreshing...'); location.reload(); } } </script> <style> .settings-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.8); display: flex; justify-content: center; align-items: center; z-index: 1000; } .settings-modal { background: linear-gradient(135deg, #2a1a1a 0%, #3a2a2a 100%); border: 2px solid #D4AF37; border-radius: 10px; padding: 30px; max-width: 500px; width: 90%; max-height: 80vh; overflow-y: auto; } .settings-section { margin: 20px 0; padding: 15px; background: rgba(0, 0, 0, 0.3); border-radius: 5px; } .settings-section h3 { color: #D4AF37; margin-top: 0; border-bottom: 1px solid #8B4513; padding-bottom: 5px; } .settings-buttons { text-align: center; margin-top: 20px; } button { background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%); color: white; border: none; padding: 10px 20px; margin: 5px; border-radius: 5px; cursor: pointer; font-size: 14px; } button:hover { background: linear-gradient(135deg, #A0522D 0%, #D2691E 100%); } label { color: #ccc; display: block; margin: 10px 0; } input[type="checkbox"] { margin-right: 10px; } select { background: #2a1a1a; color: white; border: 1px solid #8B4513; padding: 5px; border-radius: 3px; margin-left: 10px; } </style>
:: Assignments <div class="main-container settlement-level-<<= $settlementLevel >>"> <div class="day-display"> <h2>🕵️♂️ HERO ASSIGNMENTS</h2> <p>Send your heroes on covert missions against enemy factions</p> </div> <div class="resources"> <strong>Available Heroes:</strong><br> <<for _hero range $party>> <<if !_hero.busy>> ✅ <<print _hero.name>> - Power: <<print _hero.power>><br> <<else>> ❌ <<print _hero.name>> - Currently on assignment<br> <</if>> <</for>> </div> <!-- Orcs & Goblins --> <div class="grim-section"> <h3>🪓 Orcs & Goblins — The Grinding Horde</h3> <p>Brutal, numerous, always raiding.</p> <div class="options-container"> <<for _hero range $party>> <<if !_hero.busy>> <div class="option-box"> 🗡️ [[Assign <<print _hero.name>>: Assassinate Goblin Warchanter|AssignmentOrcs]['<<print _hero.name>>']]<br> <small><<print _hero.name>> - Power: <<print _hero.power>> | Success Chance: <<print Math.min(50 + (_hero.power * 5), 90)>>%</small> </div> <</if>> <</for>> </div> </div> <!-- Elves --> <div class="grim-section"> <h3>🌿 Elves — The Eternal Weepers</h3> <p>Decadent, mysterious, and ancient.</p> <div class="options-container"> <<for _hero range $party>> <<if !_hero.busy>> <div class="option-box"> 🏹 [[Assign <<print _hero.name>>: Steal Tears of Ysilwen|AssignmentElves]['<<print _hero.name>>']]<br> <small><<print _hero.name>> - Power: <<print _hero.power>> | Success Chance: <<print Math.min(45 + (_hero.power * 5), 85)>>%</small> </div> <</if>> <</for>> </div> </div> <!-- Ossuary Empire --> <div class="grim-section"> <h3>☠ The Ossuary Empire — Bone Crafters</h3> <p>Necromancers and corpse-smiths.</p> <div class="options-container"> <<for _hero range $party>> <<if !_hero.busy>> <div class="option-box"> 💀 [[Assign <<print _hero.name>>: Disrupt Bone Caravan|AssignmentOssuary]['<<print _hero.name>>']]<br> <small><<print _hero.name>> - Power: <<print _hero.power>> | Success Chance: <<print Math.min(40 + (_hero.power * 5), 80)>>%</small> </div> <</if>> <</for>> </div> </div> <!-- Drowned Choir --> <div class="grim-section"> <h3>🌊 Drowned Choir — Abyssal Dwellers</h3> <p>Sea cultists, drowned horrors, and abyssal priests.</p> <div class="options-container"> <<for _hero range $party>> <<if !_hero.busy>> <div class="option-box"> 🌊 [[Assign <<print _hero.name>>: Sink Black-Fin Galleon|AssignmentDrowned]['<<print _hero.name>>']]<br> <small><<print _hero.name>> - Power: <<print _hero.power>> | Success Chance: <<print Math.min(35 + (_hero.power * 5), 75)>>%</small> </div> <</if>> <</for>> </div> </div> <!-- Dark Lord --> <div class="grim-section"> <h3>👑 The Dark Lord — Legion of Absolute Order</h3> <p>Lawful-evil, iron-fisted tyranny.</p> <div class="options-container"> <<for _hero range $party>> <<if !_hero.busy>> <div class="option-box"> 👑 [[Assign <<print _hero.name>>: Free Enslaved Artisans|AssignmentDarkLord]['<<print _hero.name>>']]<br> <small><<print _hero.name>> - Power: <<print _hero.power>> | Success Chance: <<print Math.min(30 + (_hero.power * 5), 70)>>%</small> </div> <</if>> <</for>> </div> </div> <div class="options-container"> <div class="option-box">[[Return to Camp|Camp]]</div> </div> </div>
<<set _index = random(0, $campEntries.length - 1)>> <<= $campEntries[_index].img >> <<= $campEntries[_index].message >>
<div class="main-container settlement-level-<<= $settlementLevel >>"> <div class="day-display"> <h2>💋 THE CRIMSON VEIL BROTHEL</h2> <p>A place of fleeting comforts and whispered secrets</p> </div> <!-- Brothel Main Image - Alternating between 2 images --> <<set _randomImage = random(1, 2)>> <<if _randomImage == 1>> <div style="text-align: center; margin: 20px 0;"> <img src="Assets\Brothel\BrothelMain1.png" alt="The Crimson Veil Brothel - Exterior" style="width: 650px; height: 650px; object-fit: cover; border: 2px solid var(--gold-primary); border-radius: 8px; box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);"> <p style="color: var(--text-secondary); font-style: italic; margin-top: 5px;">The inviting exterior of The Crimson Veil</p> </div> <<else>> <div style="text-align: center; margin: 20px 0;"> <img src="Assets\Brothel\BrothelMain2.png" alt="The Crimson Veil Brothel - Interior" style="width: 650px; height: 650px; object-fit: cover; border: 2px solid var(--gold-primary); border-radius: 8px; box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);"> <p style="color: var(--text-secondary); font-style: italic; margin-top: 5px;">The opulent interior main hall</p> </div> <</if>> <!-- Fixed Brothel Status --> <div class="resources"> <strong>Available Services:</strong><br> 💰 Gold for Companions: <<print $gold>><br> ✨ Current Settlement Hope: <<print $hope>><br> ⚔️ Soldiers for Morale: <<print $soldiers>><br> <<if $brothelHopeUsed>>🔄 <em>Morale boost available tomorrow</em><</if>> <<if $brothelHeroUsed>>👥 <em>Hero employment available tomorrow</em><</if>> </div> <!-- Function 1: Player Interaction with Girls --> <div class="grim-section"> <h3>👩❤️💋👨 Personal Companionship</h3> <p>Choose a companion for the evening (Cost: 25 gold)</p> <div class="options-container" style="grid-template-columns: repeat(2, 1fr);"> <div class="option-box"> 🌹 [[Seraphina|BrothelSeraphina]]<br> <small>The refined courtesan - elegant and sophisticated</small> </div> <div class="option-box"> 🔥 [[Lilith|BrothelLilith]]<br> <small>The passionate dancer - fiery and intense</small> </div> <div class="option-box"> 🌙 [[Isolde(W.I.P)|BrothelIsolde]]<br> <small>The mysterious oracle - enigmatic and wise</small> </div> <div class="option-box"> 🌸 [[Bella(W.I.P)|BrothelBella]]<br> <small>The gentle healer - kind and comforting</small> </div> </div> </div> <!-- Function 2: Send Heroes to Work --> <div class="grim-section"> <h3>💼 Employ Your Heroes</h3> <p>Send your unique heroes to work at the brothel (One hero per day)</p> <<if $brothelHeroUsed>> <div class="resources"> <p>⏳ <em>Hero employment services are exhausted for today. Return tomorrow.</em></p> </div> <<else>> <div class="options-container"> <<for _hero range $party>> <<if !_hero.busy>> <div class="option-box"> 💰 [[BrothelHeroWork1]]]<br> <small><<print _hero.name>> - <<print _hero.class>></small> </div> <</if>> <</for>> <<if $party.length == 0 || $party.filter(h => !h.busy).length == 0>> <div class="resources"> <p>❌ No available heroes to send (all heroes are busy or none recruited).</p> </div> <</if>> </div> <</if>> </div> <!-- Function 3: Send Soldiers for Hope Boost --> <div class="grim-section"> <h3>🎪 Morale Services</h3> <p>Boost your soldiers' morale (Cost: 10 soldiers, +5 hope, once per day)</p> <<if $brothelHopeUsed>> <div class="resources"> <p>⏳ <em>Morale services are exhausted for today. Return tomorrow.</em></p> </div> <<elseif $soldiers >= 10>> <div class="options-container"> <div class="option-box">✨ [[Boost Morale (Cost: 10 soldiers)|BrothelBoostMorale]]</div> </div> <<else>> <div class="resources"> <p>❌ Need 10 soldiers available for morale services (currently have <<print $soldiers>>).</p> </div> <</if>> </div> <div class="options-container"> <div class="option-box">[[Return to Camp|Camp]]</div> </div> </div>
:: BrothelSeraphina <<if $gold >= 25>> <<set $gold -= 25>> <<set $hope += 3>> <div class="main-container"> <div class="day-display"> <h3>🌹 Evening with Seraphina</h3> </div> <div class="resources"> <img src="Assets\Brothel\Seraphina.png" style="max-width: 600px; border: 2px solid gold; margin: 10px 0;"> <p>The Crimson Veil hums with the scent of rosewater and the glow of candlelight, shadows dancing across tapestried walls. I push through the beaded curtain into a private chamber where Seraphina waits, her silken gown hugging her curves, dark hair spilling like a raven’s wing. Her eyes, sharp with mischief, meet mine, and a slow smile curves her lips. “Twenty-five gold, my lord,” she purrs, voice soft as velvet but edged with confidence. I drop a clinking pouch onto the table, and her fingers brush mine as she takes it, her touch lingering, stirring my blood. She steps closer, her breath warm against my cheek. Our lips meet, tentative at first, then hungry, tongues tangling in a primal dance. Her hands roam my chest, unfastening my tunic with practiced ease, while my fingers knot in her hair, pulling her closer. The kiss deepens, a promise of the sex to come. Seraphina sinks to her knees, her eyes locked on mine. With deft fingers, she unlaces my trousers, freeing my penis to the cool air. Her lips, soft and warm, envelop me, moving with skill that makes my knees weak. Her tongue traces patterns, teasing and coaxing, drawing low groans from my throat. The world narrows to the heat of her mouth and the flicker of candlelight on her skin.</p> <img src="Assets\Brothel\SeraphinaBJ.png" style="max-width: 600px; border: 2px solid gold; margin: 10px 0;"> <p>When she rises, her gown slips to the floor, revealing her lithe body. She guides me to a cushioned bench, urging me to sit. With a wicked smile, she turns, straddling me in reverse, her back arching as she lowers herself onto my penis. My hands grip her hips, holding tight as she begins to move, her rhythm slow at first, then building to a primal cadence. Her soft moans mix with the creak of the bench, the air thick with our shared heat. I lean forward, pressing my chest to her back, lips grazing her shoulder as she rides me, each motion driving us closer to the edge.</p> <img src="Assets\Brothel\SeraphinaRD.png" style="max-width: 600px; border: 2px solid gold; margin: 10px 0;"> Her pace quickens, her breath hitching, and I feel the tension coil within me. With a final, shuddering thrust, I finish inside her, our gasps echoing in the chamber. Seraphina slows, her body trembling as she leans back against me, her laughter soft and triumphant. <p>“Worth every coin, my lord?” she whispers, turning her head to brush a kiss against my jaw.</p> I can only nod, breathless, as the candles burn low, casting our shadows as one.</p> <p><strong>Effects:</strong> -25 gold, +3 hope</p> </div> <div class="options-container"> <div class="option-box">[[Return to Brothel|Brothel]]</div> </div> </div> <<else>> <div class="main-container"> <div class="day-display"> <h3>❌ Insufficient Funds</h3> </div> <div class="resources"> <p>You need 25 gold for Seraphina's company.</p> </div> <div class="options-container"> <div class="option-box">[[Return to Brothel|Brothel]]</div> </div> </div> <</if>>
:: BrothelBella <<if $gold >= 25>> <<set $gold -= 25>> <<set $hope += 4>> <<set $food += 10>> <!-- Small bonus for her healing nature --> <div class="main-container"> <div class="day-display"> <h3>🌸 Comfort with Bella</h3> </div> <div class="resources"> <img src="Assets\Brothel\Bella.png" style="max-width: 300px; border: 2px solid pink; margin: 10px 0;"> <p>Bella's room smells of herbs and fresh linen. She provides gentle comfort, healing massage, and warm conversation that soothes your soul.</p> <p><strong>Effects:</strong> -25 gold, +4 hope, +10 food</p> </div> <div class="options-container"> <div class="option-box">[[Return to Brothel|Brothel]]</div> </div> </div> <<else>> <!-- Same insufficient funds structure --> <</if>>
:: BrothelHeroWork <<set _heroName = $args[0]>> <<set _hero = $party.filter(h => h.name === _heroName)[0]>> <<if _hero && !$brothelHeroUsed>> <<set _hero.busy = true>> <<set $brothelHeroUsed = true>> /* 5 different scenarios with different gold amounts */ <<set _scenario = random(1, 5)>> <<if _scenario == 1>> <<set _goldEarned = 50>> <<set _image = "Assets\\Brothel\\Scenario1.png">> <<set _story = _hero.name + " entertained nobles with tales of adventure. The wealthy patrons were very generous.">> <<elseif _scenario == 2>> <<set _goldEarned = 75>> <<set _image = "Assets\\Brothel\\Scenario2.png">> <<set _story = _hero.name + " performed daring feats that impressed visiting merchants. The tips were substantial.">> <<elseif _scenario == 3>> <<set _goldEarned = 100>> <<set _image = "Assets\\Brothel\\Scenario3.png">> <<set _story = _hero.name + " caught the eye of a mysterious benefactor who paid handsomely for exclusive attention.">> <<elseif _scenario == 4>> <<set _goldEarned = 125>> <<set _image = "Assets\\Brothel\\Scenario4.png">> <<set _story = _hero.name + " resolved a dispute between important clients, earning rewards from both sides.">> <<else>> <<set _goldEarned = 150>> <<set _image = "Assets\\Brothel\\Scenario5.png">> <<set _story = _hero.name + " became the star attraction for the evening, drawing in record crowds and profits.">> <</if>> <<set $gold += _goldEarned>> <div class="main-container"> <div class="day-display"> <h3>💼 Hero Employment</h3> </div> <div class="resources"> <img src="<<print _image>>" style="max-width: 400px; border: 2px solid gold; margin: 10px 0;"> <p><strong><<print _hero.name>> worked at the brothel:</strong></p> <p><<print _story>></p> <p><strong>Earnings:</strong> +<<print _goldEarned>> gold</p> <p><em><<print _hero.name>> will be busy for the rest of the day.</em></p> </div> <div class="options-container"> <div class="option-box">[[Return to Brothel|Brothel]]</div> </div> </div> <<else>> <div class="main-container"> <div class="day-display"> <h3>❌ Unable to Work</h3> </div> <div class="resources"> <p>This hero cannot work at the brothel right now.</p> </div> <div class="options-container"> <div class="option-box">[[Return to Brothel|Brothel]]</div> </div> </div> <</if>>
:: BrothelBoostMorale <<if !$brothelHopeUsed && $soldiers >= 10>> <<set $soldiers -= 10>> <<set $hope += 5>> <<set $brothelHopeUsed = true>> <div class="main-container"> <div class="day-display"> <h3>✨ Morale Boosted</h3> </div> <div class="resources"> <img src="Assets\Brothel\MoraleBoost.png" style="max-width: 400px; border: 2px solid blue; margin: 10px 0;"> <p>You send 10 soldiers to enjoy the brothel's services. Their morale improves significantly.</p> <p><strong>Effects:</strong> -10 soldiers, +5 hope</p> <p>The soldiers return refreshed and more hopeful about their situation.</p> </div> <div class="options-container"> <div class="option-box">[[Return to Brothel|Brothel]]</div> </div> </div> <<else>> <div class="main-container"> <div class="day-display"> <h3>❌ Cannot Boost Morale</h3> </div> <div class="resources"> <p>Morale services are not available right now.</p> </div> <div class="options-container"> <div class="option-box">[[Return to Brothel|Brothel]]</div> </div> </div> <</if>>
:: BrothelHeroWork <<set _heroName = $args[0]>> <<set _hero = $party.filter(h => h.name === _heroName)[0]>> <<if _hero && !$brothelHeroUsed>> <<set _hero.busy = true>> <<set $brothelHeroUsed = true>> /* 5 different scenarios with different gold amounts */ <<set _scenario = random(1, 5)>> <<if _scenario == 1>> <<set _goldEarned = 50>> <<set _image = "Assets\\Brothel\\Scenario1.png">> <<set _story = _hero.name + " entertained nobles with tales of adventure. The wealthy patrons were very generous.">> <<elseif _scenario == 2>> <<set _goldEarned = 75>> <<set _image = "Assets\\Brothel\\Scenario2.png">> <<set _story = _hero.name + " performed daring feats that impressed visiting merchants. The tips were substantial.">> <<elseif _scenario == 3>> <<set _goldEarned = 100>> <<set _image = "Assets\\Brothel\\Scenario3.png">> <<set _story = _hero.name + " caught the eye of a mysterious benefactor who paid handsomely for exclusive attention.">> <<elseif _scenario == 4>> <<set _goldEarned = 125>> <<set _image = "Assets\\Brothel\\Scenario4.png">> <<set _story = _hero.name + " resolved a dispute between important clients, earning rewards from both sides.">> <<else>> <<set _goldEarned = 150>> <<set _image = "Assets\\Brothel\\Scenario5.png">> <<set _story = _hero.name + " became the star attraction for the evening, drawing in record crowds and profits.">> <</if>> <<set $gold += _goldEarned>> <div class="main-container"> <div class="day-display"> <h3>💼 Hero Employment</h3> </div> <div class="resources"> <img src="<<print _image>>" style="max-width: 400px; border: 2px solid gold; margin: 10px 0;"> <p><strong><<print _hero.name>> worked at the brothel:</strong></p> <p><<print _story>></p> <p><strong>Earnings:</strong> +<<print _goldEarned>> gold</p> <p><em><<print _hero.name>> will be busy for the rest of the day.</em></p> </div> <div class="options-container"> <div class="option-box">[[Return to Brothel|Brothel]]</div> </div> </div> <<else>> <div class="main-container"> <div class="day-display"> <h3>❌ Unable to Work</h3> </div> <div class="resources"> <p>This hero cannot work at the brothel right now.</p> </div> <div class="options-container"> <div class="option-box">[[Return to Brothel|Brothel]]</div> </div> </div> <</if>>
:: AssignmentOrcs <<set _heroName = $args[0]>> <<set _hero = $party.filter(h => h.name === _heroName)[0]>> <<if _hero && !_hero.busy>> <<set _hero.busy = true>> <<set _successChance = Math.min(50 + (_hero.power * 5), 90)>> <<set _success = random(1, 100) <= _successChance>> <<if _success>> <<set _goldReward = random(5, 15)>> <<set _hopeReward = random(5, 20)>> <<set _loyaltyReward = random(5, 20)>> <<set $gold += _goldReward>> <<set $hope += _hopeReward>> <<set $loyalty += _loyaltyReward>> <<if !$assignmentResults>><<set $assignmentResults = []>><</if>> <<set $assignmentResults.push({ hero: _hero.name, heroPortrait: _hero.portrait, faction: "Orcs & Goblins", mission: "Assassinate Goblin Warchanter", success: true, gold: _goldReward, hope: _hopeReward, loyalty: _loyaltyReward, story: _hero.name + "'s blade found its mark. The warchanter's final shriek was cut short. Without their chants, the horde's morale shattered.", situationalImage: "Assets\\Assignments\\Orcs\\" + _hero.name.replace(/\s+/g, '') + "_success.png" })>> <<else>> <<set _hopePenalty = random(5, 15)>> <<set $hope -= _hopePenalty>> <<if !$assignmentResults>><<set $assignmentResults = []>><</if>> <<set $assignmentResults.push({ hero: _hero.name, heroPortrait: _hero.portrait, faction: "Orcs & Goblins", mission: "Assassinate Goblin Warchanter", success: false, hope: -_hopePenalty, story: _hero.name + " was overwhelmed by the warchanter's guards. They barely escaped with their life, and now the horde is enraged.", situationalImage: "Assets\\Assignments\\Orcs\\" + _hero.name.replace(/\s+/g, '') + "_fail.png" })>> <</if>> <div class="main-container"> <div class="day-display"> <h3>✅ Mission Assigned</h3> </div> <div class="resources"> <p><strong><<print _hero.name>></strong> has been sent to assassinate the Goblin Warchanter.</p> <p><strong>Success Chance:</strong> <<print _successChance>>%</p> <p>Results will be reported tomorrow.</p> </div> <div class="options-container"> <div class="option-box">[[Return to Assignments|Assignments]]</div> </div> </div> <<else>> <div class="main-container"> <div class="day-display"> <h3>❌ Cannot Assign Mission</h3> </div> <div class="resources"> <p>This hero is not available for assignment.</p> </div> <div class="options-container"> <div class="option-box">[[Return to Assignments|Assignments]]</div> </div> </div> <</if>>
:: AssignmentElves <<set _heroName = $args[0]>> <<set _hero = $party.filter(h => h.name === _heroName)[0]>> <<if _hero && !_hero.busy>> <<set _hero.busy = true>> <<set _successChance = Math.min(45 + (_hero.power * 5), 85)>> <<set _success = random(1, 100) <= _successChance>> <<if _success>> <<set _goldReward = random(8, 18)>> <<set _hopeReward = random(6, 18)>> <<set _loyaltyReward = random(6, 18)>> <<set $gold += _goldReward>> <<set $hope += _hopeReward>> <<set $loyalty += _loyaltyReward>> <<if !$assignmentResults>><<set $assignmentResults = []>><</if>> <<set $assignmentResults.push({ hero: _hero.name, heroPortrait: _hero.portrait, faction: "Elves", mission: "Steal Tears of Ysilwen", success: true, gold: _goldReward, hope: _hopeReward, loyalty: _loyaltyReward, story: _hero.name + " slipped past the ancient wards. The sacred relic now rests in your hands, and the elves' magic wanes.", situationalImage: "Assets\\Assignments\\Elves\\" + _hero.name.replace(/\s+/g, '') + "_success.png" })>> <<else>> <<set _hopePenalty = random(6, 16)>> <<set $hope -= _hopePenalty>> <<if !$assignmentResults>><<set $assignmentResults = []>><</if>> <<set $assignmentResults.push({ hero: _hero.name, heroPortrait: _hero.portrait, faction: "Elves", mission: "Steal Tears of Ysilwen", success: false, hope: -_hopePenalty, story: _hero.name + " was detected by the elves' magical wards. They barely escaped the enchanted forest with their life.", situationalImage: "Assets\\Assignments\\Elves\\" + _hero.name.replace(/\s+/g, '') + "_fail.png" })>> <</if>> <div class="main-container"> <div class="day-display"> <h3>✅ Mission Assigned</h3> </div> <div class="resources"> <p><strong><<print _hero.name>></strong> has been sent to steal the Tears of Ysilwen.</p> <p><strong>Success Chance:</strong> <<print _successChance>>%</p> <p>Results will be reported tomorrow.</p> </div> <div class="options-container"> <div class="option-box">[[Return to Assignments|Assignments]]</div> </div> </div> <<else>> <!-- Same error structure --> <</if>>
:: AssignmentOssuary <<set _heroName = $args[0]>> <<set _hero = $party.filter(h => h.name === _heroName)[0]>> <<if _hero && !_hero.busy>> <<set _hero.busy = true>> <<set _successChance = Math.min(40 + (_hero.power * 5), 80)>> <<set _success = random(1, 100) <= _successChance>> <<if _success>> <<set _goldReward = random(10, 20)>> <<set _hopeReward = random(7, 20)>> <<set _loyaltyReward = random(7, 20)>> <<set $gold += _goldReward>> <<set $hope += _hopeReward>> <<set $loyalty += _loyaltyReward>> <<if !$assignmentResults>><<set $assignmentResults = []>><</if>> <<set $assignmentResults.push({ hero: _hero.name, heroPortrait: _hero.portrait, faction: "Ossuary Empire", mission: "Disrupt Bone Caravan", success: true, gold: _goldReward, hope: _hopeReward, loyalty: _loyaltyReward, story: _hero.name + " set the caravan ablaze. The necromancers will struggle to raise new soldiers without these bones.", situationalImage: "Assets\\Assignments\\Ossuary\\" + _hero.name.replace(/\s+/g, '') + "_success.png" })>> <<else>> <<set _hopePenalty = random(7, 17)>> <<set $hope -= _hopePenalty>> <<if !$assignmentResults>><<set $assignmentResults = []>><</if>> <<set $assignmentResults.push({ hero: _hero.name, heroPortrait: _hero.portrait, faction: "Ossuary Empire", mission: "Disrupt Bone Caravan", success: false, hope: -_hopePenalty, story: _hero.name + " was overwhelmed by bone golem guards. The grim caravan continues its journey uninterrupted.", situationalImage: "Assets\\Assignments\\Ossuary\\" + _hero.name.replace(/\s+/g, '') + "_fail.png" })>> <</if>> <div class="main-container"> <div class="day-display"> <h3>✅ Mission Assigned</h3> </div> <div class="resources"> <p><strong><<print _hero.name>></strong> has been sent to disrupt the Bone Caravan.</p> <p><strong>Success Chance:</strong> <<print _successChance>>%</p> <p>Results will be reported tomorrow.</p> </div> <div class="options-container"> <div class="option-box">[[Return to Assignments|Assignments]]</div> </div> </div> <<else>> <!-- Same error structure --> <</if>>
:: AssignmentDrowned <<set _heroName = $args[0]>> <<set _hero = $party.filter(h => h.name === _heroName)[0]>> <<if _hero && !_hero.busy>> <<set _hero.busy = true>> <<set _successChance = Math.min(35 + (_hero.power * 5), 75)>> <<set _success = random(1, 100) <= _successChance>> <<if _success>> <<set _goldReward = random(12, 22)>> <<set _hopeReward = random(8, 20)>> <<set _loyaltyReward = random(8, 20)>> <<set $gold += _goldReward>> <<set $hope += _hopeReward>> <<set $loyalty += _loyaltyReward>> <<if !$assignmentResults>><<set $assignmentResults = []>><</if>> <<set $assignmentResults.push({ hero: _hero.name, heroPortrait: _hero.portrait, faction: "Drowned Choir", mission: "Sink Black-Fin Galleon", success: true, gold: _goldReward, hope: _hopeReward, loyalty: _loyaltyReward, story: _hero.name + " sent the flagship to the depths. The cultists' naval power has been crippled.", situationalImage: "Assets\\Assignments\\Drowned\\" + _hero.name.replace(/\s+/g, '') + "_success.png" })>> <<else>> <<set _hopePenalty = random(8, 18)>> <<set $hope -= _hopePenalty>> <<if !$assignmentResults>><<set $assignmentResults = []>><</if>> <<set $assignmentResults.push({ hero: _hero.name, heroPortrait: _hero.portrait, faction: "Drowned Choir", mission: "Sink Black-Fin Galleon", success: false, hope: -_hopePenalty, story: _hero.name + " was driven back by abyssal guardians. The dark vessel continues its grim voyage.", situationalImage: "Assets\\Assignments\\Drowned\\" + _hero.name.replace(/\s+/g, '') + "_fail.png" })>> <</if>> <div class="main-container"> <div class="day-display"> <h3>✅ Mission Assigned</h3> </div> <div class="resources"> <p><strong><<print _hero.name>></strong> has been sent to sink the Black-Fin Galleon.</p> <p><strong>Success Chance:</strong> <<print _successChance>>%</p> <p>Results will be reported tomorrow.</p> </div> <div class="options-container"> <div class="option-box">[[Return to Assignments|Assignments]]</div> </div> </div> <<else>> <div class="main-container"> <div class="day-display"> <h3>❌ Cannot Assign Mission</h3> </div> <div class="resources"> <p>This hero is not available for assignment.</p> </div> <div class="options-container"> <div class="option-box">[[Return to Assignments|Assignments]]</div> </div> </div> <</if>>
:: AssignmentDarkLord <<set _heroName = $args[0]>> <<set _hero = $party.filter(h => h.name === _heroName)[0]>> <<if _hero && !_hero.busy>> <<set _hero.busy = true>> <<set _successChance = Math.min(30 + (_hero.power * 5), 70)>> <<set _success = random(1, 100) <= _successChance>> <<if _success>> <<set _goldReward = random(15, 25)>> <<set _hopeReward = random(10, 20)>> <<set _loyaltyReward = random(10, 20)>> <<set $gold += _goldReward>> <<set $hope += _hopeReward>> <<set $loyalty += _loyaltyReward>> <<if !$assignmentResults>><<set $assignmentResults = []>><</if>> <<set $assignmentResults.push({ hero: _hero.name, heroPortrait: _hero.portrait, faction: "Dark Lord", mission: "Free Enslaved Artisans", success: true, gold: _goldReward, hope: _hopeReward, loyalty: _loyaltyReward, story: _hero.name + " liberated the artisans under the Inquisitors' noses. The Dark Lord's war machine slows.", situationalImage: "Assets\\Assignments\\DarkLord\\" + _hero.name.replace(/\s+/g, '') + "_success.png" })>> <<else>> <<set _hopePenalty = random(10, 20)>> <<set $hope -= _hopePenalty>> <<if !$assignmentResults>><<set $assignmentResults = []>><</if>> <<set $assignmentResults.push({ hero: _hero.name, heroPortrait: _hero.portrait, faction: "Dark Lord", mission: "Free Enslaved Artisans", success: false, hope: -_hopePenalty, story: _hero.name + " was captured and tortured by the Inquisitors before barely escaping with their life.", situationalImage: "Assets\\Assignments\\DarkLord\\" + _hero.name.replace(/\s+/g, '') + "_fail.png" })>> <</if>> <div class="main-container"> <div class="day-display"> <h3>✅ Mission Assigned</h3> </div> <div class="resources"> <p><strong><<print _hero.name>></strong> has been sent to free enslaved artisans.</p> <p><strong>Success Chance:</strong> <<print _successChance>>%</p> <p>Results will be reported tomorrow.</p> </div> <div class="options-container"> <div class="option-box">[[Return to Assignments|Assignments]]</div> </div> </div> <<else>> <div class="main-container"> <div class="day-display"> <h3>❌ Cannot Assign Mission</h3> </div> <div class="resources"> <p>This hero is not available for assignment.</p> </div> <div class="options-container"> <div class="option-box">[[Return to Assignments|Assignments]]</div> </div> </div> <</if>>
:: BrothelIsolde <<if $gold >= 25>> <<set $gold -= 25>> <<set $hope += 2>> <<set $loyalty += 3>> <div class="main-container"> <div class="day-display"> <h3>🌙 Consultation with Isolde</h3> </div> <div class="resources"> <img src="Assets\Brothel\Isolde.png" style="max-width: 300px; border: 2px solid purple; margin: 10px 0;"> <p>Isolde reads your fortune in the crystal ball, sharing wisdom and secrets. The experience is more spiritual than physical, but deeply meaningful.</p> <p><strong>Effects:</strong> -25 gold, +2 hope, +3 loyalty</p> </div> <div class="options-container"> <div class="option-box">[[Return to Brothel|Brothel]]</div> </div> </div> <<else>> <!-- Same insufficient funds structure --> <</if>>
:: BrothelLilith <<if $gold >= 55>> <<set $gold -= 55>> <div class="main-container"> <div class="day-display"> <h3>🔥 Night with Lilith</h3> </div> <div class="resources"> <img src="Assets\Brothel\Lilith.png" style="max-width: 600px; border: 2px solid red; margin: 10px 0;"> <p>The Crimson Veil brothel hums with the scent of jasmine and the glow of flickering candles, their light casting shadows across the velvet-draped walls. I push through the beaded curtain into a private chamber where Lilith waits, her sheer gown clinging to her lithe frame, crimson hair tumbling like wildfire. Her eyes, burning with a desperate hunger, meet mine, and she bites her lip, a tremble in her submissive smile. “Fifty-five gold, my lord,” she whispers, voice quivering with eager surrender. “Please… make it worth my pain.” I drop a clinking pouch onto the table, and her fingers graze mine, trembling as if craving my command, her touch sparking fire in my veins. She steps closer, her breath ragged against my skin. Our lips crash together, soft at first, then fierce, her tongue yielding to mine in a frantic, submissive dance. Her hands fumble at my chest, unfastening my tunic with nervous haste, while my fingers knot in her fiery hair, pulling hard. She gasps into the kiss, a soft whimper of delight, begging for more with every shudder. Lilith sinks to her knees, her eyes wide and pleading, fixed on mine. “Use me,” she murmurs, unlacing my trousers with shaking hands, freeing my penis to the cool air. Her hand wraps around me, warm and eager, stroking with a desperate rhythm that makes my blood pound. Her fingers tremble, coaxing groans from my throat, each motion a plea for my approval, the world shrinking to her fervent touch and the flicker of candlelight on her skin. </p> <img src="Assets\Brothel\LilithHj.png" style="max-width: 600px; border: 2px solid red; margin: 10px 0;"> <p>When she rises, her gown slips to the floor, revealing skin marked faintly by past indulgences. She guides me to a cushioned bench, urging me to sit, her eyes gleaming with masochistic need. “Please, my lord,” she begs, turning to straddle me in reverse, her back arching as she lowers herself onto my penis. My hands grip her hips, hard enough to bruise, and she moans, relishing the pain. Her rhythm starts slow, then quickens, submissive yet wild, her gasps filling the air with the creak of the bench. “Harder… choke me,” she pleads, voice thick with need. My hand slides up, fingers wrapping tightly around her throat, her pulse hammering beneath my grip. She nods frantically, eyes rolling back in ecstasy, urging me to squeeze harder. I tighten my hold, her choked gasps sharpening as she rides me, her movements frenzied, craving the edge of pain. My chest presses against her back, lips grazing her shoulder, the heat between us a roaring blaze.</p> <img src="Assets\Brothel\LilithCK.png" style="max-width: 600px; border: 2px solid red; margin: 10px 0;"> <p>Her pace turns wild, her body shaking under my hand, and I feel the tension coil within me. With a final, shuddering thrust, I finish inside her, her strangled cry echoing through the chamber. Lilith slows, her body quaking as she leans back against me, her voice a broken whisper of triumph. “Thank you, my lord… for breaking me.” “Worth every coin?” she breathes, turning to press a trembling kiss along my jaw. I nod, breathless, as the candles burn low, our shadows entwined as one.</p> <p><strong>Effects:</strong> -55 gold, Pleassed Buff</p> </div> <div class="options-container"> <div class="option-box">[[Return to Brothel|Brothel]]</div> </div> </div> <<else>> <!-- Same insufficient funds structure as above --> <</if>>
The old man’s eyes gleam with milky cataracts as he names the powers that stalk the land. "To the east brood the Orcs & Goblins — The Grinding Horde — endless, ravenous, driven by drums that never sleep." "To the west whisper the Elves — The Eternal Weepers — pale immortals drowning in their own sorrows, weaving schemes of silk and venom." "Southwards, beneath the white catacombs, rises The Ossuary Empire — Bone Crafters — necromancers who sculpt armies from the remains of the fallen." "Across the blackened seas, the Drowned Choir — Abyssal Dwellers — sing their abyssal hymns, dragging whole fleets beneath the waves." "And beyond them all, like a blade in the dark, stands The Dark Lord — Legion of Absolute Order — who would grind chaos, hope, and rebellion into perfect stillness." He stirs the fire with a broken spear. "These are not your allies. These are the tides that will smash your walls, steal your people, and bleed you dry." [[Learn your purpose->Purpose]]
The fire sputters in the hearth, casting long, thin shadows across the cracked stone floor. An old man, wrapped in tattered wolfskin, leans close. His voice is a rasp, a blade dragged across bone. "Listen well, traveler. This is no tale of heroes, nor of happy endings. This is the tale of you, <<print $playerName>>, and the crown of ash that has fallen upon your brow." He coughs, spitting black phlegm into the fire. "By decree of fate—or something fouler—you were taken from your life and thrust into rulership of a dying settlement at the edge of the world. Not for glory. Not for honor. But as punishment. You were the only one left alive when the previous Lord’s heart was nailed to the gate. The crowd screamed for a scapegoat, and your name was chosen." The flames crackle. "And so here you are: ruler of ruin, master of dust. The world will not pity you. The world will devour you." [[Hear of the factions->Factions]]
"You must gather what little strength you have, <<print $playerName>>," the old man murmurs. "Stone, food, soldiers, loyalty, hope. These are the veins of your realm. Let them run dry, and your people will hang you before the enemy can." His cracked lips curl into a grim smile. "Maidens may yet come to your service — some rare, some strange, some born of chance. They may offer counsel, craft, or power. But every gift carries a price." He leans closer, his breath cold as a grave. "This land is not forgiving. Every choice will carve scars upon you. Fail, and your people will curse your name. Survive, and you may yet conquer all — or be consumed by what you have built." He spits into the fire, and the flames die, leaving only embers. "Now, ruler of ruin. Take up your burden. The world waits." [[Beign Your Campain|Camp]]
<<script>> // Check for game over condition if (State.variables.gold < 0 || State.variables.loyalty < 0) { // Go to game over passage <<goto "Game Over">> } <</script>>
<h1>Game Over</h1> <<if $gold < 0>> <div class="game-over-message"> <h2>Bankruptcy!</h2> <p>Your establishment has run out of gold and can no longer operate.</p> <p>Final Gold: <<print $gold>></p> </div> <</if>> <<if $loyalty < 0>> <div class="game-over-message"> <h2>Revolt!</h2> <p>Your heroes have lost all loyalty and have abandoned you and the your people.</p> <p>Final Loyalty: <<print $loyalty>></p> </div> <</if>> <<if $gold < 0 && $loyalty < 0>> <div class="game-over-message"> <h2>Complete Collapse!</h2> <p>Your brothel has failed both financially and morally.</p> </div> <</if>> <br> <button onclick="window.location.reload()">Start New Game</button> <style> .game-over-message { background: rgba(255, 0, 0, 0.1); border: 2px solid red; padding: 20px; margin: 10px 0; border-radius: 10px; } </style>
:: Hero Chat <<set _hero = $uniqueHeroes[$currentHeroIndex]>> <div class="romance-scene"> <h2 class="romance-header">Chat with <<print _hero.name>></h2> <<if _hero.romanceStage gte 1>> <img class="scene-image" src="<<print _hero.portrait>>" alt="<<print _hero.name>>"> <</if>> <div class="dialogue-box"> <<if _hero.romanceStage == 0>> "What do you want to talk about?" <<elseif _hero.romanceStage == 1>> "I find myself... curious about you lately." <<elseif _hero.romanceStage == 2>> "You've earned my trust. What's on your mind?" <<elseif _hero.romanceStage == 3>> "Your voice is becoming familiar... comforting." <<else>> "We share everything now. Speak your heart." <</if>> </div> <div class="choices-container"> <<if $interactionActions gt 0>> <div class="option-box"> [[Ask about their past|Hero Chat Choice][$interactionActions -= 1; _hero.affection = Math.min(100, _hero.affection + 5)]] </div> <div class="option-box"> [[Discuss current events|Hero Chat Choice][$interactionActions -= 1; _hero.affection = Math.min(100, _hero.affection + 3)]] </div> <div class="option-box"> [[Share a personal story|Hero Chat Choice][$interactionActions -= 1; _hero.affection = Math.min(100, _hero.affection + 7)]] </div> <div class="option-box"> [[Just make small talk|Hero Chat Choice][$interactionActions -= 1]] </div> <<else>> <div class="option-box"> [[No interactions left|Hero Interactions]] </div> <</if>> </div> </div>
:: Hero Date <<set _hero = $uniqueHeroes[$currentHeroIndex]>> <div class="romance-scene"> <h2 class="romance-header">Date with <<print _hero.name>></h2> <<if _hero.brothel.length gt 0>> <img class="scene-image" src="<<print _hero.brothel[0]>>" alt="Date Scene"> <</if>> <div class="dialogue-box"> <<if _hero.romanceStage == 0>> "A date? I don't think we're there yet." <<elseif _hero.romanceStage == 1>> "A date? I suppose I can spare some time..." <<elseif _hero.romanceStage == 2>> "I've been looking forward to spending time with you." <<elseif _hero.romanceStage == 3>> "Every moment with you feels precious now." <<else>> "Our bond only grows stronger with time." <</if>> </div> <div class="choices-container"> <<if $interactionActions gt 0>> <<if _hero.romanceStage gte 1>> <div class="option-box"> [[Take a moonlit walk|Interact][ <<set _hero.affection = Math.min(100, _hero.affection + 10)>> <<set $interactionActions -= 1>> ]] </div> <div class="option-box"> [[Share a quiet dinner|Interact][ <<set _hero.affection = Math.min(100, _hero.affection + 8)>> <<set $interactionActions -= 1>> ]] </div> <div class="option-box"> [[Train together|Interact][ <<set _hero.affection = Math.min(100, _hero.affection + 12)>> <<set $interactionActions -= 1>> ]] </div> <</if>> <div class="option-box"> [[Cancel the date|Interact][ <<set $interactionActions -= 1>> ]] </div> <<else>> <div class="option-box"> [[No interactions left|Interact]] </div> <</if>> </div> </div>
:: Hero Romance <<set _hero = $uniqueHeroes[$currentHeroIndex]>> <div class="romance-scene"> <h2 class="romance-header">Romance with <<print _hero.name>></h2> <<if _hero.romanceStage gte 3 and _hero.romance.length gt 0>> <img class="scene-image" src="<<print _hero.romance[0]>>" alt="Romance Scene"> <</if>> <div class="dialogue-box"> <<if _hero.romanceStage == 0>> "This is... inappropriate. We barely know each other." <<elseif _hero.romanceStage == 1>> "You're... forward. But not entirely unwelcome." <<elseif _hero.romanceStage == 2>> "My heart races when you're near..." <<elseif _hero.romanceStage == 3>> "I've never felt this way before..." <<else>> "Our souls are entwined forever now." <</if>> </div> <div class="choices-container"> <<if $interactionActions gt 0>> <<if _hero.romanceStage gte 1>> <div class="option-box"> [[Express your feelings|Interact][ <<set _hero.affection = Math.min(100, _hero.affection + 15)>> <<set $interactionActions -= 1>> ]] </div> <</if>> <<if _hero.romanceStage gte 2>> <div class="option-box"> [[Share an intimate moment|Hero Interactions][ <<set _hero.affection = Math.min(100, _hero.affection + 20)>> <<set $interactionActions -= 1>> ]] </div> <</if>> <<if _hero.romanceStage gte 3>> <div class="option-box"> [[Deepen your bond|Interact][ <<set _hero.affection = Math.min(100, _hero.affection + 25)>> <<set $interactionActions -= 1>> ]] </div> <</if>> <div class="option-box"> [[Back away slowly|Interact][ <<set $interactionActions -= 1>> ]] </div> <<else>> <div class="option-box"> [[No interactions left|Interact]] </div> <</if>> </div> </div>
:: Hero Gifts <<set _hero = $uniqueHeroes[$currentHeroIndex]>> <div class="romance-scene"> <h2 class="romance-header">Gift for <<print _hero.name>></h2> <div class="dialogue-box"> "A gift? For me?" </div> <div class="choices-container"> <<foreach _hero.preferredGifts as $gift>> [[Give <<print $gift>>|Hero Interactions][ <<set _hero.affection += 8>> <<set $interactionActions -= 1>> ]] <</foreach>> [[Actually, never mind|Hero Interactions][ <<set $interactionActions -= 1>> ]] </div> </div>