Scathe surge missiles

This commit is contained in:
Anuken
2025-01-12 17:08:51 -05:00
parent d414a65cbb
commit ddd4de7b7b
10 changed files with 146 additions and 42 deletions

View File

@@ -527,7 +527,7 @@ public class BulletType extends Content implements Cloneable{
if(fragBullet != null && (fragOnAbsorb || !b.absorbed) && !(b.frags >= pierceFragCap && pierceFragCap > 0)){
for(int i = 0; i < fragBullets; i++){
float len = Mathf.random(fragOffsetMin, fragOffsetMax);
float a = b.rotation() + Mathf.range(fragRandomSpread / 2) + fragAngle + ((i - fragBullets/2) * fragSpread);
float a = b.rotation() + Mathf.range(fragRandomSpread / 2) + fragAngle + fragSpread * i - (fragBullets - 1) * fragSpread / 2f;
fragBullet.create(b, x + Angles.trnsx(a, len), y + Angles.trnsy(a, len), a, Mathf.random(fragVelocityMin, fragVelocityMax), Mathf.random(fragLifeMin, fragLifeMax));
}
b.frags++;
@@ -819,7 +819,7 @@ public class BulletType extends Content implements Cloneable{
Bullet bullet = Bullet.create();
bullet.type = this;
bullet.owner = owner;
bullet.owner = shooter == null ? owner : shooter;
bullet.team = team;
bullet.time = 0f;
bullet.originX = x;

View File

@@ -445,6 +445,10 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
}
}
public boolean isMissile(){
return this instanceof TimedKillc;
}
public int count(){
return team.data().countType(type);
}