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