Skip to content

Commit 7753699

Browse files
committed
Unable to guarantee them
1 parent f8ae91b commit 7753699

1 file changed

Lines changed: 28 additions & 5 deletions

File tree

pages/tools/gachacalc.tsx

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ const gachas: Record<string, Banner> = {
4545
bannerName: "5* banner character [Genshin Impact (5.0+, hypothese A)]",
4646
banner: [0.5, 0.5, 0.75, 1],
4747
guaranteed: 1,
48+
canGuarantee: true,
4849
minConst: -1,
4950
maxConst: 6,
5051
constFormat: "C",
@@ -56,6 +57,7 @@ const gachas: Record<string, Banner> = {
5657
bannerName: "5* banner character [Genshin Impact (5.0+, assumed flat 55/45)]",
5758
banner: 0.55,
5859
guaranteed: 1,
60+
canGuarantee: true,
5961
minConst: -1,
6062
maxConst: 6,
6163
constFormat: "C",
@@ -67,6 +69,7 @@ const gachas: Record<string, Banner> = {
6769
bannerName: "Specific 5* banner weapon [Genshin Impact (5.0+)]",
6870
banner: 0.75,
6971
guaranteed: 1 / 2,
72+
canGuarantee: true,
7073
guaranteedPity: 2,
7174
minConst: 0,
7275
maxConst: 5,
@@ -79,6 +82,7 @@ const gachas: Record<string, Banner> = {
7982
bannerName: "Specific 4* banner character [Genshin Impact/Honkai: Star Rail]",
8083
banner: 0.5,
8184
guaranteed: 1 / 3,
85+
canGuarantee: true,
8286
minConst: -1,
8387
maxConst: 6,
8488
constFormat: "C",
@@ -90,6 +94,7 @@ const gachas: Record<string, Banner> = {
9094
bannerName: "Specific 4* banner weapon [Genshin Impact]",
9195
banner: 0.75,
9296
guaranteed: 1 / 5,
97+
canGuarantee: true,
9398
minConst: 0,
9499
maxConst: 5,
95100
constFormat: "R",
@@ -98,9 +103,22 @@ const gachas: Record<string, Banner> = {
98103
rate: pityRate(6.0, Math.ceil(44 / 6.0)),
99104
},
100105
"4*charOffBanner": {
101-
bannerName: "Specific 4* off-banner character [Genshin Impact] [INACCURATE: see note!]",
106+
bannerName: "Specific 4* off-banner character on Character Banner [Genshin Impact]",
102107
banner: 0.5,
103108
guaranteed: 1 / 0, // This needs to be filled in by user!
109+
canGuarantee: true,
110+
minConst: -1,
111+
maxConst: 6,
112+
constFormat: "C",
113+
constName: "Constellation",
114+
maxPity: 10,
115+
rate: pityRate(5.1, Math.ceil(44 / 5.1)),
116+
},
117+
"4*charOffBannerStandard": {
118+
bannerName: "Specific 4* character/weapon on Standard Banner [Genshin Impact] [INACCURATE: see note!]",
119+
banner: 0.5,
120+
guaranteed: 1 / 0, // This needs to be filled in by user!
121+
canGuarantee: false, // STANDARD BANNER HAS DIFFERENT PITY SYSTEM FOR KEEPING 50/50
104122
minConst: -1,
105123
maxConst: 6,
106124
constFormat: "C",
@@ -112,6 +130,7 @@ const gachas: Record<string, Banner> = {
112130
bannerName: "5* banner [Genshin Impact (Chronicled Wish / Character before 5.0)]",
113131
banner: 0.5,
114132
guaranteed: 1,
133+
canGuarantee: true,
115134
minConst: -1,
116135
maxConst: 6,
117136
constFormat: "C",
@@ -123,6 +142,7 @@ const gachas: Record<string, Banner> = {
123142
bannerName: "Specific 5* banner weapon [Genshin Impact (PRE 5.0)]",
124143
banner: 0.75,
125144
guaranteed: 1 / 2,
145+
canGuarantee: true,
126146
guaranteedPity: 3,
127147
minConst: 0,
128148
maxConst: 5,
@@ -135,6 +155,7 @@ const gachas: Record<string, Banner> = {
135155
bannerName: "5* banner character [Honkai: Star Rail]",
136156
banner: 0.5 + (0.5 * 1) / 8,
137157
guaranteed: 1,
158+
canGuarantee: true,
138159
minConst: -1,
139160
maxConst: 6,
140161
constFormat: "E",
@@ -146,6 +167,7 @@ const gachas: Record<string, Banner> = {
146167
bannerName: "5* banner weapon [Honkai: Star Rail]",
147168
banner: 0.75,
148169
guaranteed: 1,
170+
canGuarantee: true,
149171
minConst: 0,
150172
maxConst: 5,
151173
constFormat: "S",
@@ -157,6 +179,7 @@ const gachas: Record<string, Banner> = {
157179
bannerName: "Specific 4* banner weapon [Honkai: Star Rail]",
158180
banner: 0.75,
159181
guaranteed: 1 / 3,
182+
canGuarantee: true,
160183
minConst: 0,
161184
maxConst: 5,
162185
constFormat: "S",
@@ -171,6 +194,7 @@ type Banner = {
171194
banner: number | number[]
172195
guaranteed: number
173196
guaranteedPity?: number
197+
canGuarantee: boolean
174198
minConst: number
175199
maxConst: number
176200
maxPity: number
@@ -523,8 +547,7 @@ export default function GachaCalc({ location, fourStarCount }: Props & { locatio
523547
</p>
524548
<p className="pt-2">
525549
<i>
526-
<b>NOTE</b>: The 4* off-banner character banner calculator is <b>not</b> accurate for the standard banner. In-game there&apos;s a different pity system for keeping amount of 4* weapons and characters balanced.
527-
Here we assume that you&apos;re guaranteed to get a character if you failed to get a character in the previous 4* (like with the regular Weapon/Character banner). However, for the standard this is done if you didn&apos;t get a 4* character in the last X pulls.
550+
<b>NOTE</b>: The 4* off-banner calculator is <b>not</b> accurate for the standard banner. In-game there&apos;s a pity system for keeping amount of 4* weapons and characters balanced. Here we assume a flat 50/50 rate between characters and weapons.
528551
</i>
529552
</p>
530553
</Main>
@@ -925,8 +948,8 @@ function calcSimsExact<T>(
925948
if (rate > 1) rate = 1
926949
else if (rate < 0) rate = 0
927950
const bannerRate = (
928-
sim.guaranteed ||
929-
(banner.guaranteedPity && sim.guaranteedPity >= banner.guaranteedPity - 1)
951+
(sim.guaranteed ||
952+
(banner.guaranteedPity && sim.guaranteedPity >= banner.guaranteedPity - 1)) && banner.canGuarantee
930953
) ? 1 : (Array.isArray(banner.banner) ? banner.banner[sim.lostPity] : banner.banner)
931954

932955
// Failed

0 commit comments

Comments
 (0)