f key is bound to fire
pausing time or being cloaked gives you 50% harm reduction from mob collisions no-cloning theorem duplication => down to 42%, but no longer removes 1% on bosses dazzler => drains 25%->10% energy, and it has a 15% bigger radius boson composite => only drains energy when you touch shields 'F' key lets you fire, and it can be rebound to other keys might be some bugs here, I didn't do much testing
This commit is contained in:
54
js/player.js
54
js/player.js
@@ -2027,7 +2027,7 @@ const m = {
|
||||
},
|
||||
{
|
||||
name: "time dilation",
|
||||
description: "use <strong class='color-f'>energy</strong> to <strong style='letter-spacing: 1px;'>stop time</strong><br><strong>move</strong> and <strong>fire</strong> while time is stopped<br>mobs still do <strong class='color-harm'>harm</strong> while time is stopped",
|
||||
description: "use <strong class='color-f'>energy</strong> to <strong style='letter-spacing: 1px;'>stop time</strong><br><strong>move</strong> and <strong>fire</strong> while time is stopped<br>mobs do <strong>50%</strong> <strong class='color-harm'>harm</strong> while time is stopped",
|
||||
effect: () => {
|
||||
// m.fieldMeterColor = "#000"
|
||||
m.fieldFire = true;
|
||||
@@ -2108,7 +2108,7 @@ const m = {
|
||||
},
|
||||
{
|
||||
name: "metamaterial cloaking", //"weak photonic coupling" "electromagnetically induced transparency" "optical non-coupling" "slow light field" "electro-optic transparency"
|
||||
description: "when not firing activate a <strong class='color-cloaked'>cloaking</strong> effect<br>if a mob has <strong>not died</strong> in the last <strong>3 seconds</strong><br>increase <strong class='color-d'>damage</strong> by <strong>300%</strong>",
|
||||
description: "when not firing activate a <strong class='color-cloaked'>cloaking</strong> effect<br><strong>+333%</strong> <strong class='color-d'>damage</strong> if a mob hasn't recently <strong>died</strong><br>mobs do <strong>50%</strong> <strong class='color-harm'>harm</strong> while you're <strong class='color-cloaked'>cloaked</strong>",
|
||||
effect: () => {
|
||||
m.fieldFire = true;
|
||||
m.fieldMeterColor = "#333";
|
||||
@@ -2156,30 +2156,26 @@ const m = {
|
||||
}
|
||||
if (tech.isCloakStun) { //stun nearby mobs after exiting cloak
|
||||
let isMobsAround = false
|
||||
const stunRange = m.fieldDrawRadius * 1.3
|
||||
const drain = 0.25 * m.energy
|
||||
for (let i = 0, len = mob.length; i < len; ++i) {
|
||||
if (
|
||||
Vector.magnitude(Vector.sub(mob[i].position, m.pos)) < stunRange &&
|
||||
Matter.Query.ray(map, mob[i].position, m.pos).length === 0
|
||||
) {
|
||||
isMobsAround = true
|
||||
mobs.statusStun(mob[i], 120 + drain * 360)
|
||||
const stunRange = m.fieldDrawRadius * 1.4
|
||||
const drain = 0.1
|
||||
const stunTime = 180
|
||||
if (m.energy > drain) {
|
||||
for (let i = 0, len = mob.length; i < len; ++i) {
|
||||
if (Vector.magnitude(Vector.sub(mob[i].position, m.pos)) < stunRange && Matter.Query.ray(map, mob[i].position, m.pos).length === 0) {
|
||||
isMobsAround = true
|
||||
mobs.statusStun(mob[i], stunTime)
|
||||
}
|
||||
}
|
||||
if (isMobsAround) {
|
||||
m.energy -= drain
|
||||
simulation.drawList.push({
|
||||
x: m.pos.x,
|
||||
y: m.pos.y,
|
||||
radius: stunRange,
|
||||
color: "hsla(0,50%,100%,0.8)",
|
||||
time: 7
|
||||
});
|
||||
}
|
||||
}
|
||||
if (isMobsAround && m.energy > drain) {
|
||||
m.energy -= drain
|
||||
simulation.drawList.push({
|
||||
x: m.pos.x,
|
||||
y: m.pos.y,
|
||||
radius: stunRange,
|
||||
color: "hsla(0,50%,100%,0.6)",
|
||||
time: 4
|
||||
});
|
||||
// ctx.beginPath();
|
||||
// ctx.arc(m.pos.x, m.pos.y, 800, 0, 2 * Math.PI);
|
||||
// ctx.fillStyle = "#000"
|
||||
// ctx.fill();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2217,13 +2213,7 @@ const m = {
|
||||
let inPlayer = Matter.Query.region(mob, player.bounds)
|
||||
if (inPlayer.length > 0) {
|
||||
for (let i = 0; i < inPlayer.length; i++) {
|
||||
if (m.energy > 0) {
|
||||
if (inPlayer[i].shield) { //shields drain player energy
|
||||
m.energy -= 0.012;
|
||||
} else {
|
||||
m.energy -= 0.005;
|
||||
}
|
||||
}
|
||||
if (m.energy > 0 && inPlayer[i].shield) m.energy -= 0.012;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user