speed
This commit is contained in:
@@ -176,7 +176,6 @@ public class Fx implements ContentList{
|
||||
Draw.color();
|
||||
});
|
||||
|
||||
|
||||
hitBulletSmall = new Effect(14, e -> {
|
||||
Draw.color(Color.white, Pal.lightOrange, e.fin());
|
||||
|
||||
|
||||
@@ -278,6 +278,10 @@ public class Mechs implements ContentList{
|
||||
};
|
||||
|
||||
dart = new Mech("dart-ship", true){
|
||||
float effectRange = 60f;
|
||||
float effectReload = 60f * 5;
|
||||
float effectDuration = 60f * 10f;
|
||||
|
||||
{
|
||||
drillPower = 1;
|
||||
mineSpeed = 2f;
|
||||
@@ -297,6 +301,28 @@ public class Mechs implements ContentList{
|
||||
bullet = Bullets.standardCopper;
|
||||
}};
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateAlt(Player player){
|
||||
super.updateAlt(player);
|
||||
|
||||
if(player.timer.get(Player.timerAbility, effectReload)){
|
||||
//wasHealed = false;
|
||||
|
||||
Units.nearby(player.getTeam(), player.x, player.y, effectRange, unit -> {
|
||||
unit.applyEffect(StatusEffects.overdrive, effectDuration);
|
||||
});
|
||||
|
||||
indexer.eachBlock(player, effectRange, other -> other.entity.damaged(), other -> {
|
||||
other.entity.applyBoost(1.5f, effectDuration);
|
||||
Effects.effect(Fx.healBlockFull, Pal.heal, other.drawx(), other.drawy(), other.block().size);
|
||||
});
|
||||
|
||||
//if(wasHealed){
|
||||
Effects.effect(Fx.overdriveWave, player);
|
||||
//}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
javelin = new Mech("javelin-ship", true){
|
||||
|
||||
@@ -82,6 +82,11 @@ public class TileEntity extends BaseEntity implements TargetTrait, HealthTrait,
|
||||
return this;
|
||||
}
|
||||
|
||||
public void applyBoost(float intensity, float duration){
|
||||
timeScaleDuration = Math.max(timeScaleDuration, duration);
|
||||
timeScale = Math.max(timeScale, intensity);
|
||||
}
|
||||
|
||||
/** Scaled delta. */
|
||||
public float delta(){
|
||||
return Time.delta() * timeScale;
|
||||
|
||||
@@ -89,10 +89,7 @@ public class OverdriveProjector extends Block{
|
||||
float realBoost = (speedBoost + entity.phaseHeat * speedBoostPhase) * entity.efficiency();
|
||||
|
||||
entity.charge = 0f;
|
||||
indexer.eachBlock(entity, realRange, other -> other.entity.timeScale <= realBoost, other -> {
|
||||
other.entity.timeScaleDuration = Math.max(other.entity.timeScaleDuration, reload + 1f);
|
||||
other.entity.timeScale = Math.max(other.entity.timeScale, realBoost);
|
||||
});
|
||||
indexer.eachBlock(entity, realRange, other -> other.entity.timeScale <= realBoost, other -> other.entity.applyBoost(realBoost, reload + 1f));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user