Skip to content

Commit

Permalink
Implement summoning pity rates (#849)
Browse files Browse the repository at this point in the history
First half of #698 

- Refactor summoning odds calculation into static pure functions to make
  them easier to test
- Add new pity counter column to DbPlayerBannerData

This does not activate the pity rate calculation for actual results;
everyone will have a counter of 0 which will not accumulate.

The algorithm for pity rates is somewhat empirical based on a random
screenshot and may not distribute the .5% increases in the exact way
that the game originally did.
  • Loading branch information
SapiensAnatis authored Jun 1, 2024
1 parent 67efb16 commit baebe8b
Show file tree
Hide file tree
Showing 12 changed files with 4,010 additions and 935 deletions.
11 changes: 7 additions & 4 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,22 @@
"version": "0.6.4",
"commands": [
"husky"
]
],
"rollForward": false
},
"csharpier": {
"version": "0.28.2",
"commands": [
"dotnet-csharpier"
]
],
"rollForward": false
},
"dotnet-ef": {
"version": "8.0.4",
"version": "8.0.6",
"commands": [
"dotnet-ef"
]
],
"rollForward": false
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,12 @@ public class DbPlayerBannerData : DbPlayerData
[Required]
public int SummonBannerId { get; set; }

[Column("Pity")]
[Required]
public byte PityRate { get; set; }

[Column("SummonCount")]
[Required]
public int SummonCount { get; set; }

public int SummonCountSinceLastFiveStar { get; set; }

[Column("DailyLimitedSummons")]
[Required]
public int DailyLimitedSummonCount { get; set; }
Expand Down
Loading

0 comments on commit baebe8b

Please sign in to comment.