Files

46 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_radyasyon.js — runShield() (satır 582)
[← ezoic_radyasyon.js](index.md) · [← Master](../../wiki.md)
Parça 2/3 · [önceki](runShield.md) · [sonraki](runShield-3.md)
```javascript
var sz = cz + Math.sin(phi) * Math.sin(theta) * r;
spawnFx(ww, "happyVillager", sx, sy, sz, 1, 0.0, 0.0, 0.0, 0.0);
if (j === 2) spawnFx(ww, "endRod", sx, sy, sz, 1, 0.0, 0.0, 0.0, 0.0);
}
}
// Çekirdek aura
if (t % 4 === 0) {
spawnFx(ww, "dragonbreath", cx, cy, cz, 6, 0.5, 0.5, 0.5, 0.02);
}
// Yakın düşmanları it (melee korumalı)
var ents = ww.getEntities(cx, cy, cz, 4.0);
for (var ei = 0; ei < ents.size(); ei++) {
var e = ents.get(ei);
if (e.isSame(pp) || isEzoic(e)) continue;
var epos = e.getPosition();
var dx = epos.x - cx, dy = epos.y - (cy - 0.5), dz = epos.z - cz;
var d2 = dx*dx + dz*dz;
if (e.isLivingBase()) {
var d = Math.sqrt(d2);
if (d > 0.01 && d < 3.0) {
e.addMotion((dx/d) * 1.4, 0.35, (dz/d) * 1.4);
}
} else {
// Projectile yansıtma — bana yaklaşıyorsa motion'ı tersine çevir
var em = null;
try { em = e.getMotion(); } catch (err) { em = null; }
if (em && (em.x !== 0 || em.y !== 0 || em.z !== 0)) {
var toMeX = cx - epos.x;
var toMeY = cy - epos.y;
var toMeZ = cz - epos.z;
var dot = em.x * toMeX + em.y * toMeY + em.z * toMeZ;
if (dot > 0.05) {
try {
e.setMotion(-em.x * 1.6, -em.y * 1.6 + 0.2, -em.z * 1.6);
```