Bugfixes, balancing

This commit is contained in:
Anuken
2020-08-20 23:36:27 -04:00
parent 48d1c2038e
commit 28d2243abc
6 changed files with 25 additions and 19 deletions

View File

@@ -1502,8 +1502,8 @@ public class Blocks implements ContentList{
hasPower = true; hasPower = true;
size = 2; size = 2;
force = 2.5f; force = 3f;
scaledForce = 5f; scaledForce = 5.5f;
range = 170f; range = 170f;
damage = 0.08f; damage = 0.08f;
health = 160 * size * size; health = 160 * size * size;

View File

@@ -165,7 +165,7 @@ public class UnitTypes implements ContentList{
boostMultiplier = 1.5f; boostMultiplier = 1.5f;
speed = 0.48f; speed = 0.48f;
hitsize = 10f; hitsize = 10f;
health = 300f; health = 320f;
buildSpeed = 0.9f; buildSpeed = 0.9f;
armor = 4f; armor = 4f;
@@ -173,7 +173,7 @@ public class UnitTypes implements ContentList{
mineSpeed = 5f; mineSpeed = 5f;
commandLimit = 8; commandLimit = 8;
abilities.add(new ShieldFieldAbility(15f, 30f, 60f * 5, 60f)); abilities.add(new ShieldFieldAbility(20f, 40f, 60f * 5, 60f));
weapons.add(new Weapon("heal-shotgun-weapon"){{ weapons.add(new Weapon("heal-shotgun-weapon"){{
x = 5f; x = 5f;
@@ -193,7 +193,7 @@ public class UnitTypes implements ContentList{
bullet = new LightningBulletType(){{ bullet = new LightningBulletType(){{
lightningColor = hitColor = Pal.heal; lightningColor = hitColor = Pal.heal;
damage = 12f; damage = 15f;
lightningLength = 7; lightningLength = 7;
lightningLengthRand = 7; lightningLengthRand = 7;
shootEffect = Fx.shootHeal; shootEffect = Fx.shootHeal;
@@ -206,7 +206,7 @@ public class UnitTypes implements ContentList{
hitsize = 12f; hitsize = 12f;
boostMultiplier = 2f; boostMultiplier = 2f;
itemCapacity = 80; itemCapacity = 80;
health = 640f; health = 650f;
buildSpeed = 1.7f; buildSpeed = 1.7f;
canBoost = true; canBoost = true;
armor = 9f; armor = 9f;
@@ -219,7 +219,7 @@ public class UnitTypes implements ContentList{
mineSpeed = 7f; mineSpeed = 7f;
drawShields = false; drawShields = false;
abilities.add(new ForceFieldAbility(60f, 0.12f, 200f, 60f * 8)); abilities.add(new ForceFieldAbility(60f, 0.2f, 300f, 60f * 7));
weapons.add(new Weapon("beam-weapon"){{ weapons.add(new Weapon("beam-weapon"){{
shake = 2f; shake = 2f;
@@ -230,7 +230,7 @@ public class UnitTypes implements ContentList{
shootSound = Sounds.laser; shootSound = Sounds.laser;
bullet = new LaserBulletType(){{ bullet = new LaserBulletType(){{
damage = 27f; damage = 30f;
recoil = 1f; recoil = 1f;
sideAngle = 45f; sideAngle = 45f;
sideWidth = 1f; sideWidth = 1f;
@@ -316,7 +316,7 @@ public class UnitTypes implements ContentList{
drag = 0.4f; drag = 0.4f;
hitsize = 12f; hitsize = 12f;
rotateSpeed = 3f; rotateSpeed = 3f;
health = 600; health = 760;
immunities = ObjectSet.with(StatusEffects.burning, StatusEffects.melting); immunities = ObjectSet.with(StatusEffects.burning, StatusEffects.melting);
legCount = 6; legCount = 6;
legLength = 13f; legLength = 13f;
@@ -352,7 +352,7 @@ public class UnitTypes implements ContentList{
despawnEffect = Fx.none; despawnEffect = Fx.none;
width = 0.54f; width = 0.54f;
lifetime = 35f; lifetime = 35f;
knockback = -1.2f; knockback = -1.24f;
}}; }};
}}); }});
@@ -365,13 +365,13 @@ public class UnitTypes implements ContentList{
bullet = new SapBulletType(){{ bullet = new SapBulletType(){{
sapStrength = 0.65f; sapStrength = 0.65f;
length = 40f; length = 40f;
damage = 12; damage = 13;
shootEffect = Fx.shootSmall; shootEffect = Fx.shootSmall;
hitColor = color = Color.valueOf("bf92f9"); hitColor = color = Color.valueOf("bf92f9");
despawnEffect = Fx.none; despawnEffect = Fx.none;
width = 0.4f; width = 0.4f;
lifetime = 25f; lifetime = 25f;
knockback = -0.6f; knockback = -0.65f;
}}; }};
}}); }});
}}; }};
@@ -395,6 +395,7 @@ public class UnitTypes implements ContentList{
legLengthScl = 1f; legLengthScl = 1f;
rippleScale = 2f; rippleScale = 2f;
legSpeed = 0.2f; legSpeed = 0.2f;
legSplashDamage = 32; legSplashDamage = 32;
legSplashRange = 30; legSplashRange = 30;

View File

@@ -35,7 +35,7 @@ import static mindustry.Vars.*;
public class NetServer implements ApplicationListener{ public class NetServer implements ApplicationListener{
private static final int maxSnapshotSize = 430, timerBlockSync = 0; private static final int maxSnapshotSize = 430, timerBlockSync = 0;
private static final float serverSyncTime = 12, blockSyncTime = 60 * 8; private static final float serverSyncTime = 12, blockSyncTime = 60 * 6;
private static final FloatBuffer fbuffer = FloatBuffer.allocate(20); private static final FloatBuffer fbuffer = FloatBuffer.allocate(20);
private static final Vec2 vector = new Vec2(); private static final Vec2 vector = new Vec2();
private static final Rect viewport = new Rect(); private static final Rect viewport = new Rect();
@@ -612,12 +612,12 @@ public class NetServer implements ApplicationListener{
if(!player.dead()){ if(!player.dead()){
Unit unit = player.unit(); Unit unit = player.unit();
unit.vel.set(xVelocity, yVelocity).limit(unit.type().speed);
long elapsed = Time.timeSinceMillis(con.lastReceivedClientTime); long elapsed = Time.timeSinceMillis(con.lastReceivedClientTime);
float maxSpeed = (boosting ? player.unit().type().boostMultiplier : 1f) * player.unit().type().speed; float maxSpeed = (boosting ? player.unit().type().boostMultiplier : 1f) * player.unit().type().speed;
if(unit.isGrounded()){ if(unit.isGrounded()){
maxSpeed *= unit.floorSpeedMultiplier(); maxSpeed *= unit.floorSpeedMultiplier();
} }
unit.vel.set(xVelocity, yVelocity).limit(maxSpeed);
float maxMove = elapsed / 1000f * 60f * maxSpeed * 1.1f; float maxMove = elapsed / 1000f * 60f * maxSpeed * 1.1f;
if(con.lastUnit != unit){ if(con.lastUnit != unit){

View File

@@ -23,6 +23,7 @@ public class ForceFieldAbility implements Ability{
private float realRad; private float realRad;
private Unit paramUnit; private Unit paramUnit;
private boolean hadShield;
private final Cons<Shielderc> shieldConsumer = trait -> { private final Cons<Shielderc> shieldConsumer = trait -> {
if(trait.team() != paramUnit.team && Intersector.isInsideHexagon(paramUnit.x, paramUnit.y, realRad * 2f, trait.x(), trait.y()) && paramUnit.shield > 0){ if(trait.team() != paramUnit.team && Intersector.isInsideHexagon(paramUnit.x, paramUnit.y, realRad * 2f, trait.x(), trait.y()) && paramUnit.shield > 0){
trait.absorb(); trait.absorb();
@@ -31,7 +32,6 @@ public class ForceFieldAbility implements Ability{
//break shield //break shield
if(paramUnit.shield <= trait.damage()){ if(paramUnit.shield <= trait.damage()){
paramUnit.shield -= cooldown * regen; paramUnit.shield -= cooldown * regen;
Fx.shieldBreak.at(paramUnit.x, paramUnit.y, radius, paramUnit.team.color);
} }
paramUnit.shield -= trait.damage(); paramUnit.shield -= trait.damage();
@@ -54,6 +54,13 @@ public class ForceFieldAbility implements Ability{
unit.shield += Time.delta * regen; unit.shield += Time.delta * regen;
} }
//break effect
if(hadShield && unit.shield <= 0){
Fx.shieldBreak.at(paramUnit.x, paramUnit.y, radius, paramUnit.team.color);
}
hadShield = unit.shield > 0;
if(unit.shield > 0){ if(unit.shield > 0){
unit.timer2 = Mathf.lerpDelta(unit.timer2, 1f, 0.06f); unit.timer2 = Mathf.lerpDelta(unit.timer2, 1f, 0.06f);
paramUnit = unit; paramUnit = unit;

View File

@@ -113,7 +113,8 @@ abstract class WeaponsComp implements Teamc, Posc, Rotc, Velc{
can && //must be able to shoot can && //must be able to shoot
(ammo > 0 || !state.rules.unitAmmo || team().rules().infiniteAmmo) && //check ammo (ammo > 0 || !state.rules.unitAmmo || team().rules().infiniteAmmo) && //check ammo
(!weapon.alternate || mount.side == weapon.flipSprite) && (!weapon.alternate || mount.side == weapon.flipSprite) &&
vel.len() >= mount.weapon.minShootVelocity && //check velocity requirements //TODO checking for velocity this way isn't entirely correct
(vel.len() >= mount.weapon.minShootVelocity || (net.active() && !isLocal())) && //check velocity requirements
mount.reload <= 0.0001f && //reload has to be 0 mount.reload <= 0.0001f && //reload has to be 0
Angles.within(weapon.rotate ? mount.rotation : this.rotation, mount.targetRotation, mount.weapon.shootCone) //has to be within the cone Angles.within(weapon.rotate ? mount.rotation : this.rotation, mount.targetRotation, mount.weapon.shootCone) //has to be within the cone
){ ){

View File

@@ -7,7 +7,6 @@ import mindustry.*;
import mindustry.gen.*; import mindustry.gen.*;
import mindustry.graphics.*; import mindustry.graphics.*;
import mindustry.ui.*; import mindustry.ui.*;
import mindustry.world.blocks.environment.*;
public class UnitPayload implements Payload{ public class UnitPayload implements Payload{
public Unit unit; public Unit unit;
@@ -41,8 +40,6 @@ public class UnitPayload implements Payload{
@Override @Override
public boolean dump(){ public boolean dump(){
Floor floor = unit.floorOn();
//no client dumping //no client dumping
if(Vars.net.client()) return true; if(Vars.net.client()) return true;