cherenkov radiation

tech: cherenkov radiation - bremsstrahlung damage is increased by 300% over 6 seconds
  bremsstrahlung does 2->3 damage, and also applies to block collisions

tech: nuclear transmutation - radiation sources do 70% more damage and harm

enthalpy now drops heal power ups instead of directly healing you
foam-shot has 13->15 particles, is slower, and less spread

bug fixes
This commit is contained in:
landgreen
2022-05-10 05:44:43 -07:00
parent 127a074b33
commit 5938e06148
11 changed files with 220 additions and 140 deletions

View File

@@ -197,9 +197,25 @@ function collisionChecks(event) {
if (obj.classType === "body" && obj.speed > 6) {
const v = Vector.magnitude(Vector.sub(mob[k].velocity, obj.velocity));
if (v > 9) {
if (tech.blockDmg) { //electricity
Matter.Body.setVelocity(mob[k], { x: 0.5 * mob[k].velocity.x, y: 0.5 * mob[k].velocity.y });
if (tech.isBlockRadiation && !mob[k].isShielded && !mob[k].isMobBullet) {
mobs.statusDoT(mob[k], tech.blockDmg * m.dmgScale * 4 / 12, 360) //200% increase -> x (1+2) //over 7s -> 360/30 = 12 half seconds -> 3/12
} else {
mob[k].damage(tech.blockDmg * m.dmgScale)
simulation.drawList.push({
x: pairs[i].activeContacts[0].vertex.x,
y: pairs[i].activeContacts[0].vertex.y,
radius: 28 * mob[k].damageReduction + 3,
color: "rgba(255,0,255,0.8)",
time: 4
});
}
}
let dmg = tech.blockDamage * m.dmgScale * v * obj.mass * (tech.isMobBlockFling ? 2.5 : 1) * (tech.isBlockRestitution ? 2.5 : 1);
if (mob[k].isShielded) dmg *= 0.7
// console.log(dmg)
mob[k].damage(dmg, true);
if (tech.isBlockPowerUps && !mob[k].alive && mob[k].isDropPowerUp && m.throwCycle > m.cycle) {
let type = tech.isEnergyNoAmmo ? "heal" : "ammo"