working on wave beam

This commit is contained in:
lilgreenland
2020-02-12 14:35:20 -08:00
parent c06f020e8b
commit fddcfc8aed
3 changed files with 4 additions and 4 deletions

View File

@@ -1551,7 +1551,7 @@ const b = {
x: this.position.x,
y: this.position.y,
radius: Math.log(2 * dmg + 1.1) * 40,
color: game.playerDmgColor,
color: 'rgba(0,0,0,0.4)',
time: game.drawTime
});
}
@@ -1560,7 +1560,7 @@ const b = {
});
World.add(engine.world, bullet[me]); //add bullet to world
mech.fireCDcycle = mech.cycle + Math.floor(3 * b.modFireRate); // cool down
const wiggleMag = bullet[me].mass * ((mech.crouch) ? 0.01 : 0.03) * ((mech.flipLegs === 1) ? 1 : -1)
const wiggleMag = bullet[me].mass * ((mech.crouch) ? 0.01 : 0.02) * ((mech.flipLegs === 1) ? 1 : -1)
const SPEED = 8;
Matter.Body.setVelocity(bullet[me], {
x: SPEED * Math.cos(dir),

View File

@@ -14,7 +14,7 @@ const level = {
start() {
if (level.levelsCleared === 0) {
// level.difficultyIncrease(5)
// b.giveGuns("wave beam")
b.giveGuns("wave beam")
// mech.setField("phase decoherence field")
// b.giveMod("mass-energy equivalence");

View File

@@ -946,7 +946,7 @@ const mobs = {
this.health -= dmg
//this.fill = this.color + this.health + ')';
this.onDamage(dmg); //custom damage effects
if (this.health < 0.05) this.death();
if (this.health < 0.05 && this.alive) this.death();
}
},
onDamage() {