From 5e5df8848dff7608e06e55edc49702cac252fc8a Mon Sep 17 00:00:00 2001 From: Anuken Date: Wed, 11 Aug 2021 09:27:06 -0400 Subject: [PATCH] Ammo rebalancing / Possible crash fix --- core/src/mindustry/content/Blocks.java | 2 +- core/src/mindustry/content/Bullets.java | 23 ++++++++++++++----- core/src/mindustry/content/Fx.java | 10 ++++++++ core/src/mindustry/content/StatusEffects.java | 2 +- core/src/mindustry/content/UnitTypes.java | 2 +- core/src/mindustry/graphics/Pixelator.java | 7 ++++-- 6 files changed, 35 insertions(+), 11 deletions(-) diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index e890c43bde..e307848cc6 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -1853,7 +1853,7 @@ public class Blocks implements ContentList{ loopSound = Sounds.beam; loopSoundVolume = 2f; - shootType = new ContinuousLaserBulletType(75){{ + shootType = new ContinuousLaserBulletType(78){{ length = 200f; hitEffect = Fx.hitMeltdown; hitColor = Pal.meltdownHit; diff --git a/core/src/mindustry/content/Bullets.java b/core/src/mindustry/content/Bullets.java index ee7d7574ed..d04f78d622 100644 --- a/core/src/mindustry/content/Bullets.java +++ b/core/src/mindustry/content/Bullets.java @@ -3,6 +3,7 @@ package mindustry.content; import arc.graphics.*; import mindustry.ctype.*; import mindustry.entities.bullet.*; +import mindustry.entities.effect.*; import mindustry.graphics.*; public class Bullets implements ContentList{ @@ -110,6 +111,7 @@ public class Bullets implements ContentList{ backColor = Pal.lightOrange; makeFire = true; trailEffect = Fx.incendTrail; + ammoMultiplier = 4f; }}; artilleryExplosive = new ArtilleryBulletType(2f, 20, "shell"){{ @@ -120,7 +122,7 @@ public class Bullets implements ContentList{ collidesTiles = false; ammoMultiplier = 4f; splashDamageRadius = 45f * 0.75f; - splashDamage = 50f; + splashDamage = 55f; backColor = Pal.missileYellowBack; frontColor = Pal.missileYellow; @@ -317,20 +319,26 @@ public class Bullets implements ContentList{ standardHoming = new BasicBulletType(3f, 12, "bullet"){{ width = 7f; height = 9f; - homingPower = 0.08f; + homingPower = 0.1f; reloadMultiplier = 1.5f; ammoMultiplier = 5; lifetime = 60f; }}; - standardIncendiary = new BasicBulletType(3.2f, 11, "bullet"){{ + standardIncendiary = new BasicBulletType(3.2f, 16, "bullet"){{ width = 10f; height = 12f; frontColor = Pal.lightishOrange; backColor = Pal.lightOrange; status = StatusEffects.burning; + hitEffect = new MultiEffect(Fx.hitBulletSmall, Fx.fireHit); + + ammoMultiplier = 5; + + splashDamage = 10f; + splashDamageRadius = 22f; + makeFire = true; - inaccuracy = 3f; lifetime = 60f; }}; @@ -361,12 +369,15 @@ public class Bullets implements ContentList{ frontColor = Pal.lightishOrange; backColor = Pal.lightOrange; status = StatusEffects.burning; + hitEffect = new MultiEffect(Fx.hitBulletSmall, Fx.fireHit); shootEffect = Fx.shootBig; makeFire = true; pierceCap = 2; pierceBuilding = true; - knockback = 0.7f; + knockback = 0.6f; ammoMultiplier = 3; + splashDamage = 15f; + splashDamageRadius = 24f; }}; fireball = new FireBulletType(1f, 4); @@ -386,7 +397,7 @@ public class Bullets implements ContentList{ hittable = false; }}; - pyraFlame = new BulletType(4f, 55f){{ + pyraFlame = new BulletType(4f, 60f){{ ammoMultiplier = 6f; hitSize = 7f; lifetime = 18f; diff --git a/core/src/mindustry/content/Fx.java b/core/src/mindustry/content/Fx.java index d89e93f0d9..10c64ac923 100644 --- a/core/src/mindustry/content/Fx.java +++ b/core/src/mindustry/content/Fx.java @@ -880,6 +880,16 @@ public class Fx{ Drawf.light(Team.derelict, e.x, e.y, 20f * e.fslope(), Pal.lightFlame, 0.5f); }), + fireHit = new Effect(35f, e -> { + color(Pal.lightFlame, Pal.darkFlame, e.fin()); + + randLenVectors(e.id, 3, 2f + e.fin() * 10f, (x, y) -> { + Fill.circle(e.x + x, e.y + y, 0.2f + e.fout() * 1.6f); + }); + + color(); + }), + fireSmoke = new Effect(35f, e -> { color(Color.gray); diff --git a/core/src/mindustry/content/StatusEffects.java b/core/src/mindustry/content/StatusEffects.java index 793c5e3e42..8a43965754 100644 --- a/core/src/mindustry/content/StatusEffects.java +++ b/core/src/mindustry/content/StatusEffects.java @@ -21,7 +21,7 @@ public class StatusEffects implements ContentList{ burning = new StatusEffect("burning"){{ color = Color.valueOf("ffc455"); - damage = 0.12f; //over 8 seconds, this would be ~60 damage + damage = 0.167f; effect = Fx.burning; transitionDamage = 8f; diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index cbf721be16..bec005710a 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -1137,7 +1137,7 @@ public class UnitTypes implements ContentList{ hitSize = 58f; destructibleWreck = false; armor = 13f; - targetFlags = new BlockFlag[]{BlockFlag.reactor, BlockFlag.core, null}; + targetFlags = new BlockFlag[]{BlockFlag.reactor, BlockFlag.battery, BlockFlag.core, null}; ammoType = new ItemAmmoType(Items.thorium); BulletType fragBullet = new FlakBulletType(4f, 5){{ diff --git a/core/src/mindustry/graphics/Pixelator.java b/core/src/mindustry/graphics/Pixelator.java index 5bce6721e3..7d40dc8ff5 100644 --- a/core/src/mindustry/graphics/Pixelator.java +++ b/core/src/mindustry/graphics/Pixelator.java @@ -30,8 +30,11 @@ public class Pixelator implements Disposable{ py = Core.camera.position.y; Core.camera.position.set((int)px + ((int)(camera.width) % 2 == 0 ? 0 : 0.5f), (int)py + ((int)(camera.height) % 2 == 0 ? 0 : 0.5f)); - int w = (int)(Core.camera.width * renderer.landScale()); - int h = (int)(Core.camera.height * renderer.landScale()); + int w = (int)Core.camera.width, h = (int)Core.camera.height; + if(renderer.isCutscene()){ + w = (int)(Core.camera.width * renderer.landScale() / renderer.getScale()); + h = (int)(Core.camera.height * renderer.landScale() / renderer.getScale()); + } buffer.resize(w, h);