jump off mobs

you can now jump off mobs while invulnerable
  includes time dilated
pause display text updated with details menus
difficulty parameters
  0.82->0.84x damage done per level
  1.25->1.23x damage taken per level
tungsten carbide 300->400 health, but 0.08->0.02 seconds of coyote time and longer crouch time
nitinol 0.08->0.17 seconds of coyote time and much less crouching on hard landings, but 0.8->1 damage taken
mass-energy equivalence no longer costs 2 research
long power up spawns, like from interest or supply chain:
  will pause new spawns until total power ups are below 300 to reduce lag
  stop spawning if you take damage

bug fixes
This commit is contained in:
landgreen
2024-06-08 13:49:13 -07:00
parent 63bfaba4a1
commit eabd146ea5
10 changed files with 234 additions and 221 deletions

View File

@@ -35,10 +35,10 @@ function playerOnGroundCheck(event) {
//sets a hard land where player stays in a crouch for a bit and can't jump
//crouch is forced in groundControl below
const momentum = player.velocity.y * player.mass //player mass is 5 so this triggers at 26 down velocity, unless the player is holding something
if (momentum > tech.hardLanding) {
if (momentum > m.hardLanding) {
m.doCrouch();
m.yOff = m.yOffWhen.jump;
m.hardLandCD = m.cycle + Math.min(momentum / 6.5 - 6, 40)
m.hardLandCD = m.cycle + m.hardLandCDScale * Math.min(momentum / 6.5 - 6, 40)
//falling damage
if (tech.isFallingDamage && m.immuneCycle < m.cycle && momentum > 150) {
m.damage(Math.min(Math.sqrt(momentum - 133) * 0.01, 0.25));
@@ -56,10 +56,10 @@ function playerOnGroundCheck(event) {
let pair = pairs[i];
if (pair.bodyA === jumpSensor) {
m.standingOn = pair.bodyB; //keeping track to correctly provide recoil on jump
if (m.standingOn.alive !== true) enter();
if (m.standingOn.alive !== true || m.immuneCycle > m.cycle) enter();
} else if (pair.bodyB === jumpSensor) {
m.standingOn = pair.bodyA; //keeping track to correctly provide recoil on jump
if (m.standingOn.alive !== true) enter();
if (m.standingOn.alive !== true || m.immuneCycle > m.cycle) enter();
}
}
m.numTouching = 0;