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 BepInEx.Bootstrap;
using DiskCardGame;
using GBC;
using HarmonyLib;
using InscryptionAPI.Card;
using InscryptionAPI.Guid;
using InscryptionAPI.Helpers;
using InscryptionAPI.Triggers;
using Microsoft.CodeAnalysis;
using TooManySigils.Classes;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("TooManySigils")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyDescription("Sigil libary of new")]
[assembly: AssemblyFileVersion("2.7.0.0")]
[assembly: AssemblyInformationalVersion("2.7.0+66e80fdbfc06be4e87ebb7dfff4a96b33d460b21")]
[assembly: AssemblyProduct("TooManySigils")]
[assembly: AssemblyTitle("TooManySigils")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("2.7.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 TooManySigils
{
[BepInPlugin("creator.TooManySigils", "TooManySigils", "2.7.0")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class Plugin : BaseUnityPlugin
{
private Harmony harmony = new Harmony("creator.TooManySigils");
private const string PluginGuid = "creator.TooManySigils";
private const string PluginName = "TooManySigils";
private const string PluginVersion = "2.7.0";
private const string PluginPrefix = "Too Many Sigils";
public static List<Sprite> art_sprites;
public static Trait BoneslessTrait = GuidManager.GetEnumValue<Trait>("creator.TooManySigils", "Boneless");
public static Trait Child13Trait = GuidManager.GetEnumValue<Trait>("creator.TooManySigils", "Child13");
private void Awake()
{
harmony.PatchAll(typeof(Plugin));
art_sprites = new List<Sprite>();
int num = 0;
int num2 = 0;
AddDeadPack();
num++;
AddHeartlocked();
num++;
AddThickshell();
num++;
AddSpawner();
num++;
AddLauncher();
num++;
AddHost();
num++;
AddBastion();
num++;
AddRotting();
num++;
AddCovalesce();
num++;
AddAntsMinus();
num++;
AddLoseBattery();
num++;
AddLoseBattery2();
num++;
AddLoseBattery3();
num++;
AddLoseBattery4();
num++;
AddLoseBattery5();
num++;
AddLoseBattery6();
num++;
AddGainBattery();
num++;
AddGainBattery2();
num++;
AddGainBattery3();
num++;
AddGainBattery4();
num++;
AddGainBattery5();
num++;
AddGainBattery6();
num++;
AddBellPresser();
num2++;
AddCoinsWithin();
num2++;
AddTreasureTracker();
num++;
AddOneFourthChanceInstakill();
num++;
AddFishOutOfWater();
num++;
AddBorrowedTime();
num++;
((BaseUnityPlugin)this).Logger.LogInfo((object)$"Loaded {num} amount of Sigils");
((BaseUnityPlugin)this).Logger.LogInfo((object)$"Loaded {num2} amount of Stats");
}
private void AddDeadPack()
{
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
AbilityInfo obj = AbilityExtensions.SetPixelAbilityIcon(AbilityExtensions.SetDefaultPart1Ability(AbilityManager.New("creator.TooManySigils", "Dead Pack", "When a card bearing this sigil perishes, it provides 1 Item to its owner.", typeof(DeadDraw.DeathDraw), "Dead_Draw_A1.png")), TextureHelper.GetImageAsTexture("Test_Icon_A2.png", (FilterMode)0), (FilterMode?)(FilterMode)0);
AbilityMetaCategory[] array = new AbilityMetaCategory[4];
RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
DeadDraw.DeathDraw.ability = AbilityExtensions.AddMetaCategories(obj, (AbilityMetaCategory[])(object)array).ability;
}
private void AddHeartlocked()
{
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
AbilityInfo obj = AbilityExtensions.SetPixelAbilityIcon(AbilityExtensions.SetDefaultPart1Ability(AbilityManager.New("creator.TooManySigils", "Heart Locked", "When a card bearing this sigil is damaged, It only takes 1 Damage.", typeof(HeartLocked), "Resistant_A1.png")), TextureHelper.GetImageAsTexture("Resistant_A2.png", (FilterMode)0), (FilterMode?)(FilterMode)0);
AbilityMetaCategory[] array = new AbilityMetaCategory[4];
RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
HeartLocked.ability = AbilityExtensions.AddMetaCategories(obj, (AbilityMetaCategory[])(object)array).ability;
}
private void AddThickshell()
{
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
AbilityInfo obj = AbilityExtensions.SetPixelAbilityIcon(AbilityExtensions.SetDefaultPart1Ability(AbilityManager.New("creator.TooManySigils", "Thick Shell", "When a card bearing this sigil is damaged, It takes 1 less Damage.", typeof(Thickshell), "Thick_Shell_A1.png")), TextureHelper.GetImageAsTexture("Thick_Shell_A2.png", (FilterMode)0), (FilterMode?)(FilterMode)0);
AbilityMetaCategory[] array = new AbilityMetaCategory[4];
RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
Thickshell.ability = AbilityExtensions.AddMetaCategories(obj, (AbilityMetaCategory[])(object)array).ability;
}
private void AddLauncher()
{
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
AbilityInfo obj = AbilityExtensions.SetPixelAbilityIcon(AbilityExtensions.SetDefaultPart1Ability(AbilityManager.New("creator.TooManySigils", "Launcher", "If a card bearing this sigil is on the field during your endstep, a card is launched to one of your empty spaces.", typeof(Launcher), "Launcher_A1.png")), TextureHelper.GetImageAsTexture("Launcher_A2.png", (FilterMode)0), (FilterMode?)(FilterMode)0);
AbilityMetaCategory[] array = new AbilityMetaCategory[4];
RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
Launcher.ability = AbilityExtensions.AddMetaCategories(obj, (AbilityMetaCategory[])(object)array).ability;
}
private void AddSpawner()
{
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
AbilityInfo obj = AbilityExtensions.SetPixelAbilityIcon(AbilityExtensions.SetDefaultPart1Ability(AbilityManager.New("creator.TooManySigils", "Spawner", "If a card bearing this sigil is on field during your endstep, this card moves in the direction inscribed in the sigil, and a card is played in its previous space.", typeof(Spawner), "Spawner_A1.png")), TextureHelper.GetImageAsTexture("Spawner_A2.png", (FilterMode)0), (FilterMode?)(FilterMode)0);
AbilityMetaCategory[] array = new AbilityMetaCategory[4];
RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
Spawner.ability = AbilityExtensions.AddMetaCategories(obj, (AbilityMetaCategory[])(object)array).ability;
}
private void AddHost()
{
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
AbilityInfo obj = AbilityExtensions.SetPixelAbilityIcon(AbilityExtensions.SetDefaultPart1Ability(AbilityManager.New("creator.TooManySigils", "Host", "When a card bearing this sigil is damaged, a card is added to your hand.", typeof(Host), "Host_A1.png")), TextureHelper.GetImageAsTexture("Host_A2.png", (FilterMode)0), (FilterMode?)(FilterMode)0);
AbilityMetaCategory[] array = new AbilityMetaCategory[4];
RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
Host.ability = AbilityExtensions.AddMetaCategories(obj, (AbilityMetaCategory[])(object)array).ability;
}
private void AddBastion()
{
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
AbilityInfo obj = AbilityExtensions.SetPixelAbilityIcon(AbilityExtensions.SetDefaultPart1Ability(AbilityManager.New("creator.TooManySigils", "Bastion", "When this card is damaged, It takes half the Damage it would normally.", typeof(Bastion), "Bastion_A1.png")), TextureHelper.GetImageAsTexture("Bastion_A2.png", (FilterMode)0), (FilterMode?)(FilterMode)0);
AbilityMetaCategory[] array = new AbilityMetaCategory[4];
RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
Bastion.ability = AbilityExtensions.AddMetaCategories(obj, (AbilityMetaCategory[])(object)array).ability;
}
private void AddRotting()
{
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
AbilityInfo obj = AbilityExtensions.SetPixelAbilityIcon(AbilityExtensions.SetDefaultPart1Ability(AbilityManager.New("creator.TooManySigils", "Rotting", "If a card bearing this sigil is alive during your endstep, this card loses 1 power and 1 health.", typeof(Rotting), "Rotting_A1.png")), TextureHelper.GetImageAsTexture("Rotting_A2.png", (FilterMode)0), (FilterMode?)(FilterMode)0);
AbilityMetaCategory[] array = new AbilityMetaCategory[4];
RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
Rotting.ability = AbilityExtensions.AddMetaCategories(obj, (AbilityMetaCategory[])(object)array).ability;
}
private void AddCovalesce()
{
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
AbilityInfo obj = AbilityExtensions.SetPixelAbilityIcon(AbilityExtensions.SetDefaultPart1Ability(AbilityManager.New("creator.TooManySigils", "Covalesce", "If a card bearing this sigil is alive during your endstep, This card gains 1 health.", typeof(Covalesce), "Covalesce_A1.png")), TextureHelper.GetImageAsTexture("Covalesce_A2.png", (FilterMode)0), (FilterMode?)(FilterMode)0);
AbilityMetaCategory[] array = new AbilityMetaCategory[4];
RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
Covalesce.ability = AbilityExtensions.AddMetaCategories(obj, (AbilityMetaCategory[])(object)array).ability;
}
private void AddAntsMinus()
{
AbilityExtensions.SetDefaultPart3Ability(AbilityExtensions.SetDefaultPart1Ability(AbilityExtensions.SetIcon(StatIconManager.New("creator.TooManySigils", "Ants Minus", "This cards power is equal to the amount of Ant's on field, minus this one.", typeof(AntMinus)), "AntsMinus_A1.png", (FilterMode?)null))).appliesToHealth = false;
}
private void AddLoseBattery()
{
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
AbilityInfo obj = AbilityExtensions.SetPixelAbilityIcon(AbilityExtensions.SetDefaultPart1Ability(AbilityManager.New("creator.TooManySigils", "Lose One Battery", "When a card bearing this sigil is played, the owner loses one Max Energy.", typeof(Lose1Battery), "Lose1Battery.png")), TextureHelper.GetImageAsTexture("Lose1Battery_a2.png", (FilterMode)0), (FilterMode?)(FilterMode)0);
AbilityMetaCategory[] array = new AbilityMetaCategory[4];
RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
Lose1Battery.ability = AbilityExtensions.AddMetaCategories(obj, (AbilityMetaCategory[])(object)array).ability;
}
private void AddLoseBattery2()
{
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
AbilityInfo obj = AbilityExtensions.SetPixelAbilityIcon(AbilityExtensions.SetDefaultPart1Ability(AbilityManager.New("creator.TooManySigils", "Lose Two Batteries", "When a card bearing this sigil is played, the owner loses two Max Energy.", typeof(Lose2Battery), "Lose2Battery.png")), TextureHelper.GetImageAsTexture("Lose2Battery_a2.png", (FilterMode)0), (FilterMode?)(FilterMode)0);
AbilityMetaCategory[] array = new AbilityMetaCategory[4];
RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
Lose2Battery.ability = AbilityExtensions.AddMetaCategories(obj, (AbilityMetaCategory[])(object)array).ability;
}
private void AddLoseBattery3()
{
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
AbilityInfo obj = AbilityExtensions.SetPixelAbilityIcon(AbilityExtensions.SetDefaultPart1Ability(AbilityManager.New("creator.TooManySigils", "Lose Three Batteries", "When a card bearing this sigil is played, the owner loses three Max Energy.", typeof(Lose3Battery), "Lose3Battery.png")), TextureHelper.GetImageAsTexture("Lose3Battery_a2.png", (FilterMode)0), (FilterMode?)(FilterMode)0);
AbilityMetaCategory[] array = new AbilityMetaCategory[4];
RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
Lose3Battery.ability = AbilityExtensions.AddMetaCategories(obj, (AbilityMetaCategory[])(object)array).ability;
}
private void AddLoseBattery4()
{
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
AbilityInfo obj = AbilityExtensions.SetPixelAbilityIcon(AbilityExtensions.SetDefaultPart1Ability(AbilityManager.New("creator.TooManySigils", "Lose Four Batteries", "When a card bearing this sigil is played, the owner loses four Max Energy.", typeof(Lose4Battery), "Lose4Battery.png")), TextureHelper.GetImageAsTexture("Lose4Battery_a2.png", (FilterMode)0), (FilterMode?)(FilterMode)0);
AbilityMetaCategory[] array = new AbilityMetaCategory[4];
RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
Lose4Battery.ability = AbilityExtensions.AddMetaCategories(obj, (AbilityMetaCategory[])(object)array).ability;
}
private void AddLoseBattery5()
{
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
AbilityInfo obj = AbilityExtensions.SetPixelAbilityIcon(AbilityExtensions.SetDefaultPart1Ability(AbilityManager.New("creator.TooManySigils", "Lose Five Batteries", "When a card bearing this sigil is played, the owner loses five Max Energy.", typeof(Lose5Battery), "Lose5Battery.png")), TextureHelper.GetImageAsTexture("Lose5Battery_a2.png", (FilterMode)0), (FilterMode?)(FilterMode)0);
AbilityMetaCategory[] array = new AbilityMetaCategory[4];
RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
Lose5Battery.ability = AbilityExtensions.AddMetaCategories(obj, (AbilityMetaCategory[])(object)array).ability;
}
private void AddLoseBattery6()
{
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
AbilityInfo obj = AbilityExtensions.SetPixelAbilityIcon(AbilityExtensions.SetDefaultPart1Ability(AbilityManager.New("creator.TooManySigils", "Lose Six Batteries", "When a card bearing this sigil is played, the owner loses six Max Energy.", typeof(Lose6Battery), "Lose6Battery.png")), TextureHelper.GetImageAsTexture("Lose6Battery_a2.png", (FilterMode)0), (FilterMode?)(FilterMode)0);
AbilityMetaCategory[] array = new AbilityMetaCategory[4];
RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
Lose6Battery.ability = AbilityExtensions.AddMetaCategories(obj, (AbilityMetaCategory[])(object)array).ability;
}
private void AddGainBattery()
{
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
AbilityInfo obj = AbilityExtensions.SetPixelAbilityIcon(AbilityExtensions.SetDefaultPart1Ability(AbilityManager.New("creator.TooManySigils", "Gain One Battery", "When a card bearing this sigil is played, the owner gains one Max Energy.", typeof(Gain1Battery), "Gain1Battery.png")), TextureHelper.GetImageAsTexture("Gain1Battery_a2.png", (FilterMode)0), (FilterMode?)(FilterMode)0);
AbilityMetaCategory[] array = new AbilityMetaCategory[4];
RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
Gain1Battery.ability = AbilityExtensions.AddMetaCategories(obj, (AbilityMetaCategory[])(object)array).ability;
}
private void AddGainBattery2()
{
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
AbilityInfo obj = AbilityExtensions.SetPixelAbilityIcon(AbilityExtensions.SetDefaultPart1Ability(AbilityManager.New("creator.TooManySigils", "Gain Two Batteries", "When a card bearing this sigil is played, the owner gains two Max Energy.", typeof(Gain2Battery), "Gain2Battery.png")), TextureHelper.GetImageAsTexture("Gain2Battery_a2.png", (FilterMode)0), (FilterMode?)(FilterMode)0);
AbilityMetaCategory[] array = new AbilityMetaCategory[4];
RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
Gain2Battery.ability = AbilityExtensions.AddMetaCategories(obj, (AbilityMetaCategory[])(object)array).ability;
}
private void AddGainBattery3()
{
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
AbilityInfo obj = AbilityExtensions.SetPixelAbilityIcon(AbilityExtensions.SetDefaultPart1Ability(AbilityManager.New("creator.TooManySigils", "Gain Three Batteries", "When a card bearing this sigil is played, the owner gains three Max Energy.", typeof(Gain3Battery), "Gain3Battery.png")), TextureHelper.GetImageAsTexture("Gain3Battery_a2.png", (FilterMode)0), (FilterMode?)(FilterMode)0);
AbilityMetaCategory[] array = new AbilityMetaCategory[4];
RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
Gain3Battery.ability = AbilityExtensions.AddMetaCategories(obj, (AbilityMetaCategory[])(object)array).ability;
}
private void AddGainBattery4()
{
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
AbilityInfo obj = AbilityExtensions.SetPixelAbilityIcon(AbilityExtensions.SetDefaultPart1Ability(AbilityManager.New("creator.TooManySigils", "Gain Four Batteries", "When a card bearing this sigil is played, the owner gains four Max Energy.", typeof(Gain4Battery), "Gain4Battery.png")), TextureHelper.GetImageAsTexture("Gain4Battery_a2.png", (FilterMode)0), (FilterMode?)(FilterMode)0);
AbilityMetaCategory[] array = new AbilityMetaCategory[4];
RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
Gain4Battery.ability = AbilityExtensions.AddMetaCategories(obj, (AbilityMetaCategory[])(object)array).ability;
}
private void AddGainBattery5()
{
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
AbilityInfo obj = AbilityExtensions.SetPixelAbilityIcon(AbilityExtensions.SetDefaultPart1Ability(AbilityManager.New("creator.TooManySigils", "Gain Five Batteries", "When a card bearing this sigil is played, the owner gains five Max Energy.", typeof(Gain5Battery), "Gain5Battery.png")), TextureHelper.GetImageAsTexture("Gain5Battery_a2.png", (FilterMode)0), (FilterMode?)(FilterMode)0);
AbilityMetaCategory[] array = new AbilityMetaCategory[4];
RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
Gain5Battery.ability = AbilityExtensions.AddMetaCategories(obj, (AbilityMetaCategory[])(object)array).ability;
}
private void AddGainBattery6()
{
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
AbilityInfo obj = AbilityExtensions.SetPixelAbilityIcon(AbilityExtensions.SetDefaultPart1Ability(AbilityManager.New("creator.TooManySigils", "Gain Six Batteries", "When a card bearing this sigil is played, the owner gains six Max Energy.", typeof(Gain6Battery), "Gain6Battery.png")), TextureHelper.GetImageAsTexture("Gain6Battery_a2.png", (FilterMode)0), (FilterMode?)(FilterMode)0);
AbilityMetaCategory[] array = new AbilityMetaCategory[4];
RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
Gain6Battery.ability = AbilityExtensions.AddMetaCategories(obj, (AbilityMetaCategory[])(object)array).ability;
}
private void AddBellPresser()
{
AbilityExtensions.SetDefaultPart3Ability(AbilityExtensions.SetDefaultPart1Ability(AbilityExtensions.SetIcon(StatIconManager.New("creator.TooManySigils", "Bell Presser", "This cards power is equal to the amount of times the bell has been rung.", typeof(AntMinus)), "BellPresser.png", (FilterMode?)null))).appliesToHealth = false;
}
private void AddCoinsWithin()
{
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
AbilityInfo obj = AbilityExtensions.SetPixelAbilityIcon(AbilityExtensions.SetDefaultPart1Ability(AbilityManager.New("creator.TooManySigils", "Coins Within", "When this card is struck it provides 1 foil to its owner, as long as it lives anyway.", typeof(CoinsWithin), "CoinsWithin_A1.png")), TextureHelper.GetImageAsTexture("CoinsWithin_A2.png", (FilterMode)0), (FilterMode?)(FilterMode)0);
AbilityMetaCategory[] array = new AbilityMetaCategory[4];
RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
CoinsWithin.ability = AbilityExtensions.AddMetaCategories(obj, (AbilityMetaCategory[])(object)array).ability;
}
private void AddTreasureTracker()
{
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
AbilityInfo obj = AbilityExtensions.SetPixelAbilityIcon(AbilityExtensions.SetDefaultPart1Ability(AbilityManager.New("creator.TooManySigils", "Treasure Tracker", "At The end of the Owners turn, this card will provide the owner with 1 foil.", typeof(TreasureTracker), "TreasureTracker_A1.png")), TextureHelper.GetImageAsTexture("TreasureTracker_A2.png", (FilterMode)0), (FilterMode?)(FilterMode)0);
AbilityMetaCategory[] array = new AbilityMetaCategory[4];
RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
TreasureTracker.ability = AbilityExtensions.AddMetaCategories(obj, (AbilityMetaCategory[])(object)array).ability;
}
private void AddOneFourthChanceInstakill()
{
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
AbilityInfo obj = AbilityExtensions.SetPixelAbilityIcon(AbilityExtensions.SetDefaultPart1Ability(AbilityManager.New("creator.TooManySigils", "One Fourth Chance Instakill", "When this card would be attacked, there is a 25% chance that the striker perishes.", typeof(One_Fouth_Chance_Instakill), "OneFourthChanceInstakill_A1.png")), TextureHelper.GetImageAsTexture("OneFourthChanceInstakill_A2.png", (FilterMode)0), (FilterMode?)(FilterMode)0);
AbilityMetaCategory[] array = new AbilityMetaCategory[4];
RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
One_Fouth_Chance_Instakill.ability = AbilityExtensions.AddMetaCategories(obj, (AbilityMetaCategory[])(object)array).ability;
}
private void AddFishOutOfWater()
{
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
AbilityInfo obj = AbilityExtensions.SetPixelAbilityIcon(AbilityExtensions.SetDefaultPart1Ability(AbilityManager.New("creator.TooManySigils", "Fish Out Of Water", "At the end of the turn, this card switches from having Airborne to Waterborne and so on. If neither are present will start with Waterborne.", typeof(FishOutOfWater), "FishOutOfWater_A1.png")), TextureHelper.GetImageAsTexture("FishOutOfWater_A2.png", (FilterMode)0), (FilterMode?)(FilterMode)0);
AbilityMetaCategory[] array = new AbilityMetaCategory[4];
RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
FishOutOfWater.ability = AbilityExtensions.AddMetaCategories(obj, (AbilityMetaCategory[])(object)array).ability;
}
private void AddBorrowedTime()
{
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
AbilityInfo obj = AbilityExtensions.SetPixelAbilityIcon(AbilityExtensions.SetDefaultPart1Ability(AbilityManager.New("creator.TooManySigils", "Borrowed Time", "When this card perishes its Icecube is summoned if done in time, or else if over the EvolveTurns a corrupt version will be summoned.", typeof(BorrowedTime), "BorrowedTime_A1.png")), TextureHelper.GetImageAsTexture("BorrowedTime_A2.png", (FilterMode)0), (FilterMode?)(FilterMode)0);
AbilityMetaCategory[] array = new AbilityMetaCategory[4];
RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
BorrowedTime.ability = AbilityExtensions.AddMetaCategories(obj, (AbilityMetaCategory[])(object)array).ability;
}
}
public static class MyPluginInfo
{
public const string PLUGIN_GUID = "TooManySigils";
public const string PLUGIN_NAME = "TooManySigils";
public const string PLUGIN_VERSION = "2.7.0";
}
}
namespace TooManySigils.Classes
{
public class AntMinus : VariableStatBehaviour
{
public override SpecialStatIcon IconType => (SpecialStatIcon)1;
public override int[] GetStatValues()
{
List<CardSlot> obj = (((SpecialCardBehaviour)this).PlayableCard.Slot.IsPlayerSlot ? Singleton<BoardManager>.Instance.PlayerSlotsCopy : Singleton<BoardManager>.Instance.OpponentSlotsCopy);
int num = 0;
foreach (CardSlot item in obj)
{
if ((Object)(object)item.Card != (Object)null && ((Card)item.Card).Info.HasTrait((Trait)11))
{
num++;
}
}
num--;
return new int[2] { num, 0 };
}
}
public class Bastion : AbilityBehaviour
{
[HarmonyPatch(typeof(PlayableCard), "TakeDamage")]
public class TakeDamagePatch : PlayableCard
{
private static void Prefix(ref PlayableCard __instance, ref int damage)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
if (__instance.HasAbility(ability))
{
damage /= 2;
}
}
}
public static Ability ability;
public override Ability Ability => ability;
}
internal class BellRingerStat : AbilityBehaviour
{
public static Ability ability;
public override Ability Ability => ability;
public bool RespondsToBellRung(bool playerCombatPhase)
{
return ((AbilityBehaviour)this).Card.OnBoard && playerCombatPhase;
}
public IEnumerator OnBellRung(bool playerCombatPhase)
{
yield return ((AbilityBehaviour)this).PreSuccessfulTriggerSequence();
((Card)((AbilityBehaviour)this).Card).Anim.LightNegationEffect();
((AbilityBehaviour)this).Card.AddTemporaryMod(new CardModificationInfo(1, 0));
}
public override bool RespondsToOtherCardDealtDamage(PlayableCard attacker, int amount, PlayableCard target)
{
if (!((Object)((Card)target).Info).name.ToLowerInvariant().Contains("bell"))
{
return ((Card)target).Info.DisplayedNameEnglish.ToLowerInvariant().Contains("bell");
}
return true;
}
public override IEnumerator OnOtherCardDealtDamage(PlayableCard attacker, int amount, PlayableCard target)
{
yield return ((AbilityBehaviour)this).PreSuccessfulTriggerSequence();
((Card)((AbilityBehaviour)this).Card).Anim.LightNegationEffect();
((AbilityBehaviour)this).Card.AddTemporaryMod(new CardModificationInfo(1, 0));
}
}
internal class BonelessTrait
{
[HarmonyPatch(typeof(ResourcesManager), "AddBones")]
public class Boneless_Patch
{
[HarmonyPrefix]
public static bool Prefix(int amount, CardSlot slot)
{
//IL_001d: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)slot != (Object)null && (Object)(object)slot.Card != (Object)null && CardExtensions.HasTrait(slot.Card, Boneless))
{
return false;
}
return true;
}
}
private static Trait Boneless = GuidManager.GetEnumValue<Trait>("ATribalLibary", "Boneless");
}
internal class BorrowedTime : AbilityBehaviour
{
public static Ability ability;
public int Turn;
public override Ability Ability => ability;
public override bool RespondsToUpkeep(bool playerUpkeep)
{
return playerUpkeep != ((AbilityBehaviour)this).Card.OpponentCard;
}
public override IEnumerator OnUpkeep(bool playerUpkeep)
{
Turn++;
yield break;
}
public override bool RespondsToDie(bool wasSacrifice, PlayableCard killer)
{
return !wasSacrifice;
}
public override IEnumerator OnDie(bool wasSacrifice, PlayableCard killer)
{
int turnsToEvolve = ((Card)((AbilityBehaviour)this).Card).Info.evolveParams?.turnsToEvolve ?? 0;
if ((int)Singleton<ViewManager>.Instance.CurrentView != 34)
{
yield return (object)new WaitForSeconds(0.3f);
Singleton<ViewManager>.Instance.SwitchToView((View)34, false, false);
yield return (object)new WaitForSeconds(0.3f);
}
if (Turn < turnsToEvolve)
{
Console.Write("Turn < turnsToEvolve");
if ((Object)(object)((Card)((AbilityBehaviour)this).Card).Info.iceCubeParams?.creatureWithin != (Object)null)
{
Console.Write("Ice Cube");
((Card)((AbilityBehaviour)this).Card).Anim.PlayTransformAnimation();
? val = Singleton<BoardManager>.Instance;
object obj = ((Card)((AbilityBehaviour)this).Card).Info.iceCubeParams.creatureWithin.Clone();
yield return ((BoardManager)val).CreateCardInSlot((CardInfo)((obj is CardInfo) ? obj : null), ((AbilityBehaviour)this).Card.Slot, 0.15f, true);
yield break;
}
}
else
{
Console.Write("Turn >= turnsToEvolve");
if ((Object)(object)((Card)((AbilityBehaviour)this).Card).Info.evolveParams?.evolution != (Object)null)
{
Console.Write("Evolution");
((Card)((AbilityBehaviour)this).Card).Anim.PlayTransformAnimation();
? val2 = Singleton<BoardManager>.Instance;
object obj2 = ((Card)((AbilityBehaviour)this).Card).Info.evolveParams.evolution.Clone();
yield return ((BoardManager)val2).CreateCardInSlot((CardInfo)((obj2 is CardInfo) ? obj2 : null), ((AbilityBehaviour)this).Card.Slot, 0.15f, true);
yield break;
}
}
Console.Write("Ringworm");
yield return Singleton<BoardManager>.Instance.CreateCardInSlot(CardLoader.GetCardByName("RingWorm"), ((AbilityBehaviour)this).Card.Slot, 0.15f, true);
}
}
public class Child13Trait : SpecialCardBehaviour
{
private bool attackMode;
private CardModificationInfo mod;
private int sacrificeCount;
private int MAX_SACRIFICES = 9999;
private void Start()
{
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
//IL_0019: Expected O, but got Unknown
if ((Object)(object)((SpecialCardBehaviour)this).Card != (Object)null)
{
mod = new CardModificationInfo();
}
mod.nonCopyable = true;
mod.abilities.Add((Ability)19);
mod.attackAdjustment = -2;
}
public override bool RespondsToSacrifice()
{
return true;
}
public override IEnumerator OnSacrifice()
{
sacrificeCount++;
if (sacrificeCount > MAX_SACRIFICES)
{
yield return ((SpecialCardBehaviour)this).PlayableCard.Die(true, (PlayableCard)null, true);
}
else if (sacrificeCount < MAX_SACRIFICES)
{
attackMode = !attackMode;
if (attackMode)
{
((SpecialCardBehaviour)this).PlayableCard.SwitchToAlternatePortrait();
((SpecialCardBehaviour)this).PlayableCard.AddTemporaryMod(mod);
}
else
{
((SpecialCardBehaviour)this).PlayableCard.SwitchToDefaultPortrait();
((SpecialCardBehaviour)this).PlayableCard.RemoveTemporaryMod(mod, true);
}
}
}
}
[HarmonyPatch]
internal class ClawStrike : ExtendedAbilityBehaviour, IOnPostSlotAttackSequence
{
public static Ability ability;
private bool DealBonusToLeft = true;
private List<CardSlot> currentTargets = new List<CardSlot>();
private int Randomizer = Random.Range(0, 1);
public override Ability Ability => ability;
public override bool RemoveDefaultAttackSlot()
{
return true;
}
public override bool RespondsToGetOpposingSlots()
{
return true;
}
public override List<CardSlot> GetOpposingSlots(List<CardSlot> originalSlots, List<CardSlot> otherAddedSlots)
{
return currentTargets = Singleton<BoardManager>.Instance.GetAdjacentSlots(((AbilityBehaviour)this).Card.Slot.opposingSlot);
}
public override bool RespondsToSlotTargetedForAttack(CardSlot slot, PlayableCard attacker)
{
if ((Object)(object)attacker == (Object)(object)((AbilityBehaviour)this).Card)
{
return currentTargets.Contains(slot);
}
return false;
}
public override IEnumerator OnSlotTargetedForAttack(CardSlot slot, PlayableCard attacker)
{
if (DealBonusToLeft)
{
if ((Object)(object)currentTargets[0] == (Object)(object)slot)
{
((AbilityBehaviour)this).Card.AddTemporaryMod(new CardModificationInfo
{
singletonId = "ClawStrikePower",
nonCopyable = true
});
}
}
else if (currentTargets.Count > 1 && (Object)(object)currentTargets[1] == (Object)(object)slot)
{
((AbilityBehaviour)this).Card.AddTemporaryMod(new CardModificationInfo
{
singletonId = "ClawStrikePower",
nonCopyable = true
});
}
yield break;
}
public bool RespondsToPostSlotAttackSequence(CardSlot attackingSlot)
{
return (Object)(object)attackingSlot.Card == (Object)(object)((AbilityBehaviour)this).Card;
}
public IEnumerator OnPostSlotAttackSequence(CardSlot attackingSlot)
{
DealBonusToLeft = !DealBonusToLeft;
yield return (object)new WaitForSeconds(0.1f);
attackingSlot.Card.RemoveTemporaryMod(attackingSlot.Card.TemporaryMods.Find((CardModificationInfo x) => x.singletonId == "ClawStrikePower"), true);
((Card)((AbilityBehaviour)this).Card).Anim.StrongNegationEffect();
yield return (object)new WaitForSeconds(0.4f);
}
[HarmonyPostfix]
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
public static void AttackPatch(ref PlayableCard __instance, ref int __result)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
if (__instance.HasAbility(ability) && __instance.TemporaryMods.Find((CardModificationInfo x) => x.singletonId == "ClawStrikePower") != null)
{
__result++;
}
}
}
public class CoinsWithin : AbilityBehaviour
{
public static Ability ability;
public override Ability Ability => ability;
public override bool RespondsToTakeDamage(PlayableCard source)
{
if ((Object)(object)source != (Object)null)
{
return source.Health > 0;
}
return false;
}
public override IEnumerator OnTakeDamage(PlayableCard source)
{
Singleton<ViewManager>.Instance.SwitchToView((View)4, false, true);
yield return (object)new WaitForSeconds(0.1f);
((Card)((AbilityBehaviour)this).Card).Anim.LightNegationEffect();
yield return ((AbilityBehaviour)this).PreSuccessfulTriggerSequence();
if (!SaveManager.SaveFile.IsPart2)
{
if (Chainloader.PluginInfos.ContainsKey("extraVoid.inscryption.LifeCost"))
{
Singleton<ViewManager>.Instance.SwitchToView((View)7, false, true);
yield return (object)new WaitForSeconds(0.25f);
RunState run = RunState.Run;
run.currency++;
yield return Singleton<CurrencyBowl>.Instance.DropWeightsIn(1);
yield return (object)new WaitForSeconds(0.75f);
}
else
{
Singleton<ViewManager>.Instance.SwitchToView((View)7, false, true);
yield return (object)new WaitForSeconds(0.25f);
RunState run2 = RunState.Run;
run2.currency++;
yield return Singleton<CurrencyBowl>.Instance.ShowGain(1, true, false);
yield return (object)new WaitForSeconds(0.25f);
}
}
else
{
SaveData data = SaveData.Data;
data.currency++;
((Card)((AbilityBehaviour)this).Card).Anim.StrongNegationEffect();
((Card)((AbilityBehaviour)this).Card).Anim.StrongNegationEffect();
}
yield return (object)new WaitForSeconds(0.1f);
yield return ((AbilityBehaviour)this).LearnAbility(0.1f);
Singleton<ViewManager>.Instance.Controller.LockState = (ViewLockState)0;
}
}
internal class Covalesce : AbilityBehaviour
{
public static Ability ability;
public override Ability Ability => ability;
public override bool RespondsToTurnEnd(bool playerTurnEnd)
{
return ((AbilityBehaviour)this).Card.Slot.IsPlayerSlot == playerTurnEnd;
}
public override IEnumerator OnTurnEnd(bool playerTurnEnd)
{
Singleton<ViewManager>.Instance.SwitchToView((View)4, false, false);
yield return (object)new WaitForSeconds(0.15f);
if (!Object.op_Implicit((Object)(object)((AbilityBehaviour)this).Card.Slot) == ((AbilityBehaviour)this).Card.Dead)
{
((AbilityBehaviour)this).Card.TemporaryMods.Add(new CardModificationInfo(0, 1));
yield return ((AbilityBehaviour)this).LearnAbility(0f);
yield return (object)new WaitForSeconds(0.3f);
}
}
}
internal class DeadDraw
{
public class DeathDraw : AbilityBehaviour
{
public static Ability ability;
public override Ability Ability => ability;
public override bool RespondsToPreDeathAnimation(bool wasSacrifice)
{
return !wasSacrifice;
}
public override IEnumerator OnPreDeathAnimation(bool wasSacrifice)
{
yield return ((AbilityBehaviour)this).PreSuccessfulTriggerSequence();
yield return (object)new WaitForSeconds(0.2f);
Singleton<ViewManager>.Instance.SwitchToView((View)1, false, false);
yield return (object)new WaitForSeconds(0.25f);
if (RunState.Run.consumables.Count < RunState.Run.MaxConsumables)
{
RunState.Run.consumables.Add(((Object)ItemsUtil.GetRandomUnlockedConsumable(((TriggerReceiver)this).GetRandomSeed())).name);
Singleton<ItemsManager>.Instance.UpdateItems(false);
}
else
{
((Card)((AbilityBehaviour)this).Card).Anim.StrongNegationEffect();
yield return (object)new WaitForSeconds(0.2f);
Singleton<ItemsManager>.Instance.ShakeConsumableSlots(0f);
}
yield return (object)new WaitForSeconds(0.2f);
yield return ((AbilityBehaviour)this).LearnAbility(0f);
}
}
}
public class FishOutOfWater : AbilityBehaviour
{
public static Ability ability;
private readonly CardModificationInfo fishMod = new CardModificationInfo((Ability)13)
{
singletonId = "FishOutOfWater",
nonCopyable = true
};
public override Ability Ability => ((AbilityBehaviour)this).Ability;
public void Start()
{
if (!((Object)(object)((AbilityBehaviour)this).Card == (Object)null))
{
((AbilityBehaviour)this).Card.AddTemporaryMod(fishMod);
}
}
public override bool RespondsToUpkeep(bool playerUpkeep)
{
return playerUpkeep != ((AbilityBehaviour)this).Card.OpponentCard;
}
public override IEnumerator OnUpkeep(bool playerUpkeep)
{
if (((AbilityBehaviour)this).Card.HasAbility((Ability)13))
{
fishMod.abilities = new List<Ability> { (Ability)19 };
fishMod.negateAbilities = new List<Ability> { (Ability)13 };
}
else
{
fishMod.abilities = new List<Ability> { (Ability)13 };
fishMod.negateAbilities = new List<Ability> { (Ability)19 };
}
((Card)((AbilityBehaviour)this).Card).Anim.PlayTransformAnimation();
((AbilityBehaviour)this).Card.OnStatsChanged();
yield return (object)new WaitForSeconds(0.4f);
}
}
internal class Gain1Battery : AbilityBehaviour
{
public static Ability ability;
public override Ability Ability => ability;
public override bool RespondsToResolveOnBoard()
{
return true;
}
public override IEnumerator OnResolveOnBoard()
{
yield return ((AbilityBehaviour)this).PreSuccessfulTriggerSequence();
if (Singleton<ResourcesManager>.Instance is Part3ResourcesManager)
{
yield return (object)new WaitForSeconds(0.2f);
Singleton<ViewManager>.Instance.SwitchToView((View)1, false, false);
yield return (object)new WaitForSeconds(0.2f);
}
yield return Singleton<ResourcesManager>.Instance.AddMaxEnergy(1);
yield return Singleton<ResourcesManager>.Instance.AddEnergy(1);
if (Singleton<ResourcesManager>.Instance is Part3ResourcesManager)
{
yield return (object)new WaitForSeconds(0.3f);
}
yield return ((AbilityBehaviour)this).LearnAbility(0.2f);
}
}
internal class Gain2Battery : AbilityBehaviour
{
public static Ability ability;
public override Ability Ability => ability;
public override bool RespondsToResolveOnBoard()
{
return true;
}
public override IEnumerator OnResolveOnBoard()
{
yield return ((AbilityBehaviour)this).PreSuccessfulTriggerSequence();
if (Singleton<ResourcesManager>.Instance is Part3ResourcesManager)
{
yield return (object)new WaitForSeconds(0.2f);
Singleton<ViewManager>.Instance.SwitchToView((View)1, false, false);
yield return (object)new WaitForSeconds(0.2f);
}
yield return Singleton<ResourcesManager>.Instance.AddMaxEnergy(2);
yield return Singleton<ResourcesManager>.Instance.AddEnergy(2);
if (Singleton<ResourcesManager>.Instance is Part3ResourcesManager)
{
yield return (object)new WaitForSeconds(0.3f);
}
yield return ((AbilityBehaviour)this).LearnAbility(0.2f);
}
}
internal class Gain3Battery : AbilityBehaviour
{
public static Ability ability;
public override Ability Ability => ability;
public override bool RespondsToResolveOnBoard()
{
return true;
}
public override IEnumerator OnResolveOnBoard()
{
yield return ((AbilityBehaviour)this).PreSuccessfulTriggerSequence();
if (Singleton<ResourcesManager>.Instance is Part3ResourcesManager)
{
yield return (object)new WaitForSeconds(0.2f);
Singleton<ViewManager>.Instance.SwitchToView((View)1, false, false);
yield return (object)new WaitForSeconds(0.2f);
}
yield return Singleton<ResourcesManager>.Instance.AddMaxEnergy(3);
yield return Singleton<ResourcesManager>.Instance.AddEnergy(3);
if (Singleton<ResourcesManager>.Instance is Part3ResourcesManager)
{
yield return (object)new WaitForSeconds(0.3f);
}
yield return ((AbilityBehaviour)this).LearnAbility(0.2f);
}
}
internal class Gain4Battery : AbilityBehaviour
{
public static Ability ability;
public override Ability Ability => ability;
public override bool RespondsToResolveOnBoard()
{
return true;
}
public override IEnumerator OnResolveOnBoard()
{
yield return ((AbilityBehaviour)this).PreSuccessfulTriggerSequence();
if (Singleton<ResourcesManager>.Instance is Part3ResourcesManager)
{
yield return (object)new WaitForSeconds(0.2f);
Singleton<ViewManager>.Instance.SwitchToView((View)1, false, false);
yield return (object)new WaitForSeconds(0.2f);
}
yield return Singleton<ResourcesManager>.Instance.AddMaxEnergy(4);
yield return Singleton<ResourcesManager>.Instance.AddEnergy(4);
if (Singleton<ResourcesManager>.Instance is Part3ResourcesManager)
{
yield return (object)new WaitForSeconds(0.3f);
}
yield return ((AbilityBehaviour)this).LearnAbility(0.2f);
}
}
internal class Gain5Battery : AbilityBehaviour
{
public static Ability ability;
public override Ability Ability => ability;
public override bool RespondsToResolveOnBoard()
{
return true;
}
public override IEnumerator OnResolveOnBoard()
{
yield return ((AbilityBehaviour)this).PreSuccessfulTriggerSequence();
if (Singleton<ResourcesManager>.Instance is Part3ResourcesManager)
{
yield return (object)new WaitForSeconds(0.2f);
Singleton<ViewManager>.Instance.SwitchToView((View)1, false, false);
yield return (object)new WaitForSeconds(0.2f);
}
yield return Singleton<ResourcesManager>.Instance.AddMaxEnergy(5);
yield return Singleton<ResourcesManager>.Instance.AddEnergy(5);
if (Singleton<ResourcesManager>.Instance is Part3ResourcesManager)
{
yield return (object)new WaitForSeconds(0.3f);
}
yield return ((AbilityBehaviour)this).LearnAbility(0.2f);
}
}
internal class Gain6Battery : AbilityBehaviour
{
public static Ability ability;
public override Ability Ability => ability;
public override bool RespondsToResolveOnBoard()
{
return true;
}
public override IEnumerator OnResolveOnBoard()
{
yield return ((AbilityBehaviour)this).PreSuccessfulTriggerSequence();
if (Singleton<ResourcesManager>.Instance is Part3ResourcesManager)
{
yield return (object)new WaitForSeconds(0.2f);
Singleton<ViewManager>.Instance.SwitchToView((View)1, false, false);
yield return (object)new WaitForSeconds(0.2f);
}
yield return Singleton<ResourcesManager>.Instance.AddMaxEnergy(6);
yield return Singleton<ResourcesManager>.Instance.AddEnergy(6);
if (Singleton<ResourcesManager>.Instance is Part3ResourcesManager)
{
yield return (object)new WaitForSeconds(0.3f);
}
yield return ((AbilityBehaviour)this).LearnAbility(0.2f);
}
}
public class HeartLocked : AbilityBehaviour
{
[HarmonyPatch(typeof(PlayableCard), "TakeDamage")]
public class TakeDamagePatch : PlayableCard
{
private static void Prefix(ref PlayableCard __instance, ref int damage)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
if (__instance.HasAbility(ability))
{
damage = 1;
}
}
}
public static Ability ability;
public override Ability Ability => ability;
}
public class Host : AbilityBehaviour
{
public static Ability ability;
public override Ability Ability => ability;
public override bool RespondsToTakeDamage(PlayableCard source)
{
return true;
}
public override IEnumerator OnTakeDamage(PlayableCard source)
{
yield return (object)new WaitForSeconds(0.2f);
Singleton<ViewManager>.Instance.SwitchToView((View)1, false, false);
yield return (object)new WaitForSeconds(0.2f);
if ((Object)(object)((Card)((AbilityBehaviour)this).Card).Info.iceCubeParams.creatureWithin != (Object)null)
{
yield return Singleton<CardSpawner>.Instance.SpawnCardToHand(((Card)((AbilityBehaviour)this).Card).Info.iceCubeParams.creatureWithin, new List<CardModificationInfo>(), new Vector3(0f, 0f, 0f), 0f, (Action<PlayableCard>)null);
yield break;
}
yield return Singleton<CardSpawner>.Instance.SpawnCardToHand(ScriptableObjectLoader<CardInfo>.AllData.Find((CardInfo info) => ((Object)info).name == "RingWorm"), new List<CardModificationInfo>(), new Vector3(0f, 0f, 0f), 0f, (Action<PlayableCard>)null);
}
}
public class Launcher : AbilityBehaviour
{
public static Ability ability;
public override Ability Ability => ability;
public override bool RespondsToTurnEnd(bool playerTurnEnd)
{
if ((Object)(object)((AbilityBehaviour)this).Card != (Object)null && ((AbilityBehaviour)this).Card.OpponentCard != playerTurnEnd)
{
return ((AbilityBehaviour)this).Card.OnBoard;
}
return false;
}
public override IEnumerator OnTurnEnd(bool playerTurnEnd)
{
List<CardSlot> obj = (playerTurnEnd ? Singleton<BoardManager>.Instance.PlayerSlotsCopy : Singleton<BoardManager>.Instance.OpponentSlotsCopy);
List<CardSlot> openspots = new List<CardSlot>();
foreach (CardSlot item in obj)
{
if ((Object)(object)item.Card == (Object)null)
{
openspots.Add(item);
}
}
if (openspots.Count == 0)
{
yield break;
}
Random random = new Random();
yield return (object)new WaitForSeconds(0.3f);
Singleton<ViewManager>.Instance.SwitchToView((View)4, false, false);
yield return (object)new WaitForSeconds(0.3f);
if ((Object)(object)((Card)((AbilityBehaviour)this).Card).Info.iceCubeParams.creatureWithin != (Object)null)
{
yield return Singleton<BoardManager>.Instance.CreateCardInSlot(((Card)((AbilityBehaviour)this).Card).Info.iceCubeParams.creatureWithin, openspots[random.Next(openspots.Count)], 0.1f, true);
}
else
{
yield return Singleton<BoardManager>.Instance.CreateCardInSlot(ScriptableObjectLoader<CardInfo>.AllData.Find((CardInfo info) => ((Object)info).name == "Squirrel"), openspots[random.Next(openspots.Count)], 0.1f, true);
}
yield return (object)new WaitForSeconds(0.3f);
Singleton<ViewManager>.Instance.SwitchToView((View)1, false, false);
}
}
internal class Lose1Battery : AbilityBehaviour
{
public static Ability ability;
public override Ability Ability => ability;
public override bool RespondsToResolveOnBoard()
{
return true;
}
public override IEnumerator OnResolveOnBoard()
{
yield return ((AbilityBehaviour)this).PreSuccessfulTriggerSequence();
if (Singleton<ResourcesManager>.Instance is Part3ResourcesManager)
{
yield return (object)new WaitForSeconds(0.2f);
Singleton<ViewManager>.Instance.SwitchToView((View)1, false, false);
yield return (object)new WaitForSeconds(0.2f);
}
yield return Singleton<ResourcesManager>.Instance.AddMaxEnergy(-1);
yield return Singleton<ResourcesManager>.Instance.AddEnergy(-1);
if (Singleton<ResourcesManager>.Instance is Part3ResourcesManager)
{
yield return (object)new WaitForSeconds(0.3f);
}
yield return ((AbilityBehaviour)this).LearnAbility(0.2f);
}
}
internal class Lose2Battery : AbilityBehaviour
{
public static Ability ability;
public override Ability Ability => ability;
public override bool RespondsToResolveOnBoard()
{
return true;
}
public override IEnumerator OnResolveOnBoard()
{
yield return ((AbilityBehaviour)this).PreSuccessfulTriggerSequence();
if (Singleton<ResourcesManager>.Instance is Part3ResourcesManager)
{
yield return (object)new WaitForSeconds(0.2f);
Singleton<ViewManager>.Instance.SwitchToView((View)1, false, false);
yield return (object)new WaitForSeconds(0.2f);
}
yield return Singleton<ResourcesManager>.Instance.AddMaxEnergy(-2);
yield return Singleton<ResourcesManager>.Instance.AddEnergy(-2);
if (Singleton<ResourcesManager>.Instance is Part3ResourcesManager)
{
yield return (object)new WaitForSeconds(0.3f);
}
yield return ((AbilityBehaviour)this).LearnAbility(0.2f);
}
}
internal class Lose3Battery : AbilityBehaviour
{
public static Ability ability;
public override Ability Ability => ability;
public override bool RespondsToResolveOnBoard()
{
return true;
}
public override IEnumerator OnResolveOnBoard()
{
yield return ((AbilityBehaviour)this).PreSuccessfulTriggerSequence();
if (Singleton<ResourcesManager>.Instance is Part3ResourcesManager)
{
yield return (object)new WaitForSeconds(0.2f);
Singleton<ViewManager>.Instance.SwitchToView((View)1, false, false);
yield return (object)new WaitForSeconds(0.2f);
}
yield return Singleton<ResourcesManager>.Instance.AddMaxEnergy(-3);
yield return Singleton<ResourcesManager>.Instance.AddEnergy(-3);
if (Singleton<ResourcesManager>.Instance is Part3ResourcesManager)
{
yield return (object)new WaitForSeconds(0.3f);
}
yield return ((AbilityBehaviour)this).LearnAbility(0.2f);
}
}
internal class Lose4Battery : AbilityBehaviour
{
public static Ability ability;
public override Ability Ability => ability;
public override bool RespondsToResolveOnBoard()
{
return true;
}
public override IEnumerator OnResolveOnBoard()
{
yield return ((AbilityBehaviour)this).PreSuccessfulTriggerSequence();
if (Singleton<ResourcesManager>.Instance is Part3ResourcesManager)
{
yield return (object)new WaitForSeconds(0.2f);
Singleton<ViewManager>.Instance.SwitchToView((View)1, false, false);
yield return (object)new WaitForSeconds(0.2f);
}
yield return Singleton<ResourcesManager>.Instance.AddMaxEnergy(-4);
yield return Singleton<ResourcesManager>.Instance.AddEnergy(-4);
if (Singleton<ResourcesManager>.Instance is Part3ResourcesManager)
{
yield return (object)new WaitForSeconds(0.3f);
}
yield return ((AbilityBehaviour)this).LearnAbility(0.2f);
}
}
internal class Lose5Battery : AbilityBehaviour
{
public static Ability ability;
public override Ability Ability => ability;
public override bool RespondsToResolveOnBoard()
{
return true;
}
public override IEnumerator OnResolveOnBoard()
{
yield return ((AbilityBehaviour)this).PreSuccessfulTriggerSequence();
if (Singleton<ResourcesManager>.Instance is Part3ResourcesManager)
{
yield return (object)new WaitForSeconds(0.2f);
Singleton<ViewManager>.Instance.SwitchToView((View)1, false, false);
yield return (object)new WaitForSeconds(0.2f);
}
yield return Singleton<ResourcesManager>.Instance.AddMaxEnergy(-5);
yield return Singleton<ResourcesManager>.Instance.AddEnergy(-5);
if (Singleton<ResourcesManager>.Instance is Part3ResourcesManager)
{
yield return (object)new WaitForSeconds(0.3f);
}
yield return ((AbilityBehaviour)this).LearnAbility(0.2f);
}
}
internal class Lose6Battery : AbilityBehaviour
{
public static Ability ability;
public override Ability Ability => ability;
public override bool RespondsToResolveOnBoard()
{
return true;
}
public override IEnumerator OnResolveOnBoard()
{
yield return ((AbilityBehaviour)this).PreSuccessfulTriggerSequence();
if (Singleton<ResourcesManager>.Instance is Part3ResourcesManager)
{
yield return (object)new WaitForSeconds(0.2f);
Singleton<ViewManager>.Instance.SwitchToView((View)1, false, false);
yield return (object)new WaitForSeconds(0.2f);
}
yield return Singleton<ResourcesManager>.Instance.AddMaxEnergy(-6);
yield return Singleton<ResourcesManager>.Instance.AddEnergy(-6);
if (Singleton<ResourcesManager>.Instance is Part3ResourcesManager)
{
yield return (object)new WaitForSeconds(0.3f);
}
yield return ((AbilityBehaviour)this).LearnAbility(0.2f);
}
}
public class One_Fouth_Chance_Instakill : AbilityBehaviour
{
public static Ability ability;
public override Ability Ability => ability;
public override bool RespondsToSlotTargetedForAttack(CardSlot slot, PlayableCard attacker)
{
if (((AbilityBehaviour)this).Card.OnBoard && !((AbilityBehaviour)this).Card.Dead)
{
return (Object)(object)slot == (Object)(object)((AbilityBehaviour)this).Card.Slot;
}
return false;
}
public override IEnumerator OnSlotTargetedForAttack(CardSlot slot, PlayableCard attacker)
{
if (Random.Range(0, 4) == 0)
{
Singleton<ViewManager>.Instance.SwitchToView((View)4, false, false);
yield return (object)new WaitForSeconds(0.15f);
if ((Object)(object)attacker != (Object)null)
{
yield return attacker.Die(false, (PlayableCard)null, false);
((Card)((AbilityBehaviour)this).Card).Anim.LightNegationEffect();
Console.Write("Success");
}
else
{
Console.Write("Unsuccessful: Card == null");
}
yield return (object)new WaitForSeconds(0.3f);
}
else
{
Console.Write("Unsuccessful: Random == 1-3");
}
yield return ((AbilityBehaviour)this).LearnAbility(0.1f);
}
}
internal class Rotting : AbilityBehaviour
{
public static Ability ability;
public override Ability Ability => ability;
public override bool RespondsToTurnEnd(bool playerTurnEnd)
{
return ((AbilityBehaviour)this).Card.Slot.IsPlayerSlot == playerTurnEnd;
}
public override IEnumerator OnTurnEnd(bool playerTurnEnd)
{
Singleton<ViewManager>.Instance.SwitchToView((View)4, false, false);
yield return (object)new WaitForSeconds(0.15f);
if (!Object.op_Implicit((Object)(object)((AbilityBehaviour)this).Card.Slot) == ((AbilityBehaviour)this).Card.Dead)
{
if (Object.op_Implicit((Object)(object)((AbilityBehaviour)this).Card.Slot) == ((AbilityBehaviour)this).Card.Health.Equals(1))
{
yield return ((AbilityBehaviour)this).Card.Die(false, (PlayableCard)null, false);
yield break;
}
((Card)((AbilityBehaviour)this).Card).Anim.StrongNegationEffect();
((AbilityBehaviour)this).Card.TemporaryMods.Add(new CardModificationInfo(-1, -1));
yield return ((AbilityBehaviour)this).LearnAbility(0f);
yield return (object)new WaitForSeconds(0.3f);
}
}
}
public class Spawner : Strafe
{
public static Ability ability;
public override Ability Ability => ability;
public override IEnumerator PostSuccessfulMoveSequence(CardSlot oldSlot)
{
if (!((Object)(object)oldSlot.Card == (Object)null))
{
yield break;
}
if ((Object)(object)((Card)((AbilityBehaviour)this).Card).Info.iceCubeParams.creatureWithin != (Object)null)
{
yield return Singleton<BoardManager>.Instance.CreateCardInSlot(((Card)((AbilityBehaviour)this).Card).Info.iceCubeParams.creatureWithin, oldSlot, 0.1f, true);
yield break;
}
yield return Singleton<BoardManager>.Instance.CreateCardInSlot(ScriptableObjectLoader<CardInfo>.AllData.Find((CardInfo info) => ((Object)info).name == "Squirrel"), oldSlot, 0.1f, true);
}
}
public class Thickshell : AbilityBehaviour
{
public static Ability ability;
public override Ability Ability => ability;
}
[HarmonyPatch(typeof(PlayableCard), "TakeDamage")]
public class TakeDamagePatch : PlayableCard
{
private static void Prefix(ref PlayableCard __instance, ref int damage)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
if (__instance.HasAbility(Thickshell.ability))
{
damage--;
}
}
}
public class TreasureTracker : AbilityBehaviour
{
public static Ability ability;
public override Ability Ability => ability;
public override bool RespondsToTurnEnd(bool playerTurnEnd)
{
if ((Object)(object)((AbilityBehaviour)this).Card != (Object)null)
{
return ((AbilityBehaviour)this).Card.OpponentCard != playerTurnEnd;
}
return false;
}
public override IEnumerator OnTurnEnd(bool playerTurnEnd)
{
yield return ((AbilityBehaviour)this).PreSuccessfulTriggerSequence();
yield return (object)new WaitForSeconds(0.15f);
if (!SaveManager.SaveFile.IsPart2)
{
if (Chainloader.PluginInfos.ContainsKey("extraVoid.inscryption.LifeCost"))
{
Singleton<ViewManager>.Instance.SwitchToView((View)7, false, true);
yield return (object)new WaitForSeconds(0.25f);
RunState run = RunState.Run;
run.currency++;
yield return Singleton<CurrencyBowl>.Instance.DropWeightsIn(1);
yield return (object)new WaitForSeconds(0.75f);
Singleton<ViewManager>.Instance.SwitchToView((View)1, false, true);
Singleton<ViewManager>.Instance.Controller.LockState = (ViewLockState)0;
}
else
{
Singleton<ViewManager>.Instance.SwitchToView((View)7, false, true);
yield return (object)new WaitForSeconds(0.25f);
RunState run2 = RunState.Run;
run2.currency++;
yield return Singleton<CurrencyBowl>.Instance.ShowGain(1, true, false);
yield return (object)new WaitForSeconds(0.25f);
Singleton<ViewManager>.Instance.SwitchToView((View)1, false, true);
Singleton<ViewManager>.Instance.Controller.LockState = (ViewLockState)0;
}
}
else
{
SaveData data = SaveData.Data;
data.currency++;
((Card)((AbilityBehaviour)this).Card).Anim.LightNegationEffect();
}
yield return ((AbilityBehaviour)this).LearnAbility(0.25f);
yield return (object)new WaitForSeconds(0.1f);
}
}
}