This commit is contained in:
2025-09-23 14:13:24 +02:00
commit 58b5e6b074
103 changed files with 44000 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
/**
* Test Script für sofortige Achievements
*
* Testet die sofortige Achievement-Logik für einen einzelnen Spieler
*/
const AchievementSystem = require('../lib/achievementSystem');
require('dotenv').config();
async function testImmediateAchievements() {
console.log('⚡ Starte sofortige Achievement-Test...\n');
try {
const achievementSystem = new AchievementSystem();
// Lade Achievements
console.log('📋 Lade Achievements...');
await achievementSystem.loadAchievements();
// Teste mit einem spezifischen Spieler (Carsten Graf)
const testPlayerId = '313ceee3-8040-44b4-98d2-e63703579e5d';
console.log(`\n🎯 Teste sofortige Achievements für Spieler ${testPlayerId}...`);
const newAchievements = await achievementSystem.checkImmediateAchievements(testPlayerId);
// Zeige Ergebnisse
console.log('\n📊 Sofortige Achievement-Test Ergebnisse:');
console.log(` 🏆 ${newAchievements.length} neue sofortige Achievements vergeben`);
if (newAchievements.length > 0) {
console.log('\n📋 Neue sofortige Achievements:');
newAchievements.forEach(achievement => {
console.log(` ${achievement.icon} ${achievement.name} (+${achievement.points} Punkte)`);
});
} else {
console.log('\n Keine neuen sofortigen Achievements vergeben');
}
console.log('\n✅ Sofortige Achievement-Test erfolgreich abgeschlossen!');
} catch (error) {
console.error('❌ Test fehlgeschlagen:', error);
process.exit(1);
}
}
// Führe Test aus
testImmediateAchievements();