diff --git a/core/assets-raw/sprites/units/spiroct-cell.png b/core/assets-raw/sprites/units/spiroct-cell.png new file mode 100644 index 0000000000..180d3e986b Binary files /dev/null and b/core/assets-raw/sprites/units/spiroct-cell.png differ diff --git a/core/assets-raw/sprites/units/spiroct-foot.png b/core/assets-raw/sprites/units/spiroct-foot.png new file mode 100644 index 0000000000..c501d7843d Binary files /dev/null and b/core/assets-raw/sprites/units/spiroct-foot.png differ diff --git a/core/assets-raw/sprites/units/spiroct-joint.png b/core/assets-raw/sprites/units/spiroct-joint.png new file mode 100644 index 0000000000..1fe4fdbd3e Binary files /dev/null and b/core/assets-raw/sprites/units/spiroct-joint.png differ diff --git a/core/assets-raw/sprites/units/spiroct-leg-base.png b/core/assets-raw/sprites/units/spiroct-leg-base.png new file mode 100644 index 0000000000..0c2a1783e1 Binary files /dev/null and b/core/assets-raw/sprites/units/spiroct-leg-base.png differ diff --git a/core/assets-raw/sprites/units/spiroct-leg.png b/core/assets-raw/sprites/units/spiroct-leg.png new file mode 100644 index 0000000000..cc9081fce9 Binary files /dev/null and b/core/assets-raw/sprites/units/spiroct-leg.png differ diff --git a/core/assets-raw/sprites/units/spiroct.png b/core/assets-raw/sprites/units/spiroct.png new file mode 100644 index 0000000000..a69a0b2657 Binary files /dev/null and b/core/assets-raw/sprites/units/spiroct.png differ diff --git a/core/assets-raw/sprites/units/weapons/mount-purple-weapon.png b/core/assets-raw/sprites/units/weapons/mount-purple-weapon.png new file mode 100644 index 0000000000..d34950accd Binary files /dev/null and b/core/assets-raw/sprites/units/weapons/mount-purple-weapon.png differ diff --git a/core/assets-raw/sprites/units/weapons/spiroct-weapon.png b/core/assets-raw/sprites/units/weapons/spiroct-weapon.png new file mode 100644 index 0000000000..91ff27033e Binary files /dev/null and b/core/assets-raw/sprites/units/weapons/spiroct-weapon.png differ diff --git a/core/src/mindustry/content/Fx.java b/core/src/mindustry/content/Fx.java index 6212d64e63..b7dde19ab8 100644 --- a/core/src/mindustry/content/Fx.java +++ b/core/src/mindustry/content/Fx.java @@ -632,6 +632,15 @@ public class Fx{ }), + sapped = new Effect(40f, e -> { + color(Pal.sap); + + randLenVectors(e.id, 2, 1f + e.fin() * 2f, (x, y) -> { + Fill.square(e.x + x, e.y + y, e.fslope() * 1.1f, 45f); + }); + + }), + oily = new Effect(42f, e -> { color(Liquids.oil.color); diff --git a/core/src/mindustry/content/StatusEffects.java b/core/src/mindustry/content/StatusEffects.java index 173a8bd6fc..55672f886c 100644 --- a/core/src/mindustry/content/StatusEffects.java +++ b/core/src/mindustry/content/StatusEffects.java @@ -9,7 +9,7 @@ import mindustry.type.StatusEffect; import static mindustry.Vars.*; public class StatusEffects implements ContentList{ - public static StatusEffect none, burning, freezing, wet, melting, tarred, overdrive, shielded, shocked, blasted, corroded, boss; + public static StatusEffect none, burning, freezing, wet, melting, sapped, tarred, overdrive, shielded, shocked, blasted, corroded, boss; @Override public void load(){ @@ -74,6 +74,13 @@ public class StatusEffects implements ContentList{ }); }}; + sapped = new StatusEffect("sapped"){{ + speedMultiplier = 0.7f; + armorMultiplier = 0.8f; + effect = Fx.sapped; + effectChance = 0.1f; + }}; + tarred = new StatusEffect("tarred"){{ speedMultiplier = 0.6f; effect = Fx.oily; diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index 0b2c5e26cf..18cf72ad22 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -71,7 +71,7 @@ public class UnitTypes implements ContentList{ hitsize = 9f; range = 10f; health = 500; - armor = 1f; + armor = 2f; immunities.add(StatusEffects.burning); @@ -91,7 +91,7 @@ public class UnitTypes implements ContentList{ rotateSpeed = 3f; targetAir = false; health = 790; - armor = 4f; + armor = 5f; weapons.add(new Weapon("artillery"){{ y = 1f; @@ -267,6 +267,7 @@ public class UnitTypes implements ContentList{ legTrns = 0.6f; legMoveSpace = 1.4f; hovering = true; + armor = 3f; weapons.add(new Weapon("eruption"){{ shootY = 3f; @@ -290,7 +291,7 @@ public class UnitTypes implements ContentList{ spiroct = new UnitType("spiroct"){{ speed = 0.4f; drag = 0.4f; - hitsize = 10f; + hitsize = 12f; rotateSpeed = 3f; health = 600; immunities = ObjectSet.with(StatusEffects.burning, StatusEffects.melting); @@ -300,6 +301,7 @@ public class UnitTypes implements ContentList{ legMoveSpace = 1.4f; legBaseOffset = 2f; hovering = true; + armor = 3f; weapons.add(new Weapon("spiroct-weapon"){{ shootY = 4f; @@ -314,12 +316,13 @@ public class UnitTypes implements ContentList{ bullet = new SapBulletType(){{ length = 75f; - damage = 14; + damage = 15; shootEffect = Fx.shootSmall; hitColor = color = Color.valueOf("bf92f9"); despawnEffect = Fx.none; width = 0.54f; lifetime = 35f; + knockback = -1f; }}; }}); @@ -331,12 +334,13 @@ public class UnitTypes implements ContentList{ bullet = new SapBulletType(){{ length = 40f; - damage = 9; + damage = 10; shootEffect = Fx.shootSmall; hitColor = color = Color.valueOf("bf92f9"); despawnEffect = Fx.none; width = 0.4f; lifetime = 25f; + knockback = -0.5f; }}; }}); }}; diff --git a/core/src/mindustry/entities/bullet/SapBulletType.java b/core/src/mindustry/entities/bullet/SapBulletType.java index e3007ac0f1..6dab6ce13c 100644 --- a/core/src/mindustry/entities/bullet/SapBulletType.java +++ b/core/src/mindustry/entities/bullet/SapBulletType.java @@ -23,6 +23,8 @@ public class SapBulletType extends BulletType{ hitSize = 0f; hittable = false; hitEffect = Fx.hitLiquid; + status = StatusEffects.sapped; + statusDuration = 60f * 3f; } @Override diff --git a/core/src/mindustry/entities/comp/BulletComp.java b/core/src/mindustry/entities/comp/BulletComp.java index f8096bee81..3b0be13cd7 100644 --- a/core/src/mindustry/entities/comp/BulletComp.java +++ b/core/src/mindustry/entities/comp/BulletComp.java @@ -19,6 +19,7 @@ import static mindustry.Vars.*; abstract class BulletComp implements Timedc, Damagec, Hitboxc, Teamc, Posc, Drawc, Shielderc, Ownerc, Velc, Bulletc, Timerc{ @Import Team team; @Import Entityc owner; + @Import float x,y; IntSeq collided = new IntSeq(6); Object data; @@ -91,7 +92,7 @@ abstract class BulletComp implements Timedc, Damagec, Hitboxc, Teamc, Posc, Draw if(other instanceof Unit){ Unit unit = (Unit)other; - unit.vel.add(Tmp.v3.set(unit).sub(x, y).setLength(type.knockback / unit.mass())); + unit.impulse(Tmp.v3.set(unit).sub(this.x, this.y).nor().scl(type.knockback * 80f)); unit.apply(type.status, type.statusDuration); } diff --git a/core/src/mindustry/entities/comp/PuddleComp.java b/core/src/mindustry/entities/comp/PuddleComp.java index 61eed49b69..5c29a04d57 100644 --- a/core/src/mindustry/entities/comp/PuddleComp.java +++ b/core/src/mindustry/entities/comp/PuddleComp.java @@ -68,7 +68,7 @@ abstract class PuddleComp implements Posc, Puddlec, Drawc{ //effects-only code if(amount >= maxLiquid / 2f && updateTime <= 0f){ Units.nearby(rect.setSize(Mathf.clamp(amount / (maxLiquid / 1.5f)) * 10f).setCenter(x, y), unit -> { - if(unit.isGrounded()){ + if(unit.isGrounded() && !unit.hovering){ unit.hitbox(rect2); if(rect.overlaps(rect2)){ unit.apply(liquid.effect, 60 * 2); @@ -80,11 +80,11 @@ abstract class PuddleComp implements Posc, Puddlec, Drawc{ } }); - if(liquid.temperature > 0.7f && (tile.build != null) && Mathf.chance(0.3 * Time.delta())){ + if(liquid.temperature > 0.7f && (tile.build != null) && Mathf.chance(0.5)){ Fires.create(tile); } - updateTime = 20f; + updateTime = 40f; } updateTime -= Time.delta(); diff --git a/core/src/mindustry/graphics/Pal.java b/core/src/mindustry/graphics/Pal.java index a7f40ca968..84121a9893 100644 --- a/core/src/mindustry/graphics/Pal.java +++ b/core/src/mindustry/graphics/Pal.java @@ -8,6 +8,8 @@ public class Pal{ items = Color.valueOf("2ea756"), command = Color.valueOf("eab678"), + sap = Color.valueOf("665c9f"), + shield = Color.valueOf("ffd37f").a(0.7f), shieldIn = Color.black.cpy().a(0f), diff --git a/core/src/mindustry/type/StatusEffect.java b/core/src/mindustry/type/StatusEffect.java index ae0a773476..2295fa6e0a 100644 --- a/core/src/mindustry/type/StatusEffect.java +++ b/core/src/mindustry/type/StatusEffect.java @@ -19,6 +19,8 @@ public class StatusEffect extends MappableContent{ public float speedMultiplier = 1f; /** Damage per frame. */ public float damage; + /** Chance of effect appearing. */ + public float effectChance = 0.15f; /** If true, the effect never disappears. */ public boolean permanent; /** Tint color of effect. */ @@ -51,8 +53,8 @@ public class StatusEffect extends MappableContent{ unit.heal(damage * Time.delta()); } - if(effect != Fx.none && Mathf.chanceDelta(0.15f)){ - effect.at(unit.x() + Mathf.range(unit.bounds() / 2f), unit.y() + Mathf.range(unit.bounds() / 2f)); + if(effect != Fx.none && Mathf.chanceDelta(effectChance)){ + effect.at(unit.x + Mathf.range(unit.bounds() / 2f), unit.y + Mathf.range(unit.bounds() / 2f)); } }