block throwing

throwing blocks works better for larger blocks, even with no mods
new mod - mass driver: blocks do 3x damage and charge 3x faster
negative mass field
  moves faster horizontally
  doesn't increase throw speed (but still lets you move with huge blocks)
  can't block
  take 66% less damage while field is active
This commit is contained in:
landgreen
2020-03-13 18:49:20 -07:00
parent 70d2ad7864
commit acaa12b556
5 changed files with 38 additions and 30 deletions

View File

@@ -200,15 +200,12 @@ 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 = b.dmgScale * (v * obj.mass * 0.07);
let dmg = b.dmgScale * (v * obj.mass * 0.07) * b.modThrowChargeRate;
if (b.isModCrit && !mob[k].seePlayer.recall && !mob[k].shield) dmg *= 5
if (mob[k].isShielded) dmg *= 0.5
mob[k].damage(dmg, true);
if (mob[k].distanceToPlayer2() < 1000000) mob[k].foundPlayer();
// mobs.statusStun(mob[k], 120)
game.drawList.push({
//add dmg to draw queue
x: pairs[i].activeContacts[0].vertex.x,
y: pairs[i].activeContacts[0].vertex.y,
radius: Math.log(2 * dmg + 1.1) * 40,