Increased mech damage

This commit is contained in:
Anuken
2018-08-21 14:21:00 -04:00
parent 0003a58210
commit dbb164f4be
5 changed files with 30 additions and 5 deletions
@@ -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;
@@ -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"){{
@@ -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;
}
};
}
}
@@ -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);
});
@@ -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);
}