mirror of
https://github.com/Melledy/Nebula.git
synced 2025-12-13 12:54:36 +01:00
Fix potential count when giving up a Monolith run
This commit is contained in:
@@ -215,6 +215,10 @@ public class StarTowerGame {
|
||||
return this.getRarePotentialCount().get(charId);
|
||||
}
|
||||
|
||||
public int getTotalPotentialCount() {
|
||||
return this.getItems().values().intStream().reduce(0, Integer::sum);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the team element, if the team has 2+ or more elements, then returns null
|
||||
*/
|
||||
|
||||
@@ -20,6 +20,7 @@ public class HandlerStarTowerGiveUpReq extends NetHandler {
|
||||
// Build response
|
||||
var rsp = StarTowerGiveUpResp.newInstance()
|
||||
.setBuild(game.getBuild().toProto())
|
||||
.setPotentialCnt(game.getTotalPotentialCount())
|
||||
.setFloor(game.getFloorCount());
|
||||
|
||||
rsp.getMutableChange();
|
||||
|
||||
Reference in New Issue
Block a user