test
This commit is contained in:
parent
40b0bf5caa
commit
c868a06f77
12
mods/rays.js
12
mods/rays.js
|
|
@ -244,13 +244,13 @@ if(enabledMods.includes(runAfterAutogenMod) && enabledMods.includes(libraryMod))
|
|||
else {
|
||||
var otherPixel = pixelMap[x][y]
|
||||
var otherInfo = elements[otherPixel.element];
|
||||
otherPixel.temp += 400;
|
||||
otherPixel.temp += (400 * (shiftDown + 1));
|
||||
if(otherPixel.del) { continue };
|
||||
if (!(grbBreakIntos.includes(otherPixel.element))) {
|
||||
if (otherInfo.isGas) {
|
||||
if(Math.random() > ((otherInfo.hardness ?? 0) ** 4)) { breakPixel(otherPixel,false,false) };
|
||||
if(Math.random() > ((otherInfo.hardness ?? 0) ** (4 + shiftDown))) { breakPixel(otherPixel,false,false) };
|
||||
if(hasVelocity && otherPixel && !(lightlikes.includes(otherPixel.element))) {
|
||||
var vels = [randomIntegerBetweenTwoValues(-7,7),randomIntegerBetweenTwoValues(-7,7)];
|
||||
var vels = [randomIntegerBetweenTwoValues(-7 - (shiftDown * 2),7 + (shiftDown * 2)),randomIntegerBetweenTwoValues(-7 - (shiftDown * 2),7 + (shiftDown * 2))];
|
||||
otherPixel.vx = vels[0];
|
||||
otherPixel.vy = vels[1];
|
||||
};
|
||||
|
|
@ -258,13 +258,13 @@ if(enabledMods.includes(runAfterAutogenMod) && enabledMods.includes(libraryMod))
|
|||
|
||||
};
|
||||
if (otherInfo.id === elements[pixel.element].id) { break }
|
||||
if(Math.random() > ((otherInfo.hardness ?? 0) ** 2)) { breakPixel(otherPixel,false,false) };
|
||||
if(Math.random() > ((otherInfo.hardness ?? 0) ** (2 + shiftDown))) { breakPixel(otherPixel,false,false) };
|
||||
if(hasVelocity && otherPixel) {
|
||||
var vels = [randomIntegerBetweenTwoValues(-9,9),randomIntegerBetweenTwoValues(-7,0)];
|
||||
var vels = [randomIntegerBetweenTwoValues(-9 - (shiftDown * 2),9 + (shiftDown * 2)),randomIntegerBetweenTwoValues(-7 - (shiftDown * 2),0 + (shiftDown * 2))];
|
||||
otherPixel.vx = vels[0];
|
||||
otherPixel.vy = vels[1];
|
||||
};
|
||||
if(Math.random() < Math.max(0.9,0.4 + ((1 - (otherInfo.hardness ?? 0)) / 2))) { //thanks, I hate random continue
|
||||
if(Math.random() < ((shiftDown / 20) + (Math.max(0.9,0.4 + ((1 - (otherInfo.hardness ?? 0)) / 2))))) { //thanks, I hate random continue
|
||||
continue;
|
||||
};
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in New Issue