invulnerable

powerUpBoss & powerUpBossBaby go invulnerable for a second after they die
powerUpBossBaby is even smaller, and a bit slower
growBoss goes invulnerable for a second after one of it dies
shieldingBoss makes shields that are 50% stronger, shieldingBoss has 40% lower health
This commit is contained in:
landgreen
2021-12-14 18:22:08 -08:00
parent 498f867738
commit bd87000277
8 changed files with 224 additions and 143 deletions

View File

@@ -179,13 +179,15 @@ function collisionChecks(event) {
// console.log(dmg)
mob[k].damage(dmg);
if (mob[k].alive) mob[k].foundPlayer();
simulation.drawList.push({ //add dmg to draw queue
x: pairs[i].activeContacts[0].vertex.x,
y: pairs[i].activeContacts[0].vertex.y,
radius: Math.log(2 * dmg + 1.1) * 40 * mob[k].damageReduction,
color: simulation.playerDmgColor,
time: simulation.drawTime
});
if (mob[k].damageReduction) {
simulation.drawList.push({ //add dmg to draw queue
x: pairs[i].activeContacts[0].vertex.x,
y: pairs[i].activeContacts[0].vertex.y,
radius: Math.log(dmg + 1.1) * 40 * mob[k].damageReduction + 3,
color: simulation.playerDmgColor,
time: simulation.drawTime
});
}
if (tech.isLessDamageReduction && !mob[k].shield) mob[k].damageReduction *= mob[k].isBoss ? 1.01 : 1.06
return;
}
@@ -214,13 +216,15 @@ function collisionChecks(event) {
obj.hasFragmented = true;
b.targetedNail(obj.position, tech.fragments * 4)
}
simulation.drawList.push({
x: pairs[i].activeContacts[0].vertex.x,
y: pairs[i].activeContacts[0].vertex.y,
radius: Math.log(2 * dmg + 1.1) * 40 * mob[k].damageReduction,
color: simulation.playerDmgColor,
time: simulation.drawTime
});
if (mob[k].damageReduction) {
simulation.drawList.push({
x: pairs[i].activeContacts[0].vertex.x,
y: pairs[i].activeContacts[0].vertex.y,
radius: Math.log(dmg + 1.1) * 40 * mob[k].damageReduction + 3,
color: simulation.playerDmgColor,
time: simulation.drawTime
});
}
return;
}
}