Skip to content

Commit

Permalink
gen9: automatically set spewpa and scatterbug form
Browse files Browse the repository at this point in the history
only fancy form is allowed and showdown doesnt differenciate forms for them
  • Loading branch information
architdate committed Nov 28, 2022
1 parent d5b782b commit 08ef397
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ public static class RegenTemplateExtensions
public static void SanitizeForm(this RegenTemplate set)
{
var gen = set.Context.Generation();
if (gen is 9)
{
// Scatterbug and Spewpa must be Fancy
if (set.Species == (int)Species.Scatterbug || set.Species == (int)Species.Spewpa)
set.Form = 18;
return;
}
if (!FormInfo.IsBattleOnlyForm(set.Species, set.Form, gen))
return;
set.Form = FormInfo.GetOutOfBattleForm(set.Species, set.Form, gen);
Expand Down

0 comments on commit 08ef397

Please sign in to comment.