More disperse ammo
This commit is contained in:
@@ -4426,7 +4426,8 @@ public class Blocks{
|
||||
disperse = new ItemTurret("disperse"){{
|
||||
requirements(Category.turret, with(Items.thorium, 50, Items.oxide, 150, Items.silicon, 200, Items.beryllium, 350));
|
||||
|
||||
ammo(Items.tungsten, new BasicBulletType(){{
|
||||
ammo(
|
||||
Items.tungsten, new BasicBulletType(){{
|
||||
damage = 65;
|
||||
speed = 8.5f;
|
||||
width = height = 16;
|
||||
@@ -4448,6 +4449,58 @@ public class Blocks{
|
||||
trailRotation = true;
|
||||
trailEffect = Fx.disperseTrail;
|
||||
|
||||
hitEffect = despawnEffect = Fx.hitBulletColor;
|
||||
}},
|
||||
Items.thorium, new BasicBulletType(){{
|
||||
damage = 90;
|
||||
reloadMultiplier = 0.85f;
|
||||
speed = 9.5f;
|
||||
width = height = 16;
|
||||
shrinkY = 0.3f;
|
||||
backSprite = "large-bomb-back";
|
||||
sprite = "mine-bullet";
|
||||
velocityRnd = 0.5f;
|
||||
collidesGround = false;
|
||||
collidesTiles = false;
|
||||
shootEffect = Fx.shootBig2;
|
||||
smokeEffect = Fx.shootSmokeDisperse;
|
||||
frontColor = Color.white;
|
||||
backColor = trailColor = hitColor = Color.valueOf("e89dbd");
|
||||
trailChance = 0.44f;
|
||||
ammoMultiplier = 2f;
|
||||
|
||||
lifetime = 34f;
|
||||
rotationOffset = 90f;
|
||||
trailRotation = true;
|
||||
trailEffect = Fx.disperseTrail;
|
||||
|
||||
hitEffect = despawnEffect = Fx.hitBulletColor;
|
||||
}},
|
||||
Items.silicon, new BasicBulletType(){{
|
||||
damage = 35;
|
||||
homingPower = 0.03f;
|
||||
|
||||
reloadMultiplier = 0.9f;
|
||||
speed = 8.5f;
|
||||
width = height = 16;
|
||||
shrinkY = 0.3f;
|
||||
backSprite = "large-bomb-back";
|
||||
sprite = "mine-bullet";
|
||||
velocityRnd = 0.11f;
|
||||
collidesGround = false;
|
||||
collidesTiles = false;
|
||||
shootEffect = Fx.shootBig2;
|
||||
smokeEffect = Fx.shootSmokeDisperse;
|
||||
frontColor = Color.valueOf("dae1ee");
|
||||
backColor = trailColor = hitColor = Color.valueOf("858a9b");
|
||||
ammoMultiplier = 3f;
|
||||
|
||||
lifetime = 34f;
|
||||
rotationOffset = 90f;
|
||||
trailLength = 7;
|
||||
//for chasing targets
|
||||
extraRangeMargin = 32f;
|
||||
|
||||
hitEffect = despawnEffect = Fx.hitBulletColor;
|
||||
}});
|
||||
|
||||
@@ -4503,7 +4556,7 @@ public class Blocks{
|
||||
coolant = consume(new ConsumeLiquid(Liquids.water, 20f / 60f));
|
||||
coolantMultiplier = 6.25f;
|
||||
|
||||
limitRange(5f);
|
||||
limitRange(16f);
|
||||
}};
|
||||
|
||||
afflict = new PowerTurret("afflict"){{
|
||||
|
||||
@@ -141,6 +141,8 @@ public class BulletType extends Content implements Cloneable{
|
||||
public float rangeOverride = -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;
|
||||
/** When used in turrets with limitRange() applied, this adds extra range to the bullets that extends past targeting range. Only particularly relevant in vanilla. */
|
||||
public float extraRangeMargin = 0f;
|
||||
/** Range initialized in init(). */
|
||||
public float range = 0f;
|
||||
/** % of block health healed **/
|
||||
|
||||
@@ -209,7 +209,7 @@ public class Turret extends ReloadTurret{
|
||||
public void limitRange(BulletType bullet, float margin){
|
||||
float realRange = bullet.rangeChange + range;
|
||||
//doesn't handle drag
|
||||
bullet.lifetime = (realRange + margin) / bullet.speed;
|
||||
bullet.lifetime = (realRange + margin + bullet.extraRangeMargin) / bullet.speed;
|
||||
}
|
||||
|
||||
public static abstract class AmmoEntry{
|
||||
|
||||
Reference in New Issue
Block a user