More unit progress
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 7.0 KiB |
BIN
core/assets-raw/sprites/units/conquer-weapon.png
Normal file
After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.9 KiB |
BIN
core/assets-raw/sprites/units/disrupt-cell.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
core/assets-raw/sprites/units/disrupt.png
Normal file
After Width: | Height: | Size: 5.7 KiB |
@ -518,3 +518,4 @@
|
||||
63185=red-diamond-wall|block-red-diamond-wall-ui
|
||||
63184=crystal-orbs|block-crystal-orbs-ui
|
||||
63183=conquer|unit-conquer-ui
|
||||
63182=disrupt|unit-disrupt-ui
|
||||
|
@ -2513,7 +2513,7 @@ public class Blocks{
|
||||
thrusterLength = 34/4f;
|
||||
armor = 5f;
|
||||
|
||||
unitCapModifier = 8;
|
||||
unitCapModifier = 6;
|
||||
researchCostMultiplier = 0.07f;
|
||||
}};
|
||||
|
||||
@ -2528,7 +2528,7 @@ public class Blocks{
|
||||
thrusterLength = 40/4f;
|
||||
armor = 10f;
|
||||
|
||||
unitCapModifier = 16;
|
||||
unitCapModifier = 12;
|
||||
researchCostMultiplier = 0.11f;
|
||||
}};
|
||||
|
||||
@ -2543,7 +2543,7 @@ public class Blocks{
|
||||
thrusterLength = 48/4f;
|
||||
armor = 15f;
|
||||
|
||||
unitCapModifier = 24;
|
||||
unitCapModifier = 16;
|
||||
researchCostMultiplier = 0.11f;
|
||||
}};
|
||||
|
||||
|
@ -52,7 +52,7 @@ public class UnitTypes{
|
||||
|
||||
//air + payload
|
||||
public static @EntityDef({Unitc.class, Payloadc.class}) UnitType mega,
|
||||
incite, emanate, quell;
|
||||
incite, emanate, quell, disrupt;
|
||||
|
||||
//air + payload, legacy
|
||||
public static @EntityDef(value = {Unitc.class, Payloadc.class}, legacy = true) UnitType quad;
|
||||
@ -2509,8 +2509,45 @@ public class UnitTypes{
|
||||
areaDamage = 22f;
|
||||
rotateSpeed = 0.9f;
|
||||
treadRects = new Rect[]{new Rect(27, 152, 56, 73), new Rect(24, 51, 29, 17), new Rect(59, 18, 39, 19)};
|
||||
decals.add(new UnitDecal("conquer-glow", 0, 0, 0, -1, Pal.turretHeat.cpy()){{
|
||||
blending = Blending.additive;
|
||||
|
||||
//TODO maybe different sprite, weapon impl
|
||||
weapons.add(new Weapon("conquer-weapon"){{
|
||||
layerOffset = 0.0001f;
|
||||
reload = 120f;
|
||||
shootY = 71f / 4f;
|
||||
shake = 5f;
|
||||
recoil = 4f;
|
||||
rotate = true;
|
||||
rotateSpeed = 0.6f;
|
||||
mirror = false;
|
||||
x = 0f;
|
||||
shadow = 32f;
|
||||
y = -5f;
|
||||
heatColor = Color.valueOf("f9350f");
|
||||
cooldownTime = 80f;
|
||||
|
||||
bullet = new BasicBulletType(8f, 110){{
|
||||
sprite = "missile-large";
|
||||
width = 9.5f;
|
||||
height = 15f;
|
||||
lifetime = 30f;
|
||||
hitSize = 6f;
|
||||
shootEffect = Fx.shootTitan;
|
||||
smokeEffect = Fx.shootSmokeTitan;
|
||||
pierceCap = 2;
|
||||
pierce = true;
|
||||
pierceBuilding = true;
|
||||
hitColor = backColor = trailColor = Color.valueOf("feb380");
|
||||
frontColor = Color.white;
|
||||
trailWidth = 3.1f;
|
||||
trailLength = 8;
|
||||
hitEffect = despawnEffect = Fx.blastExplosion;
|
||||
}};
|
||||
}});
|
||||
|
||||
//TODO could change color when shooting
|
||||
decals.add(new UnitDecal("conquer-glow", Pal.turretHeat.cpy(), Blending.additive){{
|
||||
layer = -1f;
|
||||
}});
|
||||
}};
|
||||
|
||||
@ -2688,6 +2725,95 @@ public class UnitTypes{
|
||||
);
|
||||
}};
|
||||
|
||||
disrupt = new UnitType("disrupt"){{
|
||||
defaultController = FlyingFollowAI::new;
|
||||
envDisabled = 0;
|
||||
|
||||
outlineColor = Pal.darkOutline;
|
||||
lowAltitude = false;
|
||||
flying = true;
|
||||
drag = 0.07f;
|
||||
speed = 1f;
|
||||
rotateSpeed = 2.5f;
|
||||
accel = 0.1f;
|
||||
health = 10000f;
|
||||
armor = 7f;
|
||||
hitSize = 46f;
|
||||
payloadCapacity = Mathf.sqr(6f) * tilePayload;
|
||||
|
||||
engineSize = 6f;
|
||||
engineOffset = 25.25f;
|
||||
|
||||
float orbRad = 5f, partRad = 3f;
|
||||
int parts = 10;
|
||||
|
||||
abilities.add(new SuppressionFieldAbility(){{
|
||||
orbRadius = orbRad;
|
||||
particleSize = partRad;
|
||||
y = 10f;
|
||||
particles = parts;
|
||||
}});
|
||||
|
||||
for(int i : Mathf.signs){
|
||||
abilities.add(new SuppressionFieldAbility(){{
|
||||
orbRadius = orbRad;
|
||||
particleSize = partRad;
|
||||
y = -33f / 4f;
|
||||
x = 43f * i / 4f;
|
||||
particles = parts;
|
||||
//visual only, the middle one does the actual suppressing
|
||||
active = false;
|
||||
}});
|
||||
}
|
||||
|
||||
if(false)
|
||||
weapons.add(new Weapon("quell-weapon"){{
|
||||
x = 51 / 4f;
|
||||
y = 5 / 4f;
|
||||
rotate = true;
|
||||
rotateSpeed = 2f;
|
||||
reload = 70f;
|
||||
layerOffset = -0.001f;
|
||||
recoil = 1f;
|
||||
rotationLimit = 60f;
|
||||
|
||||
bullet = new BulletType(){{
|
||||
shootEffect = Fx.shootBig;
|
||||
smokeEffect = Fx.shootBigSmoke2;
|
||||
shake = 1f;
|
||||
speed = 0f;
|
||||
keepVelocity = false;
|
||||
}};
|
||||
|
||||
unitSpawned = new MissileUnitType("quell-missile"){{
|
||||
speed = 3.8f;
|
||||
maxRange = 80f;
|
||||
outlineColor = Pal.darkOutline;
|
||||
health = 45;
|
||||
|
||||
weapons.add(new Weapon(){{
|
||||
shootCone = 360f;
|
||||
mirror = false;
|
||||
reload = 1f;
|
||||
shootOnDeath = true;
|
||||
bullet = new BulletType(){{
|
||||
rangeOverride = 20f;
|
||||
shootEffect = Fx.massiveExplosion;
|
||||
killShooter = true;
|
||||
//TODO status?
|
||||
splashDamageRadius = 30f;
|
||||
splashDamage = 120f;
|
||||
}};
|
||||
}});
|
||||
}};
|
||||
}});
|
||||
|
||||
setEnginesMirror(
|
||||
new UnitEngine(95 / 4f, -56 / 4f, 5f, 330f),
|
||||
new UnitEngine(89 / 4f, -95 / 4f, 4f, 315f)
|
||||
);
|
||||
}};
|
||||
|
||||
//endregion
|
||||
//region erekir - neoplasm
|
||||
|
||||
|
@ -31,6 +31,7 @@ public class SuppressionFieldAbility extends Ability{
|
||||
public float particleLen = 7f;
|
||||
public float rotateScl = 3f;
|
||||
public float particleLife = 110f;
|
||||
public boolean active = true;
|
||||
public Interp particleInterp = f -> Interp.circleOut.apply(Interp.slope.apply(f));
|
||||
public Color particleColor = Pal.sap.cpy();
|
||||
|
||||
@ -42,6 +43,8 @@ public class SuppressionFieldAbility extends Ability{
|
||||
|
||||
@Override
|
||||
public void update(Unit unit){
|
||||
if(!active) return;
|
||||
|
||||
if((timer += Time.delta) >= reload){
|
||||
any = false;
|
||||
builds.clear();
|
||||
@ -88,7 +91,7 @@ public class SuppressionFieldAbility extends Ability{
|
||||
float rx = unit.x + Tmp.v1.x, ry = unit.y + Tmp.v1.y;
|
||||
|
||||
float base = (Time.time / particleLife);
|
||||
rand.setSeed(unit.id);
|
||||
rand.setSeed(unit.id + hashCode());
|
||||
Draw.color(particleColor);
|
||||
for(int i = 0; i < particles; i++){
|
||||
float fin = (rand.random(1f) + base) % 1f, fout = 1f - fin;
|
||||
@ -110,7 +113,7 @@ public class SuppressionFieldAbility extends Ability{
|
||||
Fill.circle(rx, ry, rad * orbMidScl);
|
||||
|
||||
//TODO improve
|
||||
if(heat > 0.001f){
|
||||
if(heat > 0.001f && false){
|
||||
Draw.color(Pal.sapBullet);
|
||||
Lines.stroke(1.2f * heat * Mathf.absin(10f, 1f));
|
||||
Lines.circle(rx, ry, range);
|
||||
|
@ -41,8 +41,9 @@ abstract class TankComp implements Posc, Flyingc, Hitboxc, Unitc, ElevationMovec
|
||||
float yOffset = (treadRegion.height/2f - (treadRect.y + treadRect.height/2f)) / 4f;
|
||||
|
||||
for(int i : Mathf.signs){
|
||||
Tmp.v1.set(xOffset * i, yOffset - treadRect.height / 2f / 4f - 2f).rotate(rotation - 90);
|
||||
Tmp.v1.set(xOffset * i, yOffset - treadRect.height / 2f / 4f).rotate(rotation - 90);
|
||||
|
||||
//TODO could fin for a while
|
||||
Effect.floorDustAngle(type.treadEffect, Tmp.v1.x + x, Tmp.v1.y + y, rotation + 180f);
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
package mindustry.entities.units;
|
||||
|
||||
import arc.graphics.*;
|
||||
import arc.graphics.g2d.*;
|
||||
import mindustry.graphics.*;
|
||||
|
||||
/** A sprite drawn in addition to the base unit sprites. */
|
||||
@ -12,6 +13,8 @@ public class UnitDecal{
|
||||
public Blending blending = Blending.normal;
|
||||
public Color color = Color.white;
|
||||
|
||||
public TextureRegion loadedRegion;
|
||||
|
||||
public UnitDecal(String region, float x, float y, float rotation, float layer, Color color){
|
||||
this.region = region;
|
||||
this.x = x;
|
||||
@ -21,6 +24,12 @@ public class UnitDecal{
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
public UnitDecal(String region, Color color, Blending blending){
|
||||
this.region = region;
|
||||
this.color = color;
|
||||
this.blending = blending;
|
||||
}
|
||||
|
||||
public UnitDecal(){
|
||||
}
|
||||
}
|
||||
|
@ -454,7 +454,7 @@ public class UnitType extends UnlockableContent{
|
||||
Fx.rand.setSeed(e.id);
|
||||
for(int i = 0; i < 3; i++){
|
||||
Fx.v.trns(e.rotation + Fx.rand.range(40f), Fx.rand.random(6f * e.finpow()));
|
||||
Fill.circle(e.x + Fx.v.x + Fx.rand.range(4f), e.y + Fx.v.y + Fx.rand.range(4f), e.fout() * hitSize / 28f * 3f * Fx.rand.random(0.8f, 1.1f) + 0.3f);
|
||||
Fill.circle(e.x + Fx.v.x + Fx.rand.range(4f), e.y + Fx.v.y + Fx.rand.range(4f), Math.min(e.fout(), e.fin() * e.lifetime / 8f) * hitSize / 28f * 3f * Fx.rand.random(0.8f, 1.1f) + 0.3f);
|
||||
}
|
||||
}).layer(Layer.debris);
|
||||
}
|
||||
@ -557,6 +557,10 @@ public class UnitType extends UnlockableContent{
|
||||
segmentOutlineRegions[i] = Core.atlas.find(name + "-segment-outline" + i);
|
||||
}
|
||||
|
||||
for(var decal : decals){
|
||||
decal.loadedRegion = Core.atlas.find(decal.region);
|
||||
}
|
||||
|
||||
clipSize = Math.max(region.width * 2f, clipSize);
|
||||
}
|
||||
|
||||
@ -774,7 +778,7 @@ public class UnitType extends UnlockableContent{
|
||||
Draw.z(d.layer <= 0f ? z : d.layer);
|
||||
Draw.scl(d.xScale, d.yScale);
|
||||
Draw.color(d.color);
|
||||
Draw.rect(d.region, unit.x + Angles.trnsx(base, d.x, d.y), unit.y + Angles.trnsy(base, d.x, d.y), base + d.rotation);
|
||||
Draw.rect(d.loadedRegion, unit.x + Angles.trnsx(base, d.x, d.y), unit.y + Angles.trnsy(base, d.x, d.y), base + d.rotation);
|
||||
Draw.blend();
|
||||
}
|
||||
Draw.reset();
|
||||
|
@ -17,5 +17,4 @@ public class TankUnitType extends UnitType{
|
||||
outlineColor = Pal.darkOutline;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|