mirror of
https://github.com/darksaid98/AlathranWars.git
synced 2026-12-01 22:14:45 +00:00
updated siege cost
This commit is contained in:
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() + "!");
|
||||
}
|
||||
final OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayer(owner.getUniqueId());
|
||||
Main.econ.depositPlayer(offlinePlayer, 20000.0);
|
||||
Main.econ.depositPlayer(offlinePlayer, 2500.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;
|
||||
this.town.getAccount().withdraw(amt, "war loot");
|
||||
} else {
|
||||
if (this.town.getAccount().getHoldingBalance() < 20000.0) {
|
||||
if (this.town.getAccount().getHoldingBalance() < 2500.0) {
|
||||
amt = this.town.getAccount().getHoldingBalance();
|
||||
Bukkit.broadcastMessage(String.valueOf(Helper.Chatlabel()) + "The town of " + this.town.getName()
|
||||
+ " has been destroyed by " + this.getAttackers() + "!");
|
||||
@@ -284,8 +284,8 @@ public class Siege {
|
||||
Main.econ.depositPlayer(offlinePlayer, amt);
|
||||
return;
|
||||
}
|
||||
this.town.getAccount().withdraw(20000.0, "war loot");
|
||||
amt = 20000.0;
|
||||
this.town.getAccount().withdraw(2500.0, "war loot");
|
||||
amt = 2500.0;
|
||||
}
|
||||
Bukkit.broadcastMessage("The town of " + this.town.getName() + " has been sacked by " + this.getAttackers()
|
||||
+ ", valuing $" + String.valueOf(amt));
|
||||
@@ -298,11 +298,11 @@ public class Siege {
|
||||
}
|
||||
|
||||
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
|
||||
+ " have won the siege of " + 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
|
||||
.log("The defenders from " + this.defenders + " have won the siege of " + this.town.getName() + "!");
|
||||
stop();
|
||||
|
||||
@@ -225,13 +225,13 @@ public class SiegeCommands implements CommandExecutor
|
||||
}
|
||||
}
|
||||
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");
|
||||
Main.siegeData.getConfig().set("Sieges." + String.valueOf(SiegeCommands.maxID), (Object)null);
|
||||
Main.siegeData.saveConfig();
|
||||
return false;
|
||||
}
|
||||
Main.econ.withdrawPlayer(offlinePlayer, 20000.0);
|
||||
Main.econ.withdrawPlayer(offlinePlayer, 2500.0);
|
||||
SiegeCommands.sieges.add(siege2);
|
||||
siege2.start();
|
||||
siege2.createBeacon();
|
||||
|
||||
Reference in new issue
Block a user