F O R C E P R O J E C T O R S
This commit is contained in:
@@ -879,7 +879,7 @@ public class Blocks implements ContentList{
|
||||
forceProjector = new ForceProjector("force-projector"){{
|
||||
requirements(Category.effect, with(Items.lead, 100, Items.titanium, 75, Items.silicon, 125));
|
||||
size = 3;
|
||||
phaseRadiusBoost = 80f;
|
||||
phaseBoost = 80f;
|
||||
radius = 101.7f;
|
||||
breakage = 750f;
|
||||
cooldownNormal = 1.5f;
|
||||
|
||||
@@ -22,7 +22,7 @@ public class ForceProjector extends Block{
|
||||
public final int timerUse = timers++;
|
||||
public float phaseUseTime = 350f;
|
||||
|
||||
public float phaseRadiusBoost = 80f;
|
||||
public float phaseBoost = 80f;
|
||||
public float radius = 101.7f;
|
||||
public float breakage = 550f;
|
||||
public float cooldownNormal = 1.75f;
|
||||
@@ -41,6 +41,12 @@ public class ForceProjector extends Block{
|
||||
}
|
||||
};
|
||||
|
||||
static final Cons<Unitc> unitPusher = unit -> {
|
||||
if(unit.team() != paramEntity.team && Intersector.isInsideHexagon(paramEntity.x, paramEntity.y, paramEntity.realRadius() * 2f, unit.x(), unit.y())){
|
||||
unit.impulse(Tmp.v3.set(unit).sub(paramEntity.x, paramEntity.y).nor().scl(100f));
|
||||
}
|
||||
};
|
||||
|
||||
public ForceProjector(String name){
|
||||
super(name);
|
||||
update = true;
|
||||
@@ -60,7 +66,8 @@ public class ForceProjector extends Block{
|
||||
@Override
|
||||
public void setStats(){
|
||||
super.setStats();
|
||||
|
||||
stats.add(BlockStat.shieldHealth, breakage, StatUnit.none);
|
||||
stats.add(BlockStat.cooldownTime, (int) (breakage / cooldownBrokenBase / 60f), StatUnit.seconds);
|
||||
stats.add(BlockStat.powerUse, basePowerDraw * 60f, StatUnit.powerSecond);
|
||||
stats.add(BlockStat.boostEffect, phaseRadiusBoost / tilesize, StatUnit.blocks);
|
||||
}
|
||||
@@ -76,6 +83,15 @@ public class ForceProjector extends Block{
|
||||
Lines.stroke(1f);
|
||||
Lines.poly(x * tilesize, y * tilesize, 6, radius);
|
||||
Draw.color();
|
||||
|
||||
float phaseBoostedRadius = radius + phaseBoost;
|
||||
Draw.color(Pal.gray);
|
||||
Lines.stroke(3f);
|
||||
Lines.poly(x * tilesize, y * tilesize, 6, phaseBoostedRadius);
|
||||
Draw.color(player.team().color);
|
||||
Lines.stroke(1f);
|
||||
Lines.poly(x * tilesize, y * tilesize, 6, phaseBoostedRadius);
|
||||
Draw.color();
|
||||
}
|
||||
|
||||
public class ForceProjectorEntity extends Building{
|
||||
@@ -119,7 +135,7 @@ public class ForceProjector extends Block{
|
||||
broken = false;
|
||||
}
|
||||
|
||||
if(buildup >= breakage && !broken){
|
||||
if(buildup >= breakage + (phaseBoost * 5f) && !broken){
|
||||
broken = true;
|
||||
buildup = breakage;
|
||||
Fx.shieldBreak.at(x, y, radius, team.color);
|
||||
@@ -134,11 +150,12 @@ public class ForceProjector extends Block{
|
||||
if(realRadius > 0 && !broken){
|
||||
paramEntity = this;
|
||||
Groups.bullet.intersect(x - realRadius, y - realRadius, realRadius * 2f, realRadius * 2f, shieldConsumer);
|
||||
Groups.unit.intersect(x - realRadius, y - realRadius, realRadius * 2f, realRadius * 2f, unitPusher);
|
||||
}
|
||||
}
|
||||
|
||||
float realRadius(){
|
||||
return (radius + phaseHeat * phaseRadiusBoost) * radscl;
|
||||
return (radius + phaseHeat * phaseBoost) * radscl;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -45,6 +45,8 @@ public enum BlockStat{
|
||||
targetsGround(StatCategory.shooting),
|
||||
damage(StatCategory.shooting),
|
||||
ammo(StatCategory.shooting),
|
||||
shieldHealth(StatCategory.shooting),
|
||||
cooldownTime(StatCategory.shooting),
|
||||
|
||||
booster(StatCategory.optional),
|
||||
boostEffect(StatCategory.optional),
|
||||
|
||||
@@ -19,6 +19,7 @@ public enum StatUnit{
|
||||
perSecond,
|
||||
timesSpeed(false),
|
||||
percent(false),
|
||||
shieldHealth,
|
||||
none,
|
||||
items;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user