|
| 1 | +using DiskCardGame; |
| 2 | +using InscryptionAPI.Card; |
| 3 | +using InscryptionAPI.Guid; |
| 4 | + |
| 5 | +namespace InscryptionCommunityPatch.Tests; |
| 6 | + |
| 7 | +public class DebugCards |
| 8 | +{ |
| 9 | + /// <summary> |
| 10 | + /// This is an instantiator for a Test Case related to the Steel Trap Death Patch. |
| 11 | + /// </summary> |
| 12 | + /// <remarks>This code is provided by Creator/Chaosyr/SaxbyMod/The Stoat Lord.</remarks> |
| 13 | + public static void CreateTestCards() |
| 14 | + { |
| 15 | + CardInfo TestPelt = CreateCardUtil.CreateCard("Test_Pelt", "Test Pelt", 0, 4, new List<Tribe>() { Tribe.Canine }); |
| 16 | + CardInfo Debugger = CreateCardUtil.CreateCard("Debugger", "This is a Debugger", 0, 2, new List<Tribe>() { Tribe.None }); |
| 17 | + CardInfo Debugger2 = CreateCardUtil.CreateCard("Debugger", "This is a Debugger", 0, 2, new List<Tribe>() { Tribe.None }); |
| 18 | + Debugger2.SetExtendedProperty("SteelTrapPelt", PatchPlugin.ModGUID + "_Test_Pelt"); |
| 19 | + Debugger.AddAbilities(Ability.SteelTrap); |
| 20 | + } |
| 21 | + |
| 22 | + /// <summary> |
| 23 | + /// A Utility for Creating Cards (this is for debug purposes only, so we're tossing a OBSOLETE to be safe. |
| 24 | + /// </summary> |
| 25 | + /// <remarks>This code is provided by JamesGames.</remarks> |
| 26 | + [Obsolete("DO NOT USE THIS, THIS IS FOR DEBUGGING ONLY.")] |
| 27 | + private class CreateCardUtil |
| 28 | + { |
| 29 | + // Code from JamesGames |
| 30 | + public static CardInfo CreateCard(string name, string displayName, int attack, int health, List<Tribe> tribe) |
| 31 | + { |
| 32 | + CardInfo info = CardManager.New(PatchPlugin.ModGUID, name, displayName, attack, health); |
| 33 | + info.cardComplexity = CardComplexity.Simple; |
| 34 | + info.AddTraits(Trait.Pelt); |
| 35 | + foreach (Tribe currentTribe in tribe) |
| 36 | + { |
| 37 | + if (currentTribe != Tribe.None) |
| 38 | + { |
| 39 | + info.AddTribes(currentTribe); |
| 40 | + } |
| 41 | + } |
| 42 | + info.temple = CardTemple.Nature; |
| 43 | + info.AddSpecialAbilities(SpecialTriggeredAbility.SpawnLice); |
| 44 | + info.AddAppearances(CardAppearanceBehaviour.Appearance.TerrainBackground, CardAppearanceBehaviour.Appearance.TerrainLayout); |
| 45 | + |
| 46 | + return info; |
| 47 | + } |
| 48 | + } |
| 49 | + |
| 50 | + /// <summary> |
| 51 | + /// A Utility for Creating Rare Cards (this is for debug purposes only, so we're tossing a OBSOLETE to be safe. |
| 52 | + /// </summary> |
| 53 | + /// <remarks>This code is provided by JamesGames.</remarks> |
| 54 | + [Obsolete("DO NOT USE THIS, THIS IS FOR DEBUGGING ONLY.")] |
| 55 | + private class CreateRareCardUtil |
| 56 | + { |
| 57 | + // Code from JamesGames |
| 58 | + public static CardInfo CreateRareCard(string name, string displayName, int attack, int health, List<Tribe> tribe) |
| 59 | + { |
| 60 | + CardInfo info = CreateCardUtil.CreateCard(name, displayName, attack, health, tribe); |
| 61 | + info.AddAppearances(CardAppearanceBehaviour.Appearance.GoldEmission); |
| 62 | + |
| 63 | + return info; |
| 64 | + } |
| 65 | + } |
| 66 | + |
| 67 | + /// <summary> |
| 68 | + /// A Utility for Fetching Tribes (this is for debug purposes only, so we're tossing a OBSOLETE to be safe. |
| 69 | + /// </summary> |
| 70 | + /// <remarks>This code is provided by LilySylvee.</remarks> |
| 71 | + [Obsolete("DO NOT USE THIS, THIS IS FOR DEBUGGING ONLY.")] |
| 72 | + private class GetCustomTribeUtil |
| 73 | + { |
| 74 | + // Code from Lily |
| 75 | + public static Tribe GetCustomTribe(string GUID, string name) |
| 76 | + { |
| 77 | + return GuidManager.GetEnumValue<Tribe>(GUID, name); |
| 78 | + } |
| 79 | + } |
| 80 | +} |
0 commit comments