dodelani dnevnik

This commit is contained in:
2025-12-08 03:15:53 +01:00
parent 860a10a5c3
commit 4c3ee03007
11 changed files with 488 additions and 72 deletions

View File

@@ -0,0 +1,44 @@
class LegacySystem {
constructor(scene) {
this.scene = scene;
this.worldAge = 0; // Days passed
this.generation = 1;
this.currentAge = 18; // Protagonist age
this.family = {
partner: null,
children: []
};
console.log('⏳ LegacySystem: Initialized (Gen ' + this.generation + ')');
}
// Call daily
advanceDay() {
this.worldAge++;
// Age Logic
if (this.worldAge % 365 === 0) {
this.currentAge++;
console.log('🎂 Birthday! Now age:', this.currentAge);
}
}
marry(npcId) {
this.family.partner = npcId;
console.log('💍 Married to:', npcId);
}
haveChild(name) {
if (this.family.children.length < 2) {
this.family.children.push({ name: name, age: 0 });
console.log('👶 New Child:', name);
}
}
dieAndInherit(heirIndex) {
console.log('⚰️ Character Died. Passing legacy...');
this.generation++;
this.currentAge = 18; // Reset age for heir
// TODO: Transfer inventory and stats
}
}