【玉虚优化】优化分数丢失规则: +新增表格内修正分数
parent
e8ac427ae3
commit
c92e5b1b7a
|
@ -161,6 +161,23 @@ public class CrossYuxulundaoChallengeHandler extends BaseHandler<ArenaInfoProto.
|
|||
winerGetScore = setting.getBattleWinReward()[0]+(ackScores-defScores);
|
||||
loserGetScore = setting.getBattleLoseReward()[0]+(defScores-ackScores);
|
||||
}
|
||||
|
||||
//降分公式的基础上×70%
|
||||
if(loserGetScore<0){
|
||||
loserGetScore = (int)Math.floor(loserGetScore*0.7);
|
||||
}
|
||||
//+新增表格内修正分数
|
||||
int ackRandId = SMServerRankConfig.getIdByScore(ackScores);
|
||||
if (SMServerRankConfig.serverRankConfig.containsKey(ackRandId)) {
|
||||
SMServerRankConfig serverRankConfig = SMServerRankConfig.serverRankConfig.get(ackRandId);
|
||||
winerGetScore += serverRankConfig.getLimitScore();
|
||||
}
|
||||
int defRandId = SMServerRankConfig.getIdByScore(defScores);
|
||||
if (SMServerRankConfig.serverRankConfig.containsKey(defRandId)) {
|
||||
SMServerRankConfig serverRankConfig = SMServerRankConfig.serverRankConfig.get(defRandId);
|
||||
loserGetScore += serverRankConfig.getLimitScore();
|
||||
}
|
||||
|
||||
if(winerGetScore>setting.getScoreRange()[1]){ //35
|
||||
winerGetScore = setting.getScoreRange()[1];
|
||||
}else if(winerGetScore<setting.getScoreRange()[0]){ //1
|
||||
|
@ -171,10 +188,6 @@ public class CrossYuxulundaoChallengeHandler extends BaseHandler<ArenaInfoProto.
|
|||
}else if(loserGetScore<-setting.getScoreRange()[1]){//-35
|
||||
loserGetScore = -setting.getScoreRange()[1];
|
||||
}
|
||||
//降分公式的基础上×70%
|
||||
if(loserGetScore<0){
|
||||
loserGetScore = (int)Math.floor(loserGetScore*0.7);
|
||||
}
|
||||
|
||||
int defScore;//对手分数
|
||||
AbstractRank rank = RankContext.getRankEnum(RankEnum.CROSS_YUXULUNDAO_RANK_PERSON.getType());
|
||||
|
|
|
@ -32,6 +32,8 @@ public class SMServerRankConfig implements BaseConfig {
|
|||
|
||||
private int scoreUp1;
|
||||
|
||||
private int LimitScore;
|
||||
|
||||
|
||||
|
||||
public static Map<Integer, SMServerRankConfig> serverRankConfig;
|
||||
|
@ -98,4 +100,8 @@ public class SMServerRankConfig implements BaseConfig {
|
|||
public int getScoreUp1() {
|
||||
return scoreUp1;
|
||||
}
|
||||
|
||||
public int getLimitScore() {
|
||||
return LimitScore;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue