too many things to list

This commit is contained in:
Anuken
2020-10-15 13:44:20 -04:00
parent fb0179da95
commit 86c2fe8805
52 changed files with 665 additions and 117 deletions

View File

@@ -52,8 +52,8 @@ public class SpawnGroup implements Serializable{
//serialization use only
}
/** Returns the amount of units spawned on a specific wave. */
public int getUnitsSpawned(int wave){
/** @return amount of units spawned on a specific wave. */
public int getSpawned(int wave){
if(spacing == 0) spacing = 1;
if(wave < begin || wave > end || (wave - begin) % spacing != 0){
return 0;
@@ -61,6 +61,11 @@ public class SpawnGroup implements Serializable{
return Math.min(unitAmount + (int)(((wave - begin) / spacing) / unitScaling), max);
}
/** @return amount of shields each unit has at a specific wave. */
public float getShield(int wave){
return Math.max(shields + shieldScaling*(wave - begin), 0);
}
/**
* Creates a unit, and assigns correct values based on this group's data.
* This method does not add() the unit.
@@ -76,7 +81,7 @@ public class SpawnGroup implements Serializable{
unit.addItem(items.item, items.amount);
}
unit.shield(Math.max(shields + shieldScaling*(wave - begin), 0));
unit.shield = getShield(wave);
return unit;
}