Collaris tweaks

This commit is contained in:
Anuken 2022-07-14 10:06:15 -04:00
parent 62332fbebb
commit 9dce4f36f7
2 changed files with 39 additions and 16 deletions

View file

@ -2090,6 +2090,21 @@ public class Fx{
}); });
}), }),
artilleryTrailSmoke = new Effect(50, e -> {
color(e.color);
rand.setSeed(e.id);
for(int i = 0; i < 13; i++){
float fin = e.fin() / rand.random(0.5f, 1f), fout = 1f - fin, angle = rand.random(360f), len = rand.random(0.5f, 1f);
if(fin <= 1f){
Tmp.v1.trns(angle, fin * 24f * len);
alpha((0.5f - Math.abs(fin - 0.5f)) * 2f);
Fill.circle(e.x + Tmp.v1.x, e.y + Tmp.v1.y, 0.5f + fout * 4f);
}
}
}),
smokeCloud = new Effect(70, e -> { smokeCloud = new Effect(70, e -> {
randLenVectors(e.id, e.fin(), 30, 30f, (x, y, fin, fout) -> { randLenVectors(e.id, e.fin(), 30, 30f, (x, y, fin, fout) -> {
color(Color.gray); color(Color.gray);

View file

@ -3377,6 +3377,8 @@ public class UnitTypes{
shadowElevation = 0.4f; shadowElevation = 0.4f;
groundLayer = Layer.legUnit; groundLayer = Layer.legUnit;
targetAir = false;
weapons.add(new Weapon("collaris-weapon"){{ weapons.add(new Weapon("collaris-weapon"){{
mirror = true; mirror = true;
rotationLimit = 30f; rotationLimit = 30f;
@ -3386,12 +3388,16 @@ public class UnitTypes{
x = 48 / 4f; x = 48 / 4f;
y = -28f / 4f; y = -28f / 4f;
shootY = 64f / 4f; shootY = 64f / 4f;
recoil = 3f; recoil = 4f;
reload = 90f; reload = 130f;
shake = 5f; cooldownTime = reload * 1.2f;
shake = 7f;
layerOffset = 0.02f; layerOffset = 0.02f;
shadow = 10f; shadow = 10f;
shootStatus = StatusEffects.slow;
shootStatusDuration = reload + 1f;
shoot.shots = 1; shoot.shots = 1;
heatColor = Color.red; heatColor = Color.red;
@ -3413,14 +3419,13 @@ public class UnitTypes{
}}); }});
} }
bullet = new ArtilleryBulletType(5.5f, 290){{ bullet = new ArtilleryBulletType(5.5f, 300){{
pierceCap = 2; collidesTiles = collides = true;
pierceBuilding = true;
lifetime = 75f; lifetime = 75f;
shootEffect = Fx.shootBigColor; shootEffect = Fx.shootBigColor;
smokeEffect = Fx.shootSmokeSquareBig; smokeEffect = Fx.shootSmokeSquareBig;
frontColor = Color.white; frontColor = Color.white;
trailEffect = new MultiEffect(Fx.artilleryTrail, Fx.artilleryTrailSmoke);
hitSound = Sounds.none; hitSound = Sounds.none;
width = 18f; width = 18f;
height = 24f; height = 24f;
@ -3436,25 +3441,28 @@ public class UnitTypes{
despawnEffect = Fx.none; despawnEffect = Fx.none;
hitEffect = despawnEffect = new ExplosionEffect(){{ hitEffect = despawnEffect = new ExplosionEffect(){{
lifetime = 30f; lifetime = 34f;
waveStroke = 2f; waveStroke = 4f;
waveColor = sparkColor = trailColor; waveColor = sparkColor = trailColor;
waveRad = 5f; waveRad = 25f;
smokeSize = 0f; smokeSize = 0f;
smokeSizeBase = 0f; smokeSizeBase = 0f;
sparks = 5; sparks = 10;
sparkRad = 20f; sparkRad = 25f;
sparkLen = 6f; sparkLen = 8f;
sparkStroke = 2f; sparkStroke = 3f;
}}; }};
splashDamage = 90f;
splashDamageRadius = 20f;
fragBullets = 15; fragBullets = 15;
fragVelocityMin = 0.5f; fragVelocityMin = 0.5f;
fragRandomSpread = 130f; fragRandomSpread = 130f;
fragLifeMin = 0.3f; fragLifeMin = 0.3f;
despawnShake = 5f; despawnShake = 5f;
fragBullet = new BasicBulletType(5.5f, 85){{ fragBullet = new BasicBulletType(5.5f, 60){{
pierceCap = 2; pierceCap = 2;
pierceBuilding = true; pierceBuilding = true;
@ -3474,7 +3482,7 @@ public class UnitTypes{
lightOpacity = 0.7f; lightOpacity = 0.7f;
trailWidth = 2.2f; trailWidth = 2.2f;
trailLength = 8; trailLength = 7;
trailChance = -1f; trailChance = -1f;
despawnEffect = Fx.none; despawnEffect = Fx.none;