restitution

tech: restitution: thrown blocks are bouncy and blocks do 150% more damage
  the tech previously named restitution is now named buckling

after getting a bot upgrade, future bot tech will be for the upgraded bot type
  (doesn't effect tech that gives random bots)

bug fixes
This commit is contained in:
landgreen
2021-07-29 05:46:30 -07:00
parent 030824ed5d
commit c7c837672e
7 changed files with 162 additions and 73 deletions

View File

@@ -192,7 +192,7 @@ function collisionChecks(event) {
if (obj.classType === "body" && obj.speed > 6) {
const v = Vector.magnitude(Vector.sub(mob[k].velocity, obj.velocity));
if (v > 9) {
let dmg = 0.075 * b.dmgScale * v * obj.mass * (tech.throwChargeRate) * (tech.isBlockHarm ? 2 : 1) * (tech.isMobBlockFling ? 2 : 1);
let dmg = 0.075 * b.dmgScale * v * obj.mass * (tech.throwChargeRate) * (tech.isBlockHarm ? 2.5 : 1) * (tech.isMobBlockFling ? 2.5 : 1) * (tech.isBlockRestitution ? 2.5 : 1);
if (mob[k].isShielded) dmg *= 0.7
mob[k].damage(dmg, true);
if (tech.isBlockPowerUps && !mob[k].alive && mob[k].isDropPowerUp && m.throwCycle > m.cycle) {