From 2ec6d98be758d4d05a458250e3d0728f3bb3323d Mon Sep 17 00:00:00 2001 From: Samantha Sullivan Date: Tue, 3 Oct 2023 07:44:44 +1000 Subject: [PATCH] made requested changes of pull request: change fireboss and remove splittingxeno --- .../csse3200/game/areas/ForestGameArea.java | 37 ++----------------- .../game/entities/factories/WaveFactory.java | 10 +++-- .../entities/factories/WaveFactoryTest.java | 10 +++-- 3 files changed, 16 insertions(+), 41 deletions(-) diff --git a/source/core/src/main/com/csse3200/game/areas/ForestGameArea.java b/source/core/src/main/com/csse3200/game/areas/ForestGameArea.java index 6d1a9258f..2502de074 100644 --- a/source/core/src/main/com/csse3200/game/areas/ForestGameArea.java +++ b/source/core/src/main/com/csse3200/game/areas/ForestGameArea.java @@ -457,68 +457,39 @@ public void spawnMob(String entity, GridPoint2 randomPos, int health) { case "Xeno": mob = NPCFactory.createXenoGrunt(health); break; - case "SplittingXeno": - mob = NPCFactory.createSplittingXenoGrunt(health); - break; case "SplittingWaterSlime": mob = NPCFactory.createSplittingWaterSlime(health); break; case "DodgingDragon": mob = NPCFactory.createDodgingDragonKnight(health); break; -// case "DeflectXeno": -// mob = NPCFactory.createDeflectXenoGrunt(health); -// break; -// case "WaterSlime": -// mob = NPCFactory.createWaterSlime(health); -// break; case "FireWorm": mob = NPCFactory.createFireWorm(health); break; case "Skeleton": mob = NPCFactory.createSkeleton(health); break; -// case "Wizard": -// mob = NPCFactory.createWizard(health); -// break; -// case "MagicBoss": -// mob = MobBossFactory.createPatrickBoss(health); -// break; -// case "WaterBoss": -// mob = NPCFactory.createWaterQueen(health); -// break; - case "FireBoss": - mob = MobBossFactory.createDemonBoss(health); - break; case "DeflectWizard": mob = NPCFactory.createDeflectWizard(health); break; case "WaterQueen": mob = NPCFactory.createWaterQueen(health); break; -// case "FireWorm": -// mob = NPCFactory.createFireWorm(health); -// break; -// case "Skeleton": -// mob = NPCFactory.createSkeleton(health); + //TODO implement when boss is ready +// case "FireBoss": +// mob = MobBossFactory.createDemonBoss(health); // break; case "IceBoss": mob = MobBossFactory.createIceBoss(health); break; -// case "DemonBoss": -// mob = MobBossFactory.createDemonBoss(health); -// break; case "PatrickBoss": mob = MobBossFactory.createPatrickBoss(health); break; default: mob = NPCFactory.createXenoGrunt(health); -// mob = NPCFactory.createBaseNPC(); break; } -// mob.setScale(1.5f, 1.5f); -// mob = NPCFactory.createXenoGrunt(health); -// } + if (entity.contains("Boss")) { mob.scaleHeight(5f); mob.scaleWidth(5f); 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 76058653d..b54575d4e 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 @@ -85,14 +85,16 @@ public static Entity createWaves() { public static LevelWaves createLevel(int maxDiff, int maxWaves, int chosenLevel) { int minMobs = 3 + maxDiff; // These are the mobs assigned to the associated levels (planets) - ArrayList level1Mobs = new ArrayList<>(Arrays.asList("Xeno", "SplittingXeno", "SplittingWaterSlime", "WaterQueen")); - ArrayList level2Mobs = new ArrayList<>(Arrays.asList("Xeno", "SplittingXeno", "Skeleton", "DeflectWizard")); - ArrayList level3Mobs = new ArrayList<>(Arrays.asList("Xeno", "SplittingXeno", "DodgingDragon", "FireWorm")); + ArrayList level1Mobs = new ArrayList<>(Arrays.asList("Xeno", "SplittingWaterSlime", "WaterQueen")); + ArrayList level2Mobs = new ArrayList<>(Arrays.asList("Xeno", "Skeleton", "DeflectWizard")); + ArrayList level3Mobs = new ArrayList<>(Arrays.asList("Xeno", "DodgingDragon", "FireWorm")); // The mob bosses assigned to the associated levels (planets) String boss1 = "IceBoss"; String boss2 = "PatrickBoss"; - String boss3 = "FireBoss"; + String boss3 = "IceBoss"; + //TODO change this to a fire boss in sprint 4 +// String boss3 = "FireBoss"; LevelWaves level = new LevelWaves(5); ArrayList possibleMobs; diff --git a/source/core/src/test/com/csse3200/game/entities/factories/WaveFactoryTest.java b/source/core/src/test/com/csse3200/game/entities/factories/WaveFactoryTest.java index 4377a2f78..282833612 100644 --- a/source/core/src/test/com/csse3200/game/entities/factories/WaveFactoryTest.java +++ b/source/core/src/test/com/csse3200/game/entities/factories/WaveFactoryTest.java @@ -44,22 +44,24 @@ class WaveFactoryTest { private final int LVL1_DIFF = 2; private final int LVL1_WAVES = 5; private final int LVL1_CHOSEN_LVL = 1; - private final ArrayList LVL1_MOBS = new ArrayList<>(Arrays.asList("Xeno", "SplittingXeno", "SplittingWaterSlime", "WaterQueen")); + private final ArrayList LVL1_MOBS = new ArrayList<>(Arrays.asList("Xeno", "SplittingWaterSlime", "WaterQueen")); private final String LVL1_BOSS = "IceBoss"; // level stats for level 2 - magic planet private final int LVL2_DIFF = 3; private final int LVL2_WAVES = 10; private final int LVL2_CHOSEN_LVL = 0; - private final ArrayList LVL2_MOBS = new ArrayList<>(Arrays.asList("Xeno", "SplittingXeno", "Skeleton", "DeflectWizard")); + private final ArrayList LVL2_MOBS = new ArrayList<>(Arrays.asList("Xeno", "Skeleton", "DeflectWizard")); private final String LVL2_BOSS = "PatrickBoss"; // level stats for level 3 - fire planet private final int LVL3_DIFF = 5; private final int LVL3_WAVES = 15; private final int LVL3_CHOSEN_LVL = 2; - private final ArrayList LVL3_MOBS = new ArrayList<>(Arrays.asList("Xeno", "SplittingXeno", "DodgingDragon", "FireWorm")); - private final String LVL3_BOSS = "FireBoss"; + private final ArrayList LVL3_MOBS = new ArrayList<>(Arrays.asList("Xeno", "DodgingDragon", "FireWorm")); + private final String LVL3_BOSS = "IceBoss"; +// private final String LVL3_BOSS = "FireBoss"; + //TODO: make this a fire boss in sprint 4 private static final String[] waveSounds = { "sounds/waves/wave-start/Wave_Start_Alarm.ogg",