popraven novi npc

This commit is contained in:
2025-12-08 17:09:52 +01:00
parent 81a7895c10
commit abc536fea1
17 changed files with 149 additions and 58 deletions

View File

@@ -63,24 +63,25 @@ class GameScene extends Phaser.Scene {
// CITY CONTENT: Ruins, Chests, Spawners
console.log('🏚️ Generating City Content...');
// DISABLED - City structures removed for cleaner gameplay
// Main Ruins
this.terrainSystem.placeStructure(55, 55, 'ruin');
this.terrainSystem.placeStructure(65, 65, 'ruin');
this.terrainSystem.placeStructure(75, 75, 'ruin');
this.terrainSystem.placeStructure(60, 70, 'ruin');
this.terrainSystem.placeStructure(70, 60, 'ruin');
// this.terrainSystem.placeStructure(55, 55, 'ruin');
// this.terrainSystem.placeStructure(65, 65, 'ruin');
// this.terrainSystem.placeStructure(75, 75, 'ruin');
// this.terrainSystem.placeStructure(60, 70, 'ruin');
// this.terrainSystem.placeStructure(70, 60, 'ruin');
// Arena (Boss battle area)
this.terrainSystem.placeStructure(75, 55, 'arena');
// this.terrainSystem.placeStructure(75, 55, 'arena');
// Treasure Chests (scattered in ruins)
this.terrainSystem.placeStructure(56, 56, 'chest');
this.terrainSystem.placeStructure(66, 66, 'chest');
this.terrainSystem.placeStructure(76, 76, 'chest');
// this.terrainSystem.placeStructure(56, 56, 'chest');
// this.terrainSystem.placeStructure(66, 66, 'chest');
// this.terrainSystem.placeStructure(76, 76, 'chest');
// Zombie Spawners (in city)
this.terrainSystem.placeStructure(58, 68, 'spawner');
this.terrainSystem.placeStructure(72, 62, 'spawner');
// this.terrainSystem.placeStructure(58, 68, 'spawner');
// this.terrainSystem.placeStructure(72, 62, 'spawner');
// CESTE (ROADS) - povezava med farmo (20,20) in mestom (65,65)
console.log('🛣️ Building Roads...');
@@ -183,7 +184,7 @@ class GameScene extends Phaser.Scene {
console.log('🏭 Initializing Workstation System...');
this.workstationSystem = new WorkstationSystem(this);
// ELITE ZOMBIE v City območju (samo 1 za testiranje)
// ELITE ZOMBIE v City območju (1x za testiranje)
console.log('👹 Spawning ELITE ZOMBIE in City...');
const eliteX = Phaser.Math.Between(50, 80); // City area
const eliteY = Phaser.Math.Between(50, 80);
@@ -195,13 +196,12 @@ class GameScene extends Phaser.Scene {
this.npcs.push(new NPC(this, 60, 20, this.terrainOffsetX, this.terrainOffsetY, 'troll')); // Forest
this.npcs.push(new NPC(this, 70, 70, this.terrainOffsetX, this.terrainOffsetY, 'elf')); // City
// ANIMALS
// ANIMALS (Peaceful + Mutated)
console.log('🐄 Spawning ANIMALS...');
this.npcs.push(new NPC(this, 22, 22, this.terrainOffsetX, this.terrainOffsetY, 'cow'));
this.npcs.push(new NPC(this, 24, 20, this.terrainOffsetX, this.terrainOffsetY, 'chicken'));
this.npcs.push(new NPC(this, 25, 23, this.terrainOffsetX, this.terrainOffsetY, 'chicken'));
// Mutated
this.npcs.push(new NPC(this, 62, 22, this.terrainOffsetX, this.terrainOffsetY, 'cow_mutant')); // In Forest
this.npcs.push(new NPC(this, 62, 22, this.terrainOffsetX, this.terrainOffsetY, 'cow_mutant')); // Aggressive mutant
// Easter Egg: Broken Scooter
console.log('🛵 Spawning Scooter Easter Egg...');
@@ -213,22 +213,22 @@ class GameScene extends Phaser.Scene {
console.log('👹 Creating Zombie Spawners...');
this.spawners = [];
// City spawners (3 spawners around city)
this.spawners.push(new ZombieSpawner(this, 55, 55, 5, 2, 25000)); // NW
this.spawners.push(new ZombieSpawner(this, 75, 55, 5, 2, 25000)); // NE
this.spawners.push(new ZombieSpawner(this, 65, 75, 5, 3, 20000)); // South (more zombies, faster)
// DISABLED - Too many zombies for testing
// this.spawners.push(new ZombieSpawner(this, 55, 55, 5, 2, 25000)); // NW
// this.spawners.push(new ZombieSpawner(this, 75, 55, 5, 2, 25000)); // NE
// this.spawners.push(new ZombieSpawner(this, 65, 75, 5, 3, 20000)); // South
// LOOT CHESTS
console.log('📦 Placing Loot Chests...');
this.chests = [];
// Farm Starter Chest (near spawn)
// Farm Starter Chest ONLY (near spawn)
this.chests.push(new LootChest(this, 28, 28, 'farm_starter'));
// City Chests (3 chests in city)
this.chests.push(new LootChest(this, 60, 60, 'city'));
this.chests.push(new LootChest(this, 70, 60, 'city'));
this.chests.push(new LootChest(this, 65, 70, 'elite'));
// DISABLED - City chests removed for cleaner gameplay
// this.chests.push(new LootChest(this, 60, 60, 'city'));
// this.chests.push(new LootChest(this, 70, 60, 'city'));
// this.chests.push(new LootChest(this, 65, 70, 'elite'));
// SIGNPOSTS/NAVIGATION
console.log('🪧 Adding Signposts...');