Files

70 lines
1.9 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_blue.js — main() (satır 1)
[← gojo_blue.js](index.md) · [← Master](../../wiki.md)
Parça 2/3 · [önceki](main.md) · [sonraki](main-3.md)
```javascript
var y = cy + Math.sin(p * 3 + t * 0.4) * 0.6;
spawn("magicCrit", x, y, z, 8);
spawn("portal", x, y, z, 4);
}
for (var j = 0; j < 10; j++) {
var a = (j / 10) * Math.PI * 2 - t * 0.5;
var rr = 5.2;
var x2 = cx + Math.cos(a) * rr;
var z2 = cz + Math.sin(a) * rr;
spawn("endRod", x2, cy + Math.sin(t * 0.3) * 0.2, z2, 2);
}
spawn("witchMagic", cx, cy, cz, 10);
spawn("magicCrit", cx, cy, cz, 25);
spawn("portal", cx, cy, cz, 15);
spawn("portal", cx, cy, cz, 5);
// =========================
// ⚡ ENTITY PULL SYSTEM
// =========================
var entities = world.getEntities(cx, cy, cz, pullRadius);
for (var i = 0; i < entities.size(); i++) {
var e = entities.get(i);
if (!e || e.isSame(player)) continue;
if (e.getName && e.getName() === "Shadowx52_") continue;
var ex = e.getPosition().x;
var ey = e.getPosition().y;
var ez = e.getPosition().z;
var dx = cx - ex;
var dy = cy - ey;
var dz = cz - ez;
var dist = Math.sqrt(dx*dx + dy*dy + dz*dz);
if (dist < 0.01) continue;
var force = 3.0 * (1 - dist / pullRadius);
e.addMotion(
(dx / dist) * force,
(dy / dist) * force,
(dz / dist) * force
);
if (dist < 2.0) {
e.damage(35);
}
}
// =========================
// 🧱 BLOCK PULL + SAVE
```