catabolism and inductive coupling update

catabolism - lowers your max health by 1 (was 3 harm) and gives 4 ammo
inductive coupling - gives max energy for leftover power ups (was max health)
  now requires mass-energy equivalence

switched to a newer copy, paste URL
  this seems to fix issues with failed text copy in the level builder if you hold mouse down for over 6 seconds
This commit is contained in:
landgreen
2021-06-19 07:23:26 -07:00
parent cb2a8e4243
commit 88f595642f
9 changed files with 415 additions and 205 deletions

View File

@@ -628,7 +628,7 @@ const m = {
}
if (tech.isEnergyHealth) {
m.energy -= dmg * 1.1;
m.energy -= dmg * 1.15;
if (m.energy < 0 || isNaN(m.energy)) { //taking deadly damage
if (tech.isDeathAvoid && powerUps.research.count && !tech.isDeathAvoidedThisLevel) {
tech.isDeathAvoidedThisLevel = true
@@ -1312,7 +1312,7 @@ const m = {
x: player.velocity.x - (15 * unit.x) / massRoot,
y: player.velocity.y - (15 * unit.y) / massRoot
});
if (mob[i].isOrbital) Matter.Body.setVelocity(who, { x: 0, y: 0 });
if (who.isOrbital) Matter.Body.setVelocity(who, { x: 0, y: 0 });
if (m.crouch) {
Matter.Body.setVelocity(player, {
@@ -1332,7 +1332,7 @@ const m = {
x: player.velocity.x - (20 * unit.x) / massRoot,
y: player.velocity.y - (20 * unit.y) / massRoot
});
if (mob[i].isOrbital) Matter.Body.setVelocity(who, { x: 0, y: 0 });
if (who.isOrbital) Matter.Body.setVelocity(who, { x: 0, y: 0 });
if (who.isDropPowerUp && player.speed < 12) {
const massRootCap = Math.sqrt(Math.min(10, Math.max(0.4, who.mass))); // masses above 12 can start to overcome the push back