Merge branches '6.0' and 'master' of https://github.com/Anuken/Mindustry into 6.0

# Conflicts:
#	core/assets/sprites/block_colors.png
#	core/assets/sprites/sprites.atlas
#	core/assets/sprites/sprites.png
#	core/assets/sprites/sprites2.png
#	core/assets/sprites/sprites3.png
#	core/assets/sprites/sprites5.png
#	core/src/io/anuke/mindustry/ctype/ContentType.java
#	core/src/io/anuke/mindustry/ctype/UnlockableContent.java
#	core/src/io/anuke/mindustry/io/LegacyMapIO.java
#	core/src/io/anuke/mindustry/type/WeatherEvent.java
#	gradle.properties
This commit is contained in:
Anuken
2019-12-24 12:40:23 -05:00
269 changed files with 16452 additions and 13926 deletions

View File

@@ -7,7 +7,7 @@ import io.anuke.arc.graphics.g2d.*;
import io.anuke.arc.math.*;
import io.anuke.arc.util.*;
import io.anuke.mindustry.*;
import io.anuke.mindustry.ctype.ContentList;
import io.anuke.mindustry.ctype.*;
import io.anuke.mindustry.entities.*;
import io.anuke.mindustry.entities.bullet.*;
import io.anuke.mindustry.entities.type.*;
@@ -19,8 +19,7 @@ import io.anuke.mindustry.world.blocks.*;
import io.anuke.mindustry.world.blocks.defense.*;
import io.anuke.mindustry.world.blocks.defense.turrets.*;
import io.anuke.mindustry.world.blocks.distribution.*;
import io.anuke.mindustry.world.blocks.liquid.Conduit;
import io.anuke.mindustry.world.blocks.liquid.LiquidTank;
import io.anuke.mindustry.world.blocks.liquid.*;
import io.anuke.mindustry.world.blocks.logic.*;
import io.anuke.mindustry.world.blocks.power.*;
import io.anuke.mindustry.world.blocks.production.*;
@@ -496,7 +495,7 @@ public class Blocks implements ContentList{
drawer = tile -> {
Draw.rect(region, tile.drawx(), tile.drawy());
GenericCrafterEntity entity = tile.entity();
GenericCrafterEntity entity = tile.ent();
Draw.alpha(Mathf.absin(entity.totalProgress, 3f, 0.9f) * entity.warmup);
Draw.rect(reg(topRegion), tile.drawx(), tile.drawy());
@@ -521,7 +520,7 @@ public class Blocks implements ContentList{
drawIcons = () -> new TextureRegion[]{Core.atlas.find(name + "-bottom"), Core.atlas.find(name), Core.atlas.find(name + "-weave")};
drawer = tile -> {
GenericCrafterEntity entity = tile.entity();
GenericCrafterEntity entity = tile.ent();
Draw.rect(reg(bottomRegion), tile.drawx(), tile.drawy());
Draw.rect(reg(weaveRegion), tile.drawx(), tile.drawy(), entity.totalProgress);
@@ -671,7 +670,7 @@ public class Blocks implements ContentList{
drawIcons = () -> new TextureRegion[]{Core.atlas.find(name), Core.atlas.find(name + "-top")};
drawer = tile -> {
GenericCrafterEntity entity = tile.entity();
GenericCrafterEntity entity = tile.ent();
Draw.rect(region, tile.drawx(), tile.drawy());
Draw.rect(reg(frameRegions[(int)Mathf.absin(entity.totalProgress, 5f, 2.999f)]), tile.drawx(), tile.drawy());
@@ -698,7 +697,7 @@ public class Blocks implements ContentList{
drawIcons = () -> new TextureRegion[]{Core.atlas.find(name), Core.atlas.find(name + "-rotator")};
drawer = tile -> {
GenericCrafterEntity entity = tile.entity();
GenericCrafterEntity entity = tile.ent();
Draw.rect(region, tile.drawx(), tile.drawy());
Draw.rect(reg(rotatorRegion), tile.drawx(), tile.drawy(), entity.totalProgress * 2f);
@@ -926,6 +925,7 @@ public class Blocks implements ContentList{
phaseConveyor = new ItemBridge("phase-conveyor"){{
requirements(Category.distribution, ItemStack.with(Items.phasefabric, 5, Items.silicon, 7, Items.lead, 10, Items.graphite, 10));
range = 12;
canOverdrive = false;
hasPower = true;
consumes.power(0.30f);
}};
@@ -988,7 +988,7 @@ public class Blocks implements ContentList{
size = 3;
}};
conduit = new io.anuke.mindustry.world.blocks.liquid.Conduit("conduit"){{
conduit = new Conduit("conduit"){{
requirements(Category.liquid, ItemStack.with(Items.metaglass, 1));
health = 45;
}};
@@ -1000,14 +1000,14 @@ public class Blocks implements ContentList{
health = 90;
}};
platedConduit = new io.anuke.mindustry.world.blocks.liquid.ArmoredConduit("plated-conduit"){{
requirements(Category.liquid, ItemStack.with(Items.thorium, 2, Items.metaglass, 1));
platedConduit = new ArmoredConduit("plated-conduit"){{
requirements(Category.liquid, ItemStack.with(Items.thorium, 2, Items.metaglass, 1, Items.plastanium, 1));
liquidCapacity = 16f;
liquidPressure = 1.025f;
health = 220;
}};
liquidRouter = new io.anuke.mindustry.world.blocks.liquid.LiquidRouter("liquid-router"){{
liquidRouter = new LiquidRouter("liquid-router"){{
requirements(Category.liquid, ItemStack.with(Items.graphite, 4, Items.metaglass, 2));
liquidCapacity = 20f;
}};
@@ -1019,20 +1019,21 @@ public class Blocks implements ContentList{
health = 500;
}};
liquidJunction = new io.anuke.mindustry.world.blocks.liquid.LiquidJunction("liquid-junction"){{
liquidJunction = new LiquidJunction("liquid-junction"){{
requirements(Category.liquid, ItemStack.with(Items.graphite, 2, Items.metaglass, 2));
}};
bridgeConduit = new io.anuke.mindustry.world.blocks.liquid.LiquidExtendingBridge("bridge-conduit"){{
bridgeConduit = new LiquidExtendingBridge("bridge-conduit"){{
requirements(Category.liquid, ItemStack.with(Items.graphite, 4, Items.metaglass, 8));
range = 4;
hasPower = false;
}};
phaseConduit = new io.anuke.mindustry.world.blocks.liquid.LiquidBridge("phase-conduit"){{
phaseConduit = new LiquidBridge("phase-conduit"){{
requirements(Category.liquid, ItemStack.with(Items.phasefabric, 5, Items.silicon, 7, Items.metaglass, 20, Items.titanium, 10));
range = 12;
hasPower = true;
canOverdrive = false;
consumes.power(0.30f);
}};
@@ -1370,7 +1371,7 @@ public class Blocks implements ContentList{
ammo(
Items.graphite, Bullets.artilleryDense,
Items.silicon, Bullets.artilleryHoming,
Items.pyratite, Bullets.artlleryIncendiary
Items.pyratite, Bullets.artilleryIncendiary
);
reload = 60f;
recoil = 2f;
@@ -1550,9 +1551,9 @@ public class Blocks implements ContentList{
ammo(
Items.graphite, Bullets.artilleryDense,
Items.silicon, Bullets.artilleryHoming,
Items.pyratite, Bullets.artlleryIncendiary,
Items.pyratite, Bullets.artilleryIncendiary,
Items.blastCompound, Bullets.artilleryExplosive,
Items.plastanium, Bullets.arilleryPlastic
Items.plastanium, Bullets.artilleryPlastic
);
size = 3;
shots = 4;

View File

@@ -18,7 +18,7 @@ public class Bullets implements ContentList{
public static BulletType
//artillery
artilleryDense, arilleryPlastic, artilleryPlasticFrag, artilleryHoming, artlleryIncendiary, artilleryExplosive, artilleryUnit,
artilleryDense, artilleryPlastic, artilleryPlasticFrag, artilleryHoming, artilleryIncendiary, artilleryExplosive, artilleryUnit,
//flak
flakScrap, flakLead, flakPlastic, flakExplosive, flakSurge, flakGlass, glassFrag,
@@ -65,7 +65,7 @@ public class Bullets implements ContentList{
despawnEffect = Fx.none;
}};
arilleryPlastic = new ArtilleryBulletType(3.4f, 0, "shell"){{
artilleryPlastic = new ArtilleryBulletType(3.4f, 0, "shell"){{
hitEffect = Fx.plasticExplosion;
knockback = 1f;
lifetime = 55f;
@@ -91,7 +91,7 @@ public class Bullets implements ContentList{
homingRange = 50f;
}};
artlleryIncendiary = new ArtilleryBulletType(3f, 0, "shell"){{
artilleryIncendiary = new ArtilleryBulletType(3f, 0, "shell"){{
hitEffect = Fx.blastExplosion;
knockback = 0.8f;
lifetime = 60f;

View File

@@ -48,28 +48,24 @@ public class Fx implements ContentList{
Draw.rect(unit.getIconRegion(), e.x, e.y,
unit.getIconRegion().getWidth() * Draw.scl * scl, unit.getIconRegion().getWidth() * Draw.scl * scl, 180f);
Draw.reset();
});
commandSend = new Effect(28, e -> {
Draw.color(Pal.command);
Lines.stroke(e.fout() * 2f);
Lines.circle(e.x, e.y, 4f + e.finpow() * 120f);
Draw.color();
});
placeBlock = new Effect(16, e -> {
Draw.color(Pal.accent);
Lines.stroke(3f - e.fin() * 2f);
Lines.square(e.x, e.y, tilesize / 2f * e.rotation + e.fin() * 3f);
Draw.reset();
});
tapBlock = new Effect(12, e -> {
Draw.color(Pal.accent);
Lines.stroke(3f - e.fin() * 2f);
Lines.circle(e.x, e.y, 4f + (tilesize / 1.5f * e.rotation) * e.fin());
Draw.reset();
});
breakBlock = new Effect(12, e -> {
@@ -80,41 +76,35 @@ public class Fx implements ContentList{
Angles.randLenVectors(e.id, 3 + (int)(e.rotation * 3), e.rotation * 2f + (tilesize * e.rotation) * e.finpow(), (x, y) -> {
Fill.square(e.x + x, e.y + y, 1f + e.fout() * (3f + e.rotation));
});
Draw.reset();
});
select = new Effect(23, e -> {
Draw.color(Pal.accent);
Lines.stroke(e.fout() * 3f);
Lines.circle(e.x, e.y, 3f + e.fin() * 14f);
Draw.reset();
});
smoke = new Effect(100, e -> {
Draw.color(Color.gray, Pal.darkishGray, e.fin());
float size = 7f - e.fin() * 7f;
Draw.rect("circle", e.x, e.y, size, size);
Draw.reset();
});
magmasmoke = new Effect(110, e -> {
Draw.color(Color.gray);
Fill.circle(e.x, e.y, e.fslope() * 6f);
Draw.reset();
});
spawn = new Effect(30, e -> {
Lines.stroke(2f * e.fout());
Draw.color(Pal.accent);
Lines.poly(e.x, e.y, 4, 5f + e.fin() * 12f);
Draw.reset();
});
padlaunch = new Effect(10, e -> {
Lines.stroke(4f * e.fout());
Draw.color(Pal.accent);
Lines.poly(e.x, e.y, 4, 5f + e.fin() * 60f);
Draw.reset();
});
vtolHover = new Effect(40f, e -> {
@@ -122,7 +112,6 @@ public class Fx implements ContentList{
float ang = e.rotation + Mathf.randomSeedRange(e.id, 30f);
Draw.color(Pal.lightFlame, Pal.lightOrange, e.fin());
Fill.circle(e.x + Angles.trnsx(ang, len), e.y + Angles.trnsy(ang, len), 2f * e.fout());
Draw.reset();
});
unitDrop = new GroundEffect(30, e -> {
@@ -130,7 +119,6 @@ public class Fx implements ContentList{
Angles.randLenVectors(e.id, 9, 3 + 20f * e.finpow(), (x, y) -> {
Fill.circle(e.x + x, e.y + y, e.fout() * 4f + 0.4f);
});
Draw.reset();
});
unitLand = new GroundEffect(30, e -> {
@@ -138,42 +126,36 @@ public class Fx implements ContentList{
Angles.randLenVectors(e.id, 6, 17f * e.finpow(), (x, y) -> {
Fill.circle(e.x + x, e.y + y, e.fout() * 4f + 0.3f);
});
Draw.reset();
});
unitPickup = new GroundEffect(18, e -> {
Draw.color(Pal.lightishGray);
Lines.stroke(e.fin() * 2f);
Lines.poly(e.x, e.y, 4, 13f * e.fout());
Draw.reset();
});
landShock = new GroundEffect(12, e -> {
Draw.color(Pal.lancerLaser);
Lines.stroke(e.fout() * 3f);
Lines.poly(e.x, e.y, 12, 20f * e.fout());
Draw.reset();
});
pickup = new Effect(18, e -> {
Draw.color(Pal.lightishGray);
Lines.stroke(e.fout() * 2f);
Lines.spikes(e.x, e.y, 1f + e.fin() * 6f, e.fout() * 4f, 6);
Draw.reset();
});
healWave = new Effect(22, e -> {
Draw.color(Pal.heal);
Lines.stroke(e.fout() * 2f);
Lines.circle(e.x, e.y, 4f + e.finpow() * 60f);
Draw.color();
});
heal = new Effect(11, e -> {
Draw.color(Pal.heal);
Lines.stroke(e.fout() * 2f);
Lines.circle(e.x, e.y, 2f + e.finpow() * 7f);
Draw.color();
});
@@ -193,7 +175,6 @@ public class Fx implements ContentList{
Lines.lineAngle(e.x + x, e.y + y, ang, e.fout() * 3 + 1f);
});
Draw.reset();
});
hitFuse = new Effect(14, e -> {
@@ -212,7 +193,6 @@ public class Fx implements ContentList{
Lines.lineAngle(e.x + x, e.y + y, ang, e.fout() * 3 + 1f);
});
Draw.reset();
});
hitBulletBig = new Effect(13, e -> {
@@ -224,7 +204,6 @@ public class Fx implements ContentList{
Lines.lineAngle(e.x + x, e.y + y, ang, e.fout() * 4 + 1.5f);
});
Draw.reset();
});
hitFlameSmall = new Effect(14, e -> {
@@ -236,7 +215,6 @@ public class Fx implements ContentList{
Lines.lineAngle(e.x + x, e.y + y, ang, e.fout() * 3 + 1f);
});
Draw.reset();
});
hitLiquid = new Effect(16, e -> {
@@ -246,7 +224,6 @@ public class Fx implements ContentList{
Fill.circle(e.x + x, e.y + y, e.fout() * 2f);
});
Draw.reset();
});
hitLancer = new Effect(12, e -> {
@@ -258,7 +235,6 @@ public class Fx implements ContentList{
Lines.lineAngle(e.x + x, e.y + y, ang, e.fout() * 4 + 1f);
});
Draw.reset();
});
hitMeltdown = new Effect(12, e -> {
@@ -270,14 +246,12 @@ public class Fx implements ContentList{
Lines.lineAngle(e.x + x, e.y + y, ang, e.fout() * 4 + 1f);
});
Draw.reset();
});
hitLaser = new Effect(8, e -> {
Draw.color(Color.white, Pal.heal, e.fin());
Lines.stroke(0.5f + e.fout());
Lines.circle(e.x, e.y, e.fin() * 5f);
Draw.reset();
});
despawn = new Effect(12, e -> {
@@ -289,7 +263,6 @@ public class Fx implements ContentList{
Lines.lineAngle(e.x + x, e.y + y, ang, e.fout() * 2 + 1f);
});
Draw.reset();
});
flakExplosion = new Effect(20, e -> {
@@ -313,7 +286,6 @@ public class Fx implements ContentList{
Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f);
});
Draw.reset();
});
plasticExplosion = new Effect(24, e -> {
@@ -337,7 +309,6 @@ public class Fx implements ContentList{
Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f);
});
Draw.reset();
});
plasticExplosionFlak = new Effect(28, e -> {
@@ -361,7 +332,6 @@ public class Fx implements ContentList{
Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f);
});
Draw.reset();
});
blastExplosion = new Effect(22, e -> {
@@ -385,32 +355,27 @@ public class Fx implements ContentList{
Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f);
});
Draw.reset();
});
artilleryTrail = new Effect(50, e -> {
Draw.color(e.color);
Fill.circle(e.x, e.y, e.rotation * e.fout());
Draw.reset();
});
incendTrail = new Effect(50, e -> {
Draw.color(Pal.lightOrange);
Fill.circle(e.x, e.y, e.rotation * e.fout());
Draw.reset();
});
missileTrail = new Effect(50, e -> {
Draw.color(e.color);
Fill.circle(e.x, e.y, e.rotation * e.fout());
Draw.reset();
});
absorb = new Effect(12, e -> {
Draw.color(Pal.accent);
Lines.stroke(2f * e.fout());
Lines.circle(e.x, e.y, 5f * e.fout());
Draw.reset();
});
flakExplosionBig = new Effect(30, e -> {
@@ -434,7 +399,6 @@ public class Fx implements ContentList{
Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f);
});
Draw.reset();
});
@@ -445,7 +409,6 @@ public class Fx implements ContentList{
Fill.circle(e.x + x, e.y + y, 0.1f + e.fout() * 1.4f);
});
Draw.color();
});
fire = new Effect(50f, e -> {
@@ -467,7 +430,6 @@ public class Fx implements ContentList{
Fill.circle(e.x + x, e.y + y, 0.2f + e.fslope() * 1.5f);
});
Draw.color();
});
steam = new Effect(35f, e -> {
@@ -477,7 +439,6 @@ public class Fx implements ContentList{
Fill.circle(e.x + x, e.y + y, 0.2f + e.fslope() * 1.5f);
});
Draw.color();
});
fireballsmoke = new Effect(25f, e -> {
@@ -487,7 +448,6 @@ public class Fx implements ContentList{
Fill.circle(e.x + x, e.y + y, 0.2f + e.fout() * 1.5f);
});
Draw.color();
});
ballfire = new Effect(25f, e -> {
@@ -497,7 +457,6 @@ public class Fx implements ContentList{
Fill.circle(e.x + x, e.y + y, 0.2f + e.fout() * 1.5f);
});
Draw.color();
});
freezing = new Effect(40f, e -> {
@@ -507,7 +466,6 @@ public class Fx implements ContentList{
Fill.circle(e.x + x, e.y + y, e.fout() * 1.2f);
});
Draw.color();
});
melting = new Effect(40f, e -> {
@@ -517,7 +475,6 @@ public class Fx implements ContentList{
Fill.circle(e.x + x, e.y + y, .2f + e.fout() * 1.2f);
});
Draw.color();
});
wet = new Effect(40f, e -> {
@@ -527,7 +484,6 @@ public class Fx implements ContentList{
Fill.circle(e.x + x, e.y + y, e.fout() * 1f);
});
Draw.color();
});
oily = new Effect(42f, e -> {
@@ -537,7 +493,6 @@ public class Fx implements ContentList{
Fill.circle(e.x + x, e.y + y, e.fout() * 1f);
});
Draw.color();
});
overdriven = new Effect(20f, e -> {
@@ -547,7 +502,6 @@ public class Fx implements ContentList{
Fill.square(e.x + x, e.y + y, e.fout() * 2.3f + 0.5f);
});
Draw.color();
});
dropItem = new Effect(20f, e -> {
@@ -562,35 +516,30 @@ public class Fx implements ContentList{
Draw.color(Color.white, Color.lightGray, e.fin());
Lines.stroke(e.fout() * 2f + 0.2f);
Lines.circle(e.x, e.y, e.fin() * 28f);
Draw.reset();
});
bigShockwave = new Effect(10f, 80f, e -> {
Draw.color(Color.white, Color.lightGray, e.fin());
Lines.stroke(e.fout() * 3f);
Lines.circle(e.x, e.y, e.fin() * 50f);
Draw.reset();
});
nuclearShockwave = new Effect(10f, 200f, e -> {
Draw.color(Color.white, Color.lightGray, e.fin());
Lines.stroke(e.fout() * 3f + 0.2f);
Lines.circle(e.x, e.y, e.fin() * 140f);
Draw.reset();
});
impactShockwave = new Effect(13f, 300f, e -> {
Draw.color(Pal.lighterOrange, Color.lightGray, e.fin());
Lines.stroke(e.fout() * 4f + 0.2f);
Lines.circle(e.x, e.y, e.fin() * 200f);
Draw.reset();
});
spawnShockwave = new Effect(20f, 400f, e -> {
Draw.color(Color.white, Color.lightGray, e.fin());
Lines.stroke(e.fout() * 3f + 0.5f);
Lines.circle(e.x, e.y, e.fin() * (e.rotation + 50f));
Draw.reset();
});
explosion = new Effect(30, e -> {
@@ -613,7 +562,6 @@ public class Fx implements ContentList{
Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f);
});
Draw.reset();
});
dynamicExplosion = new Effect(30, e -> {
@@ -638,7 +586,6 @@ public class Fx implements ContentList{
Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + out * 4 * (3f + intensity));
});
Draw.reset();
});
blockExplosion = new Effect(30, e -> {
@@ -661,7 +608,6 @@ public class Fx implements ContentList{
Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f);
});
Draw.reset();
});
blockExplosionSmoke = new Effect(30, e -> {
@@ -672,7 +618,6 @@ public class Fx implements ContentList{
Fill.circle(e.x + x / 2f, e.y + y / 2f, e.fout() * 1f);
});
Draw.reset();
});
@@ -681,7 +626,6 @@ public class Fx implements ContentList{
float w = 1f + 5 * e.fout();
Drawf.tri(e.x, e.y, w, 15f * e.fout(), e.rotation);
Drawf.tri(e.x, e.y, w, 3f * e.fout(), e.rotation + 180f);
Draw.reset();
});
shootHeal = new Effect(8, e -> {
@@ -689,7 +633,6 @@ public class Fx implements ContentList{
float w = 1f + 5 * e.fout();
Drawf.tri(e.x, e.y, w, 17f * e.fout(), e.rotation);
Drawf.tri(e.x, e.y, w, 4f * e.fout(), e.rotation + 180f);
Draw.reset();
});
shootSmallSmoke = new Effect(20f, e -> {
@@ -699,7 +642,6 @@ public class Fx implements ContentList{
Fill.circle(e.x + x, e.y + y, e.fout() * 1.5f);
});
Draw.reset();
});
shootBig = new Effect(9, e -> {
@@ -707,7 +649,6 @@ public class Fx implements ContentList{
float w = 1.2f + 7 * e.fout();
Drawf.tri(e.x, e.y, w, 25f * e.fout(), e.rotation);
Drawf.tri(e.x, e.y, w, 4f * e.fout(), e.rotation + 180f);
Draw.reset();
});
shootBig2 = new Effect(10, e -> {
@@ -715,7 +656,6 @@ public class Fx implements ContentList{
float w = 1.2f + 8 * e.fout();
Drawf.tri(e.x, e.y, w, 29f * e.fout(), e.rotation);
Drawf.tri(e.x, e.y, w, 5f * e.fout(), e.rotation + 180f);
Draw.reset();
});
shootBigSmoke = new Effect(17f, e -> {
@@ -725,7 +665,6 @@ public class Fx implements ContentList{
Fill.circle(e.x + x, e.y + y, e.fout() * 2f + 0.2f);
});
Draw.reset();
});
shootBigSmoke2 = new Effect(18f, e -> {
@@ -735,7 +674,6 @@ public class Fx implements ContentList{
Fill.circle(e.x + x, e.y + y, e.fout() * 2.4f + 0.2f);
});
Draw.reset();
});
shootSmallFlame = new Effect(32f, e -> {
@@ -745,7 +683,6 @@ public class Fx implements ContentList{
Fill.circle(e.x + x, e.y + y, 0.65f + e.fout() * 1.5f);
});
Draw.reset();
});
shootPyraFlame = new Effect(33f, e -> {
@@ -755,7 +692,6 @@ public class Fx implements ContentList{
Fill.circle(e.x + x, e.y + y, 0.65f + e.fout() * 1.6f);
});
Draw.reset();
});
shootLiquid = new Effect(40f, e -> {
@@ -765,7 +701,6 @@ public class Fx implements ContentList{
Fill.circle(e.x + x, e.y + y, 0.5f + e.fout() * 2.5f);
});
Draw.reset();
});
shellEjectSmall = new GroundEffect(30f, 400f, e -> {
@@ -780,7 +715,6 @@ public class Fx implements ContentList{
e.y + Angles.trnsy(lr, len) + Mathf.randomSeedRange(e.id + i + 8, 3f * e.fin()),
1f, 2f, rot + e.fin() * 50f * i);
Draw.color();
});
shellEjectMedium = new GroundEffect(34f, 400f, e -> {
@@ -804,7 +738,6 @@ public class Fx implements ContentList{
});
}
Draw.color();
});
shellEjectBig = new GroundEffect(22f, 400f, e -> {
@@ -829,7 +762,6 @@ public class Fx implements ContentList{
});
}
Draw.color();
});
lancerLaserShoot = new Effect(21f, e -> {
@@ -839,7 +771,6 @@ public class Fx implements ContentList{
Drawf.tri(e.x, e.y, 4f * e.fout(), 29f, e.rotation + 90f * i);
}
Draw.reset();
});
lancerLaserShootSmoke = new Effect(26f, e -> {
@@ -849,7 +780,6 @@ public class Fx implements ContentList{
Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), e.fout() * 9f);
});
Draw.reset();
});
lancerLaserCharge = new Effect(38f, e -> {
@@ -859,7 +789,6 @@ public class Fx implements ContentList{
Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), e.fslope() * 3f + 1f);
});
Draw.reset();
});
lancerLaserChargeBegin = new Effect(71f, e -> {
@@ -877,7 +806,6 @@ public class Fx implements ContentList{
Drawf.tri(e.x + x, e.y + y, e.fslope() * 3f + 1, e.fslope() * 3f + 1, Mathf.angle(x, y));
});
Draw.reset();
});
lightningShoot = new Effect(12f, e -> {
@@ -888,7 +816,6 @@ public class Fx implements ContentList{
Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), e.fin() * 5f + 2f);
});
Draw.reset();
});
@@ -897,7 +824,6 @@ public class Fx implements ContentList{
float size = 1f + e.fout() * 5f;
Draw.color(Color.lightGray, Color.gray, e.fin());
Draw.rect("circle", e.x + x, e.y + y, size, size);
Draw.reset();
});
});
nuclearsmoke = new Effect(40, e -> {
@@ -905,7 +831,6 @@ public class Fx implements ContentList{
float size = e.fslope() * 4f;
Draw.color(Color.lightGray, Color.gray, e.fin());
Draw.rect("circle", e.x + x, e.y + y, size, size);
Draw.reset();
});
});
nuclearcloud = new Effect(90, 200f, e -> {
@@ -913,7 +838,6 @@ public class Fx implements ContentList{
float size = e.fout() * 14f;
Draw.color(Color.lime, Color.gray, e.fin());
Draw.rect("circle", e.x + x, e.y + y, size, size);
Draw.reset();
});
});
impactsmoke = new Effect(60, e -> {
@@ -921,7 +845,6 @@ public class Fx implements ContentList{
float size = e.fslope() * 4f;
Draw.color(Color.lightGray, Color.gray, e.fin());
Draw.rect("circle", e.x + x, e.y + y, size, size);
Draw.reset();
});
});
impactcloud = new Effect(140, 400f, e -> {
@@ -929,7 +852,6 @@ public class Fx implements ContentList{
float size = e.fout() * 15f;
Draw.color(Pal.lighterOrange, Color.lightGray, e.fin());
Draw.rect("circle", e.x + x, e.y + y, size, size);
Draw.reset();
});
});
redgeneratespark = new Effect(18, e -> {
@@ -937,7 +859,6 @@ public class Fx implements ContentList{
float len = e.fout() * 4f;
Draw.color(Pal.redSpark, Color.gray, e.fin());
Draw.rect("circle", e.x + x, e.y + y, len, len);
Draw.reset();
});
});
generatespark = new Effect(18, e -> {
@@ -945,7 +866,6 @@ public class Fx implements ContentList{
float len = e.fout() * 4f;
Draw.color(Pal.orangeSpark, Color.gray, e.fin());
Draw.rect("circle", e.x + x, e.y + y, len, len);
Draw.reset();
});
});
fuelburn = new Effect(23, e -> {
@@ -953,70 +873,60 @@ public class Fx implements ContentList{
float len = e.fout() * 4f;
Draw.color(Color.lightGray, Color.gray, e.fin());
Draw.rect("circle", e.x + x, e.y + y, len, len);
Draw.reset();
});
});
plasticburn = new Effect(40, e -> {
Angles.randLenVectors(e.id, 5, 3f + e.fin() * 5f, (x, y) -> {
Draw.color(Color.valueOf("e9ead3"), Color.gray, e.fin());
Fill.circle(e.x + x, e.y + y, e.fout() * 1f);
Draw.reset();
});
});
pulverize = new Effect(40, e -> {
Angles.randLenVectors(e.id, 5, 3f + e.fin() * 8f, (x, y) -> {
Draw.color(Pal.stoneGray);
Fill.square(e.x + x, e.y + y, e.fout() * 2f + 0.5f, 45);
Draw.reset();
});
});
pulverizeRed = new Effect(40, e -> {
Angles.randLenVectors(e.id, 5, 3f + e.fin() * 8f, (x, y) -> {
Draw.color(Pal.redDust, Pal.stoneGray, e.fin());
Fill.square(e.x + x, e.y + y, e.fout() * 2f + 0.5f, 45);
Draw.reset();
});
});
pulverizeRedder = new Effect(40, e -> {
Angles.randLenVectors(e.id, 5, 3f + e.fin() * 9f, (x, y) -> {
Draw.color(Pal.redderDust, Pal.stoneGray, e.fin());
Fill.square(e.x + x, e.y + y, e.fout() * 2.5f + 0.5f, 45);
Draw.reset();
});
});
pulverizeSmall = new Effect(30, e -> {
Angles.randLenVectors(e.id, 3, e.fin() * 5f, (x, y) -> {
Draw.color(Pal.stoneGray);
Fill.square(e.x + x, e.y + y, e.fout() * 1f + 0.5f, 45);
Draw.reset();
});
});
pulverizeMedium = new Effect(30, e -> {
Angles.randLenVectors(e.id, 5, 3f + e.fin() * 8f, (x, y) -> {
Draw.color(Pal.stoneGray);
Fill.square(e.x + x, e.y + y, e.fout() * 1f + 0.5f, 45);
Draw.reset();
});
});
producesmoke = new Effect(12, e -> {
Angles.randLenVectors(e.id, 8, 4f + e.fin() * 18f, (x, y) -> {
Draw.color(Color.white, Pal.accent, e.fin());
Fill.square(e.x + x, e.y + y, 1f + e.fout() * 3f, 45);
Draw.reset();
});
});
smeltsmoke = new Effect(15, e -> {
Angles.randLenVectors(e.id, 6, 4f + e.fin() * 5f, (x, y) -> {
Draw.color(Color.white, e.color, e.fin());
Fill.square(e.x + x, e.y + y, 0.5f + e.fout() * 2f, 45);
Draw.reset();
});
});
formsmoke = new Effect(40, e -> {
Angles.randLenVectors(e.id, 6, 5f + e.fin() * 8f, (x, y) -> {
Draw.color(Pal.plasticSmoke, Color.lightGray, e.fin());
Fill.square(e.x + x, e.y + y, 0.2f + e.fout() * 2f, 45);
Draw.reset();
});
});
blastsmoke = new Effect(26, e -> {
@@ -1024,7 +934,6 @@ public class Fx implements ContentList{
float size = 2f + e.fout() * 6f;
Draw.color(Color.lightGray, Color.darkGray, e.fin());
Draw.rect("circle", e.x + x, e.y + y, size, size);
Draw.reset();
});
});
lava = new Effect(18, e -> {
@@ -1032,79 +941,66 @@ public class Fx implements ContentList{
float size = e.fslope() * 4f;
Draw.color(Color.orange, Color.gray, e.fin());
Draw.rect("circle", e.x + x, e.y + y, size, size);
Draw.reset();
});
});
dooropen = new Effect(10, e -> {
Lines.stroke(e.fout() * 1.6f);
Lines.square(e.x, e.y, tilesize / 2f + e.fin() * 2f);
Draw.reset();
});
doorclose = new Effect(10, e -> {
Lines.stroke(e.fout() * 1.6f);
Lines.square(e.x, e.y, tilesize / 2f + e.fout() * 2f);
Draw.reset();
});
dooropenlarge = new Effect(10, e -> {
Lines.stroke(e.fout() * 1.6f);
Lines.square(e.x, e.y, tilesize + e.fin() * 2f);
Draw.reset();
});
doorcloselarge = new Effect(10, e -> {
Lines.stroke(e.fout() * 1.6f);
Lines.square(e.x, e.y, tilesize + e.fout() * 2f);
Draw.reset();
});
purify = new Effect(10, e -> {
Draw.color(Color.royal, Color.gray, e.fin());
Lines.stroke(2f);
Lines.spikes(e.x, e.y, e.fin() * 4f, 2, 6);
Draw.reset();
});
purifyoil = new Effect(10, e -> {
Draw.color(Color.black, Color.gray, e.fin());
Lines.stroke(2f);
Lines.spikes(e.x, e.y, e.fin() * 4f, 2, 6);
Draw.reset();
});
purifystone = new Effect(10, e -> {
Draw.color(Color.orange, Color.gray, e.fin());
Lines.stroke(2f);
Lines.spikes(e.x, e.y, e.fin() * 4f, 2, 6);
Draw.reset();
});
generate = new Effect(11, e -> {
Draw.color(Color.orange, Color.yellow, e.fin());
Lines.stroke(1f);
Lines.spikes(e.x, e.y, e.fin() * 5f, 2, 8);
Draw.reset();
});
mine = new Effect(20, e -> {
Angles.randLenVectors(e.id, 6, 3f + e.fin() * 6f, (x, y) -> {
Draw.color(e.color, Color.lightGray, e.fin());
Fill.square(e.x + x, e.y + y, e.fout() * 2f, 45);
Draw.reset();
});
});
mineBig = new Effect(30, e -> {
Angles.randLenVectors(e.id, 6, 4f + e.fin() * 8f, (x, y) -> {
Draw.color(e.color, Color.lightGray, e.fin());
Fill.square(e.x + x, e.y + y, e.fout() * 2f + 0.2f, 45);
Draw.reset();
});
});
mineHuge = new Effect(40, e -> {
Angles.randLenVectors(e.id, 8, 5f + e.fin() * 10f, (x, y) -> {
Draw.color(e.color, Color.lightGray, e.fin());
Fill.square(e.x + x, e.y + y, e.fout() * 2f + 0.5f, 45);
Draw.reset();
});
});
smelt = new Effect(20, e -> {
Angles.randLenVectors(e.id, 6, 2f + e.fin() * 5f, (x, y) -> {
Draw.color(Color.white, e.color, e.fin());
Fill.square(e.x + x, e.y + y, 0.5f + e.fout() * 2f, 45);
Draw.reset();
});
});
teleportActivate = new Effect(50, e -> {
@@ -1121,7 +1017,6 @@ public class Fx implements ContentList{
Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), e.fin() * 4f + 1f);
});
Draw.reset();
});
teleport = new Effect(60, e -> {
Draw.color(e.color);
@@ -1132,7 +1027,6 @@ public class Fx implements ContentList{
Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), e.fin() * 4f + 1f);
});
Draw.reset();
});
teleportOut = new Effect(20, e -> {
Draw.color(e.color);
@@ -1143,13 +1037,11 @@ public class Fx implements ContentList{
Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), e.fslope() * 4f + 1f);
});
Draw.reset();
});
ripple = new GroundEffect(false, 30, e -> {
Draw.color(Tmp.c1.set(e.color).mul(1.2f));
Lines.stroke(e.fout() + 0.4f);
Lines.circle(e.x, e.y, 2f + e.fin() * 4f);
Draw.reset();
});
bubble = new Effect(20, e -> {
@@ -1158,56 +1050,47 @@ public class Fx implements ContentList{
Angles.randLenVectors(e.id, 2, 8f, (x, y) -> {
Lines.circle(e.x + x, e.y + y, 1f + e.fin() * 3f);
});
Draw.reset();
});
launch = new Effect(28, e -> {
Draw.color(Pal.command);
Lines.stroke(e.fout() * 2f);
Lines.circle(e.x, e.y, 4f + e.finpow() * 120f);
Draw.color();
});
healWaveMend = new Effect(40, e -> {
Draw.color(e.color);
Lines.stroke(e.fout() * 2f);
Lines.circle(e.x, e.y, e.finpow() * e.rotation);
Draw.color();
});
overdriveWave = new Effect(50, e -> {
Draw.color(e.color);
Lines.stroke(e.fout() * 1f);
Lines.circle(e.x, e.y, e.finpow() * e.rotation);
Draw.color();
});
healBlock = new Effect(20, e -> {
Draw.color(Pal.heal);
Lines.stroke(2f * e.fout() + 0.5f);
Lines.square(e.x, e.y, 1f + (e.fin() * e.rotation * tilesize / 2f - 1f));
Draw.color();
});
healBlockFull = new Effect(20, e -> {
Draw.color(e.color);
Draw.alpha(e.fout());
Fill.square(e.x, e.y, e.rotation * tilesize / 2f);
Draw.color();
});
overdriveBlockFull = new Effect(60, e -> {
Draw.color(e.color);
Draw.alpha(e.fslope() * 0.4f);
Fill.square(e.x, e.y, e.rotation * tilesize);
Draw.color();
});
shieldBreak = new Effect(40, e -> {
Draw.color(Pal.accent);
Lines.stroke(3f * e.fout());
Lines.poly(e.x, e.y, 6, e.rotation + e.fin(), 90);
Draw.reset();
});
coreLand = new Effect(120f, e -> {

View File

@@ -15,61 +15,71 @@ public class StatusEffects implements ContentList{
@Override
public void load(){
none = new StatusEffect();
none = new StatusEffect("none");
burning = new StatusEffect(){{
burning = new StatusEffect("burning"){{
damage = 0.06f;
effect = Fx.burning;
opposite(() -> wet, () -> freezing);
trans(() -> tarred, ((unit, time, newTime, result) -> {
unit.damage(1f);
Effects.effect(Fx.burning, unit.x + Mathf.range(unit.getSize() / 2f), unit.y + Mathf.range(unit.getSize() / 2f));
result.set(this, Math.min(time + newTime, 300f));
}));
init(() -> {
opposite(wet,freezing);
trans(tarred, ((unit, time, newTime, result) -> {
unit.damage(1f);
Effects.effect(Fx.burning, unit.x + Mathf.range(unit.getSize() / 2f), unit.y + Mathf.range(unit.getSize() / 2f));
result.set(this, Math.min(time + newTime, 300f));
}));
});
}};
freezing = new StatusEffect(){{
freezing = new StatusEffect("freezing"){{
speedMultiplier = 0.6f;
armorMultiplier = 0.8f;
effect = Fx.freezing;
opposite(() -> melting, () -> burning);
init(() -> {
opposite(melting, burning);
});
}};
wet = new StatusEffect(){{
wet = new StatusEffect("wet"){{
speedMultiplier = 0.9f;
effect = Fx.wet;
trans(() -> shocked, ((unit, time, newTime, result) -> {
unit.damage(20f);
if(unit.getTeam() == waveTeam){
Events.fire(Trigger.shock);
}
result.set(this, time);
}));
opposite(() -> burning);
init(() -> {
trans(shocked, ((unit, time, newTime, result) -> {
unit.damage(20f);
if(unit.getTeam() == waveTeam){
Events.fire(Trigger.shock);
}
result.set(this, time);
}));
opposite(burning);
});
}};
melting = new StatusEffect(){{
melting = new StatusEffect("melting"){{
speedMultiplier = 0.8f;
armorMultiplier = 0.8f;
damage = 0.3f;
effect = Fx.melting;
trans(() -> tarred, ((unit, time, newTime, result) -> result.set(this, Math.min(time + newTime / 2f, 140f))));
opposite(() -> wet, () -> freezing);
init(() -> {
trans(tarred, ((unit, time, newTime, result) -> result.set(this, Math.min(time + newTime / 2f, 140f))));
opposite(wet, freezing);
});
}};
tarred = new StatusEffect(){{
tarred = new StatusEffect("tarred"){{
speedMultiplier = 0.6f;
effect = Fx.oily;
trans(() -> melting, ((unit, time, newTime, result) -> result.set(burning, newTime + time)));
trans(() -> burning, ((unit, time, newTime, result) -> result.set(burning, newTime + time)));
init(() -> {
trans(melting, ((unit, time, newTime, result) -> result.set(burning, newTime + time)));
trans(burning, ((unit, time, newTime, result) -> result.set(burning, newTime + time)));
});
}};
overdrive = new StatusEffect(){{
overdrive = new StatusEffect("overdrive"){{
armorMultiplier = 0.95f;
speedMultiplier = 1.15f;
damageMultiplier = 1.4f;
@@ -77,20 +87,20 @@ public class StatusEffects implements ContentList{
effect = Fx.overdriven;
}};
shielded = new StatusEffect(){{
shielded = new StatusEffect("shielded"){{
armorMultiplier = 3f;
}};
boss = new StatusEffect(){{
boss = new StatusEffect("boss"){{
armorMultiplier = 3f;
damageMultiplier = 3f;
speedMultiplier = 1.1f;
}};
shocked = new StatusEffect();
shocked = new StatusEffect("shocked");
//no effects, just small amounts of damage.
corroded = new StatusEffect(){{
corroded = new StatusEffect("corroded"){{
damage = 0.1f;
}};
}