/****
* Plugins
****/
var tween = LK.import("@upit/tween.v1");
/****
* Classes
****/
var Character = Container.expand(function (name, type, responses) {
var self = Container.call(this);
self.characterName = name;
self.personalityType = type;
self.responses = responses;
return self;
});
var DialogueChoice = Container.expand(function (text, effect, callback) {
var self = Container.call(this);
var button = self.attachAsset('choiceButton', {
anchorX: 0.5,
anchorY: 0.5
});
var choiceText = new Text2(text, {
size: 75,
fill: 0x333333
});
choiceText.anchor.set(0.5, 0.5);
self.addChild(choiceText);
self.effect = effect;
self.callback = callback;
self.down = function () {
LK.getSound('click').play();
self.callback();
};
return self;
});
var HeartMeter = Container.expand(function () {
var self = Container.call(this);
var background = self.attachAsset('heartMeterBg', {
anchorX: 0,
anchorY: 0.5
});
var fill = self.attachAsset('heartMeterFill', {
anchorX: 0,
anchorY: 0.5,
x: 5,
y: 0
});
var label = new Text2("Heart Meter", {
size: 70,
fill: 0x333333
});
label.anchor.set(0.5, 0.5);
label.x = 300;
label.y = -50;
self.addChild(label);
var percentText = new Text2("50%", {
size: 65,
fill: 0x333333
});
percentText.anchor.set(0.5, 0.5);
percentText.x = 300;
percentText.y = 80;
self.addChild(percentText);
self.currentPercent = 50;
self.updateMeter = function (newPercent) {
self.currentPercent = Math.max(0, Math.min(100, newPercent));
var newWidth = self.currentPercent / 100 * 590;
tween(fill, {
width: newWidth
}, {
duration: 500
});
percentText.setText(self.currentPercent + "%");
if (self.currentPercent > 50) {
tween(fill, {
tint: 0xff69b4
}, {
duration: 300
});
} else if (self.currentPercent < 30) {
tween(fill, {
tint: 0xff4444
}, {
duration: 300
});
}
};
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0xf0e6d2
});
/****
* Game Code
****/
// Game state variables
var gameState = "characterSelect"; // "characterSelect", "dating", "gameOver"
var selectedCharacter = null;
var currentDialogue = 0;
var heartMeter = null;
var dialogueContainer = null;
var characterPortrait = null;
var dialogueText = null;
var choicesContainer = null;
// Character data with personality types and dialogue responses
var characters = [
// Girls
{
name: "Emma",
type: "The Intellectual",
responses: {
positive: ["That's fascinating!", "I love deep conversations!", "You're so thoughtful!"],
negative: ["Hmm, okay...", "That's... interesting.", "I see..."],
neutral: ["Tell me more.", "What do you think?", "That's nice."]
}
}, {
name: "Sofia",
type: "The Adventurer",
responses: {
positive: ["That sounds amazing!", "I'm up for anything!", "Let's do it!"],
negative: ["That sounds boring...", "Not really my thing.", "Maybe something else?"],
neutral: ["Could be fun.", "What else?", "Interesting..."]
}
}, {
name: "Lily",
type: "The Romantic",
responses: {
positive: ["How sweet!", "That's so romantic!", "You're amazing!"],
negative: ["Oh...", "That's not very romantic.", "I was hoping for something else."],
neutral: ["That's nice.", "What do you think about love?", "Tell me more."]
}
}, {
name: "Maya",
type: "The Creative",
responses: {
positive: ["That's so creative!", "I love artistic minds!", "Beautiful idea!"],
negative: ["That's pretty conventional.", "Not very original.", "Hmm, okay."],
neutral: ["Interesting perspective.", "What inspires you?", "That's nice."]
}
}, {
name: "Zoe",
type: "The Pragmatic",
responses: {
positive: ["That makes sense!", "Very practical!", "Good thinking!"],
negative: ["That's not realistic.", "Seems impractical.", "I don't think so."],
neutral: ["Maybe.", "What's your plan?", "Could work."]
}
},
// Boys
{
name: "Alex",
type: "The Charmer",
responses: {
positive: ["You're incredible!", "I like your style!", "Smooth!"],
negative: ["Try harder than that.", "Not impressed.", "Really?"],
neutral: ["Not bad.", "What else you got?", "Interesting."]
}
}, {
name: "Ryan",
type: "The Athlete",
responses: {
positive: ["That's awesome!", "I respect that drive!", "Strong choice!"],
negative: ["Not very active.", "That's weak.", "Come on..."],
neutral: ["Cool.", "What's your game?", "Alright."]
}
}, {
name: "Daniel",
type: "The Sensitive",
responses: {
positive: ["That's beautiful.", "You understand me.", "So sweet..."],
negative: ["That hurt...", "Why would you say that?", "That's harsh."],
neutral: ["I appreciate that.", "Tell me how you feel.", "That's okay."]
}
}, {
name: "Marcus",
type: "The Ambitious",
responses: {
positive: ["Now we're talking!", "I like your ambition!", "Great goals!"],
negative: ["Think bigger.", "That's not ambitious enough.", "Aim higher."],
neutral: ["What's your plan?", "Interesting goal.", "Could work."]
}
}, {
name: "Jake",
type: "The Humorous",
responses: {
positive: ["Haha, you're funny!", "I love your humor!", "That's hilarious!"],
negative: ["That's not funny.", "Try again.", "Seriously?"],
neutral: ["Ha, okay.", "You're alright.", "Cute."]
}
}];
// Dialogue scenarios with different personality preferences
var dialogueScenarios = [{
prompt: "So, what do you like to do for fun?",
choices: [{
text: "I love reading philosophy books and having deep discussions",
type: "intellectual",
effect: 10
}, {
text: "Rock climbing, skydiving, anything adventurous!",
type: "adventurer",
effect: 10
}, {
text: "I enjoy creative hobbies like painting and writing poetry",
type: "creative",
effect: 10
}, {
text: "Making people laugh with my amazing jokes!",
type: "humorous",
effect: 10
}]
}, {
prompt: "What's your ideal weekend?",
choices: [{
text: "A romantic picnic under the stars",
type: "romantic",
effect: 8
}, {
text: "Planning my next business venture",
type: "ambitious",
effect: 8
}, {
text: "Hiking a challenging mountain trail",
type: "athlete",
effect: 8
}, {
text: "Staying in and having meaningful conversations",
type: "sensitive",
effect: 8
}]
}, {
prompt: "If you could travel anywhere, where would you go?",
choices: [{
text: "Paris - the city of love and romance",
type: "romantic",
effect: 7
}, {
text: "The Amazon rainforest for an epic adventure",
type: "adventurer",
effect: 7
}, {
text: "A library in Alexandria to study ancient texts",
type: "intellectual",
effect: 7
}, {
text: "Wherever makes financial sense",
type: "pragmatic",
effect: 7
}]
}, {
prompt: "What's most important in a relationship?",
choices: [{
text: "Deep emotional connection and understanding",
type: "sensitive",
effect: 9
}, {
text: "Having fun and laughing together",
type: "humorous",
effect: 9
}, {
text: "Supporting each other's dreams and ambitions",
type: "ambitious",
effect: 9
}, {
text: "Practical compatibility and shared values",
type: "pragmatic",
effect: 9
}]
}, {
prompt: "How do you handle stress?",
choices: [{
text: "I work out and stay physically active",
type: "athlete",
effect: 6
}, {
text: "I express myself through art or creativity",
type: "creative",
effect: 6
}, {
text: "I charm my way out of difficult situations",
type: "charmer",
effect: 6
}, {
text: "I analyze the problem logically",
type: "intellectual",
effect: 6
}]
}];
function createCharacterSelectScreen() {
var title = new Text2("Choose Your Date", {
size: 120,
fill: 0x8B4513
});
title.anchor.set(0.5, 0.5);
title.x = 1024;
title.y = 200;
game.addChild(title);
var subtitle = new Text2("Each character has a unique personality to discover!", {
size: 70,
fill: 0xA0522D
});
subtitle.anchor.set(0.5, 0.5);
subtitle.x = 1024;
subtitle.y = 280;
game.addChild(subtitle);
// Create character selection buttons
for (var i = 0; i < characters.length; i++) {
var _char = characters[i];
var button = new Container();
var buttonAssetName = 'characterButton' + _char.name;
var buttonBg = button.attachAsset(buttonAssetName, {
anchorX: 0.5,
anchorY: 0.5
});
var nameText = new Text2(_char.name, {
size: 75,
fill: 0x654321
});
nameText.anchor.set(0.5, 0.5);
nameText.y = 260;
button.addChild(nameText);
var typeText = new Text2(_char.type, {
size: 50,
fill: 0x8B4513
});
typeText.anchor.set(0.5, 0.5);
typeText.y = 340;
button.addChild(typeText);
// Position buttons in grid
var col = i % 5;
var row = Math.floor(i / 5);
button.x = 300 + col * 340;
button.y = 600 + row * 800;
// Store character reference
button.characterData = _char;
button.down = function () {
LK.getSound('click').play();
selectedCharacter = this.characterData;
startDatingScene();
};
game.addChild(button);
}
}
function startDatingScene() {
// Clear character select screen
while (game.children.length > 0) {
game.removeChild(game.children[0]);
}
gameState = "dating";
currentDialogue = 0;
// Create dating scene UI
var background = game.attachAsset('background', {
anchorX: 0,
anchorY: 0
});
// Character portrait
var portraitAssetName = 'portrait' + selectedCharacter.name;
characterPortrait = game.attachAsset(portraitAssetName, {
anchorX: 0.5,
anchorY: 0.5,
x: 1024,
y: 730
});
var nameLabel = new Text2(selectedCharacter.name, {
size: 90,
fill: 0x8B4513
});
nameLabel.anchor.set(0.5, 0.5);
nameLabel.x = 1024;
nameLabel.y = 180;
game.addChild(nameLabel);
var typeLabel = new Text2(selectedCharacter.type, {
size: 65,
fill: 0xA0522D
});
typeLabel.anchor.set(0.5, 0.5);
typeLabel.x = 1024;
typeLabel.y = 290;
game.addChild(typeLabel);
// Heart meter
heartMeter = new HeartMeter();
heartMeter.x = 724;
heartMeter.y = 1070;
game.addChild(heartMeter);
// Dialogue container
dialogueContainer = new Container();
dialogueContainer.x = 1024;
dialogueContainer.y = 1400;
game.addChild(dialogueContainer);
// Dialogue box
var dialogueBox = dialogueContainer.attachAsset('dialogueBox', {
anchorX: 0.5,
anchorY: 0.5
});
dialogueText = new Text2("", {
size: 70,
fill: 0x333333
});
dialogueText.anchor.set(0.5, 0.5);
dialogueContainer.addChild(dialogueText);
// Choices container
choicesContainer = new Container();
choicesContainer.x = 1024;
choicesContainer.y = 1800;
game.addChild(choicesContainer);
showNextDialogue();
}
function showNextDialogue() {
if (currentDialogue >= dialogueScenarios.length) {
endGame();
return;
}
var scenario = dialogueScenarios[currentDialogue];
dialogueText.setText(scenario.prompt);
// Clear previous choices
while (choicesContainer.children.length > 0) {
choicesContainer.removeChild(choicesContainer.children[0]);
}
// Create choice buttons
for (var i = 0; i < scenario.choices.length; i++) {
var choice = scenario.choices[i];
var choiceButton = new DialogueChoice(choice.text, choice.effect, function (selectedChoice) {
return function () {
handleChoice(selectedChoice);
};
}(choice));
choiceButton.y = i * 140;
choicesContainer.addChild(choiceButton);
}
}
function handleChoice(choice) {
// Calculate heart meter change based on personality match
var effect = 0;
var responseType = "neutral";
// Check if choice matches character's personality type
var personalityKey = selectedCharacter.type.toLowerCase().replace("the ", "");
if (choice.type === personalityKey) {
effect = choice.effect;
responseType = "positive";
LK.getSound('heartUp').play();
} else {
effect = -Math.floor(choice.effect / 2);
responseType = "negative";
LK.getSound('heartDown').play();
}
// Update heart meter
var newPercent = heartMeter.currentPercent + effect;
heartMeter.updateMeter(newPercent);
// Show character response
var responses = selectedCharacter.responses[responseType];
var randomResponse = responses[Math.floor(Math.random() * responses.length)];
dialogueText.setText(randomResponse);
// Check win/lose conditions
if (heartMeter.currentPercent >= 100) {
LK.setTimeout(function () {
showWin();
}, 2000);
return;
} else if (heartMeter.currentPercent <= 0) {
LK.setTimeout(function () {
showLose();
}, 2000);
return;
}
currentDialogue++;
// Continue to next dialogue after delay
LK.setTimeout(function () {
showNextDialogue();
}, 2500);
}
function showWin() {
LK.showYouWin();
}
function showLose() {
LK.showGameOver();
}
function endGame() {
if (heartMeter.currentPercent >= 100) {
showWin();
} else {
showLose();
}
}
// Initialize the game
createCharacterSelectScreen(); /****
* Plugins
****/
var tween = LK.import("@upit/tween.v1");
/****
* Classes
****/
var Character = Container.expand(function (name, type, responses) {
var self = Container.call(this);
self.characterName = name;
self.personalityType = type;
self.responses = responses;
return self;
});
var DialogueChoice = Container.expand(function (text, effect, callback) {
var self = Container.call(this);
var button = self.attachAsset('choiceButton', {
anchorX: 0.5,
anchorY: 0.5
});
var choiceText = new Text2(text, {
size: 75,
fill: 0x333333
});
choiceText.anchor.set(0.5, 0.5);
self.addChild(choiceText);
self.effect = effect;
self.callback = callback;
self.down = function () {
LK.getSound('click').play();
self.callback();
};
return self;
});
var HeartMeter = Container.expand(function () {
var self = Container.call(this);
var background = self.attachAsset('heartMeterBg', {
anchorX: 0,
anchorY: 0.5
});
var fill = self.attachAsset('heartMeterFill', {
anchorX: 0,
anchorY: 0.5,
x: 5,
y: 0
});
var label = new Text2("Heart Meter", {
size: 70,
fill: 0x333333
});
label.anchor.set(0.5, 0.5);
label.x = 300;
label.y = -50;
self.addChild(label);
var percentText = new Text2("50%", {
size: 65,
fill: 0x333333
});
percentText.anchor.set(0.5, 0.5);
percentText.x = 300;
percentText.y = 80;
self.addChild(percentText);
self.currentPercent = 50;
self.updateMeter = function (newPercent) {
self.currentPercent = Math.max(0, Math.min(100, newPercent));
var newWidth = self.currentPercent / 100 * 590;
tween(fill, {
width: newWidth
}, {
duration: 500
});
percentText.setText(self.currentPercent + "%");
if (self.currentPercent > 50) {
tween(fill, {
tint: 0xff69b4
}, {
duration: 300
});
} else if (self.currentPercent < 30) {
tween(fill, {
tint: 0xff4444
}, {
duration: 300
});
}
};
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0xf0e6d2
});
/****
* Game Code
****/
// Game state variables
var gameState = "characterSelect"; // "characterSelect", "dating", "gameOver"
var selectedCharacter = null;
var currentDialogue = 0;
var heartMeter = null;
var dialogueContainer = null;
var characterPortrait = null;
var dialogueText = null;
var choicesContainer = null;
// Character data with personality types and dialogue responses
var characters = [
// Girls
{
name: "Emma",
type: "The Intellectual",
responses: {
positive: ["That's fascinating!", "I love deep conversations!", "You're so thoughtful!"],
negative: ["Hmm, okay...", "That's... interesting.", "I see..."],
neutral: ["Tell me more.", "What do you think?", "That's nice."]
}
}, {
name: "Sofia",
type: "The Adventurer",
responses: {
positive: ["That sounds amazing!", "I'm up for anything!", "Let's do it!"],
negative: ["That sounds boring...", "Not really my thing.", "Maybe something else?"],
neutral: ["Could be fun.", "What else?", "Interesting..."]
}
}, {
name: "Lily",
type: "The Romantic",
responses: {
positive: ["How sweet!", "That's so romantic!", "You're amazing!"],
negative: ["Oh...", "That's not very romantic.", "I was hoping for something else."],
neutral: ["That's nice.", "What do you think about love?", "Tell me more."]
}
}, {
name: "Maya",
type: "The Creative",
responses: {
positive: ["That's so creative!", "I love artistic minds!", "Beautiful idea!"],
negative: ["That's pretty conventional.", "Not very original.", "Hmm, okay."],
neutral: ["Interesting perspective.", "What inspires you?", "That's nice."]
}
}, {
name: "Zoe",
type: "The Pragmatic",
responses: {
positive: ["That makes sense!", "Very practical!", "Good thinking!"],
negative: ["That's not realistic.", "Seems impractical.", "I don't think so."],
neutral: ["Maybe.", "What's your plan?", "Could work."]
}
},
// Boys
{
name: "Alex",
type: "The Charmer",
responses: {
positive: ["You're incredible!", "I like your style!", "Smooth!"],
negative: ["Try harder than that.", "Not impressed.", "Really?"],
neutral: ["Not bad.", "What else you got?", "Interesting."]
}
}, {
name: "Ryan",
type: "The Athlete",
responses: {
positive: ["That's awesome!", "I respect that drive!", "Strong choice!"],
negative: ["Not very active.", "That's weak.", "Come on..."],
neutral: ["Cool.", "What's your game?", "Alright."]
}
}, {
name: "Daniel",
type: "The Sensitive",
responses: {
positive: ["That's beautiful.", "You understand me.", "So sweet..."],
negative: ["That hurt...", "Why would you say that?", "That's harsh."],
neutral: ["I appreciate that.", "Tell me how you feel.", "That's okay."]
}
}, {
name: "Marcus",
type: "The Ambitious",
responses: {
positive: ["Now we're talking!", "I like your ambition!", "Great goals!"],
negative: ["Think bigger.", "That's not ambitious enough.", "Aim higher."],
neutral: ["What's your plan?", "Interesting goal.", "Could work."]
}
}, {
name: "Jake",
type: "The Humorous",
responses: {
positive: ["Haha, you're funny!", "I love your humor!", "That's hilarious!"],
negative: ["That's not funny.", "Try again.", "Seriously?"],
neutral: ["Ha, okay.", "You're alright.", "Cute."]
}
}];
// Dialogue scenarios with different personality preferences
var dialogueScenarios = [{
prompt: "So, what do you like to do for fun?",
choices: [{
text: "I love reading philosophy books and having deep discussions",
type: "intellectual",
effect: 10
}, {
text: "Rock climbing, skydiving, anything adventurous!",
type: "adventurer",
effect: 10
}, {
text: "I enjoy creative hobbies like painting and writing poetry",
type: "creative",
effect: 10
}, {
text: "Making people laugh with my amazing jokes!",
type: "humorous",
effect: 10
}]
}, {
prompt: "What's your ideal weekend?",
choices: [{
text: "A romantic picnic under the stars",
type: "romantic",
effect: 8
}, {
text: "Planning my next business venture",
type: "ambitious",
effect: 8
}, {
text: "Hiking a challenging mountain trail",
type: "athlete",
effect: 8
}, {
text: "Staying in and having meaningful conversations",
type: "sensitive",
effect: 8
}]
}, {
prompt: "If you could travel anywhere, where would you go?",
choices: [{
text: "Paris - the city of love and romance",
type: "romantic",
effect: 7
}, {
text: "The Amazon rainforest for an epic adventure",
type: "adventurer",
effect: 7
}, {
text: "A library in Alexandria to study ancient texts",
type: "intellectual",
effect: 7
}, {
text: "Wherever makes financial sense",
type: "pragmatic",
effect: 7
}]
}, {
prompt: "What's most important in a relationship?",
choices: [{
text: "Deep emotional connection and understanding",
type: "sensitive",
effect: 9
}, {
text: "Having fun and laughing together",
type: "humorous",
effect: 9
}, {
text: "Supporting each other's dreams and ambitions",
type: "ambitious",
effect: 9
}, {
text: "Practical compatibility and shared values",
type: "pragmatic",
effect: 9
}]
}, {
prompt: "How do you handle stress?",
choices: [{
text: "I work out and stay physically active",
type: "athlete",
effect: 6
}, {
text: "I express myself through art or creativity",
type: "creative",
effect: 6
}, {
text: "I charm my way out of difficult situations",
type: "charmer",
effect: 6
}, {
text: "I analyze the problem logically",
type: "intellectual",
effect: 6
}]
}];
function createCharacterSelectScreen() {
var title = new Text2("Choose Your Date", {
size: 120,
fill: 0x8B4513
});
title.anchor.set(0.5, 0.5);
title.x = 1024;
title.y = 200;
game.addChild(title);
var subtitle = new Text2("Each character has a unique personality to discover!", {
size: 70,
fill: 0xA0522D
});
subtitle.anchor.set(0.5, 0.5);
subtitle.x = 1024;
subtitle.y = 280;
game.addChild(subtitle);
// Create character selection buttons
for (var i = 0; i < characters.length; i++) {
var _char = characters[i];
var button = new Container();
var buttonAssetName = 'characterButton' + _char.name;
var buttonBg = button.attachAsset(buttonAssetName, {
anchorX: 0.5,
anchorY: 0.5
});
var nameText = new Text2(_char.name, {
size: 75,
fill: 0x654321
});
nameText.anchor.set(0.5, 0.5);
nameText.y = 260;
button.addChild(nameText);
var typeText = new Text2(_char.type, {
size: 50,
fill: 0x8B4513
});
typeText.anchor.set(0.5, 0.5);
typeText.y = 340;
button.addChild(typeText);
// Position buttons in grid
var col = i % 5;
var row = Math.floor(i / 5);
button.x = 300 + col * 340;
button.y = 600 + row * 800;
// Store character reference
button.characterData = _char;
button.down = function () {
LK.getSound('click').play();
selectedCharacter = this.characterData;
startDatingScene();
};
game.addChild(button);
}
}
function startDatingScene() {
// Clear character select screen
while (game.children.length > 0) {
game.removeChild(game.children[0]);
}
gameState = "dating";
currentDialogue = 0;
// Create dating scene UI
var background = game.attachAsset('background', {
anchorX: 0,
anchorY: 0
});
// Character portrait
var portraitAssetName = 'portrait' + selectedCharacter.name;
characterPortrait = game.attachAsset(portraitAssetName, {
anchorX: 0.5,
anchorY: 0.5,
x: 1024,
y: 730
});
var nameLabel = new Text2(selectedCharacter.name, {
size: 90,
fill: 0x8B4513
});
nameLabel.anchor.set(0.5, 0.5);
nameLabel.x = 1024;
nameLabel.y = 180;
game.addChild(nameLabel);
var typeLabel = new Text2(selectedCharacter.type, {
size: 65,
fill: 0xA0522D
});
typeLabel.anchor.set(0.5, 0.5);
typeLabel.x = 1024;
typeLabel.y = 290;
game.addChild(typeLabel);
// Heart meter
heartMeter = new HeartMeter();
heartMeter.x = 724;
heartMeter.y = 1070;
game.addChild(heartMeter);
// Dialogue container
dialogueContainer = new Container();
dialogueContainer.x = 1024;
dialogueContainer.y = 1400;
game.addChild(dialogueContainer);
// Dialogue box
var dialogueBox = dialogueContainer.attachAsset('dialogueBox', {
anchorX: 0.5,
anchorY: 0.5
});
dialogueText = new Text2("", {
size: 70,
fill: 0x333333
});
dialogueText.anchor.set(0.5, 0.5);
dialogueContainer.addChild(dialogueText);
// Choices container
choicesContainer = new Container();
choicesContainer.x = 1024;
choicesContainer.y = 1800;
game.addChild(choicesContainer);
showNextDialogue();
}
function showNextDialogue() {
if (currentDialogue >= dialogueScenarios.length) {
endGame();
return;
}
var scenario = dialogueScenarios[currentDialogue];
dialogueText.setText(scenario.prompt);
// Clear previous choices
while (choicesContainer.children.length > 0) {
choicesContainer.removeChild(choicesContainer.children[0]);
}
// Create choice buttons
for (var i = 0; i < scenario.choices.length; i++) {
var choice = scenario.choices[i];
var choiceButton = new DialogueChoice(choice.text, choice.effect, function (selectedChoice) {
return function () {
handleChoice(selectedChoice);
};
}(choice));
choiceButton.y = i * 140;
choicesContainer.addChild(choiceButton);
}
}
function handleChoice(choice) {
// Calculate heart meter change based on personality match
var effect = 0;
var responseType = "neutral";
// Check if choice matches character's personality type
var personalityKey = selectedCharacter.type.toLowerCase().replace("the ", "");
if (choice.type === personalityKey) {
effect = choice.effect;
responseType = "positive";
LK.getSound('heartUp').play();
} else {
effect = -Math.floor(choice.effect / 2);
responseType = "negative";
LK.getSound('heartDown').play();
}
// Update heart meter
var newPercent = heartMeter.currentPercent + effect;
heartMeter.updateMeter(newPercent);
// Show character response
var responses = selectedCharacter.responses[responseType];
var randomResponse = responses[Math.floor(Math.random() * responses.length)];
dialogueText.setText(randomResponse);
// Check win/lose conditions
if (heartMeter.currentPercent >= 100) {
LK.setTimeout(function () {
showWin();
}, 2000);
return;
} else if (heartMeter.currentPercent <= 0) {
LK.setTimeout(function () {
showLose();
}, 2000);
return;
}
currentDialogue++;
// Continue to next dialogue after delay
LK.setTimeout(function () {
showNextDialogue();
}, 2500);
}
function showWin() {
LK.showYouWin();
}
function showLose() {
LK.showGameOver();
}
function endGame() {
if (heartMeter.currentPercent >= 100) {
showWin();
} else {
showLose();
}
}
// Initialize the game
createCharacterSelectScreen();
an intellectual woman's profile photo. In-Game asset. 2d. High contrast. No shadows
an adventurous woman profile photo. In-Game asset. 2d. High contrast. No shadows
a romantic woman profile photo. In-Game asset. 2d. High contrast. No shadows
a creative woman profile photo. In-Game asset. 2d. High contrast. No shadows
profile photo of a pragmatic woman. In-Game asset. 2d. High contrast. No shadows
Profile photo of a charming man. In-Game asset. 2d. High contrast. No shadows
Profile photo of an athlete man. In-Game asset. 2d. High contrast. No shadows
profile photo of a sensitive man. In-Game asset. 2d. High contrast. No shadows
Profile photo of an AMBITIOUS man. In-Game asset. 2d. High contrast. No shadows
Profile photo of a humorous man. In-Game asset. 2d. High contrast. No shadows