From b81553f49014f4e472f7ab1aacb0120ed2a375e6 Mon Sep 17 00:00:00 2001 From: Anuken Date: Tue, 17 Sep 2024 14:29:24 -0400 Subject: [PATCH] Minor bugfixes / New easier difficulty mode --- core/assets/bundles/bundle.properties | 1 + core/src/mindustry/ai/types/CommandAI.java | 4 ++-- core/src/mindustry/game/Difficulty.java | 1 + core/src/mindustry/world/blocks/defense/ForceProjector.java | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index dbf74d3235..549651a197 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -801,6 +801,7 @@ threat.high = High threat.extreme = Extreme threat.eradication = Eradication +difficulty.casual = Casual difficulty.easy = Easy difficulty.normal = Normal difficulty.hard = Hard diff --git a/core/src/mindustry/ai/types/CommandAI.java b/core/src/mindustry/ai/types/CommandAI.java index b72cba2d68..d7b5d480fd 100644 --- a/core/src/mindustry/ai/types/CommandAI.java +++ b/core/src/mindustry/ai/types/CommandAI.java @@ -358,8 +358,8 @@ public class CommandAI extends AIController{ public void commandQueue(Position location){ if(targetPos == null && attackTarget == null){ - if(location instanceof Teamc target){ - commandTarget(target, this.stopAtTarget); + if(location instanceof Teamc t){ + commandTarget(t, this.stopAtTarget); }else if(location instanceof Vec2 position){ commandPosition(position); } diff --git a/core/src/mindustry/game/Difficulty.java b/core/src/mindustry/game/Difficulty.java index 1f7943d72e..fe657294ed 100644 --- a/core/src/mindustry/game/Difficulty.java +++ b/core/src/mindustry/game/Difficulty.java @@ -4,6 +4,7 @@ import arc.*; public enum Difficulty{ //TODO these need tweaks + casual(0.75f, 0.5f, 2f), easy(1f, 0.75f, 1.5f), normal(1f, 1f, 1f), hard(1.25f, 1.5f, 0.8f), diff --git a/core/src/mindustry/world/blocks/defense/ForceProjector.java b/core/src/mindustry/world/blocks/defense/ForceProjector.java index f62e8fa12e..0013d4c2ff 100644 --- a/core/src/mindustry/world/blocks/defense/ForceProjector.java +++ b/core/src/mindustry/world/blocks/defense/ForceProjector.java @@ -51,7 +51,7 @@ public class ForceProjector extends Block{ protected static ForceBuild paramEntity; protected static Effect paramEffect; protected static final Cons shieldConsumer = bullet -> { - if(bullet.team != paramEntity.team && bullet.type.absorbable && Intersector.isInRegularPolygon(((ForceProjector)(paramEntity.block)).sides, paramEntity.x, paramEntity.y, paramEntity.realRadius(), ((ForceProjector)(paramEntity.block)).shieldRotation, bullet.x, bullet.y)){ + if(bullet.team != paramEntity.team && bullet.type.absorbable && !bullet.absorbed && Intersector.isInRegularPolygon(((ForceProjector)(paramEntity.block)).sides, paramEntity.x, paramEntity.y, paramEntity.realRadius(), ((ForceProjector)(paramEntity.block)).shieldRotation, bullet.x, bullet.y)){ bullet.absorb(); paramEffect.at(bullet); paramEntity.hit = 1f;