Skip to content

Commit 5af6575

Browse files
committed
Added RNG support for latest BDSP Mystery Gifts
1 parent 73d150d commit 5af6575

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

SysBot.Pokemon/BDSP/Data/Enums.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ public enum PokeEvents
55
None,
66
ManaphyEgg,
77
BirthDayHappiny,
8-
GiftPiplup,
8+
KorDawnPiplup,
9+
KorRegigigas,
910
}
1011

1112
public enum RNGType

SysBot.Pokemon/BDSP/Data/RNG8b.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,8 @@ private static int GetFlawless(RNGType type, PokeEvents events)
274274
{
275275
PokeEvents.ManaphyEgg => 3,
276276
PokeEvents.BirthDayHappiny => 0,
277+
PokeEvents.KorDawnPiplup => 0,
278+
PokeEvents.KorRegigigas => 3,
277279
_ => 0,
278280
},
279281
_ => 0,
@@ -284,7 +286,10 @@ private static int[] GetGiftFTID(PokeEvents events, ITrainerID tr)
284286
{
285287
int[] tidsid = events switch
286288
{
289+
PokeEvents.ManaphyEgg => new int[2] { tr.TID, tr.SID },
287290
PokeEvents.BirthDayHappiny => new int[2] { 61213, 2108 },
291+
PokeEvents.KorDawnPiplup => new int[2] { 28217, 18344 },
292+
PokeEvents.KorRegigigas => new int[2] { 11257, 18329 },
288293
_ => new int[2] { tr.TID, tr.SID },
289294
};
290295
return tidsid;
@@ -295,6 +300,8 @@ private static Gender GetEventGender(PokeEvents events)
295300
return events switch
296301
{
297302
PokeEvents.BirthDayHappiny => Gender.Female,
303+
PokeEvents.KorDawnPiplup => Gender.Male,
304+
PokeEvents.KorRegigigas => Gender.Genderless,
298305
_ => Gender.Genderless,
299306
};
300307
}
@@ -304,6 +311,7 @@ private static Nature GetEventNature(PokeEvents events)
304311
return events switch
305312
{
306313
PokeEvents.BirthDayHappiny => Nature.Hardy,
314+
PokeEvents.KorDawnPiplup => Nature.Hardy,
307315
_ => Nature.Hardy,
308316
};
309317
}
@@ -312,7 +320,10 @@ private static bool AllowRandomNature(PokeEvents events)
312320
{
313321
return events switch
314322
{
323+
PokeEvents.ManaphyEgg => true,
315324
PokeEvents.BirthDayHappiny => false,
325+
PokeEvents.KorDawnPiplup => false,
326+
PokeEvents.KorRegigigas => true,
316327
_ => true,
317328
};
318329
}

0 commit comments

Comments
 (0)