From c9ee07e9b9e632a010616c974cc2ea0f1b02067d Mon Sep 17 00:00:00 2001 From: Kurt Date: Fri, 30 Oct 2020 22:23:13 -0700 Subject: [PATCH] Update form for friendsafari vivillon Closes #3066 --- PKHeX.Core/Legality/Areas/EncounterArea6XY.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/PKHeX.Core/Legality/Areas/EncounterArea6XY.cs b/PKHeX.Core/Legality/Areas/EncounterArea6XY.cs index 777442e55..287d5d8dd 100644 --- a/PKHeX.Core/Legality/Areas/EncounterArea6XY.cs +++ b/PKHeX.Core/Legality/Areas/EncounterArea6XY.cs @@ -26,6 +26,10 @@ public EncounterArea6XY(ICollection species) : base(GameVersion.XY) int ctr = 0; foreach (var s in species) slots[ctr++] = new EncounterSlot6XY(this, s, 0, 30, 30); + + // Find Vivillon and replace form to be region-random + var idx = Array.FindIndex(slots, z => z.Species == (int)Species.Vivillon); + slots[idx] = new EncounterSlot6XY(this, (int)Species.Vivillon, 30, 30, 30); Slots = slots; }