Files

39 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.
# Hector_Tudors.js — cast_supernova() (satır 1458)
[← Hector_Tudors.js](index.md) · [← Master](../../wiki.md)
Parça 1/2 · [sonraki](cast_supernova-2.md)
```javascript
function cast_supernova(c) {
var p = c.getPlayer(); if (!p) return;
if (guard(p, "supernova")) return;
var pos = p.getPosition();
var cx = pos.x, cy = pos.y + 1, cz = pos.z;
title(p, "§e§lSÜPERNOVA", "§6patla!");
var t = 0, CH = 16;
function charge(ctx) {
var ww = ctx.getWorld();
if (t >= CH) {
ww.playSound("minecraft:entity.generic.explode", cx, cy, cz, 5, 0.6);
ww.playSound("minecraft:entity.lightning.thunder", cx, cy, cz, 5, 0.9);
for (var ring = 0; ring < 10; ring++) {
(function (start) {
ctx.scheduleScript(start, function (cc) {
var w2 = cc.getWorld(), R = 1 + start * 1.6;
for (var b = 1; b < 4; b++) {
var phi = (b / 4) * Math.PI - Math.PI / 2;
var rr = R * Math.cos(phi), yy = cy + R * Math.sin(phi);
var per = Math.max(4, Math.min(12, Math.floor(rr)));
for (var j = 0; j < per; j++) {
var aa = (j / per) * Math.PI * 2 + start * 0.3;
showHead(w2, cx + Math.cos(aa) * rr, yy, cz + Math.sin(aa) * rr, 1.1, 2);
}
}
fx(w2, "largeexplode", cx, cy, cz, 6, R * 0.3, R * 0.3, R * 0.3, 0.02);
var es = enemies(w2, cx, cy, cz, R + 1, p);
for (var i = 0; i < es.length; i++) {
var ep = es[i].getPosition();
```