Weather status effects

This commit is contained in:
Anuken
2020-08-04 21:26:24 -04:00
parent 55903576b6
commit 03b5bc9449
9 changed files with 33 additions and 16 deletions

View File

@@ -1696,7 +1696,7 @@ public class Blocks implements ContentList{
requirements(Category.units, with(Items.copper, 50, Items.lead, 120, Items.silicon, 80));
plans = new UnitPlan[]{
new UnitPlan(UnitTypes.dagger, 60f * 20, with(Items.silicon, 10, Items.lead, 10)),
new UnitPlan(UnitTypes.crawler, 60f * 15, with(Items.silicon, 10, Items.blastCompound, 10)),
new UnitPlan(UnitTypes.crawler, 60f * 15, with(Items.silicon, 10, Items.coal, 20)),
new UnitPlan(UnitTypes.nova, 60f * 40, with(Items.silicon, 30, Items.lead, 20, Items.titanium, 20)),
};
size = 3;
@@ -1706,7 +1706,7 @@ public class Blocks implements ContentList{
airFactory = new UnitFactory("air-factory"){{
requirements(Category.units, with(Items.copper, 30, Items.lead, 70));
plans = new UnitPlan[]{
new UnitPlan(UnitTypes.flare, 60f * 15, with(Items.silicon, 10)),
new UnitPlan(UnitTypes.flare, 60f * 15, with(Items.silicon, 15)),
new UnitPlan(UnitTypes.mono, 60f * 35, with(Items.silicon, 30, Items.lead, 15)),
};
size = 3;

View File

@@ -654,13 +654,11 @@ public class Fx{
}),
wet = new Effect(40f, e -> {
wet = new Effect(80f, e -> {
color(Liquids.water.color);
alpha(Mathf.clamp(e.fin() * 2f));
randLenVectors(e.id, 2, 1f + e.fin() * 2f, (x, y) -> {
Fill.circle(e.x + x, e.y + y, e.fout() * 1f);
});
Fill.circle(e.x, e.y, e.fout() * 1f);
}),
sapped = new Effect(40f, e -> {

View File

@@ -47,8 +47,9 @@ public class StatusEffects implements ContentList{
wet = new StatusEffect("wet"){{
color = Color.royal;
speedMultiplier = 0.9f;
speedMultiplier = 0.94f;
effect = Fx.wet;
effectChance = 0.09f;
init(() -> {
trans(shocked, ((unit, time, newTime, result) -> {

View File

@@ -263,7 +263,7 @@ public class UnitTypes implements ContentList{
speed = 1f;
splashDamageRadius = 55f;
instantDisappear = true;
splashDamage = 40f;
splashDamage = 45f;
killShooter = true;
hittable = false;
collidesAir = true;
@@ -527,7 +527,7 @@ public class UnitTypes implements ContentList{
}};
antumbra = new UnitType("antumbra"){{
speed = 1.25f;
speed = 1.13f;
accel = 0.035f;
drag = 0.05f;
rotateSpeed = 1.9f;
@@ -599,7 +599,7 @@ public class UnitTypes implements ContentList{
}};
eclipse = new UnitType("eclipse"){{
speed = 1.1f;
speed = 1.09f;
accel = 0.02f;
drag = 0.05f;
rotateSpeed = 1f;

View File

@@ -70,7 +70,6 @@ public class Weathers implements ContentList{
}
};
//TODO should apply wet effect
rain = new Weather("rain"){
float yspeed = 5f, xspeed = 1.5f, padding = 16f, size = 40f, density = 1200f;
TextureRegion[] splashes = new TextureRegion[12];
@@ -78,6 +77,7 @@ public class Weathers implements ContentList{
{
attrs.set(Attribute.light, -0.2f);
attrs.set(Attribute.water, 0.2f);
status = StatusEffects.wet;
}
@Override