mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-10 23:28:52 +07:00
Revenant laser
This commit is contained in:
parent
3f93b5c63b
commit
860727d27a
@ -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);
|
||||
|
||||
|
@ -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){{
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user