From dea141e79ed1c0032b5e66f8f58cdb1adc3a4d98 Mon Sep 17 00:00:00 2001 From: Gaurav Arya Date: Wed, 5 Jan 2022 16:00:00 -0500 Subject: [PATCH] Process passive lead increases after charge --- engine/src/main/battlecode/world/GameWorld.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/engine/src/main/battlecode/world/GameWorld.java b/engine/src/main/battlecode/world/GameWorld.java index dc45081e..3ef13f89 100644 --- a/engine/src/main/battlecode/world/GameWorld.java +++ b/engine/src/main/battlecode/world/GameWorld.java @@ -402,11 +402,6 @@ public boolean timeLimitReached() { } public void processEndOfRound() { - // Add lead resources to the map - if (this.currentRound % GameConstants.ADD_LEAD_EVERY_ROUNDS == 0) - for (int i = 0; i < this.lead.length; i++) - if (this.lead[i] > 0) - this.lead[i] += GameConstants.ADD_LEAD; // Add lead resources to the team this.teamInfo.addLead(Team.A, GameConstants.PASSIVE_LEAD_INCREASE); @@ -429,6 +424,12 @@ public void processEndOfRound() { if (anomaly == AnomalyType.VORTEX) causeVortexGlobal(); } + // Add lead resources to the map + if (this.currentRound % GameConstants.ADD_LEAD_EVERY_ROUNDS == 0) + for (int i = 0; i < this.lead.length; i++) + if (this.lead[i] > 0) + this.lead[i] += GameConstants.ADD_LEAD; + this.matchMaker.addTeamInfo(Team.A, this.teamInfo.getRoundLeadChange(Team.A), this.teamInfo.getRoundGoldChange(Team.A)); this.matchMaker.addTeamInfo(Team.B, this.teamInfo.getRoundLeadChange(Team.B), this.teamInfo.getRoundGoldChange(Team.B)); this.teamInfo.processEndOfRound();