|
@@ -1260,28 +1260,6 @@ public class GDRoom extends Room {
|
|
|
// 原级牌点数
|
|
|
int oldLevelPoint = this.data.curLevelPoint;
|
|
|
|
|
|
- // 2人房
|
|
|
- if (this.data.maxNum == 2) {
|
|
|
- Struct.SettlementData loserPlayerData = this.data.result.getOrDefault(2, null);
|
|
|
- if (loserPlayerData == null || StringUtils.isEmpty(loserPlayerData.playerId)) {
|
|
|
- return;
|
|
|
- }
|
|
|
- p4 = this.actors.getOrDefault(loserPlayerData.playerId, null);
|
|
|
- if (p4 == null) {
|
|
|
- return;
|
|
|
- }
|
|
|
- builder.append("1游玩家: ").append(winPlayer.data.name)
|
|
|
- .append(" 升3级, ");
|
|
|
- // 设置我方玩家级牌点数展示
|
|
|
- int myIndex = Math.min(winPlayer.data.levelIndex + 3, GDUtils.levelPoint.length - 1);
|
|
|
- winPlayer.data.levelIndex = myIndex;
|
|
|
- winPlayer.data.levelPointView[0] = GDUtils.levelPoint[myIndex];
|
|
|
- // 设置对方级牌点数展示
|
|
|
- p4.data.levelPointView[1] = winPlayer.data.levelPointView[0];
|
|
|
- // 设置全局当前级牌点数
|
|
|
- this.data.curLevelPoint = Math.max(winPlayer.data.levelPointView[0], winPlayer.data.levelPointView[1]);
|
|
|
- }
|
|
|
-
|
|
|
// 4人房
|
|
|
if (this.data.maxNum == 4) {
|
|
|
// 升级数
|
|
@@ -1313,32 +1291,34 @@ public class GDRoom extends Room {
|
|
|
}
|
|
|
// 根据类型判断结束走向
|
|
|
if (this.data.mode == 1) {
|
|
|
- if (winPlayer.data.levelPointView[0] >= this.data.modev) {
|
|
|
- this.data.isOver = true;
|
|
|
- // 设置全局当前级牌点数
|
|
|
- this.data.curLevelPoint = this.data.modev;
|
|
|
- } else {
|
|
|
- this.data.isOver = false;
|
|
|
- // 升级
|
|
|
- winPlayer.data.levelIndex = Math.min(winPlayer.data.levelIndex + upLevel, GDUtils.levelPoint.length - 1);
|
|
|
- // 设置分数等级
|
|
|
- for (Struct.SettlementData settlementData : this.data.result.values()) {
|
|
|
- if (settlementData != null) {
|
|
|
- Player tmPlayer = this.actors.getOrDefault(settlementData.playerId, null);
|
|
|
- if (tmPlayer != null) {
|
|
|
- if (settlementData.playerId.equals(winPlayer.getId())
|
|
|
- || settlementData.playerId.equals(teammateData.player.getId())) {
|
|
|
- settlementData.score = upLevel;
|
|
|
- tmPlayer.data.levelPointView[0] = Math.min(GDUtils.levelPoint[winPlayer.data.levelIndex], this.data.modev);
|
|
|
- } else {
|
|
|
- settlementData.score = 0;
|
|
|
- tmPlayer.data.levelPointView[1] = Math.min(GDUtils.levelPoint[winPlayer.data.levelIndex], this.data.modev);
|
|
|
- }
|
|
|
+ this.data.isOver = false;
|
|
|
+ // 升级
|
|
|
+ winPlayer.data.levelIndex = Math.min(winPlayer.data.levelIndex + upLevel, GDUtils.levelPoint.length - 1);
|
|
|
+ int score = winPlayer.data.levelPointView[0] + upLevel;//胜利方牌级
|
|
|
+ // 设置分数等级
|
|
|
+ for (Struct.SettlementData settlementData : this.data.result.values()) {
|
|
|
+ if (settlementData != null) {
|
|
|
+ Player tmPlayer = this.actors.getOrDefault(settlementData.playerId, null);
|
|
|
+ if (tmPlayer != null) {
|
|
|
+ if (settlementData.playerId.equals(winPlayer.getId()) || settlementData.playerId.equals(teammateData.player.getId())) {
|
|
|
+ settlementData.score = upLevel;
|
|
|
+// tmPlayer.data.levelPointView[0] = Math.min(GDUtils.levelPoint[winPlayer.data.levelIndex], this.data.modev);
|
|
|
+ tmPlayer.data.levelPointView[0] = Math.min(score, this.data.modev);
|
|
|
+ } else {
|
|
|
+ settlementData.score = 0;
|
|
|
+// tmPlayer.data.levelPointView[1] = Math.min(GDUtils.levelPoint[winPlayer.data.levelIndex], this.data.modev);
|
|
|
+ tmPlayer.data.levelPointView[1] = Math.min(score, this.data.modev);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ }
|
|
|
+ // 设置全局当前级牌点数
|
|
|
+ this.data.curLevelPoint = winPlayer.data.levelPointView[0];
|
|
|
+
|
|
|
+ if (winPlayer.data.levelPointView[0] >= this.data.modev) {
|
|
|
+ this.data.isOver = true;
|
|
|
// 设置全局当前级牌点数
|
|
|
- this.data.curLevelPoint = winPlayer.data.levelPointView[0];
|
|
|
+ this.data.curLevelPoint = this.data.modev;
|
|
|
}
|
|
|
} else {
|
|
|
// 升级
|
|
@@ -1348,8 +1328,7 @@ public class GDRoom extends Room {
|
|
|
if (settlementData != null) {
|
|
|
Player tmPlayer = this.actors.getOrDefault(settlementData.playerId, null);
|
|
|
if (tmPlayer != null) {
|
|
|
- if (settlementData.playerId.equals(winPlayer.getId())
|
|
|
- || settlementData.playerId.equals(teammateData.player.getId())) {
|
|
|
+ if (settlementData.playerId.equals(winPlayer.getId()) || settlementData.playerId.equals(teammateData.player.getId())) {
|
|
|
settlementData.score = upLevel;
|
|
|
tmPlayer.data.levelPointView[0] = GDUtils.levelPoint[winPlayer.data.levelIndex];
|
|
|
} else {
|