Updated Diary - SESSION 3 Complete
All work from Christmas Day documented: - Session 1: Biomes (18/18) - Session 2: Story integration + UI systems - Session 3: Grok character + Susi Total: 5 hours, 1486 lines code, 6 systems
This commit is contained in:
@@ -1,7 +1,24 @@
|
||||
/**
|
||||
* GrokCharacterSystem.js
|
||||
* ======================
|
||||
* KRVAVA ŽETEV - Grok Character Update (P13)
|
||||
* KRVAVA ŽETEV - Grok Character (The Developer / Pink Alpha)
|
||||
*
|
||||
* CHARACTER DESIGN:
|
||||
* - Skin: Light green (unique color - not human!)
|
||||
* - Hair: PINK dreadlocks (iconic!)
|
||||
* - Outfit: Oversized hoodie (2 sizes too big) + baggy pants
|
||||
* - Shoes: Hot pink Converse
|
||||
* - Piercings: Septum, eyebrows, lips, 15+ earrings, 25mm tunnels
|
||||
*
|
||||
* PERSONALITY:
|
||||
* - ADHD genius developer
|
||||
* - Always vaping (Rainbow RGB mod)
|
||||
* - Zen master with massive gong
|
||||
* - Quick movements when hyperfocused
|
||||
* - Oversized comfort style
|
||||
*
|
||||
* COMPANION:
|
||||
* - Susi: Hot dog hunting dog (always by his side)
|
||||
*
|
||||
* Features:
|
||||
* - Massive gong (1m diameter!)
|
||||
@@ -9,9 +26,11 @@
|
||||
* - Morning meditation rituals
|
||||
* - Combat buffs
|
||||
* - Smoke screen abilities
|
||||
* - ADHD focus modes
|
||||
* - Susi interactions
|
||||
*
|
||||
* @author NovaFarma Team
|
||||
* @date 2025-12-23
|
||||
* @date 2025-12-25
|
||||
*/
|
||||
|
||||
export default class GrokCharacterSystem {
|
||||
@@ -25,18 +44,41 @@ export default class GrokCharacterSystem {
|
||||
this.gongCooldown = 300000; // 5 minutes
|
||||
this.meditationTime = 6; // 6 AM daily
|
||||
|
||||
// ADHD mechanics
|
||||
this.isFocused = false; // "Oversized Focus" mode
|
||||
this.focusTimer = 0;
|
||||
this.hyperfocusSpeed = 2.0; // Speed multiplier when focused
|
||||
this.currentTopic = 'coding'; // What Grok is focused on
|
||||
|
||||
// Visual elements
|
||||
this.gong = null;
|
||||
this.vapeDevice = null;
|
||||
this.smokeParticles = [];
|
||||
this.hoodie = null; // Oversized hoodie sprite
|
||||
this.dreadlocks = null; // Pink dreadlocks
|
||||
this.piercings = []; // Visual piercing elements
|
||||
|
||||
// Susi companion
|
||||
this.susi = null; // Susi the hot dog hunter
|
||||
this.susiState = 'following'; // following, hunting, eating
|
||||
|
||||
// Buffs
|
||||
this.activeBuffs = new Map();
|
||||
|
||||
// Character colors
|
||||
this.skinColor = 0x90EE90; // Light green
|
||||
this.dreadlockColor = 0xFF69B4; // Hot pink
|
||||
this.hoodieColor = 0x2F4F4F; // Dark slate gray (wide hoodie)
|
||||
|
||||
console.log('🧘 GrokCharacterSystem initialized');
|
||||
console.log('👕 Oversized hoodie: ON');
|
||||
console.log('💚 Skin: Light green');
|
||||
console.log('💕 Dreadlocks: HOT PINK');
|
||||
console.log('🐕 Susi companion: Ready!');
|
||||
|
||||
// Setup visuals
|
||||
this.setupGrokVisuals();
|
||||
this.createSusi();
|
||||
this.startVapingAnimation();
|
||||
}
|
||||
|
||||
@@ -559,6 +601,264 @@ export default class GrokCharacterSystem {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Susi companion (Hot Dog Hunter)
|
||||
*/
|
||||
createSusi() {
|
||||
if (!this.grok) return;
|
||||
|
||||
// Create Susi (dachshund-style hot dog hunter!)
|
||||
this.susi = this.scene.add.ellipse(
|
||||
this.grok.x + 30,
|
||||
this.grok.y + 20,
|
||||
40, // Width (long dog!)
|
||||
20, // Height
|
||||
0x8B4513 // Brown color
|
||||
);
|
||||
this.susi.setDepth(this.grok.depth);
|
||||
|
||||
// Add spots
|
||||
const spot1 = this.scene.add.circle(
|
||||
this.susi.x - 10,
|
||||
this.susi.y,
|
||||
4,
|
||||
0x654321 // Darker spot
|
||||
);
|
||||
spot1.setDepth(this.grok.depth + 1);
|
||||
|
||||
// Susi's nose (always sniffing for hot dogs!)
|
||||
const nose = this.scene.add.circle(
|
||||
this.susi.x + 20,
|
||||
this.susi.y,
|
||||
3,
|
||||
0x000000 // Black nose
|
||||
);
|
||||
nose.setDepth(this.grok.depth + 2);
|
||||
|
||||
// Tail (wagging animation!)
|
||||
const tail = this.scene.add.line(
|
||||
this.susi.x - 20,
|
||||
this.susi.y - 5,
|
||||
0, 0,
|
||||
-10, -5,
|
||||
0x8B4513,
|
||||
1
|
||||
);
|
||||
tail.setLineWidth(3);
|
||||
tail.setDepth(this.grok.depth);
|
||||
|
||||
// Tail wag animation
|
||||
this.scene.tweens.add({
|
||||
targets: tail,
|
||||
angle: { from: -15, to: 15 },
|
||||
duration: 300,
|
||||
yoyo: true,
|
||||
repeat: -1
|
||||
});
|
||||
|
||||
console.log('🐕 Susi created! Hot dog hunter ready!');
|
||||
|
||||
// Susi behavior
|
||||
this.startSusiBehavior();
|
||||
}
|
||||
|
||||
/**
|
||||
* Susi's AI behavior
|
||||
*/
|
||||
startSusiBehavior() {
|
||||
// Susi follows Grok
|
||||
setInterval(() => {
|
||||
if (!this.susi || !this.grok) return;
|
||||
|
||||
// Follow Grok at distance
|
||||
const targetX = this.grok.x + 30;
|
||||
const targetY = this.grok.y + 20;
|
||||
|
||||
// Smooth follow
|
||||
this.susi.x += (targetX - this.susi.x) * 0.1;
|
||||
this.susi.y += (targetY - this.susi.y) * 0.1;
|
||||
|
||||
// Random hot dog hunting
|
||||
if (Math.random() < 0.01) { // 1% chance per frame
|
||||
this.susiHuntHotDog();
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
|
||||
/**
|
||||
* Susi hunts for hot dogs!
|
||||
*/
|
||||
susiHuntHotDog() {
|
||||
if (!this.susi) return;
|
||||
|
||||
console.log('🌭 Susi spotted a potential hot dog!');
|
||||
this.susiState = 'hunting';
|
||||
|
||||
// Susi runs to random location
|
||||
const randomX = this.susi.x + (Math.random() - 0.5) * 100;
|
||||
const randomY = this.susi.y + (Math.random() - 0.5) * 100;
|
||||
|
||||
this.scene.tweens.add({
|
||||
targets: this.susi,
|
||||
x: randomX,
|
||||
y: randomY,
|
||||
duration: 1000,
|
||||
ease: 'Quad.InOut',
|
||||
onComplete: () => {
|
||||
// Found hot dog!
|
||||
this.susiState = 'eating';
|
||||
console.log('🌭 Susi found a hot dog! *nom nom*');
|
||||
|
||||
// Eating animation (wiggle)
|
||||
this.scene.tweens.add({
|
||||
targets: this.susi,
|
||||
angle: { from: -5, to: 5 },
|
||||
duration: 200,
|
||||
yoyo: true,
|
||||
repeat: 5,
|
||||
onComplete: () => {
|
||||
this.susiState = 'following';
|
||||
this.susi.setAngle(0);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* ADHD Focus Mode - Grok hides in hoodie to focus
|
||||
*/
|
||||
enterFocusMode(topic = 'coding') {
|
||||
if (this.isFocused) {
|
||||
console.log('⚠️ Already in focus mode!');
|
||||
return false;
|
||||
}
|
||||
|
||||
console.log(`🧠 Grok enters ADHD FOCUS MODE! Topic: ${topic}`);
|
||||
console.log('👕 *Hides in oversized hoodie*');
|
||||
|
||||
this.isFocused = true;
|
||||
this.currentTopic = topic;
|
||||
this.focusTimer = 0;
|
||||
|
||||
// Visual: Grok shrinks into hoodie
|
||||
if (this.grok) {
|
||||
this.scene.tweens.add({
|
||||
targets: this.grok,
|
||||
scale: 0.7, // Gets smaller (hiding in hoodie)
|
||||
alpha: 0.8,
|
||||
duration: 500
|
||||
});
|
||||
}
|
||||
|
||||
// Can't be interrupted unless you have vape juice!
|
||||
this.showNotification({
|
||||
title: 'Focus Mode Active!',
|
||||
text: `🧠 Grok is focusing on ${topic}. Don't interrupt! (Unless you have vape juice)`,
|
||||
icon: '👕'
|
||||
});
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Exit ADHD focus mode
|
||||
*/
|
||||
exitFocusMode() {
|
||||
if (!this.isFocused) return;
|
||||
|
||||
console.log('🧠 Focus mode complete!');
|
||||
this.isFocused = false;
|
||||
|
||||
// Visual: Grok emerges from hoodie
|
||||
if (this.grok) {
|
||||
this.scene.tweens.add({
|
||||
targets: this.grok,
|
||||
scale: 1.0,
|
||||
alpha: 1.0,
|
||||
duration: 500
|
||||
});
|
||||
}
|
||||
|
||||
this.showNotification({
|
||||
title: 'Focus Complete!',
|
||||
text: `✅ ${this.currentTopic} finished! Grok emerges victorious!`,
|
||||
icon: '🎉'
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* ADHD Hyperfocus Movement
|
||||
*/
|
||||
moveWithHyperfocus(direction) {
|
||||
if (!this.isFocused) {
|
||||
console.log('⚠️ Not in focus mode!');
|
||||
return;
|
||||
}
|
||||
|
||||
// When hyperfocused, Grok moves SUPER fast!
|
||||
const baseSpeed = 5;
|
||||
const speed = baseSpeed * this.hyperfocusSpeed; // 2x speed!
|
||||
|
||||
console.log(`⚡ HYPERFOCUS SPEED! Moving ${direction} at ${speed} px/frame!`);
|
||||
|
||||
// Move Grok super fast
|
||||
// (Integration with movement system would go here)
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Grok's quest dialogues
|
||||
*/
|
||||
getGrokQuests() {
|
||||
return [
|
||||
{
|
||||
id: 'hoodie_rescue',
|
||||
title: 'Hoodie v nevarnosti',
|
||||
dialogue: "Dude, moj najljubši hoodie se je zataknil za eno tistih piranha rastlin v coni 4. Brez njega se ne morem fokusirati, preveč me zebe v roke! Greš ponj?",
|
||||
objective: 'Premagaj gigantsko mesojedko in reši Gronkov široki pulover',
|
||||
rewards: {
|
||||
gold: 500,
|
||||
xp: 1000,
|
||||
item: 'grok_friendship +10'
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'vape_mixology',
|
||||
title: 'Zamenjava tekočine (Vape Mixology)',
|
||||
dialogue: "Bro, poskušam zmešati nov okus 'Baggy Cloud', ampak Susi mi je prevrnila epruveto, ker je mislila, da so notri hrenovke. Rabim tri mutirane jagode iz Dino Valleyja!",
|
||||
objective: 'Najdi 3 mutirane jagode v Dino Valley biome',
|
||||
rewards: {
|
||||
gold: 300,
|
||||
xp: 750,
|
||||
item: 'baggy_cloud_vape_juice'
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'adhd_code',
|
||||
title: 'ADHD koda na hlačah',
|
||||
dialogue: "Ej, si vedel, da sem si na nogo (na hlače) napisal pomembno kodo za tvoj novi rudnik, pa sem jo zdaj ponesreči umazal z blatom? Susi, pomagaj mi polizati to blato... ah, ne, Kai, ti boš moral najti čistilo!",
|
||||
objective: 'Najdi čistilo v opuščenem laboratoriju',
|
||||
rewards: {
|
||||
gold: 400,
|
||||
xp: 850,
|
||||
unlock: 'advanced_mine_code'
|
||||
}
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper: Show notification
|
||||
*/
|
||||
showNotification(notification) {
|
||||
console.log(`📢 ${notification.icon} ${notification.title}: ${notification.text}`);
|
||||
|
||||
const ui = this.scene.scene.get('UIScene');
|
||||
if (ui && ui.showNotification) {
|
||||
ui.showNotification(notification);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get active buff for target
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user