mirror of
https://github.com/Melledy/Nebula.git
synced 2025-12-16 14:24:57 +01:00
Implement monolith shop refresh
This commit is contained in:
@@ -19,6 +19,12 @@ public class StarTowerModifiers {
|
||||
// Bonus max potential level
|
||||
private int bonusMaxPotentialLevel;
|
||||
|
||||
// Shop
|
||||
private int shopGoodsCount;
|
||||
|
||||
private int shopRerollCount;
|
||||
private int shopRerollPrice;
|
||||
|
||||
public StarTowerModifiers(StarTowerGame game) {
|
||||
this.game = game;
|
||||
|
||||
@@ -41,6 +47,28 @@ public class StarTowerModifiers {
|
||||
} else if (this.hasGrowthNode(20601)) {
|
||||
this.bonusMaxPotentialLevel = 4;
|
||||
}
|
||||
|
||||
// Shop
|
||||
if (this.hasGrowthNode(20702)) {
|
||||
this.shopGoodsCount = 8;
|
||||
} else if (this.hasGrowthNode(20402)) {
|
||||
this.shopGoodsCount = 6;
|
||||
} else if (this.hasGrowthNode(10402)) {
|
||||
this.shopGoodsCount = 4;
|
||||
} else {
|
||||
this.shopGoodsCount = 2;
|
||||
}
|
||||
|
||||
if (this.hasGrowthNode(20902)) {
|
||||
this.shopRerollCount++;
|
||||
}
|
||||
if (this.hasGrowthNode(30601)) {
|
||||
this.shopRerollCount++;
|
||||
}
|
||||
|
||||
if (this.shopRerollCount > 0) {
|
||||
this.shopRerollPrice = 100;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean hasGrowthNode(int nodeId) {
|
||||
@@ -64,4 +92,8 @@ public class StarTowerModifiers {
|
||||
public void setFreeStrengthen(boolean b) {
|
||||
this.freeStrengthen = b;
|
||||
}
|
||||
|
||||
public void consumeShopReroll() {
|
||||
this.shopRerollCount = Math.max(this.shopRerollCount - 1, 0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user