Hastily implemented final endgame turret
Before Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 2.7 KiB |
BIN
core/assets-raw/sprites/blocks/turrets/malign/malign-back-l.png
Normal file
After Width: | Height: | Size: 962 B |
BIN
core/assets-raw/sprites/blocks/turrets/malign/malign-back-r.png
Normal file
After Width: | Height: | Size: 943 B |
BIN
core/assets-raw/sprites/blocks/turrets/malign/malign-end.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 2.4 KiB |
BIN
core/assets-raw/sprites/blocks/turrets/malign/malign-front-l.png
Normal file
After Width: | Height: | Size: 997 B |
BIN
core/assets-raw/sprites/blocks/turrets/malign/malign-front-r.png
Normal file
After Width: | Height: | Size: 966 B |
BIN
core/assets-raw/sprites/blocks/turrets/malign/malign-main.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
BIN
core/assets-raw/sprites/blocks/turrets/malign/malign-mid.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 2.3 KiB |
BIN
core/assets-raw/sprites/blocks/turrets/malign/malign-mouth.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
core/assets-raw/sprites/blocks/turrets/malign/malign-preview.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 2.5 KiB |
BIN
core/assets-raw/sprites/blocks/turrets/malign/malign-spine-l.png
Normal file
After Width: | Height: | Size: 631 B |
BIN
core/assets-raw/sprites/blocks/turrets/malign/malign-spine-r.png
Normal file
After Width: | Height: | Size: 631 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 506 B After Width: | Height: | Size: 506 B |
Before Width: | Height: | Size: 506 B After Width: | Height: | Size: 506 B |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 945 B After Width: | Height: | Size: 945 B |
Before Width: | Height: | Size: 921 B After Width: | Height: | Size: 921 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 382 B After Width: | Height: | Size: 382 B |
Before Width: | Height: | Size: 382 B After Width: | Height: | Size: 382 B |
@ -1626,7 +1626,8 @@ block.prime-refabricator.name = Prime Refabricator
|
|||||||
block.unit-repair-tower.name = Unit Repair Tower
|
block.unit-repair-tower.name = Unit Repair Tower
|
||||||
block.diffuse.name = Diffuse
|
block.diffuse.name = Diffuse
|
||||||
block.basic-assembler-module.name = Basic Assembler Module
|
block.basic-assembler-module.name = Basic Assembler Module
|
||||||
block.ravage.name = Ravage
|
block.smite.name = Smite
|
||||||
|
block.malign.name = Malign
|
||||||
|
|
||||||
block.switch.name = Switch
|
block.switch.name = Switch
|
||||||
block.micro-processor.name = Micro Processor
|
block.micro-processor.name = Micro Processor
|
||||||
|
@ -573,4 +573,5 @@
|
|||||||
63111=scathe-missile|unit-scathe-missile-ui
|
63111=scathe-missile|unit-scathe-missile-ui
|
||||||
63110=ravage|block-ravage-ui
|
63110=ravage|block-ravage-ui
|
||||||
63109=underflow-duct|block-underflow-duct-ui
|
63109=underflow-duct|block-underflow-duct-ui
|
||||||
63108=divine|block-divine-ui
|
63108=malign|block-malign-ui
|
||||||
|
63107=smite|block-smite-ui
|
||||||
|
@ -136,7 +136,7 @@ public class Blocks{
|
|||||||
duo, scatter, scorch, hail, arc, wave, lancer, swarmer, salvo, fuse, ripple, cyclone, foreshadow, spectre, meltdown, segment, parallax, tsunami,
|
duo, scatter, scorch, hail, arc, wave, lancer, swarmer, salvo, fuse, ripple, cyclone, foreshadow, spectre, meltdown, segment, parallax, tsunami,
|
||||||
|
|
||||||
//turrets - erekir
|
//turrets - erekir
|
||||||
breach, diffuse, sublimate, titan, disperse, afflict, lustre, scathe, ravage, divine,
|
breach, diffuse, sublimate, titan, disperse, afflict, lustre, scathe, smite, malign,
|
||||||
|
|
||||||
//units
|
//units
|
||||||
groundFactory, airFactory, navalFactory,
|
groundFactory, airFactory, navalFactory,
|
||||||
@ -4434,7 +4434,7 @@ public class Blocks{
|
|||||||
limitRange();
|
limitRange();
|
||||||
}};
|
}};
|
||||||
|
|
||||||
ravage = new ItemTurret("ravage"){{
|
smite = new ItemTurret("smite"){{
|
||||||
requirements(Category.turret, with(Items.beryllium, 150, Items.silicon, 150, Items.carbide, 250, Items.phaseFabric, 100));
|
requirements(Category.turret, with(Items.beryllium, 150, Items.silicon, 150, Items.carbide, 250, Items.phaseFabric, 100));
|
||||||
|
|
||||||
ammo(
|
ammo(
|
||||||
@ -4443,7 +4443,6 @@ public class Blocks{
|
|||||||
sprite = "large-orb";
|
sprite = "large-orb";
|
||||||
width = 17f;
|
width = 17f;
|
||||||
height = 21f;
|
height = 21f;
|
||||||
hitSize = 7f;
|
|
||||||
hitSize = 8f;
|
hitSize = 8f;
|
||||||
|
|
||||||
shootEffect = new MultiEffect(Fx.shootTitan, Fx.colorSparkBig, new WaveEffect(){{
|
shootEffect = new MultiEffect(Fx.shootTitan, Fx.colorSparkBig, new WaveEffect(){{
|
||||||
@ -4453,7 +4452,7 @@ public class Blocks{
|
|||||||
strokeFrom = 3f;
|
strokeFrom = 3f;
|
||||||
strokeTo = 0.3f;
|
strokeTo = 0.3f;
|
||||||
}});
|
}});
|
||||||
smokeEffect = Fx.shootSmokeRavage;
|
smokeEffect = Fx.shootSmokeSmite;
|
||||||
ammoMultiplier = 1;
|
ammoMultiplier = 1;
|
||||||
pierceCap = 4;
|
pierceCap = 4;
|
||||||
pierce = true;
|
pierce = true;
|
||||||
@ -4685,7 +4684,7 @@ public class Blocks{
|
|||||||
}
|
}
|
||||||
}};
|
}};
|
||||||
|
|
||||||
shootWarmupSpeed = 0.05f;
|
shootWarmupSpeed = 0.04f;
|
||||||
shootY = 15f;
|
shootY = 15f;
|
||||||
outlineColor = Pal.darkOutline;
|
outlineColor = Pal.darkOutline;
|
||||||
size = 5;
|
size = 5;
|
||||||
@ -4701,44 +4700,332 @@ public class Blocks{
|
|||||||
limitRange();
|
limitRange();
|
||||||
}};
|
}};
|
||||||
|
|
||||||
if(false)
|
malign = new PowerTurret("malign"){{
|
||||||
divine = new PowerTurret("divine"){{
|
|
||||||
requirements(Category.turret, with(Items.beryllium, 150, Items.silicon, 150, Items.graphite, 250, Items.phaseFabric, 300));
|
requirements(Category.turret, with(Items.beryllium, 150, Items.silicon, 150, Items.graphite, 250, Items.phaseFabric, 300));
|
||||||
|
|
||||||
shootType = new BasicBulletType(7.5f, 85){{
|
var haloProgress = PartProgress.warmup;
|
||||||
|
Color haloColor = Color.valueOf("d370d3"), heatCol = Color.purple;
|
||||||
|
float haloY = -15f, haloRotSpeed = 1.5f;
|
||||||
|
|
||||||
|
var circleProgress = PartProgress.warmup.delay(0.9f);
|
||||||
|
var circleColor = haloColor;
|
||||||
|
float circleY = 25f, circleRad = 11f, circleRotSpeed = 3.5f, circleStroke = 1.6f;
|
||||||
|
|
||||||
|
shootType = new FlakBulletType(8f, 80f){{
|
||||||
|
sprite = "missile-large";
|
||||||
|
|
||||||
|
lifetime = 45f;
|
||||||
width = 12f;
|
width = 12f;
|
||||||
|
height = 22f;
|
||||||
|
|
||||||
hitSize = 7f;
|
hitSize = 7f;
|
||||||
height = 20f;
|
shootEffect = Fx.shootSmokeSquareBig;
|
||||||
shootEffect = Fx.shootBig2;
|
smokeEffect = Fx.shootSmokeDisperse;
|
||||||
smokeEffect = Fx.shootBigSmoke;
|
|
||||||
ammoMultiplier = 1;
|
ammoMultiplier = 1;
|
||||||
pierceCap = 2;
|
hitColor = backColor = trailColor = lightningColor = circleColor;
|
||||||
pierce = true;
|
|
||||||
pierceBuilding = true;
|
|
||||||
hitColor = backColor = trailColor = Pal.berylShot;
|
|
||||||
frontColor = Color.white;
|
frontColor = Color.white;
|
||||||
trailWidth = 2.1f;
|
trailWidth = 3f;
|
||||||
trailLength = 10;
|
trailLength = 12;
|
||||||
hitEffect = despawnEffect = Fx.hitBulletColor;
|
hitEffect = despawnEffect = Fx.hitBulletColor;
|
||||||
buildingDamageMultiplier = 0.3f;
|
buildingDamageMultiplier = 0.3f;
|
||||||
|
|
||||||
|
trailEffect = Fx.colorSpark;
|
||||||
|
trailRotation = true;
|
||||||
|
trailInterval = 3f;
|
||||||
|
lightning = 1;
|
||||||
|
lightningCone = 15f;
|
||||||
|
lightningLength = 20;
|
||||||
|
lightningLengthRand = 30;
|
||||||
|
lightningDamage = 20f;
|
||||||
|
|
||||||
|
homingPower = 0.17f;
|
||||||
|
homingDelay = 19f;
|
||||||
|
homingRange = 160f;
|
||||||
|
|
||||||
|
explodeRange = 160f;
|
||||||
|
explodeDelay = 0f;
|
||||||
|
|
||||||
|
flakInterval = 20f;
|
||||||
|
despawnShake = 3f;
|
||||||
|
|
||||||
|
fragBullet = new LaserBulletType(90f){{
|
||||||
|
colors = new Color[]{haloColor.cpy().a(0.4f), haloColor, Color.white};
|
||||||
|
buildingDamageMultiplier = 0.25f;
|
||||||
|
width = 19f;
|
||||||
|
hitEffect = Fx.hitLancer;
|
||||||
|
sideAngle = 175f;
|
||||||
|
sideWidth = 1f;
|
||||||
|
sideLength = 40f;
|
||||||
|
lifetime = 16f;
|
||||||
|
drawSize = 400f;
|
||||||
|
length = 180f;
|
||||||
|
pierceCap = 2;
|
||||||
|
}};
|
||||||
|
|
||||||
|
fragSpread = fragRandomSpread = 0f;
|
||||||
|
|
||||||
|
splashDamage = 0f;
|
||||||
|
hitEffect = Fx.hitSquaresColor;
|
||||||
|
collidesGround = true;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
heatRequirement = 30f;
|
size = 5;
|
||||||
|
drawer = new DrawTurret("reinforced-"){{
|
||||||
|
parts.addAll(
|
||||||
|
|
||||||
|
//summoning circle
|
||||||
|
new ShapePart(){{
|
||||||
|
progress = circleProgress;
|
||||||
|
color = circleColor;
|
||||||
|
circle = true;
|
||||||
|
hollow = true;
|
||||||
|
stroke = 0f;
|
||||||
|
strokeTo = circleStroke;
|
||||||
|
radius = circleRad;
|
||||||
|
layer = Layer.effect;
|
||||||
|
y = circleY;
|
||||||
|
}},
|
||||||
|
|
||||||
|
new ShapePart(){{
|
||||||
|
progress = circleProgress;
|
||||||
|
rotateSpeed = -circleRotSpeed;
|
||||||
|
color = circleColor;
|
||||||
|
sides = 4;
|
||||||
|
hollow = true;
|
||||||
|
stroke = 0f;
|
||||||
|
strokeTo = circleStroke;
|
||||||
|
radius = circleRad - 1f;
|
||||||
|
layer = Layer.effect;
|
||||||
|
y = circleY;
|
||||||
|
}},
|
||||||
|
|
||||||
|
//outer squares
|
||||||
|
|
||||||
|
new ShapePart(){{
|
||||||
|
progress = circleProgress;
|
||||||
|
rotateSpeed = -circleRotSpeed;
|
||||||
|
color = circleColor;
|
||||||
|
sides = 4;
|
||||||
|
hollow = true;
|
||||||
|
stroke = 0f;
|
||||||
|
strokeTo = circleStroke;
|
||||||
|
radius = circleRad - 1f;
|
||||||
|
layer = Layer.effect;
|
||||||
|
y = circleY;
|
||||||
|
}},
|
||||||
|
|
||||||
|
//inner square
|
||||||
|
new ShapePart(){{
|
||||||
|
progress = circleProgress;
|
||||||
|
rotateSpeed = -circleRotSpeed/2f;
|
||||||
|
color = circleColor;
|
||||||
|
sides = 4;
|
||||||
|
hollow = true;
|
||||||
|
stroke = 0f;
|
||||||
|
strokeTo = 2f;
|
||||||
|
radius = 3f;
|
||||||
|
layer = Layer.effect;
|
||||||
|
y = circleY;
|
||||||
|
}},
|
||||||
|
|
||||||
|
//spikes on circle
|
||||||
|
new HaloPart(){{
|
||||||
|
progress = circleProgress;
|
||||||
|
color = circleColor;
|
||||||
|
tri = true;
|
||||||
|
shapes = 3;
|
||||||
|
triLength = 0f;
|
||||||
|
triLengthTo = 5f;
|
||||||
|
radius = 6f;
|
||||||
|
haloRadius = circleRad;
|
||||||
|
haloRotateSpeed = haloRotSpeed / 2f;
|
||||||
|
shapeRotation = 180f;
|
||||||
|
haloRotation = 180f;
|
||||||
|
layer = Layer.effect;
|
||||||
|
y = circleY;
|
||||||
|
}},
|
||||||
|
|
||||||
|
//actual turret
|
||||||
|
new RegionPart("-mouth"){{
|
||||||
|
heatColor = heatCol;
|
||||||
|
heatProgress = PartProgress.warmup;
|
||||||
|
|
||||||
|
moveY = -8f;
|
||||||
|
}},
|
||||||
|
new RegionPart("-end"){{
|
||||||
|
moveY = 0f;
|
||||||
|
}},
|
||||||
|
|
||||||
|
new RegionPart("-front"){{
|
||||||
|
heatColor = heatCol;
|
||||||
|
heatProgress = PartProgress.warmup;
|
||||||
|
|
||||||
|
mirror = true;
|
||||||
|
moveRot = 33f;
|
||||||
|
moveY = -4f;
|
||||||
|
moveX = 10f;
|
||||||
|
}},
|
||||||
|
new RegionPart("-back"){{
|
||||||
|
heatColor = heatCol;
|
||||||
|
heatProgress = PartProgress.warmup;
|
||||||
|
|
||||||
|
mirror = true;
|
||||||
|
moveRot = 10f;
|
||||||
|
moveX = 2f;
|
||||||
|
moveY = 5f;
|
||||||
|
}},
|
||||||
|
|
||||||
|
new RegionPart("-mid"){{
|
||||||
|
heatColor = heatCol;
|
||||||
|
heatProgress = PartProgress.recoil;
|
||||||
|
|
||||||
|
moveY = -9.5f;
|
||||||
|
}},
|
||||||
|
|
||||||
|
new ShapePart(){{
|
||||||
|
progress = haloProgress;
|
||||||
|
color = haloColor;
|
||||||
|
circle = true;
|
||||||
|
hollow = true;
|
||||||
|
stroke = 0f;
|
||||||
|
strokeTo = 2f;
|
||||||
|
radius = 10f;
|
||||||
|
layer = Layer.effect;
|
||||||
|
y = haloY;
|
||||||
|
}},
|
||||||
|
new ShapePart(){{
|
||||||
|
progress = haloProgress;
|
||||||
|
color = haloColor;
|
||||||
|
sides = 3;
|
||||||
|
rotation = 90f;
|
||||||
|
hollow = true;
|
||||||
|
stroke = 0f;
|
||||||
|
strokeTo = 2f;
|
||||||
|
radius = 4f;
|
||||||
|
layer = Layer.effect;
|
||||||
|
y = haloY;
|
||||||
|
}},
|
||||||
|
new HaloPart(){{
|
||||||
|
progress = haloProgress;
|
||||||
|
color = haloColor;
|
||||||
|
sides = 3;
|
||||||
|
shapes = 3;
|
||||||
|
hollow = true;
|
||||||
|
stroke = 0f;
|
||||||
|
strokeTo = 2f;
|
||||||
|
radius = 3f;
|
||||||
|
haloRadius = 10f + radius/2f;
|
||||||
|
haloRotateSpeed = haloRotSpeed;
|
||||||
|
layer = Layer.effect;
|
||||||
|
y = haloY;
|
||||||
|
}},
|
||||||
|
|
||||||
|
new HaloPart(){{
|
||||||
|
progress = haloProgress;
|
||||||
|
color = haloColor;
|
||||||
|
tri = true;
|
||||||
|
shapes = 3;
|
||||||
|
triLength = 0f;
|
||||||
|
triLengthTo = 10f;
|
||||||
|
radius = 6f;
|
||||||
|
haloRadius = 16f;
|
||||||
|
haloRotation = 180f;
|
||||||
|
layer = Layer.effect;
|
||||||
|
y = haloY;
|
||||||
|
}},
|
||||||
|
new HaloPart(){{
|
||||||
|
progress = haloProgress;
|
||||||
|
color = haloColor;
|
||||||
|
tri = true;
|
||||||
|
shapes = 3;
|
||||||
|
triLength = 0f;
|
||||||
|
triLengthTo = 3f;
|
||||||
|
radius = 6f;
|
||||||
|
haloRadius = 16f;
|
||||||
|
shapeRotation = 180f;
|
||||||
|
haloRotation = 180f;
|
||||||
|
layer = Layer.effect;
|
||||||
|
y = haloY;
|
||||||
|
}},
|
||||||
|
|
||||||
|
new HaloPart(){{
|
||||||
|
progress = haloProgress;
|
||||||
|
color = haloColor;
|
||||||
|
sides = 3;
|
||||||
|
tri = true;
|
||||||
|
shapes = 3;
|
||||||
|
triLength = 0f;
|
||||||
|
triLengthTo = 10f;
|
||||||
|
shapeRotation = 180f;
|
||||||
|
radius = 6f;
|
||||||
|
haloRadius = 16f;
|
||||||
|
haloRotateSpeed = -haloRotSpeed;
|
||||||
|
haloRotation = 180f / 3f;
|
||||||
|
layer = Layer.effect;
|
||||||
|
y = haloY;
|
||||||
|
}},
|
||||||
|
|
||||||
|
new HaloPart(){{
|
||||||
|
progress = haloProgress;
|
||||||
|
color = haloColor;
|
||||||
|
sides = 3;
|
||||||
|
tri = true;
|
||||||
|
shapes = 3;
|
||||||
|
triLength = 0f;
|
||||||
|
triLengthTo = 4f;
|
||||||
|
radius = 6f;
|
||||||
|
haloRadius = 16f;
|
||||||
|
haloRotateSpeed = -haloRotSpeed;
|
||||||
|
haloRotation = 180f / 3f;
|
||||||
|
layer = Layer.effect;
|
||||||
|
y = haloY;
|
||||||
|
}}
|
||||||
|
);
|
||||||
|
|
||||||
|
Color heatCol2 = heatCol.cpy().add(0.1f, 0.1f, 0.1f).mul(1.2f);
|
||||||
|
for(int i = 1; i < 4; i++){
|
||||||
|
int fi = i;
|
||||||
|
parts.add(new RegionPart("-spine"){{
|
||||||
|
outline = false;
|
||||||
|
progress = PartProgress.warmup.delay(fi / 5f);
|
||||||
|
heatProgress = PartProgress.warmup.add(p -> (Mathf.absin(3f, 0.2f) - 0.2f) * p.warmup);
|
||||||
|
mirror = true;
|
||||||
|
under = true;
|
||||||
|
layerOffset = -0.3f;
|
||||||
|
turretHeatLayer = Layer.turret - 0.2f;
|
||||||
|
moveY = 9f;
|
||||||
|
moveX = 1f + fi * 4f;
|
||||||
|
moveRot = fi * 60f - 130f;
|
||||||
|
|
||||||
|
color = Color.valueOf("bb68c3");
|
||||||
|
heatColor = heatCol2;
|
||||||
|
moves.add(new PartMove(PartProgress.recoil.delay(fi / 5f), 1f, 0f, 3f));
|
||||||
|
}});
|
||||||
|
}
|
||||||
|
}};
|
||||||
|
|
||||||
|
velocityRnd = 0.15f;
|
||||||
|
heatRequirement = 90f;
|
||||||
|
maxHeatEfficiency = 2f;
|
||||||
consumePower(5f);
|
consumePower(5f);
|
||||||
|
|
||||||
size = 5;
|
shoot = new ShootSummon(0f, 0f, circleRad, 48f);
|
||||||
drawer = new DrawTurret("reinforced-");
|
|
||||||
|
minWarmup = 0.96f;
|
||||||
|
shootWarmupSpeed = 0.03f;
|
||||||
|
|
||||||
|
shootY = circleY - 5f;
|
||||||
|
|
||||||
outlineColor = Pal.darkOutline;
|
outlineColor = Pal.darkOutline;
|
||||||
envEnabled |= Env.space;
|
envEnabled |= Env.space;
|
||||||
reload = 200f;
|
reload = 8f;
|
||||||
recoil = 2f;
|
range = 370;
|
||||||
range = 350;
|
|
||||||
shootCone = 100f;
|
shootCone = 100f;
|
||||||
scaledHealth = 370;
|
scaledHealth = 370;
|
||||||
rotateSpeed = 2f;
|
rotateSpeed = 2f;
|
||||||
|
recoil = 0.5f;
|
||||||
coolant = consume(new ConsumeLiquid(Liquids.water, 15f / 60f));
|
recoilTime = 30f;
|
||||||
limitRange(5f);
|
shake = 3f;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
//endregion
|
//endregion
|
||||||
|
@ -1611,7 +1611,7 @@ public class Fx{
|
|||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
|
||||||
shootSmokeRavage = new Effect(70f, e -> {
|
shootSmokeSmite = new Effect(70f, e -> {
|
||||||
rand.setSeed(e.id);
|
rand.setSeed(e.id);
|
||||||
for(int i = 0; i < 13; i++){
|
for(int i = 0; i < 13; i++){
|
||||||
float a = e.rotation + rand.range(30f);
|
float a = e.rotation + rand.range(30f);
|
||||||
|
@ -6,7 +6,7 @@ import mindustry.entities.*;
|
|||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
|
|
||||||
public class FlakBulletType extends BasicBulletType{
|
public class FlakBulletType extends BasicBulletType{
|
||||||
public float explodeRange = 30f, explodeDelay = 5f;
|
public float explodeRange = 30f, explodeDelay = 5f, flakInterval = 6f;
|
||||||
|
|
||||||
public FlakBulletType(float speed, float damage){
|
public FlakBulletType(float speed, float damage){
|
||||||
super(speed, damage, "shell");
|
super(speed, damage, "shell");
|
||||||
@ -27,12 +27,12 @@ public class FlakBulletType extends BasicBulletType{
|
|||||||
super.update(b);
|
super.update(b);
|
||||||
|
|
||||||
//don't check for targets if primed to explode
|
//don't check for targets if primed to explode
|
||||||
if(b.fdata >= 0 && b.timer(2, 6)){
|
if(b.fdata >= 0 && b.timer(2, flakInterval)){
|
||||||
Units.nearbyEnemies(b.team, Tmp.r1.setSize(explodeRange * 2f).setCenter(b.x, b.y), unit -> {
|
Units.nearbyEnemies(b.team, Tmp.r1.setSize(explodeRange * 2f).setCenter(b.x, b.y), unit -> {
|
||||||
//fadata < 0 means it's primed to explode
|
//fadata < 0 means it's primed to explode
|
||||||
if(b.fdata < 0f || !unit.checkTarget(collidesAir, collidesGround)) return;
|
if(b.fdata < 0f || !unit.checkTarget(collidesAir, collidesGround)) return;
|
||||||
|
|
||||||
if(unit.within(b, explodeRange)){
|
if(unit.within(b, explodeRange + unit.hitSize/2f)){
|
||||||
//mark as primed
|
//mark as primed
|
||||||
b.fdata = -1f;
|
b.fdata = -1f;
|
||||||
Time.run(explodeDelay, () -> {
|
Time.run(explodeDelay, () -> {
|
||||||
|
26
core/src/mindustry/entities/pattern/ShootSummon.java
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
package mindustry.entities.pattern;
|
||||||
|
|
||||||
|
import arc.math.*;
|
||||||
|
import arc.util.*;
|
||||||
|
|
||||||
|
public class ShootSummon extends ShootPattern{
|
||||||
|
public float x, y, radius, spread;
|
||||||
|
|
||||||
|
public ShootSummon(float x, float y, float radius, float spread){
|
||||||
|
this.x = x;
|
||||||
|
this.y = y;
|
||||||
|
this.radius = radius;
|
||||||
|
this.spread = spread;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void shoot(int totalShots, BulletHandler handler){
|
||||||
|
|
||||||
|
|
||||||
|
for(int i = 0; i < shots; i++){
|
||||||
|
Tmp.v1.trns(Mathf.random(360f), Mathf.random(radius));
|
||||||
|
|
||||||
|
handler.shoot(x + Tmp.v1.x, y + Tmp.v1.y, Mathf.range(spread), firstShotDelay + shotDelay * i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -345,9 +345,9 @@ public class Turret extends ReloadTurret{
|
|||||||
|
|
||||||
float warmupTarget = isShooting() && canConsume() ? 1f : 0f;
|
float warmupTarget = isShooting() && canConsume() ? 1f : 0f;
|
||||||
if(linearWarmup){
|
if(linearWarmup){
|
||||||
shootWarmup = Mathf.approachDelta(shootWarmup, warmupTarget, shootWarmupSpeed);
|
shootWarmup = Mathf.approachDelta(shootWarmup, warmupTarget, shootWarmupSpeed * (warmupTarget > 0 ? efficiency : 1f));
|
||||||
}else{
|
}else{
|
||||||
shootWarmup = Mathf.lerpDelta(shootWarmup, warmupTarget, shootWarmupSpeed);
|
shootWarmup = Mathf.lerpDelta(shootWarmup, warmupTarget, shootWarmupSpeed * (warmupTarget > 0 ? efficiency : 1f));
|
||||||
}
|
}
|
||||||
|
|
||||||
wasShooting = false;
|
wasShooting = false;
|
||||||
|