Skip to content

Commit

Permalink
Tweak artillery
Browse files Browse the repository at this point in the history
  • Loading branch information
lorgan3 committed Mar 12, 2024
1 parent ef3d307 commit e6ef1e2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/data/spells/bomb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { Force } from "../damage/targetList";
import { DamageSource } from "../damage/types";

export class Bomb extends Container implements Item {
private static fuseTime = 60;
private static fuseTime = 45;
private static primeTime = 60;
private static triggerRange = 96;

Expand All @@ -37,7 +37,6 @@ export class Bomb extends Container implements Item {
super();
this.arcanePower = Manager.instance.getElementValue(Element.Arcane);
this.fuse = Bomb.fuseTime * (0.5 + Math.random());
ControllableSound.fromEntity(this, Sound.Launch);

this.body = new Body(Level.instance.terrain.characterMask, {
mask: circle3x3,
Expand All @@ -46,6 +45,7 @@ export class Bomb extends Container implements Item {
airFriction: 0.99,
groundFriction: 0.8,
roundness: 0.2,
bounciness: -0.6,
});
this.body.move(x, y);
this.body.addAngularVelocity(speed, direction);
Expand Down Expand Up @@ -87,7 +87,9 @@ export class Bomb extends Container implements Item {
damage: number,
force?: Force | undefined
): void {
this._die(...this.body.precisePosition);
if (Server.instance && this.activateTime === -1) {
Server.instance.activate(this);
}
}

private onCollide = (x: number, y: number) => {
Expand Down

0 comments on commit e6ef1e2

Please sign in to comment.