@@ -60,21 +60,17 @@ public static void dealRadialSplashDamage(
60
60
}
61
61
62
62
private static void applySplashDamage (Weapon weapon , Agent mainTarget , Agent splashTarget ) {
63
- if (splashTarget == mainTarget
64
- || splashTarget .burrowed
65
- || splashTarget .isFlyer != mainTarget .isFlyer ) {
63
+ if (splashTarget == mainTarget || splashTarget .isFlyer != mainTarget .isFlyer ) {
66
64
return ;
67
65
}
68
66
69
67
int distanceSquared = distanceSquared (splashTarget , mainTarget );
70
- if (distanceSquared <= weapon .outerSplashRadiusSquared ) {
68
+ if (distanceSquared <= weapon .innerSplashRadiusSquared ) {
69
+ applyDamage (splashTarget , weapon .damageType , weapon .damageShifted , weapon .hits );
70
+ } else if (!splashTarget .burrowed ) {
71
71
if (distanceSquared <= weapon .medianSplashRadiusSquared ) {
72
- if (distanceSquared <= weapon .innerSplashRadiusSquared ) {
73
- applyDamage (splashTarget , weapon .damageType , weapon .damageShifted , weapon .hits );
74
- } else {
75
- applyDamage (splashTarget , weapon .damageType , weapon .damageShifted / 2 , weapon .hits );
76
- }
77
- } else {
72
+ applyDamage (splashTarget , weapon .damageType , weapon .damageShifted / 2 , weapon .hits );
73
+ } else if (distanceSquared <= weapon .outerSplashRadiusSquared ) {
78
74
applyDamage (splashTarget , weapon .damageType , weapon .damageShifted / 4 , weapon .hits );
79
75
}
80
76
}
@@ -106,7 +102,7 @@ public static void dealLineSplashDamage(
106
102
+ weapon .innerSplashRadiusSquared ;
107
103
for (int i = enemies .size () - 1 ; i >= 0 ; i --) {
108
104
Agent enemy = enemies .get (i );
109
- if (enemy == mainTarget || enemy .burrowed || enemy . isFlyer != mainTarget .isFlyer ) {
105
+ if (enemy == mainTarget || enemy .isFlyer != mainTarget .isFlyer ) {
110
106
continue ;
111
107
}
112
108
int enemyDistSq = distanceSquared (enemy , source );
0 commit comments