diff --git a/core/assets-raw/sprites/blocks/turrets/ravage/ravage-back-l.png b/core/assets-raw/sprites/blocks/turrets/ravage/ravage-back-l.png new file mode 100644 index 0000000000..6720b81b0e Binary files /dev/null and b/core/assets-raw/sprites/blocks/turrets/ravage/ravage-back-l.png differ diff --git a/core/assets-raw/sprites/blocks/turrets/ravage/ravage-back-r.png b/core/assets-raw/sprites/blocks/turrets/ravage/ravage-back-r.png new file mode 100644 index 0000000000..a47de1ea83 Binary files /dev/null and b/core/assets-raw/sprites/blocks/turrets/ravage/ravage-back-r.png differ diff --git a/core/assets-raw/sprites/blocks/turrets/ravage/ravage-blade-bar-heat.png b/core/assets-raw/sprites/blocks/turrets/ravage/ravage-blade-bar-heat.png new file mode 100644 index 0000000000..265087d5cb Binary files /dev/null and b/core/assets-raw/sprites/blocks/turrets/ravage/ravage-blade-bar-heat.png differ diff --git a/core/assets-raw/sprites/blocks/turrets/ravage/ravage-blade-bar-l.png b/core/assets-raw/sprites/blocks/turrets/ravage/ravage-blade-bar-l.png new file mode 100644 index 0000000000..b473cc82f9 Binary files /dev/null and b/core/assets-raw/sprites/blocks/turrets/ravage/ravage-blade-bar-l.png differ diff --git a/core/assets-raw/sprites/blocks/turrets/ravage/ravage-blade-bar-r.png b/core/assets-raw/sprites/blocks/turrets/ravage/ravage-blade-bar-r.png new file mode 100644 index 0000000000..b473cc82f9 Binary files /dev/null and b/core/assets-raw/sprites/blocks/turrets/ravage/ravage-blade-bar-r.png differ diff --git a/core/assets-raw/sprites/blocks/turrets/ravage/ravage-blade-heat.png b/core/assets-raw/sprites/blocks/turrets/ravage/ravage-blade-heat.png new file mode 100644 index 0000000000..061ddf73f2 Binary files /dev/null and b/core/assets-raw/sprites/blocks/turrets/ravage/ravage-blade-heat.png differ diff --git a/core/assets-raw/sprites/blocks/turrets/ravage/ravage-blade-l.png b/core/assets-raw/sprites/blocks/turrets/ravage/ravage-blade-l.png new file mode 100644 index 0000000000..1c162cf90f Binary files /dev/null and b/core/assets-raw/sprites/blocks/turrets/ravage/ravage-blade-l.png differ diff --git a/core/assets-raw/sprites/blocks/turrets/ravage/ravage-blade-r.png b/core/assets-raw/sprites/blocks/turrets/ravage/ravage-blade-r.png new file mode 100644 index 0000000000..1d7d25028e Binary files /dev/null and b/core/assets-raw/sprites/blocks/turrets/ravage/ravage-blade-r.png differ diff --git a/core/assets-raw/sprites/blocks/turrets/ravage/ravage-front-l.png b/core/assets-raw/sprites/blocks/turrets/ravage/ravage-front-l.png new file mode 100644 index 0000000000..af7ec24e79 Binary files /dev/null and b/core/assets-raw/sprites/blocks/turrets/ravage/ravage-front-l.png differ diff --git a/core/assets-raw/sprites/blocks/turrets/ravage/ravage-front-r.png b/core/assets-raw/sprites/blocks/turrets/ravage/ravage-front-r.png new file mode 100644 index 0000000000..58db672295 Binary files /dev/null and b/core/assets-raw/sprites/blocks/turrets/ravage/ravage-front-r.png differ diff --git a/core/assets-raw/sprites/blocks/turrets/ravage/ravage-mid-heat.png b/core/assets-raw/sprites/blocks/turrets/ravage/ravage-mid-heat.png new file mode 100644 index 0000000000..9e564bd546 Binary files /dev/null and b/core/assets-raw/sprites/blocks/turrets/ravage/ravage-mid-heat.png differ diff --git a/core/assets-raw/sprites/blocks/turrets/ravage/ravage-mid.png b/core/assets-raw/sprites/blocks/turrets/ravage/ravage-mid.png new file mode 100644 index 0000000000..bc77fb7697 Binary files /dev/null and b/core/assets-raw/sprites/blocks/turrets/ravage/ravage-mid.png differ diff --git a/core/assets-raw/sprites/blocks/turrets/ravage/ravage-preview.png b/core/assets-raw/sprites/blocks/turrets/ravage/ravage-preview.png new file mode 100644 index 0000000000..ff9c02f448 Binary files /dev/null and b/core/assets-raw/sprites/blocks/turrets/ravage/ravage-preview.png differ diff --git a/core/assets-raw/sprites/blocks/turrets/ravage/ravage-spine-heat.png b/core/assets-raw/sprites/blocks/turrets/ravage/ravage-spine-heat.png new file mode 100644 index 0000000000..6c9cd0ed3e Binary files /dev/null and b/core/assets-raw/sprites/blocks/turrets/ravage/ravage-spine-heat.png differ diff --git a/core/assets-raw/sprites/blocks/turrets/ravage/ravage-spine-l.png b/core/assets-raw/sprites/blocks/turrets/ravage/ravage-spine-l.png new file mode 100644 index 0000000000..5277c648e5 Binary files /dev/null and b/core/assets-raw/sprites/blocks/turrets/ravage/ravage-spine-l.png differ diff --git a/core/assets-raw/sprites/blocks/turrets/ravage/ravage-spine-r.png b/core/assets-raw/sprites/blocks/turrets/ravage/ravage-spine-r.png new file mode 100644 index 0000000000..c9112d61d8 Binary files /dev/null and b/core/assets-raw/sprites/blocks/turrets/ravage/ravage-spine-r.png differ diff --git a/core/assets/icons/icons.properties b/core/assets/icons/icons.properties index 1a19392593..af31c433fe 100755 --- a/core/assets/icons/icons.properties +++ b/core/assets/icons/icons.properties @@ -571,3 +571,4 @@ 63113=lustre|block-lustre-ui 63112=scathe|block-scathe-ui 63111=scathe-missile|unit-scathe-missile-ui +63110=ravage|block-ravage-ui diff --git a/core/assets/logicids.dat b/core/assets/logicids.dat index 450befaad1..2b63928fff 100644 Binary files a/core/assets/logicids.dat and b/core/assets/logicids.dat differ diff --git a/core/assets/maps/atlas.msav b/core/assets/maps/atlas.msav new file mode 100644 index 0000000000..f2c988d90b Binary files /dev/null and b/core/assets/maps/atlas.msav differ diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index 8dd6cf323f..53fdf7ae10 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -3885,6 +3885,7 @@ public class Blocks{ outlineColor = Pal.darkOutline; liquidConsumed = 10f / 60f; + targetInterval = 5f; float r = range = 130f; @@ -4268,6 +4269,7 @@ public class Blocks{ Items.carbide, new BasicBulletType(0f, 1){{ shootEffect = Fx.shootBig; smokeEffect = Fx.shootSmokeMissile; + ammoMultiplier = 1f; spawnUnit = new MissileUnitType("scathe-missile"){{ speed = 4.6f; @@ -4285,7 +4287,7 @@ public class Blocks{ fogRadius = 6f; - health = 250; + health = 190; weapons.add(new Weapon(){{ shootCone = 360f; @@ -4302,6 +4304,7 @@ public class Blocks{ sizeTo = 130f; }}); + ammoMultiplier = 1f; fragLifeMin = 0.1f; fragBullets = 7; fragBullet = new ArtilleryBulletType(3.4f, 30){{ @@ -4403,53 +4406,169 @@ public class Blocks{ shootCone = 1f; scaledHealth = 220; rotateSpeed = 0.9f; - researchCostMultiplier = 0.05f; coolant = consume(new ConsumeLiquid(Liquids.water, 15f / 60f)); limitRange(); }}; - //TODO - if(false) ravage = new ItemTurret("ravage"){{ requirements(Category.turret, with(Items.beryllium, 150, Items.silicon, 150, Items.carbide, 250, Items.phaseFabric, 100)); ammo( - Items.beryllium, new BasicBulletType(7.5f, 85){{ - width = 12f; + //this is really lazy + Items.surgeAlloy, new BasicBulletType(7f, 250){{ + width = 16f; hitSize = 7f; height = 20f; - shootEffect = new MultiEffect(Fx.shootBigColor, Fx.colorSparkBig); - smokeEffect = Fx.shootBigSmoke; + shootEffect = new MultiEffect(Fx.shootTitan, Fx.colorSparkBig, new WaveEffect(){{ + colorFrom = colorTo = Pal.accent; + lifetime = 12f; + sizeTo = 20f; + strokeFrom = 3f; + strokeTo = 0.3f; + }}); + smokeEffect = Fx.shootSmokeRavage; ammoMultiplier = 1; - pierceCap = 2; + pierceCap = 4; pierce = true; pierceBuilding = true; - hitColor = backColor = trailColor = Pal.berylShot; + hitColor = backColor = trailColor = Pal.accent; frontColor = Color.white; - trailWidth = 2.1f; - trailLength = 10; - hitEffect = despawnEffect = Fx.hitBulletColor; + trailWidth = 2.8f; + trailLength = 9; + hitEffect = despawnEffect = Fx.hitBulletBig; buildingDamageMultiplier = 0.3f; + + //TODO + intervalBullet = new LightningBulletType(){{ + damage = 30; + collidesAir = false; + ammoMultiplier = 1f; + lightningColor = Pal.accent; + lightningLength = 5; + lightningLengthRand = 10; + + //for visual stats only. + buildingDamageMultiplier = 0.25f; + + lightningType = new BulletType(0.0001f, 0f){{ + lifetime = Fx.lightning.lifetime; + hitEffect = Fx.hitLancer; + despawnEffect = Fx.none; + status = StatusEffects.shocked; + statusDuration = 10f; + hittable = false; + lightColor = Color.white; + buildingDamageMultiplier = 0.25f; + }}; + }}; + + bulletInterval = 3f; }} ); + shoot = new ShootAlternate(){{ + spread = 3.3f; + barrels = 9; + shots = 9; + }}; + + minWarmup = 0.99f; coolantMultiplier = 6f; - shake = 1f; + shake = 2f; ammoPerShot = 2; - drawer = new DrawTurret("reinforced-"); - shootY = -2; + drawer = new DrawTurret("reinforced-"){{ + parts.addAll( + + new RegionPart("-mid"){{ + heatProgress = PartProgress.heat.blend(PartProgress.warmup, 0.5f); + mirror = false; + }}, + new RegionPart("-blade"){{ + progress = PartProgress.warmup; + heatProgress = PartProgress.warmup; + mirror = true; + moveX = 5.5f; + moves.add(new PartMove(PartProgress.recoil, 0f, -3f, 0f)); + }}, + new RegionPart("-front"){{ + progress = PartProgress.warmup; + heatProgress = PartProgress.recoil; + mirror = true; + under = true; + moveY = 4f; + moveX = 6.5f; + moves.add(new PartMove(PartProgress.recoil, 0f, -5.5f, 0f)); + }}, + new RegionPart("-back"){{ + progress = PartProgress.warmup; + heatProgress = PartProgress.warmup; + mirror = true; + under = true; + moveX = 5.5f; + }}, + new ShapePart(){{ + progress = PartProgress.warmup.delay(0.5f); + color = Pal.accent; + sides = 6; + hollow = true; + stroke = 0f; + strokeTo = 3f; + radius = 10f; + layer = Layer.effect; + y = -15f; + rotateSpeed = 2f; + }} + ); + + for(int i = 0; i < 3; i++){ + int fi = i; + parts.add(new RegionPart("-blade-bar"){{ + progress = PartProgress.warmup; + heatProgress = PartProgress.warmup; + mirror = true; + under = true; + outline = false; + layerOffset = -0.3f; + turretHeatLayer = Layer.turret - 0.2f; + y = 44f / 4f - fi * 38f / 4f; + moveX = 2f; + + color = Pal.accent; + }}); + } + + for(int i = 0; i < 4; i++){ + int fi = i; + parts.add(new RegionPart("-spine"){{ + progress = PartProgress.warmup.delay(fi / 5f); + heatProgress = PartProgress.warmup; + mirror = true; + under = true; + layerOffset = -0.3f; + turretHeatLayer = Layer.turret - 0.2f; + moveY = -22f / 4f - fi * 3f; + moveX = 52f / 4f - fi * 1f + 2f; + moveRot = -fi * 30f; + + color = Pal.accent; + moves.add(new PartMove(PartProgress.recoil.delay(fi / 5f), 0f, 0f, 35f)); + }}); + } + }}; + + shootWarmupSpeed = 0.05f; + shootY = 15f; outlineColor = Pal.darkOutline; size = 5; envEnabled |= Env.space; - reload = 40f; + reload = 100f; recoil = 2f; - range = 190; - shootCone = 3f; - scaledHealth = 250; + range = 300; + shootCone = 7f; + scaledHealth = 350; rotateSpeed = 1.5f; - researchCostMultiplier = 0.05f; coolant = consume(new ConsumeLiquid(Liquids.water, 15f / 60f)); limitRange(); diff --git a/core/src/mindustry/content/Fx.java b/core/src/mindustry/content/Fx.java index 0aee7fda1b..c39515bc92 100644 --- a/core/src/mindustry/content/Fx.java +++ b/core/src/mindustry/content/Fx.java @@ -1611,6 +1611,19 @@ public class Fx{ } }), + shootSmokeRavage = new Effect(70f, e -> { + rand.setSeed(e.id); + for(int i = 0; i < 13; i++){ + float a = e.rotation + rand.range(30f); + v.trns(a, rand.random(e.finpow() * 50f)); + e.scaled(e.lifetime * rand.random(0.3f, 1f), b -> { + color(e.color); + Lines.stroke(b.fout() * 3f + 0.5f); + Lines.lineAngle(e.x + v.x, e.y + v.y, a, b.fout() * 8f + 0.4f); + }); + } + }), + shootSmokeMissile = new Effect(130f, 300f, e -> { color(Pal.redLight); alpha(0.5f); diff --git a/core/src/mindustry/entities/part/ShapePart.java b/core/src/mindustry/entities/part/ShapePart.java index 7a3e661330..8d72542ab3 100644 --- a/core/src/mindustry/entities/part/ShapePart.java +++ b/core/src/mindustry/entities/part/ShapePart.java @@ -11,6 +11,7 @@ public class ShapePart extends DrawPart{ public float radius = 3f, radiusTo = -1f, stroke = 1f, strokeTo = -1f; public float x, y, rotation; public float moveX, moveY, moveRot; + public float rotateSpeed = 0f; public Color color = Color.white; public @Nullable Color colorTo; public boolean mirror = false; @@ -26,6 +27,7 @@ public class ShapePart extends DrawPart{ Draw.z(Draw.z() + layerOffset); float prog = progress.getClamp(params); + float baseRot = Time.time * rotateSpeed; int len = mirror && params.sideOverride == -1 ? 2 : 1; for(int s = 0; s < len; s++){ @@ -49,14 +51,14 @@ public class ShapePart extends DrawPart{ if(!hollow){ if(!circle){ - Fill.poly(rx, ry, sides, rad, moveRot * prog * sign + params.rotation - 90 * sign + rotation * sign); + Fill.poly(rx, ry, sides, rad, moveRot * prog * sign + params.rotation - 90 * sign + rotation * sign + baseRot * sign); }else{ Fill.circle(rx, ry, rad); } }else{ Lines.stroke(str); if(!circle){ - Lines.poly(rx, ry, sides, rad, moveRot * prog * sign + params.rotation - 90 * sign + rotation * sign); + Lines.poly(rx, ry, sides, rad, moveRot * prog * sign + params.rotation - 90 * sign + rotation * sign + baseRot * sign); }else{ Lines.circle(rx, ry, rad); }