in game music

mob effect: freeze - now only slows mobs down
  all freeze effects are about 50% longer

junk tech: music - adds background music to n-gon
junk tech: performance - adds fps tracker to n-gon

tech: dormancy - if a mob has died in the last 5 seconds increase damage by 50% else decrease damage by 50%
tech: torpor   - if a mob has died in the last 5 seconds reduce harm by 66% else increase harm by 33%
This commit is contained in:
landgreen
2021-02-19 06:13:33 -08:00
parent 7e963881f6
commit c085b30af4
10 changed files with 157 additions and 61 deletions

View File

@@ -63,7 +63,6 @@ const mobs = {
function applySlow() {
if (!who.shield && !who.isShielded && !m.isBodiesAsleep) {
if (who.isBoss) cycles = Math.floor(cycles * 0.25)
let i = who.status.length
while (i--) {
if (who.status[i].type === "slow") who.status.splice(i, 1); //remove other "slow" effects on this mob
@@ -71,9 +70,11 @@ const mobs = {
who.isSlowed = true;
who.status.push({
effect() {
const speedCap = 3
const drag = 0.95
Matter.Body.setVelocity(who, {
x: 0,
y: 0
x: Math.min(speedCap, who.velocity.x) * drag,
y: Math.min(speedCap, who.velocity.y) * drag
});
Matter.Body.setAngularVelocity(who, 0);
ctx.beginPath();