25% flying unit wreck health / 50% flying unit crash damage

This commit is contained in:
Anuken
2025-05-15 18:30:40 -04:00
parent e1e5bd5b3f
commit 185ad13e49
2 changed files with 4 additions and 2 deletions

View File

@@ -774,7 +774,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
//move down
elevation -= type.fallSpeed * Time.delta;
if(isGrounded() || health <= -maxHealth){
if(isGrounded() || health <= -maxHealth * type.wreckHealthMultiplier){
Call.unitDestroy(id);
}
}
@@ -869,7 +869,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
//if this unit crash landed (was flying), damage stuff in a radius
if(type.flying && !spawnedByCore && type.createWreck && state.rules.unitCrashDamage(team) > 0){
var shields = indexer.getEnemy(team, BlockFlag.shield);
float crashDamage = Mathf.pow(hitSize, 0.75f) * type.crashDamageMultiplier * 5f * state.rules.unitCrashDamage(team);
float crashDamage = Mathf.pow(hitSize, 0.75f) * type.crashDamageMultiplier * 2.5f * state.rules.unitCrashDamage(team);
if(shields.isEmpty() || !shields.contains(b -> b instanceof ExplosionShield s && s.absorbExplosion(x, y, crashDamage))){
Damage.damage(team, x, y, Mathf.pow(hitSize, 0.94f) * 1.25f, crashDamage, true, false, true);
}