318 lines
8.6 KiB
JavaScript
318 lines
8.6 KiB
JavaScript
// Game data - tasks and consequences
|
|
const gameData = {
|
|
// Main tasks - these are the primary challenges
|
|
mainTasks: [
|
|
{
|
|
id: 1,
|
|
text: "Do 20 jumping jacks",
|
|
difficulty: "Easy"
|
|
},
|
|
{
|
|
id: 2,
|
|
text: "Write down 3 things you're grateful for",
|
|
difficulty: "Easy"
|
|
},
|
|
{
|
|
id: 3,
|
|
text: "Call a friend or family member",
|
|
difficulty: "Medium"
|
|
},
|
|
{
|
|
id: 4,
|
|
text: "Organize your desk or workspace",
|
|
difficulty: "Medium"
|
|
},
|
|
{
|
|
id: 5,
|
|
text: "Take 10 deep breaths",
|
|
difficulty: "Easy"
|
|
},
|
|
{
|
|
id: 6,
|
|
text: "Read for 15 minutes",
|
|
difficulty: "Medium"
|
|
},
|
|
{
|
|
id: 7,
|
|
text: "Do a 5-minute stretch routine",
|
|
difficulty: "Easy"
|
|
},
|
|
{
|
|
id: 8,
|
|
text: "Write in a journal for 10 minutes",
|
|
difficulty: "Medium"
|
|
},
|
|
{
|
|
id: 9,
|
|
text: "Listen to your favorite song and dance",
|
|
difficulty: "Easy"
|
|
},
|
|
{
|
|
id: 10,
|
|
text: "Make your bed perfectly",
|
|
difficulty: "Easy"
|
|
},
|
|
{
|
|
id: 11,
|
|
text: "Drink a full glass of water",
|
|
difficulty: "Easy"
|
|
},
|
|
{
|
|
id: 12,
|
|
text: "Compliment someone genuinely",
|
|
difficulty: "Medium"
|
|
},
|
|
{
|
|
id: 13,
|
|
text: "Do 50 push-ups (or modified push-ups)",
|
|
difficulty: "Hard"
|
|
},
|
|
{
|
|
id: 14,
|
|
text: "Meditate for 20 minutes",
|
|
difficulty: "Hard"
|
|
},
|
|
{
|
|
id: 15,
|
|
text: "Clean and organize an entire room",
|
|
difficulty: "Hard"
|
|
},
|
|
{
|
|
id: 16,
|
|
text: "Learn 10 new words in a foreign language",
|
|
difficulty: "Hard"
|
|
},
|
|
{
|
|
id: 17,
|
|
text: "Write a one-page story or essay",
|
|
difficulty: "Hard"
|
|
}
|
|
],
|
|
|
|
// Consequence tasks - these are triggered when main tasks are skipped
|
|
consequenceTasks: [
|
|
{
|
|
id: 101,
|
|
text: "Do 30 push-ups (or modified push-ups)"
|
|
},
|
|
{
|
|
id: 102,
|
|
text: "Clean the bathroom mirror and sink"
|
|
},
|
|
{
|
|
id: 103,
|
|
text: "Stand on one foot for 2 minutes"
|
|
},
|
|
{
|
|
id: 104,
|
|
text: "Write 'I will not skip tasks' 20 times"
|
|
},
|
|
{
|
|
id: 105,
|
|
text: "Hold a plank position for 1 minute"
|
|
},
|
|
{
|
|
id: 106,
|
|
text: "Recite the alphabet backwards"
|
|
},
|
|
{
|
|
id: 107,
|
|
text: "Do 50 jumping jacks"
|
|
},
|
|
{
|
|
id: 108,
|
|
text: "Wash 5 dishes by hand"
|
|
},
|
|
{
|
|
id: 109,
|
|
text: "Memorize and recite a short poem"
|
|
},
|
|
{
|
|
id: 110,
|
|
text: "Vacuum one room completely"
|
|
}
|
|
],
|
|
|
|
// Image directory configuration
|
|
taskImageDirectory: "images/tasks/",
|
|
consequenceImageDirectory: "images/consequences/",
|
|
supportedImageFormats: ['.jpg', '.jpeg', '.png', '.gif'],
|
|
discoveredTaskImages: [], // Will be populated automatically
|
|
discoveredConsequenceImages: [], // Will be populated automatically
|
|
|
|
// Placeholder images for tasks that don't have specific images
|
|
defaultImage: "images/placeholder.jpg",
|
|
|
|
// Flash Message System - Default encouraging messages
|
|
defaultFlashMessages: [
|
|
// Motivational messages
|
|
{
|
|
id: 1,
|
|
text: "You're doing amazing! Keep going!",
|
|
category: "motivational",
|
|
enabled: true
|
|
},
|
|
{
|
|
id: 2,
|
|
text: "Every task completed makes you stronger!",
|
|
category: "motivational",
|
|
enabled: true
|
|
},
|
|
{
|
|
id: 3,
|
|
text: "Progress, not perfection!",
|
|
category: "motivational",
|
|
enabled: true
|
|
},
|
|
{
|
|
id: 4,
|
|
text: "You've got this! Stay focused!",
|
|
category: "motivational",
|
|
enabled: true
|
|
},
|
|
{
|
|
id: 5,
|
|
text: "Small steps lead to big changes!",
|
|
category: "motivational",
|
|
enabled: true
|
|
},
|
|
// Encouraging messages
|
|
{
|
|
id: 6,
|
|
text: "Your dedication is inspiring!",
|
|
category: "encouraging",
|
|
enabled: true
|
|
},
|
|
{
|
|
id: 7,
|
|
text: "Look how far you've come already!",
|
|
category: "encouraging",
|
|
enabled: true
|
|
},
|
|
{
|
|
id: 8,
|
|
text: "You're building great habits!",
|
|
category: "encouraging",
|
|
enabled: true
|
|
},
|
|
{
|
|
id: 9,
|
|
text: "Believe in yourself - you're capable of amazing things!",
|
|
category: "encouraging",
|
|
enabled: true
|
|
},
|
|
{
|
|
id: 10,
|
|
text: "Your future self will thank you!",
|
|
category: "encouraging",
|
|
enabled: true
|
|
},
|
|
// Achievement messages
|
|
{
|
|
id: 11,
|
|
text: "Great job completing that task!",
|
|
category: "achievement",
|
|
enabled: true
|
|
},
|
|
{
|
|
id: 12,
|
|
text: "You're on fire! Keep the streak alive!",
|
|
category: "achievement",
|
|
enabled: true
|
|
},
|
|
{
|
|
id: 13,
|
|
text: "Another win in the books!",
|
|
category: "achievement",
|
|
enabled: true
|
|
},
|
|
{
|
|
id: 14,
|
|
text: "Excellence in action!",
|
|
category: "achievement",
|
|
enabled: true
|
|
},
|
|
{
|
|
id: 15,
|
|
text: "You're crushing your goals!",
|
|
category: "achievement",
|
|
enabled: true
|
|
},
|
|
// Persistence messages
|
|
{
|
|
id: 16,
|
|
text: "Don't give up now - you're so close!",
|
|
category: "persistence",
|
|
enabled: true
|
|
},
|
|
{
|
|
id: 17,
|
|
text: "Every challenge is an opportunity to grow!",
|
|
category: "persistence",
|
|
enabled: true
|
|
},
|
|
{
|
|
id: 18,
|
|
text: "Push through - greatness awaits!",
|
|
category: "persistence",
|
|
enabled: true
|
|
},
|
|
{
|
|
id: 19,
|
|
text: "You're stronger than any excuse!",
|
|
category: "persistence",
|
|
enabled: true
|
|
},
|
|
{
|
|
id: 20,
|
|
text: "Champions are made in moments like this!",
|
|
category: "persistence",
|
|
enabled: true
|
|
}
|
|
],
|
|
|
|
// Flash message configuration defaults
|
|
defaultFlashConfig: {
|
|
enabled: true,
|
|
displayDuration: 3000, // 3 seconds
|
|
intervalDelay: 45000, // 45 seconds
|
|
position: 'center',
|
|
animation: 'fade',
|
|
fontSize: '24px',
|
|
fontWeight: 'bold',
|
|
color: '#ffffff',
|
|
backgroundColor: 'rgba(0, 123, 255, 0.9)',
|
|
borderRadius: '15px',
|
|
padding: '20px 30px',
|
|
maxWidth: '400px',
|
|
zIndex: 10000
|
|
},
|
|
|
|
// Default Popup Image Configuration (Punishment System)
|
|
defaultPopupImageConfig: {
|
|
enabled: true,
|
|
imageCount: 3, // Number of images to show
|
|
imageCountMode: 'fixed', // 'fixed', 'random', 'range'
|
|
minCount: 2, // For range mode
|
|
maxCount: 5, // For range mode
|
|
displayDuration: 8000, // 8 seconds default
|
|
durationMode: 'fixed', // 'fixed', 'random', 'range'
|
|
minDuration: 5000, // For range mode (5s)
|
|
maxDuration: 15000, // For range mode (15s)
|
|
positioning: 'random', // 'random', 'cascade', 'grid', 'center'
|
|
allowOverlap: true,
|
|
fadeAnimation: true,
|
|
blurBackground: true,
|
|
preventClose: true, // Users cannot close these
|
|
showTimer: true, // Show countdown timer
|
|
triggerOnSkip: true, // Trigger when tasks are skipped
|
|
intensity: 'medium', // 'low', 'medium', 'high' - affects default values
|
|
// Size constraints for dynamic sizing
|
|
minWidth: 200,
|
|
maxWidth: 500,
|
|
minHeight: 150,
|
|
maxHeight: 400,
|
|
viewportWidthRatio: 0.35, // Max 35% of viewport width
|
|
viewportHeightRatio: 0.4 // Max 40% of viewport height
|
|
}
|
|
}; |