public int UpdateV3(AvatarState avatarState, ArenaInfo enemyInfo, BattleLog.Result result) { switch (result) { case BattleLog.Result.Win: ArenaRecord.Win++; break; case BattleLog.Result.Lose: ArenaRecord.Lose++; break; case BattleLog.Result.TimeOver: ArenaRecord.Draw++; return(0); default: throw new ArgumentOutOfRangeException(nameof(result), result, null); } var score = ArenaScoreHelper.GetScoreV1(Score, enemyInfo.Score, result); var calculated = Score + score; var current = Score; Score = Math.Max(1000, calculated); DailyChallengeCount--; ArmorId = avatarState.GetArmorId(); Level = avatarState.level; return(Score - current); }
public int Update(ArenaInfo enemyInfo, BattleLog.Result result) { DailyChallengeCount--; switch (result) { case BattleLog.Result.Win: ArenaRecord.Win++; break; case BattleLog.Result.Lose: ArenaRecord.Lose++; break; case BattleLog.Result.TimeOver: ArenaRecord.Draw++; return(0); default: throw new ArgumentOutOfRangeException(nameof(result), result, null); } var score = ArenaScoreHelper.GetScore(Score, enemyInfo.Score, result); Score = Math.Max(1000, Score + score.challengerScore); enemyInfo.Score = Math.Max(1000, enemyInfo.Score + score.defenderScore); return(score.challengerScore); }
public ArenaInfo(ArenaInfo prevInfo) { AvatarAddress = prevInfo.AvatarAddress; AgentAddress = prevInfo.AgentAddress; ArmorId = prevInfo.ArmorId; Level = prevInfo.Level; AvatarName = prevInfo.AvatarName; CombatPoint = prevInfo.CombatPoint; Score = 1000; DailyChallengeCount = GameConfig.ArenaChallengeCountMax; Active = false; ArenaRecord = new Record(); }