using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
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 Microsoft.CodeAnalysis;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")]
[assembly: AssemblyCompany("L33pBotMod")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Placeholder description")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("L33pBotMod")]
[assembly: AssemblyTitle("L33pBotMod")]
[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 L33pB0tMod
{
[BepInPlugin("tvflabs.inscryption.L33pB0tMod", "L33pB0tMod", "1.0.0")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class Plugin : BaseUnityPlugin
{
[HarmonyPatch(typeof(Opponent), "QueueNewCards")]
private class Patch1
{
private static IEnumerator Postfix(IEnumerator values, bool doTween, bool changeView, Opponent __instance)
{
bool didAnything = false;
while (values.MoveNext())
{
yield return values.Current;
}
if (didAnything || __instance.NumTurnsTaken >= __instance.TurnPlan.Count)
{
yield break;
}
int i;
for (i = 0; i < Singleton<BoardManager>.Instance.OpponentQueueSlots.Count; i++)
{
PlayableCard playableCard = __instance.Queue.Find((PlayableCard x) => x.QueuedSlot.Index == i);
if ((Object)(object)playableCard == (Object)null)
{
CardInfo cardToQueue = CardLoader.GetCardByName("LeapBot");
if (__instance is Part1Opponent)
{
cardToQueue = Part1LeapBot;
}
yield return __instance.QueueCard(cardToQueue, Singleton<BoardManager>.Instance.OpponentSlotsCopy[i], doTween, changeView, true);
}
}
}
}
private Harmony harmony = new Harmony("tvflabs.inscryption.L33pB0tMod");
private const string PluginGuid = "tvflabs.inscryption.L33pB0tMod";
private const string PluginName = "L33pB0tMod";
private const string PluginVersion = "1.0.0";
private const string PluginPrefix = "L33pB0tMod";
private static CardInfo Part1LeapBot;
private static CardInfo LeapBotTail;
private void Awake()
{
((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded L33pB0tMod!");
LeapBotTail = CardManager.New("L33pB0tMod", "Tail_Bot", "Scrap Metal", 0, 2, (string)null);
CardExtensions.SetBaseAttackAndHealth(LeapBotTail, (int?)0, (int?)2);
CardExtensions.SetCardComplexity(LeapBotTail, (CardComplexity)0);
CardExtensions.SetCardTemple(LeapBotTail, (CardTemple)0);
CardExtensions.SetDisplayedName(LeapBotTail, "Scrap Metal");
CardExtensions.SetPortrait(LeapBotTail, "ScrapMetal.png");
Part1LeapBot = CardManager.New("L33pB0tMod", "Part1LeapBot", "L33pB0t", 0, 2, (string)null);
CardExtensions.AddAbilities(Part1LeapBot, (Ability[])(object)new Ability[1] { (Ability)23 });
CardExtensions.SetBaseAttackAndHealth(Part1LeapBot, (int?)0, (int?)2);
CardExtensions.SetCardComplexity(Part1LeapBot, (CardComplexity)1);
CardExtensions.SetCardTemple(Part1LeapBot, (CardTemple)0);
CardExtensions.SetDisplayedName(Part1LeapBot, "L33pB0t");
CardExtensions.SetStrafeFlipsPortrait(Part1LeapBot, false);
CardExtensions.SetPortraitAndEmission(Part1LeapBot, "Part1LeapBot.png", "Part1LeapBot_e.png");
CardExtensions.SetTail(Part1LeapBot, LeapBotTail, (IEnumerable<CardModificationInfo>)null);
harmony.PatchAll();
}
}
public static class PluginInfo
{
public const string PLUGIN_GUID = "L33pBotMod";
public const string PLUGIN_NAME = "L33pBotMod";
public const string PLUGIN_VERSION = "1.0.0";
}
}