Implemented artillery turret, carbide artillery shells

This commit is contained in:
Anuken
2018-06-24 21:05:00 -04:00
parent c7fb517e6c
commit 6e5aec080a
11 changed files with 112 additions and 13 deletions

View File

@@ -37,10 +37,12 @@ public class TurretBlocks extends BlockList implements ContentList {
ammoUseEffect = ShootFx.shellEjectSmall;
}};*/
hail = new ItemTurret("hail") {{
hail = new ArtilleryTurret("hail") {{
ammoTypes = new AmmoType[]{AmmoTypes.artilleryCarbide, AmmoTypes.artilleryHoming, AmmoTypes.artilleryIncindiary};
reload = 40f;
reload = 100f;
recoil = 2f;
range = 200f;
inaccuracy = 5f;
}};
scorch = new LiquidTurret("scorch") {{
@@ -136,7 +138,7 @@ public class TurretBlocks extends BlockList implements ContentList {
};
}};
ripple = new ItemTurret("ripple") {{
ripple = new ArtilleryTurret("ripple") {{
ammoTypes = new AmmoType[]{AmmoTypes.artilleryCarbide, AmmoTypes.artilleryHoming, AmmoTypes.artilleryIncindiary, AmmoTypes.artilleryPlastic, AmmoTypes.artilleryThorium};
size = 3;
}};

View File

@@ -1,6 +1,7 @@
package io.anuke.mindustry.content.bullets;
import io.anuke.mindustry.content.fx.BulletFx;
import io.anuke.mindustry.entities.bullet.ArtilleryBulletType;
import io.anuke.mindustry.entities.bullet.BasicBulletType;
import io.anuke.mindustry.entities.bullet.BulletType;
import io.anuke.mindustry.type.ContentList;
@@ -11,14 +12,15 @@ public class ArtilleryBullets extends BulletList implements ContentList{
@Override
public void load() {
carbide = new BasicBulletType(3f, 0, "shell") {
carbide = new ArtilleryBulletType(3f, 4, "shell") {
{
hiteffect = BulletFx.flakExplosion;
knockback = 0.8f;
lifetime = 90f;
drag = 0.01f;
bulletWidth = bulletHeight = 9f;
bulletShrink = 0.1f;
lifetime = 50f;
bulletWidth = bulletHeight = 11f;
collidesTiles = false;
splashDamageRadius = 25f;
splashDamage = 33f;
}
};

View File

@@ -11,7 +11,7 @@ import io.anuke.ucore.util.Angles;
import io.anuke.ucore.util.Mathf;
public class BulletFx extends FxList implements ContentList {
public static Effect hitBulletSmall, hitBulletBig, hitFlameSmall, hitLiquid, hitLancer, despawn, flakExplosion;
public static Effect hitBulletSmall, hitBulletBig, hitFlameSmall, hitLiquid, hitLancer, despawn, flakExplosion, artilleryTrail;
@Override
public void load() {
@@ -109,6 +109,12 @@ public class BulletFx extends FxList implements ContentList {
Draw.reset();
});
artilleryTrail = new Effect(50, e -> {
Draw.color(Palette.bulletYellowBack);
Fill.circle(e.x, e.y, e.rotation * e.fout());
Draw.reset();
});
}
}