Skip to content

Commit d2a7e48

Browse files
committed
Display harmanuke stats + Make it lead targets
1 parent 64b9a3b commit d2a7e48

File tree

3 files changed

+31
-14
lines changed

3 files changed

+31
-14
lines changed

src/progressed/content/blocks/PMBlocks.java

+28-13
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import arc.*;
44
import arc.graphics.*;
55
import arc.math.*;
6+
import arc.struct.*;
67
import arc.util.*;
78
import mindustry.content.*;
89
import mindustry.entities.*;
@@ -1338,20 +1339,34 @@ public void setStats(){
13381339
}
13391340
};
13401341

1341-
harmacist = new EffectZone("harmacist"){{
1342-
requirements(Category.units, BuildVisibility.sandboxOnly, with());
1343-
alwaysUnlocked = true;
1342+
harmacist = new EffectZone("harmacist"){
1343+
{
1344+
requirements(Category.units, BuildVisibility.sandboxOnly, with());
1345+
alwaysUnlocked = true;
13441346

1345-
size = 2;
1346-
range = 32f * tilesize;
1347-
height = 16f;
1348-
baseColor = Color.red;
1349-
reload = 5f;
1350-
affectOwnTeam = false;
1351-
affectEnemyTeam = true;
1352-
1353-
zoneEffect = tile -> all.each(u -> PMBullets.harmanuke.create(tile, u.x, u.y, 0f));
1354-
}};
1347+
size = 2;
1348+
range = 32f * tilesize;
1349+
height = 16f;
1350+
baseColor = Color.red;
1351+
reload = 2f;
1352+
affectOwnTeam = false;
1353+
affectEnemyTeam = true;
1354+
1355+
zoneEffect = tile -> all.each(u -> {
1356+
Tmp.v1.set(u).mulAdd(u.vel, PMBullets.harmanuke.lifetime);
1357+
if(!Tmp.v1.within(tile, range)) return;
1358+
PMBullets.harmanuke.create(tile, Tmp.v1.x, Tmp.v1.y, 0f);
1359+
});
1360+
}
1361+
1362+
@Override
1363+
public void setStats(){
1364+
super.setStats();
1365+
1366+
stats.add(Stat.reload, 60f / reload, StatUnit.perSecond);
1367+
stats.add(Stat.ammo, StatValues.ammo(ObjectMap.of(this, PMBullets.harmanuke)));
1368+
}
1369+
};
13551370
// endregion
13561371

13571372
// region Effect

src/progressed/content/bullets/PMBullets.java

+2
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,8 @@ public static void load(){
181181

182182
splashDamage = 1000f;
183183
splashDamageRadius = 80f;
184+
185+
displayAmmoMultiplier = false;
184186
}};
185187

186188
burstDriverOrb = new BurstDriverOrb();

src/progressed/entities/bullet/pseudo3d/ArcBulletType.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ public void updateHoming(Bullet b){
239239
if(target != null){
240240
homingTarget.set(target);
241241
if(target instanceof Velc v){
242-
homingTarget.mulAdd(v.vel(), (b.lifetime - b.time) * Time.delta);
242+
homingTarget.mulAdd(v.vel(), b.lifetime - b.time);
243243
}
244244
((ArcBulletData)b.data).updateHoming(b, homingTarget);
245245
}

0 commit comments

Comments
 (0)