Flux speed buff / Server drowning / Delta buff

This commit is contained in:
Anuken
2018-09-04 19:02:40 -04:00
parent 7b90544d91
commit baa7cb3a10
10 changed files with 30 additions and 11 deletions
@@ -11,7 +11,7 @@ import io.anuke.mindustry.type.ContentList;
public class AmmoTypes implements ContentList{
public static AmmoType bulletCopper, bulletDense, bulletThorium, bulletSilicon, bulletPyratite,
shotgunTungsten, bombExplosive, bombIncendiary, bombOil, shellCarbide, flamerThermite, weaponMissile, weaponMissileSwarm, bulletMech,
shock, bombExplosive, bombIncendiary, bombOil, shellCarbide, flamerThermite, weaponMissile, weaponMissileSwarm, bulletMech,
healBlaster, bulletGlaive,
flakExplosive, flakPlastic, flakSurge,
missileExplosive, missileIncindiary, missileSurge,
@@ -43,7 +43,7 @@ public class AmmoTypes implements ContentList{
inaccuracy = 2f;
}};
shotgunTungsten = new AmmoType(TurretBullets.lightning){{
shock = new AmmoType(TurretBullets.lightning){{
shootEffect = BulletFx.hitLancer;
smokeEffect = Fx.none;
}};
@@ -107,7 +107,7 @@ public class Mechs implements ContentList{
if(player.altHeat >= 0.91f){
Effects.shake(3f, 3f, player);
for(int i = 0; i < 8; i++){
Timers.run(Mathf.random(5f), () -> Lightning.create(player.getTeam(), BulletFx.hitLancer, player.getTeam().color, 10f, player.x, player.y, Mathf.random(360f), 20));
Timers.run(Mathf.random(5f), () -> Lightning.create(player.getTeam(), BulletFx.hitLancer, player.getTeam().color, 15f, player.x, player.y, Mathf.random(360f), 20));
}
player.altHeat = 0f;
}
@@ -96,7 +96,7 @@ public class Weapons implements ContentList{
inaccuracy = 0f;
velocityRnd = 0.2f;
ejectEffect = Fx.none;
ammo = AmmoTypes.shotgunTungsten;
ammo = AmmoTypes.shock;
}};
flakgun = new Weapon("flakgun"){{
@@ -229,7 +229,7 @@ public class TurretBullets extends BulletList implements ContentList{
statusIntensity = 0.5f;
}
};
lightning = new BulletType(0.001f, 10){
lightning = new BulletType(0.001f, 14){
{
lifetime = 1;
despawneffect = Fx.none;
@@ -302,7 +302,7 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra
}
if(floor.isLiquid){
Draw.tint(Color.WHITE, floor.liquidColor, drownTime);
Draw.tint(Color.WHITE, floor.liquidColor, Mathf.clamp(drownTime));
}else{
Draw.tint(Color.WHITE);
}
@@ -461,6 +461,7 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra
interpolate();
updateBuilding(this); //building happens even with non-locals
status.update(this); //status effect updating also happens with non locals for effect purposes
updateVelocityStatus(mech.drag, mech.maxSpeed); //velocity too, for visual purposes
if(getCarrier() != null){
x = getCarrier().getX();
@@ -259,7 +259,7 @@ public abstract class Unit extends DestructibleEntity implements SaveTrait, Targ
drownTime = Mathf.clamp(drownTime);
if(drownTime >= 1f){
if(drownTime >= 0.999f){
damage(health + 1);
}
@@ -87,7 +87,7 @@ public class Lightning extends TimedEntity implements Poolable, DrawTrait, SyncT
if(checkShield(team, x2, y2)) break;
float fangle = angle;
angle += Mathf.range(30f);
angle += Mathf.range(15f);
rect.setSize(attractRange).setCenter(x, y);
Units.getNearbyEnemies(team, rect, entity -> {
@@ -31,6 +31,7 @@ public class PowerSmelter extends PowerBlock{
protected float minFlux = 0.2f;
protected int fluxNeeded = 1;
protected float fluxSpeedMult = 0.75f;
protected float baseFluxChance = 0.25f;
protected boolean useFlux = false;
@@ -111,9 +112,17 @@ public class PowerSmelter extends PowerBlock{
return;
}
float baseSmeltSpeed = 1f;
for(Item item : Item.all()){
if(item.fluxiness >= minFlux && tile.entity.items.get(item) > 0){
baseSmeltSpeed = fluxSpeedMult;
break;
}
}
if(entity.items.get(result) >= itemCapacity //output full
|| entity.heat <= minHeat //not burning
|| !entity.timer.get(timerCraft, craftTime)){ //not yet time
|| !entity.timer.get(timerCraft, craftTime*baseSmeltSpeed)){ //not yet time
return;
}
@@ -27,6 +27,7 @@ public class Smelter extends Block{
protected Item result;
protected float minFlux = 0.2f;
protected float fluxSpeedMult = 0.75f;
protected float baseFluxChance = 0.25f;
protected boolean useFlux = false;
@@ -107,9 +108,17 @@ public class Smelter extends Block{
return;
}
float baseSmeltSpeed = 1f;
for(Item item : Item.all()){
if(item.fluxiness >= minFlux && tile.entity.items.get(item) > 0){
baseSmeltSpeed = fluxSpeedMult;
break;
}
}
if(entity.items.get(result) >= itemCapacity //output full
|| entity.burnTime <= 0 //not burning
|| !entity.timer.get(timerCraft, craftTime)){ //not yet time
|| !entity.timer.get(timerCraft, craftTime*baseSmeltSpeed)){ //not yet time
return;
}