added mod powerUps and balance

This commit is contained in:
landgreen
2019-10-21 05:20:39 -07:00
parent 5809a68360
commit 6c844fa6da
8 changed files with 274 additions and 401 deletions

View File

@@ -122,6 +122,7 @@ function mobCollisionChecks(event) {
if (obj.classType === "bullet" && obj.speed > obj.minDmgSpeed) {
mob[k].foundPlayer();
const dmg = b.dmgScale * (obj.dmg + 0.15 * obj.mass * Matter.Vector.magnitude(Matter.Vector.sub(mob[k].velocity, obj.velocity)));
// console.log(dmg)
mob[k].damage(dmg);
obj.onDmg(); //some bullets do actions when they hits things, like despawn
game.drawList.push({