T5 air support unit

This commit is contained in:
Anuken 2020-09-21 11:41:11 -04:00
parent 63e35bd462
commit 1aa8bb9dd2
29 changed files with 8055 additions and 7843 deletions

View file

@ -21,5 +21,6 @@ mono=16
nova=17
poly=18
pulsar=19
quad=23
risso=20
spiroct=21

View file

@ -0,0 +1 @@
{fields:[{name:ammo,type:float,size:4},{name:armor,type:float,size:4},{name:controller,type:mindustry.entities.units.UnitController,size:-1},{name:deactivated,type:boolean,size:1},{name:elevation,type:float,size:4},{name:health,type:float,size:4},{name:isShooting,type:boolean,size:1},{name:mounts,type:"mindustry.entities.units.WeaponMount[]",size:-1},{name:payloads,type:arc.struct.Seq<mindustry.world.blocks.payloads.Payload>,size:-1},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>,size:-1},{name:rotation,type:float,size:4},{name:shield,type:float,size:4},{name:spawnedByCore,type:boolean,size:1},{name:stack,type:mindustry.type.ItemStack,size:-1},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>,size:-1},{name:team,type:mindustry.game.Team,size:-1},{name:type,type:mindustry.type.UnitType,size:-1},{name:x,type:float,size:4},{name:y,type:float,size:4}]}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6 KiB

After

Width:  |  Height:  |  Size: 6 KiB

Before After
Before After

View file

@ -920,6 +920,8 @@ unit.eclipse.name = Eclipse
unit.mono.name = Mono
unit.poly.name = Poly
unit.mega.name = Mega
unit.quad.name = Quad
unit.oct.name = Oct
unit.risso.name = Risso
unit.minke.name = Minke
unit.bryde.name = Bryde

View file

@ -315,3 +315,4 @@
63429=mud|block-mud-medium
63428=sei|unit-sei-medium
63427=quad|unit-quad-medium
63426=oct|unit-oct-medium

File diff suppressed because it is too large Load diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 639 KiB

After

Width:  |  Height:  |  Size: 557 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 760 KiB

After

Width:  |  Height:  |  Size: 661 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 MiB

After

Width:  |  Height:  |  Size: 1 MiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 182 KiB

After

Width:  |  Height:  |  Size: 322 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 326 KiB

After

Width:  |  Height:  |  Size: 184 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 416 KiB

After

Width:  |  Height:  |  Size: 326 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 416 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

File diff suppressed because it is too large Load diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 MiB

After

Width:  |  Height:  |  Size: 2.7 MiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 KiB

After

Width:  |  Height:  |  Size: 186 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 1.4 MiB

Before After
Before After

View file

@ -1320,7 +1320,7 @@ public class Blocks implements ContentList{
requirements(Category.effect, with(Items.copper, 3000, Items.lead, 3000, Items.silicon, 2000));
unitType = UnitTypes.beta;
health = 2000;
health = 3500;
itemCapacity = 9000;
size = 4;
@ -1331,7 +1331,7 @@ public class Blocks implements ContentList{
requirements(Category.effect, with(Items.copper, 8000, Items.lead, 8000, Items.silicon, 5000, Items.thorium, 4000));
unitType = UnitTypes.gamma;
health = 4000;
health = 6000;
itemCapacity = 13000;
size = 5;
@ -1805,6 +1805,7 @@ public class Blocks implements ContentList{
{UnitTypes.spiroct, UnitTypes.arkyid},
{UnitTypes.fortress, UnitTypes.scepter},
{UnitTypes.bryde, UnitTypes.sei},
{UnitTypes.mega, UnitTypes.quad},
};
}};
@ -1823,7 +1824,8 @@ public class Blocks implements ContentList{
{UnitTypes.antumbra, UnitTypes.eclipse},
{UnitTypes.arkyid, UnitTypes.toxopid},
{UnitTypes.scepter, UnitTypes.reign},
{UnitTypes.sei, UnitTypes.omura}
{UnitTypes.sei, UnitTypes.omura},
{UnitTypes.quad, UnitTypes.oct}
};
}};

View file

@ -306,6 +306,12 @@ public class Fx{
}
}),
healWaveDynamic = new Effect(22, e -> {
color(Pal.heal);
stroke(e.fout() * 2f);
Lines.circle(e.x, e.y, 4f + e.finpow() * e.rotation);
}),
healWave = new Effect(22, e -> {
color(Pal.heal);
stroke(e.fout() * 2f);

View file

@ -729,7 +729,6 @@ public class UnitTypes implements ContentList{
faceTarget = false;
engineOffset = 5.5f;
range = 140f;
crashDamageMultiplier = 4f;
weapons.add(new Weapon(){{
y = 0f;
@ -1079,9 +1078,8 @@ public class UnitTypes implements ContentList{
}};
quad = new UnitType("quad"){{
mineTier = 2;
armor = 4f;
health = 7000;
health = 6000;
speed = 1.2f;
rotateSpeed = 2f;
accel = 0.05f;
@ -1107,6 +1105,8 @@ public class UnitTypes implements ContentList{
sprite = "large-bomb";
width = height = 120/4f;
range = 20f;
backColor = Pal.heal;
frontColor = Color.white;
mixColorTo = Color.white;
@ -1132,11 +1132,29 @@ public class UnitTypes implements ContentList{
collides = false;
splashDamage = 230f;
splashDamageRadius = 90f;
splashDamageRadius = 110f;
}};
}});
}};
oct = new UnitType("oct"){{
armor = 16f;
health = 23000;
speed = 0.6f;
rotateSpeed = 1f;
accel = 0.04f;
drag = 0.018f;
flying = true;
engineOffset = 24f;
engineSize = 9f;
rotateShooting = false;
hitsize = 60f;
payloadCapacity = (4 * 4) * (8 * 8);
buildSpeed = 3.5f;
abilities.add(new ForceFieldAbility(140f, 4f, 6000f, 60f * 8), new HealFieldAbility(130f, 60f * 2, 140f));
}};
//endregion
//region naval attack
@ -1241,7 +1259,7 @@ public class UnitTypes implements ContentList{
rotateSpeed = 1.8f;
drag = 0.17f;
hitsize = 16f;
armor = 6f;
armor = 7f;
immunities = ObjectSet.with(StatusEffects.wet);
rotateShooting = false;
@ -1250,7 +1268,7 @@ public class UnitTypes implements ContentList{
trailY = -9f;
trailScl = 1.5f;
abilities.add(new HealFieldAbility(22f, 60f * 4, 70f), new ShieldFieldAbility(20f, 40f, 60f * 4, 60f));
abilities.add(new ShieldFieldAbility(20f, 40f, 60f * 4, 60f));
weapons.add(new Weapon("large-artillery"){{
reload = 65f;

View file

@ -21,8 +21,8 @@ public class ForceFieldAbility extends Ability{
/** Cooldown after the shield is broken, in ticks. */
public float cooldown = 60f * 5;
/** State: radius scaling. */
protected float radiusScale;
/** State. */
protected float radiusScale, alpha;
private static float realRad;
private static Unit paramUnit;
@ -40,7 +40,7 @@ public class ForceFieldAbility extends Ability{
}
paramUnit.shield -= trait.damage();
paramUnit.shieldAlpha = 1f;
paramField.alpha = 1f;
}
};
@ -59,6 +59,8 @@ public class ForceFieldAbility extends Ability{
unit.shield += Time.delta * regen;
}
alpha = Math.max(alpha - Time.delta/10f, 0f);
if(unit.shield > 0){
radiusScale = Mathf.lerpDelta(radiusScale, 1f, 0.06f);
paramUnit = unit;
@ -78,7 +80,7 @@ public class ForceFieldAbility extends Ability{
if(unit.shield > 0){
Draw.z(Layer.shields);
Draw.color(unit.team.color, Color.white, Mathf.clamp(unit.shieldAlpha));
Draw.color(unit.team.color, Color.white, Mathf.clamp(alpha));
if(Core.settings.getBool("animatedshields")){
Fill.poly(unit.x, unit.y, 6, realRad);

View file

@ -8,7 +8,7 @@ import mindustry.gen.*;
public class HealFieldAbility extends Ability{
public float amount = 1, reload = 100, range = 60;
public Effect healEffect = Fx.heal;
public Effect activeEffect = Fx.healWave;
public Effect activeEffect = Fx.healWaveDynamic;
protected float timer;
protected boolean wasHealed = false;
@ -37,7 +37,7 @@ public class HealFieldAbility extends Ability{
});
if(wasHealed){
activeEffect.at(unit);
activeEffect.at(unit, range);
}
timer = 0f;

View file

@ -37,7 +37,9 @@ public class RailBulletType extends BulletType{
@Override
public void update(Bullet b){
updateEffect.at(b.x, b.y, b.rotation());
if(b.timer(1, 1f)){
updateEffect.at(b.x, b.y, b.rotation());
}
}
@Override

View file

@ -69,7 +69,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
@Replace
public float clipSize(){
return type.region.width * 2f;
return Math.max(type.region.width * 2f, type.clipSize);
}
@Override
@ -362,7 +362,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
//if this unit crash landed (was flying), damage stuff in a radius
if(type.flying){
Damage.damage(team,x, y, hitSize * 1.1f, hitSize * type.crashDamageMultiplier, true, false, true);
Damage.damage(team,x, y, Mathf.pow(hitSize, 0.94f) * 1.25f, Mathf.pow(hitSize, 0.75f) * type.crashDamageMultiplier * 5f, true, false, true);
}
if(!headless){

View file

@ -44,7 +44,7 @@ public class UnitType extends UnlockableContent{
public float speed = 1.1f, boostMultiplier = 1f, rotateSpeed = 5f, baseRotateSpeed = 5f;
public float drag = 0.3f, accel = 0.5f, landShake = 0f, rippleScale = 1f, fallSpeed = 0.018f;
public float health = 200f, range = -1, armor = 0f;
public float crashDamageMultiplier = 3f;
public float crashDamageMultiplier = 1f;
public boolean targetAir = true, targetGround = true;
public boolean faceTarget = true, rotateShooting = true, isCounted = true, lowAltitude = false;
public boolean canBoost = false;
@ -75,6 +75,7 @@ public class UnitType extends UnlockableContent{
public int mineTier = -1;
public float buildSpeed = 1f, mineSpeed = 1f;
public float clipSize = -1;
public boolean canDrown = true;
public float engineOffset = 5f, engineSize = 2.5f;
public float strafePenalty = 0.5f;
@ -571,6 +572,8 @@ public class UnitType extends UnlockableContent{
}
public void drawOutline(Unit unit){
Draw.reset();
if(Core.atlas.isFound(outlineRegion)){
Draw.rect(outlineRegion, unit.x, unit.y, unit.rotation - 90);
}