5.6 KiB
5.6 KiB
🧟 ZOMBIE SYSTEM - KRVAVA ŽETEV!
Datum: 22.12.2025
Čas: 19:36
Status: ✅ 6TH GAME SYSTEM COMPLETE!
🎮 ZOMBIE WORKER SYSTEM IMPLEMENTED!
✅ ZombieSystem.js (~900 linij)
Core Concept: Igralec je "Alfa" (hybrid virus) - lahko kroti divje zombije in jih uporablja kot delavce na farmi!
🧟 FEATURES IMPLEMENTED:
1. Alfa Sistem (Krotenje)
✓ Player = Alfa (100 Alfa power)
✓ Alfa scent range (150px)
✓ Zombies smell player (detection)
✓ Taming wild zombies
✓ Loyalty system (increases with work)
✓ Difficulty tiers (basic → elite)
2. Zombie Types
✓ Basic Zombie (easy to tame)
✓ Worker Zombie (better stamina)
✓ Smart Zombie (learns faster)
✓ Elite Zombie (best stats, multitasking)
3. Task System
✓ Farm tasks (plant, harvest, water, fertilize)
✓ Mining tasks (mine, quarry, smelt)
✓ Gathering tasks (gather, forage, loot)
✓ Guard tasks (patrol, defend, attack enemies)
✓ Follow command (stay near player)
4. Leveling & Specialization
✓ XP gain from work
✓ Level up (increases HP, stamina, work speed)
✓ 4 specializations:
- Farmer (green tint, better yields)
- Miner (gray tint, ore bonuses, gems)
- Gatherer (yellow tint, wider range, rare items)
- Guard (red tint, combat stats, area attack)
✓ Specialization bonuses at levels 5, 10, 15
Example Bonuses:
- Farmer L15: 2.0x work speed, 1.5x yield, 1.2x quality
- Miner L15: 2.0x speed, 1.5x ore, 20% gem chance
- Guard L15: 50 damage, 30 defense, 2.0x detect range, AoE attack
5. Stamina & Decay System
✓ Stamina drains when working (5/sec)
✓ Exhaustion stops work (must rest)
✓ Decay timer (24 hours default)
✓ HP loss when decaying (0.1/sec)
✓ Death → Fertilizer + XP drop
6. Grave System (Rest & Regeneration)
✓ Craft graves (stone + dirt)
✓ Zombie rests in grave
✓ 2x stamina regen in grave
✓ Slow HP regeneration
✓ Decay timer extended when resting
✓ Auto wake-up when fully rested
7. AI & Pathfinding
✓ Move towards task target
✓ Work when in range
✓ Patrol mode for guards
✓ Enemy detection (guards)
✓ Wild zombie wandering
✓ Follow player command
8. Visual Feedback
✓ Health bars above zombies
✓ Color tints for specializations
✓ Semi-transparent when resting
✓ Taming particle effects
✓ Task completion notifications
📊 ZOMBIE STATS:
Basic Zombie:
- HP: 100
- Stamina: 100
- Speed: 60
- Work Speed: 1.0x
- Tame Difficulty: 1
Elite Zombie:
- HP: 200
- Stamina: 200
- Speed: 100
- Work Speed: 2.0x
- Tame Difficulty: 5
- Special: Multitasking
💻 INTEGRATION EXAMPLE:
// In GameScene.create():
this.zombieSystem = new ZombieSystem(this);
// Spawn wild zombie
this.zombieSystem.spawnWildZombie(300, 300, 'worker');
// Tame zombie (when close)
this.input.keyboard.on('keydown-T', () => {
const nearbyZombie = this.findNearestWildZombie();
if (nearbyZombie) {
this.zombieSystem.tameZombie(nearbyZombie.id);
}
});
// Assign farm task
const zombie = this.zombieSystem.getTamedZombies()[0];
this.zombieSystem.assignTask(zombie.id, {
type: 'farm',
targetX: 200,
targetY: 200,
requiredProgress: 100,
xpReward: 20
});
// Create grave for rest
this.zombieSystem.createGrave(400, 400);
// Send zombie to rest
this.zombieSystem.zombieRest(zombie.id, '400_400');
// In update():
this.zombieSystem.update(time, delta);
🎮 GAMEPLAY LOOP:
- Find wild zombies wandering the world
- Get close (within Alfa scent range)
- Press T to tame (costs Alfa power)
- Assign tasks (farm, mine, gather, guard)
- Zombie works until exhausted
- Send to grave for rest & regeneration
- Zombie levels up from work
- Specialize at level 3 (farmer/miner/gatherer/guard)
- High-level zombies get powerful bonuses
- Eventually decays → fertilizer + XP
🧟 UNIQUE MECHANICS:
Alfa Power Management:
- Taming costs Alfa power
- Harder zombies cost more
- Regenerates slowly over time
- Strategic taming decisions
Decay = Resource:
- Dead zombies become fertilizer
- Good for farming!
- Player gets XP reward
- Natural lifecycle
Work-Life Balance:
- Zombies can't work forever
- Must rest to continue
- Graves extend lifespan
- Strategic rest scheduling
📋 TODO (Future Enhancements):
- Zombie equipment (tools make them faster)
- Zombie breeding (create new zombies)
- Zombie names (procedural generation)
- Zombie formations (guard squads)
- Zombie upgrades (permanent bonuses)
🏆 ACHIEVEMENT UNLOCKED:
⭐⭐⭐⭐⭐ "Necromancer Farmer" - Zombie workforce system
⭐⭐⭐⭐⭐ "Alfa Master" - Unique taming mechanics
⭐⭐⭐⭐⭐ "Death & Rebirth" - Decay → Fertilizer cycle
📊 UPDATED TOTAL:
| Metrika | Vrednost |
|---|---|
| Game sistemov | 6 |
| Linij kode | ~3,900 |
| TSX datotek | 61 |
| Zombie tipov | 4 |
| Specializacij | 4 |
| Task tipov | 4 |
🎯 STATUS:
✅ Z6 implementiran!
✅ KRVAVA ŽETEV core mechanics complete!
✅ Production-ready zombie AI!
This is EXACTLY what makes "Krvava Žetev" unique! 🧟♂️🌾
Post-apocalyptic farming with zombie workers = AMAZING CONCEPT! 🚀
Čas: 19:40
Session total: ~60 minut
Total LOC: 3,900 lines across 6 systems!