Implement monolith enhancement machines

This commit is contained in:
Melledy
2025-12-03 19:36:47 -08:00
parent 7ef7490c37
commit ef8846445c
13 changed files with 280 additions and 41 deletions

View File

@@ -0,0 +1,56 @@
package emu.nebula.game.tower;
import lombok.Getter;
/**
* Data class to hold various modifiers for star tower.
*/
@Getter
public class StarTowerModifiers {
private StarTowerGame game;
// Strengthen machines
private boolean enableEndStrengthen;
private boolean enableShopStrengthen;
private boolean freeStrengthen;
private int strengthenDiscount;
public StarTowerModifiers(StarTowerGame game) {
this.game = game;
// Strengthen machines
this.enableEndStrengthen = this.hasGrowthNode(10601) && game.getDifficulty() >= 2;
this.enableShopStrengthen = this.hasGrowthNode(20301) && game.getDifficulty() >= 4;
this.freeStrengthen = this.hasGrowthNode(10801);
if (this.hasGrowthNode(30402)) {
this.strengthenDiscount += 60;
} else if (this.hasGrowthNode(30102)) {
this.strengthenDiscount += 30;
}
}
public boolean hasGrowthNode(int nodeId) {
return this.getGame().getManager().hasGrowthNode(nodeId);
}
public int getStartingCoin() {
int gold = 0;
if (this.hasGrowthNode(10103)) {
gold += 50;
} if (this.hasGrowthNode(10403)) {
gold += 100;
} if (this.hasGrowthNode(10702)) {
gold += 200;
}
return gold;
}
public void setFreeStrengthen(boolean b) {
this.freeStrengthen = b;
}
}