Better splash damage handling for small radii
This commit is contained in:
@@ -138,7 +138,7 @@ public class UnitTypes implements ContentList{
|
|||||||
collides = true;
|
collides = true;
|
||||||
collidesTiles = true;
|
collidesTiles = true;
|
||||||
splashDamageRadius = 28f;
|
splashDamageRadius = 28f;
|
||||||
splashDamage = 54f;
|
splashDamage = 52f;
|
||||||
backColor = Pal.bulletYellowBack;
|
backColor = Pal.bulletYellowBack;
|
||||||
frontColor = Pal.bulletYellow;
|
frontColor = Pal.bulletYellow;
|
||||||
}};
|
}};
|
||||||
|
|||||||
@@ -363,8 +363,7 @@ public class Damage{
|
|||||||
|
|
||||||
if(ground){
|
if(ground){
|
||||||
if(!complete){
|
if(!complete){
|
||||||
//increase damage slightly to compensate for new algorithm
|
tileDamage(team, World.toTile(x), World.toTile(y), radius / tilesize, damage);
|
||||||
tileDamage(team, World.toTile(x), World.toTile(y), radius / tilesize, damage * 1.1f);
|
|
||||||
}else{
|
}else{
|
||||||
completeDamage(team, x, y, radius, damage);
|
completeDamage(team, x, y, radius, damage);
|
||||||
}
|
}
|
||||||
@@ -381,7 +380,7 @@ public class Damage{
|
|||||||
//this needs to be compensated
|
//this needs to be compensated
|
||||||
if(in != null && in.team != team && in.block.size > 1 && in.health > damage){
|
if(in != null && in.team != team && in.block.size > 1 && in.health > damage){
|
||||||
//deal the damage of an entire side + 1, to be equivalent with maximum 'standard' damage
|
//deal the damage of an entire side + 1, to be equivalent with maximum 'standard' damage
|
||||||
in.damage(damage * (in.block.size + 1));
|
in.damage(damage * Math.min((in.block.size + 1), baseRadius * 0.44f));
|
||||||
//no need to continue with the explosion
|
//no need to continue with the explosion
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user