Tank crush damage tweaks

This commit is contained in:
Anuke
2022-03-04 17:22:22 -05:00
parent 742466c3ee
commit a97192a79d
6 changed files with 11 additions and 10 deletions

View File

@@ -63,11 +63,11 @@ abstract class TankComp implements Posc, Flyingc, Hitboxc, Unitc, ElevationMovec
}
//TODO should this apply to the player team(s)? currently PvE due to balancing
if(walked && t != null && t.build != null && t.build.team != team && (state.rules.waves && team == state.rules.waveTeam)
if(type.crushDamage > 0 && walked && t != null && t.build != null && t.build.team != team
//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.areaDamage * Time.delta);
t.build.damage(team, type.crushDamage * Time.delta * t.block().crushDamageMultiplier);
}
}
}