updated siege cost

This commit is contained in:
ShermansWorld committed 2023-03-13 16:19:56 -04:00
1 parent 78268810dd
commit dc7f29943e
2 files changed
+9 -9

No files matched your search

@@ -270,13 +270,13 @@ public class Siege {
+ " has been placed under occupation by " + nation.getName() + "!"); + " has been placed under occupation by " + nation.getName() + "!");
} }
final OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayer(owner.getUniqueId()); final OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayer(owner.getUniqueId());
Main.econ.depositPlayer(offlinePlayer, 20000.0); Main.econ.depositPlayer(offlinePlayer, 2500.0);
double amt = 0.0; double amt = 0.0;
if (this.town.getAccount().getHoldingBalance() > 80000.0) { if (this.town.getAccount().getHoldingBalance() > 10000.0) {
amt = Math.floor(this.town.getAccount().getHoldingBalance()) / 4.0; amt = Math.floor(this.town.getAccount().getHoldingBalance()) / 4.0;
this.town.getAccount().withdraw(amt, "war loot"); this.town.getAccount().withdraw(amt, "war loot");
} else { } else {
if (this.town.getAccount().getHoldingBalance() < 20000.0) { if (this.town.getAccount().getHoldingBalance() < 2500.0) {
amt = this.town.getAccount().getHoldingBalance(); amt = this.town.getAccount().getHoldingBalance();
Bukkit.broadcastMessage(String.valueOf(Helper.Chatlabel()) + "The town of " + this.town.getName() Bukkit.broadcastMessage(String.valueOf(Helper.Chatlabel()) + "The town of " + this.town.getName()
+ " has been destroyed by " + this.getAttackers() + "!"); + " has been destroyed by " + this.getAttackers() + "!");
@@ -284,8 +284,8 @@ public class Siege {
Main.econ.depositPlayer(offlinePlayer, amt); Main.econ.depositPlayer(offlinePlayer, amt);
return; return;
} }
this.town.getAccount().withdraw(20000.0, "war loot"); this.town.getAccount().withdraw(2500.0, "war loot");
amt = 20000.0; amt = 2500.0;
} }
Bukkit.broadcastMessage("The town of " + this.town.getName() + " has been sacked by " + this.getAttackers() Bukkit.broadcastMessage("The town of " + this.town.getName() + " has been sacked by " + this.getAttackers()
+ ", valuing $" + String.valueOf(amt)); + ", valuing $" + String.valueOf(amt));
@@ -298,11 +298,11 @@ public class Siege {
} }
public void defendersWin() { public void defendersWin() {
this.town.getAccount().deposit(20000.0, "War chest"); this.town.getAccount().deposit(2500.0, "War chest");
Bukkit.broadcastMessage(String.valueOf(Helper.Chatlabel()) + "The defenders from " + this.defenders Bukkit.broadcastMessage(String.valueOf(Helper.Chatlabel()) + "The defenders from " + this.defenders
+ " have won the siege of " + this.town.getName() + "!"); + " have won the siege of " + this.town.getName() + "!");
Bukkit.broadcastMessage(String.valueOf(Helper.Chatlabel()) + this.town.getName() Bukkit.broadcastMessage(String.valueOf(Helper.Chatlabel()) + this.town.getName()
+ " has recovered the attackers' war chest, valued at $20,000"); + " has recovered the attackers' war chest, valued at $2,500");
Main.warLogger Main.warLogger
.log("The defenders from " + this.defenders + " have won the siege of " + this.town.getName() + "!"); .log("The defenders from " + this.defenders + " have won the siege of " + this.town.getName() + "!");
stop(); stop();
@@ -225,13 +225,13 @@ public class SiegeCommands implements CommandExecutor
} }
} }
final OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayer(p.getUniqueId()); final OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayer(p.getUniqueId());
if (Main.econ.getBalance(offlinePlayer) <= 20000.0) { if (Main.econ.getBalance(offlinePlayer) <= 2500.0) {
p.sendMessage(String.valueOf(Helper.Chatlabel()) + "You must have at least $20,000 to put up to start a siege"); p.sendMessage(String.valueOf(Helper.Chatlabel()) + "You must have at least $20,000 to put up to start a siege");
Main.siegeData.getConfig().set("Sieges." + String.valueOf(SiegeCommands.maxID), (Object)null); Main.siegeData.getConfig().set("Sieges." + String.valueOf(SiegeCommands.maxID), (Object)null);
Main.siegeData.saveConfig(); Main.siegeData.saveConfig();
return false; return false;
} }
Main.econ.withdrawPlayer(offlinePlayer, 20000.0); Main.econ.withdrawPlayer(offlinePlayer, 2500.0);
SiegeCommands.sieges.add(siege2); SiegeCommands.sieges.add(siege2);
siege2.start(); siege2.start();
siege2.createBeacon(); siege2.createBeacon();