diff --git a/core/src/io/anuke/mindustry/content/AmmoTypes.java b/core/src/io/anuke/mindustry/content/AmmoTypes.java index 9bb46b8cb6..79aabc0d53 100644 --- a/core/src/io/anuke/mindustry/content/AmmoTypes.java +++ b/core/src/io/anuke/mindustry/content/AmmoTypes.java @@ -36,10 +36,9 @@ public class AmmoTypes implements ContentList{ inaccuracy = 2f; }}; - shotgunTungsten = new AmmoType(WeaponBullets.tungstenShotgun){{ - shootEffect = ShootFx.shootBig; - smokeEffect = ShootFx.shootBigSmoke; - recoil = 1f; + shotgunTungsten = new AmmoType(TurretBullets.lightning){{ + shootEffect = BulletFx.hitLancer; + smokeEffect = Fx.none; }}; shellCarbide = new AmmoType(WeaponBullets.shellCarbide){{ diff --git a/core/src/io/anuke/mindustry/content/Mechs.java b/core/src/io/anuke/mindustry/content/Mechs.java index f99b3bcae7..86ffde48cd 100644 --- a/core/src/io/anuke/mindustry/content/Mechs.java +++ b/core/src/io/anuke/mindustry/content/Mechs.java @@ -4,11 +4,13 @@ import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.g2d.TextureRegion; import com.badlogic.gdx.math.Rectangle; import com.badlogic.gdx.utils.Array; +import io.anuke.mindustry.content.fx.BulletFx; import io.anuke.mindustry.content.fx.UnitFx; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.Unit; import io.anuke.mindustry.entities.Units; import io.anuke.mindustry.entities.effect.Fire; +import io.anuke.mindustry.entities.effect.Lightning; import io.anuke.mindustry.game.Content; import io.anuke.mindustry.graphics.Palette; import io.anuke.mindustry.graphics.Shaders; @@ -57,13 +59,17 @@ public class Mechs implements ContentList{ weapon = Weapons.shockgun; trailColorTo = Color.valueOf("d3ddff"); maxSpeed = 5f; - altChargeAlpha = 0.05f; + altChargeAlpha = 0.03f; } @Override public void updateAlt(Player player){ - if(player.altHeat > 0.01f){ - player.applyEffect(StatusEffects.overdrive, 0.1f); + 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)); + } + player.altHeat = 0f; } } diff --git a/core/src/io/anuke/mindustry/content/Weapons.java b/core/src/io/anuke/mindustry/content/Weapons.java index 64728a4094..fcc668c986 100644 --- a/core/src/io/anuke/mindustry/content/Weapons.java +++ b/core/src/io/anuke/mindustry/content/Weapons.java @@ -65,13 +65,12 @@ public class Weapons implements ContentList{ shockgun = new Weapon("shockgun"){{ length = 1f; - reload = 50f; + reload = 40f; roundrobin = true; - shots = 6; - inaccuracy = 10f; - velocityRnd = 0.7f; - shake = 2f; - ejectEffect = ShootFx.shellEjectSmall; + shots = 1; + inaccuracy = 0f; + velocityRnd = 0.2f; + ejectEffect = Fx.none; ammo = AmmoTypes.shotgunTungsten; }}; diff --git a/core/src/io/anuke/mindustry/content/bullets/TurretBullets.java b/core/src/io/anuke/mindustry/content/bullets/TurretBullets.java index 352a726274..35f1f53cb0 100644 --- a/core/src/io/anuke/mindustry/content/bullets/TurretBullets.java +++ b/core/src/io/anuke/mindustry/content/bullets/TurretBullets.java @@ -35,7 +35,7 @@ public class TurretBullets extends BulletList implements ContentList{ @Override public void load(){ - healBullet = new BulletType(5.2f, 25){ + healBullet = new BulletType(5.2f, 19){ float healAmount = 20f; { diff --git a/core/src/io/anuke/mindustry/core/ContentLoader.java b/core/src/io/anuke/mindustry/core/ContentLoader.java index ba117646e5..e28b68f943 100644 --- a/core/src/io/anuke/mindustry/core/ContentLoader.java +++ b/core/src/io/anuke/mindustry/core/ContentLoader.java @@ -13,7 +13,6 @@ import io.anuke.mindustry.entities.bullet.Bullet; import io.anuke.mindustry.entities.bullet.BulletType; import io.anuke.mindustry.entities.effect.Fire; import io.anuke.mindustry.entities.effect.ItemDrop; -import io.anuke.mindustry.entities.effect.Lightning; import io.anuke.mindustry.entities.effect.Puddle; import io.anuke.mindustry.entities.traits.TypeTrait; import io.anuke.mindustry.entities.units.UnitType; @@ -171,6 +170,5 @@ public class ContentLoader{ TypeTrait.registerType(Fire.class, Fire::new); TypeTrait.registerType(Puddle.class, Puddle::new); TypeTrait.registerType(Bullet.class, Bullet::new); - TypeTrait.registerType(Lightning.class, Lightning::new); } } diff --git a/core/src/io/anuke/mindustry/entities/effect/Lightning.java b/core/src/io/anuke/mindustry/entities/effect/Lightning.java index 6642238948..07e46c6350 100644 --- a/core/src/io/anuke/mindustry/entities/effect/Lightning.java +++ b/core/src/io/anuke/mindustry/entities/effect/Lightning.java @@ -9,7 +9,6 @@ import io.anuke.annotations.Annotations.Loc; import io.anuke.annotations.Annotations.Remote; import io.anuke.mindustry.content.StatusEffects; import io.anuke.mindustry.entities.Units; -import io.anuke.mindustry.entities.traits.SyncTrait; import io.anuke.mindustry.game.Team; import io.anuke.mindustry.gen.Call; import io.anuke.mindustry.graphics.Palette; @@ -26,14 +25,10 @@ import io.anuke.ucore.util.Mathf; import io.anuke.ucore.util.Pooling; import io.anuke.ucore.util.SeedRandom; -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - import static io.anuke.mindustry.Vars.bulletGroup; //TODO utterly broken -public class Lightning extends TimedEntity implements Poolable, DrawTrait, SyncTrait{ +public class Lightning extends TimedEntity implements Poolable, DrawTrait{ private static Array entities = new Array<>(); private static Rectangle rect = new Rectangle(); private static Rectangle hitrect = new Rectangle(); @@ -67,7 +62,7 @@ public class Lightning extends TimedEntity implements Poolable, DrawTrait, SyncT l.random.setSeed(seed); l.color = color; - float step = 3f; + float step = 4f; float range = 6f; float attractRange = 20f; @@ -111,7 +106,7 @@ public class Lightning extends TimedEntity implements Poolable, DrawTrait, SyncT }); if(l.random.chance(0.1f)){ - createLighting(l.random.nextInt(), team, effect, color, damage, x2, y2, angle + l.random.range(100f), length / 3); + createLighting(l.random.nextInt(), team, effect, color, damage, x2, y2, angle + l.random.range(30f), length / 3); } x = x2; @@ -122,21 +117,6 @@ public class Lightning extends TimedEntity implements Poolable, DrawTrait, SyncT l.add(); } - @Override - public boolean isSyncing(){ - return false; - } - - @Override - public void write(DataOutput data) throws IOException{ - - } - - @Override - public void read(DataInput data, long time) throws IOException{ - - } - @Override public float lifetime(){ return 10; @@ -144,12 +124,14 @@ public class Lightning extends TimedEntity implements Poolable, DrawTrait, SyncT @Override public void reset(){ + super.reset(); color = Palette.lancerLaser; lines.clear(); } @Override public void removed(){ + super.removed(); Pooling.free(this); } diff --git a/core/src/io/anuke/mindustry/world/blocks/BuildBlock.java b/core/src/io/anuke/mindustry/world/blocks/BuildBlock.java index 50aaec8919..d83c561df2 100644 --- a/core/src/io/anuke/mindustry/world/blocks/BuildBlock.java +++ b/core/src/io/anuke/mindustry/world/blocks/BuildBlock.java @@ -157,7 +157,7 @@ public class BuildBlock extends Block{ if(recipe != null){ Draw.rect(recipe.result.shadowRegion, tile.drawx(), tile.drawy()); - }else if(previous != null){ + }else if(previous != null && !(previous instanceof BuildBlock)){ previous.drawShadow(tile); } }