dark star
community map crimsonTowers by Richard0820 new MACHO animation tech: dark star - MACHO is bigger and damages mobs
This commit is contained in:
BIN
img/dark star.webp
Normal file
BIN
img/dark star.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 31 KiB |
@@ -396,7 +396,7 @@
|
||||
</g>
|
||||
</svg>
|
||||
<script src='lib/matter.min.js'></script>
|
||||
<script src='lib/decomp.min.js'></script>
|
||||
<!-- <script src='lib/decomp.min.js'></script> -->
|
||||
<script src="js/simulation.js"></script>
|
||||
<script src="js/player.js"></script>
|
||||
<script src="js/powerup.js"></script>
|
||||
|
||||
13
js/bullet.js
13
js/bullet.js
@@ -2241,7 +2241,7 @@ const b = {
|
||||
ctx.stroke();
|
||||
ctx.lineJoin = "round"
|
||||
ctx.miterLimit = 10
|
||||
ctx.strokeStyle = "#000"
|
||||
ctx.fillStyle = "#000"
|
||||
ctx.fill();
|
||||
},
|
||||
drawString() {
|
||||
@@ -2855,21 +2855,14 @@ const b = {
|
||||
let lastBestOdd
|
||||
let lastBestEven = best.who //used in hack below
|
||||
if (best.dist2 !== Infinity) { //if hitting something
|
||||
path[path.length - 1] = {
|
||||
x: best.x,
|
||||
y: best.y
|
||||
};
|
||||
path[path.length - 1] = { x: best.x, y: best.y };
|
||||
laserHitMob();
|
||||
for (let i = 0; i < reflections; i++) {
|
||||
reflection();
|
||||
checkForCollisions();
|
||||
if (best.dist2 !== Infinity) { //if hitting something
|
||||
lastReflection = best
|
||||
|
||||
path[path.length - 1] = {
|
||||
x: best.x,
|
||||
y: best.y
|
||||
};
|
||||
path[path.length - 1] = { x: best.x, y: best.y };
|
||||
damage *= reflectivity
|
||||
laserHitMob();
|
||||
//I'm not clear on how this works, but it gets rid of a bug where the laser reflects inside a block, often vertically.
|
||||
|
||||
1145
js/level.js
1145
js/level.js
File diff suppressed because it is too large
Load Diff
45
js/spawn.js
45
js/spawn.js
@@ -150,7 +150,7 @@ const spawn = {
|
||||
me.do = function () {
|
||||
if (!simulation.isTimeSkipping) {
|
||||
const sine = Math.sin(simulation.cycle * 0.015)
|
||||
this.radius = 370 * (1 + 0.1 * sine)
|
||||
this.radius = 55 * tech.isDarkStar + 370 * (1 + 0.1 * sine)
|
||||
//chase player
|
||||
const sub = Vector.sub(player.position, this.position)
|
||||
const mag = Vector.magnitude(sub)
|
||||
@@ -188,6 +188,34 @@ const spawn = {
|
||||
ctx.strokeStyle = "#000"
|
||||
ctx.lineWidth = 1;
|
||||
ctx.stroke();
|
||||
if (tech.isDarkStar && !m.isCloak) { //&& !m.isBodiesAsleep
|
||||
ctx.fillStyle = "rgba(10,0,40,0.4)"
|
||||
ctx.fill()
|
||||
//damage mobs
|
||||
for (let i = 0, len = mob.length; i < len; ++i) {
|
||||
if (mob[i].alive && !mob[i].isShielded) {
|
||||
if (Vector.magnitude(Vector.sub(this.position, mob[i].position)) - mob[i].radius < this.radius) {
|
||||
mob[i].damage(0.02 * m.dmgScale);
|
||||
// mob[i].locatePlayer();//
|
||||
|
||||
simulation.drawList.push({ //add dmg to draw queue
|
||||
x: mob[i].position.x,
|
||||
y: mob[i].position.y,
|
||||
radius: mob[i].radius + 8,
|
||||
color: `rgba(10,0,40,0.1)`, // random hue, but not red
|
||||
time: 4
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//draw growing and fading out ring around the arc
|
||||
ctx.beginPath();
|
||||
const rate = 150
|
||||
const r = simulation.cycle % rate
|
||||
ctx.arc(this.position.x, this.position.y, 15 + this.radius + 0.3 * r, 0, 2 * Math.PI);
|
||||
ctx.strokeStyle = `rgba(0,0,0,${0.5 * Math.max(0, 1 - 1.4 * r / rate)})`
|
||||
ctx.stroke();
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -3889,10 +3917,7 @@ const spawn = {
|
||||
me.frictionStatic = 0;
|
||||
me.friction = 0;
|
||||
me.lookTorque = 0.0000055 * (Math.random() > 0.5 ? -1 : 1) * (1 + 0.1 * Math.sqrt(simulation.difficulty))
|
||||
me.fireDir = {
|
||||
x: 0,
|
||||
y: 0
|
||||
}
|
||||
me.fireDir = { x: 0, y: 0 }
|
||||
Matter.Body.setDensity(me, 0.01); //extra dense //normal is 0.001 //makes effective life much larger
|
||||
spawn.shield(me, x, y, 1);
|
||||
spawn.spawnOrbitals(me, radius + 200 + 300 * Math.random())
|
||||
@@ -5627,7 +5652,7 @@ const spawn = {
|
||||
mobs.spawn(x, y, 6, radius, "rgb(180,199,245)");
|
||||
let me = mob[mob.length - 1];
|
||||
Matter.Body.rotate(me, 2 * Math.PI * Math.random());
|
||||
me.accelMag = 0.0009 * simulation.accelScale;
|
||||
me.accelMag = 0.001 * simulation.accelScale;
|
||||
me.torqueMagnitude = -0.000012 * me.inertia //* (Math.random() > 0.5 ? -1 : 1);
|
||||
me.frictionStatic = 0;
|
||||
me.friction = 0;
|
||||
@@ -5636,7 +5661,7 @@ const spawn = {
|
||||
me.cd = 0;
|
||||
me.swordRadius = 0;
|
||||
me.swordVertex = 1
|
||||
me.swordRadiusMax = 275 + 3.5 * simulation.difficulty;
|
||||
me.swordRadiusMax = 320 + 3.6 * simulation.difficulty;
|
||||
me.swordRadiusGrowRate = me.swordRadiusMax * (0.011 + 0.0002 * simulation.difficulty)
|
||||
me.isSlashing = false;
|
||||
me.swordDamage = 0.03 * simulation.dmgScale
|
||||
@@ -5744,7 +5769,7 @@ const spawn = {
|
||||
mobs.spawn(x, y, sides, radius, "rgb(180,215,235)");
|
||||
let me = mob[mob.length - 1];
|
||||
Matter.Body.rotate(me, 2 * Math.PI * Math.random());
|
||||
me.accelMag = 0.0005 * simulation.accelScale;
|
||||
me.accelMag = 0.00055 * simulation.accelScale;
|
||||
me.frictionStatic = 0;
|
||||
me.friction = 0;
|
||||
me.frictionAir = 0.02;
|
||||
@@ -5754,11 +5779,11 @@ const spawn = {
|
||||
me.swordVertex = 1
|
||||
me.swordRadiusInitial = radius / 2;
|
||||
me.swordRadius = me.swordRadiusInitial;
|
||||
me.swordRadiusMax = 750 + 6 * simulation.difficulty;
|
||||
me.swordRadiusMax = 800 + 6 * simulation.difficulty;
|
||||
me.swordRadiusGrowRateInitial = 1.08
|
||||
me.swordRadiusGrowRate = me.swordRadiusGrowRateInitial//me.swordRadiusMax * (0.009 + 0.0002 * simulation.difficulty)
|
||||
me.isSlashing = false;
|
||||
me.swordDamage = 0.04 * simulation.dmgScale
|
||||
me.swordDamage = 0.03 * simulation.dmgScale
|
||||
me.laserAngle = 3 * Math.PI / 5
|
||||
const seeDistance2 = me.swordRadiusMax * me.swordRadiusMax
|
||||
spawn.shield(me, x, y);
|
||||
|
||||
19
js/tech.js
19
js/tech.js
@@ -2487,6 +2487,24 @@ const tech = {
|
||||
tech.isAxion = false
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "dark star",
|
||||
description: "mobs inside the <strong>MACHO</strong> are <strong class='color-d'>damaged</strong><br>increase <strong>MACHO</strong> radius by <strong>15%</strong>",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 2,
|
||||
frequencyDefault: 2,
|
||||
allowed() {
|
||||
return tech.isMACHO
|
||||
},
|
||||
requires: "MACHO",
|
||||
effect() {
|
||||
tech.isDarkStar = true
|
||||
},
|
||||
remove() {
|
||||
tech.isDarkStar = false
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "ablative drones",
|
||||
description: "after losing <strong class='color-h'>health</strong> there is a chance<br>to rebuild your broken parts as <strong>drones</strong>",
|
||||
@@ -11677,6 +11695,7 @@ const tech = {
|
||||
isRewindField: null,
|
||||
isCrouchRegen: null,
|
||||
isAxion: null,
|
||||
isDarkStar: null,
|
||||
isWormholeMapIgnore: null,
|
||||
isLessDamageReduction: null,
|
||||
needleTunnel: null,
|
||||
|
||||
17
todo.txt
17
todo.txt
@@ -1,12 +1,10 @@
|
||||
******************************************************** NEXT PATCH **************************************************
|
||||
community map ace by Richard0820
|
||||
|
||||
field tech: additive manufacturing - crouch while activating your field to print a throwable block
|
||||
blocks 80% faster and 80% more dense/more damage
|
||||
molecular assembler, pilot wave
|
||||
community map crimsonTowers by Richard0820
|
||||
|
||||
inflation: 85->90% defense, 300->200% larger blocks
|
||||
buckling: can spawn boosts or coupling in addition to heals, ammo, and research
|
||||
new MACHO animation
|
||||
|
||||
tech: dark star - MACHO is bigger and damages mobs
|
||||
|
||||
*********************************************************** TODO *****************************************************
|
||||
|
||||
@@ -23,6 +21,10 @@ more (all) bosses need to be made of parts
|
||||
"sneakBoss" could get sneaker adds after each hide phase
|
||||
"laserTargetingBoss" could have close range stabbers constrained, a few long range shooters, and a few laser shooters
|
||||
|
||||
defense power up - a short term defense boost, like the ones for damage.
|
||||
Or maybe it would last until you take one hit.
|
||||
Or last until you lost a total of 20 health.
|
||||
|
||||
use cross product rotation for other mobs?
|
||||
snipers, shooters?
|
||||
//gently rotate towards the player with a torque, use cross product to decided clockwise or counterclockwise
|
||||
@@ -1104,7 +1106,8 @@ possible names for tech
|
||||
memetics
|
||||
magnetorquers - produce spin by pushing on earth's magnetic field
|
||||
Josephson junction - superconducting junction
|
||||
|
||||
Pyroelectricity - voltage from temp changes - upgrade from piezoelectricity
|
||||
dark star - upgrade to WIMPs
|
||||
|
||||
******************************************************** CARS IMAGES ********************************************************
|
||||
|
||||
|
||||
Reference in New Issue
Block a user