diff --git a/core/src/io/anuke/mindustry/content/AmmoTypes.java b/core/src/io/anuke/mindustry/content/AmmoTypes.java index e695f30fab..51372c0e90 100644 --- a/core/src/io/anuke/mindustry/content/AmmoTypes.java +++ b/core/src/io/anuke/mindustry/content/AmmoTypes.java @@ -217,7 +217,9 @@ public class AmmoTypes implements ContentList{ //power - lancerLaser = new AmmoType(TurretBullets.lancerLaser); + lancerLaser = new AmmoType(TurretBullets.lancerLaser){{ + range = 60f; + }}; lightning = new AmmoType(TurretBullets.lightning); diff --git a/core/src/io/anuke/mindustry/content/UnitTypes.java b/core/src/io/anuke/mindustry/content/UnitTypes.java index 99575981f7..5288b52ea9 100644 --- a/core/src/io/anuke/mindustry/content/UnitTypes.java +++ b/core/src/io/anuke/mindustry/content/UnitTypes.java @@ -98,10 +98,11 @@ public class UnitTypes implements ContentList{ health = 250; mass = 4f; speed = 0.14f*mass; + hitsize = 12f; maxVelocity = 1.4f; drag = 0.01f; isFlying = true; - weapon = Weapons.bomber; + weapon = Weapons.laserBurster; }}; phantom = new UnitType("phantom", Phantom.class, Phantom::new){{ diff --git a/core/src/io/anuke/mindustry/content/Weapons.java b/core/src/io/anuke/mindustry/content/Weapons.java index 8523dc19c5..f37796ba13 100644 --- a/core/src/io/anuke/mindustry/content/Weapons.java +++ b/core/src/io/anuke/mindustry/content/Weapons.java @@ -8,7 +8,7 @@ import io.anuke.mindustry.type.Weapon; public class Weapons implements ContentList{ public static Weapon blaster, blasterSmall, glaiveBlaster, droneBlaster, healBlaster, chainBlaster, shockgun, - sapper, swarmer, bomber, bomberTrident, flakgun, flamethrower, missiles, artillery; + sapper, swarmer, bomber, bomberTrident, flakgun, flamethrower, missiles, artillery, laserBurster; @Override public void load(){ @@ -160,6 +160,15 @@ public class Weapons implements ContentList{ inaccuracy = 40f; ammo = AmmoTypes.bombExplosive; }}; + + laserBurster = new Weapon("bomber"){{ + reload = 80f; + shake = 3f; + width = 0f; + roundrobin = true; + ejectEffect = Fx.none; + ammo = AmmoTypes.lancerLaser; + }}; } @Override diff --git a/core/src/io/anuke/mindustry/type/AmmoType.java b/core/src/io/anuke/mindustry/type/AmmoType.java index e105c7395f..2244a09a1d 100644 --- a/core/src/io/anuke/mindustry/type/AmmoType.java +++ b/core/src/io/anuke/mindustry/type/AmmoType.java @@ -27,6 +27,8 @@ public class AmmoType extends Content { public Effect shootEffect = Fx.none; /**Extra smoke effect created when shooting.*/ public Effect smokeEffect = Fx.none; + /**Range. Use a value < 0 to calculate from bullet.*/ + public float range = -1f; /** * Creates an AmmoType with no liquid or item. Used for power-based ammo. @@ -63,7 +65,7 @@ public class AmmoType extends Content { * Returns maximum distance the bullet this ammo type has can travel. */ public float getRange(){ - return bullet.speed * bullet.lifetime; + return range < 0 ? bullet.speed * bullet.lifetime : range; } @Override