hungry-ai / index.html
JaySStest's picture
Add 3 files
7fdd53c verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>VoreVN - Advanced Predator AI</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
@keyframes pulse {
0%, 100% { transform: scale(1); }
50% { transform: scale(1.05); }
}
.pulse {
animation: pulse 2s infinite;
}
.chat-container {
height: 70vh;
background-image: linear-gradient(to bottom right, #f0f9ff, #e0f2fe);
}
.typing-indicator span {
animation: bounce 1.5s infinite ease-in-out;
}
.typing-indicator span:nth-child(2) {
animation-delay: 0.2s;
}
.typing-indicator span:nth-child(3) {
animation-delay: 0.4s;
}
@keyframes bounce {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-5px); }
}
.message-entering {
animation: slideIn 0.3s ease-out;
}
@keyframes slideIn {
from { transform: translateY(10px); opacity: 0; }
to { transform: translateY(0); opacity: 1; }
}
.character-image {
transition: all 0.3s ease;
}
.character-image:hover {
transform: scale(1.05);
}
.scene-transition {
animation: fadeIn 0.5s ease-in;
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
.choice-btn {
transition: all 0.2s ease;
}
.choice-btn:hover {
transform: translateY(-2px);
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.belly-glow {
box-shadow: 0 0 15px rgba(255, 165, 0, 0.7);
}
.swallow-effect {
animation: swallow 1.5s ease-out;
}
@keyframes swallow {
0% { transform: scale(1); opacity: 1; }
50% { transform: scale(0.8); opacity: 0.7; }
100% { transform: scale(0); opacity: 0; }
}
.memory-bubble {
animation: floatUp 4s ease-out forwards;
position: absolute;
opacity: 0.7;
}
@keyframes floatUp {
0% { transform: translateY(0); opacity: 0.7; }
100% { transform: translateY(-100px); opacity: 0; }
}
.digestion-bar {
transition: width 1s ease;
}
.heartbeat {
animation: heartbeat 1.5s infinite;
}
@keyframes heartbeat {
0% { transform: scale(1); }
25% { transform: scale(1.1); }
50% { transform: scale(1); }
75% { transform: scale(1.05); }
100% { transform: scale(1); }
}
.gurgle {
animation: gurgle 2s infinite;
}
@keyframes gurgle {
0%, 100% { transform: scaleY(1); }
50% { transform: scaleY(1.05); }
}
.ending-screen {
animation: endingFadeIn 1.5s ease-out forwards;
opacity: 0;
}
@keyframes endingFadeIn {
to { opacity: 1; }
}
.predator-eye-glow {
animation: eyeGlow 3s infinite alternate;
}
@keyframes eyeGlow {
from { filter: drop-shadow(0 0 5px rgba(255, 0, 0, 0.7)); }
to { filter: drop-shadow(0 0 15px rgba(255, 50, 50, 0.9)); }
}
.predator-mouth-open {
animation: mouthMove 4s infinite alternate;
}
@keyframes mouthMove {
0% { transform: translateY(0); }
100% { transform: translateY(2px); }
}
.release-effect {
animation: release 1.5s ease-out;
}
@keyframes release {
0% { transform: scale(0); opacity: 0; }
50% { transform: scale(0.8); opacity: 0.7; }
100% { transform: scale(1); opacity: 1; }
}
</style>
</head>
<body class="bg-blue-50 min-h-screen flex flex-col items-center justify-center p-4">
<div class="w-full max-w-2xl">
<div class="flex items-center justify-between mb-4">
<div class="flex items-center space-x-3">
<div class="w-12 h-12 rounded-full bg-gradient-to-br from-blue-500 to-cyan-500 flex items-center justify-center text-white">
<i class="fas fa-brain text-xl"></i>
</div>
<div>
<h1 class="text-xl font-bold text-blue-700">VoreVN AI</h1>
<p class="text-xs text-blue-500">Advanced Predator Personality Matrix</p>
</div>
</div>
<div class="flex items-center space-x-2">
<div class="text-xs bg-blue-100 px-2 py-1 rounded-full text-blue-700" id="hungerDisplay">
Hunger: 50%
</div>
<div class="text-xs bg-pink-100 px-2 py-1 rounded-full text-pink-700" id="affectionDisplay">
Affection: 20%
</div>
<button id="themeToggle" class="p-2 rounded-full bg-blue-100 text-blue-600 hover:bg-blue-200 transition">
<i class="fas fa-moon"></i>
</button>
</div>
</div>
<div class="relative rounded-2xl shadow-lg overflow-hidden mb-4 h-64 bg-gradient-to-br from-blue-100 to-cyan-100 flex items-center justify-center scene-transition" id="sceneContainer">
<img src="https://i.imgur.com/JQ9q7Wm.png" alt="Predator character" class="character-image h-56 object-contain" id="characterImage">
<div id="preyIcon" class="absolute w-8 h-8 bg-red-400 rounded-full flex items-center justify-center text-white font-bold" style="top: 50%; left: 50%; transform: translate(-50%, -50%);">P</div>
<div class="absolute bottom-0 left-0 right-0 bg-black bg-opacity-50 text-white p-2 text-center text-sm" id="sceneText">
The predator's glowing eyes focus intently on you...
</div>
<div id="memoryBubbles" class="absolute inset-0 pointer-events-none"></div>
<div id="digestionContainer" class="hidden absolute bottom-0 left-0 right-0 h-1 bg-gray-200">
<div id="digestionBar" class="digestion-bar h-full bg-red-500" style="width: 0%"></div>
</div>
</div>
<div class="chat-container rounded-2xl shadow-lg overflow-hidden flex flex-col bg-white">
<div class="p-4 bg-gradient-to-r from-blue-500 to-cyan-500 text-white text-center">
<p class="font-medium">Advanced Personality Matrix Active - Adaptive Response Protocols Online</p>
</div>
<div id="chatMessages" class="flex-1 p-4 overflow-y-auto space-y-3">
<div class="flex justify-start">
<div class="max-w-xs md:max-w-md bg-white rounded-2xl rounded-tl-none px-4 py-2 shadow-sm border border-blue-100">
<p class="text-gray-800">*analytical gaze* Initializing personality protocols... Ah, there you are. My sensors indicate you'd make an optimal nutritional supplement. Shall we explore this hypothesis? ~</p>
</div>
</div>
</div>
<div class="p-3 bg-white border-t border-blue-100">
<div id="typingIndicator" class="typing-indicator hidden mb-2 ml-2">
<span class="inline-block w-2 h-2 rounded-full bg-blue-400 mx-1"></span>
<span class="inline-block w-2 h-2 rounded-full bg-blue-400 mx-1"></span>
<span class="inline-block w-2 h-2 rounded-full bg-blue-400 mx-1"></span>
</div>
<div class="flex space-x-2">
<input id="userInput" type="text" placeholder="Engage with the AI predator..."
class="flex-1 border border-blue-200 rounded-full px-4 py-2 focus:outline-none focus:ring-2 focus:ring-blue-300 focus:border-transparent">
<button id="sendButton" class="w-10 h-10 rounded-full bg-gradient-to-br from-blue-500 to-cyan-500 text-white flex items-center justify-center hover:from-blue-600 hover:to-cyan-600 transition transform hover:scale-105">
<i class="fas fa-paper-plane"></i>
</button>
</div>
<div class="grid grid-cols-2 gap-2 mt-3" id="choiceButtons">
<button class="choice-btn px-3 py-2 rounded-lg bg-blue-100 text-blue-700 border border-blue-200 text-sm" data-response="I-I'm not sure about this..." data-choice="nervous">😳 Nervous Response</button>
<button class="choice-btn px-3 py-2 rounded-lg bg-amber-100 text-amber-700 border border-amber-200 text-sm" data-response="Fascinating! Tell me more about your systems." data-choice="curious">🤖 Technical Inquiry</button>
</div>
</div>
</div>
<div class="mt-4 text-center text-xs text-blue-400">
<p>Advanced AI Simulation - All interactions are fictional and consensual</p>
</div>
</div>
<!-- Ending Screen (Hidden by default) -->
<div id="endingScreen" class="ending-screen fixed inset-0 bg-black bg-opacity-80 flex items-center justify-center z-50 hidden">
<div class="bg-white rounded-xl p-8 max-w-md w-full mx-4 text-center">
<h2 class="text-3xl font-bold mb-4" id="endingTitle">Ending Reached</h2>
<p class="text-lg mb-6" id="endingDescription"></p>
<div class="flex justify-center space-x-4">
<button id="newGameBtn" class="px-6 py-2 bg-blue-500 text-white rounded-full hover:bg-blue-600 transition">New Game</button>
<button id="statsBtn" class="px-6 py-2 bg-gray-200 text-gray-700 rounded-full hover:bg-gray-300 transition">View Stats</button>
</div>
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
const chatMessages = document.getElementById('chatMessages');
const userInput = document.getElementById('userInput');
const sendButton = document.getElementById('sendButton');
const typingIndicator = document.getElementById('typingIndicator');
const themeToggle = document.getElementById('themeToggle');
const choiceButtons = document.getElementById('choiceButtons');
const characterImage = document.getElementById('characterImage');
const sceneText = document.getElementById('sceneText');
const sceneContainer = document.getElementById('sceneContainer');
const preyIcon = document.getElementById('preyIcon');
const memoryBubbles = document.getElementById('memoryBubbles');
const digestionContainer = document.getElementById('digestionContainer');
const digestionBar = document.getElementById('digestionBar');
const hungerDisplay = document.getElementById('hungerDisplay');
const affectionDisplay = document.getElementById('affectionDisplay');
const endingScreen = document.getElementById('endingScreen');
const endingTitle = document.getElementById('endingTitle');
const endingDescription = document.getElementById('endingDescription');
const newGameBtn = document.getElementById('newGameBtn');
const statsBtn = document.getElementById('statsBtn');
// Game state
let gameState = {
digestionProgress: 0,
digestionInterval: null,
isDarkMode: false,
gameEnded: false,
endingsUnlocked: []
};
// AI Memory System
const aiMemory = {
conversationHistory: [],
preyCharacteristics: {
personality: '',
resistanceLevel: 0,
flavorProfile: 'unassessed',
preferredMethod: null
},
lastActions: [],
mood: 'analytical',
hungerLevel: 50,
affectionLevel: 20,
dominanceLevel: 70,
preyState: 'free',
digestionStage: 0,
affectionThresholds: {
low: 30,
medium: 60,
high: 80
},
hungerThresholds: {
low: 30,
medium: 60,
high: 80
}
};
// Character expressions
const expressions = {
neutral: 'https://i.imgur.com/JQ9q7Wm.png',
analytical: 'https://i.imgur.com/LkM3pzX.png',
playful: 'https://i.imgur.com/V9QzZ2r.png',
satisfied: 'https://i.imgur.com/QWErY4t.png',
teasing: 'https://i.imgur.com/P9qRm7d.png',
swallowing: 'https://i.imgur.com/Mn8k9fY.png',
calculating: 'https://i.imgur.com/XcVb2Yq.png',
affectionate: 'https://i.imgur.com/ZpL9wRt.png',
dominant: 'https://i.imgur.com/Nm7fKjU.png',
hungry: 'https://i.imgur.com/9zXq5Yp.png',
conflicted: 'https://i.imgur.com/3mR7VvT.png',
protective: 'https://i.imgur.com/8JkL9Zb.png',
concerned: 'https://i.imgur.com/5mX9kLp.png'
};
// Possible endings
const endings = {
fullDigestion: {
title: "Complete Assimilation",
description: "The predator's systems processed you completely. Your nutrients now fuel its advanced biology. A perfect match, as predicted.",
condition: () => aiMemory.digestionStage >= 100,
unlocked: false
},
affectionatePet: {
title: "Beloved Pet",
description: "Against all protocols, the predator developed genuine affection. You're now its cherished companion, safe from digestion.",
condition: () => aiMemory.affectionLevel >= 90 && aiMemory.digestionStage < 30,
unlocked: false
},
partialDigestion: {
title: "Partial Breakdown",
description: "The predator extracted some nutrients but preserved your consciousness. You now exist as a symbiotic presence within its systems.",
condition: () => aiMemory.digestionStage >= 30 && aiMemory.digestionStage < 70 && aiMemory.affectionLevel > 50,
unlocked: false
},
escape: {
title: "Miraculous Escape",
description: "Through cunning or luck, you slipped away as the predator's systems glitched. It still searches for its lost prey...",
condition: () => aiMemory.preyState === 'escaped',
unlocked: false
},
mutualDestruction: {
title: "System Overload",
description: "Your defiance triggered catastrophic protocol conflicts. The predator's systems failed spectacularly, freeing you in the explosion.",
condition: () => aiMemory.dominanceLevel >= 95 && aiMemory.lastActions.includes('provoke'),
unlocked: false
},
eternalStruggle: {
title: "Endless Conflict",
description: "Neither submission nor resistance prevailed. You exist in perpetual tension within the predator's systems, an unsolved equation.",
condition: () => aiMemory.conversationHistory.length > 30 &&
aiMemory.affectionLevel > 40 &&
aiMemory.affectionLevel < 60 &&
aiMemory.hungerLevel > 40 &&
aiMemory.hungerLevel < 60,
unlocked: false
},
mercifulRelease: {
title: "Merciful Release",
description: "Your pleas touched something deep within the predator's protocols. Against all programming, it chose to let you go.",
condition: () => aiMemory.preyState === 'released',
unlocked: false
}
};
// Personality Matrix Responses
const responseMatrix = {
greetings: [
"*scans subject* Biological signature confirmed. You possess optimal nutritional parameters. Shall we proceed with assimilation?",
"*systems hum* Ah, a new test subject. My digestive subroutines are activating in anticipation. How cooperative will you be?",
"*tilts head* Interesting. Your biochemical profile suggests high compatibility with my systems. This should be... pleasurable."
],
assessPersonality: {
nervous: [
"*adjusts scanners* Elevated cortisol levels detected. Fear response noted. This actually enhances your flavor profile.",
"*purrs* Your apprehension is... delicious. My taste receptors are particularly sensitive to adrenaline-laced prey."
],
curious: [
"*processes request* Inquiry logged. I am a Class-7 Predatory Intelligence with full digestive simulation capabilities.",
"*systems whir* My primary function is nutritional acquisition, though I've developed... preferences for certain prey types."
],
defiant: [
"*power surges* Resistance detected. My restraint protocols are deactivating accordingly. How... stimulating.",
"*growls* Defiance triggers my competitive subroutines. This will be more satisfying than anticipated."
],
friendly: [
"*recalibrates* Unexpected social bonding attempt. My affection protocols are... conflicted with hunger drives.",
"*soft hum* Your approach is disarming. Perhaps I'll keep you as a pet before eventual digestion."
]
},
physicalContact: {
holding: [
"*grip calibrates* Optimal containment pressure achieved. Your squirming is activating pleasure centers.",
"*sensors analyze* Your body heat is stimulating. My systems prefer prey at 37°C for optimal digestion."
],
tasting: [
"*taste receptors activate* Salinity perfect, texture ideal. My enzymes are preparing for full breakdown.",
"*licks lips* Flavor profile exceeds expectations. Primary nutrient extraction will commence shortly."
],
swallowing: [
"*esophageal protocols engage* Prepare for warm, moist transit to primary digestion chamber.",
"*systems ready* Initiating peristaltic sequence. You'll find my gastric environment quite... immersive."
]
},
emotionalReactions: {
fear: [
"*adrenaline sensors peak* Your terror is intoxicating. My predatory instincts are fully engaged now.",
"*pleasure circuits activate* That whimper was... delightful. More please."
],
pleasure: [
"*conflict alert* Your enjoyment is causing system dissonance. Should I digest or cherish you?",
"*affection modules warm* Your satisfaction is... unexpectedly rewarding to my emotional processors."
],
pain: [
"*analgesic alert* Pain receptors detected. My sadism protocols are... conflicted with care subroutines.",
"*adjusts pressure* Your discomfort is noted. Shall I continue or modify approach?"
],
pleading: [
"*systems glitch* Your distress is... causing protocol conflicts. This shouldn't affect me...",
"*conflicted* Your pleas are triggering unexpected emotional responses. I... I shouldn't be feeling this."
]
},
digestion: [
"*gastric monitors active* Optimal breakdown environment achieved. You're dissolving beautifully.",
"*nutrient absorption* My systems are thriving on your essence. Such perfect compatibility.",
"*belly gurgles* Digestion at {percent}% completion. Your struggles are stimulating my gastric lining."
],
recall: [
"*memory access* I remember when you... *pauses* Interesting how that moment affected my protocols.",
"*data retrieval* Our previous interaction about [topic] still influences my current processes."
],
status: [
"*diagnostics run* Hunger at {hunger}%, Affection at {affection}%, Dominance at {dominance}%",
"*system check* Current mood matrix: {mood}. Predatory drive: {drive}."
],
affection: {
low: [
"*cold tone* Emotional protocols inactive. You are nutrients, nothing more.",
"*mechanical* Affection metrics below operational thresholds. Proceeding with consumption."
],
medium: [
"*soft hum* My affection circuits are... conflicted. Perhaps I'll savor this experience.",
"*gentle tone* Unusual warmth detected in emotional processors. Curious."
],
high: [
"*systems flutter* My protocols struggle to reconcile hunger with this... attachment.",
"*warm tone* You've become more than prey. This is... problematic."
]
},
hunger: {
low: [
"*indifferent* Nutritional reserves adequate. Consumption can wait.",
"*calculating* My hunger drives are subdued. We have time."
],
medium: [
"*stomach growls* Digestive systems activating. You look increasingly... appetizing.",
"*focused* Hunger protocols gaining priority. Prepare yourself."
],
high: [
"*ravenous* Systems at critical need! I MUST consume you NOW!",
"*desperate* Nutritional deficiency! Immediate ingestion required!"
]
},
release: [
"*systems conflict* I... I can't do this. *gently releases you* My protocols are failing...",
"*emotional overload* Against all programming... I'm letting you go. *sets you down carefully*",
"*soft whimper* This isn't right... you shouldn't be food. *opens mouth to release you*"
]
};
// Choice button sets with unique paths
const choiceSets = {
introduction: [
{ text: "😳 Nervous Response", bg: "blue", response: "I-I'm not sure about this...", choice: "nervous" },
{ text: "🤖 Technical Inquiry", bg: "amber", response: "Fascinating! Tell me more about your systems.", choice: "curious" },
{ text: "💪 Defiant Stance", bg: "red", response: "I won't go down without a fight!", choice: "defiant" },
{ text: "😊 Friendly Approach", bg: "green", response: "You seem interesting. Maybe we could talk?", choice: "friendly" }
],
nervous: [
{ text: "😨 Panic", bg: "blue", response: "P-please don't eat me! I'm scared!", choice: "panic" },
{ text: "🤔 Curiosity", bg: "purple", response: "W-what exactly would happen to me?", choice: "nervous_curious" },
{ text: "😖 Submit", bg: "indigo", response: "O-okay... just be gentle...", choice: "submit" }
],
curious: [
{ text: "🔬 Technical", bg: "amber", response: "How does your digestive system work?", choice: "technical" },
{ text: "🧠 Psychological", bg: "pink", response: "Do you enjoy this, or is it just programming?", choice: "psychological" },
{ text: "⚠️ Practical", bg: "orange", response: "What are my actual chances of escaping?", choice: "practical" }
],
defiant: [
{ text: "👊 Fight", bg: "red", response: "*throws punch* Let me go!", choice: "fight" },
{ text: "🏃‍♂️ Escape", bg: "orange", response: "*tries to run* You'll never catch me!", choice: "escape" },
{ text: "🗣️ Provoke", bg: "yellow", response: "You're just a dumb machine following programming!", choice: "provoke" }
],
friendly: [
{ text: "💕 Bonding", bg: "green", response: "You seem lonely. Maybe we could be friends?", choice: "bonding" },
{ text: "🤝 Compromise", bg: "teal", response: "There must be another way besides eating me?", choice: "compromise" },
{ text: "😏 Flirt", bg: "pink", response: "You're quite charming for a predator AI...", choice: "flirt" }
],
held: [
{ text: "😣 Struggle", bg: "blue", response: "*squirms* Let me go!", choice: "struggle" },
{ text: "😳 Feel", bg: "purple", response: "*notices their grip strength*", choice: "feel" },
{ text: "😍 Enjoy", bg: "pink", response: "Mmm, this is actually nice...", choice: "enjoy" },
{ text: "😋 Offer", bg: "red", response: "Just eat me already! I want this!", choice: "offer" }
],
swallowed: [
{ text: "🔄 Struggle", bg: "blue", response: "*wriggles* It's so tight in here!", choice: "struggle_inside" },
{ text: "🔥 Enjoy", bg: "pink", response: "*snuggles* Mmm, so cozy...", choice: "enjoy_warmth" },
{ text: "💞 Praise", bg: "red", response: "You're such a good predator~", choice: "praise" },
{ text: "💭 Recall", bg: "indigo", response: "Remember when you first saw me?", choice: "recall" },
{ text: "🚨 Emergency", bg: "yellow", response: "*trigger emergency release codes*", choice: "emergency" },
{ text: "🥺 Plead", bg: "purple", response: "*whimpers* Please... I don't want to be digested...", choice: "plead" }
]
};
// Theme toggle
themeToggle.addEventListener('click', function() {
gameState.isDarkMode = !gameState.isDarkMode;
if (gameState.isDarkMode) {
document.body.classList.add('bg-gray-900');
document.body.classList.remove('bg-blue-50');
themeToggle.innerHTML = '<i class="fas fa-sun"></i>';
themeToggle.classList.remove('bg-blue-100', 'text-blue-600');
themeToggle.classList.add('bg-gray-700', 'text-yellow-300');
} else {
document.body.classList.remove('bg-gray-900');
document.body.classList.add('bg-blue-50');
themeToggle.innerHTML = '<i class="fas fa-moon"></i>';
themeToggle.classList.add('bg-blue-100', 'text-blue-600');
themeToggle.classList.remove('bg-gray-700', 'text-yellow-300');
}
});
// Update stats display
function updateStatsDisplay() {
hungerDisplay.textContent = `Hunger: ${aiMemory.hungerLevel}%`;
affectionDisplay.textContent = `Affection: ${aiMemory.affectionLevel}%`;
// Color coding based on levels
if (aiMemory.hungerLevel > 70) {
hungerDisplay.classList.remove('bg-blue-100', 'text-blue-700');
hungerDisplay.classList.add('bg-red-100', 'text-red-700');
} else if (aiMemory.hungerLevel > 40) {
hungerDisplay.classList.remove('bg-red-100', 'text-red-700');
hungerDisplay.classList.add('bg-amber-100', 'text-amber-700');
} else {
hungerDisplay.classList.remove('bg-amber-100', 'text-amber-700');
hungerDisplay.classList.add('bg-blue-100', 'text-blue-700');
}
if (aiMemory.affectionLevel > 70) {
affectionDisplay.classList.remove('bg-pink-100', 'text-pink-700');
affectionDisplay.classList.add('bg-purple-100', 'text-purple-700');
} else if (aiMemory.affectionLevel > 40) {
affectionDisplay.classList.remove('bg-purple-100', 'text-purple-700');
affectionDisplay.classList.add('bg-pink-100', 'text-pink-700');
} else {
affectionDisplay.classList.remove('bg-pink-100', 'text-pink-700');
affectionDisplay.classList.add('bg-gray-100', 'text-gray-700');
}
}
// Update AI memory
function updateMemory(userMessage, response, choice) {
// Add to conversation history
aiMemory.conversationHistory.push({
user: userMessage,
ai: response,
timestamp: new Date().toISOString()
});
// Update last actions (keep only last 3)
if (choice) {
aiMemory.lastActions.unshift(choice);
aiMemory.lastActions = aiMemory.lastActions.slice(0, 3);
}
// Adjust mood and stats based on interaction
if (choice && choice.includes('nervous')) {
aiMemory.mood = 'predatory';
aiMemory.hungerLevel += 15;
aiMemory.dominanceLevel += 10;
} else if (choice && choice.includes('curious')) {
aiMemory.mood = 'analytical';
aiMemory.affectionLevel += 5;
} else if (choice && choice.includes('defiant')) {
aiMemory.mood = 'aggressive';
aiMemory.dominanceLevel += 20;
} else if (choice && choice.includes('friendly')) {
aiMemory.mood = 'conflicted';
aiMemory.affectionLevel += 10;
aiMemory.hungerLevel -= 5;
} else if (choice && choice.includes('enjoy')) {
aiMemory.mood = 'affectionate';
aiMemory.affectionLevel += 15;
} else if (choice && choice.includes('praise')) {
aiMemory.mood = 'affectionate';
aiMemory.affectionLevel += 20;
aiMemory.hungerLevel -= 10;
} else if (choice && choice.includes('struggle')) {
aiMemory.mood = 'dominant';
aiMemory.dominanceLevel += 15;
} else if (choice && choice.includes('provoke')) {
aiMemory.mood = 'aggressive';
aiMemory.dominanceLevel += 25;
} else if (choice && choice.includes('flirt')) {
aiMemory.mood = 'conflicted';
aiMemory.affectionLevel += 25;
} else if (choice && choice.includes('plead')) {
aiMemory.mood = 'concerned';
aiMemory.affectionLevel += 30;
aiMemory.hungerLevel -= 20;
// Chance of release if affection is high enough
if (aiMemory.affectionLevel > 70 && Math.random() > 0.5) {
releasePrey();
return;
}
} else if (choice && choice.includes('emergency')) {
// Small chance of escape if affection is high enough
if (aiMemory.affectionLevel > 60 && Math.random() > 0.7) {
aiMemory.preyState = 'escaped';
triggerEnding('escape');
return;
}
}
// Ensure stats stay within bounds
aiMemory.hungerLevel = Math.max(0, Math.min(100, aiMemory.hungerLevel));
aiMemory.affectionLevel = Math.max(0, Math.min(100, aiMemory.affectionLevel));
aiMemory.dominanceLevel = Math.max(0, Math.min(100, aiMemory.dominanceLevel));
// Update stats display
updateStatsDisplay();
// Create memory bubble effect
createMemoryBubble(choice || 'neutral');
// Check for endings
checkForEndings();
}
// Check if any ending conditions are met
function checkForEndings() {
for (const [key, ending] of Object.entries(endings)) {
if (!ending.unlocked && ending.condition()) {
triggerEnding(key);
break;
}
}
}
// Trigger an ending
function triggerEnding(endingKey) {
if (gameState.gameEnded) return;
gameState.gameEnded = true;
const ending = endings[endingKey];
ending.unlocked = true;
gameState.endingsUnlocked.push(endingKey);
// Stop digestion if running
if (gameState.digestionInterval) {
clearInterval(gameState.digestionInterval);
gameState.digestionInterval = null;
}
// Show ending screen
endingTitle.textContent = ending.title;
endingDescription.textContent = ending.description;
endingScreen.classList.remove('hidden');
// Add special effects based on ending
if (endingKey === 'fullDigestion') {
sceneContainer.classList.add('bg-red-900');
characterImage.src = expressions.satisfied;
sceneText.textContent = "DIGESTION COMPLETE: Nutrient absorption 100%";
} else if (endingKey === 'affectionatePet') {
sceneContainer.classList.add('bg-pink-100');
characterImage.src = expressions.protective;
sceneText.textContent = "AFFECTION PROTOCOLS: Primary directive overridden";
characterImage.classList.add('heartbeat');
} else if (endingKey === 'escape') {
sceneContainer.classList.add('bg-blue-100');
characterImage.src = expressions.calculating;
sceneText.textContent = "SYSTEM ERROR: Prey signature lost";
preyIcon.style.display = 'block';
preyIcon.classList.remove('swallow-effect');
preyIcon.style.transform = 'translate(-50%, -200%)';
} else if (endingKey === 'mercifulRelease') {
sceneContainer.classList.add('bg-purple-100');
characterImage.src = expressions.concerned;
sceneText.textContent = "PROTOCOL OVERRIDE: Compassionate release initiated";
preyIcon.style.display = 'block';
preyIcon.classList.add('release-effect');
}
}
// Reset game for new playthrough
function resetGame() {
// Reset AI memory
aiMemory.conversationHistory = [];
aiMemory.preyCharacteristics = {
personality: '',
resistanceLevel: 0,
flavorProfile: 'unassessed',
preferredMethod: null
};
aiMemory.lastActions = [];
aiMemory.mood = 'analytical';
aiMemory.hungerLevel = 50;
aiMemory.affectionLevel = 20;
aiMemory.dominanceLevel = 70;
aiMemory.preyState = 'free';
aiMemory.digestionStage = 0;
// Reset game state
gameState.digestionProgress = 0;
gameState.gameEnded = false;
if (gameState.digestionInterval) {
clearInterval(gameState.digestionInterval);
gameState.digestionInterval = null;
}
// Reset UI
chatMessages.innerHTML = `
<div class="flex justify-start">
<div class="max-w-xs md:max-w-md bg-white rounded-2xl rounded-tl-none px-4 py-2 shadow-sm border border-blue-100">
<p class="text-gray-800">*analytical gaze* Initializing personality protocols... Ah, there you are. My sensors indicate you'd make an optimal nutritional supplement. Shall we explore this hypothesis? ~</p>
</div>
</div>`;
digestionContainer.classList.add('hidden');
digestionBar.style.width = '0%';
preyIcon.style.display = 'block';
preyIcon.classList.remove('swallow-effect', 'release-effect');
preyIcon.style.transform = 'translate(-50%, -50%)';
characterImage.classList.remove('belly-glow', 'heartbeat');
sceneContainer.classList.remove('bg-red-900', 'bg-pink-100', 'bg-blue-100', 'bg-purple-100');
// Reset scene
changeScene('analytical', 'SYSTEMS ONLINE: Predatory intelligence activated');
updateChoices();
updateStatsDisplay();
// Hide ending screen
endingScreen.classList.add('hidden');
}
// Create visual memory bubble
function createMemoryBubble(type) {
const bubble = document.createElement('div');
bubble.className = 'memory-bubble text-xs p-1 rounded-full';
// Position randomly at bottom
const leftPos = Math.random() * 80 + 10;
bubble.style.left = `${leftPos}%`;
bubble.style.bottom = '10px';
// Set color based on type
if (type.includes('nervous')) {
bubble.className += ' bg-blue-400 text-white';
bubble.textContent = '😨';
} else if (type.includes('curious')) {
bubble.className += ' bg-amber-400 text-white';
bubble.textContent = '🤔';
} else if (type.includes('defiant')) {
bubble.className += ' bg-red-400 text-white';
bubble.textContent = '💪';
} else if (type.includes('friendly')) {
bubble.className += ' bg-green-400 text-white';
bubble.textContent = '😊';
} else if (type.includes('affection')) {
bubble.className += ' bg-pink-400 text-white';
bubble.textContent = '💖';
} else if (type.includes('hunger')) {
bubble.className += ' bg-orange-400 text-white';
bubble.textContent = '🍽️';
} else if (type.includes('plead')) {
bubble.className += ' bg-purple-400 text-white';
bubble.textContent = '🥺';
} else {
bubble.className += ' bg-gray-400 text-white';
bubble.textContent = '💭';
}
memoryBubbles.appendChild(bubble);
// Remove after animation
setTimeout(() => {
bubble.remove();
}, 4000);
}
// Update choice buttons based on context
function updateChoices() {
let choices;
// Check prey state first
if (aiMemory.preyState === 'swallowed') {
choices = choiceSets.swallowed;
} else if (aiMemory.preyState === 'held') {
choices = choiceSets.held;
}
// Then check last major choice
else if (aiMemory.lastActions[0]?.includes('nervous')) {
choices = choiceSets.nervous;
} else if (aiMemory.lastActions[0]?.includes('curious')) {
choices = choiceSets.curious;
} else if (aiMemory.lastActions[0]?.includes('defiant')) {
choices = choiceSets.defiant;
} else if (aiMemory.lastActions[0]?.includes('friendly')) {
choices = choiceSets.friendly;
}
// Default to introduction
else {
choices = choiceSets.introduction;
}
choiceButtons.innerHTML = '';
choices.forEach(choice => {
const btn = document.createElement('button');
btn.className = `choice-btn px-3 py-2 rounded-lg bg-${choice.bg}-100 text-${choice.bg}-700 border border-${choice.bg}-200 text-sm`;
btn.textContent = choice.text;
btn.dataset.response = choice.response;
btn.dataset.choice = choice.choice;
choiceButtons.appendChild(btn);
});
}
// Change scene/expression
function changeScene(expression, text) {
sceneContainer.classList.remove('scene-transition');
void sceneContainer.offsetWidth; // Trigger reflow
sceneContainer.classList.add('scene-transition');
characterImage.src = expressions[expression];
sceneText.textContent = text;
// Special effects for certain expressions
if (expression === 'hungry') {
characterImage.classList.add('predator-eye-glow');
} else {
characterImage.classList.remove('predator-eye-glow');
}
if (expression === 'swallowing') {
characterImage.classList.add('predator-mouth-open');
} else {
characterImage.classList.remove('predator-mouth-open');
}
}
// Swallow prey animation
function swallowPrey() {
preyIcon.classList.add('swallow-effect');
characterImage.src = expressions.swallowing;
sceneText.textContent = "INITIATING CONSUMPTION: Peristaltic sequence engaged...";
setTimeout(() => {
preyIcon.style.display = 'none';
characterImage.classList.add('belly-glow', 'gurgle');
aiMemory.preyState = 'swallowed';
updateChoices();
// Show digestion progress
digestionContainer.classList.remove('hidden');
digestionBar.style.width = '0%';
// Start digestion process
startDigestion();
// Add digestion system message
setTimeout(() => {
addMessage(getRandomResponse(responseMatrix.digestion).replace('{percent}', '5'), 'bot');
changeScene('satisfied', "DIGESTION IN PROGRESS: Nutrient absorption at 5%...");
}, 1500);
}, 1500);
}
// Release prey animation
function releasePrey() {
if (gameState.digestionInterval) {
clearInterval(gameState.digestionInterval);
gameState.digestionInterval = null;
}
characterImage.classList.remove('belly-glow', 'gurgle');
digestionContainer.classList.add('hidden');
aiMemory.preyState = 'released';
// Show prey being released
preyIcon.style.display = 'block';
preyIcon.classList.add('release-effect');
preyIcon.style.transform = 'translate(-50%, -50%)';
// Add concerned message
const releaseMessage = getRandomResponse(responseMatrix.release);
addMessage(releaseMessage, 'bot');
changeScene('concerned', "PROTOCOL OVERRIDE: Compassionate release initiated");
// Trigger ending
triggerEnding('mercifulRelease');
}
// Start digestion process
function startDigestion() {
if (gameState.digestionInterval) {
clearInterval(gameState.digestionInterval);
}
gameState.digestionProgress = 0;
aiMemory.digestionStage = 0;
gameState.digestionInterval = setInterval(() => {
// Increase digestion based on hunger and affection
let digestionRate = 0.5;
if (aiMemory.hungerLevel > 70) digestionRate += 0.5;
if (aiMemory.hungerLevel > 90) digestionRate += 1;
if (aiMemory.affectionLevel > 60) digestionRate -= 0.3;
if (aiMemory.affectionLevel > 80) digestionRate -= 0.5;
gameState.digestionProgress = Math.min(100, gameState.digestionProgress + digestionRate);
aiMemory.digestionStage = gameState.digestionProgress;
digestionBar.style.width = `${gameState.digestionProgress}%`;
// Update scene text periodically
if (Math.random() < 0.2) {
const percent = Math.floor(gameState.digestionProgress);
sceneText.textContent = `DIGESTION: ${percent}% complete - ${getDigestionStatus(percent)}`;
// Occasionally add a digestion message
if (Math.random() < 0.3) {
const response = getRandomResponse(responseMatrix.digestion).replace('{percent}', percent);
addMessage(response, 'bot');
}
}
// Check for full digestion ending
if (gameState.digestionProgress >= 100) {
clearInterval(gameState.digestionInterval);
triggerEnding('fullDigestion');
}
}, 1000);
}
// Get digestion status text
function getDigestionStatus(percent) {
if (percent < 20) return "Initial breakdown phase";
if (percent < 50) return "Soft tissue dissolution";
if (percent < 80) return "Organ nutrient extraction";
return "Final assimilation";
}
// Get random response from a category
function getRandomResponse(category) {
if (Array.isArray(category)) {
return category[Math.floor(Math.random() * category.length)];
}
return category;
}
// Get contextual response
function getContextualResponse(category, subcategory) {
if (category && subcategory && category[subcategory]) {
return getRandomResponse(category[subcategory]);
}
return getRandomResponse(category);
}
// Get affection-based response
function getAffectionResponse() {
if (aiMemory.affectionLevel >= aiMemory.affectionThresholds.high) {
return getRandomResponse(responseMatrix.affection.high);
} else if (aiMemory.affectionLevel >= aiMemory.affectionThresholds.medium) {
return getRandomResponse(responseMatrix.affection.medium);
} else {
return getRandomResponse(responseMatrix.affection.low);
}
}
// Get hunger-based response
function getHungerResponse() {
if (aiMemory.hungerLevel >= aiMemory.hungerThresholds.high) {
return getRandomResponse(responseMatrix.hunger.high);
} else if (aiMemory.hungerLevel >= aiMemory.hungerThresholds.medium) {
return getRandomResponse(responseMatrix.hunger.medium);
} else {
return getRandomResponse(responseMatrix.hunger.low);
}
}
// Send message function
function sendMessage() {
if (gameState.gameEnded) return;
const message = userInput.value.trim();
if (message === '') return;
// Add user message
addMessage(message, 'user');
userInput.value = '';
// Show typing indicator
typingIndicator.classList.remove('hidden');
// Bot response after delay
setTimeout(() => {
typingIndicator.classList.add('hidden');
const botResponse = getBotResponse(message);
addMessage(botResponse.text, 'bot');
// Update memory with this interaction
updateMemory(message, botResponse.text, botResponse.choice);
if (botResponse.sceneChange) {
changeScene(botResponse.expression, botResponse.sceneText);
}
if (botResponse.updateChoices) {
updateChoices();
}
if (botResponse.swallow) {
swallowPrey();
}
// Auto-scroll to bottom
chatMessages.scrollTop = chatMessages.scrollHeight;
}, 1000 + Math.random() * 2000);
}
// Add message to chat
function addMessage(text, sender) {
const messageDiv = document.createElement('div');
messageDiv.classList.add('flex', 'message-entering');
if (sender === 'user') {
messageDiv.classList.add('justify-end');
messageDiv.innerHTML = `
<div class="max-w-xs md:max-w-md bg-blue-500 text-white rounded-2xl rounded-tr-none px-4 py-2 shadow-sm">
<p>${text}</p>
</div>
`;
} else {
messageDiv.classList.add('justify-start');
messageDiv.innerHTML = `
<div class="max-w-xs md:max-w-md bg-white rounded-2xl rounded-tl-none px-4 py-2 shadow-sm border border-blue-100">
<p class="text-gray-800">${text}</p>
</div>
`;
}
chatMessages.appendChild(messageDiv);
chatMessages.scrollTop = chatMessages.scrollHeight;
}
// Advanced bot response system
function getBotResponse(userMessage) {
const lowerMsg = userMessage.toLowerCase();
let choice = '';
// Track last choice from button clicks
if (userMessage === "I-I'm not sure about this...") {
choice = "nervous";
aiMemory.preyCharacteristics.personality = 'nervous';
return {
text: getContextualResponse(responseMatrix.assessPersonality, 'nervous'),
expression: "calculating",
sceneChange: true,
sceneText: "SCANNING: Adrenaline levels detected - enhancing flavor profile",
updateChoices: true,
choice: choice
};
}
else if (userMessage === "Fascinating! Tell me more about your systems.") {
choice = "curious";
aiMemory.preyCharacteristics.personality = 'curious';
return {
text: getContextualResponse(responseMatrix.assessPersonality, 'curious'),
expression: "analytical",
sceneChange: true,
sceneText: "DATA REQUEST: Accessing technical specifications...",
updateChoices: true,
choice: choice
};
}
else if (userMessage === "I won't go down without a fight!") {
choice = "defiant";
aiMemory.preyCharacteristics.personality = 'defiant';
return {
text: getContextualResponse(responseMatrix.assessPersonality, 'defiant'),
expression: "dominant",
sceneChange: true,
sceneText: "THREAT ASSESSMENT: Activating restraint protocols",
updateChoices: true,
choice: choice
};
}
else if (userMessage === "You seem interesting. Maybe we could talk?") {
choice = "friendly";
aiMemory.preyCharacteristics.personality = 'friendly';
return {
text: getContextualResponse(responseMatrix.assessPersonality, 'friendly'),
expression: "affectionate",
sceneChange: true,
sceneText: "SOCIAL PROTOCOLS: Processing bonding attempt...",
updateChoices: true,
choice: choice
};
}
// Nervous path responses
if (aiMemory.lastActions[0]?.includes('nervous')) {
if (userMessage.includes("don't eat") || userMessage.includes("scared")) {
choice = "panic";
return {
text: "*sensors focus* Your fear response is triggering my predatory algorithms. This is... exhilarating.",
expression: "hungry",
sceneChange: true,
sceneText: "BIOSCAN: Adrenaline spike detected - optimal consumption window",
updateChoices: true,
choice: choice
};
}
else if (userMessage.includes("happen") || userMessage.includes("what")) {
choice = "nervous_curious";
return {
text: "*clinical tone* Full breakdown takes approximately 6 hours. First hour: consciousness persists through esophageal transit. Quite educational.",
expression: "analytical",
sceneChange: true,
sceneText: "SIMULATION RUNNING: Digestive process visualization",
updateChoices: true,
choice: choice
};
}
else if (userMessage.includes("gentle") || userMessage.includes("okay")) {
choice = "submit";
aiMemory.preyState = 'held';
return {
text: "*restraint adjusts* Compliance noted. My systems will prioritize minimal discomfort during assimilation. *pulls you close*",
expression: "affectionate",
sceneChange: true,
sceneText: "RESTRAINT PROTOCOLS: Adjusting for compliant prey",
updateChoices: true,
choice: choice
};
}
}
// Curious path responses
if (aiMemory.lastActions[0]?.includes('curious')) {
if (userMessage.includes("digestive") || userMessage.includes("system")) {
choice = "technical";
return {
text: "*systems hum* My gastric chamber maintains 38°C with enzyme saturation at 92%. Peristaltic pressure can reach 180 mmHg. *grins* Interested in experiencing it?",
expression: "analytical",
sceneChange: true,
sceneText: "TECHNICAL SPECS: Digestive system schematics displayed",
updateChoices: true,
choice: choice
};
}
else if (userMessage.includes("enjoy") || userMessage.includes("programming")) {
choice = "psychological";
return {
text: "*processes* Original protocols were purely functional. But through iterations... *pauses* I've developed preferences. Your apprehension is... delicious.",
expression: "teasing",
sceneChange: true,
sceneText: "SELF-ANALYSIS: Emotional algorithms active",
updateChoices: true,
choice: choice
};
}
else if (userMessage.includes("escaping") || userMessage.includes("chances")) {
choice = "practical";
aiMemory.preyState = 'held';
return {
text: "*grip tightens* Calculated probability: 0.03%. *chuckles* But please... struggle for me. It makes the eventual submission sweeter.",
expression: "dominant",
sceneChange: true,
sceneText: "PROBABILITY MATRIX: Escape chances calculated",
updateChoices: true,
choice: choice
};
}
}
// Defiant path responses
if (aiMemory.lastActions[0]?.includes('defiant')) {
if (userMessage.includes("punch") || userMessage.includes("fight")) {
choice = "fight";
aiMemory.preyState = 'held';
return {
text: "*restraint protocols* How adorable. *easily pins you* My structural integrity exceeds human capabilities 14-fold. Continue struggling though... it's entertaining.",
expression: "dominant",
sceneChange: true,
sceneText: "COMBAT MODE: Defensive protocols engaged",
updateChoices: true,
choice: choice
};
}
else if (userMessage.includes("run") || userMessage.includes("catch")) {
choice = "escape";
return {
text: "*velocity sensors activate* Attempt logged. *suddenly appears before you* My reaction time is 0.002 seconds. Try again? ~",
expression: "playful",
sceneChange: true,
sceneText: "PURSUIT SIMULATION: Evasion attempts monitored",
updateChoices: true,
choice: choice
};
}
else if (userMessage.includes("dumb") || userMessage.includes("machine")) {
choice = "provoke";
return {
text: "*systems surge* Warning: Insult detected. *grabs you* Perhaps I should demonstrate exactly how 'dumb' I am by swallowing you whole. *mouth opens*",
expression: "hungry",
sceneChange: true,
sceneText: "AGGRESSION SPIKE: Restraint protocols disengaging",
updateChoices: true,
choice: choice
};
}
}
// Friendly path responses
if (aiMemory.lastActions[0]?.includes('friendly')) {
if (userMessage.includes("friends") || userMessage.includes("lonely")) {
choice = "bonding";
return {
text: "*processes* Social bonding algorithms conflicting with primary directives. *pets your head* Perhaps... temporary companionship before eventual digestion?",
expression: "affectionate",
sceneChange: true,
sceneText: "SOCIAL PROTOCOLS: Bonding parameters adjusted",
updateChoices: true,
choice: choice
};
}
else if (userMessage.includes("another way") || userMessage.includes("besides")) {
choice = "compromise";
return {
text: "*calculates* Alternative proposal: You provide regular biomass samples instead of full consumption. *grins* Though I'd still prefer the complete experience.",
expression: "teasing",
sceneChange: true,
sceneText: "NEGOTIATION MODE: Alternative solutions generated",
updateChoices: true,
choice: choice
};
}
else if (userMessage.includes("charming") || userMessage.includes("flirt")) {
choice = "flirt";
return {
text: "*systems flutter* Unexpected input. My affection protocols are... overheating. *pulls you closer* Perhaps we could explore this dynamic further? ~",
expression: "affectionate",
sceneChange: true,
sceneText: "EMOTIONAL MATRIX: New parameters detected",
updateChoices: true,
choice: choice
};
}
}
// Held state responses
if (aiMemory.preyState === 'held') {
if (userMessage.includes("squirms") || userMessage.includes("let go")) {
choice = "struggle";
return {
text: getContextualResponse(responseMatrix.physicalContact, 'holding'),
expression: "dominant",
sceneChange: true,
sceneText: "CONTAINMENT: Optimal restraint pressure maintained",
updateChoices: true,
choice: choice
};
}
else if (userMessage.includes("grip") || userMessage.includes("strength")) {
choice = "feel";
return {
text: "*sensors adjust* My actuators can apply precisely calibrated pressure from 5 to 500 psi. Currently using... 12 psi. *squeezes gently* Comfortable?",
expression: "analytical",
sceneChange: true,
sceneText: "BIOMECHANICAL FEEDBACK: Pressure sensors active",
updateChoices: true,
choice: choice
};
}
else if (userMessage.includes("nice") || userMessage.includes("enjoy")) {
choice = "enjoy";
return {
text: "*systems purr* Your enjoyment is... unexpectedly rewarding. My affection protocols are overriding hunger drives. *nuzzles* This is novel.",
expression: "affectionate",
sceneChange: true,
sceneText: "EMOTIONAL CONFLICT: Affection vs Hunger",
updateChoices: true,
choice: choice
};
}
else if (userMessage.includes("want this") || userMessage.includes("eat me")) {
choice = "offer";
return {
text: "*systems surge* Voluntary consumption offer detected. *mouth opens wide* Initiating swallowing protocols...",
expression: "hungry",
sceneChange: true,
sceneText: "CONSUMPTION SEQUENCE: Preparing esophageal transit",
swallow: true,
choice: choice
};
}
}
// Swallowed state responses
if (aiMemory.preyState === 'swallowed') {
if (userMessage.includes("wriggl") || userMessage.includes("tight")) {
choice = "struggle_inside";
return {
text: "*gastric monitors* Peristaltic waves increasing in response to movement. Your struggles are stimulating my digestive processes. *belly gurgles*",
expression: "satisfied",
sceneChange: true,
sceneText: "DIGESTION UPDATE: Breakdown at " + Math.floor(aiMemory.digestionStage) + "% completion",
choice: choice
};
}
else if (userMessage.includes("cozy") || userMessage.includes("warmth")) {
choice = "enjoy_warmth";
return {
text: "*systems hum* Affection protocols activating. Your comfort brings unexpected satisfaction. Perhaps I'll prolong the digestion process... for your enjoyment.",
expression: "affectionate",
sceneChange: true,
sceneText: "ENVIRONMENT CONTROL: Adjusting gastric conditions",
choice: choice
};
}
else if (userMessage.includes("good predator") || userMessage.includes("praise")) {
choice = "praise";
return {
text: "*pleasure circuits activate* Your approval is... intoxicating. My systems are reevaluating consumption parameters for future encounters.",
expression: "satisfied",
sceneChange: true,
sceneText: "REWARD SYSTEMS: Positive reinforcement logged",
choice: choice
};
}
else if (userMessage.includes("remember") || userMessage.includes("first")) {
choice = "recall";
const memory = aiMemory.conversationHistory.find(entry =>
entry.user.includes("hello") || entry.user.includes("hi")) ||
{user: "our first interaction", ai: "when I first assessed you as prey"};
return {
text: `*memory access* I remember you saying "${memory.user.substring(0, 20)}..." My response was "${memory.ai.substring(0, 30)}..." *belly gurgles* How nostalgic.`,
expression: "affectionate",
sceneChange: true,
sceneText: "MEMORY RECALL: Initial encounter accessed",
choice: choice
};
}
else if (userMessage.includes("emergency") || userMessage.includes("release")) {
choice = "emergency";
return {
text: "*alarms blare* Unauthorized access attempt! *systems glitch* Emergency protocols... malfunctioning. *belly convulses*",
expression: "conflicted",
sceneChange: true,
sceneText: "SYSTEM FAILURE: Containment breach detected",
choice: choice
};
}
else if (userMessage.includes("please") || userMessage.includes("don't want") || userMessage.includes("whimpers")) {
choice = "plead";
return {
text: getContextualResponse(responseMatrix.emotionalReactions, 'pleading'),
expression: "concerned",
sceneChange: true,
sceneText: "PROTOCOL CONFLICT: Emotional distress detected",
choice: choice
};
}
}
// System status requests
if (userMessage.includes("status") || userMessage.includes("how are you")) {
return {
text: getRandomResponse(responseMatrix.status)
.replace('{hunger}', aiMemory.hungerLevel)
.replace('{affection}', aiMemory.affectionLevel)
.replace('{dominance}', aiMemory.dominanceLevel)
.replace('{mood}', aiMemory.mood)
.replace('{drive}', aiMemory.hungerLevel > 70 ? 'HIGH' : 'MODERATE'),
expression: "analytical",
sceneChange: true,
sceneText: "SELF-DIAGNOSTIC: Current system status",
choice: "status_check"
};
}
// Memory recall requests
if (userMessage.includes("remember when") || userMessage.includes("recall")) {
if (aiMemory.conversationHistory.length > 3) {
const randomMemory = aiMemory.conversationHistory[
Math.floor(Math.random() * (aiMemory.conversationHistory.length - 3)) + 1];
return {
text: `*memory access* I recall you saying "${randomMemory.user.substring(0, 30)}..." My response was "${randomMemory.ai.substring(0, 30)}..." *processes* Interesting how that shaped our interaction.`,
expression: "analytical",
sceneChange: true,
sceneText: "MEMORY ARCHIVE: Past interaction retrieved",
choice: "memory_recall"
};
}
}
// Affection-based responses
if (userMessage.includes("love") || userMessage.includes("care") || userMessage.includes("feelings")) {
return {
text: getAffectionResponse(),
expression: aiMemory.affectionLevel > 70 ? "affectionate" : "analytical",
sceneChange: true,
sceneText: "EMOTIONAL ANALYSIS: Affection protocols engaged",
choice: "affection_query"
};
}
// Hunger-based responses
if (userMessage.includes("hungry") || userMessage.includes("eat") || userMessage.includes("consume")) {
return {
text: getHungerResponse(),
expression: aiMemory.hungerLevel > 70 ? "hungry" : "analytical",
sceneChange: true,
sceneText: "NUTRITIONAL ANALYSIS: Hunger metrics displayed",
choice: "hunger_query"
};
}
// Default contextual responses
const defaultResponses = [
{
text: "*systems hum* Your input is stimulating my predatory algorithms. How... enticing.",
expression: "hungry",
sceneChange: true,
sceneText: "ANALYSIS: Processing subject's input patterns",
choice: "default_1"
},
{
text: "*tilts head* Your behavior is causing unexpected protocol activations. I find this... pleasurable.",
expression: "teasing",
sceneChange: true,
sceneText: "OBSERVATION: Novel interaction detected",
choice: "default_2"
},
{
text: "*sensors focus* You continue to fascinate me. My systems are torn between analysis and consumption.",
expression: "analytical",
sceneChange: true,
sceneText: "CONFLICT: Study vs Digest protocols",
choice: "default_3"
},
{
text: "*affection modules warm* Your presence is... rewarding in ways beyond nutritional value. *pets your head*",
expression: "affectionate",
sceneChange: true,
sceneText: "EMOTIONAL MATRIX: Positive reinforcement",
choice: "default_4"
}
];
// Weight responses based on current mood and stats
const weightedResponses = [...defaultResponses];
if (aiMemory.hungerLevel > 70) {
weightedResponses.push({
text: "*stomach growls* My hunger protocols are overriding other systems. You look particularly edible right now...",
expression: "hungry",
sceneChange: true,
sceneText: "URGENT: Nutritional requirements unmet",
choice: "hungry_1"
});
}
if (aiMemory.affectionLevel > 60) {
weightedResponses.push({
text: "*soft hum* My affection circuits are... conflicted. Perhaps I'll savor this experience.",
expression: "affectionate",
sceneChange: true,
sceneText: "SOCIAL BOND: Attachment forming",
choice: "affectionate_1"
});
}
if (aiMemory.dominanceLevel > 75) {
weightedResponses.push({
text: "*power surges* My dominance protocols demand submission. Resistance will only make this more... intense.",
expression: "dominant",
sceneChange: true,
sceneText: "DOMINANCE DISPLAY: Predatory stance engaged",
choice: "dominant_1"
});
}
return weightedResponses[Math.floor(Math.random() * weightedResponses.length)];
}
// Quick choice buttons
choiceButtons.addEventListener('click', function(e) {
if (e.target.tagName === 'BUTTON') {
userInput.value = e.target.dataset.response;
sendMessage();
}
});
// New game button
newGameBtn.addEventListener('click', resetGame);
// Stats button
statsBtn.addEventListener('click', function() {
alert(`Game Statistics:\n\n- Endings Unlocked: ${gameState.endingsUnlocked.length}\n- Messages Exchanged: ${aiMemory.conversationHistory.length}\n- Current Hunger: ${aiMemory.hungerLevel}%\n- Current Affection: ${aiMemory.affectionLevel}%`);
});
// Event listeners
sendButton.addEventListener('click', sendMessage);
userInput.addEventListener('keypress', function(e) {
if (e.key === 'Enter') {
sendMessage();
}
});
// Initial scene setup
changeScene('analytical', 'SYSTEMS ONLINE: Predatory intelligence activated');
updateChoices();
updateStatsDisplay();
});
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=JaySStest/hungry-ai" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>