25% flying unit wreck health / 50% flying unit crash damage
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -93,6 +93,8 @@ public class UnitType extends UnlockableContent implements Senseable{
|
||||
buildRange = Vars.buildingRange,
|
||||
/** multiplier for damage this (flying) unit deals when crashing on enemy things */
|
||||
crashDamageMultiplier = 1f,
|
||||
/** multiplier for health that this flying unit has for its wreck, based on its max health. */
|
||||
wreckHealthMultiplier = 0.25f,
|
||||
/** a VERY ROUGH estimate of unit DPS; initialized in init() */
|
||||
dpsEstimate = -1,
|
||||
/** graphics clipping size; <0 to calculate automatically */
|
||||
|
||||
Reference in New Issue
Block a user