User prompt
Kaybetme nedeninide her dilde çevir
User prompt
her dile göre sorular ve cevaplarda o dilde olsun
User prompt
yan yana çok bitişkler biraz alarına mesafe koy
User prompt
2 sıra üst üste yap dil seçimini
User prompt
Rus ve Alman dilinde ekle
User prompt
20 piksel aşağı indir
User prompt
20 piksel aşağı indir
User prompt
50 piksel aşağı indir
User prompt
Home tuşunuda öyle yap
User prompt
start bastıktan sonra sol üste durdurma tuşunun altına oyuncu menuya dönmesi için tuş ekle ve Home resmini ona göster
User prompt
start menuda sol üste olan durdurma tuşu olmasın
User prompt
Start butonun üstünde ki Start sözü oyuncu hamgi dili seçerse o dilde yazsın
User prompt
Spanish ve French butonlarını biracık yukarı kaldır
User prompt
Spanish French dillerini ekle ve menude French inglizce üstüne yerleştir butonunu Spanish Türkçenin üzerine koy
User prompt
oyuna menuden ve ya linkten girdiğimde hiç bir ses gelmiyor bu soeun benden mi oyundanmı bilemiyorum kodalara bir bakarmısın ?
User prompt
1 oyunda aynı soru 2. kez gelmesin
User prompt
amma kartları güzelce kart ard arda ejderha kartı geldi hep
User prompt
Ejderhakarti ölçülerini 900 x 1200 yap
User prompt
Cadikarti ölçülerini 900 x 1200 yap
User prompt
kurtadamkarti ölçülerini 900 x 1200 yap
User prompt
Kurt adam konuşmaya geldiğinde kurtadamkarti aktiv olsun
User prompt
Cadı konuşmalarında Cadıkarti aktiv olacak o gözükecek
User prompt
Ejderha konularında Ejderhakartı gözükecek
User prompt
kurt adam ehderha ve cadı kartları yarat
User prompt
CADI (5 kart)* 1. *"Yıldızlar kötü işaretler gösteriyor. Kan mı dökülecek?"* - Önlem al (→ Hazine azalır) - Boş kehanet! (→ Halk korkar) 2. *"Kraliçenin üzerindeki büyüyü kaldırabilirim."* - Yardım et (→ Aile mutlu) - Karışma saraya (→ Halk huzursuz) 3. *"Bir tılsım istiyorum, karşılığında yağmuru getiririm."* - Ver tılsımı (→ Tarlalar kurtulur) - Reddet (→ Kuraklık başlar)4. *"Karanlık güçlerle konuştum, düşman geliyor."* - Savunmayı güçlendir (→ Ordu azalır) - Umursama (→ Saldırı olur) 5. *"Senin geleceğini görebilirim ama korkarsın."* - Söyle kaderimi! (→ Riskli ama güçlü etki) - Sus ve git (→ Hiçbir şey olmaz) iki dilde de ekle
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); var storage = LK.import("@upit/storage.v1"); /**** * Classes ****/ // Card class: represents a decision card var Card = Container.expand(function () { var self = Container.call(this); // Card shadow for depth (use image asset, ensure it's added as a child and visible) var shadow = LK.getAsset('cardShadow', { anchorX: 0.5, anchorY: 0.5, x: 0, y: 20, alpha: 0.15 }); self.addChild(shadow); // Card background - determined by card type var bg = null; // Card text (now hidden, question will be shown globally) var text = new Text2('', { size: 70, fill: 0xFFFFFF, wordWrap: true, wordWrapWidth: 800, align: 'center' }); text.anchor.set(0.5, 0.5); text.x = 0; text.y = -200; text.visible = false; // Hide card question text self.addChild(text); // Left choice text var leftText = new Text2('', { size: 55, fill: 0xFFFFFF, wordWrap: true, wordWrapWidth: 350, align: 'left' }); leftText.anchor.set(0, 0.5); leftText.x = -400; leftText.y = 400; self.addChild(leftText); // Right choice text var rightText = new Text2('', { size: 55, fill: 0xFFFFFF, wordWrap: true, wordWrapWidth: 350, align: 'right' }); rightText.anchor.set(1, 0.5); rightText.x = 400; rightText.y = 400; self.addChild(rightText); // Card data self.cardData = null; // Set card content self.setCard = function (cardData) { self.cardData = cardData; // Remove existing background if present if (bg && bg.parent) { bg.parent.removeChild(bg); } // Determine card background based on type var cardAssetId = 'card'; // default var cardType = ''; if (cardData && cardData.type) { cardType = cardData.type; } // Map card types to specific backgrounds if (cardType.includes('people') || cardType.includes('halk') || cardType.includes('villager') || cardType.includes('köylü') || cardType.includes('koylu') || cardType.includes('villagers')) { cardAssetId = 'card_people'; } else if (cardType.includes('army') || cardType.includes('ordu') || cardType.includes('asker') || cardType.includes('general')) { cardAssetId = 'card_army'; } else if (cardType.includes('clergy') || cardType.includes('din') || cardType.includes('dinadami') || cardType.includes('priest') || cardType.includes('religion')) { cardAssetId = 'card_clergy'; } else if (cardType.includes('nobility') || cardType.includes('soylu') || cardType.includes('noble') || cardType.includes('vezir')) { cardAssetId = 'card_nobles'; } else if (cardType.includes('dragon') || cardType.includes('ejderha')) { cardAssetId = 'Ejderhakart'; } else if (cardType.includes('witch') || cardType.includes('cadı')) { cardAssetId = 'Cadikart'; } else if (cardType.includes('werewolf') || cardType.includes('kurt adam')) { cardAssetId = 'kurtadamkarti'; } // Create and add new background bg = self.attachAsset(cardAssetId, { anchorX: 0.5, anchorY: 0.5, x: 0, y: 0 }); // Remove tinting to show original card image colors bg.tint = 0xffffff; // Keep original colors // Ensure background is behind other elements self.addChildAt(bg, 1); // After shadow but before text // Set global question text using card data if (typeof questionText !== "undefined" && questionText) { questionText.setText(cardData.text); } text.setText(''); // Hide card text leftText.setText(cardData.left.text); rightText.setText(cardData.right.text); }; // Animate card back to center self.animateToCenter = function (onFinish) { tween(self, { x: 0, y: 0, rotation: 0 }, { duration: 250, easing: tween.easeOut, onFinish: onFinish }); }; // Animate card off screen (left or right) self.animateOff = function (direction, onFinish) { var targetX = direction === 'left' ? -1200 : 1200; tween(self, { x: targetX, y: self.y + 200 * (direction === 'left' ? 1 : -1), rotation: direction === 'left' ? -0.5 : 0.5 }, { duration: 300, easing: tween.cubicOut, onFinish: onFinish }); }; return self; }); // StatBar class: shows a single stat (religion, people, army, economy) var StatBar = Container.expand(function () { var self = Container.call(this); // Background var bg = self.attachAsset('statBarBg', { anchorX: 0, anchorY: 0.5, x: 0, y: 0 }); // Fill (color depends on stat) self.fill = null; self.setType = function (type) { var fillId = 'statBarFill_' + type; self.fill = self.attachAsset(fillId, { anchorX: 0, anchorY: 0.5, x: 0, y: 0 }); self.addChildAt(self.fill, 1); }; // Label self.label = new Text2('', { size: 45, fill: 0xFFFFFF }); self.label.anchor.set(1, 0.5); self.label.x = -20; self.label.y = 0; self.addChild(self.label); // Set value (0-100) self.setValue = function (val) { if (val < 0) { val = 0; } if (val > 100) { val = 100; } self.fill.width = 4 * val; // 400px max }; // Set label self.setLabel = function (txt) { self.label.setText(txt); }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x1a1a1a }); /**** * Game Code ****/ // List of cards (minimal set for MVP, can be expanded) // --- Game Data --- // Card background shapes // Stat bar backgrounds and fills var cards = [ // Essential nobility cards (betrayal/trust) { type: "nobility", text: "A trusted noble offers to double the treasury if you let him manage it.", left: { text: "Accept his offer.", effects: { religion: 0, people: -10, army: -10, economy: +25 } }, right: { text: "Refuse, keep control.", effects: { religion: 0, people: 0, army: 0, economy: -5 } } }, { type: "nobility", text: "A noble is accused of plotting against you.", left: { text: "Exile the noble.", effects: { religion: 0, people: -10, army: +10, economy: 0 } }, right: { text: "Trust the noble.", effects: { religion: 0, people: +5, army: -15, economy: 0 } } }, { type: "army", text: "A general asks for more power, threatening a coup.", left: { text: "Grant more power.", effects: { religion: 0, people: -10, army: +15, economy: -10 } }, right: { text: "Refuse.", effects: { religion: 0, people: 0, army: -15, economy: 0 } } }, { type: "army", text: "A general offers to train your army for a price.", left: { text: "Pay for training.", effects: { religion: 0, people: 0, army: +20, economy: -15 } }, right: { text: "Refuse.", effects: { religion: 0, people: 0, army: -10, economy: 0 } } }, { type: "clergy", text: "A priest claims a vision: your advisor is a traitor.", left: { text: "Believe the priest.", effects: { religion: +10, people: -10, army: 0, economy: 0 } }, right: { text: "Ignore the claim.", effects: { religion: -10, people: 0, army: 0, economy: 0 } } }, { type: "clergy", text: "The church asks for a secret donation.", left: { text: "Donate in secret.", effects: { religion: +15, people: -5, army: 0, economy: -15 } }, right: { text: "Refuse.", effects: { religion: -10, people: 0, army: 0, economy: 0 } } }, { type: "people", text: "A popular leader is stirring unrest.", left: { text: "Arrest the leader.", effects: { religion: 0, people: -15, army: +10, economy: 0 } }, right: { text: "Let them speak.", effects: { religion: 0, people: +10, army: -10, economy: 0 } } }, { type: "villager", text: "A famine strikes the land.", left: { text: "Open the royal granaries.", effects: { religion: 0, people: +20, army: 0, economy: -20 } }, right: { text: "Do nothing.", effects: { religion: 0, people: -20, army: 0, economy: 0 } } }, { type: "economy", text: "A merchant offers a suspiciously good deal.", left: { text: "Accept the deal.", effects: { religion: 0, people: 0, army: 0, economy: +20 } }, right: { text: "Refuse, too risky.", effects: { religion: 0, people: 0, army: 0, economy: -5 } } }, { type: "heretic", text: "A heretic is spreading dissent.", left: { text: "Punish the heretic.", effects: { religion: +10, people: -10, army: 0, economy: 0 } }, right: { text: "Show mercy.", effects: { religion: -10, people: +10, army: 0, economy: 0 } } }, { type: "disaster", text: "A great fire devastates the capital.", left: { text: "Send aid to the people.", effects: { religion: +5, people: +10, army: 0, economy: -20 } }, right: { text: "Let them rebuild on their own.", effects: { religion: -5, people: -10, army: 0, economy: 0 } } }, { type: "tax", text: "The treasury is low. Raise taxes?", left: { text: "Raise taxes.", effects: { religion: 0, people: -15, army: 0, economy: +20 } }, right: { text: "Keep taxes the same.", effects: { religion: 0, people: 0, army: 0, economy: -10 } } }, { type: "plague", text: "A plague is spreading in the countryside.", left: { text: "Quarantine the villages.", effects: { religion: 0, people: -10, army: 0, economy: -10 } }, right: { text: "Pray for deliverance.", effects: { religion: +10, people: -20, army: 0, economy: 0 } } }, { type: "clergy", text: "A relic is discovered in the kingdom.", left: { text: "Display the relic.", effects: { religion: +15, people: +5, army: 0, economy: -10 } }, right: { text: "Sell the relic.", effects: { religion: -10, people: 0, army: 0, economy: +20 } } }, { type: "bandits", text: "Bandits are raiding the countryside.", left: { text: "Send the army.", effects: { religion: 0, people: 0, army: -10, economy: -5 } }, right: { text: "Offer a reward for their capture.", effects: { religion: 0, people: +5, army: 0, economy: -10 } } }, { type: "tournament", text: "Knights request a royal tournament.", left: { text: "Host the tournament.", effects: { religion: 0, people: +10, army: +10, economy: -15 } }, right: { text: "Deny the request.", effects: { religion: 0, people: -5, army: -5, economy: 0 } } }, { type: "taxrelief", text: "Peasants beg for tax relief.", left: { text: "Grant relief.", effects: { religion: 0, people: +15, army: 0, economy: -15 } }, right: { text: "Refuse.", effects: { religion: 0, people: -10, army: 0, economy: +10 } } }, { type: "palace", text: "A palace cat jumped on the throne, people consider this a holy sign.", left: { text: "Declare it holy.", effects: { religion: +15, people: +10, army: 0, economy: 0 } }, right: { text: "Call it nonsense.", effects: { religion: -10, people: -15, army: 0, economy: 0 } } }]; // Shuffle cards for each game function shuffleCards(arr) { var a = arr.slice(); for (var i = a.length - 1; i > 0; i--) { var j = Math.floor(Math.random() * (i + 1)); var t = a[i]; a[i] = a[j]; a[j] = t; } return a; } // --- Game State --- var statNames = ['religion', 'people', 'army', 'economy']; // statLabels is now only used for initial UI setup; actual labels are set by setLanguage() // (kept for legacy, but not used for language switching) var statLabels = { religion: 'Religion', people: 'People', army: 'Army', economy: 'Economy' }; var statColors = { religion: 0x6a4cff, people: 0x1abc9c, // Beautiful teal for people army: 0xff4136, economy: 0xffdc00 // Economy stays the same }; var stats = { religion: 50, people: 50, army: 50, economy: 50 }; var statBars = {}; var currentCard = null; var cardIndex = 0; var deck = []; var usedCards = []; // Track which cards have been used var isDragging = false; var dragStart = { x: 0, y: 0 }; var dragOffset = { x: 0, y: 0 }; var dragThreshold = 200; // px to trigger a choice var cardContainer = null; var reign = 0; // Number of cards survived var cardsAnswered = 0; // Track number of cards answered for year advancement // --- UI Setup --- // Stat icons at top (avoid top left 100x100) var statIconY = 120; var statIconSpacing = 440; var statIconAssets = { religion: { icon: 'statIcon_religion', img: null }, // Will be replaced with image if available people: { icon: 'statIcon_people', img: null }, army: { icon: 'statIcon_army', img: null }, economy: { icon: 'statIcon_economy', img: null } }; // You can replace the icon asset ids above with custom image ids if you have them, e.g. 'priestImage', 'swordsImage', etc. var statIcons = {}; // Store preview rectangles for stat effect preview var statEffectPreviews = {}; for (var i = 0; i < statNames.length; i++) { var stat = statNames[i]; var iconAssetId = statIconAssets[stat].icon; var iconContainer = new Container(); // Icon (fixed, does not change) var fillHeight = 120; var iconWidth = stat === "economy" ? 80 : 120; var icon = iconContainer.attachAsset(iconAssetId, { anchorX: 0.5, anchorY: 0.5, x: 0, y: 0, width: iconWidth, height: fillHeight }); icon.alpha = 1; // Stat label (below icon) var label = new Text2(statLabels[stat], { size: 45, fill: 0xFFFFFF }); label.anchor.set(0.5, 0); label.x = 0; label.y = 90; // Vertical stat bar (same height as icon, thin, fills up/down) var barHeight = fillHeight; // Match icon height var barWidth = 32; var barX = 80; // to the right of the icon var barY = 0; // Bar background var barBg = iconContainer.attachAsset('statBarBg', { anchorX: 0.5, anchorY: 1, x: barX, y: barY + barHeight / 2, width: barWidth, height: barHeight, tint: 0x222222 }); barBg.alpha = 0.5; // Bar fill (colored, height changes) var barFillId = 'statBarFill_' + stat; var barFill = iconContainer.attachAsset(barFillId, { anchorX: 0.5, anchorY: 1, x: barX, y: barY + barHeight / 2, width: barWidth, height: barHeight, tint: statColors[stat] }); barFill.alpha = 1; // --- Stat effect preview circle (hidden by default) --- var previewCircle = iconContainer.attachAsset('centerCircle', { anchorX: 0.5, anchorY: 0, x: 0, y: 160, width: 30, // circular preview size height: 30, // circular preview size tint: statColors[stat] }); previewCircle.alpha = 0.7; previewCircle.visible = false; iconContainer.addChild(previewCircle); statEffectPreviews[stat] = previewCircle; // Add children in correct order iconContainer.addChild(icon); iconContainer.addChild(label); iconContainer.addChild(barBg); iconContainer.addChild(barFill); iconContainer.x = 350 + i * statIconSpacing; iconContainer.y = statIconY; statIcons[stat] = { container: iconContainer, icon: icon, label: label, barFill: barFill, barBg: barBg, barHeight: barHeight }; game.addChild(iconContainer); } // Reign counter (center top, below stat bars) var reignText = new Text2('Reign: 0', { size: 70, fill: 0xFFFFFF }); reignText.anchor.set(0.5, 0); reignText.x = 2048 / 2; reignText.y = 220; LK.gui.top.addChild(reignText); // Global question text (below stat bars, above card) var questionText = new Text2('', { size: 70, fill: 0xFFFFFF, wordWrap: true, wordWrapWidth: 1400, align: 'center' }); questionText.anchor.set(0.5, 0.5); questionText.x = 2048 / 2; questionText.y = 420; // Just below stat bars and reignText game.addChild(questionText); // --- Reign Year Counter (bottom left) --- var reignYear = 0; // Starting at 0 years var reignYearText = new Text2('0 yıl', { size: 60, fill: 0xffffff }); reignYearText.anchor.set(0, 1); reignYearText.x = 40; reignYearText.y = 2732 - 40; reignYearText.visible = false; // Hide year display in start menu game.addChild(reignYearText); // Add background image (centered, behind everything) var backgroundImage = LK.getAsset('cardShadow', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2, width: 2048, height: 2732, alpha: 0.18 }); game.addChild(backgroundImage); // Card container (centered) cardContainer = new Container(); cardContainer.x = 2048 / 2; cardContainer.y = 2732 / 2 + 100; game.addChild(cardContainer); // --- Game Logic --- function startGame() { // Reset stats stats.religion = 50; stats.people = 50; stats.army = 50; stats.economy = 50; reign = 0; reignYear = 0; cardsAnswered = 0; usedCards = []; // Reset used cards tracking if (selectedLanguage === "tr") { reignYearText.setText('0 yıl'); } else if (selectedLanguage === "fr") { reignYearText.setText('0 années'); } else if (selectedLanguage === "es") { reignYearText.setText('0 años'); } else { reignYearText.setText('0 years'); } cardIndex = 0; deck = shuffleCards(cards); updateStatBars(); reignText.setText('Reign: 0'); clearCard(); showNextCard(); } function updateStatBars() { for (var i = 0; i < statNames.length; i++) { var stat = statNames[i]; var val = stats[stat]; if (val < 0) { val = 0; } if (val > 100) { val = 100; } // Update vertical bar fill (barFill) var barFill = statIcons[stat].barFill; var barHeight = statIcons[stat].barHeight; barFill.height = barHeight * (val / 100); // anchorY = 1, so y is at the bottom, height shrinks up // Update label if language changed if (statIcons[stat].label) { statIcons[stat].label.setText(languageData[selectedLanguage].statLabels[stat]); } } } function clearCard() { if (currentCard) { currentCard.destroy(); currentCard = null; } } // Character types that can ask questions var characterTypes = ['clergy', 'army', 'people', 'nobles']; function getCardsByCharacterType(characterType) { var currentDeck = languageData[selectedLanguage].cards; var filteredCards = []; for (var i = 0; i < currentDeck.length; i++) { var card = currentDeck[i]; var cardType = card.type.toLowerCase(); // Map character types to card types if (characterType === 'clergy' && (cardType.includes('clergy') || cardType.includes('din') || cardType.includes('dinadami') || cardType.includes('religion') || cardType.includes('priest') || cardType.includes('sapkin') || cardType.includes('heretic') || cardType.includes('keşiş') || cardType.includes('monks') || cardType.includes('temple') || cardType.includes('tapınak'))) { filteredCards.push(card); } else if (characterType === 'army' && (cardType.includes('army') || cardType.includes('ordu') || cardType.includes('asker') || cardType.includes('general') || cardType.includes('tournament') || cardType.includes('turnuva') || cardType.includes('duel'))) { filteredCards.push(card); } else if (characterType === 'people' && (cardType.includes('people') || cardType.includes('halk') || cardType.includes('villager') || cardType.includes('köylü') || cardType.includes('koylu') || cardType.includes('villagers') || cardType.includes('koylu'))) { filteredCards.push(card); } else if (characterType === 'nobles' && (cardType.includes('nobility') || cardType.includes('soylu') || cardType.includes('noble') || cardType.includes('nobles') || cardType.includes('vezir'))) { filteredCards.push(card); } } return filteredCards; } // Track the last character type used var lastCharacterType = null; var consecutiveSpecialCards = 0; // Track consecutive special cards function showNextCard() { clearCard(); // Get all available cards for current language var allCards = languageData[selectedLanguage].cards; // Filter out already used cards to prevent duplicates in same game var availableCards = []; for (var i = 0; i < allCards.length; i++) { var card = allCards[i]; var cardId = card.text; // Use card text as unique identifier var isUsed = false; for (var j = 0; j < usedCards.length; j++) { if (usedCards[j] === cardId) { isUsed = true; break; } } if (!isUsed) { availableCards.push(card); } } // If all cards have been used, reset the used cards array to start over if (availableCards.length === 0) { usedCards = []; availableCards = allCards.slice(); } // Define character types for rotation var characterTypes = ['clergy', 'army', 'people', 'nobles']; var specialTypes = ['dragon', 'ejderha', 'werewolf', 'kurt adam', 'witch', 'cadı']; // Select next character type for better rotation var targetCharacterType; if (consecutiveSpecialCards >= 2) { // Force regular character type after 2 consecutive special cards targetCharacterType = characterTypes[Math.floor(Math.random() * characterTypes.length)]; consecutiveSpecialCards = 0; } else { // 70% chance for regular character types, 30% for special if (Math.random() < 0.7) { targetCharacterType = characterTypes[Math.floor(Math.random() * characterTypes.length)]; consecutiveSpecialCards = 0; } else { targetCharacterType = specialTypes[Math.floor(Math.random() * specialTypes.length)]; consecutiveSpecialCards++; } } // Try to avoid repeating the same character type consecutively if (lastCharacterType === targetCharacterType && Math.random() < 0.6) { // 60% chance to pick a different type if (consecutiveSpecialCards > 0) { targetCharacterType = specialTypes[Math.floor(Math.random() * specialTypes.length)]; } else { targetCharacterType = characterTypes[Math.floor(Math.random() * characterTypes.length)]; } } // Filter available cards by target character type var filteredCards = []; for (var i = 0; i < availableCards.length; i++) { var card = availableCards[i]; var cardType = card.type.toLowerCase(); var isTargetType = false; if (targetCharacterType === 'clergy' && (cardType.includes('clergy') || cardType.includes('din') || cardType.includes('dinadami') || cardType.includes('religion') || cardType.includes('priest') || cardType.includes('sapkin') || cardType.includes('heretic'))) { isTargetType = true; } else if (targetCharacterType === 'army' && (cardType.includes('army') || cardType.includes('ordu') || cardType.includes('asker') || cardType.includes('general') || cardType.includes('tournament') || cardType.includes('turnuva'))) { isTargetType = true; } else if (targetCharacterType === 'people' && (cardType.includes('people') || cardType.includes('halk') || cardType.includes('villager') || cardType.includes('köylü') || cardType.includes('koylu') || cardType.includes('villagers'))) { isTargetType = true; } else if (targetCharacterType === 'nobles' && (cardType.includes('nobility') || cardType.includes('soylu') || cardType.includes('noble') || cardType.includes('nobles') || cardType.includes('vezir'))) { isTargetType = true; } else if ((targetCharacterType === 'dragon' || targetCharacterType === 'ejderha') && (cardType.includes('dragon') || cardType.includes('ejderha'))) { isTargetType = true; } else if ((targetCharacterType === 'werewolf' || targetCharacterType === 'kurt adam') && (cardType.includes('werewolf') || cardType.includes('kurt adam'))) { isTargetType = true; } else if ((targetCharacterType === 'witch' || targetCharacterType === 'cadı') && (cardType.includes('witch') || cardType.includes('cadı'))) { isTargetType = true; } if (isTargetType) { filteredCards.push(card); } } // If no cards found for target type, use all available cards if (filteredCards.length === 0) { filteredCards = availableCards; consecutiveSpecialCards = 0; } // Select random card from filtered cards var cardData = filteredCards[Math.floor(Math.random() * filteredCards.length)]; // Mark this card as used usedCards.push(cardData.text); lastCharacterType = targetCharacterType; var card = new Card(); card.setCard(cardData); card.x = 0; card.y = 0; card.rotation = 0; cardContainer.addChild(card); currentCard = card; isDragging = false; dragStart.x = 0; dragStart.y = 0; dragOffset.x = 0; dragOffset.y = 0; } // Apply effects and check for game over function applyChoice(effects) { // Randomize effect size: 50% normal, 25% small (half), 25% big (1.5x instead of double) var effectMultiplier = 1; var rand = Math.random(); if (rand < 0.25) { effectMultiplier = 0.5; // small effect } else if (rand > 0.75) { effectMultiplier = 1.5; // moderate big effect (reduced from 2x to 1.5x) } // Make the stat bar fill much slower for positive effects (gains), but much faster for negative effects (losses) for (var i = 0; i < statNames.length; i++) { var stat = statNames[i]; var effect = effects[stat] || 0; var appliedEffect = 0; if (effect > 0) { // Gains: 60% of the effect (moderate gain) appliedEffect = Math.round(effect * effectMultiplier * 0.6); } else if (effect < 0) { // Losses: 70% of the effect (slower loss) appliedEffect = Math.round(effect * effectMultiplier * 0.7); } stats[stat] += appliedEffect; if (stats[stat] > 100) { stats[stat] = 100; } if (stats[stat] < 0) { stats[stat] = 0; } } updateStatBars(); reign++; cardsAnswered++; // --- Yıl ilerlemesi: Her 6 soruda bir 1-4 yıl arası yıl ekle --- if (cardsAnswered % 6 === 0) { var yearsToAdd = Math.floor(Math.random() * 4) + 1; // 1-4 yıl arası rastgele reignYear += yearsToAdd; // Check and update max years record var currentMaxYears = storage.maxYears || 0; if (reignYear > currentMaxYears) { storage.maxYears = reignYear; // Update max years display in menu if (selectedLanguage === "tr") { maxYearsText.setText('En Uzun Hüküm Yılı: ' + reignYear + ' yıl'); } else if (selectedLanguage === "fr") { maxYearsText.setText('Plus Long Règne: ' + reignYear + ' années'); } else if (selectedLanguage === "es") { maxYearsText.setText('Reinado Más Largo: ' + reignYear + ' años'); } else { maxYearsText.setText('Longest Reign Year: ' + reignYear + ' years'); } } // Update reign year display if (selectedLanguage === "tr") { reignYearText.setText(reignYear + ' yıl'); } else if (selectedLanguage === "fr") { reignYearText.setText(reignYear + ' années'); } else if (selectedLanguage === "es") { reignYearText.setText(reignYear + ' años'); } else { reignYearText.setText(reignYear + ' years'); } } reignText.setText(languageData[selectedLanguage].reign + reign); // Check for loss (any stat at 0 or 100) - only if it just reached 0 or 100 this turn var fail = false; for (var i = 0; i < statNames.length; i++) { var stat = statNames[i]; // Only trigger fail if the stat was NOT at 0 or 100 before, but is now if (stats[stat] <= 0 && stats[stat] + -(effects[stat] || 0) > 0 || stats[stat] >= 100 && stats[stat] - (effects[stat] || 0) < 100) { fail = stat; break; } } // If fail, flash the screen and end the game (king loses) if (fail) { LK.effects.flashScreen(statColors[fail], 1000); // Clamp the stat to 0 or 100 so it doesn't get stuck out of bounds stats[fail] = stats[fail] <= 0 ? 0 : 100; // Show loss reason text below stat bars, hide card if (currentCard) { currentCard.visible = false; } // Show loss reason in selected language, centered, uppercase, and in stat color var failReasonText = ''; if (selectedLanguage === "tr") { if (fail === "religion") { failReasonText = "KAHİLER İSYANA KALKTI"; } else if (fail === "people") { failReasonText = "İNSANLAR İSYANA KALKTI"; } else if (fail === "army") { failReasonText = "ORDU YOK OLDU TAHTAN İNDİRİLDİN"; } else if (fail === "economy") { failReasonText = "HAZİNEDE PARA KALMADI DEVRİLDİN"; } else { failReasonText = "KAYBETTİNİZ!"; } } else { if (fail === "religion") { failReasonText = "YOU LOST: RELIGION"; } else if (fail === "people") { failReasonText = "YOU LOST: PEOPLE"; } else if (fail === "army") { failReasonText = "YOU LOST: ARMY"; } else if (fail === "economy") { failReasonText = "YOU LOST: ECONOMY"; } else { failReasonText = "YOU LOST!"; } } questionText.setText(failReasonText); questionText.anchor.set(0.5, 0.5); questionText.x = 2048 / 2; questionText.y = 2732 / 2; questionText.style = Object.assign({}, questionText.style, { fill: statColors[fail] || 0xffffff, fontWeight: 'bold' }); questionText.visible = true; // Delay Game Over popup by 2.5s (2500ms) LK.setTimeout(function () { LK.showGameOver(); }, 2500); return; } // Next card cardIndex++; showNextCard(); } // --- Card Dragging and Swiping --- function handleCardMove(x, y, obj) { if (!currentCard) { return; } if (!isDragging) { return; } // Convert to local cardContainer coordinates var local = cardContainer.toLocal({ x: x, y: y }); var dx = local.x - dragStart.x; var dy = local.y - dragStart.y; dragOffset.x = dx; dragOffset.y = dy; // Play Cards sound when player drags the card in any direction, but only once per drag if (Math.abs(dx) > 5 || Math.abs(dy) > 5) { if (!handleCardMove._hasPlayedSound) { console.log("Card drag detected - testing Cards sound..."); try { var cardsSound = LK.getSound('Cards'); console.log("Cards sound object:", cardsSound); if (cardsSound) { console.log("Playing Cards sound..."); cardsSound.play(); console.log("Cards sound played successfully"); } else { console.log("ERROR: Cards sound not found"); } } catch (e) { console.log("ERROR playing Cards sound:", e); } handleCardMove._hasPlayedSound = true; } } // Move card with finger (horizontal only, no vertical movement) currentCard.x = dx; // Lock Y to 0 (centered) currentCard.y = 0; // Allow only ±45° rotation (in radians: ±Math.PI/4) var maxAngle = Math.PI / 4; var rot = dx / 1200 * maxAngle * 2; // scale so dx=±600 gives ±45° if (rot > maxAngle) { rot = maxAngle; } if (rot < -maxAngle) { rot = -maxAngle; } currentCard.rotation = rot; // Optionally, highlight left/right text as user drags var leftAlpha = Math.max(0.5, 1 - Math.max(0, dx) / 300); var rightAlpha = Math.max(0.5, 1 + Math.min(0, dx) / 300); currentCard.children[2].alpha = leftAlpha; // leftText currentCard.children[3].alpha = rightAlpha; // rightText // --- Stat effect preview rectangles logic --- if (currentCard && currentCard.cardData) { var leftEffects = currentCard.cardData.left.effects; var rightEffects = currentCard.cardData.right.effects; // Show preview if dragging left or right var showPreview = Math.abs(dx) > 30; for (var i = 0; i < statNames.length; i++) { var stat = statNames[i]; var preview = statEffectPreviews[stat]; if (!preview) { continue; } // Determine if this stat will be affected by the current direction var t = Math.max(-1, Math.min(1, dx / 300)); var effect = 0; if (t < 0) { effect = leftEffects[stat] || 0; } else if (t > 0) { effect = rightEffects[stat] || 0; } // Only show preview if this stat will be affected (effect !== 0) and showPreview is true if (showPreview && effect !== 0) { preview.visible = true; // If not moving much, fade out preview if (Math.abs(dx) < 60) { preview.alpha = 0.3; } else { preview.alpha = 0.7; } // Set color and text preview.tint = statColors[stat]; // Set width based on effect size (positive = right, negative = left) // Scale preview circle based on effect magnitude var absEffect = Math.abs(effect); // Small effects (1-5): small circle // Medium effects (6-15): medium circle // Large effects (16+): large circle var circleSize; if (absEffect <= 5) { circleSize = 25; // small effect } else if (absEffect <= 15) { circleSize = 40; // medium effect } else { circleSize = 60; // large effect } preview.width = circleSize; preview.height = circleSize; // keep circular shape // Always center the preview rectangle under the stat icon preview.x = 0; // Do not show any plus/minus or value, only the rectangle itself if (preview._text) { preview._text.setText(''); preview._text.visible = false; } } else { preview.visible = false; } } } else { // Hide all previews if no card for (var i = 0; i < statNames.length; i++) { var preview = statEffectPreviews[statNames[i]]; if (preview) { preview.visible = false; } } } } function handleCardUp(x, y, obj) { if (!currentCard) { return; } if (!isDragging) { return; } isDragging = false; // Reset Cards sound play flag at drag end handleCardMove._hasPlayedSound = false; // Hide all stat effect previews for (var i = 0; i < statNames.length; i++) { var preview = statEffectPreviews[statNames[i]]; if (preview) { preview.visible = false; } } var dx = dragOffset.x; var direction = null; if (dx < -dragThreshold) { direction = 'left'; } if (dx > dragThreshold) { direction = 'right'; } if (direction) { // Animate card fully off screen in the swipe direction (horizontal only, no vertical movement) var targetX = direction === 'left' ? -2048 : 2048; var targetRot = direction === 'left' ? -Math.PI / 4 : Math.PI / 4; tween(currentCard, { x: targetX, y: 0, rotation: targetRot }, { duration: 350, easing: tween.cubicOut, onFinish: function onFinish() { var effects = direction === 'left' ? currentCard.cardData.left.effects : currentCard.cardData.right.effects; applyChoice(effects); } }); } else { // Animate card back to center currentCard.animateToCenter(function () { // Reset alphas if (currentCard) { currentCard.children[2].alpha = 1; currentCard.children[3].alpha = 1; } }); } } function handleCardDown(x, y, obj) { if (!currentCard) { return; } // Always start drag, regardless of where the card is touched var local = cardContainer.toLocal({ x: x, y: y }); isDragging = true; dragStart.x = local.x - currentCard.x; dragStart.y = local.y - currentCard.y; dragOffset.x = 0; dragOffset.y = 0; // Reset Cards sound play flag at drag start handleCardMove._hasPlayedSound = false; } // --- Game Event Handlers --- game.move = function (x, y, obj) { handleCardMove(x, y, obj); }; game.down = function (x, y, obj) { handleCardDown(x, y, obj); }; game.up = function (x, y, obj) { handleCardUp(x, y, obj); }; // On game over, restart game after popup LK.on('gameover', function () { // Wait for LK to reset, then start new game LK.setTimeout(function () { startGame(); }, 100); }); // On you win (not used in MVP, but for future expansion) LK.on('youwin', function () { LK.setTimeout(function () { startGame(); }, 100); }); // Main Menu UI --- var menuContainer = new Container(); menuContainer.x = 2048 / 2; menuContainer.y = 2732 / 2; game.addChild(menuContainer); // Add SatarMenu image to menuContainer, filling the entire screen and hiding cardShadow // Remove cardShadow if present in menuContainer for (var i = menuContainer.children.length - 1; i >= 0; i--) { var child = menuContainer.children[i]; if (child.assetId === 'cardShadow') { menuContainer.removeChild(child); } } // Add SatarMenu image, full screen, centered var satarMenuImg = LK.getAsset('SatarMenu', { anchorX: 0.5, anchorY: 0.5, x: 0, y: 0, width: 2048, height: 2732 }); menuContainer.addChildAt(satarMenuImg, 0); // Language state var languages = [{ code: 'en', label: 'English' }, { code: 'fr', label: 'Français' }, { code: 'es', label: 'Español' }, { code: 'tr', label: 'Türkçe' }]; var selectedLanguage = 'en'; // Default language is English // Language button UI var langButtons = []; for (var i = 0; i < languages.length; i++) { var lang = languages[i]; var btn = new Container(); var btnBg = btn.attachAsset('statBarBg', { anchorX: 0.5, anchorY: 0.5, x: 0, y: 0, width: 500, height: 120 }); btnBg.alpha = 0.7; var btnText = new Text2(lang.label, { size: 60, fill: 0xffffff }); btnText.anchor.set(0.5, 0.5); btnText.x = 0; btnText.y = 0; btn.addChild(btnText); // Position French above English, Spanish above Turkish if (i === 0) { // English btn.x = -300; btn.y = -100; } else if (i === 1) { // French btn.x = -300; btn.y = -220; } else if (i === 2) { // Spanish btn.x = 300; btn.y = -220; } else if (i === 3) { // Turkish btn.x = 300; btn.y = -100; } btn.interactive = true; btn.buttonMode = true; (function (code, idx) { btn.down = function (x, y, obj) { selectedLanguage = code; console.log("Language button pressed - testing sound..."); try { var butonSound = LK.getSound('Buton'); console.log("Buton sound object:", butonSound); if (butonSound) { console.log("Playing Buton sound..."); butonSound.play(); console.log("Buton sound played successfully"); } else { console.log("ERROR: Buton sound not found"); } } catch (e) { console.log("ERROR playing Buton sound:", e); } for (var j = 0; j < langButtons.length; j++) { langButtons[j].children[0].alpha = j === idx ? 1 : 0.7; } // Update max years hint text based on selected language var maxYears = storage.maxYears || 0; if (selectedLanguage === "tr") { maxYearsText.setText('En Uzun Hüküm Yılı: ' + maxYears + ' yıl'); } else if (selectedLanguage === "fr") { maxYearsText.setText('Plus Long Règne: ' + maxYears + ' années'); } else if (selectedLanguage === "es") { maxYearsText.setText('Reinado Más Largo: ' + maxYears + ' años'); } else { maxYearsText.setText('Longest Reign Year: ' + maxYears + ' years'); } }; })(lang.code, i); menuContainer.addChild(btn); langButtons.push(btn); } langButtons[0].children[0].alpha = 1; // Default English selected // Start button var startBtn = new Container(); var startBtnBg = startBtn.attachAsset('statBarBg', { anchorX: 0.5, anchorY: 0.5, x: 0, y: 0, width: 600, height: 140 }); startBtnBg.alpha = 1; var startBtnText = new Text2('Start', { size: 70, fill: 0x222222 }); startBtnText.anchor.set(0.5, 0.5); startBtnText.x = 0; startBtnText.y = 0; startBtn.addChild(startBtnText); startBtn.x = 0; startBtn.y = 200; startBtn.interactive = true; startBtn.buttonMode = true; startBtn.down = function (x, y, obj) { console.log("Start button pressed - testing sound..."); try { var butonSound = LK.getSound('Buton'); console.log("Buton sound object:", butonSound); if (butonSound) { console.log("Playing Buton sound..."); butonSound.play(); console.log("Buton sound played successfully"); } else { console.log("ERROR: Buton sound not found"); } } catch (e) { console.log("ERROR playing Buton sound:", e); } menuContainer.visible = false; // Set language for game setLanguage(selectedLanguage); try { console.log("Attempting to play Start1 music..."); LK.playMusic('Start1'); console.log("Start1 music started successfully"); } catch (e) { console.log("ERROR playing Start1 music:", e); } startGame(); }; menuContainer.addChild(startBtn); // Max years hint text (below start button) var maxYears = storage.maxYears || 0; var maxYearsText = new Text2('En Uzun Hüküm Yılı: ' + maxYears + ' yıl', { size: 50, fill: 0xcccccc }); maxYearsText.anchor.set(0.5, 0); maxYearsText.x = 0; maxYearsText.y = 320; menuContainer.addChild(maxYearsText); // Hide game UI until menu is gone for (var i = 0; i < statNames.length; i++) { statIcons[statNames[i]].container.visible = false; } reignText.visible = false; cardContainer.visible = false; // Show/hide game UI on menu/game function setGameUIVisible(visible) { for (var i = 0; i < statNames.length; i++) { statIcons[statNames[i]].container.visible = visible; } reignText.visible = visible; cardContainer.visible = visible; reignYearText.visible = visible; // Show/hide year display with game UI // Hide cardShadow background when menu is visible if (typeof backgroundImage !== "undefined" && backgroundImage) { backgroundImage.visible = visible; } } // Language data // Merge both English and Turkish cards into both languages' decks for full bilingual play var turkishCards = [{ type: "soylu", text: "Komşu bir krallık evlilik ittifakı istiyor.", left: { text: "İttifakı kabul et.", effects: { religion: +5, people: +10, army: -5, economy: +10 } }, right: { text: "Teklifi reddet.", effects: { religion: -5, people: -10, army: +5, economy: -10 } } }, { type: "dinadami", text: "Kilise yeni bir katedral için daha fazla altın talep ediyor.", left: { text: "Katedrali finanse et.", effects: { religion: +15, people: -5, army: 0, economy: -20 } }, right: { text: "Talebi reddet.", effects: { religion: -15, people: +5, army: 0, economy: +10 } } }, { type: "asker", text: "Ordu daha fazla asker almak istiyor.", left: { text: "Alımları onayla.", effects: { religion: 0, people: -10, army: +20, economy: -15 } }, right: { text: "Talebi reddet.", effects: { religion: 0, people: +5, army: -15, economy: +5 } } }, { type: "koylu", text: "Ülkede kıtlık baş gösterdi.", left: { text: "Kraliyet ambarlarını aç.", effects: { religion: 0, people: +20, army: 0, economy: -20 } }, right: { text: "Hiçbir şey yapma.", effects: { religion: 0, people: -20, army: 0, economy: 0 } } }, { type: "tuccar", text: "Tüccarlar kârlı bir ticaret anlaşması teklif ediyor.", left: { text: "Anlaşmayı kabul et.", effects: { religion: 0, people: +5, army: 0, economy: +20 } }, right: { text: "Teklifi reddet.", effects: { religion: 0, people: -5, army: 0, economy: -10 } } }, { type: "sapkin", text: "Bir sapkın huzursuzluk yayıyor.", left: { text: "Sapkını cezalandır.", effects: { religion: +10, people: -10, army: 0, economy: 0 } }, right: { text: "Merhamet göster.", effects: { religion: -10, people: +10, army: 0, economy: 0 } } }, { type: "asker", text: "Ordu daha iyi ekipman istiyor.", left: { text: "Ekipmana yatırım yap.", effects: { religion: 0, people: 0, army: +15, economy: -15 } }, right: { text: "Reddet.", effects: { religion: 0, people: 0, army: -10, economy: +5 } } }, { type: "koylu", text: "Morali yükseltmek için bir festival önerildi.", left: { text: "Festivali düzenle.", effects: { religion: +5, people: +15, army: 0, economy: -10 } }, right: { text: "Reddet.", effects: { religion: -5, people: -10, army: 0, economy: +5 } } }, { type: "saray", text: "Saray kedisi tahta zıpladı, halk bunu kutsal işaret sayıyor.", left: { text: "Kutsal ilan et.", effects: { religion: +15, people: +10, army: 0, economy: 0 } }, right: { text: "Saçmalık de.", effects: { religion: -10, people: -15, army: 0, economy: 0 } } } // ... (other Turkish cards from original code, omitted for brevity) ]; var englishCards = cards.slice(); // All original English cards // Merge both sets for both languages var languageData = { en: { statLabels: { religion: 'Religion', people: 'People', army: 'Army', economy: 'Economy' }, reign: 'Reign: ', start: 'Start', cards: cards.concat([{ type: "dragon", text: "King! If you don't give me back my gold, I'll turn your villages to ash.", left: { text: "Give the gold.", effects: { religion: 0, people: +5, army: 0, economy: -15 } }, right: { text: "Protect the villages.", effects: { religion: 0, people: 0, army: -10, economy: 0 } } }, { type: "dragon", text: "My dragon egg was stolen! Did you do this?", left: { text: "No, we didn't do it.", effects: { religion: 0, people: 0, army: 0, economy: 0 } }, right: { text: "Yes, it's ours now.", effects: { religion: 0, people: -10, army: -15, economy: 0 } } }, { type: "dragon", text: "I will fly over your kingdom and roar your name in the sky!", left: { text: "Great idea!", effects: { religion: 0, people: +15, army: 0, economy: 0 } }, right: { text: "I forbid it!", effects: { religion: 0, people: 0, army: 0, economy: -10 } } }, { type: "dragon", text: "Organize a festival for dragons, so we can get to know you.", left: { text: "Organize festival.", effects: { religion: 0, people: +10, army: 0, economy: -15 } }, right: { text: "Refuse.", effects: { religion: 0, people: -5, army: 0, economy: 0 } } }, { type: "dragon", text: "One of your knights tried to hunt me, I demand justice!", left: { text: "We apologize.", effects: { religion: 0, people: +5, army: 0, economy: 0 } }, right: { text: "Protect the knight.", effects: { religion: 0, people: 0, army: -15, economy: 0 } } }, { type: "werewolf", text: "When the moon rises I can't stop the beast inside me!", left: { text: "Chain him.", effects: { religion: 0, people: 0, army: -10, economy: 0 } }, right: { text: "Let him roam free.", effects: { religion: 0, people: -15, army: 0, economy: 0 } } }, { type: "werewolf", text: "Recruit me to your army, I'll be useful in battle.", left: { text: "Accept him.", effects: { religion: 0, people: 0, army: +15, economy: 0 } }, right: { text: "Too dangerous, no.", effects: { religion: 0, people: +5, army: 0, economy: 0 } } }, { type: "werewolf", text: "People are hunting in the forest, this is my territory!", left: { text: "Ban hunting.", effects: { religion: 0, people: -10, army: 0, economy: 0 } }, right: { text: "Let them continue.", effects: { religion: 0, people: 0, army: -5, economy: 0 } } }, { type: "werewolf", text: "Marry me to one of your people, let there be peace.", left: { text: "Allow it.", effects: { religion: 0, people: +10, army: 0, economy: 0 } }, right: { text: "No way!", effects: { religion: 0, people: 0, army: -10, economy: 0 } } }, { type: "werewolf", text: "Other wolves are coming to your kingdom too.", left: { text: "Accept them, give shelter.", effects: { religion: 0, people: -5, army: 0, economy: -10 } }, right: { text: "Stop them at the border.", effects: { religion: 0, people: 0, army: -15, economy: 0 } } }, { type: "witch", text: "The stars show bad omens. Will blood be spilled?", left: { text: "Take precautions.", effects: { religion: 0, people: +5, army: 0, economy: -15 } }, right: { text: "Empty prophecy!", effects: { religion: 0, people: -10, army: 0, economy: 0 } } }, { type: "witch", text: "I can lift the curse from the queen.", left: { text: "Help her.", effects: { religion: 0, people: +10, army: 0, economy: -10 } }, right: { text: "Don't interfere with the palace.", effects: { religion: 0, people: -5, army: 0, economy: 0 } } }, { type: "witch", text: "I want a talisman, in return I'll bring rain.", left: { text: "Give the talisman.", effects: { religion: 0, people: +15, army: 0, economy: -10 } }, right: { text: "Refuse.", effects: { religion: 0, people: -15, army: 0, economy: 0 } } }, { type: "witch", text: "I spoke with dark forces, enemies are coming.", left: { text: "Strengthen defenses.", effects: { religion: 0, people: 0, army: -10, economy: -5 } }, right: { text: "Don't care.", effects: { religion: 0, people: 0, army: -15, economy: 0 } } }, { type: "witch", text: "I can see your future but you'll be afraid.", left: { text: "Tell me my fate!", effects: { religion: -10, people: +15, army: +10, economy: -20 } }, right: { text: "Silence and go.", effects: { religion: 0, people: 0, army: 0, economy: 0 } } }, { type: "palace", text: "A palace cat jumped on the throne, people consider this a holy sign.", left: { text: "Declare it holy.", effects: { religion: +15, people: +10, army: 0, economy: 0 } }, right: { text: "Call it nonsense.", effects: { religion: -10, people: -15, army: 0, economy: 0 } } }, { type: "treasury", text: "100 gold was added to the treasury, but its origin is unknown.", left: { text: "Use it.", effects: { religion: 0, people: -10, army: -5, economy: +25 } }, right: { text: "Refuse it.", effects: { religion: +5, people: +10, army: 0, economy: -15 } } }, { type: "army", text: "Should a tournament be organized among palace guards?", left: { text: "Organize it.", effects: { religion: 0, people: +5, army: +15, economy: -10 } }, right: { text: "Not necessary.", effects: { religion: 0, people: 0, army: -5, economy: 0 } } }, { type: "advisor", text: "A wise person says 'The people are hungry but happy.' What should we do?", left: { text: "No problem.", effects: { religion: 0, people: -25, army: -10, economy: 0 } }, right: { text: "Distribute food.", effects: { religion: +5, people: +15, army: 0, economy: -20 } } }, { type: "tax", text: "A new tax system is proposed: Nobles will pay more.", left: { text: "Implement it.", effects: { religion: 0, people: +15, army: -10, economy: +20 } }, right: { text: "Forget it.", effects: { religion: 0, people: -15, army: 0, economy: -10 } } }, { type: "palace", text: "Building a giant statue in the palace garden is proposed.", left: { text: "Approve it.", effects: { religion: +5, people: +10, army: 0, economy: -20 } }, right: { text: "Unnecessary.", effects: { religion: 0, people: -5, army: 0, economy: +10 } } }, { type: "events", text: "The sky turned red. What should we do?", left: { text: "Pray.", effects: { religion: -10, people: -20, army: -15, economy: -10 } }, right: { text: "Ask the scholars.", effects: { religion: +5, people: +15, army: 0, economy: 0 } } }, { type: "palace", text: "The queen's brother is coming to visit you.", left: { text: "Welcome him.", effects: { religion: -5, people: -10, army: 0, economy: -15 } }, right: { text: "Don't meet.", effects: { religion: 0, people: +5, army: 0, economy: 0 } } }, { type: "deception", text: "The king loves birds, do you love them too?", left: { text: "Yes.", effects: { religion: -50, people: -50, army: -50, economy: -50 } }, right: { text: "No.", effects: { religion: 0, people: -15, army: 0, economy: 0 } } }, { type: "monks", text: "A group of monks is constantly lighting candles in the palace.", left: { text: "Let them be free.", effects: { religion: +15, people: +10, army: 0, economy: 0 } }, right: { text: "Forbid it.", effects: { religion: -10, people: -5, army: +10, economy: 0 } } }, { type: "philosopher", text: "A foreign philosopher said 'The king is just a symbol'.", left: { text: "Exile him.", effects: { religion: 0, people: +5, army: +10, economy: -5 } }, right: { text: "Thoughts are free.", effects: { religion: +5, people: -10, army: 0, economy: 0 } } }, { type: "plague", text: "Plague has broken out in the village.", left: { text: "Apply quarantine.", effects: { religion: 0, people: -5, army: 0, economy: -10 } }, right: { text: "Ignore it.", effects: { religion: -5, people: -20, army: 0, economy: 0 } } }, { type: "currency", text: "A new currency is proposed.", left: { text: "Accept it.", effects: { religion: 0, people: +5, army: 0, economy: +15 } }, right: { text: "Refuse it.", effects: { religion: 0, people: 0, army: 0, economy: +5 } } }, { type: "kitchen", text: "Poisoned food panic in the palace kitchen!", left: { text: "Execute the cook.", effects: { religion: 0, people: -15, army: +5, economy: 0 } }, right: { text: "Investigate.", effects: { religion: +5, people: +10, army: 0, economy: -5 } } }, { type: "temple", text: "Money is needed for temple repairs.", left: { text: "Give it.", effects: { religion: +15, people: +5, army: 0, economy: -15 } }, right: { text: "Don't give it.", effects: { religion: -10, people: -5, army: 0, economy: 0 } } }, { type: "scandal", text: "A woman claims she is carrying your child.", left: { text: "Accept it.", effects: { religion: -10, people: -5, army: -15, economy: -10 } }, right: { text: "Deny it.", effects: { religion: 0, people: -10, army: 0, economy: 0 } } }, { type: "spy", text: "A spy was found in the palace.", left: { text: "Interrogate.", effects: { religion: 0, people: 0, army: +10, economy: +5 } }, right: { text: "Execute.", effects: { religion: +5, people: -5, army: +5, economy: 0 } } }, { type: "army", text: "The army demands pay.", left: { text: "Pay them.", effects: { religion: 0, people: 0, army: +20, economy: -15 } }, right: { text: "Postpone.", effects: { religion: 0, people: 0, army: -20, economy: +5 } } }, { type: "religion", text: "A new religious sect is spreading.", left: { text: "Ban it.", effects: { religion: -15, people: -20, army: +10, economy: 0 } }, right: { text: "Let it be free.", effects: { religion: -10, people: +15, army: 0, economy: 0 } } }, { type: "artist", text: "The palace painter made an ugly portrait.", left: { text: "Burn it.", effects: { religion: 0, people: -5, army: 0, economy: -10 } }, right: { text: "Display it.", effects: { religion: 0, people: +10, army: 0, economy: 0 } } }, { type: "children", text: "Should a new game for children be banned?", left: { text: "Yes.", effects: { religion: +10, people: +5, army: 0, economy: 0 } }, right: { text: "No.", effects: { religion: 0, people: -15, army: 0, economy: 0 } } }, { type: "night", text: "Strange sounds are coming at night.", left: { text: "Send guards.", effects: { religion: 0, people: +5, army: +10, economy: 0 } }, right: { text: "Wait.", effects: { religion: 0, people: -15, army: -10, economy: 0 } } }, { type: "duel", text: "The neighboring king challenged you to a duel.", left: { text: "Accept.", effects: { religion: 0, people: +15, army: +10, economy: 0 } }, right: { text: "Refuse.", effects: { religion: 0, people: -10, army: -5, economy: 0 } } }, { type: "madman", text: "A madman declared himself the Messiah.", left: { text: "Capture him.", effects: { religion: +5, people: -15, army: +5, economy: 0 } }, right: { text: "Watch his followers.", effects: { religion: 0, people: +5, army: 0, economy: +10 } } }, { type: "tax", text: "High taxes are proposed.", left: { text: "Approve.", effects: { religion: 0, people: -20, army: 0, economy: +25 } }, right: { text: "Refuse.", effects: { religion: 0, people: +10, army: 0, economy: -15 } } }, { type: "meteor", text: "A meteor fell, people are scared.", left: { text: "Pray.", effects: { religion: +15, people: +5, army: 0, economy: 0 } }, right: { text: "Call scholars.", effects: { religion: +5, people: +15, army: 0, economy: 0 } } }, { type: "forbidden love", text: "Forbidden love rumors exist.", left: { text: "Ignore it.", effects: { religion: 0, people: -25, army: -15, economy: 0 } }, right: { text: "Confess.", effects: { religion: -15, people: +5, army: -20, economy: -10 } } }, { type: "festival", text: "Should a new year festival be held?", left: { text: "Yes.", effects: { religion: +5, people: +15, army: 0, economy: -15 } }, right: { text: "No.", effects: { religion: 0, people: -10, army: 0, economy: +10 } } }, { type: "siege", text: "The king is held hostage in a siege!", left: { text: "Pay ransom.", effects: { religion: 0, people: +5, army: 0, economy: -25 } }, right: { text: "Send rescue.", effects: { religion: +5, people: +10, army: -15, economy: 0 } } }, { type: "sailors", text: "Sailors discovered a new continent.", left: { text: "Establish colony.", effects: { religion: 0, people: +5, army: -10, economy: +20 } }, right: { text: "Call them back.", effects: { religion: +5, people: 0, army: +5, economy: 0 } } }, { type: "bandit", text: "A bandit is imitating you.", left: { text: "Capture him.", effects: { religion: 0, people: +5, army: +10, economy: 0 } }, right: { text: "Follow him.", effects: { religion: 0, people: 0, army: +5, economy: +15 } } }]) // Use original English cards plus new translations }, tr: { statLabels: { religion: 'Din', people: 'Halk', army: 'Ordu', economy: 'Ekonomi' }, reign: 'Saltanat: ', start: 'Başla', cards: [{ type: "nobles", text: "Güvenilir bir soylu hazineyi yönetmesine izin verirsen hazineyi ikiye katlayacağını teklif ediyor.", left: { text: "Teklifini kabul et.", effects: { religion: 0, people: -10, army: -10, economy: +25 } }, right: { text: "Reddet, kontrolü elinde tut.", effects: { religion: 0, people: 0, army: 0, economy: -5 } } }, { type: "nobles", text: "Bir soylu sana karşı komplo kurduğu suçuyla itham ediliyor.", left: { text: "Soyluyu sürgün et.", effects: { religion: 0, people: -10, army: +10, economy: 0 } }, right: { text: "Soyluya güven.", effects: { religion: 0, people: +5, army: -15, economy: 0 } } }, { type: "army", text: "Bir general daha fazla güç istiyor, darbe tehdidinde bulunuyor.", left: { text: "Daha fazla güç ver.", effects: { religion: 0, people: -10, army: +15, economy: -10 } }, right: { text: "Reddet.", effects: { religion: 0, people: 0, army: -15, economy: 0 } } }, { type: "army", text: "Bir general ordunu bir bedel karşılığında eğitmeyi teklif ediyor.", left: { text: "Eğitim için ödeme yap.", effects: { religion: 0, people: 0, army: +20, economy: -15 } }, right: { text: "Reddet.", effects: { religion: 0, people: 0, army: -10, economy: 0 } } }, { type: "clergy", text: "Bir rahip bir vizyon gördüğünü iddia ediyor: danışmanın bir hain.", left: { text: "Rahibe inan.", effects: { religion: +10, people: -10, army: 0, economy: 0 } }, right: { text: "İddiayı görmezden gel.", effects: { religion: -10, people: 0, army: 0, economy: 0 } } }, { type: "clergy", text: "Kilise gizli bir bağış istiyor.", left: { text: "Gizlice bağış yap.", effects: { religion: +15, people: -5, army: 0, economy: -15 } }, right: { text: "Reddet.", effects: { religion: -10, people: 0, army: 0, economy: 0 } } }, { type: "people", text: "Popüler bir lider huzursuzluk çıkarıyor.", left: { text: "Lideri tutuklat.", effects: { religion: 0, people: -15, army: +10, economy: 0 } }, right: { text: "Konuşmasına izin ver.", effects: { religion: 0, people: +10, army: -10, economy: 0 } } }, { type: "people", text: "Ülkeye kıtlık vurdu.", left: { text: "Kraliyet ambarlarını aç.", effects: { religion: 0, people: +20, army: 0, economy: -20 } }, right: { text: "Hiçbir şey yapma.", effects: { religion: 0, people: -20, army: 0, economy: 0 } } }, { type: "ekonomi", text: "Bir tüccar şüpheli derecede iyi bir anlaşma teklif ediyor.", left: { text: "Anlaşmayı kabul et.", effects: { religion: 0, people: 0, army: 0, economy: +20 } }, right: { text: "Reddet, çok riskli.", effects: { religion: 0, people: 0, army: 0, economy: -5 } } }, { type: "sapkın", text: "Bir sapkın huzursuzluk yayıyor.", left: { text: "Sapkını cezalandır.", effects: { religion: +10, people: -10, army: 0, economy: 0 } }, right: { text: "Merhamet göster.", effects: { religion: -10, people: +10, army: 0, economy: 0 } } }, { type: "felaket", text: "Büyük bir yangın başkenti harap ediyor.", left: { text: "Halka yardım gönder.", effects: { religion: +5, people: +10, army: 0, economy: -20 } }, right: { text: "Kendi başlarına yeniden inşa etsinler.", effects: { religion: -5, people: -10, army: 0, economy: 0 } } }, { type: "vergi", text: "Hazine azaldı. Vergileri artır?", left: { text: "Vergileri artır.", effects: { religion: 0, people: -15, army: 0, economy: +20 } }, right: { text: "Vergileri aynı tut.", effects: { religion: 0, people: 0, army: 0, economy: -10 } } }, { type: "veba", text: "Kırsal kesimlerde veba yayılıyor.", left: { text: "Köyleri karantinaya al.", effects: { religion: 0, people: -10, army: 0, economy: -10 } }, right: { text: "Kurtuluş için dua et.", effects: { religion: +10, people: -20, army: 0, economy: 0 } } }, { type: "clergy", text: "Krallıkta bir kutsal eser keşfedildi.", left: { text: "Kutsal eseri sergile.", effects: { religion: +15, people: +5, army: 0, economy: -10 } }, right: { text: "Kutsal eseri sat.", effects: { religion: -10, people: 0, army: 0, economy: +20 } } }, { type: "eşkıya", text: "Eşkıyalar kırsal kesimleri yağmalıyor.", left: { text: "Orduyu gönder.", effects: { religion: 0, people: 0, army: -10, economy: -5 } }, right: { text: "Yakalanmaları için ödül koy.", effects: { religion: 0, people: +5, army: 0, economy: -10 } } }, { type: "turnuva", text: "Şövalyeler kraliyet turnuvası istiyor.", left: { text: "Turnuvayı düzenle.", effects: { religion: 0, people: +10, army: +10, economy: -15 } }, right: { text: "Talebi reddet.", effects: { religion: 0, people: -5, army: -5, economy: 0 } } }, { type: "vergimuafiyeti", text: "Köylüler vergi muafiyeti için yalvarıyor.", left: { text: "Muafiyet tanı.", effects: { religion: 0, people: +15, army: 0, economy: -15 } }, right: { text: "Reddet.", effects: { religion: 0, people: -10, army: 0, economy: +10 } } }, { type: "saray", text: "Saray kedisi tahta zıpladı, halk bunu kutsal işaret sayıyor.", left: { text: "Kutsal ilan et.", effects: { religion: +15, people: +10, army: 0, economy: 0 } }, right: { text: "Saçmalık de.", effects: { religion: -10, people: -15, army: 0, economy: 0 } } }, { type: "hazine", text: "Hazineye 100 altın eklendi, ama nereden geldiği belli değil.", left: { text: "Kullan.", effects: { religion: 0, people: -10, army: -5, economy: +25 } }, right: { text: "Reddet.", effects: { religion: +5, people: +10, army: 0, economy: -15 } } }, { type: "army", text: "Saray muhafızları arasında turnuva düzenlensin mi?", left: { text: "Düzenle.", effects: { religion: 0, people: +5, army: +15, economy: -10 } }, right: { text: "Gerek yok.", effects: { religion: 0, people: 0, army: -5, economy: 0 } } }, { type: "danisan", text: "Bilge biri, 'Halk aç ama mutlu' diyor. Ne yapalım?", left: { text: "Sorun yok.", effects: { religion: 0, people: -25, army: -10, economy: 0 } }, right: { text: "Yemek dağıt.", effects: { religion: +5, people: +15, army: 0, economy: -20 } } }, { type: "vergi", text: "Yeni bir vergi sistemi önerildi: Soylular daha çok ödeyecek.", left: { text: "Uygula.", effects: { religion: 0, people: +15, army: -10, economy: +20 } }, right: { text: "Boşver.", effects: { religion: 0, people: -15, army: 0, economy: -10 } } }, { type: "saray", text: "Saray bahçesine dev bir heykel yapılması önerildi.", left: { text: "Onayla.", effects: { religion: +5, people: +10, army: 0, economy: -20 } }, right: { text: "Gereksiz.", effects: { religion: 0, people: -5, army: 0, economy: +10 } } }, { type: "olaylar", text: "Gökyüzü kırmızıya döndü. Ne yapalım?", left: { text: "Dua edin.", effects: { religion: -10, people: -20, army: -15, economy: -10 } }, right: { text: "Bilginlere sorun.", effects: { religion: +5, people: +15, army: 0, economy: 0 } } }, { type: "saray", text: "Kraliçenin kardeşi seni ziyarete geliyor.", left: { text: "Ağırlayın.", effects: { religion: -5, people: -10, army: 0, economy: -15 } }, right: { text: "Görüşme.", effects: { religion: 0, people: +5, army: 0, economy: 0 } } }, { type: "kandirmaca", text: "Kral kuşları sever, sen de sever misin?", left: { text: "Evet.", effects: { religion: -50, people: -50, army: -50, economy: -50 } }, right: { text: "Hayır.", effects: { religion: 0, people: -15, army: 0, economy: 0 } } }, { type: "keşiş", text: "Bir grup keşiş, sarayda sürekli mum yakıyor.", left: { text: "Serbest bırak.", effects: { religion: +15, people: +10, army: 0, economy: 0 } }, right: { text: "Yasakla.", effects: { religion: -10, people: -5, army: +10, economy: 0 } } }, { type: "filozof", text: "Yabancı bir filozof 'Kral sadece semboldür' dedi.", left: { text: "Sürgün et.", effects: { religion: 0, people: +5, army: +10, economy: -5 } }, right: { text: "Düşünceler özgür.", effects: { religion: +5, people: -10, army: 0, economy: 0 } } }, { type: "veba", text: "Köyde veba baş gösterdi.", left: { text: "Karantina uygula.", effects: { religion: 0, people: -5, army: 0, economy: -10 } }, right: { text: "Umursama.", effects: { religion: -5, people: -20, army: 0, economy: 0 } } }, { type: "para", text: "Yeni para birimi önerildi.", left: { text: "Kabul et.", effects: { religion: 0, people: +5, army: 0, economy: +15 } }, right: { text: "Reddet.", effects: { religion: 0, people: 0, army: 0, economy: +5 } } }, { type: "mutfak", text: "Saray mutfağında zehirli yemek paniği!", left: { text: "Aşçıyı idam et.", effects: { religion: 0, people: -15, army: +5, economy: 0 } }, right: { text: "Araştırın.", effects: { religion: +5, people: +10, army: 0, economy: -5 } } }, { type: "tapınak", text: "Tapınak tamiri için para lazım.", left: { text: "Ver.", effects: { religion: +15, people: +5, army: 0, economy: -15 } }, right: { text: "Verme.", effects: { religion: -10, people: -5, army: 0, economy: 0 } } }, { type: "scandal", text: "Bir kadın, senin çocuğunu taşıdığını iddia ediyor.", left: { text: "Kabul et.", effects: { religion: -10, people: -5, army: -15, economy: -10 } }, right: { text: "Reddet.", effects: { religion: 0, people: -10, army: 0, economy: 0 } } }, { type: "spy", text: "Sarayda casus bulundu.", left: { text: "Sorgula.", effects: { religion: 0, people: 0, army: +10, economy: +5 } }, right: { text: "İdam et.", effects: { religion: +5, people: -5, army: +5, economy: 0 } } }, { type: "army", text: "Ordu maaş istiyor.", left: { text: "Öde.", effects: { religion: 0, people: 0, army: +20, economy: -15 } }, right: { text: "Ertele.", effects: { religion: 0, people: 0, army: -20, economy: +5 } } }, { type: "religion", text: "Yeni bir dinî mezhep yayılıyor.", left: { text: "Yasakla.", effects: { religion: -15, people: -20, army: +10, economy: 0 } }, right: { text: "Serbest bırak.", effects: { religion: -10, people: +15, army: 0, economy: 0 } } }, { type: "artist", text: "Saray ressamı, çirkin bir portre yaptı.", left: { text: "Yakın.", effects: { religion: 0, people: -5, army: 0, economy: -10 } }, right: { text: "Sergileyin.", effects: { religion: 0, people: +10, army: 0, economy: 0 } } }, { type: "children", text: "Çocuklar için yeni oyun yasaklansın mı?", left: { text: "Evet.", effects: { religion: +10, people: +5, army: 0, economy: 0 } }, right: { text: "Hayır.", effects: { religion: 0, people: -15, army: 0, economy: 0 } } }, { type: "night", text: "Gece garip sesler geliyor.", left: { text: "Muhafız gönder.", effects: { religion: 0, people: +5, army: +10, economy: 0 } }, right: { text: "Bekle.", effects: { religion: 0, people: -15, army: -10, economy: 0 } } }, { type: "duel", text: "Komşu kral seni düelloya davet etti.", left: { text: "Kabul et.", effects: { religion: 0, people: +15, army: +10, economy: 0 } }, right: { text: "Reddet.", effects: { religion: 0, people: -10, army: -5, economy: 0 } } }, { type: "madman", text: "Bir deli kendini Mesih ilan etti.", left: { text: "Yakala.", effects: { religion: +5, people: -15, army: +5, economy: 0 } }, right: { text: "Takipçilerini izleyin.", effects: { religion: 0, people: +5, army: 0, economy: +10 } } }, { type: "tax", text: "Yüksek vergiler önerildi.", left: { text: "Onayla.", effects: { religion: 0, people: -20, army: 0, economy: +25 } }, right: { text: "Reddet.", effects: { religion: 0, people: +10, army: 0, economy: -15 } } }, { type: "göktaşı", text: "Göktaşı düştü, halk korkuyor.", left: { text: "Dua edin.", effects: { religion: +15, people: +5, army: 0, economy: 0 } }, right: { text: "Bilgin çağırın.", effects: { religion: +5, people: +15, army: 0, economy: 0 } } }, { type: "yasak aşk", text: "Yasak aşk söylentileri var.", left: { text: "Duymazdan gel.", effects: { religion: 0, people: -25, army: -15, economy: 0 } }, right: { text: "İtiraf et.", effects: { religion: -15, people: +5, army: -20, economy: -10 } } }, { type: "festival", text: "Yeni yıl festivali yapılacak mı?", left: { text: "Evet.", effects: { religion: +5, people: +15, army: 0, economy: -15 } }, right: { text: "Hayır.", effects: { religion: 0, people: -10, army: 0, economy: +10 } } }, { type: "kuşatma", text: "Kral kuşatmada rehin kaldı!", left: { text: "Fidye öde.", effects: { religion: 0, people: +5, army: 0, economy: -25 } }, right: { text: "Kurtarma gönder.", effects: { religion: +5, people: +10, army: -15, economy: 0 } } }, { type: "denizciler", text: "Denizciler yeni kıta keşfetti.", left: { text: "Koloni kur.", effects: { religion: 0, people: +5, army: -10, economy: +20 } }, right: { text: "Geri çağır.", effects: { religion: +5, people: 0, army: +5, economy: 0 } } }, { type: "haydut", text: "Bir haydut seni taklit ediyor.", left: { text: "Yakala.", effects: { religion: 0, people: +5, army: +10, economy: 0 } }, right: { text: "Takip et.", effects: { religion: 0, people: 0, army: +5, economy: +15 } } }, { type: "ejderha", text: "Kral! Altınlarımı geri vermezsen köylerini kül ederim.", left: { text: "Ver altınlarını.", effects: { religion: 0, people: +5, army: 0, economy: -15 } }, right: { text: "Korumaya al köyleri.", effects: { religion: 0, people: 0, army: -10, economy: 0 } } }, { type: "ejderha", text: "Ejderha yumurtam çalındı! Bunu sen mi yaptın?", left: { text: "Hayır, biz yapmadık.", effects: { religion: 0, people: 0, army: 0, economy: 0 } }, right: { text: "Evet, şimdi bizim.", effects: { religion: 0, people: -10, army: -15, economy: 0 } } }, { type: "ejderha", text: "Krallığına uçacağım ve gökte adını haykıracağım!", left: { text: "Harika fikir!", effects: { religion: 0, people: +15, army: 0, economy: 0 } }, right: { text: "Yasaklıyorum!", effects: { religion: 0, people: 0, army: 0, economy: -10 } } }, { type: "ejderha", text: "Ejderhalar için festival düzenle, seni tanıyalım.", left: { text: "Festival yap.", effects: { religion: 0, people: +10, army: 0, economy: -15 } }, right: { text: "Reddet.", effects: { religion: 0, people: -5, army: 0, economy: 0 } } }, { type: "ejderha", text: "Bir şövalyen beni avlamaya çalıştı, hesap soracağım!", left: { text: "Özür dileriz.", effects: { religion: 0, people: +5, army: 0, economy: 0 } }, right: { text: "Şövalyeyi koru.", effects: { religion: 0, people: 0, army: -15, economy: 0 } } }, { type: "kurt adam", text: "Ay doğduğunda içimdeki canavarı durduramıyorum!", left: { text: "Zincirle onu.", effects: { religion: 0, people: 0, army: -10, economy: 0 } }, right: { text: "Serbest bırak.", effects: { religion: 0, people: -15, army: 0, economy: 0 } } }, { type: "kurt adam", text: "Beni orduya al, savaşta işe yararım.", left: { text: "Kabul et.", effects: { religion: 0, people: 0, army: +15, economy: 0 } }, right: { text: "Tehlikelisin, olmaz.", effects: { religion: 0, people: +5, army: 0, economy: 0 } } }, { type: "kurt adam", text: "Ormanda insanlar av yapıyor, bu benim bölgem!", left: { text: "Yasakla avlanmayı.", effects: { religion: 0, people: -10, army: 0, economy: 0 } }, right: { text: "Devam etsinler.", effects: { religion: 0, people: 0, army: -5, economy: 0 } } }, { type: "kurt adam", text: "Beni halktan biriyle evlendirin, barış olsun.", left: { text: "İzin ver.", effects: { religion: 0, people: +10, army: 0, economy: 0 } }, right: { text: "Olmaz!", effects: { religion: 0, people: 0, army: -10, economy: 0 } } }, { type: "kurt adam", text: "Diğer kurtlar da krallığına geliyor.", left: { text: "Kabul et, yer ver.", effects: { religion: 0, people: -5, army: 0, economy: -10 } }, right: { text: "Sınırda durdur.", effects: { religion: 0, people: 0, army: -15, economy: 0 } } }, { type: "cadı", text: "Yıldızlar kötü işaretler gösteriyor. Kan mı dökülecek?", left: { text: "Önlem al.", effects: { religion: 0, people: +5, army: 0, economy: -15 } }, right: { text: "Boş kehanet!", effects: { religion: 0, people: -10, army: 0, economy: 0 } } }, { type: "cadı", text: "Kraliçenin üzerindeki büyüyü kaldırabilirim.", left: { text: "Yardım et.", effects: { religion: 0, people: +10, army: 0, economy: -10 } }, right: { text: "Karışma saraya.", effects: { religion: 0, people: -5, army: 0, economy: 0 } } }, { type: "cadı", text: "Bir tılsım istiyorum, karşılığında yağmuru getiririm.", left: { text: "Ver tılsımı.", effects: { religion: 0, people: +15, army: 0, economy: -10 } }, right: { text: "Reddet.", effects: { religion: 0, people: -15, army: 0, economy: 0 } } }, { type: "cadı", text: "Karanlık güçlerle konuştum, düşman geliyor.", left: { text: "Savunmayı güçlendir.", effects: { religion: 0, people: 0, army: -10, economy: -5 } }, right: { text: "Umursama.", effects: { religion: 0, people: 0, army: -15, economy: 0 } } }, { type: "cadı", text: "Senin geleceğini görebilirim ama korkarsın.", left: { text: "Söyle kaderimi!", effects: { religion: -10, people: +15, army: +10, economy: -20 } }, right: { text: "Sus ve git.", effects: { religion: 0, people: 0, army: 0, economy: 0 } } }] }, fr: { statLabels: { religion: 'Religion', people: 'Peuple', army: 'Armée', economy: 'Économie' }, reign: 'Règne: ', start: 'Commencer', cards: cards.concat([]) // Use English cards for now }, es: { statLabels: { religion: 'Religión', people: 'Pueblo', army: 'Ejército', economy: 'Economía' }, reign: 'Reinado: ', start: 'Comenzar', cards: cards.concat([]) // Use English cards for now } }; // Set language and update UI function setLanguage(lang) { selectedLanguage = lang; // Update stat labels var labels = languageData[lang].statLabels; for (var i = 0; i < statNames.length; i++) { if (statIcons[statNames[i]] && statIcons[statNames[i]].label) { statIcons[statNames[i]].label.setText(labels[statNames[i]]); } } // Update reign text reignText.setText(languageData[lang].reign + reign); // Update reign year text if (lang === "tr") { reignYearText.setText(reignYear + ' yıl'); } else if (lang === "fr") { reignYearText.setText(reignYear + ' années'); } else if (lang === "es") { reignYearText.setText(reignYear + ' años'); } else { reignYearText.setText(reignYear + ' years'); } // Update start button text startBtnText.setText(languageData[lang].start); // Update max years hint text var maxYears = storage.maxYears || 0; if (lang === "tr") { maxYearsText.setText('En Uzun Hüküm Yılı: ' + maxYears + ' yıl'); } else if (lang === "fr") { maxYearsText.setText('Plus Long Règne: ' + maxYears + ' années'); } else if (lang === "es") { maxYearsText.setText('Reinado Más Largo: ' + maxYears + ' años'); } else { maxYearsText.setText('Longest Reign Year: ' + maxYears + ' years'); } } // Override startGame to use selected language startGame = function startGame() { setGameUIVisible(true); menuContainer.visible = false; // Use language-specific cards - create shuffled deck deck = shuffleCards(languageData[selectedLanguage].cards); cardIndex = 0; usedCards = []; // Reset used cards tracking // Update stat labels and reign text setLanguage(selectedLanguage); // Reset stats stats.religion = 60; stats.people = 60; stats.army = 60; stats.economy = 60; reign = 0; reignYear = 0; cardsAnswered = 0; updateStatBars(); reignText.setText(languageData[selectedLanguage].reign + reign); clearCard(); showNextCard(); }; // Test sound initialization and playback console.log("Testing sound initialization..."); try { var testButton = LK.getSound('Buton'); var testCards = LK.getSound('Cards'); var testMenu = LK.getMusic('Menu1'); var testStart = LK.getMusic('Start1'); console.log("Buton sound:", testButton); console.log("Cards sound:", testCards); console.log("Menu1 music:", testMenu); console.log("Start1 music:", testStart); // Test if sounds are loaded properly if (testButton) { console.log("Buton sound loaded successfully"); } else { console.log("ERROR: Buton sound failed to load"); } if (testCards) { console.log("Cards sound loaded successfully"); } else { console.log("ERROR: Cards sound failed to load"); } } catch (e) { console.log("ERROR loading sounds:", e); } // On game over, show menu again LK.on('gameover', function () { // Update max years record if new record was set var currentMaxYears = storage.maxYears || 0; if (reignYear > currentMaxYears) { storage.maxYears = reignYear; } // Update hint text var maxYears = storage.maxYears || 0; if (selectedLanguage === "tr") { maxYearsText.setText('En Uzun Hüküm Yılı: ' + maxYears + ' yıl'); } else if (selectedLanguage === "fr") { maxYearsText.setText('Plus Long Règne: ' + maxYears + ' années'); } else if (selectedLanguage === "es") { maxYearsText.setText('Reinado Más Largo: ' + maxYears + ' años'); } else { maxYearsText.setText('Longest Reign Year: ' + maxYears + ' years'); } setGameUIVisible(false); menuContainer.visible = true; // Reset language selection UI for (var j = 0; j < langButtons.length; j++) { langButtons[j].children[0].alpha = languages[j].code === selectedLanguage ? 1 : 0.7; } }); // On you win, show menu again (future expansion) LK.on('youwin', function () { setGameUIVisible(false); menuContainer.visible = true; for (var j = 0; j < langButtons.length; j++) { langButtons[j].children[0].alpha = languages[j].code === selectedLanguage ? 1 : 0.7; } }); // Show menu at start setGameUIVisible(false); menuContainer.visible = true; // Set default language to English setLanguage('en'); // Try to play menu music with error handling try { console.log("Attempting to play Menu1 music..."); LK.playMusic('Menu1'); console.log("Menu1 music started successfully"); } catch (e) { console.log("ERROR playing Menu1 music:", e); } ;
===================================================================
--- original.js
+++ change.js
@@ -192,12 +192,12 @@
/****
* Game Code
****/
-// Stat bar backgrounds and fills
-// Card background shapes
-// --- Game Data ---
// List of cards (minimal set for MVP, can be expanded)
+// --- Game Data ---
+// Card background shapes
+// Stat bar backgrounds and fills
var cards = [
// Essential nobility cards (betrayal/trust)
{
type: "nobility",
@@ -802,8 +802,12 @@
cardsAnswered = 0;
usedCards = []; // Reset used cards tracking
if (selectedLanguage === "tr") {
reignYearText.setText('0 yıl');
+ } else if (selectedLanguage === "fr") {
+ reignYearText.setText('0 années');
+ } else if (selectedLanguage === "es") {
+ reignYearText.setText('0 años');
} else {
reignYearText.setText('0 years');
}
cardIndex = 0;
@@ -1008,15 +1012,23 @@
storage.maxYears = reignYear;
// Update max years display in menu
if (selectedLanguage === "tr") {
maxYearsText.setText('En Uzun Hüküm Yılı: ' + reignYear + ' yıl');
+ } else if (selectedLanguage === "fr") {
+ maxYearsText.setText('Plus Long Règne: ' + reignYear + ' années');
+ } else if (selectedLanguage === "es") {
+ maxYearsText.setText('Reinado Más Largo: ' + reignYear + ' años');
} else {
maxYearsText.setText('Longest Reign Year: ' + reignYear + ' years');
}
}
// Update reign year display
if (selectedLanguage === "tr") {
reignYearText.setText(reignYear + ' yıl');
+ } else if (selectedLanguage === "fr") {
+ reignYearText.setText(reignYear + ' années');
+ } else if (selectedLanguage === "es") {
+ reignYearText.setText(reignYear + ' años');
} else {
reignYearText.setText(reignYear + ' years');
}
}
@@ -1329,8 +1341,14 @@
var languages = [{
code: 'en',
label: 'English'
}, {
+ code: 'fr',
+ label: 'Français'
+}, {
+ code: 'es',
+ label: 'Español'
+}, {
code: 'tr',
label: 'Türkçe'
}];
var selectedLanguage = 'en'; // Default language is English
@@ -1355,10 +1373,26 @@
btnText.anchor.set(0.5, 0.5);
btnText.x = 0;
btnText.y = 0;
btn.addChild(btnText);
- btn.x = (i - 0.5) * 600;
- btn.y = -200;
+ // Position French above English, Spanish above Turkish
+ if (i === 0) {
+ // English
+ btn.x = -300;
+ btn.y = -100;
+ } else if (i === 1) {
+ // French
+ btn.x = -300;
+ btn.y = -220;
+ } else if (i === 2) {
+ // Spanish
+ btn.x = 300;
+ btn.y = -220;
+ } else if (i === 3) {
+ // Turkish
+ btn.x = 300;
+ btn.y = -100;
+ }
btn.interactive = true;
btn.buttonMode = true;
(function (code, idx) {
btn.down = function (x, y, obj) {
@@ -1383,8 +1417,12 @@
// Update max years hint text based on selected language
var maxYears = storage.maxYears || 0;
if (selectedLanguage === "tr") {
maxYearsText.setText('En Uzun Hüküm Yılı: ' + maxYears + ' yıl');
+ } else if (selectedLanguage === "fr") {
+ maxYearsText.setText('Plus Long Règne: ' + maxYears + ' années');
+ } else if (selectedLanguage === "es") {
+ maxYearsText.setText('Reinado Más Largo: ' + maxYears + ' años');
} else {
maxYearsText.setText('Longest Reign Year: ' + maxYears + ' years');
}
};
@@ -3979,8 +4017,30 @@
economy: 0
}
}
}]
+ },
+ fr: {
+ statLabels: {
+ religion: 'Religion',
+ people: 'Peuple',
+ army: 'Armée',
+ economy: 'Économie'
+ },
+ reign: 'Règne: ',
+ start: 'Commencer',
+ cards: cards.concat([]) // Use English cards for now
+ },
+ es: {
+ statLabels: {
+ religion: 'Religión',
+ people: 'Pueblo',
+ army: 'Ejército',
+ economy: 'Economía'
+ },
+ reign: 'Reinado: ',
+ start: 'Comenzar',
+ cards: cards.concat([]) // Use English cards for now
}
};
// Set language and update UI
function setLanguage(lang) {
@@ -3996,8 +4056,12 @@
reignText.setText(languageData[lang].reign + reign);
// Update reign year text
if (lang === "tr") {
reignYearText.setText(reignYear + ' yıl');
+ } else if (lang === "fr") {
+ reignYearText.setText(reignYear + ' années');
+ } else if (lang === "es") {
+ reignYearText.setText(reignYear + ' años');
} else {
reignYearText.setText(reignYear + ' years');
}
// Update start button text
@@ -4005,8 +4069,12 @@
// Update max years hint text
var maxYears = storage.maxYears || 0;
if (lang === "tr") {
maxYearsText.setText('En Uzun Hüküm Yılı: ' + maxYears + ' yıl');
+ } else if (lang === "fr") {
+ maxYearsText.setText('Plus Long Règne: ' + maxYears + ' années');
+ } else if (lang === "es") {
+ maxYearsText.setText('Reinado Más Largo: ' + maxYears + ' años');
} else {
maxYearsText.setText('Longest Reign Year: ' + maxYears + ' years');
}
}
@@ -4068,8 +4136,12 @@
// Update hint text
var maxYears = storage.maxYears || 0;
if (selectedLanguage === "tr") {
maxYearsText.setText('En Uzun Hüküm Yılı: ' + maxYears + ' yıl');
+ } else if (selectedLanguage === "fr") {
+ maxYearsText.setText('Plus Long Règne: ' + maxYears + ' années');
+ } else if (selectedLanguage === "es") {
+ maxYearsText.setText('Reinado Más Largo: ' + maxYears + ' años');
} else {
maxYearsText.setText('Longest Reign Year: ' + maxYears + ' years');
}
setGameUIVisible(false);
bir din adamı simgesi beyaz olsun içi oyuncun kararına göre dolub boşalacak her hangi bir terinde hiç bir dinle alakalı din simvolu bulunmasın. In-Game asset. 2d. High contrast. No shadows
2 çapraz bir birne girmiş kılıç simgesi olacak beyaz olsun. In-Game asset. 2d. High contrast. No shadows
3 tane insan profil resmi 1 tane önde 2 arkada kalıyor beyaz olsun. In-Game asset. 2d. High contrast. No shadows
sadece beyaz rengte olan basit dolar simgesi. In-Game asset. 2d. High contrast. No shadows
Gerçek hayata yakın bir menü arka planı istiyorum. Yeşil doğa, çimenlikler ve taş yollar olsun. Uzakta bir kale ya da yapı görünsün. Gökyüzü mavi ve açık olsun, hava gündüz gibi. Renkler doğal tonlarda olsun, altın veya süslü detaylar olmasın. Arka plan sade ve huzurlu bir ortam sunsun, ortası menü için boş ve hafif koyu olabilir.. In-Game asset. 2d. High contrast. No shadows
Krallık oyunu başladıktan sonra kullanılacak, arka planda bir kale olan ama çok karanlık veya kasvetli görünmeyen, hafif sisli ve tarihi atmosferli bir sahne. Gökyüzü açık ya da hafif bulutlu, renkler doğal ve dengeli olmalı.”
dikdörtgen olsun içi notsarjik rengde olsun buton olarak kullanılacak genişliği uzun hiç bir yazı içermesin. In-Game asset. 2d. High contrast. No shadows
sade 1 tane kraliyet kalesi 2 tane gözcü yeri olsun beyaz renkte olsun. In-Game asset. 2d. High contrast. No shadows