diff --git a/source/core/src/main/com/csse3200/game/components/tasks/mobtask/MobTask.java b/source/core/src/main/com/csse3200/game/components/tasks/MobTask/MobTask.java similarity index 99% rename from source/core/src/main/com/csse3200/game/components/tasks/mobtask/MobTask.java rename to source/core/src/main/com/csse3200/game/components/tasks/MobTask/MobTask.java index b5deeee16..08aa0b627 100644 --- a/source/core/src/main/com/csse3200/game/components/tasks/mobtask/MobTask.java +++ b/source/core/src/main/com/csse3200/game/components/tasks/MobTask/MobTask.java @@ -15,6 +15,7 @@ import com.csse3200.game.rendering.AnimationRenderComponent; import com.csse3200.game.services.GameTime; import com.csse3200.game.services.ServiceLocator; +import com.csse3200.game.components.tasks.MobTask.MobType; /** * The AI Task for all general mobs. This task handles the sequencing for melee diff --git a/source/core/src/main/com/csse3200/game/components/tasks/mobtask/MobType.java b/source/core/src/main/com/csse3200/game/components/tasks/MobTask/MobType.java similarity index 100% rename from source/core/src/main/com/csse3200/game/components/tasks/mobtask/MobType.java rename to source/core/src/main/com/csse3200/game/components/tasks/MobTask/MobType.java diff --git a/source/core/src/main/com/csse3200/game/entities/factories/WaveFactory.java b/source/core/src/main/com/csse3200/game/entities/factories/WaveFactory.java index c0526e42b..3dc6f8b33 100644 --- a/source/core/src/main/com/csse3200/game/entities/factories/WaveFactory.java +++ b/source/core/src/main/com/csse3200/game/entities/factories/WaveFactory.java @@ -27,25 +27,23 @@ public class WaveFactory { private static final Logger logger = LoggerFactory.getLogger(WaveFactory.class); private static Random rand = new Random(); - - // TODO: include necromancer private static final ArrayList MELEE_MOBS = new ArrayList<>(Arrays.asList( - "Skeleton", "Coat", "DragonKnight" + "Skeleton", "Coat", "DragonKnight", "Necromancer" )); private static final ArrayList> lvl1Structure = new ArrayList<>(Arrays.asList( new ArrayList<>(Arrays.asList("Coat" )), new ArrayList<>(Arrays.asList("Coat", "WaterQueen" - )), new ArrayList<>(Arrays.asList("WaterQueen", "WaterQueen" - )), new ArrayList<>(Arrays.asList("Coat", "WaterQueen", "Coat" + )), new ArrayList<>(Arrays.asList("WaterQueen", "SplittingWaterSlime" + )), new ArrayList<>(Arrays.asList("Coat", "WaterQueen", "SplittingWaterSlime" )) )); private static final ArrayList> lvl2Structure = new ArrayList<>(Arrays.asList( new ArrayList<>(Arrays.asList("Skeleton" - )), new ArrayList<>(Arrays.asList("Skeleton", "SplittingNightBorne" - )), new ArrayList<>(Arrays.asList("Skeleton", "Wizard" )), new ArrayList<>(Arrays.asList("Skeleton", "ArcaneArcher" + )), new ArrayList<>(Arrays.asList("Skeleton", "Wizard" + )), new ArrayList<>(Arrays.asList("Skeleton", "SplittingNightBorne" )), new ArrayList<>(Arrays.asList("Wizard", "SplittingNightBorne" )), new ArrayList<>(Arrays.asList("SplittingNightBorne", "Skeleton" )), new ArrayList<>(Arrays.asList("Wizard", "SplittingNightBorne" @@ -58,28 +56,20 @@ public class WaveFactory { new ArrayList<>(Arrays.asList("Necromancer" )), new ArrayList<>(Arrays.asList("Necromancer", "DodgingDragon" )), new ArrayList<>(Arrays.asList("Necromancer", "FireWorm" - )), new ArrayList<>(Arrays.asList("Necromancer", "FireWorm" - )), new ArrayList<>(Arrays.asList("SplittingRocky", "FireWorm" + )), new ArrayList<>(Arrays.asList("Necromancer", "DeflectFireWizard" + )), new ArrayList<>(Arrays.asList("DeflectFireWizard", "FireWorm" )), new ArrayList<>(Arrays.asList("DodgingDragon", "FireWorm" )), new ArrayList<>(Arrays.asList("DodgingDragon", "Necromancer" )), new ArrayList<>(Arrays.asList("FireWorm", "Necromancer" - )), new ArrayList<>(Arrays.asList("DeflectFireWiza","SplittingRocky", "Necromancer" - )), new ArrayList<>(Arrays.asList("DodgingDragon", "DeflectFireWizard", "SplittingRocky", "Necromancer" - )), new ArrayList<>(Arrays.asList("FireWorm", "DeflectWizard", "DodgingDragon" - )), new ArrayList<>(Arrays.asList("FireWorm", "DeflectWizard", "Necromancer" - )), new ArrayList<>(Arrays.asList("Necromancer", "DeflectFireWizard", "SplittingRocky", "DodgingDragon", "FireWorm" + )), new ArrayList<>(Arrays.asList("DeflectFireWizard", "Necromancer" + )), new ArrayList<>(Arrays.asList("DodgingDragon", "DeflectFireWizard", "Necromancer" + )), new ArrayList<>(Arrays.asList("FireWorm", "Necromancer", "DodgingDragon" + )), new ArrayList<>(Arrays.asList("FireWorm", "SplittingRocky", "Necromancer" + )), new ArrayList<>(Arrays.asList("SplittingRocky", "DeflectFireWizard", "FireWorm" + )), new ArrayList<>(Arrays.asList("DeflectFireWizard", "SplittingRocky", "Necromancer", "DodgingDragon", "FireWorm" )) )); - // The base health for the different mobs - private static int MELEE_BASE_HEALTH = 80; - private static int RANGE_BASE_HEALTH = 60; - - // Base health of the bosses - private static int LVL1_BOSS_BASE_HEALTH = 500; - private static int LVL2_BOSS_BASE_HEALTH = 1000; - private static int LVL3_BOSS_BASE_HEALTH = 2000; - private static final String BOSS_1 = "IceBoss"; private static final String BOSS_2 = "PatrickBoss"; private static final String BOSS_3 = "FireBoss"; @@ -139,6 +129,11 @@ public static LevelWaves createLevel(int chosenLevel) { String boss = ""; int bossHealth; int minMobs; + // Base health of the bosses + int LVL1_BOSS_BASE_HEALTH = 500; + int LVL2_BOSS_BASE_HEALTH = 1000; + int LVL3_BOSS_BASE_HEALTH = 2000; + switch (chosenLevel) { case 2: boss = BOSS_2; @@ -176,14 +171,19 @@ public static LevelWaves createLevel(int chosenLevel) { // Calculate the number of mobs for the wave if (leftToSort == 0) { num = minMobs - currentMobs; + System.out.println(num + " for " + mob + " at wave " + atWave); } else { - num = rand.nextInt(minMobs - currentMobs - (2 * leftToSort)) + 2; + num = rand.nextInt(minMobs - currentMobs - (2 * leftToSort) - 2) + 2; + System.out.println(num + " for " + mob + " at wave " + atWave); currentMobs += num; } // Calculate the health + int RANGE_BASE_HEALTH = 60; int health = RANGE_BASE_HEALTH; if (MELEE_MOBS.contains(mob)) { + // The base health for the different mobs + int MELEE_BASE_HEALTH = 80; health = MELEE_BASE_HEALTH; } int[] mobStats = {num, health + (atWave * chosenLevel)};