Files

40 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.
# alan2.js — detonateArea() (satır 163)
[← alan2.js](index.md) · [← Master](../../wiki.md)
Parça 1/2 · [sonraki](detonateArea-2.md)
```javascript
function detonateArea(c) {
var world = c.getWorld();
var cx = c.getValue("centerX");
var cy = c.getValue("centerY");
var cz = c.getValue("centerZ");
var casterUUID = c.getValue("casterUUID");
if (cx === null || cy === null || cz === null) return;
var radius = AREA_CONFIG.MAX_RADIUS;
// Yıldırımlar tetikle (Görsel ihtişam için)
world.spawnEntity("minecraft:lightning_bolt", cx, cy, cz);
for (var l = 0; l < 4; l++) {
var rx = cx + (Math.random() - 0.5) * (radius * 0.8);
var rz = cz + (Math.random() - 0.5) * (radius * 0.8);
world.spawnEntity("minecraft:lightning_bolt", rx, cy, rz);
}
// Düşmanlara Doğrudan Devasa Hasar Çek ve Bedenlerinde Fallingdust Patlama Efektlerini Tetikle
var hitEntities = world.getEntities(cx, cy, cz, AREA_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() !== casterUUID) {
var entPos = ent.getPosition();
// Düşmanın kendi bedeninde devasa patlayan siyah fallingdust partikülleri (Tam kömür tozu infilakı!)
spawnAreaParticle(world, AREA_CONFIG.PARTICLE_OUTER, entPos.x, entPos.y + 1.0, entPos.z, 120, 0.35, 0.7, 0.35, 0.08);
spawnAreaParticle(world, AREA_CONFIG.PARTICLE_EXPLODE_1, entPos.x, entPos.y + 1.0, entPos.z, 40, 0.25, 0.5, 0.25, 0.02);
spawnAreaParticle(world, AREA_CONFIG.PARTICLE_EXPLODE_3, entPos.x, entPos.y + 1.0, entPos.z, 20, 0.15, 0.4, 0.15, 0.01);
```