From dbb164f4be06b2541f1c4a80948f468ac3fdaedb Mon Sep 17 00:00:00 2001 From: Anuken Date: Tue, 21 Aug 2018 14:21:00 -0400 Subject: [PATCH] Increased mech damage --- core/src/io/anuke/mindustry/content/AmmoTypes.java | 9 ++++++++- core/src/io/anuke/mindustry/content/Weapons.java | 4 ++-- .../mindustry/content/bullets/StandardBullets.java | 12 +++++++++++- core/src/io/anuke/mindustry/content/fx/BulletFx.java | 9 ++++++++- .../mindustry/entities/bullet/BasicBulletType.java | 1 + 5 files changed, 30 insertions(+), 5 deletions(-) diff --git a/core/src/io/anuke/mindustry/content/AmmoTypes.java b/core/src/io/anuke/mindustry/content/AmmoTypes.java index bf90b204b3..d256df29dd 100644 --- a/core/src/io/anuke/mindustry/content/AmmoTypes.java +++ b/core/src/io/anuke/mindustry/content/AmmoTypes.java @@ -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, + shotgunTungsten, bombExplosive, bombIncendiary, bombOil, shellCarbide, flamerThermite, weaponMissile, bulletMech, flakLead, flakExplosive, flakPlastic, flakSurge, missileExplosive, missileIncindiary, missileSurge, artilleryDense, artilleryPlastic, artilleryHoming, artilleryIncindiary, artilleryExplosive, basicFlame, lancerLaser, lightning, spectreLaser, meltdownLaser, fuseShotgun, oil, water, lava, cryofluid; @@ -21,6 +21,13 @@ public class AmmoTypes implements ContentList{ //weapon specific + bulletMech = new AmmoType(StandardBullets.mechSmall){{ + shootEffect = ShootFx.shootSmall; + smokeEffect = ShootFx.shootSmallSmoke; + reloadMultiplier = 1f; + inaccuracy = 5f; + }}; + shotgunTungsten = new AmmoType(WeaponBullets.tungstenShotgun){{ shootEffect = ShootFx.shootBig; smokeEffect = ShootFx.shootBigSmoke; diff --git a/core/src/io/anuke/mindustry/content/Weapons.java b/core/src/io/anuke/mindustry/content/Weapons.java index e07f8576a8..794ca6c149 100644 --- a/core/src/io/anuke/mindustry/content/Weapons.java +++ b/core/src/io/anuke/mindustry/content/Weapons.java @@ -16,10 +16,10 @@ public class Weapons implements ContentList{ blaster = new Weapon("blaster"){{ length = 1.5f; - reload = 15f; + reload = 14f; roundrobin = true; ejectEffect = ShootFx.shellEjectSmall; - ammo = AmmoTypes.bulletCopper; + ammo = AmmoTypes.bulletMech; }}; missiles = new Weapon("missiles"){{ diff --git a/core/src/io/anuke/mindustry/content/bullets/StandardBullets.java b/core/src/io/anuke/mindustry/content/bullets/StandardBullets.java index 84dfddb816..e45bfd4ecf 100644 --- a/core/src/io/anuke/mindustry/content/bullets/StandardBullets.java +++ b/core/src/io/anuke/mindustry/content/bullets/StandardBullets.java @@ -1,12 +1,13 @@ package io.anuke.mindustry.content.bullets; +import io.anuke.mindustry.content.fx.BulletFx; import io.anuke.mindustry.entities.bullet.BasicBulletType; import io.anuke.mindustry.entities.bullet.BulletType; import io.anuke.mindustry.graphics.Palette; import io.anuke.mindustry.type.ContentList; public class StandardBullets extends BulletList implements ContentList{ - public static BulletType copper, dense, thorium, homing, tracer; + public static BulletType copper, dense, thorium, homing, tracer, mechSmall; @Override public void load(){ @@ -53,5 +54,14 @@ public class StandardBullets extends BulletList implements ContentList{ incendChance = 0.3f; } }; + + mechSmall = new BasicBulletType(4f, 9, "bullet"){ + { + bulletWidth = 11f; + bulletHeight = 14f; + lifetime = 40f; + despawneffect = BulletFx.hitBulletSmall; + } + }; } } diff --git a/core/src/io/anuke/mindustry/content/fx/BulletFx.java b/core/src/io/anuke/mindustry/content/fx/BulletFx.java index 73a53a6c70..8c612c857c 100644 --- a/core/src/io/anuke/mindustry/content/fx/BulletFx.java +++ b/core/src/io/anuke/mindustry/content/fx/BulletFx.java @@ -19,9 +19,16 @@ public class BulletFx extends FxList implements ContentList{ hitBulletSmall = new Effect(14, e -> { Draw.color(Color.WHITE, Palette.lightOrange, e.fin()); + + e.scaled(7f, s -> { + Lines.stroke(0.5f + s.fout()); + Lines.circle(e.x, e.y, s.fin()*5f); + }); + + Lines.stroke(0.5f + e.fout()); - Angles.randLenVectors(e.id, 5, e.fin() * 15f, e.rotation, 50f, (x, y) -> { + Angles.randLenVectors(e.id, 5, e.fin() * 15f, (x, y) -> { float ang = Mathf.atan2(x, y); Lines.lineAngle(e.x + x, e.y + y, ang, e.fout() * 3 + 1f); }); diff --git a/core/src/io/anuke/mindustry/entities/bullet/BasicBulletType.java b/core/src/io/anuke/mindustry/entities/bullet/BasicBulletType.java index d5d1455eb0..f87d017812 100644 --- a/core/src/io/anuke/mindustry/entities/bullet/BasicBulletType.java +++ b/core/src/io/anuke/mindustry/entities/bullet/BasicBulletType.java @@ -102,6 +102,7 @@ public class BasicBulletType extends BulletType{ @Override public void despawned(Bullet b){ + super.despawned(b); if(fragBullet != null || splashDamageRadius > 0){ hit(b); }