-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpatch.js
More file actions
48 lines (38 loc) · 1.63 KB
/
Copy pathpatch.js
File metadata and controls
48 lines (38 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
const fs = require('fs');
let html = fs.readFileSync('index.html', 'utf8');
const t1 = `// OYUNCU İSTATİSTİKLERİ
let playerStats = {
aura: 0,
rage: 0
};`;
const r1 = `// OYUNCU İSTATİSTİKLERİ VE YETENEKLERİ
let playerStats = {
aura: 0,
rage: 0
};
let playerSkills = [];
// YETENEK AĞACI GÜNCELLEMESİ
function unlockSkill(skillName) {
if (playerSkills.includes(skillName)) return; // Zaten varsa eklemez
playerSkills.push(skillName);
const skillStream = document.getElementById('skill-stream');
if(playerSkills.length === 1) skillStream.innerHTML = ""; // İlk eklemede gri metni sil
let el = document.createElement('div');
el.innerHTML = '> <span style="color:var(--red-glow)">[KİLİT AÇILDI]</span> ' + skillName;
skillStream.appendChild(el);
skillStream.style.boxShadow = "0 0 15px var(--red-glow)";
setTimeout(() => { skillStream.style.boxShadow = "none"; }, 500);
}`;
html = html.replace(t1, r1);
const t2 = `document.body.classList.remove('shake-active'); }, 500);
}
} else {`;
const r2 = `document.body.classList.remove('shake-active'); }, 500);
}
else if (curData.trigger.startsWith("skill:")) {
unlockSkill(curData.trigger.split(":")[1]);
}
} else {`;
html = html.replace(t2, r2);
fs.writeFileSync('v1.html', html);
console.log("Updated");