defense HUD

added defense bar to HUD
new community map commandeer by Desboot

bug fixes
This commit is contained in:
landgreen
2023-03-11 13:47:41 -08:00
parent 36541986ba
commit 9bcf4d3e8c
11 changed files with 1079 additions and 165 deletions

View File

@@ -6690,14 +6690,13 @@ const b = {
if (this.dmgCoolDown < 1) {
q = Matter.Query.point(mob, this.position) // check if inside a mob
for (let i = 0; i < q.length; i++) {
this.dmgCoolDown = 5 + Math.floor(11 * Math.random() * Math.sqrt(b.fireCDscale));
this.dmgCoolDown = 5 + Math.floor(7 * Math.random() * b.fireCDscale);
let dmg = this.dmg
q[i].damage(dmg);
if (q[i].alive) {
q[i].foundPlayer();
Matter.Body.setVelocity(q[i], Vector.mult(q[i].velocity, 0.9))
}
// this.endCycle = 0; //bullet ends cycle after doing damage
if (q[i].damageReduction) {
simulation.drawList.push({ //add dmg to draw queue