Skip to content

Commit b99cdb5

Browse files
committed
ferbiumTurret / new
1 parent a691f71 commit b99cdb5

5 files changed

Lines changed: 73 additions & 22 deletions

File tree

src/az/content/AZBullets.java

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import mindustry.Vars;
99
import mindustry.content.Fx;
1010
import mindustry.content.StatusEffects;
11+
import mindustry.entities.bullet.ArtilleryBulletType;
1112
import mindustry.entities.bullet.BasicBulletType;
1213
import mindustry.entities.bullet.BulletType;
1314
import mindustry.entities.bullet.ShrapnelBulletType;
@@ -134,30 +135,28 @@ public static void load() {
134135
frontColor = AZPal.craside2;
135136
}};
136137

137-
ferbiumBullet = new BasicBulletType(4f, 35f){{
138-
splashDamage = 30f;
139-
splashDamageRadius = 25f;
140-
sprite = "az-dagger-missile";
141-
//trailInterval = 0.5f;
142-
//trailEffect = AZFx.forceBulletTrail;
143-
hitEffect = AZFx.forceBulletHit;
144-
despawnEffect = AZFx.forceBulletDespawn;
138+
ferbiumBullet = new ArtilleryBulletType(8f, 10f){{
139+
splashDamage = 10f;
140+
splashDamageRadius = 2f * 8;
141+
sprite = "az-vog";
142+
trailInterval = 0.2f;
143+
drag = 0.015f;
144+
trailEffect = AZFx.ferbiumBulletTrail;
145+
hitEffect = AZFx.ferbiumBulletHit;
146+
despawnEffect = AZFx.ferbiumBulletExplosion;
145147
trailRotation = true;
146148
shrinkX = shrinkY = 0f;
147149
width = 10f;
148150
height = 13f;
149-
lifetime = 50;
151+
lifetime = 80;
150152
collidesGround = true;
151153
collidesAir = true;
152154
hitSize = 3;
153-
homingPower = 0.3f;
154155

155156
trailColor = AZPal.ferbiumBullet;
156157
backColor = AZPal.ferbiumBulletBack;
157158
frontColor = AZPal.ferbiumBullet;
158159

159-
trailLength = 8;
160-
trailWidth = 2f;
161160
}};
162161

163162

src/az/content/AZFx.java

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,23 @@ public class AZFx {
213213
});
214214
}),
215215

216+
ferbiumBulletHit = new Effect(30, e -> {
217+
color(AZPal.droneBullet);
218+
e.scaled(10, i -> {
219+
stroke(3f * i.fout());
220+
});
221+
222+
color(AZPal.droneBullet);
223+
224+
color(AZPal.droneBullet, AZPal.droneBulletBack, e.fin());
225+
stroke(1.5f * e.fout());
226+
227+
randLenVectors(e.id + 3, 8, 3f + 25f * e.finpow(), (x, y) -> {
228+
lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 2f + e.fout() * 4f);
229+
});
230+
}),
231+
232+
216233
smallblueHitExplosion = new Effect(30, e -> {
217234
color(AZPal.droneBullet);
218235
e.scaled(7, i -> {
@@ -263,6 +280,22 @@ public class AZFx {
263280
});
264281
}),
265282

283+
ferbiumBulletExplosion = new Effect(20, e -> {
284+
color(AZPal.droneBullet);
285+
e.scaled(10, i -> {
286+
stroke(2f * i.fout());
287+
});
288+
289+
color(AZPal.droneBullet, AZPal.droneBulletBack, e.fin());
290+
stroke(2f * e.fout());
291+
292+
randLenVectors(e.id + 1, 6, 2f + 19
293+
* e.finpow(), (x, y) -> {
294+
lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 2f + e.fout() * 2f);
295+
});
296+
}),
297+
298+
266299
smallBlueExplosionEMI = new Effect(50, e -> {
267300
color(AZPal.droneEMIBullet);
268301

@@ -460,6 +493,21 @@ public class AZFx {
460493

461494
}),
462495

496+
ferbiumBulletTrail = new Effect(25, e -> {
497+
color(AZPal.ferbiumBullet, AZPal.ferbiumBulletBack, e.fin());
498+
499+
stroke(0.6f + e.fout() * 0.9f);
500+
rand.setSeed(e.id);
501+
502+
color(AZPal.ferbiumBullet, AZPal.ferbiumBulletBack, e.fin());
503+
for(int i = 0; i < 1; i++){
504+
float rot = e.rotation + rand.range(5f) + 180f;
505+
v.trns(rot, rand.random(e.fin() * 10f));
506+
lineAngle(e.x + v.x, e.y + v.y, rot, e.fout() * rand.random(1f, 2f) + 1f);
507+
}
508+
}),
509+
510+
463511
forceFerbiumBulletTrail = new Effect(25, e -> {
464512
color(AZPal.ferbiumBullet, AZPal.ferbiumBulletBack, e.fin());
465513

src/az/content/AZUnits.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,7 @@ public static void load() {
531531
range = 15 * tilesize;
532532

533533
engineSize = 0f;
534+
534535
outlineColor = AZPal.aureliaOutline;
535536
weapons.add(
536537
new Weapon("eliminator-gun") {{

src/az/content/blocks/AZTurrets.java

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -155,32 +155,33 @@ public static void load() {
155155
}};
156156
}};
157157

158-
testTurret = new SpeedUpItemTurret("test-turret") {{
158+
testTurret = new SpeedUpItemTurret("zxc") {{
159159
requirements(Category.turret, with(AZItems.fors, 70, AZItems.lepera, 25));
160160
researchCost = with(AZItems.fors, 150, AZItems.lepera, 70);
161161
health = 700;
162162
shootEffect = AZFx.shootForce;
163163
smokeEffect = AZFx.shootSmokeForce;
164-
reload = 140f;
165-
inaccuracy = 10f;
164+
reload = 200f;
165+
inaccuracy = 5f;
166166
shake = 2f;
167167
shootY = -2;
168168
outlineColor = AZPal.aureliaOutline;
169169
size = 2;
170170
recoil = 2f;
171-
range = 24 * Vars.tilesize;
171+
range = 27 * Vars.tilesize;
172172
shootCone = 30f;
173-
shoot.shots = 3;
174-
shoot.shotDelay = 8;
175173
rotateSpeed = 3f;
176-
speedupPerShoot = 0.01f;
177174

178-
shootSound = Sounds.cannon;
175+
shootSound = Sounds.shootAltLong;
179176
squareSprite = false;
180177
ammoPerShot = 1;
181178
maxAmmo = 10;
182179
itemCapacity = 10;
183180
coolantMultiplier = 2f;
181+
shoot.shots = 12;
182+
shoot.shotDelay = 3;
183+
velocityRnd = 0.2f;
184+
minRange = 4 * 8f;
184185

185186
ammo(
186187
AZItems.ferbium, AZBullets.ferbiumBullet

src/az/world/blocks/defense/turret/SpeedUpItemTurret.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,17 @@
1515
import mindustry.world.blocks.defense.turrets.ItemTurret;
1616
import mindustry.world.meta.Stat;
1717
import mindustry.world.meta.StatUnit;
18-
18+
/*
19+
* author Yuria
20+
*/
1921
public class SpeedUpItemTurret extends ItemTurret{
2022

2123
public float overheatTime = -1f;
2224
public float overheatCoolAmount = 1.25f;
2325
public boolean isOverheat = false;
2426

2527
public float maxSpeedupScl = 0.5f;
26-
public float speedupPerShoot = 0.075f;
28+
public float speedupPerShoot = 0.05f;
2729

2830
public float slowDownReloadTime = 150f;
2931
public float inaccuracyUp = 0f;

0 commit comments

Comments
 (0)