bounceBoss balance and bug fixes

difficulty balance per level
  mob harm done is reduced about 2%
  player damage is increased about 2%

slasher mobs do 20% less damage
  this is because they killed me on my last run and I'm bitter
mantisBoss is invincible for a less time
Zeno's paradox removes 1/10 -> 1/12 health every 5 seconds

slow, stun, plasma, foam, neutron bomb effects now only slow mobs down to a minimum speed of about 2-4

bug fixes
  bounceBoss deals with slow effects in a less buggy way
  final boss didn't kill invincible mobs when it dies
This commit is contained in:
landgreen
2022-02-01 19:38:36 -08:00
parent 8bee75cf6e
commit 6a2ef59c7b
9 changed files with 106 additions and 64 deletions

View File

@@ -68,12 +68,13 @@ const mobs = {
whom.isSlowed = true;
whom.status.push({
effect() {
const speedCap = 2
const drag = 0.95
Matter.Body.setVelocity(whom, {
x: Math.min(speedCap, whom.velocity.x) * drag,
y: Math.min(speedCap, whom.velocity.y) * drag
});
if (whom.speed > 2) {
const drag = 0.95
Matter.Body.setVelocity(whom, {
x: whom.velocity.x * drag,
y: whom.velocity.y * drag
});
}
Matter.Body.setAngularVelocity(whom, 0);
ctx.beginPath();
ctx.moveTo(whom.vertices[0].x, whom.vertices[0].y);
@@ -99,10 +100,12 @@ const mobs = {
},
statusStun(who, cycles = 180) {
if (!who.shield && !who.isShielded) {
Matter.Body.setVelocity(who, {
x: who.velocity.x * 0.8,
y: who.velocity.y * 0.8
});
if (who.speed > 3) {
Matter.Body.setVelocity(who, {
x: who.velocity.x * 0.8,
y: who.velocity.y * 0.8
});
}
Matter.Body.setAngularVelocity(who, who.angularVelocity * 0.8);
//remove other "stun" effects on this mob
let i = who.status.length