Colors, basic mob AI categories, end world hunger, UX buffs

This commit is contained in:
2022-05-15 18:16:35 +02:00
parent 9890936154
commit 99197d92bb
13 changed files with 275 additions and 103 deletions

View File

@@ -46,7 +46,7 @@ public class ScaledWaves implements Game {
MobWave(HashMap<EntityType, Double> weights, int totalCount, int batches, boolean hasRavager) {
m_batches = batches;
m_mobsPerBatch = Math.max(1, totalCount / batches);
m_mobsPerBatch = Math.max(1, totalCount / batches) * 3;
m_spawnWeights = weights;
m_hasRavager = hasRavager;
}
@@ -58,7 +58,7 @@ public class ScaledWaves implements Game {
@Override
public void spawnBatch(Spawner spawner, int batch) {
double healthScale = -0.5;
double healthScale = -0.7;
AttributeModifier modifier = new AttributeModifier("Scaled Health", healthScale, AttributeModifier.Operation.MULTIPLY_SCALAR_1);
assert(m_mobsPerBatch > 0);
for(int i = 0; i < m_mobsPerBatch; i++) {
@@ -72,9 +72,14 @@ public class ScaledWaves implements Game {
}
}
assert(selectedType != null);
Mob newMob = (Mob)spawner.spawnBombCarrier(selectedType);
Mob newMob;
if (selectedType == EntityType.ZOMBIE) {
newMob = (Mob)spawner.spawnBombCarrier(selectedType);
newMob.getAttribute(Attribute.GENERIC_MAX_HEALTH).addModifier(modifier);
} else {
newMob = (Mob)spawner.spawnMob(selectedType);
}
newMob.setCustomName("Mob " + i + "/" + m_mobsPerBatch);
newMob.getAttribute(Attribute.GENERIC_MAX_HEALTH).addModifier(modifier);
}
if (m_hasRavager) {
Entity newMob = spawner.spawnMob(EntityType.RAVAGER);