Ammo rebalancing / Possible crash fix

This commit is contained in:
Anuken
2021-08-11 09:27:06 -04:00
parent d3a15fba96
commit 5e5df8848d
6 changed files with 35 additions and 11 deletions

View File

@@ -1853,7 +1853,7 @@ public class Blocks implements ContentList{
loopSound = Sounds.beam; loopSound = Sounds.beam;
loopSoundVolume = 2f; loopSoundVolume = 2f;
shootType = new ContinuousLaserBulletType(75){{ shootType = new ContinuousLaserBulletType(78){{
length = 200f; length = 200f;
hitEffect = Fx.hitMeltdown; hitEffect = Fx.hitMeltdown;
hitColor = Pal.meltdownHit; hitColor = Pal.meltdownHit;

View File

@@ -3,6 +3,7 @@ package mindustry.content;
import arc.graphics.*; import arc.graphics.*;
import mindustry.ctype.*; import mindustry.ctype.*;
import mindustry.entities.bullet.*; import mindustry.entities.bullet.*;
import mindustry.entities.effect.*;
import mindustry.graphics.*; import mindustry.graphics.*;
public class Bullets implements ContentList{ public class Bullets implements ContentList{
@@ -110,6 +111,7 @@ public class Bullets implements ContentList{
backColor = Pal.lightOrange; backColor = Pal.lightOrange;
makeFire = true; makeFire = true;
trailEffect = Fx.incendTrail; trailEffect = Fx.incendTrail;
ammoMultiplier = 4f;
}}; }};
artilleryExplosive = new ArtilleryBulletType(2f, 20, "shell"){{ artilleryExplosive = new ArtilleryBulletType(2f, 20, "shell"){{
@@ -120,7 +122,7 @@ public class Bullets implements ContentList{
collidesTiles = false; collidesTiles = false;
ammoMultiplier = 4f; ammoMultiplier = 4f;
splashDamageRadius = 45f * 0.75f; splashDamageRadius = 45f * 0.75f;
splashDamage = 50f; splashDamage = 55f;
backColor = Pal.missileYellowBack; backColor = Pal.missileYellowBack;
frontColor = Pal.missileYellow; frontColor = Pal.missileYellow;
@@ -317,20 +319,26 @@ public class Bullets implements ContentList{
standardHoming = new BasicBulletType(3f, 12, "bullet"){{ standardHoming = new BasicBulletType(3f, 12, "bullet"){{
width = 7f; width = 7f;
height = 9f; height = 9f;
homingPower = 0.08f; homingPower = 0.1f;
reloadMultiplier = 1.5f; reloadMultiplier = 1.5f;
ammoMultiplier = 5; ammoMultiplier = 5;
lifetime = 60f; lifetime = 60f;
}}; }};
standardIncendiary = new BasicBulletType(3.2f, 11, "bullet"){{ standardIncendiary = new BasicBulletType(3.2f, 16, "bullet"){{
width = 10f; width = 10f;
height = 12f; height = 12f;
frontColor = Pal.lightishOrange; frontColor = Pal.lightishOrange;
backColor = Pal.lightOrange; backColor = Pal.lightOrange;
status = StatusEffects.burning; status = StatusEffects.burning;
hitEffect = new MultiEffect(Fx.hitBulletSmall, Fx.fireHit);
ammoMultiplier = 5;
splashDamage = 10f;
splashDamageRadius = 22f;
makeFire = true; makeFire = true;
inaccuracy = 3f;
lifetime = 60f; lifetime = 60f;
}}; }};
@@ -361,12 +369,15 @@ public class Bullets implements ContentList{
frontColor = Pal.lightishOrange; frontColor = Pal.lightishOrange;
backColor = Pal.lightOrange; backColor = Pal.lightOrange;
status = StatusEffects.burning; status = StatusEffects.burning;
hitEffect = new MultiEffect(Fx.hitBulletSmall, Fx.fireHit);
shootEffect = Fx.shootBig; shootEffect = Fx.shootBig;
makeFire = true; makeFire = true;
pierceCap = 2; pierceCap = 2;
pierceBuilding = true; pierceBuilding = true;
knockback = 0.7f; knockback = 0.6f;
ammoMultiplier = 3; ammoMultiplier = 3;
splashDamage = 15f;
splashDamageRadius = 24f;
}}; }};
fireball = new FireBulletType(1f, 4); fireball = new FireBulletType(1f, 4);
@@ -386,7 +397,7 @@ public class Bullets implements ContentList{
hittable = false; hittable = false;
}}; }};
pyraFlame = new BulletType(4f, 55f){{ pyraFlame = new BulletType(4f, 60f){{
ammoMultiplier = 6f; ammoMultiplier = 6f;
hitSize = 7f; hitSize = 7f;
lifetime = 18f; lifetime = 18f;

View File

@@ -880,6 +880,16 @@ public class Fx{
Drawf.light(Team.derelict, e.x, e.y, 20f * e.fslope(), Pal.lightFlame, 0.5f); 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 -> { fireSmoke = new Effect(35f, e -> {
color(Color.gray); color(Color.gray);

View File

@@ -21,7 +21,7 @@ public class StatusEffects implements ContentList{
burning = new StatusEffect("burning"){{ burning = new StatusEffect("burning"){{
color = Color.valueOf("ffc455"); color = Color.valueOf("ffc455");
damage = 0.12f; //over 8 seconds, this would be ~60 damage damage = 0.167f;
effect = Fx.burning; effect = Fx.burning;
transitionDamage = 8f; transitionDamage = 8f;

View File

@@ -1137,7 +1137,7 @@ public class UnitTypes implements ContentList{
hitSize = 58f; hitSize = 58f;
destructibleWreck = false; destructibleWreck = false;
armor = 13f; 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); ammoType = new ItemAmmoType(Items.thorium);
BulletType fragBullet = new FlakBulletType(4f, 5){{ BulletType fragBullet = new FlakBulletType(4f, 5){{

View File

@@ -30,8 +30,11 @@ public class Pixelator implements Disposable{
py = Core.camera.position.y; 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)); 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 w = (int)Core.camera.width, h = (int)Core.camera.height;
int h = (int)(Core.camera.height * renderer.landScale()); 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); buffer.resize(w, h);