using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using DiskCardGame;
using HarmonyLib;
using InscryptionAPI.Card;
using InscryptionAPI.Saves;
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.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("GeckVolantMarin-ListSideDeck")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("GeckVolantMarin-ListSideDeck")]
[assembly: AssemblyTitle("GeckVolantMarin-ListSideDeck")]
[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 ListSideDeck
{
[HarmonyPatch]
public static class CustomSideDeck
{
private static List<CardInfo> sideDeckDontTouchThisVarPart1;
private static List<CardInfo> sideDeckDontTouchThisVarAscension;
private static readonly Harmony HarmonyInstance = new Harmony("GeckVolantMarin-ListSideDeck");
public static ref List<CardInfo> sideDeck
{
get
{
ref List<CardInfo> reference = ref sideDeckDontTouchThisVarPart1;
if (SaveManager.SaveFile.ascensionActive)
{
reference = ref sideDeckDontTouchThisVarAscension;
}
Plugin.Logger.LogInfo((object)"Accessed sideDeck.");
if (reference == null)
{
loadSideDeck();
}
return ref reference;
}
}
public static void loadSideDeck()
{
//IL_0364: Unknown result type (might be due to invalid IL or missing references)
//IL_03f2: Unknown result type (might be due to invalid IL or missing references)
//IL_08f4: Unknown result type (might be due to invalid IL or missing references)
//IL_093b: Unknown result type (might be due to invalid IL or missing references)
//IL_0f22: Unknown result type (might be due to invalid IL or missing references)
//IL_0f2c: Expected O, but got Unknown
//IL_10c5: Unknown result type (might be due to invalid IL or missing references)
//IL_10cf: Expected O, but got Unknown
//IL_11d5: Unknown result type (might be due to invalid IL or missing references)
//IL_11df: Expected O, but got Unknown
//IL_138e: Unknown result type (might be due to invalid IL or missing references)
//IL_1395: Expected O, but got Unknown
//IL_1c6a: Unknown result type (might be due to invalid IL or missing references)
//IL_2092: Unknown result type (might be due to invalid IL or missing references)
//IL_209c: Expected O, but got Unknown
//IL_21b7: Unknown result type (might be due to invalid IL or missing references)
//IL_21c1: Expected O, but got Unknown
//IL_244e: Unknown result type (might be due to invalid IL or missing references)
//IL_24b2: Unknown result type (might be due to invalid IL or missing references)
//IL_24bc: Expected O, but got Unknown
string text = "Part1";
ref List<CardInfo> reference = ref sideDeckDontTouchThisVarPart1;
if (SaveManager.SaveFile.ascensionActive)
{
text = "Ascension";
reference = ref sideDeckDontTouchThisVarAscension;
}
reference = new List<CardInfo>();
if (!ModdedSaveManager.RunState.GetValueAsBoolean("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text))
{
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text, true);
if (text == "Part1")
{
sideDeckDontTouchThisVarPart1 = new List<CardInfo>();
sideDeckDontTouchThisVarPart1.Clear();
if (SaveManager.saveFile.oilPaintingState.rewardIndex == 3 || ModdedSaveManager.SaveData.GetValueAsBoolean("GeckVolantMarin-ListSideDeck", "ListSideDeck.Part1.bee"))
{
for (int i = 0; i < 10; i++)
{
sideDeckDontTouchThisVarPart1.Add(CardExtensions.CardByName((IEnumerable<CardInfo>)CardManager.BaseGameCards, "Bee"));
}
}
else
{
for (int j = 0; j < 10; j++)
{
sideDeckDontTouchThisVarPart1.Add(CardExtensions.CardByName((IEnumerable<CardInfo>)CardManager.BaseGameCards, "Squirrel"));
}
}
}
else
{
sideDeckDontTouchThisVarAscension = new List<CardInfo>();
sideDeckDontTouchThisVarAscension.Clear();
for (int k = 0; k < 10; k++)
{
sideDeckDontTouchThisVarAscension.Add(CardExtensions.CardByName((IEnumerable<CardInfo>)CardManager.BaseGameCards, "Squirrel"));
}
}
saveSideDeck();
return;
}
int valueAsObject = ModdedSaveManager.RunState.GetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + ".Count");
for (int l = 0; l < valueAsObject; l++)
{
CardInfo val = CardLoader.Clone(CardLoader.GetCardByName(ModdedSaveManager.RunState.GetValueAsObject<string>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].name")));
if (ModdedSaveManager.RunState.GetValueAsBoolean("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].metaCategories"))
{
val.metaCategories = new List<CardMetaCategory>();
val.metaCategories.Clear();
int valueAsInt = ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].metaCategories.Count");
for (int m = 0; m < valueAsObject; m++)
{
val.metaCategories.Add((CardMetaCategory)ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].metaCategories[" + m + "]"));
}
}
val.cardComplexity = (CardComplexity)ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].cardComplexity");
val.onePerDeck = ModdedSaveManager.RunState.GetValueAsBoolean("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].onePerDeck");
val.temple = (CardTemple)ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].temple");
val.displayedName = ModdedSaveManager.RunState.GetValueAsObject<string>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].displayedName");
val.displayedNameLocId = ModdedSaveManager.RunState.GetValueAsObject<string>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].displayedNameLocId");
val.description = ModdedSaveManager.RunState.GetValueAsObject<string>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].description");
val.hideAttackAndHealth = ModdedSaveManager.RunState.GetValueAsBoolean("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].hideAttackAndHealth");
if (ModdedSaveManager.RunState.GetValueAsBoolean("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].appearanceBehaviour"))
{
val.appearanceBehaviour = new List<Appearance>();
val.appearanceBehaviour.Clear();
int valueAsInt2 = ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].appearanceBehaviour.Count");
for (int n = 0; n < valueAsInt2; n++)
{
val.appearanceBehaviour.Add((Appearance)ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].appearanceBehaviour[" + n + "]"));
}
}
val.baseAttack = ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].baseAttack");
val.baseHealth = ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].baseHealth");
val.cost = ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].cost");
val.bonesCost = ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].bonesCost");
val.energyCost = ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].energyCost");
if (ModdedSaveManager.RunState.GetValueAsBoolean("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].gemsCost"))
{
val.gemsCost = new List<GemType>();
val.gemsCost.Clear();
int valueAsInt3 = ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].gemsCost.Count");
for (int num = 0; num < valueAsInt3; num++)
{
val.gemsCost.Add((GemType)ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].gemsCost[" + num + "]"));
}
}
val.specialStatIcon = (SpecialStatIcon)ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].specialStatIcon");
val.boon = (Type)ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].boon");
if (ModdedSaveManager.RunState.GetValueAsBoolean("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].tribes"))
{
val.tribes = new List<Tribe>();
val.tribes.Clear();
int valueAsInt4 = ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].tribes.Count");
for (int num2 = 0; num2 < valueAsInt4; num2++)
{
val.tribes.Add((Tribe)ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].tribes[" + num2 + "]"));
}
}
if (ModdedSaveManager.RunState.GetValueAsBoolean("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].traits"))
{
val.traits = new List<Trait>();
val.traits.Clear();
int valueAsInt5 = ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].traits.Count");
for (int num3 = 0; num3 < valueAsInt5; num3++)
{
val.traits.Add((Trait)ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].traits[" + num3 + "]"));
}
}
if (ModdedSaveManager.RunState.GetValueAsBoolean("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].specialAbilities"))
{
val.specialAbilities = new List<SpecialTriggeredAbility>();
val.specialAbilities.Clear();
int valueAsInt6 = ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].specialAbilities.Count");
for (int num4 = 0; num4 < valueAsInt6; num4++)
{
val.specialAbilities.Add((SpecialTriggeredAbility)ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].specialAbilities[" + num4 + "]"));
}
}
if (ModdedSaveManager.RunState.GetValueAsBoolean("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].abilities"))
{
val.abilities = new List<Ability>();
val.abilities.Clear();
int valueAsInt7 = ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].abilities.Count");
for (int num5 = 0; num5 < valueAsInt7; num5++)
{
val.abilities.Add((Ability)ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].abilities[" + num5 + "]"));
}
}
if (ModdedSaveManager.RunState.GetValueAsBoolean("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].ascensionAbilities"))
{
val.ascensionAbilities = new List<Ability>();
val.ascensionAbilities.Clear();
int valueAsInt8 = ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].ascensionAbilities.Count");
for (int num6 = 0; num6 < valueAsInt8; num6++)
{
val.ascensionAbilities.Add((Ability)ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].ascensionAbilities[" + num6 + "]"));
}
}
if (ModdedSaveManager.RunState.GetValueAsBoolean("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].evolveParams"))
{
val.evolveParams = new EvolveParams();
val.evolveParams.turnsToEvolve = ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].evolveParams.turnsToEvolve");
if (ModdedSaveManager.RunState.GetValueAsObject<string>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].evolveParams.evolution.name") == "")
{
val.evolveParams.evolution = null;
}
else
{
val.evolveParams.evolution = CardLoader.Clone(CardLoader.GetCardByName(ModdedSaveManager.RunState.GetValueAsObject<string>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].evolveParams.evolution.name")));
}
}
val.defaultEvolutionName = ModdedSaveManager.RunState.GetValueAsObject<string>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].defaultEvolutionName");
if (ModdedSaveManager.RunState.GetValueAsBoolean("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].tailParams"))
{
val.tailParams = new TailParams();
if (ModdedSaveManager.RunState.GetValueAsObject<string>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].tailParams.tail.name") == "")
{
val.tailParams.tail = null;
}
else
{
val.tailParams.tail = CardLoader.Clone(CardLoader.GetCardByName(ModdedSaveManager.RunState.GetValueAsObject<string>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].tailParams.tail.name")));
}
}
if (ModdedSaveManager.RunState.GetValueAsBoolean("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].iceCubeParams"))
{
val.iceCubeParams = new IceCubeParams();
if (ModdedSaveManager.RunState.GetValueAsObject<string>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].iceCubeParams.creatureWithin.name") == "")
{
val.iceCubeParams.creatureWithin = null;
}
else
{
val.iceCubeParams.creatureWithin = CardLoader.Clone(CardLoader.GetCardByName(ModdedSaveManager.RunState.GetValueAsObject<string>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].iceCubeParams.creatureWithin.name")));
}
}
val.flipPortraitForStrafe = ModdedSaveManager.RunState.GetValueAsBoolean("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].flipPortraitForStrafe");
if (ModdedSaveManager.RunState.GetValueAsBoolean("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods"))
{
val.mods = new List<CardModificationInfo>();
val.mods.Clear();
int valueAsInt9 = ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods.Count");
for (int num7 = 0; num7 < valueAsInt9; num7++)
{
CardModificationInfo val2 = new CardModificationInfo();
val2.singletonId = ModdedSaveManager.RunState.GetValueAsObject<string>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].singletonId");
val2.nameReplacement = ModdedSaveManager.RunState.GetValueAsObject<string>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].nameReplacement");
val2.attackAdjustment = ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].attackAdjustment");
val2.healthAdjustment = ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].healthAdjustment");
if (ModdedSaveManager.RunState.GetValueAsBoolean("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].abilities"))
{
val2.abilities = new List<Ability>();
val2.abilities.Clear();
int valueAsInt10 = ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].abilities.Count");
for (int num8 = 0; num8 < valueAsInt10; num8++)
{
val2.abilities.Add((Ability)ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].abilities[" + num8 + "]"));
}
}
if (ModdedSaveManager.RunState.GetValueAsBoolean("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].negateAbilities"))
{
val2.negateAbilities = new List<Ability>();
val2.negateAbilities.Clear();
int valueAsInt11 = ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].negateAbilities.Count");
for (int num9 = 0; num9 < valueAsInt11; num9++)
{
val2.negateAbilities.Add((Ability)ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].negateAbilities[" + num9 + "]"));
}
}
val2.bloodCostAdjustment = ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].bloodCostAdjustment");
val2.bonesCostAdjustment = ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].bonesCostAdjustment");
val2.energyCostAdjustment = ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].energyCostAdjustment");
val2.nullifyGemsCost = ModdedSaveManager.RunState.GetValueAsBoolean("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].nullifyGemsCost");
if (ModdedSaveManager.RunState.GetValueAsBoolean("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].addGemCost"))
{
val2.addGemCost = new List<GemType>();
val2.addGemCost.Clear();
int valueAsInt12 = ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].addGemCost.Count");
for (int num10 = 0; num10 < valueAsInt12; num10++)
{
val2.addGemCost.Add((GemType)ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].addGemCost[" + num10 + "]"));
}
}
val2.gemify = ModdedSaveManager.RunState.GetValueAsBoolean("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].gemify");
if (ModdedSaveManager.RunState.GetValueAsBoolean("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].specialAbilities"))
{
val2.specialAbilities = new List<SpecialTriggeredAbility>();
val2.specialAbilities.Clear();
int valueAsInt13 = ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].specialAbilities.Count");
for (int num11 = 0; num11 < valueAsInt13; num11++)
{
val2.specialAbilities.Add((SpecialTriggeredAbility)ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].specialAbilities[" + num11 + "]"));
}
}
val2.statIcon = (SpecialStatIcon)ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].statIcon");
val2.fromCardMerge = ModdedSaveManager.RunState.GetValueAsBoolean("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].fromCardMerge");
val2.fromDuplicateMerge = ModdedSaveManager.RunState.GetValueAsBoolean("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].fromDuplicateMerge");
val2.fromTotem = ModdedSaveManager.RunState.GetValueAsBoolean("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].fromTotem");
val2.fromLatch = ModdedSaveManager.RunState.GetValueAsBoolean("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].fromLatch");
val2.fromOverclock = ModdedSaveManager.RunState.GetValueAsBoolean("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].fromOverclock");
val2.sideDeckMod = ModdedSaveManager.RunState.GetValueAsBoolean("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].sideDeckMod");
val2.nonCopyable = ModdedSaveManager.RunState.GetValueAsBoolean("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].nonCopyable");
val2.fromEvolve = ModdedSaveManager.RunState.GetValueAsBoolean("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].fromEvolve");
val2.transformerBeastCardId = ModdedSaveManager.RunState.GetValueAsObject<string>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].transformerBeastCardId");
if (ModdedSaveManager.RunState.GetValueAsBoolean("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].deathCardInfo"))
{
val2.deathCardInfo = new DeathCardInfo((FigurineType)ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].deathCardInfo.headType"), ModdedSaveManager.RunState.GetValueAsBoolean("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].deathCardInfo.lostEye"));
val2.deathCardInfo.mouthIndex = ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].deathCardInfo.mouthIndex");
val2.deathCardInfo.eyesIndex = ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].deathCardInfo.eyesIndex");
}
if (ModdedSaveManager.RunState.GetValueAsBoolean("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].bountyHunterInfo"))
{
val2.bountyHunterInfo = new BountyHunterInfo();
val2.bountyHunterInfo.faceIndex = ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].bountyHunterInfo.faceIndex");
val2.bountyHunterInfo.hatIndex = ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].bountyHunterInfo.hatIndex");
val2.bountyHunterInfo.mouthIndex = ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].bountyHunterInfo.mouthIndex");
val2.bountyHunterInfo.eyesIndex = ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].bountyHunterInfo.eyesIndex");
val2.bountyHunterInfo.tier = ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].bountyHunterInfo.tier");
val2.bountyHunterInfo.dialogueIndex = ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].bountyHunterInfo.dialogueIndex");
val2.bountyHunterInfo.status = (Status)ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].bountyHunterInfo.status");
}
if (ModdedSaveManager.RunState.GetValueAsBoolean("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].buildACardPortraitInfo"))
{
val2.buildACardPortraitInfo = new BuildACardPortraitInfo();
int valueAsInt14 = ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].buildACardPortraitInfo.spriteIndices.Count");
for (int num12 = 0; num12 < valueAsInt14; num12++)
{
CollectionExtensions.AddToArray<int>(val2.buildACardPortraitInfo.spriteIndices, ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].buildACardPortraitInfo.spriteIndices[" + num12 + "]"));
}
}
if (ModdedSaveManager.RunState.GetValueAsBoolean("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].decalIds"))
{
val2.decalIds = new List<string>();
val2.decalIds.Clear();
int valueAsInt15 = ModdedSaveManager.RunState.GetValueAsInt("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].decalIds.Count");
for (int num13 = 0; num13 < valueAsInt15; num13++)
{
val2.decalIds.Add(ModdedSaveManager.RunState.GetValueAsObject<string>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + l + "].mods[" + num7 + "].decalIds[" + num13 + "]"));
}
}
val.mods.Add(val2);
}
}
reference.Add(val);
}
}
public static void saveSideDeck()
{
//IL_0271: Unknown result type (might be due to invalid IL or missing references)
//IL_027b: Expected I4, but got Unknown
//IL_0301: Unknown result type (might be due to invalid IL or missing references)
//IL_030b: Expected I4, but got Unknown
//IL_016f: Unknown result type (might be due to invalid IL or missing references)
//IL_0174: Unknown result type (might be due to invalid IL or missing references)
//IL_01c4: Unknown result type (might be due to invalid IL or missing references)
//IL_01cb: Expected I4, but got Unknown
//IL_08cd: Unknown result type (might be due to invalid IL or missing references)
//IL_08d7: Expected I4, but got Unknown
//IL_0915: Unknown result type (might be due to invalid IL or missing references)
//IL_091f: Expected I4, but got Unknown
//IL_04e5: Unknown result type (might be due to invalid IL or missing references)
//IL_04ea: Unknown result type (might be due to invalid IL or missing references)
//IL_053a: Unknown result type (might be due to invalid IL or missing references)
//IL_0541: Expected I4, but got Unknown
//IL_07cb: Unknown result type (might be due to invalid IL or missing references)
//IL_07d0: Unknown result type (might be due to invalid IL or missing references)
//IL_0820: Unknown result type (might be due to invalid IL or missing references)
//IL_0827: Expected I4, but got Unknown
//IL_09d9: Unknown result type (might be due to invalid IL or missing references)
//IL_09de: Unknown result type (might be due to invalid IL or missing references)
//IL_0a2e: Unknown result type (might be due to invalid IL or missing references)
//IL_0a35: Expected I4, but got Unknown
//IL_0b57: Unknown result type (might be due to invalid IL or missing references)
//IL_0b5c: Unknown result type (might be due to invalid IL or missing references)
//IL_0bac: Unknown result type (might be due to invalid IL or missing references)
//IL_0bb3: Expected I4, but got Unknown
//IL_0cd5: Unknown result type (might be due to invalid IL or missing references)
//IL_0cda: Unknown result type (might be due to invalid IL or missing references)
//IL_0d2a: Unknown result type (might be due to invalid IL or missing references)
//IL_0d31: Expected I4, but got Unknown
//IL_0e53: Unknown result type (might be due to invalid IL or missing references)
//IL_0e58: Unknown result type (might be due to invalid IL or missing references)
//IL_0ea8: Unknown result type (might be due to invalid IL or missing references)
//IL_0eaf: Expected I4, but got Unknown
//IL_0fd1: Unknown result type (might be due to invalid IL or missing references)
//IL_0fd6: Unknown result type (might be due to invalid IL or missing references)
//IL_1026: Unknown result type (might be due to invalid IL or missing references)
//IL_102d: Expected I4, but got Unknown
//IL_1878: Unknown result type (might be due to invalid IL or missing references)
//IL_187d: Unknown result type (might be due to invalid IL or missing references)
//IL_18e0: Unknown result type (might be due to invalid IL or missing references)
//IL_18e7: Expected I4, but got Unknown
//IL_1a42: Unknown result type (might be due to invalid IL or missing references)
//IL_1a47: Unknown result type (might be due to invalid IL or missing references)
//IL_1aaa: Unknown result type (might be due to invalid IL or missing references)
//IL_1ab1: Expected I4, but got Unknown
//IL_20d4: Unknown result type (might be due to invalid IL or missing references)
//IL_20de: Expected I4, but got Unknown
//IL_1d74: Unknown result type (might be due to invalid IL or missing references)
//IL_1d79: Unknown result type (might be due to invalid IL or missing references)
//IL_1ddc: Unknown result type (might be due to invalid IL or missing references)
//IL_1de3: Expected I4, but got Unknown
//IL_251d: Unknown result type (might be due to invalid IL or missing references)
//IL_2527: Expected I4, but got Unknown
//IL_1f98: Unknown result type (might be due to invalid IL or missing references)
//IL_1f9d: Unknown result type (might be due to invalid IL or missing references)
//IL_2000: Unknown result type (might be due to invalid IL or missing references)
//IL_2007: Expected I4, but got Unknown
//IL_2994: Unknown result type (might be due to invalid IL or missing references)
//IL_299e: Expected I4, but got Unknown
string text = "Part1";
ref List<CardInfo> reference = ref sideDeckDontTouchThisVarPart1;
if (SaveManager.SaveFile.ascensionActive)
{
text = "Ascension";
reference = ref sideDeckDontTouchThisVarAscension;
}
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + ".Count", reference.Count());
int num = 0;
foreach (CardInfo item in reference)
{
ModdedSaveManager.RunState.SetValueAsObject<string>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].name", ((Object)item).name);
int num2 = 0;
if (item.metaCategories != null)
{
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].metaCategories", true);
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].metaCategories.Count", item.metaCategories.Count());
num2 = 0;
foreach (CardMetaCategory metaCategory in item.metaCategories)
{
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].metaCategories[" + num2 + "]", (int)metaCategory);
num2++;
}
}
else
{
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].metaCategories", false);
}
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].cardComplexity", (int)item.cardComplexity);
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].onePerDeck", item.onePerDeck);
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].temple", (int)item.temple);
ModdedSaveManager.RunState.SetValueAsObject<string>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].displayedName", item.displayedName);
ModdedSaveManager.RunState.SetValueAsObject<string>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].displayedNameLocId", item.displayedNameLocId);
ModdedSaveManager.RunState.SetValueAsObject<string>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].description", item.description);
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].hideAttackAndHealth", item.hideAttackAndHealth);
if (item.appearanceBehaviour != null)
{
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].appearanceBehaviour", true);
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].appearanceBehaviour.Count", item.appearanceBehaviour.Count());
num2 = 0;
foreach (Appearance item2 in item.appearanceBehaviour)
{
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].appearanceBehaviour[" + num2 + "]", (int)item2);
num2++;
}
}
else
{
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].appearanceBehaviour", false);
}
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].baseAttack", item.baseAttack);
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].baseHealth", item.baseHealth);
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].cost", item.cost);
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].bonesCost", item.bonesCost);
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].energyCost", item.energyCost);
if (item.gemsCost != null)
{
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].gemsCost", true);
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].gemsCost.Count", item.gemsCost.Count());
num2 = 0;
foreach (GemType item3 in item.gemsCost)
{
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].gemsCost[" + num2 + "]", (int)item3);
num2++;
}
}
else
{
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].gemsCost", false);
}
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].specialStatIcon", (int)item.specialStatIcon);
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].boon", (int)item.boon);
if (item.tribes != null)
{
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].tribes", true);
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].tribes.Count", item.tribes.Count());
num2 = 0;
foreach (Tribe tribe in item.tribes)
{
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].tribes[" + num2 + "]", (int)tribe);
num2++;
}
}
else
{
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].tribes", false);
}
if (item.traits != null)
{
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].traits", true);
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].traits.Count", item.traits.Count());
num2 = 0;
foreach (Trait trait in item.traits)
{
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].traits[" + num2 + "]", (int)trait);
num2++;
}
}
else
{
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].traits", false);
}
if (item.specialAbilities != null)
{
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].specialAbilities", true);
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].specialAbilities.Count", item.specialAbilities.Count());
num2 = 0;
foreach (SpecialTriggeredAbility specialAbility in item.specialAbilities)
{
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].specialAbilities[" + num2 + "]", (int)specialAbility);
num2++;
}
}
else
{
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].specialAbilities", false);
}
if (item.abilities != null)
{
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].abilities", true);
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].abilities.Count", item.abilities.Count());
num2 = 0;
foreach (Ability ability in item.abilities)
{
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].abilities[" + num2 + "]", (int)ability);
num2++;
}
}
else
{
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].abilities", false);
}
if (item.ascensionAbilities != null)
{
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].ascensionAbilities", true);
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].ascensionAbilities.Count", item.ascensionAbilities.Count());
num2 = 0;
foreach (Ability ascensionAbility in item.ascensionAbilities)
{
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].ascensionAbilities[" + num2 + "]", (int)ascensionAbility);
num2++;
}
}
else
{
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].ascensionAbilities", false);
}
if (item.evolveParams != null)
{
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].evolveParams", true);
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].evolveParams.turnsToEvolve", item.evolveParams.turnsToEvolve);
if ((Object)(object)item.evolveParams.evolution == (Object)null)
{
ModdedSaveManager.RunState.SetValueAsObject<string>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].evolveParams.evolution.name", "");
}
else
{
ModdedSaveManager.RunState.SetValueAsObject<string>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].evolveParams.evolution.name", ((Object)item.evolveParams.evolution).name);
}
}
else
{
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].evolveParams", false);
}
ModdedSaveManager.RunState.SetValueAsObject<string>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].defaultEvolutionName", item.defaultEvolutionName);
if (item.tailParams != null)
{
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].tailParams", true);
if ((Object)(object)item.tailParams.tail == (Object)null)
{
ModdedSaveManager.RunState.SetValueAsObject<string>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].tailParams.tail.name", "");
}
else
{
ModdedSaveManager.RunState.SetValueAsObject<string>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].tailParams.tail.name", ((Object)item.tailParams.tail).name);
}
}
else
{
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].tailParams", false);
}
if (item.iceCubeParams != null)
{
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].iceCubeParams", true);
if ((Object)(object)item.iceCubeParams.creatureWithin == (Object)null)
{
ModdedSaveManager.RunState.SetValueAsObject<string>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].iceCubeParams.creatureWithin.name", "");
}
else
{
ModdedSaveManager.RunState.SetValueAsObject<string>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].iceCubeParams.creatureWithin.name", ((Object)item.iceCubeParams.creatureWithin).name);
}
}
else
{
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].iceCubeParams", false);
}
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].flipPortraitForStrafe", item.flipPortraitForStrafe);
if (item.ascensionAbilities != null)
{
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods", true);
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods.Count", item.ascensionAbilities.Count());
num2 = 0;
foreach (CardModificationInfo mod in item.mods)
{
ModdedSaveManager.RunState.SetValueAsObject<string>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].singletonId", mod.singletonId);
ModdedSaveManager.RunState.SetValueAsObject<string>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].nameReplacement", mod.nameReplacement);
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].attackAdjustment", mod.attackAdjustment);
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].healthAdjustment", mod.healthAdjustment);
int num3 = 0;
if (mod.abilities != null)
{
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].abilities", true);
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].abilities.Count", mod.abilities.Count());
num3 = 0;
foreach (Ability ability2 in mod.abilities)
{
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].abilities[" + num3 + "]", (int)ability2);
num3++;
}
}
else
{
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].abilities", false);
}
if (mod.negateAbilities != null)
{
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].negateAbilities", true);
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].negateAbilities.Count", mod.negateAbilities.Count());
num3 = 0;
foreach (Ability negateAbility in mod.negateAbilities)
{
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].negateAbilities[" + num3 + "]", (int)negateAbility);
num3++;
}
}
else
{
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].negateAbilities", false);
}
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].bloodCostAdjustment", mod.bloodCostAdjustment);
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].bonesCostAdjustment", mod.bonesCostAdjustment);
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].energyCostAdjustment", mod.energyCostAdjustment);
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].nullifyGemsCost", mod.nullifyGemsCost);
if (mod.addGemCost != null)
{
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].addGemCost", true);
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].addGemCost.Count", mod.addGemCost.Count());
num3 = 0;
foreach (GemType item4 in mod.addGemCost)
{
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].addGemCost[" + num3 + "]", (int)item4);
num3++;
}
}
else
{
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].addGemCost", false);
}
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].gemify", mod.gemify);
if (mod.specialAbilities != null)
{
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].specialAbilities", true);
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].specialAbilities.Count", mod.specialAbilities.Count());
num3 = 0;
foreach (SpecialTriggeredAbility specialAbility2 in mod.specialAbilities)
{
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].specialAbilities[" + num3 + "]", (int)specialAbility2);
num3++;
}
}
else
{
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].specialAbilities", false);
}
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].statIcon", (int)mod.statIcon);
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].fromCardMerge", mod.fromCardMerge);
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].fromDuplicateMerge", mod.fromDuplicateMerge);
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].fromTotem", mod.fromTotem);
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].fromLatch", mod.fromLatch);
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].fromOverclock", mod.fromOverclock);
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].sideDeckMod", mod.sideDeckMod);
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].nonCopyable", mod.nonCopyable);
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].fromEvolve", mod.fromEvolve);
ModdedSaveManager.RunState.SetValueAsObject<string>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].transformerBeastCardId", mod.transformerBeastCardId);
if (mod.deathCardInfo == null)
{
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].deathCardInfo", false);
}
else
{
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].deathCardInfo", true);
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].deathCardInfo.headType", (int)mod.deathCardInfo.headType);
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].deathCardInfo.lostEye", mod.deathCardInfo.lostEye);
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].deathCardInfo.mouthIndex", mod.deathCardInfo.mouthIndex);
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].deathCardInfo.eyesIndex", mod.deathCardInfo.eyesIndex);
}
if (mod.bountyHunterInfo == null)
{
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].bountyHunterInfo", false);
}
else
{
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].bountyHunterInfo", true);
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].bountyHunterInfo.faceIndex", mod.bountyHunterInfo.faceIndex);
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].bountyHunterInfo.hatIndex", mod.bountyHunterInfo.hatIndex);
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].bountyHunterInfo.mouthIndex", mod.bountyHunterInfo.mouthIndex);
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].bountyHunterInfo.eyesIndex", mod.bountyHunterInfo.eyesIndex);
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].bountyHunterInfo.tier", mod.bountyHunterInfo.tier);
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].bountyHunterInfo.dialogueIndex", mod.bountyHunterInfo.dialogueIndex);
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].bountyHunterInfo.status", (int)mod.bountyHunterInfo.status);
}
if (mod.buildACardPortraitInfo == null)
{
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].buildACardPortraitInfo", false);
}
else
{
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].buildACardPortraitInfo", true);
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].buildACardPortraitInfo.spriteIndices.Count", mod.buildACardPortraitInfo.spriteIndices.Count());
num3 = 0;
int[] spriteIndices = mod.buildACardPortraitInfo.spriteIndices;
foreach (int num4 in spriteIndices)
{
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].buildACardPortraitInfo.spriteIndices[" + num3 + "]", num4);
num3++;
}
}
if (mod.decalIds != null)
{
ModdedSaveManager.RunState.SetValueAsObject<int>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].decalIds.Count", mod.decalIds.Count());
num3 = 0;
foreach (string decalId in mod.decalIds)
{
ModdedSaveManager.RunState.SetValueAsObject<string>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods[" + num2 + "].decalIds[" + num3 + "]", decalId);
num3++;
}
}
num2++;
}
}
else
{
ModdedSaveManager.RunState.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck." + text + "[" + num + "].mods", false);
}
num++;
}
}
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
[HarmonyPrefix]
public static bool OnRedeemedComplete(HoldableBeeFigurine __instance)
{
sideDeckDontTouchThisVarPart1 = new List<CardInfo>();
sideDeckDontTouchThisVarPart1.Clear();
for (int i = 0; i < 10; i++)
{
sideDeckDontTouchThisVarPart1.Add(CardExtensions.CardByName((IEnumerable<CardInfo>)CardManager.BaseGameCards, "Bee"));
}
ModdedSaveManager.SaveData.SetValueAsObject<bool>("GeckVolantMarin-ListSideDeck", "ListSideDeck.Part1.bee", true);
return true;
}
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
[HarmonyPrefix]
private static bool ReplaceSideDeck(ref List<CardInfo> __result)
{
if (__result == null)
{
__result = new List<CardInfo>();
}
__result.Clear();
foreach (CardInfo item in sideDeck)
{
__result.Add(item);
}
return false;
}
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
[HarmonyPrefix]
private static bool ResetRunStateOnNewAscensionRun()
{
sideDeckDontTouchThisVarAscension = new List<CardInfo>();
sideDeckDontTouchThisVarAscension.Clear();
for (int i = 0; i < 10; i++)
{
sideDeckDontTouchThisVarAscension.Add(CardExtensions.CardByName((IEnumerable<CardInfo>)CardManager.BaseGameCards, "Squirrel"));
}
saveSideDeck();
Plugin.Logger.LogInfo((object)sideDeck.ToString());
return true;
}
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
[HarmonyPrefix]
private static bool ResetRunStateOnPart1Run()
{
Plugin.Logger.LogInfo((object)"Started Act1");
sideDeckDontTouchThisVarPart1 = new List<CardInfo>();
sideDeckDontTouchThisVarPart1.Clear();
if (SaveManager.saveFile.oilPaintingState.rewardIndex == 3 || ModdedSaveManager.SaveData.GetValueAsBoolean("GeckVolantMarin-ListSideDeck", "ListSideDeck.Part1.bee"))
{
for (int i = 0; i < 10; i++)
{
sideDeckDontTouchThisVarPart1.Add(CardExtensions.CardByName((IEnumerable<CardInfo>)CardManager.BaseGameCards, "Bee"));
}
}
else
{
for (int j = 0; j < 10; j++)
{
sideDeckDontTouchThisVarPart1.Add(CardExtensions.CardByName((IEnumerable<CardInfo>)CardManager.BaseGameCards, "Squirrel"));
}
}
saveSideDeck();
Plugin.Logger.LogInfo((object)("sideDeck.Count() == " + sideDeck.Count()));
return true;
}
public static void register()
{
sideDeckDontTouchThisVarPart1 = null;
sideDeckDontTouchThisVarAscension = null;
HarmonyInstance.PatchAll(typeof(Plugin).Assembly);
}
}
[BepInPlugin("GeckVolantMarin-ListSideDeck", "GeckVolantMarin-ListSideDeck", "1.0.0")]
[BepInProcess("Inscryption.exe")]
public class Plugin : BaseUnityPlugin
{
internal static ManualLogSource Logger;
public static string directory;
private void Awake()
{
Logger = ((BaseUnityPlugin)this).Logger;
directory = ((BaseUnityPlugin)this).Info.Location;
CustomSideDeck.register();
Logger.LogInfo((object)"Reussi?");
Logger.LogInfo((object)"Plugin GeckVolantMarin-ListSideDeck is loaded!");
}
}
public static class MyPluginInfo
{
public const string PLUGIN_GUID = "GeckVolantMarin-ListSideDeck";
public const string PLUGIN_NAME = "GeckVolantMarin-ListSideDeck";
public const string PLUGIN_VERSION = "1.0.0";
}
}