Remove starter cards, add some info in Log, Add Color team for Dragon#120
Remove starter cards, add some info in Log, Add Color team for Dragon#120m0ssa99 wants to merge 19 commits intoPCJones:masterfrom
Conversation
modified: .gitignore modified: Api/SplinterlandsAPI.cs modified: Bot/BotInstance.cs modified: Config/Settings.cs modified: Model/DetailedCard.cs modified: Model/LogSummary.cs modified: Model/UserCard.cs
modified: .gitignore modified: Api/SplinterlandsAPI.cs modified: Bot/BotInstance.cs modified: Config/Settings.cs modified: Model/DetailedCard.cs modified: Model/LogSummary.cs modified: Model/UserCard.cs
|
this pr has mixed tabs and spaces for indentation. |
|
also commenting out no longer valid/needed functions/code clutters the code, (yes i know it's already like that, but why make it worse?) |
Api/SplinterlandsAPI.cs
Outdated
| gameResult = 2; | ||
| } | ||
|
|
||
| var rhsr = JToken.Parse((string)matchHistory["battles"][0]["dec_info"]); |
There was a problem hiding this comment.
no indentation, could also use a better name, rewardInfo or matchRewards maybe
Api/SplinterlandsAPI.cs
Outdated
| int glint = Convert.ToInt32((int)rhsr["glint"]); | ||
|
|
||
| return (newRating, ratingChange, spsReward, gameResult); | ||
| return (newRating, ratingChange, spsReward, gameResult,glint); |
There was a problem hiding this comment.
i would suggest a space between the comma and glint for readability and to match style
| } | ||
| return null; | ||
| } | ||
| public static async Task<decimal> GetTotalUnclaimedBalanceAsync(string username, string accessToken) |
There was a problem hiding this comment.
function looks good, but indentation is inconsistent
| } | ||
|
|
||
| DateTime oneDayAgo = DateTime.Now.AddDays(-1); | ||
| DateTime oneDayAgo = DateTime.Now.AddDays(-2); |
There was a problem hiding this comment.
There was a problem hiding this comment.
should be renamed to twoDaysAgo then probably?
There was a problem hiding this comment.
or maybe cooldown, in case the change it again
Bot/BotInstance.cs
Outdated
| var cardQuery = CardsCached.Where(x => x.card_detail_id == (string)team["summoner_id"]); | ||
| string summoner = cardQuery.Any() ? cardQuery.First().card_long_id : null; | ||
| string monsters = ""; | ||
| var culoare = (string)Settings.CardsDetails[((int)team["summoner_id"]) - 1].GetstringCardColor(); |
There was a problem hiding this comment.
- mixing languages in a codebase can be confusing
- is there an issue this is meant to solve i'm not aware of?
There was a problem hiding this comment.
- Changed
- Is for color of team,
There was a problem hiding this comment.
I also don't understand this change.
1.Why is it needed?
2.Is it ment to be called "color"? It says "culoare"
There was a problem hiding this comment.
Now, when submitting a team you now need to provide an “allyColor” parameters that matches the element you want to be selected for that summoner, i.e. “Blue”, “Red”, “Green”, “Black”, or “White”., Dragon and Gray is determined by the card colors in the deck.
I changed variable name
Bot/BotInstance.cs
Outdated
| CurrentlyActive = false; | ||
| } | ||
| Settings.LogSummaryList.Add((LogSummary.Index, LogSummary.Account, LogSummary.BattleResult, LogSummary.Rating, LogSummary.ECR, LogSummary.QuestStatus)); | ||
| Settings.LogSummaryList.Add((LogSummary.Index, LogSummary.Account, LogSummary.BattleResult, LogSummary.Rating, LogSummary.ECR, LogSummary.QuestStatus,LogSummary.SPSStake)); |
There was a problem hiding this comment.
i would suggest a space between the comma and LogSummary.SPSStake for readability and to match style
Bot/BotInstance.cs
Outdated
| private async Task ShowBattleResultLegacyAsync(string tx) | ||
| { | ||
| (int newRating, int ratingChange, decimal decReward, int result) battleResult = new(); | ||
| (int newRating, int ratingChange, decimal decReward, int result,int glint) battleResult = new(); |
Bot/BotInstance.cs
Outdated
| { | ||
| await Task.Delay(6000); | ||
| battleResult = await SplinterlandsAPI.GetBattleResultAsync(Username, tx); | ||
| battleResult = await SplinterlandsAPI.GetBattleResultAsync(Username, tx,AccessToken); |
|
Logic all looks good. most of the issues i see are style/readability related |
As starter cards are not allowed in wild ranked anymore we can delete it I guess |
|
Someone needs to fix the merge conflicts first. Also, are all changes compatible with the API? I sadly don't have the time to fully dive into this. |
#119