38 lines
1.8 KiB
Markdown
38 lines
1.8 KiB
Markdown
# bariskeser_skills.js — cast_apocalypse() (satır 539)
|
||
|
||
[← bariskeser_skills.js](index.md) · [← Master](../../wiki.md)
|
||
|
||
Parça 1/3 · [sonraki](cast_apocalypse-2.md)
|
||
|
||
```javascript
|
||
function cast_apocalypse(c) {
|
||
var p = c.getPlayer(); if (!p) return;
|
||
if (guard(p, "apocalypse")) return;
|
||
var w = c.getWorld(), look = p.getLook(), pos = p.getPosition(), eh = p.getEyeHeight();
|
||
var bx = lookBasis(look);
|
||
var cx = pos.x + look.x * 3, cy = pos.y + eh + look.y * 3, cz = pos.z + look.z * 3;
|
||
|
||
title(p, "§5§lKIYAMET", "§dIŞINI");
|
||
w.playSound("minecraft:entity.elder_guardian.curse", cx, cy, cz, 3, 0.5);
|
||
w.playSound("minecraft:block.portal.trigger", cx, cy, cz, 3, 0.7);
|
||
try { atmosphere(c, p, 40, BK_SKY_URL, [0.40, 0.10, 0.55]); } catch (eA) {}
|
||
|
||
var CH = 25, t = 0;
|
||
function charge(ctx) {
|
||
var ww = ctx.getWorld();
|
||
if (t >= CH) {
|
||
ww.playSound("minecraft:entity.lightning.thunder", cx, cy, cz, 6, 0.7);
|
||
ww.playSound("minecraft:entity.wither.spawn", cx, cy, cz, 5, 0.6);
|
||
fx(ww, "hugeexplosion", cx, cy, cz, 4, 0.2, 0.2, 0.2, 0.1);
|
||
ctx.scheduleScript(1, beam);
|
||
return;
|
||
}
|
||
var ang = t * 0.6, prog = t / CH, rad = 6 * (1 - prog * 0.6);
|
||
for (var sgi = 0; sgi < 3; sgi++) {
|
||
var o = sgi * (Math.PI * 2 / 3);
|
||
showHead(ww, cx + Math.cos(ang + o) * rad, cy + Math.sin(t * 0.3 + o) * (rad * 0.4), cz + Math.sin(ang + o) * rad, 1.6, 3);
|
||
fx(ww, "portal", cx + Math.cos(ang + o) * rad, cy, cz + Math.sin(ang + o) * rad, 4, 0.1, 0.1, 0.1, 0.02);
|
||
var o2 = o + Math.PI / 3;
|
||
showHead(ww, cx + Math.cos(ang + o2) * rad, cy - Math.sin(t * 0.3 + o2) * (rad * 0.4), cz + Math.sin(ang + o2) * rad, 1.6, 3);
|
||
```
|