3x3 breach
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 787 B After Width: | Height: | Size: 2.4 KiB |
@@ -840,6 +840,7 @@ bullet.infinitepierce = [stat]pierce
|
|||||||
bullet.healpercent = [stat]{0}[lightgray]% healing
|
bullet.healpercent = [stat]{0}[lightgray]% healing
|
||||||
bullet.multiplier = [stat]{0}[lightgray]x ammo multiplier
|
bullet.multiplier = [stat]{0}[lightgray]x ammo multiplier
|
||||||
bullet.reload = [stat]{0}[lightgray]x fire rate
|
bullet.reload = [stat]{0}[lightgray]x fire rate
|
||||||
|
bullet.range = [stat]{0}[lightgray] tiles range
|
||||||
|
|
||||||
unit.blocks = blocks
|
unit.blocks = blocks
|
||||||
unit.blockssquared = blocks²
|
unit.blockssquared = blocks²
|
||||||
|
|||||||
@@ -2892,13 +2892,12 @@ public class Blocks{
|
|||||||
consumes.add(new ConsumeCoolant(0.5f)).update(false);
|
consumes.add(new ConsumeCoolant(0.5f)).update(false);
|
||||||
}};
|
}};
|
||||||
|
|
||||||
//TODO tungsten support?
|
|
||||||
breach = new ItemTurret("breach"){{
|
breach = new ItemTurret("breach"){{
|
||||||
requirements(Category.turret, with(Items.beryllium, 35, Items.silicon, 20));
|
requirements(Category.turret, with(Items.beryllium, 80, Items.silicon, 50));
|
||||||
ammo(
|
ammo(
|
||||||
Items.beryllium, new BasicBulletType(7f, 40){{
|
Items.beryllium, new BasicBulletType(7f, 70){{
|
||||||
width = 8f;
|
width = 12f;
|
||||||
height = 14f;
|
height = 20f;
|
||||||
shootEffect = Fx.colorSpark;
|
shootEffect = Fx.colorSpark;
|
||||||
smokeEffect = Fx.shootBigSmoke;
|
smokeEffect = Fx.shootBigSmoke;
|
||||||
ammoMultiplier = 1;
|
ammoMultiplier = 1;
|
||||||
@@ -2906,37 +2905,39 @@ public class Blocks{
|
|||||||
pierceBuilding = true;
|
pierceBuilding = true;
|
||||||
hitColor = backColor = trailColor = Pal.berylShot;
|
hitColor = backColor = trailColor = Pal.berylShot;
|
||||||
frontColor = Color.white;
|
frontColor = Color.white;
|
||||||
trailWidth = 1.5f;
|
trailWidth = 2.1f;
|
||||||
trailLength = 10;
|
trailLength = 10;
|
||||||
hitEffect = despawnEffect = Fx.hitBulletColor;
|
hitEffect = despawnEffect = Fx.hitBulletColor;
|
||||||
}},
|
}},
|
||||||
Items.tungsten, new BasicBulletType(6.6f, 55){{
|
Items.tungsten, new BasicBulletType(7.5f, 140){{
|
||||||
width = 9f;
|
width = 13f;
|
||||||
height = 14f;
|
height = 19f;
|
||||||
shootEffect = Fx.tungstenSpark;
|
shootEffect = Fx.colorSpark;
|
||||||
smokeEffect = Fx.shootBigSmoke;
|
smokeEffect = Fx.shootBigSmoke;
|
||||||
ammoMultiplier = 1;
|
ammoMultiplier = 1;
|
||||||
reloadMultiplier = 0.7f;
|
reloadMultiplier = 1f;
|
||||||
pierce = true;
|
pierce = true;
|
||||||
pierceBuilding = true;
|
pierceBuilding = true;
|
||||||
hitColor = backColor = trailColor = Pal.tungstenShot;
|
hitColor = backColor = trailColor = Pal.tungstenShot;
|
||||||
frontColor = Color.white;
|
frontColor = Color.white;
|
||||||
trailWidth = 1.6f;
|
trailWidth = 2.2f;
|
||||||
trailLength = 10;
|
trailLength = 11;
|
||||||
hitEffect = despawnEffect = Fx.hitBulletColor;
|
hitEffect = despawnEffect = Fx.hitBulletColor;
|
||||||
|
rangeChange = 40f;
|
||||||
}}
|
}}
|
||||||
);
|
);
|
||||||
|
|
||||||
//TODO no coolant?
|
//TODO no coolant?
|
||||||
|
|
||||||
|
ammoPerShot = 4;
|
||||||
draw = new DrawTurret("reinforced-");
|
draw = new DrawTurret("reinforced-");
|
||||||
shootLength = 0f;
|
shootLength = 0f;
|
||||||
outlineColor = Pal.darkOutline;
|
outlineColor = Pal.darkOutline;
|
||||||
size = 2;
|
size = 3;
|
||||||
envEnabled |= Env.space;
|
envEnabled |= Env.space;
|
||||||
reloadTime = 35f;
|
reloadTime = 40f;
|
||||||
restitution = 0.03f;
|
restitution = 0.03f;
|
||||||
range = 180;
|
range = 190;
|
||||||
shootCone = 3f;
|
shootCone = 3f;
|
||||||
health = 350 * size * size;
|
health = 350 * size * size;
|
||||||
rotateSpeed = 1.6f;
|
rotateSpeed = 1.6f;
|
||||||
@@ -2944,6 +2945,7 @@ public class Blocks{
|
|||||||
limitRange();
|
limitRange();
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
//TODO 3x3, different mechanics - not a fuse clone
|
||||||
fracture = new ItemTurret("fracture"){{
|
fracture = new ItemTurret("fracture"){{
|
||||||
requirements(Category.turret, with(Items.beryllium, 10, Items.graphite, 30, Items.silicon, 35));
|
requirements(Category.turret, with(Items.beryllium, 10, Items.graphite, 30, Items.silicon, 35));
|
||||||
ammo(
|
ammo(
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ public class Liquids{
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
gallium = new Liquid("gallium", Color.valueOf("9a9dbf")){{
|
gallium = new Liquid("gallium", Color.valueOf("9a9dbf")){{
|
||||||
|
coolant = false;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
//TODO reactivity, etc
|
//TODO reactivity, etc
|
||||||
|
|||||||
@@ -114,6 +114,8 @@ public class BulletType extends Content implements Cloneable{
|
|||||||
public boolean backMove = true;
|
public boolean backMove = true;
|
||||||
/** Bullet range override. */
|
/** Bullet range override. */
|
||||||
public float maxRange = -1f;
|
public float maxRange = -1f;
|
||||||
|
/** When used in a turret with multiple ammo types, this can be set to a non-zero value to influence range. */
|
||||||
|
public float rangeChange = 0f;
|
||||||
/** % of block health healed **/
|
/** % of block health healed **/
|
||||||
public float healPercent = 0f;
|
public float healPercent = 0f;
|
||||||
/** Whether to make fire on impact */
|
/** Whether to make fire on impact */
|
||||||
|
|||||||
@@ -42,6 +42,8 @@ public class Liquid extends UnlockableContent{
|
|||||||
public float viscosity = 0.5f;
|
public float viscosity = 0.5f;
|
||||||
/** how prone to exploding this liquid is, when heated. 0 = nothing, 1 = nuke */
|
/** how prone to exploding this liquid is, when heated. 0 = nothing, 1 = nuke */
|
||||||
public float explosiveness;
|
public float explosiveness;
|
||||||
|
/** if false, this liquid cannot be a coolant */
|
||||||
|
public boolean coolant = true;
|
||||||
/** The associated status effect. */
|
/** The associated status effect. */
|
||||||
public StatusEffect effect = StatusEffects.none;
|
public StatusEffect effect = StatusEffects.none;
|
||||||
/** Effect shown in puddles. */
|
/** Effect shown in puddles. */
|
||||||
@@ -70,6 +72,8 @@ public class Liquid extends UnlockableContent{
|
|||||||
super.init();
|
super.init();
|
||||||
|
|
||||||
if(gas){
|
if(gas){
|
||||||
|
//gases can't be coolants
|
||||||
|
coolant = false;
|
||||||
//always "boils", it's a gas
|
//always "boils", it's a gas
|
||||||
boilPoint = -1;
|
boilPoint = -1;
|
||||||
//ensure no accidental global mutation
|
//ensure no accidental global mutation
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ public class BaseTurret extends Block{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawSelect(){
|
public void drawSelect(){
|
||||||
Drawf.dashCircle(x, y, range, team.color);
|
Drawf.dashCircle(x, y, range(), team.color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,8 @@ public class ItemTurret extends Turret{
|
|||||||
public void limitRange(float margin){
|
public void limitRange(float margin){
|
||||||
for(var entry : ammoTypes.copy().entries()){
|
for(var entry : ammoTypes.copy().entries()){
|
||||||
var copy = entry.value.copy();
|
var copy = entry.value.copy();
|
||||||
copy.lifetime = (range + margin) / copy.speed;
|
float realRange = copy.rangeChange + range;
|
||||||
|
copy.lifetime = (realRange + margin) / copy.speed;
|
||||||
ammoTypes.put(entry.key, copy);
|
ammoTypes.put(entry.key, copy);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -214,6 +214,14 @@ public class Turret extends ReloadTurret{
|
|||||||
public float heatReq;
|
public float heatReq;
|
||||||
public float[] sideHeat = new float[4];
|
public float[] sideHeat = new float[4];
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float range(){
|
||||||
|
if(hasAmmo()){
|
||||||
|
return range + peekAmmo().rangeChange;
|
||||||
|
}
|
||||||
|
return range;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float warmup(){
|
public float warmup(){
|
||||||
return shootWarmup;
|
return shootWarmup;
|
||||||
@@ -408,6 +416,8 @@ public class Turret extends ReloadTurret{
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void findTarget(){
|
protected void findTarget(){
|
||||||
|
float range = range();
|
||||||
|
|
||||||
if(targetAir && !targetGround){
|
if(targetAir && !targetGround){
|
||||||
target = Units.bestEnemy(team, x, y, range, e -> !e.dead() && !e.isGrounded(), unitSort);
|
target = Units.bestEnemy(team, x, y, range, e -> !e.dead() && !e.isGrounded(), unitSort);
|
||||||
}else{
|
}else{
|
||||||
@@ -553,7 +563,7 @@ public class Turret extends ReloadTurret{
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void bullet(BulletType type, float angle){
|
protected void bullet(BulletType type, float angle){
|
||||||
float lifeScl = type.scaleVelocity ? Mathf.clamp(Mathf.dst(x + bulletOffset.x, y + bulletOffset.y, targetPos.x, targetPos.y) / type.range(), minRange / type.range(), range / type.range()) : 1f;
|
float lifeScl = type.scaleVelocity ? Mathf.clamp(Mathf.dst(x + bulletOffset.x, y + bulletOffset.y, targetPos.x, targetPos.y) / type.range(), minRange / type.range(), range() / type.range()) : 1f;
|
||||||
|
|
||||||
type.create(this, team, x + bulletOffset.x, y + bulletOffset.y, angle, 1f + Mathf.range(velocityInaccuracy), lifeScl);
|
type.create(this, team, x + bulletOffset.x, y + bulletOffset.y, angle, 1f + Mathf.range(velocityInaccuracy), lifeScl);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ public class ConsumeCoolant extends ConsumeLiquidFilter{
|
|||||||
public float maxTemp = 0.5f, maxFlammability = 0.1f;
|
public float maxTemp = 0.5f, maxFlammability = 0.1f;
|
||||||
|
|
||||||
public ConsumeCoolant(float amount){
|
public ConsumeCoolant(float amount){
|
||||||
this.filter = liquid -> liquid.temperature <= maxTemp && liquid.flammability < maxFlammability;
|
this.filter = liquid -> liquid.coolant && liquid.temperature <= maxTemp && liquid.flammability < maxFlammability;
|
||||||
this.amount = amount;
|
this.amount = amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -305,6 +305,10 @@ public class StatValues{
|
|||||||
sep(bt, Core.bundle.format("bullet.buildingdamage", (int)(type.buildingDamageMultiplier * 100)));
|
sep(bt, Core.bundle.format("bullet.buildingdamage", (int)(type.buildingDamageMultiplier * 100)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(type.rangeChange != 0 && !compact){
|
||||||
|
sep(bt, Core.bundle.format("bullet.range", (type.rangeChange > 0 ? "+" : "-") + Strings.autoFixed(type.rangeChange / tilesize, 1)));
|
||||||
|
}
|
||||||
|
|
||||||
if(type.splashDamage > 0){
|
if(type.splashDamage > 0){
|
||||||
sep(bt, Core.bundle.format("bullet.splashdamage", (int)type.splashDamage, Strings.fixed(type.splashDamageRadius / tilesize, 1)));
|
sep(bt, Core.bundle.format("bullet.splashdamage", (int)type.splashDamage, Strings.fixed(type.splashDamageRadius / tilesize, 1)));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user