Class WaveFactory
java.lang.Object
com.csse3200.game.entities.factories.WaveFactory
-
Method Summary
Modifier and TypeMethodDescriptionstatic LevelWaves
createLevel
(int maxDiff, int maxWaves, int chosenLevel) This function is responsible for creating the level and all the waves associated with it.static Entity
The function will create the waves depending on the level selected by the user.
-
Method Details
-
createWaves
The function will create the waves depending on the level selected by the user. -
createLevel
This function is responsible for creating the level and all the waves associated with it. It takes in the difficulty, number of waves and level selected by the user. From the level selected by the user, it will produce the waves for the level. Depending on the level selected (1 easy, 2 medium, 3 hard), the number of waves will increase as well as the number of mobs per wave and the health of the mobs. Based on the level the mobs will change and waves will be constructed from two random mobs of the possible ones allocated for that level. Based on the level chosen the health of the mobs will increase at a greater rate. For wave i the health will be increased from BASE_HEALTH to BASE_HEALTH + (I * chosen_level) so the difficulty increases quicker. Bosses are spawned every 5 waves and the health of the bosses increases as the level increases. For every 5 levels another boss is included (5th wave -> 1 boss, 10th wave -> 2 bosses etc.)- Parameters:
maxDiff
- - the maximum difficulty of the level (the start number of mobs - 3)maxWaves
- - the maximum number of waves for the levelchosenLevel
- - the level selected by the user- Returns:
- level - the level constructed with all the waves of mobs
-