Files

50 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.
# pirt.js — runProjectile() (satır 178)
[← pirt.js](index.md) · [← Master](../../wiki.md)
Parça 4/6 · [önceki](runProjectile-3.md) · [sonraki](runProjectile-5.md)
```javascript
}
}
}
}
}
// Merkezde gerçek bir yıldırımı tetikle
world.spawnEntity("minecraft:lightning_bolt", hitPos.x, hitPos.y, hitPos.z);
// Hasar uygula
var hitEntities = world.getEntities(cx, cy, cz, SPELL_CONFIG.DAMAGE_RADIUS * 1.0);
if (hitEntities !== null) {
for (var e = 0; e < hitEntities.size(); e++) {
var ent = hitEntities.get(e);
if (ent !== null && ent.getUniqueId() !== shooterUUID) {
ent.damage(SPELL_CONFIG.DAMAGE_AMOUNT);
}
}
}
// --- BLOCKBUSTER METAMORPH SHATTER MEKANİZMASI ---
// Darbe yerinde Blockbuster Aktörleri oluştur, bunlara oyuncunun güncel morph'unu uygula
// ve anında öldürerek 3D model parçalanma (metamorph shatter) fiziksel efektini tetikle!
var player = c.getSubject();
var morphToUse = null;
if (player !== null && player.isPlayer()) {
morphToUse = player.getMorph();
}
if (morphToUse === null) {
morphToUse = mappet.createMorph(SPELL_CONFIG.DEFAULT_MORPH_NBT);
}
var actorCount = SPELL_CONFIG.SHATTER_ACTOR_COUNT;
for (var a = 0; a < actorCount; a++) {
var ax = hitPos.x + (Math.random() - 0.5) * 4.0;
var ay = hitPos.y + Math.random() * 2.0;
var az = hitPos.z + (Math.random() - 0.5) * 4.0;
var actor = world.spawnEntity("blockbuster:actor", ax, ay, az);
if (actor !== null) {
actor.setMorph(morphToUse);
```