Added arc turret

This commit is contained in:
Anuken
2018-09-08 11:35:29 -04:00
parent 1b0dd279ae
commit c73c97dc7b
11 changed files with 758 additions and 757 deletions

View File

@@ -15,7 +15,7 @@ public class AmmoTypes implements ContentList{
flakExplosive, flakPlastic, flakSurge,
missileExplosive, missileIncindiary, missileSurge,
artilleryDense, artilleryPlastic, artilleryHoming, artilleryIncindiary, artilleryExplosive,
basicFlame, lancerLaser, lightning, spectreLaser, meltdownLaser, fuseShotgun, oil, water, lava, cryofluid;
basicFlame, lancerLaser, lightning, spectreLaser, meltdownLaser, fuseShotgun, oil, water, lava, cryofluid, arc;
@Override
public void load(){
@@ -196,6 +196,8 @@ public class AmmoTypes implements ContentList{
lightning = new AmmoType(TurretBullets.lightning);
arc = new AmmoType(TurretBullets.arc);
spectreLaser = new AmmoType(TurretBullets.lancerLaser);
meltdownLaser = new AmmoType(TurretBullets.lancerLaser);

View File

@@ -44,7 +44,7 @@ public class Recipes implements ContentList{
//TURRETS
new Recipe(weapon, TurretBlocks.duo, new ItemStack(Items.copper, 40));
new Recipe(weapon, TurretBlocks.scorch, new ItemStack(Items.copper, 50), new ItemStack(Items.densealloy, 20));
new Recipe(weapon, TurretBlocks.arc, new ItemStack(Items.copper, 50), new ItemStack(Items.densealloy, 20));
new Recipe(weapon, TurretBlocks.hail, new ItemStack(Items.copper, 60), new ItemStack(Items.densealloy, 35));
new Recipe(weapon, TurretBlocks.lancer, new ItemStack(Items.copper, 50), new ItemStack(Items.lead, 100), new ItemStack(Items.silicon, 90));
new Recipe(weapon, TurretBlocks.wave, new ItemStack(Items.densealloy, 60), new ItemStack(Items.titanium, 70), new ItemStack(Items.lead, 150));

View File

@@ -29,18 +29,6 @@ public class TurretBlocks extends BlockList implements ContentList{
inaccuracy = 2f;
rotatespeed = 10f;
}};
/*
scatter = new BurstTurret("scatter") {{
ammoTypes = new AmmoType[]{AmmoTypes.flakLead, AmmoTypes.flakExplosive, AmmoTypes.flakPlastic};
ammoPerShot = 1;
shots = 3;
reload = 60f;
restitution = 0.03f;
recoil = 1.5f;
burstSpacing = 1f;
inaccuracy = 7f;
ammoUseEffect = ShootFx.shellEjectSmall;
}};*/
hail = new ArtilleryTurret("hail"){{
ammoTypes = new AmmoType[]{AmmoTypes.artilleryDense, AmmoTypes.artilleryHoming, AmmoTypes.artilleryIncindiary};
@@ -70,7 +58,7 @@ public class TurretBlocks extends BlockList implements ContentList{
health = 160;
drawer = (tile, entity) -> Draw.rect(entity.target != null ? shootRegion : region, tile.drawx() + tr2.x, tile.drawy() + tr2.y, entity.rotation - 90);
}
}
};
wave = new LiquidTurret("wave"){{
@@ -115,19 +103,15 @@ public class TurretBlocks extends BlockList implements ContentList{
health = 320;
}};
arc = new LaserTurret("arc"){{
shootType = AmmoTypes.lightning;
reload = 100f;
chargeTime = 70f;
arc = new PowerTurret("arc"){{
shootType = AmmoTypes.arc;
reload = 30f;
shootShake = 1f;
chargeMaxDelay = 30f;
chargeEffects = 7;
range = 60f;
shootEffect = ShootFx.lightningShoot;
chargeEffect = ShootFx.lightningCharge;
chargeBeginEffect = ShootFx.lancerLaserChargeBegin;
heatColor = Color.RED;
recoil = 3f;
size = 2;
recoil = 1f;
size = 1;
}};
swarmer = new BurstTurret("swarmer"){{

View File

@@ -31,7 +31,7 @@ import static io.anuke.mindustry.Vars.content;
import static io.anuke.mindustry.Vars.world;
public class TurretBullets extends BulletList implements ContentList{
public static BulletType fireball, basicFlame, lancerLaser, fuseShot, waterShot, cryoShot, lavaShot, oilShot, lightning, driverBolt, healBullet;
public static BulletType fireball, basicFlame, lancerLaser, fuseShot, waterShot, cryoShot, lavaShot, oilShot, lightning, driverBolt, healBullet, arc;
@Override
public void load(){
@@ -229,6 +229,7 @@ public class TurretBullets extends BulletList implements ContentList{
statusIntensity = 0.5f;
}
};
lightning = new BulletType(0.001f, 14){
{
lifetime = 1;
@@ -246,6 +247,23 @@ public class TurretBullets extends BulletList implements ContentList{
}
};
arc = new BulletType(0.001f, 11){
{
lifetime = 1;
despawneffect = Fx.none;
hiteffect = BulletFx.hitLancer;
}
@Override
public void draw(Bullet b){
}
@Override
public void init(Bullet b){
Lightning.create(b.getTeam(), hiteffect, Palette.lancerLaser, damage, b.x, b.y, b.angle(), 25);
}
};
driverBolt = new BulletType(5.3f, 50){
{
collidesTiles = false;

View File

@@ -253,8 +253,6 @@ public class FloorRenderer{
public void clearTiles(){
if(cbatch != null) cbatch.dispose();
Timers.mark();
if(world.getSector() != null){
gutter = mapPadding;
}else{
@@ -266,8 +264,6 @@ public class FloorRenderer{
cache = new Chunk[chunksx][chunksy];
cbatch = new CacheBatch(world.width() * world.height() * 4 * 4);
Log.info("Time to create: {0}", Timers.elapsed());
Timers.mark();
for(int x = 0; x < chunksx; x++){