using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using DiskCardGame;
using HarmonyLib;
using InscryptionAPI.Card;
using InscryptionAPI.Helpers;
using InscryptionAPI.Pelts;
using InscryptionAPI.Pelts.Extensions;
using Microsoft.CodeAnalysis;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")]
[assembly: AssemblyCompany("TemplePelts")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyDescription("A Libary of Cost Based Pelts")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("TemplePelts")]
[assembly: AssemblyTitle("TemplePelts")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace Temple_Pelts
{
public static class PluginInfo
{
public const string PLUGIN_GUID = "TemplePelts";
public const string PLUGIN_NAME = "TemplePelts";
public const string PLUGIN_VERSION = "1.0.0";
}
}
namespace Tribal_Pelts
{
[BepInPlugin("creator.CostPelts", "CostPelts", "1.0.0")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class PeltLoader : BaseUnityPlugin
{
private readonly Harmony harmony = new Harmony("creator.CostPelts");
private const string PluginGuid = "creator.CostPelts";
private const string PluginName = "CostPelts";
private const string PluginVersion = "1.0.0";
private const string PluginPrefix = "CostPelts";
public int Count;
public static CardInfo CreateCard(string name, string displayName, string imagePath, string imagePathEmisive, int attack, int health, Tribe tribe)
{
//IL_005e: Unknown result type (might be due to invalid IL or missing references)
//IL_0075: Unknown result type (might be due to invalid IL or missing references)
//IL_008d: Unknown result type (might be due to invalid IL or missing references)
//IL_0082: Unknown result type (might be due to invalid IL or missing references)
//IL_0085: Expected I4, but got Unknown
CardInfo val = CardManager.New("creator.CostPelts", name, displayName, attack, health, (string)null);
CardExtensions.SetPortrait(val, TextureHelper.GetImageAsTexture(Path.Combine(imagePath), (FilterMode)0), (FilterMode?)null);
CardExtensions.SetEmissivePortrait(val, TextureHelper.GetImageAsTexture(Path.Combine(imagePathEmisive), (FilterMode)0), (FilterMode?)null);
val.cardComplexity = (CardComplexity)1;
CardExtensions.AddTraits(val, (Trait[])(object)new Trait[1] { (Trait)13 });
if ((int)tribe != 0)
{
CardExtensions.AddTribes(val, (Tribe[])(object)new Tribe[1] { (Tribe)(int)tribe });
}
val.temple = (CardTemple)0;
CardExtensions.AddSpecialAbilities(val, (SpecialTriggeredAbility[])(object)new SpecialTriggeredAbility[1] { (SpecialTriggeredAbility)27 });
CardExtensions.AddAppearances(val, (Appearance[])(object)new Appearance[2]
{
(Appearance)2,
(Appearance)9
});
return val;
}
public static CardInfo CreateRareCard(string name, string displayName, string imagePath, string imagePathEmisive, int attack, int health, Tribe tribe)
{
CardInfo val = CreateCard(name, displayName, imagePath, imagePathEmisive, attack, health, (Tribe)0);
CardExtensions.AddAppearances(val, (Appearance[])(object)new Appearance[1] { (Appearance)6 });
return val;
}
public void Awake()
{
((BaseUnityPlugin)this).Logger.LogInfo((object)"Loading creator.CostPelts - 1.0.0");
BloodVials();
BoneFossils();
EnergyCapsules();
GemHolders();
Count++;
Count++;
Count++;
Count++;
((BaseUnityPlugin)this).Logger.LogMessage((object)$"Successfully Loaded {Count} Pelt(s)!");
static void BloodVials()
{
CardInfo val4 = CreateCard("Vanilla_Blood_Vials", "Blood Vials", "Blood_Vials.png", "none.png", 0, 2, (Tribe)0);
PeltExtensions.SetTierName(PeltManager.New("creator.CostPelts", val4, 8, 0, 4, (Func<List<CardInfo>>)(() => CardManager.AllCardsCopy.FindAll((CardInfo a) => a.BloodCost > 0 && CardExtensions.HasAnyOfCardMetaCategories(a, (CardMetaCategory[])(object)new CardMetaCategory[1] { (CardMetaCategory)1 })))), "Blood Vials");
}
static void BoneFossils()
{
CardInfo val3 = CreateCard("Vanilla_Bone_Fossils", "Bone Fossils", "Bone_Fossils.png", "none.png", 0, 2, (Tribe)0);
PeltExtensions.SetTierName(PeltManager.New("creator.CostPelts", val3, 8, 0, 4, (Func<List<CardInfo>>)(() => CardManager.AllCardsCopy.FindAll((CardInfo a) => a.BonesCost > 0 && CardExtensions.HasAnyOfCardMetaCategories(a, (CardMetaCategory[])(object)new CardMetaCategory[1] { (CardMetaCategory)1 })))), "Bone Fossils");
}
static void EnergyCapsules()
{
CardInfo val2 = CreateCard("Vanilla_Energy_Capsules", "Energy Capsules", "Energy_Capsules.png", "none.png", 0, 2, (Tribe)0);
PeltExtensions.SetTierName(PeltManager.New("creator.CostPelts", val2, 8, 0, 4, (Func<List<CardInfo>>)(() => CardManager.AllCardsCopy.FindAll((CardInfo a) => a.EnergyCost > 0 && CardExtensions.HasAnyOfCardMetaCategories(a, (CardMetaCategory[])(object)new CardMetaCategory[1] { (CardMetaCategory)1 })))), "Energy Capsules");
}
static void GemHolders()
{
CardInfo val = CreateCard("Vanilla_Gem_Holders", "Gem Holders", "Gem_Holders.png", "none.png", 0, 2, (Tribe)0);
PeltExtensions.SetTierName(PeltManager.New("creator.CostPelts", val, 8, 0, 4, (Func<List<CardInfo>>)(() => CardManager.AllCardsCopy.FindAll((CardInfo a) => a.GemsCost.Count > 0 && CardExtensions.HasAnyOfCardMetaCategories(a, (CardMetaCategory[])(object)new CardMetaCategory[1] { (CardMetaCategory)1 })))), "Gem Holders");
}
}
}
}