Initial Toxopid implementation
BIN
core/assets-raw/sprites/units/toxopid-cannon.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 651 KiB After Width: | Height: | Size: 650 KiB |
|
Before Width: | Height: | Size: 1022 KiB After Width: | Height: | Size: 1014 KiB |
|
Before Width: | Height: | Size: 240 KiB After Width: | Height: | Size: 235 KiB |
|
Before Width: | Height: | Size: 189 KiB After Width: | Height: | Size: 184 KiB |
|
Before Width: | Height: | Size: 2.1 MiB After Width: | Height: | Size: 2.1 MiB |
|
Before Width: | Height: | Size: 190 KiB After Width: | Height: | Size: 185 KiB |
@@ -275,7 +275,7 @@ public class Bullets implements ContentList{
|
|||||||
shrinkY = 0f;
|
shrinkY = 0f;
|
||||||
drag = -0.01f;
|
drag = -0.01f;
|
||||||
splashDamageRadius = 28f;
|
splashDamageRadius = 28f;
|
||||||
splashDamage = 40f;
|
splashDamage = 35f;
|
||||||
hitEffect = Fx.blastExplosion;
|
hitEffect = Fx.blastExplosion;
|
||||||
despawnEffect = Fx.blastExplosion;
|
despawnEffect = Fx.blastExplosion;
|
||||||
lightning = 2;
|
lightning = 2;
|
||||||
|
|||||||
@@ -404,7 +404,7 @@ public class UnitTypes implements ContentList{
|
|||||||
groundLayer = Layer.legUnit;
|
groundLayer = Layer.legUnit;
|
||||||
|
|
||||||
BulletType sapper = new SapBulletType(){{
|
BulletType sapper = new SapBulletType(){{
|
||||||
sapStrength = 0.8f;
|
sapStrength = 0.83f;
|
||||||
length = 55f;
|
length = 55f;
|
||||||
damage = 34;
|
damage = 34;
|
||||||
shootEffect = Fx.shootSmall;
|
shootEffect = Fx.shootSmall;
|
||||||
@@ -455,10 +455,10 @@ public class UnitTypes implements ContentList{
|
|||||||
knockback = 0.8f;
|
knockback = 0.8f;
|
||||||
lifetime = 70f;
|
lifetime = 70f;
|
||||||
width = height = 19f;
|
width = height = 19f;
|
||||||
collidesTiles = false;
|
collidesTiles = true;
|
||||||
ammoMultiplier = 4f;
|
ammoMultiplier = 4f;
|
||||||
splashDamageRadius = 95f;
|
splashDamageRadius = 95f;
|
||||||
splashDamage = 55f;
|
splashDamage = 65f;
|
||||||
backColor = Pal.sapBulletBack;
|
backColor = Pal.sapBulletBack;
|
||||||
frontColor = lightningColor = Pal.sapBullet;
|
frontColor = lightningColor = Pal.sapBullet;
|
||||||
lightning = 3;
|
lightning = 3;
|
||||||
@@ -476,8 +476,8 @@ public class UnitTypes implements ContentList{
|
|||||||
drag = 0.1f;
|
drag = 0.1f;
|
||||||
speed = 0.6f;
|
speed = 0.6f;
|
||||||
hitsize = 21f;
|
hitsize = 21f;
|
||||||
health = 18000;
|
health = 23000;
|
||||||
armor = 9f;
|
armor = 14f;
|
||||||
|
|
||||||
rotateSpeed = 2.2f;
|
rotateSpeed = 2.2f;
|
||||||
|
|
||||||
@@ -501,72 +501,91 @@ public class UnitTypes implements ContentList{
|
|||||||
visualElevation = 0.43f;
|
visualElevation = 0.43f;
|
||||||
groundLayer = Layer.legUnit;
|
groundLayer = Layer.legUnit;
|
||||||
|
|
||||||
BulletType sapper = new SapBulletType(){{
|
|
||||||
sapStrength = 0.8f;
|
|
||||||
length = 55f;
|
|
||||||
damage = 34;
|
|
||||||
shootEffect = Fx.shootSmall;
|
|
||||||
hitColor = color = Color.valueOf("bf92f9");
|
|
||||||
despawnEffect = Fx.none;
|
|
||||||
width = 0.55f;
|
|
||||||
lifetime = 30f;
|
|
||||||
knockback = -1f;
|
|
||||||
}};
|
|
||||||
|
|
||||||
if(false)
|
|
||||||
weapons.add(
|
weapons.add(
|
||||||
new Weapon("spiroct-weapon"){{
|
|
||||||
reload = 9f;
|
|
||||||
x = 4f;
|
|
||||||
y = 8f;
|
|
||||||
rotate = true;
|
|
||||||
bullet = sapper;
|
|
||||||
}},
|
|
||||||
new Weapon("spiroct-weapon"){{
|
|
||||||
reload = 15f;
|
|
||||||
x = 9f;
|
|
||||||
y = 6f;
|
|
||||||
rotate = true;
|
|
||||||
bullet = sapper;
|
|
||||||
}},
|
|
||||||
new Weapon("spiroct-weapon"){{
|
|
||||||
reload = 23f;
|
|
||||||
x = 14f;
|
|
||||||
y = 0f;
|
|
||||||
rotate = true;
|
|
||||||
bullet = sapper;
|
|
||||||
}},
|
|
||||||
new Weapon("large-purple-mount"){{
|
new Weapon("large-purple-mount"){{
|
||||||
y = -7f;
|
y = -5f;
|
||||||
x = 9f;
|
x = 11f;
|
||||||
shootY = 7f;
|
shootY = 7f;
|
||||||
reload = 45;
|
reload = 30;
|
||||||
shake = 3f;
|
shake = 4f;
|
||||||
rotateSpeed = 2f;
|
rotateSpeed = 2f;
|
||||||
ejectEffect = Fx.shellEjectSmall;
|
ejectEffect = Fx.shellEjectSmall;
|
||||||
shootSound = Sounds.shootBig;
|
shootSound = Sounds.shootBig;
|
||||||
rotate = true;
|
rotate = true;
|
||||||
occlusion = 8f;
|
occlusion = 12f;
|
||||||
recoil = 3f;
|
recoil = 3f;
|
||||||
|
shots = 2;
|
||||||
|
spacing = 17f;
|
||||||
|
|
||||||
bullet = new ArtilleryBulletType(2f, 12){{
|
bullet = new ShrapnelBulletType(){{
|
||||||
|
length = 90f;
|
||||||
|
damage = 110f;
|
||||||
|
width = 25f;
|
||||||
|
serrationLenScl = 7f;
|
||||||
|
serrationSpaceOffset = 60f;
|
||||||
|
serrationFadeOffset = 0f;
|
||||||
|
serrations = 10;
|
||||||
|
serrationWidth = 6f;
|
||||||
|
fromColor = Pal.sapBullet;
|
||||||
|
toColor = Pal.sapBulletBack;
|
||||||
|
shootEffect = smokeEffect = Fx.sparkShoot;
|
||||||
|
}};
|
||||||
|
}});
|
||||||
|
|
||||||
|
weapons.add(new Weapon("toxopid-cannon"){{
|
||||||
|
y = -14f;
|
||||||
|
x = 0f;
|
||||||
|
shootY = 22f;
|
||||||
|
mirror = false;
|
||||||
|
reload = 180;
|
||||||
|
shake = 10f;
|
||||||
|
recoil = 10f;
|
||||||
|
rotateSpeed = 1f;
|
||||||
|
ejectEffect = Fx.shellEjectBig;
|
||||||
|
shootSound = Sounds.shootBig;
|
||||||
|
rotate = true;
|
||||||
|
occlusion = 30f;
|
||||||
|
|
||||||
|
bullet = new ArtilleryBulletType(3f, 70){{
|
||||||
hitEffect = Fx.sapExplosion;
|
hitEffect = Fx.sapExplosion;
|
||||||
knockback = 0.8f;
|
knockback = 0.8f;
|
||||||
lifetime = 70f;
|
lifetime = 80f;
|
||||||
width = height = 19f;
|
width = height = 25f;
|
||||||
collidesTiles = false;
|
collidesTiles = collides = true;
|
||||||
ammoMultiplier = 4f;
|
ammoMultiplier = 4f;
|
||||||
splashDamageRadius = 95f;
|
splashDamageRadius = 95f;
|
||||||
splashDamage = 55f;
|
splashDamage = 90f;
|
||||||
backColor = Pal.sapBulletBack;
|
backColor = Pal.sapBulletBack;
|
||||||
frontColor = lightningColor = Pal.sapBullet;
|
frontColor = lightningColor = Pal.sapBullet;
|
||||||
lightning = 3;
|
lightning = 5;
|
||||||
lightningLength = 10;
|
lightningLength = 20;
|
||||||
smokeEffect = Fx.shootBigSmoke2;
|
smokeEffect = Fx.shootBigSmoke2;
|
||||||
shake = 5f;
|
hitShake = 10f;
|
||||||
|
|
||||||
status = StatusEffects.sapped;
|
status = StatusEffects.sapped;
|
||||||
statusDuration = 60f * 10;
|
statusDuration = 60f * 10;
|
||||||
|
|
||||||
|
fragLifeMin = 0.3f;
|
||||||
|
fragBullets = 12;
|
||||||
|
|
||||||
|
fragBullet = new ArtilleryBulletType(2.3f, 30){{
|
||||||
|
hitEffect = Fx.sapExplosion;
|
||||||
|
knockback = 0.8f;
|
||||||
|
lifetime = 90f;
|
||||||
|
width = height = 20f;
|
||||||
|
collidesTiles = false;
|
||||||
|
splashDamageRadius = 90f;
|
||||||
|
splashDamage = 55f;
|
||||||
|
backColor = Pal.sapBulletBack;
|
||||||
|
frontColor = lightningColor = Pal.sapBullet;
|
||||||
|
lightning = 2;
|
||||||
|
lightningLength = 5;
|
||||||
|
smokeEffect = Fx.shootBigSmoke2;
|
||||||
|
hitShake = 5f;
|
||||||
|
|
||||||
|
status = StatusEffects.sapped;
|
||||||
|
statusDuration = 60f * 10;
|
||||||
|
}};
|
||||||
}};
|
}};
|
||||||
}});
|
}});
|
||||||
}};
|
}};
|
||||||
@@ -752,7 +771,7 @@ public class UnitTypes implements ContentList{
|
|||||||
rotateSpeed = 1f;
|
rotateSpeed = 1f;
|
||||||
flying = true;
|
flying = true;
|
||||||
lowAltitude = true;
|
lowAltitude = true;
|
||||||
health = 18000;
|
health = 20000;
|
||||||
engineOffset = 38;
|
engineOffset = 38;
|
||||||
engineSize = 7.3f;
|
engineSize = 7.3f;
|
||||||
hitsize = 58f;
|
hitsize = 58f;
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ public abstract class BulletType extends Content{
|
|||||||
|
|
||||||
public float fragCone = 360f;
|
public float fragCone = 360f;
|
||||||
public int fragBullets = 9;
|
public int fragBullets = 9;
|
||||||
public float fragVelocityMin = 0.2f, fragVelocityMax = 1f;
|
public float fragVelocityMin = 0.2f, fragVelocityMax = 1f, fragLifeMin = 1f, fragLifeMax = 1f;
|
||||||
public BulletType fragBullet = null;
|
public BulletType fragBullet = null;
|
||||||
public Color hitColor = Color.white;
|
public Color hitColor = Color.white;
|
||||||
|
|
||||||
@@ -149,7 +149,7 @@ public abstract class BulletType extends Content{
|
|||||||
for(int i = 0; i < fragBullets; i++){
|
for(int i = 0; i < fragBullets; i++){
|
||||||
float len = Mathf.random(1f, 7f);
|
float len = Mathf.random(1f, 7f);
|
||||||
float a = b.rotation() + Mathf.range(fragCone/2);
|
float a = b.rotation() + Mathf.range(fragCone/2);
|
||||||
fragBullet.create(b, x + Angles.trnsx(a, len), y + Angles.trnsy(a, len), a, Mathf.random(fragVelocityMin, fragVelocityMax));
|
fragBullet.create(b, x + Angles.trnsx(a, len), y + Angles.trnsy(a, len), a, Mathf.random(fragVelocityMin, fragVelocityMax), Mathf.random(fragLifeMin, fragLifeMax));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -247,6 +247,10 @@ public abstract class BulletType extends Content{
|
|||||||
return create(parent.owner(), parent.team, x, y, angle);
|
return create(parent.owner(), parent.team, x, y, angle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Bullet create(Bullet parent, float x, float y, float angle, float velocityScl, float lifeScale){
|
||||||
|
return create(parent.owner(), parent.team, x, y, angle, velocityScl, lifeScale);
|
||||||
|
}
|
||||||
|
|
||||||
public Bullet create(Bullet parent, float x, float y, float angle, float velocityScl){
|
public Bullet create(Bullet parent, float x, float y, float angle, float velocityScl){
|
||||||
return create(parent.owner(), parent.team, x, y, angle, velocityScl);
|
return create(parent.owner(), parent.team, x, y, angle, velocityScl);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ public class ShrapnelBulletType extends BulletType{
|
|||||||
public Color fromColor = Color.white, toColor = Pal.lancerLaser;
|
public Color fromColor = Color.white, toColor = Pal.lancerLaser;
|
||||||
|
|
||||||
public int serrations = 7;
|
public int serrations = 7;
|
||||||
public float serrationLenScl = 10f, serrationWidth = 4f, serrationSpacing = 8f, serrationSpaceOffset = 80f;
|
public float serrationLenScl = 10f, serrationWidth = 4f, serrationSpacing = 8f, serrationSpaceOffset = 80f, serrationFadeOffset = 0.5f;
|
||||||
|
|
||||||
public ShrapnelBulletType(){
|
public ShrapnelBulletType(){
|
||||||
speed = 0.01f;
|
speed = 0.01f;
|
||||||
@@ -24,6 +24,7 @@ public class ShrapnelBulletType extends BulletType{
|
|||||||
lifetime = 10f;
|
lifetime = 10f;
|
||||||
despawnEffect = Fx.none;
|
despawnEffect = Fx.none;
|
||||||
pierce = true;
|
pierce = true;
|
||||||
|
keepVelocity = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -36,7 +37,7 @@ public class ShrapnelBulletType extends BulletType{
|
|||||||
Draw.color(fromColor, toColor, b.fin());
|
Draw.color(fromColor, toColor, b.fin());
|
||||||
for(int i = 0; i < serrations; i++){
|
for(int i = 0; i < serrations; i++){
|
||||||
Tmp.v1.trns(b.rotation(), i * serrationSpacing);
|
Tmp.v1.trns(b.rotation(), i * serrationSpacing);
|
||||||
float sl = Mathf.clamp(b.fout() - 0.5f) * (serrationSpaceOffset - i * serrationLenScl);
|
float sl = Mathf.clamp(b.fout() - serrationFadeOffset) * (serrationSpaceOffset - i * serrationLenScl);
|
||||||
Drawf.tri(b.x + Tmp.v1.x, b.y + Tmp.v1.y, serrationWidth, sl, b.rotation() + 90);
|
Drawf.tri(b.x + Tmp.v1.x, b.y + Tmp.v1.y, serrationWidth, sl, b.rotation() + 90);
|
||||||
Drawf.tri(b.x + Tmp.v1.x, b.y + Tmp.v1.y, serrationWidth, sl, b.rotation() - 90);
|
Drawf.tri(b.x + Tmp.v1.x, b.y + Tmp.v1.y, serrationWidth, sl, b.rotation() - 90);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,8 +11,6 @@ import mindustry.world.modules.ItemModule.*;
|
|||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
public class ItemSeq implements Iterable<ItemStack>, Serializable{
|
public class ItemSeq implements Iterable<ItemStack>, Serializable{
|
||||||
private final static ItemStack tmp = new ItemStack();
|
|
||||||
|
|
||||||
protected final int[] values;
|
protected final int[] values;
|
||||||
public int total;
|
public int total;
|
||||||
|
|
||||||
|
|||||||