Fixes the damage modifier not working sometimes (#8124)
Co-authored-by: Garen7 <Garen7@users.noreply.github.com>
This commit is contained in:
@@ -43,7 +43,7 @@ public class Lightning{
|
||||
bhit = false;
|
||||
|
||||
for(int i = 0; i < length / 2; i++){
|
||||
hitCreate.create(null, team, x, y, rotation, damage, 1f, 1f, hitter);
|
||||
hitCreate.create(null, team, x, y, rotation, damage * (hitter == null ? 1f : hitter.damageMultiplier()), 1f, 1f, hitter);
|
||||
lines.add(new Vec2(x + Mathf.range(3f), y + Mathf.range(3f)));
|
||||
|
||||
if(lines.size > 1){
|
||||
|
||||
@@ -141,9 +141,9 @@ public class EnergyFieldAbility extends Ability{
|
||||
}else{
|
||||
anyNearby = true;
|
||||
if(other instanceof Building b){
|
||||
b.damage(unit.team, damage);
|
||||
b.damage(unit.team, damage * state.rules.unitDamage(unit.team));
|
||||
}else{
|
||||
other.damage(damage);
|
||||
other.damage(damage * state.rules.unitDamage(unit.team));
|
||||
}
|
||||
if(other instanceof Statusc s){
|
||||
s.apply(status, statusDuration);
|
||||
|
||||
@@ -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