Revenant laser

This commit is contained in:
Anuken
2018-10-02 12:49:27 -04:00
parent 3f93b5c63b
commit 860727d27a
4 changed files with 18 additions and 4 deletions
@@ -217,7 +217,9 @@ public class AmmoTypes implements ContentList{
//power //power
lancerLaser = new AmmoType(TurretBullets.lancerLaser); lancerLaser = new AmmoType(TurretBullets.lancerLaser){{
range = 60f;
}};
lightning = new AmmoType(TurretBullets.lightning); lightning = new AmmoType(TurretBullets.lightning);
@@ -98,10 +98,11 @@ public class UnitTypes implements ContentList{
health = 250; health = 250;
mass = 4f; mass = 4f;
speed = 0.14f*mass; speed = 0.14f*mass;
hitsize = 12f;
maxVelocity = 1.4f; maxVelocity = 1.4f;
drag = 0.01f; drag = 0.01f;
isFlying = true; isFlying = true;
weapon = Weapons.bomber; weapon = Weapons.laserBurster;
}}; }};
phantom = new UnitType("phantom", Phantom.class, Phantom::new){{ phantom = new UnitType("phantom", Phantom.class, Phantom::new){{
@@ -8,7 +8,7 @@ import io.anuke.mindustry.type.Weapon;
public class Weapons implements ContentList{ public class Weapons implements ContentList{
public static Weapon blaster, blasterSmall, glaiveBlaster, droneBlaster, healBlaster, chainBlaster, shockgun, 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 @Override
public void load(){ public void load(){
@@ -160,6 +160,15 @@ public class Weapons implements ContentList{
inaccuracy = 40f; inaccuracy = 40f;
ammo = AmmoTypes.bombExplosive; ammo = AmmoTypes.bombExplosive;
}}; }};
laserBurster = new Weapon("bomber"){{
reload = 80f;
shake = 3f;
width = 0f;
roundrobin = true;
ejectEffect = Fx.none;
ammo = AmmoTypes.lancerLaser;
}};
} }
@Override @Override
@@ -27,6 +27,8 @@ public class AmmoType extends Content {
public Effect shootEffect = Fx.none; public Effect shootEffect = Fx.none;
/**Extra smoke effect created when shooting.*/ /**Extra smoke effect created when shooting.*/
public Effect smokeEffect = Fx.none; 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. * 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. * Returns maximum distance the bullet this ammo type has can travel.
*/ */
public float getRange(){ public float getRange(){
return bullet.speed * bullet.lifetime; return range < 0 ? bullet.speed * bullet.lifetime : range;
} }
@Override @Override