Turret balance / Bugfixes

This commit is contained in:
Anuken
2019-06-09 12:04:45 -04:00
parent bd4d8efd78
commit 444b5dbd97
16 changed files with 78 additions and 62 deletions

View File

@@ -5,7 +5,11 @@ import io.anuke.arc.function.BooleanProvider;
import io.anuke.arc.graphics.Color;
import io.anuke.arc.graphics.g2d.*;
import io.anuke.arc.math.Mathf;
import io.anuke.arc.util.Tmp;
import io.anuke.mindustry.Vars;
import io.anuke.mindustry.entities.Damage;
import io.anuke.mindustry.entities.bullet.Bullet;
import io.anuke.mindustry.entities.bullet.BulletType;
import io.anuke.mindustry.game.ContentList;
import io.anuke.mindustry.graphics.*;
import io.anuke.mindustry.type.*;
@@ -1292,7 +1296,7 @@ public class Blocks implements ContentList{
Items.lead, Bullets.flakLead
);
reload = 18f;
range = 175f;
range = 170f;
size = 2;
burstSpacing = 5f;
shots = 2;
@@ -1408,11 +1412,11 @@ public class Blocks implements ContentList{
Items.pyratite, Bullets.missileIncendiary,
Items.surgealloy, Bullets.missileSurge
);
reload = 50f;
reload = 40f;
shots = 4;
burstSpacing = 5;
inaccuracy = 10f;
range = 140f;
range = 185f;
xRand = 6f;
size = 2;
health = 300 * size * size;
@@ -1442,6 +1446,58 @@ public class Blocks implements ContentList{
health = 360;
}};
fuse = new ItemTurret("fuse"){{
requirements(Category.turret, ItemStack.with(Items.copper, 450, Items.graphite, 450, Items.thorium, 200));
reload = 35f;
shootShake = 4f;
range = 95f;
recoil = 5f;
shots = 3;
spread = 20f;
restitution = 0.1f;
shootCone = 30;
size = 3;
health = 220 * size * size;
ammo(Items.graphite, new BulletType(0.01f, 105){
int rays = 1;
float rayLength = range + 10f;
{
hitEffect = Fx.hitLancer;
shootEffect = smokeEffect = Fx.lightningShoot;
lifetime = 10f;
despawnEffect = Fx.none;
pierce = true;
}
@Override
public void init(Bullet b){
for(int i = 0; i < rays; i++){
Damage.collideLine(b, b.getTeam(), hitEffect, b.x, b.y, b.rot(), rayLength - Math.abs(i - (rays / 2)) * 20f);
}
}
@Override
public void draw(Bullet b){
super.draw(b);
Draw.color(Color.WHITE, Pal.lancerLaser, b.fin());
//Draw.alpha(b.fout());
for(int i = 0; i < 7; i++){
Tmp.v1.trns(b.rot(), i * 8f);
float sl = Mathf.clamp(b.fout() - 0.5f) * (80f - i * 10);
Shapes.tri(b.x + Tmp.v1.x, b.y + Tmp.v1.y, 4f, sl, b.rot() + 90);
Shapes.tri(b.x + Tmp.v1.x, b.y + Tmp.v1.y, 4f, sl, b.rot() - 90);
}
Shapes.tri(b.x, b.y, 20f * b.fout(), (rayLength + 50), b.rot());
Shapes.tri(b.x, b.y, 20f * b.fout(), 10f, b.rot() + 180f);
Draw.reset();
}
});
}};
ripple = new ArtilleryTurret("ripple"){{
requirements(Category.turret, ItemStack.with(Items.copper, 300, Items.graphite, 270, Items.titanium, 120));
ammo(
@@ -1486,19 +1542,6 @@ public class Blocks implements ContentList{
health = 145 * size * size;
}};
fuse = new ItemTurret("fuse"){{
requirements(Category.turret, ItemStack.with(Items.copper, 450, Items.graphite, 450, Items.surgealloy, 250));
ammo(Items.graphite, Bullets.fuseShot);
reload = 40f;
shootShake = 4f;
range = 110f;
recoil = 5f;
restitution = 0.1f;
size = 3;
health = 165 * size * size;
}};
spectre = new DoubleTurret("spectre"){{
requirements(Category.turret, ItemStack.with(Items.copper, 700, Items.graphite, 600, Items.surgealloy, 500, Items.plastanium, 350, Items.thorium, 500));
ammo(

View File

@@ -12,7 +12,6 @@ import io.anuke.mindustry.entities.effect.*;
import io.anuke.mindustry.entities.type.Unit;
import io.anuke.mindustry.game.ContentList;
import io.anuke.mindustry.graphics.Pal;
import io.anuke.mindustry.graphics.Shapes;
import io.anuke.mindustry.world.Tile;
import io.anuke.mindustry.world.blocks.BuildBlock;
@@ -41,7 +40,7 @@ public class Bullets implements ContentList{
waterShot, cryoShot, slagShot, oilShot,
//environment, misc.
fireball, basicFlame, pyraFlame, fuseShot, driverBolt, healBullet, frag, eruptorShot,
fireball, basicFlame, pyraFlame, driverBolt, healBullet, frag, eruptorShot,
//bombs
bombExplosive, bombIncendiary, bombOil, explode;
@@ -142,7 +141,7 @@ public class Bullets implements ContentList{
bulletWidth = 6f;
bulletHeight = 8f;
hitEffect = Fx.flakExplosion;
splashDamage = 30f;
splashDamage = 27f;
splashDamageRadius = 15f;
}};
@@ -154,7 +153,7 @@ public class Bullets implements ContentList{
bulletWidth = 6f;
bulletHeight = 8f;
hitEffect = Fx.flakExplosion;
splashDamage = 24f;
splashDamage = 22f;
splashDamageRadius = 24f;
}};
@@ -180,7 +179,7 @@ public class Bullets implements ContentList{
shootEffect = Fx.shootBig;
}};
missileExplosive = new MissileBulletType(1.8f, 10, "missile"){{
missileExplosive = new MissileBulletType(2.7f, 10, "missile"){{
bulletWidth = 8f;
bulletHeight = 8f;
bulletShrink = 0f;
@@ -192,7 +191,7 @@ public class Bullets implements ContentList{
despawnEffect = Fx.blastExplosion;
}};
missileIncendiary = new MissileBulletType(2f, 12, "missile"){{
missileIncendiary = new MissileBulletType(2.9f, 12, "missile"){{
frontColor = Pal.lightishOrange;
backColor = Pal.lightOrange;
bulletWidth = 7f;
@@ -208,7 +207,7 @@ public class Bullets implements ContentList{
incendAmount = 3;
}};
missileSurge = new MissileBulletType(3.5f, 15, "bullet"){{
missileSurge = new MissileBulletType(4.4f, 15, "bullet"){{
bulletWidth = 8f;
bulletHeight = 8f;
bulletShrink = 0f;
@@ -577,42 +576,6 @@ public class Bullets implements ContentList{
}
};
fuseShot = new BulletType(0.01f, 70){
int rays = 3;
float rayLength = 120f;
{
hitEffect = Fx.hitFuse;
shootEffect = smokeEffect = Fx.none;
lifetime = 10f;
despawnEffect = Fx.none;
pierce = true;
}
@Override
public void init(Bullet b){
for(int i = 0; i < rays; i++){
Damage.collideLine(b, b.getTeam(), hitEffect, b.x, b.y, b.rot(), rayLength - Math.abs(i - (rays / 2)) * 20f);
}
}
@Override
public void draw(Bullet b){
super.draw(b);
Draw.color(Color.WHITE, Pal.surge, b.fin());
//Draw.alpha(b.fout());
for(int i = 0; i < 7; i++){
Tmp.v1.trns(b.rot(), i * 8f);
float sl = Mathf.clamp(b.fout() - 0.5f) * (80f - i * 10);
Shapes.tri(b.x + Tmp.v1.x, b.y + Tmp.v1.y, 4f, sl, b.rot() + 90);
Shapes.tri(b.x + Tmp.v1.x, b.y + Tmp.v1.y, 4f, sl, b.rot() - 90);
}
Shapes.tri(b.x, b.y, 20f * b.fout(), (rayLength + 50), b.rot());
Shapes.tri(b.x, b.y, 20f * b.fout(), 10f, b.rot() + 180f);
Draw.reset();
}
};
waterShot = new LiquidBulletType(Liquids.water){{
knockback = 0.7f;
}};