Fixes the damage modifier not working sometimes (#8124)
Co-authored-by: Garen7 <Garen7@users.noreply.github.com>
This commit is contained in:
@@ -88,7 +88,7 @@ abstract class CrawlComp implements Posc, Rotc, Hitboxc, Unitc{
|
||||
|
||||
//TODO area damage to units
|
||||
if(t.build != null && t.build.team != team){
|
||||
t.build.damage(team, type.crushDamage * Time.delta);
|
||||
t.build.damage(team, type.crushDamage * Time.delta * state.rules.unitDamage(team));
|
||||
}
|
||||
|
||||
if(Mathf.chanceDelta(0.025)){
|
||||
|
||||
@@ -192,7 +192,7 @@ abstract class LegsComp implements Posc, Rotc, Hitboxc, Flyingc, Unitc{
|
||||
}
|
||||
|
||||
if(type.legSplashDamage > 0){
|
||||
Damage.damage(team, l.base.x, l.base.y, type.legSplashRange, type.legSplashDamage, false, true);
|
||||
Damage.damage(team, l.base.x, l.base.y, type.legSplashRange, type.legSplashDamage * state.rules.unitDamage(team), false, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ abstract class TankComp implements Posc, Flyingc, Hitboxc, Unitc, ElevationMovec
|
||||
//damage radius is 1 tile smaller to prevent it from just touching walls as it passes
|
||||
&& Math.max(Math.abs(dx), Math.abs(dy)) <= r - 1){
|
||||
|
||||
t.build.damage(team, type.crushDamage * Time.delta * t.block().crushDamageMultiplier);
|
||||
t.build.damage(team, type.crushDamage * Time.delta * t.block().crushDamageMultiplier * state.rules.unitDamage(team));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -618,7 +618,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){
|
||||
Damage.damage(team, x, y, Mathf.pow(hitSize, 0.94f) * 1.25f, Mathf.pow(hitSize, 0.75f) * type.crashDamageMultiplier * 5f, true, false, true);
|
||||
Damage.damage(team, x, y, Mathf.pow(hitSize, 0.94f) * 1.25f, Mathf.pow(hitSize, 0.75f) * type.crashDamageMultiplier * 5f * state.rules.unitDamage(team), true, false, true);
|
||||
}
|
||||
|
||||
if(!headless && type.createScorch){
|
||||
|
||||
Reference in New Issue
Block a user