45 lines
1.8 KiB
Markdown
45 lines
1.8 KiB
Markdown
# bariskeser_skills.js — cast_domain() (satır 1237)
|
||
|
||
[← bariskeser_skills.js](index.md) · [← Master](../../wiki.md)
|
||
|
||
Parça 1/2 · [sonraki](cast_domain-2.md)
|
||
|
||
```javascript
|
||
function cast_domain(c) {
|
||
var p = c.getPlayer(); if (!p) return;
|
||
if (guard(p, "domain")) return;
|
||
var w = c.getWorld(), pos = p.getPosition();
|
||
var cx = pos.x, cz = pos.z, cy = pos.y + 1.2, R = 9;
|
||
|
||
p.sendTitleDurations(8, 40, 20);
|
||
p.sendTitle("§5§lALAN HAKİMİYETİ");
|
||
p.sendSubtitle("§d§lBARIŞ KESER");
|
||
w.playSound("minecraft:entity.wither.spawn", cx, cy, cz, 4, 0.4);
|
||
w.playSound("minecraft:block.portal.trigger", cx, cy, cz, 3, 0.5);
|
||
try { atmosphere(c, p, R + 14, BK_SKY_URL, [0.45, 0.12, 0.60]); } catch (eA) {}
|
||
|
||
var slow = mappet.getPotion("slowness"), blind = mappet.getPotion("blindness"),
|
||
naus = mappet.getPotion("nausea"), weak = mappet.getPotion("weakness");
|
||
var t = 0, EXP = 18, SUS = 120;
|
||
|
||
function loop(ctx) {
|
||
var ww = ctx.getWorld(), caster = ctx.getPlayer();
|
||
// Merkezde Barış Keser avatarı (alanın sahibi)
|
||
showAvatar(ww, cx, pos.y, cz, (t * 6) % 360, 2);
|
||
|
||
if (t < EXP) {
|
||
domeHeadShell(ww, cx, cy, cz, R * (t / EXP), t * 0.2);
|
||
if (t % 3 === 0) ww.playSound("minecraft:block.portal.ambient", cx, cy, cz, 2, 0.4 + (t / EXP));
|
||
t++; ctx.scheduleScript(1, loop); return;
|
||
}
|
||
var stp = t - EXP;
|
||
if (stp >= SUS) {
|
||
ww.playSound("minecraft:entity.enderdragon.growl", cx, cy, cz, 4, 0.6);
|
||
boom(ww, cx, cy, cz, 6, [0.45, 0.12, 0.60]);
|
||
fx(ww, "largesmoke", cx, cy, cz, 160, 3, 3, 3, 0.1);
|
||
try { clearAtmosphere(ctx, caster, R + 14); } catch (eA) {}
|
||
return;
|
||
}
|
||
domeHeadShell(ww, cx, cy, cz, R, stp * 0.12);
|
||
```
|