Skip to content

Commit

Permalink
Added new mobs to new wave structure
Browse files Browse the repository at this point in the history
  • Loading branch information
MiniSoda17 committed Oct 15, 2023
1 parent a35c44d commit 3143751
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ public void spawnMob(String entity, GridPoint2 randomPos, int health) {
mob = NPCFactory.createSkeleton(health);
break;
case "DeflectWizard":
mob = NPCFactory.createDeflectWizard(health);
mob = NPCFactory.createWizard(health);
break;
case "WaterQueen":
mob = NPCFactory.createWaterQueen(health);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,18 @@ public void spawnAdditionalMob(float positionX, float positionY,
entityType = NPCFactory.createBaseWaterSlime(baseMoblingHealth);
}
}

entityType.setPosition(positionX, positionY);

entityType.setScale(initialScaleX * scaleX, initialScaleY * scaleY);
switch (mobType) {
case NIGHT_BORNE -> {
entityType.setScale(initialScaleX, initialScaleY);
}
default -> {
entityType.setScale(initialScaleX * scaleX, initialScaleY * scaleY);
}
}


ServiceLocator.getEntityService().register(entityType);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,38 +36,38 @@ public class WaveFactory {
private static final ArrayList<ArrayList<String>> lvl1Structure = new ArrayList<>(Arrays.asList(
new ArrayList<>(Arrays.asList("Coat"
)), new ArrayList<>(Arrays.asList("Coat", "WaterQueen"
)), new ArrayList<>(Arrays.asList("WaterQueen", "SplittingWaterSlime"
)), new ArrayList<>(Arrays.asList("Coat", "WaterQueen", "SplittingWaterSlime"
)), new ArrayList<>(Arrays.asList("WaterQueen", "WaterQueen"
)), new ArrayList<>(Arrays.asList("Coat", "WaterQueen", "Coat"
))
));

private static final ArrayList<ArrayList<String>> 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", "DeflectWizard"
)), new ArrayList<>(Arrays.asList("Skeleton", "NightBorne"
)), new ArrayList<>(Arrays.asList("DeflectWizard", "NightBorne"
)), new ArrayList<>(Arrays.asList("NightBorne", "Skeleton"
)), new ArrayList<>(Arrays.asList("DeflectWizard", "NightBorne"
)), new ArrayList<>(Arrays.asList("ArcaneArcher", "NightBorne", "DeflectWizard"
)), new ArrayList<>(Arrays.asList("Skeleton", "ArcaneArcher", "DeflectWizard", "NightBorne"
)), new ArrayList<>(Arrays.asList("Wizard", "SplittingNightBorne"
)), new ArrayList<>(Arrays.asList("SplittingNightBorne", "Skeleton"
)), new ArrayList<>(Arrays.asList("Wizard", "SplittingNightBorne"
)), new ArrayList<>(Arrays.asList("ArcaneArcher", "SplittingNightBorne", "Wizard"
)), new ArrayList<>(Arrays.asList("Skeleton", "ArcaneArcher", "Wizard", "SplittingNightBorne"
))
));

private static final ArrayList<ArrayList<String>> lvl3Structure = new ArrayList<>(Arrays.asList(
new ArrayList<>(Arrays.asList("Coat"
)), new ArrayList<>(Arrays.asList("Coat", "DodgingDragon"
)), new ArrayList<>(Arrays.asList("Coat", "FireWorm"
)), new ArrayList<>(Arrays.asList("Coat", "Coat"
)), new ArrayList<>(Arrays.asList("Coat", "FireWorm"
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("DodgingDragon", "FireWorm"
)), new ArrayList<>(Arrays.asList("DodgingDragon", "Coat"
)), new ArrayList<>(Arrays.asList("FireWorm", "Coat"
)), new ArrayList<>(Arrays.asList("Coat", "Coat"
)), new ArrayList<>(Arrays.asList("DodgingDragon", "Coat", "Coat"
)), new ArrayList<>(Arrays.asList("FireWorm", "Coat", "DodgingDragon"
)), new ArrayList<>(Arrays.asList("FireWorm", "Coat", "Coat"
)), new ArrayList<>(Arrays.asList("Coat", "Coat", "Coat", "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"
))
));

Expand Down Expand Up @@ -153,7 +153,7 @@ public static LevelWaves createLevel(int chosenLevel) {
minMobs = 8;
break;
default:
boss = BOSS_2;
boss = BOSS_1;
bossHealth = LVL1_BOSS_BASE_HEALTH;
possibleMobs = lvl1Structure;
minMobs = 5;
Expand Down

0 comments on commit 3143751

Please sign in to comment.