From 3df389e9beb6b73d0f1a68475a112fb9c3e65b72 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sun, 26 May 2024 11:17:52 -0400 Subject: Honor endgame_card_requirement value --- AnodyneArchipelago/Patches/GameplayPatches.cs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'AnodyneArchipelago/Patches/GameplayPatches.cs') diff --git a/AnodyneArchipelago/Patches/GameplayPatches.cs b/AnodyneArchipelago/Patches/GameplayPatches.cs index ec04451..056a855 100644 --- a/AnodyneArchipelago/Patches/GameplayPatches.cs +++ b/AnodyneArchipelago/Patches/GameplayPatches.cs @@ -148,6 +148,15 @@ namespace AnodyneArchipelago.Patches [HarmonyPatch(typeof(EntityPreset), nameof(EntityPreset.Create))] class EntityPresetCreatePatch { + static void Prefix(EntityPreset __instance) + { + if (__instance.EntityID == new Guid("C8CE6E18-CF07-180B-A550-9DC808A2F7E3")) + { + PropertyInfo frameProperty = typeof(EntityPreset).GetProperty("Frame"); + frameProperty.SetValue(__instance, (int)Plugin.ArchipelagoManager.EndgameCardRequirement); + } + } + static void Postfix(EntityPreset __instance, Entity __result) { if (__instance.Type.FullName == "AnodyneSharp.Entities.Interactive.DungeonStatue") -- cgit 1.4.1