21 public void advance(
float amount, CombatEngineAPI engine, BeamAPI beam) {
24 CombatEntityAPI target = beam.getDamageTarget();
25 boolean first = beam.getWeapon().getBeams().indexOf(beam) == 0;
26 if (target !=
null && beam.getBrightness() >= 1f && first) {
27 Vector2f point = beam.getTo();
29 for (BeamAPI curr : beam.getWeapon().getBeams()) {
30 maxDist = Math.max(maxDist, Misc.getDistance(point, curr.getTo()));
33 DamagingProjectileAPI e = engine.spawnDamagingExplosion(
createExplosionSpec(), beam.getSource(), point);
34 e.addDamagedAlready(target);
42 DamagingExplosionSpec spec =
new DamagingExplosionSpec(
48 CollisionClass.PROJECTILE_FF,
49 CollisionClass.PROJECTILE_FIGHTER,
54 new Color(255,255,255,255),
55 new Color(255,100,100,175)
58 spec.setDamageType(DamageType.FRAGMENTATION);
59 spec.setUseDetailedExplosion(
false);
60 spec.setSoundSetId(
"explosion_guardian");