mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-09-22 13:01:12 +03:00
Fixed sap bullets being able to pierce shields + placeholder balance adjustment for Eclipse lasers
This commit is contained in:
@@ -1308,6 +1308,7 @@ public class UnitTypes{
|
|||||||
sideLength = 80f;
|
sideLength = 80f;
|
||||||
width = 25f;
|
width = 25f;
|
||||||
length = 230f;
|
length = 230f;
|
||||||
|
shieldDamageMultiplier = 2f;
|
||||||
shootEffect = Fx.shockwave;
|
shootEffect = Fx.shockwave;
|
||||||
colors = new Color[]{Color.valueOf("ec7458aa"), Color.valueOf("ff9c5a"), Color.white};
|
colors = new Color[]{Color.valueOf("ec7458aa"), Color.valueOf("ff9c5a"), Color.white};
|
||||||
}};
|
}};
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ public class BulletType extends Content implements Cloneable{
|
|||||||
/** For piercing lasers, setting this to true makes it get absorbed by plastanium walls. */
|
/** For piercing lasers, setting this to true makes it get absorbed by plastanium walls. */
|
||||||
public boolean laserAbsorb = true;
|
public boolean laserAbsorb = true;
|
||||||
/** Whether force shields absorb this bullet when it hits as a line, even if it isn't a laser. Used by rails. */
|
/** Whether force shields absorb this bullet when it hits as a line, even if it isn't a laser. Used by rails. */
|
||||||
public boolean shieldAbsorb = false;
|
public boolean shieldAbsorb = true;
|
||||||
/** Whether this bullet is considered a laser bullet and thus absorbed by plastanium walls. */
|
/** Whether this bullet is considered a laser bullet and thus absorbed by plastanium walls. */
|
||||||
public boolean laserBullet = false;
|
public boolean laserBullet = false;
|
||||||
/** Life fraction at which this bullet has the best range/damage/etc. Used for lasers and continuous turrets. */
|
/** Life fraction at which this bullet has the best range/damage/etc. Used for lasers and continuous turrets. */
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ public class PointLaserBulletType extends BulletType{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float shieldDamage(Bullet b){
|
public float shieldDamage(Bullet b){
|
||||||
return b.damage / damageInterval * Time.delta;
|
return b.damage / damageInterval * Time.delta * shieldDamageMultiplier;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ public class SapBulletType extends BulletType{
|
|||||||
lightOpacity = 0.6f;
|
lightOpacity = 0.6f;
|
||||||
statusDuration = 60f * 3f;
|
statusDuration = 60f * 3f;
|
||||||
impact = true;
|
impact = true;
|
||||||
|
shieldAbsorb = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -74,8 +75,10 @@ public class SapBulletType extends BulletType{
|
|||||||
super.init(b);
|
super.init(b);
|
||||||
|
|
||||||
float len = Mathf.random(length, length + lengthRand);
|
float len = Mathf.random(length, length + lengthRand);
|
||||||
|
len = Math.min(len, Damage.findShieldLength(b, len, false, true));
|
||||||
|
|
||||||
Healthc target = Damage.linecast(b, b.x, b.y, b.rotation(), len);
|
Healthc target = Damage.linecast(b, b.x, b.y, b.rotation(), len);
|
||||||
|
|
||||||
b.data = target;
|
b.data = target;
|
||||||
|
|
||||||
if(target != null){
|
if(target != null){
|
||||||
|
|||||||
Reference in New Issue
Block a user