Files

51 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.
# ezoic_viltrumite.js — doHeadbutt() (satır 409)
[← ezoic_viltrumite.js](index.md) · [← Master](../../wiki.md)
Parça 3/5 · [önceki](doHeadbutt-2.md) · [sonraki](doHeadbutt-4.md)
```javascript
if (e.isSame(pp) || isEzoic(e)) continue;
if (!e.isLivingBase()) continue;
// Çarptığın entity'ye hasar + fırlat
e.damage(35);
e.addMotion(lx * 4, 1.0, lz * 4);
e.setFallDistance(0);
hitSomething = true;
break;
}
}
// Menzil sonu
if (travelled >= maxDist) hitSomething = true;
// === ÇARPMA → PATLAMA ===
if (hitSomething) {
done = true;
// TAMAMEN DUR
pp.setMotion(0, 0, 0);
pp.setFallDistance(0);
// ezoicfly3 komutu
pp.executeCommand("mp event trigger @s ezoicfly3");
var ex = hx, ey = hy, ez = hz;
ww.playSound("minecraft:entity.generic.explode", ex, ey, ez, 4.0, 0.4);
ww.playSound("minecraft:entity.lightning.thunder", ex, ey, ez, 3.0, 0.6);
ww.playSound("minecraft:entity.wither.break_block", ex, ey, ez, 3.0, 0.5);
spawnFx(ww, "hugeexplosion", ex, ey+1, ez, 2, 0.3, 0.3, 0.3, 0);
spawnFx(ww, "largeexplode", ex, ey+1, ez, 4, 1.2, 0.8, 1.2, 0);
spawnFx(ww, "largesmoke", ex, ey+1, ez, 12, 1.5, 0.8, 1.5, 0.05);
spawnFx(ww, "cloud", ex, ey+1, ez, 10, 2.0, 0.5, 2.0, 0.08);
// AOE push
var blastEnts = ww.getEntities(ex, ey+1, ez, 8);
for (var bi = 0; bi < blastEnts.size(); bi++) {
var be = blastEnts.get(bi);
if (be.isSame(pp) || isEzoic(be)) continue;
if (!be.isLivingBase()) continue;
```