Files

51 lines
1.8 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# gojo_purple.js — main() (satır 9)
[← gojo_purple.js](index.md) · [← Master](../../wiki.md)
Parça 12/14 · [önceki](main-11.md) · [sonraki](main-13.md)
```javascript
var dy = py - (ePos.y + e.getHeight() * 0.5);
var dz = pz - ePos.z;
var dist = Math.sqrt(dx*dx + dy*dy + dz*dz);
if (dist > 0.01) {
var pullForce = 2.0 * (1 - dist / killRadius);
e.addMotion(
(dx / dist) * pullForce,
(dy / dist) * pullForce + 0.15,
(dz / dist) * pullForce
);
e.setFallDistance(0);
// Her kurban için patlama kıvılcımı
spawnFx("largeexplode", ePos.x, ePos.y + 1, ePos.z, 1, 0.0, 0.0, 0.0, 0.1);
if (dist <= coreRadius) {
e.kill();
} else {
e.damage(50);
}
}
}
// === İLERLEME UĞULTUSU (lokal) ===
if (pt % 2 === 0) {
world.playSound("minecraft:entity.wither.shoot", px, py, pz, VOL_AMB * 2, 0.4);
}
pt++;
ctx.scheduleScript(1, purpleLoop);
}
// =================================================================
// AŞAMA 3: IMPLOSION - küre kendi içine çöker, hiçliğe karışır
// =================================================================
var impStep = 0;
function implosionLoop(ctx) {
if (impStep >= implosionTicks) {
// === FİNAL: BÜYÜ KAPANIŞ (büyük patlama YOK, sadece sessiz vakum) ===
world.playSound("minecraft:entity.enderman.teleport", px, py, pz, VOL_IMPACT, 0.1);
world.playSound("minecraft:entity.elder_guardian.curse",px, py, pz, VOL_IMPACT, 0.5);
```