From feb23e63fe60ea650fb0d90b0c77be8c8efde024 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Fri, 1 Mar 2024 19:41:34 -0600 Subject: [PATCH] zerg mechanic overhaul --- src/engine/gameManager/ZergManager.java | 4 ++-- src/engine/objects/Mine.java | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/engine/gameManager/ZergManager.java b/src/engine/gameManager/ZergManager.java index 5db40ec4..ab78e733 100644 --- a/src/engine/gameManager/ZergManager.java +++ b/src/engine/gameManager/ZergManager.java @@ -234,12 +234,12 @@ public class ZergManager { public static float getReducedZergMultiplier(PlayerCharacter source, PlayerCharacter target){ if(source.ZergMultiplier == 0.0f) { - if(Mine.getMine(source.mineAppliedID)._playerMemory.contains(source.getObjectUUID()) == false ){ + if(Mine.getMine(source.mineAppliedID) != null && Mine.getMine(source.mineAppliedID)._playerMemory.contains(source.getObjectUUID()) == false ){ source.ZergMultiplier = 1.0f; } } if(target.ZergMultiplier == 0.0f) { - if(Mine.getMine(source.mineAppliedID)._playerMemory.contains(target.getObjectUUID()) == false){ + if(Mine.getMine(target.mineAppliedID) != null && Mine.getMine(target.mineAppliedID)._playerMemory.contains(target.getObjectUUID()) == false){ target.ZergMultiplier = 1.0f; } } diff --git a/src/engine/objects/Mine.java b/src/engine/objects/Mine.java index ef2e6a78..8ee92916 100644 --- a/src/engine/objects/Mine.java +++ b/src/engine/objects/Mine.java @@ -776,6 +776,7 @@ public class Mine extends AbstractGameObject { } } for(Integer id : purge){ + PlayerCharacter.getPlayerCharacter(id).mineAppliedID = 0; _recentMemory.remove(id); } if(toRemove.isEmpty()){