From 72fb66e5b260eb123df2739acaf48f170212d913 Mon Sep 17 00:00:00 2001 From: Anuken Date: Thu, 22 Jul 2021 11:21:23 -0400 Subject: [PATCH] Anuken/Mindustry-Suggestions/issues/2730 --- core/src/mindustry/ai/WaveSpawner.java | 1 + core/src/mindustry/content/StatusEffects.java | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/core/src/mindustry/ai/WaveSpawner.java b/core/src/mindustry/ai/WaveSpawner.java index f9490dbef2..a895af863f 100644 --- a/core/src/mindustry/ai/WaveSpawner.java +++ b/core/src/mindustry/ai/WaveSpawner.java @@ -180,6 +180,7 @@ public class WaveSpawner{ private void spawnEffect(Unit unit){ unit.rotation = unit.angleTo(world.width()/2f * tilesize, world.height()/2f * tilesize); unit.apply(StatusEffects.unmoving, 30f); + unit.apply(StatusEffects.invincible, 60f); unit.add(); Call.spawnEffect(unit.x, unit.y, unit.rotation, unit.type); diff --git a/core/src/mindustry/content/StatusEffects.java b/core/src/mindustry/content/StatusEffects.java index bc0a7e4864..fb75fcabd3 100644 --- a/core/src/mindustry/content/StatusEffects.java +++ b/core/src/mindustry/content/StatusEffects.java @@ -12,7 +12,7 @@ import mindustry.graphics.*; import static mindustry.Vars.*; public class StatusEffects implements ContentList{ - public static StatusEffect none, burning, freezing, unmoving, slow, wet, muddy, melting, sapped, tarred, overdrive, overclock, shielded, shocked, blasted, corroded, boss, sporeSlowed, disarmed, electrified; + public static StatusEffect none, burning, freezing, unmoving, slow, wet, muddy, melting, sapped, tarred, overdrive, overclock, shielded, shocked, blasted, corroded, boss, sporeSlowed, disarmed, electrified, invincible; @Override public void load(){ @@ -188,5 +188,9 @@ public class StatusEffects implements ContentList{ color = Color.valueOf("e9ead3"); disarm = true; }}; + + invincible = new StatusEffect("invincible"){{ + healthMultiplier = Float.POSITIVE_INFINITY; + }}; } }