Files

47 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.
# ezoic_radyasyon.js — runBeam() (satır 314)
[← ezoic_radyasyon.js](index.md) · [← Master](../../wiki.md)
Parça 2/4 · [önceki](runBeam.md) · [sonraki](runBeam-3.md)
```javascript
spawnFx(ww, "hugeexplosion", cx, cy, cz, 6, 0.5, 0.5, 0.5, 0.0);
spawnFx(ww, "largeexplode", cx, cy, cz, 5, 1.5, 1.5, 1.5, 0.0);
// 10 blok yarıçapında patlama bulutu (15 altında)
for (var i = 0; i < 80; i++) {
var a = Math.random() * Math.PI * 2;
var rr = Math.random() * 10;
var rx = cx + Math.cos(a) * rr;
var rz = cz + Math.sin(a) * rr;
var ry = cy + (Math.random() - 0.3) * 4;
spawnFx(ww, "happyVillager", rx, ry, rz, 2, 0.3, 0.3, 0.3, 0.02);
spawnFx(ww, "dragonbreath", rx, ry, rz, 1, 0.4, 0.4, 0.4, 0.05);
if (i % 4 === 0) spawnFx(ww, "endRod", rx, ry, rz, 1, 0.0, 0.0, 0.0, 0.0);
}
spawnFx(ww, "largesmoke", cx, cy + 1, cz, 60, 4, 3, 4, 0.05);
// Etrafa push + event
var ents = ww.getEntities(cx, cy, cz, 12);
for (var ei = 0; ei < ents.size(); ei++) {
var e = ents.get(ei);
if (e.isSame(p) || isEzoic(e)) continue;
var epos = e.getPosition();
var dx = epos.x - cx, dy = epos.y - cy, dz = epos.z - cz;
var d = Math.sqrt(dx*dx + dy*dy + dz*dz);
if (d < 0.01) d = 0.01;
var pf = 2.2 * (1 - Math.min(d, 12) / 12) + 0.8;
e.addMotion((dx/d) * pf, 0.9, (dz/d) * pf);
e.setFallDistance(0);
e.executeCommand("/mp event trigger @s ezodm");
}
// Bloklar (5 blok yarıçapı patlama kraterı)
destroySphere(ctx, cx, cy, cz, 5, true);
}
function loop(ctx) {
if (done) return;
var ww = ctx.getWorld();
```