T5 air support unit
This commit is contained in:
@@ -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}
|
||||
};
|
||||
}};
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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){
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user