restitution
several new junk tech unified field theory: now cycles fields after you click the field box when paused tech: restitution - mobs killed by blocks spawn power ups tech: inelastic collision - 60% harm reduction when holding a block
This commit is contained in:
11
js/engine.js
11
js/engine.js
@@ -169,6 +169,17 @@ function collisionChecks(event) {
|
||||
let dmg = 0.05 * b.dmgScale * v * obj.mass * tech.throwChargeRate;
|
||||
if (mob[k].isShielded) dmg *= 0.35
|
||||
mob[k].damage(dmg, true);
|
||||
if (tech.isBlockPowerUps && !mob[k].alive && mob[k].dropPowerUp) {
|
||||
let type = tech.isEnergyNoAmmo ? "heal" : "ammo"
|
||||
if (Math.random() < 0.4) {
|
||||
type = "heal"
|
||||
} else if (Math.random() < 0.3 && !tech.isSuperDeterminism) {
|
||||
type = "research"
|
||||
}
|
||||
powerUps.spawn(mob[k].position.x, mob[k].position.y, type);
|
||||
// for (let i = 0, len = Math.ceil(2 * Math.random()); i < len; i++) {}
|
||||
}
|
||||
|
||||
const stunTime = dmg / Math.sqrt(obj.mass)
|
||||
if (stunTime > 0.5) mobs.statusStun(mob[k], 30 + 60 * Math.sqrt(stunTime))
|
||||
if (mob[k].distanceToPlayer2() < 1000000 && !m.isCloak) mob[k].foundPlayer();
|
||||
|
||||
Reference in New Issue
Block a user