Decompiled source of Region Expansions v2.3.0

RegionExpansions.dll

Decompiled 4 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Logging;
using DiskCardGame;
using HarmonyLib;
using Infiniscryption.PackManagement;
using InscryptionAPI.Card;
using InscryptionAPI.Encounters;
using InscryptionAPI.Guid;
using InscryptionAPI.Helpers;
using InscryptionAPI.Regions;
using Microsoft.CodeAnalysis;
using RegionExpansions.Encounter;
using RegionExpansions.Regions;
using RegionExpansions.cards;
using RegionExpansions.lib;
using RegionExpansions.sigils;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")]
[assembly: AssemblyCompany("RegionExpansions")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyDescription("a collection of regions for inscryption")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("RegionExpansions")]
[assembly: AssemblyTitle("RegionExpansions")]
[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 RegionExpansions
{
	public class CustomLine
	{
		public Face p03Face;

		public Emotion emotion;

		public LetterAnimation letterAnimation;

		public Speaker speaker;

		public string text;

		public string specialInstruction;

		public StoryEvent storyCondition;

		public bool storyConditionMustBeMet;

		public Line ToLine(List<Speaker> speakers)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Expected O, but got Unknown
			if (!speakers.Contains(speaker))
			{
				speakers.Add(speaker);
			}
			return new Line
			{
				p03Face = p03Face,
				emotion = emotion,
				letterAnimation = letterAnimation,
				speakerIndex = speakers.IndexOf(speaker),
				text = (text ?? ""),
				specialInstruction = (specialInstruction ?? ""),
				storyCondition = storyCondition,
				storyConditionMustBeMet = storyConditionMustBeMet
			};
		}

		public static implicit operator CustomLine(string str)
		{
			return new CustomLine
			{
				text = str
			};
		}

		public static implicit operator CustomLine((string, LetterAnimation, Emotion) param)
		{
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			return new CustomLine
			{
				text = param.Item1,
				emotion = param.Item3,
				letterAnimation = param.Item2
			};
		}

		public static implicit operator CustomLine((string, LetterAnimation) param)
		{
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			CustomLine customLine = new CustomLine();
			(customLine.text, customLine.letterAnimation) = param;
			return customLine;
		}

		public static implicit operator CustomLine((string, LetterAnimation, Speaker) param)
		{
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			return new CustomLine
			{
				text = param.Item1,
				speaker = param.Item3,
				letterAnimation = param.Item2
			};
		}

		public static implicit operator CustomLine((string, LetterAnimation, Speaker, Emotion) param)
		{
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			return new CustomLine
			{
				text = param.Item1,
				speaker = param.Item3,
				letterAnimation = param.Item2,
				emotion = param.Item4
			};
		}

		public static implicit operator CustomLine((string, Emotion) param)
		{
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			CustomLine customLine = new CustomLine();
			(customLine.text, customLine.emotion) = param;
			return customLine;
		}

		public static implicit operator CustomLine((string, Emotion, Speaker) param)
		{
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			return new CustomLine
			{
				text = param.Item1,
				speaker = param.Item3,
				emotion = param.Item2
			};
		}

		public static implicit operator CustomLine((string, Speaker) param)
		{
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			CustomLine customLine = new CustomLine();
			(customLine.text, customLine.speaker) = param;
			return customLine;
		}
	}
	public static class DialogueEventGenerator
	{
		public static DialogueEvent GenerateEvent(string name, List<CustomLine> mainLines, List<List<CustomLine>> repeatLines, MaxRepeatsBehaviour afterMaxRepeats, string groupID = "", LetterAnimation animationLetter = 2, LetterAnimation animationLetterRepeat = 2)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Expected O, but got Unknown
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			DialogueEvent val = new DialogueEvent();
			List<Speaker> speakers = new List<Speaker> { (Speaker)0 };
			val.id = name;
			val.mainLines = new LineSet(mainLines.ConvertAll((CustomLine x) => x.ToLine(speakers)));
			val.mainLines.lines.ForEach(delegate(Line line)
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				line.letterAnimation = animationLetter;
			});
			val.repeatLines = repeatLines.ConvertAll((Converter<List<CustomLine>, LineSet>)((List<CustomLine> x) => new LineSet(x.ConvertAll((CustomLine x2) => x2.ToLine(speakers)))));
			val.repeatLines.ForEach(delegate(LineSet line)
			{
				line.lines.ForEach(delegate(Line lineZ)
				{
					//IL_0002: Unknown result type (might be due to invalid IL or missing references)
					//IL_0007: Unknown result type (might be due to invalid IL or missing references)
					lineZ.letterAnimation = animationLetterRepeat;
				});
			});
			val.maxRepeatsBehaviour = afterMaxRepeats;
			val.speakers = new List<Speaker>(speakers);
			val.groupId = groupID;
			DialogueDataUtil.Data?.events?.Add(val);
			return val;
		}
	}
	public class EncounterHelper
	{
		public static EncounterBlueprintData BuildBlueprint(string name, List<Tribe> tribes, List<Ability> redundant, bool regionLocked, int minDifficulty, int maxDifficulty, List<CardInfo> randomReplacementCards, List<List<CardBlueprint>> blueprintTurns)
		{
			EncounterBlueprintData obj = ScriptableObject.CreateInstance<EncounterBlueprintData>();
			((Object)obj).name = name;
			obj.regionSpecific = regionLocked;
			EncounterExtensions.SetDifficulty<EncounterBlueprintData>(obj, minDifficulty, maxDifficulty);
			obj.dominantTribes = tribes;
			obj.redundantAbilities = redundant;
			obj.randomReplacementCards = randomReplacementCards;
			obj.turns = blueprintTurns;
			return obj;
		}

		public static CardInfo GetCardInfo(string self)
		{
			return CardLoader.GetCardByName(self);
		}

		public static RegionData GetRegionData(string RegionName)
		{
			RegionData result = RegionManager.BaseGameRegions[0];
			for (int i = 0; i < RegionManager.BaseGameRegions.Count; i++)
			{
				if (((Object)RegionManager.BaseGameRegions[i]).name == RegionName)
				{
					result = RegionManager.BaseGameRegions[i];
				}
			}
			return result;
		}

		public static EncounterBlueprintData GetBlueprintData(string EncounterName)
		{
			EncounterBlueprintData result = EncounterManager.BaseGameEncounters[0];
			for (int i = 0; i < EncounterManager.BaseGameEncounters.Count; i++)
			{
				if (((Object)EncounterManager.BaseGameEncounters[i]).name == EncounterName)
				{
					result = EncounterManager.BaseGameEncounters[i];
				}
			}
			return result;
		}

		public static EncounterBlueprintData GetCustomBlueprintData(string EncounterName)
		{
			EncounterBlueprintData result = EncounterManager.NewEncounters[0];
			for (int i = 0; i < EncounterManager.NewEncounters.Count; i++)
			{
				if (((Object)EncounterManager.NewEncounters[i]).name == EncounterName)
				{
					result = EncounterManager.NewEncounters[i];
				}
			}
			return result;
		}

		public static List<CardInfo> AddRandomCards(string turn1 = "none", string turn2 = "none", string turn3 = "none", string turn4 = "none", string turn5 = "none", string turn6 = "none", string turn7 = "none", string turn8 = "none", string turn9 = "none")
		{
			List<CardInfo> list = new List<CardInfo>();
			if (turn1 != "none")
			{
				list.Add(CardLoader.GetCardByName(turn1));
				if (turn2 != "none")
				{
					list.Add(CardLoader.GetCardByName(turn2));
					if (turn3 != "none")
					{
						list.Add(CardLoader.GetCardByName(turn3));
						if (turn4 != "none")
						{
							list.Add(CardLoader.GetCardByName(turn4));
							if (turn5 != "none")
							{
								list.Add(CardLoader.GetCardByName(turn5));
								if (turn6 != "none")
								{
									list.Add(CardLoader.GetCardByName(turn6));
									if (turn7 != "none")
									{
										list.Add(CardLoader.GetCardByName(turn7));
										if (turn8 != "none")
										{
											list.Add(CardLoader.GetCardByName(turn8));
											if (turn9 != "none")
											{
												list.Add(CardLoader.GetCardByName(turn9));
												return list;
											}
											return list;
										}
										return list;
									}
									return list;
								}
								return list;
							}
							return list;
						}
						return list;
					}
					return list;
				}
				return list;
			}
			return list;
		}
	}
	public class SigilUtils
	{
		public static AbilityInfo CreateAbilityWithDefaultSettings(string rulebookName, string rulebookDescription, Type behavior, Texture2D text_a1, Texture2D text_a2, string LearnDialogue, bool withDialogue = false, int powerLevel = 0, bool leshyUsable = false, bool part1Modular = true, bool stack = false)
		{
			AbilityInfo val = AbilityExtensions.SetPixelAbilityIcon(AbilityManager.New("extraVoid.inscryption.RegionExpansions", rulebookName, rulebookDescription, behavior, (Texture)(object)text_a1), text_a2, (FilterMode?)null);
			if (withDialogue)
			{
				val.abilityLearnedDialogue = SetAbilityInfoDialogue(LearnDialogue);
			}
			val.powerLevel = powerLevel;
			val.opponentUsable = leshyUsable;
			if (part1Modular)
			{
				val.metaCategories = new List<AbilityMetaCategory>
				{
					(AbilityMetaCategory)1,
					(AbilityMetaCategory)0
				};
			}
			else
			{
				val.metaCategories = new List<AbilityMetaCategory> { (AbilityMetaCategory)0 };
			}
			val.canStack = stack;
			return val;
		}

		public static CardInfo CreateCardWithDefaultSettings(string InternalName, string DisplayName, int attack, int health, Texture2D texture_base, Texture2D texture_emission, List<CardMetaCategory> cardMetaCategories, List<Tribe> tribes, List<Trait> traits, List<Ability> abilities, Texture2D texture_pixel = null, int bloodCost = 0, int boneCost = 0, int energyCost = 0)
		{
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Expected I4, but got Unknown
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			CardInfo val = CardManager.New("re", InternalName, DisplayName, attack, health, "A puddle that errods all that touches it.");
			CardExtensions.SetPortrait(val, texture_base, texture_emission, (FilterMode?)null);
			val.metaCategories = cardMetaCategories;
			val.tribes = tribes;
			val.traits = traits;
			for (int i = 0; i < abilities.Count; i++)
			{
				CardExtensions.AddAbilities(val, (Ability[])(object)new Ability[1] { (Ability)(int)abilities[i] });
			}
			val.temple = (CardTemple)0;
			val.cardComplexity = (CardComplexity)2;
			val.cost = bloodCost;
			val.bonesCost = boneCost;
			val.energyCost = energyCost;
			return val;
		}

		public static LineSet SetAbilityInfoDialogue(string dialogue)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Expected O, but got Unknown
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Expected O, but got Unknown
			return new LineSet(new List<Line>
			{
				new Line
				{
					text = dialogue
				}
			});
		}

		public static Texture2D GetTextureFromPath(string path)
		{
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Expected O, but got Unknown
			//IL_0021: Expected O, but got Unknown
			byte[] array = File.ReadAllBytes(Path.Combine(Plugin.Directory, path));
			Texture2D val = new Texture2D(2, 2);
			ImageConversion.LoadImage(val, array);
			return val;
		}

		public static Texture2D LoadTextureFromResource(byte[] resourceFile)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Expected O, but got Unknown
			//IL_0010: Expected O, but got Unknown
			Texture2D val = new Texture2D(2, 2);
			ImageConversion.LoadImage(val, resourceFile);
			return val;
		}

		public static string GetFullPathOfFile(string fileToLookFor)
		{
			return Directory.GetFiles(Paths.PluginPath, fileToLookFor, SearchOption.AllDirectories)[0];
		}

		public static byte[] ReadArtworkFileAsBytes(string nameOfCardArt)
		{
			return File.ReadAllBytes(GetFullPathOfFile(nameOfCardArt));
		}

		public static Texture2D LoadImageAndGetTexture(string nameOfCardArt)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Expected O, but got Unknown
			//IL_0017: Expected O, but got Unknown
			Texture2D val = new Texture2D(2, 2);
			byte[] array = ReadArtworkFileAsBytes(nameOfCardArt);
			ImageConversion.LoadImage(val, array);
			return val;
		}

		public static CardSlot GetSlot(PlayableCard cardToGetSlot)
		{
			if ((Object)(object)cardToGetSlot.Slot != (Object)null)
			{
				return cardToGetSlot.Slot;
			}
			CardSlot component = ((Component)((Component)cardToGetSlot).transform.parent).GetComponent<CardSlot>();
			if ((Object)(object)component != (Object)null)
			{
				return component;
			}
			int instanceID = ((Object)((Component)cardToGetSlot).gameObject).GetInstanceID();
			Plugin.Log.LogInfo((object)("[SplashDamageAbility][GetSlot] Getting slot for " + instanceID));
			List<CardSlot> list = new List<CardSlot>();
			list.AddRange(Singleton<BoardManager>.Instance.GetSlots(false));
			list.AddRange(Singleton<BoardManager>.Instance.GetSlots(true));
			for (int i = 0; i < list.Count; i++)
			{
				CardSlot val = list[i];
				if (val.Index != 2)
				{
					continue;
				}
				PlayableCard card = val.Card;
				if (!((Object)(object)card == (Object)null))
				{
					if ((Object)(object)((Component)card).gameObject == (Object)(object)((Component)cardToGetSlot).gameObject)
					{
						return val;
					}
					((Object)((Component)card).gameObject).GetInstanceID();
				}
			}
			Plugin.Log.LogInfo((object)("[SplashDamageAbility][GetSlot] Could not find slot for " + instanceID));
			return null;
		}
	}
	[BepInPlugin("extraVoid.inscryption.RegionExpansions", "RegionExpansions", "2.2.0")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class Plugin : BaseUnityPlugin
	{
		public const string APIGUID = "cyantist.inscryption.api";

		public const string SigilGUID = "extraVoid.inscryption.voidSigils";

		public const string TotemGUID = "Lily.BOT";

		public const string NeverGUID = "nevernamed.inscryption.sigils";

		public const string PackManagerGUID = "zorro.inscryption.infiniscryption.packmanager";

		public const string PluginGuid = "extraVoid.inscryption.RegionExpansions";

		private const string PluginName = "RegionExpansions";

		private const string PluginVersion = "2.2.0";

		public static string Directory;

		internal static ManualLogSource Log;

		private void Awake()
		{
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			Log = ((BaseUnityPlugin)this).Logger;
			Directory = ((BaseUnityPlugin)this).Info.Location.Replace("RegionExpansions.dll", "");
			new Harmony("extraVoid.inscryption.RegionExpansions").PatchAll();
			DyingWind.specialAbility = SpecialTriggeredAbilityManager.Add("extraVoid.inscryption.RegionExpansions", "Dying Wind", typeof(DyingWind)).Id;
			High_Tide.AddCard();
			Low_Tide.AddCard();
			Strong_Wind_1.AddCard();
			American_Lobster.AddCard();
			Jonah_Crab.AddCard();
			Costal_Salmon.AddCard();
			Moon_Jellyfish.AddCard();
			Mussel.AddCard();
			School_Fish.AddCard();
			Starfish.AddCard();
			Region_Beach.AddRegionIntroDialogue();
			Region_Ridgeline.AddRegionIntroDialogue();
		}

		private void Start()
		{
			BirdOfTheSea.AddEncounter();
			TideOfFish.AddEncounter();
			CrabsAndLobster.AddEncounter();
			Region_Beach.AddRegion();
			Region_Ridgeline.AddRegion();
			if (Chainloader.PluginInfos.ContainsKey("zorro.inscryption.infiniscryption.packmanager"))
			{
				CreateCardPack.CreatePack();
			}
		}
	}
	public static class ScriptableObjectExtension
	{
		public static T Clone<T>(this T scriptableObject) where T : ScriptableObject
		{
			if ((Object)(object)scriptableObject == (Object)null)
			{
				Debug.LogError((object)$"ScriptableObject was null. Returning default {typeof(T)} object.");
				return (T)(object)ScriptableObject.CreateInstance(typeof(T));
			}
			T val = Object.Instantiate<T>(scriptableObject);
			((Object)(object)val).name = ((Object)(object)scriptableObject).name;
			return val;
		}
	}
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "RegionExpansions";

		public const string PLUGIN_NAME = "RegionExpansions";

		public const string PLUGIN_VERSION = "1.0.0";
	}
}
namespace RegionExpansions.sigils
{
	internal class DyingWind : SpecialCardBehaviour
	{
		public static SpecialTriggeredAbility specialAbility;

		private int numTurnsInPlay;

		public SpecialTriggeredAbility SpecialAbility => specialAbility;

		public override bool RespondsToUpkeep(bool playerUpkeep)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			PlayableCard val = (PlayableCard)((SpecialCardBehaviour)this).Card;
			if (val.OpponentCard != playerUpkeep)
			{
				return val.OnBoard;
			}
			return false;
		}

		public override IEnumerator OnUpkeep(bool playerUpkeep)
		{
			PlayableCard val = (PlayableCard)((SpecialCardBehaviour)this).Card;
			int num = SeededRandom.Range(2, 4, ((TriggerReceiver)this).GetRandomSeed());
			numTurnsInPlay++;
			((Card)val).Anim.LightNegationEffect();
			if (numTurnsInPlay >= num)
			{
				yield return val.Die(false, (PlayableCard)null, true);
			}
		}
	}
}
namespace RegionExpansions.Regions
{
	internal class PirateSkullBossOpponent_patchers
	{
		[HarmonyPatch(typeof(PirateSkullBossOpponent))]
		public class re_PirateSkullBoss_Intro_Patch
		{
			[HarmonyPostfix]
			[HarmonyPatch("IntroSequence")]
			public static IEnumerator Postfix(IEnumerator enumerator, PirateSkullBossOpponent __instance, EncounterData encounter)
			{
				yield return enumerator;
				if (((Object)RunState.CurrentMapRegion).name != "Pirateville")
				{
					((Opponent)__instance).NumLives = 2;
				}
			}
		}

		[HarmonyPatch(typeof(PirateSkullBossOpponent))]
		public class re_PirateSkullBoss_LifeLostSequence_Patch
		{
			[HarmonyPostfix]
			[HarmonyPatch("LifeLostSequence")]
			public static IEnumerator Postfix(IEnumerator enumerator, PirateSkullBossOpponent __instance)
			{
				if (((Object)RunState.CurrentMapRegion).name != "Pirateville" && ((Opponent)__instance).NumLives == 0)
				{
					AudioController.Instance.SetLoopVolume(0f, 1f, 0, true);
					AudioController.Instance.SetLoopVolume(0f, 1f, 1, true);
					SpecialBattleSequencer specialSequencer = Singleton<TurnManager>.Instance.SpecialSequencer;
					((PirateSkullBattleSequencer)((specialSequencer is PirateSkullBattleSequencer) ? specialSequencer : null)).CleanupTargetIcons();
					yield return (object)new WaitForSeconds(0.4f);
					Singleton<ViewManager>.Instance.SwitchToView((View)21, false, true);
					yield return (object)new WaitForSeconds(0.4f);
					yield return Singleton<TextDisplayer>.Instance.ShowUntilInput("Avast ye!", -2.5f, 0.5f, (Emotion)0, (LetterAnimation)0, (Speaker)22, (string[])null, true);
					yield return (object)new WaitForSeconds(0.2f);
					((Component)((Part1BossOpponent)__instance).bossSkull).GetComponentInChildren<Animator>().SetTrigger("close_eye");
					yield return (object)new WaitForSeconds(1.25f);
					if (SaveFile.IsAscension && AscensionSaveData.Data.ChallengeIsActive((AscensionChallenge)15))
					{
						Singleton<ChallengeActivationUI>.Instance.ShowActivation((AscensionChallenge)15);
						yield return Singleton<TextDisplayer>.Instance.ShowUntilInput("I'll be seeing you later, and I'll be bringing my crew with me too!", -2.5f, 0.5f, (Emotion)0, (LetterAnimation)0, (Speaker)22, (string[])null, true);
					}
					else
					{
						yield return Singleton<TextDisplayer>.Instance.ShowUntilInput("Farewell.", -2.5f, 0.5f, (Emotion)0, (LetterAnimation)0, (Speaker)22, (string[])null, true);
					}
					AscensionStatsData.TryIncrementStat((Type)2);
					yield return (object)new WaitForSeconds(0.5f);
					((Part1BossOpponent)__instance).bossSkull.ExitSimple();
					yield return (object)new WaitForSeconds(1.2f);
					((OpponentAnimationController)LeshyAnimationController.Instance).ResetHeadOffset(true);
					LeshyAnimationController.Instance.ResetEyesTexture();
					yield return ((Part1BossOpponent)__instance).BossDefeatedSequence();
					Singleton<ViewManager>.Instance.Controller.LockState = (ViewLockState)0;
					Singleton<InteractionCursor>.Instance.InteractionDisabled = false;
				}
				else
				{
					yield return enumerator;
				}
			}
		}

		[HarmonyPatch(typeof(PirateSkullBossOpponent))]
		public class re_PirateSkullBoss_StartNewPhaseSequence_Patch
		{
			[HarmonyPostfix]
			[HarmonyPatch("StartNewPhaseSequence")]
			public static IEnumerator Postfix(IEnumerator enumerator, PirateSkullBossOpponent __instance)
			{
				if (((Object)RunState.CurrentMapRegion).name != "Pirateville")
				{
					((Opponent)__instance).TurnPlan.Clear();
					if (((Opponent)__instance).NumLives == 1)
					{
						yield return __instance.StartPhase2();
					}
				}
				else
				{
					yield return enumerator;
				}
			}
		}

		[HarmonyPatch(typeof(PirateSkullBattleSequencer))]
		public class re_PirateSkullBoss_PirateSkullBattleSequencer_Patch
		{
			[HarmonyPostfix]
			[HarmonyPatch("RespondsToUpkeep")]
			public static void Postfix(bool playerUpkeep, ref bool __result)
			{
				if (((Object)RunState.CurrentMapRegion).name != "Pirateville" && playerUpkeep && Singleton<TurnManager>.Instance.TurnNumber > 1 && Singleton<TurnManager>.Instance.Opponent.NumLives > 0)
				{
					__result = true;
				}
			}
		}
	}
	internal class RegionDataDump
	{
		public static void DumpRegionData()
		{
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_0122: Unknown result type (might be due to invalid IL or missing references)
			//IL_0127: Unknown result type (might be due to invalid IL or missing references)
			//IL_0157: Unknown result type (might be due to invalid IL or missing references)
			//IL_015c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_049b: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a0: Unknown result type (might be due to invalid IL or missing references)
			Plugin.Log.LogMessage((object)"Dumping Region Data");
			for (int i = 0; i < RegionManager.BaseGameRegions.Count; i++)
			{
				RegionData val = RegionManager.BaseGameRegions[i];
				Plugin.Log.LogMessage((object)("Dumping Region Data, region " + i));
				Plugin.Log.LogMessage((object)("Dumping Region Data, region " + i + " name is:" + ((Object)val).name));
				for (int j = 0; j < val.bosses.Count; j++)
				{
					ManualLogSource log = Plugin.Log;
					string text = i.ToString();
					Type val2 = val.bosses[j];
					log.LogMessage((object)("Dumping Region Data, region " + text + " boss is:" + ((object)(Type)(ref val2)).ToString()));
				}
				Plugin.Log.LogMessage((object)("Dumping Region Data, region " + i + " bossPrepCondition is:" + (object)val.bossPrepCondition));
				Plugin.Log.LogMessage((object)("Dumping Region Data, region " + i + " ambientLoopId is:" + val.ambientLoopId));
				ManualLogSource log2 = Plugin.Log;
				string text2 = i.ToString();
				Color val3 = val.boardLightColor;
				log2.LogMessage((object)("Dumping Region Data, region " + text2 + " boardLightColor is:" + ((object)(Color)(ref val3)).ToString()));
				ManualLogSource log3 = Plugin.Log;
				string text3 = i.ToString();
				val3 = val.cardsLightColor;
				log3.LogMessage((object)("Dumping Region Data, region " + text3 + " cardsLightColor is:" + ((object)(Color)(ref val3)).ToString()));
				for (int k = 0; k < val.consumableItems.Count; k++)
				{
					Plugin.Log.LogMessage((object)("Dumping Region Data, region " + i + " consumableItems is:" + (object)val.consumableItems[k]));
				}
				for (int l = 0; l < val.dominantTribes.Count; l++)
				{
					ManualLogSource log4 = Plugin.Log;
					string text4 = i.ToString();
					Tribe val4 = val.dominantTribes[l];
					log4.LogMessage((object)("Dumping Region Data, region " + text4 + " dominantTribes is:" + ((object)(Tribe)(ref val4)).ToString()));
				}
				Plugin.Log.LogMessage((object)("Dumping Region Data, region " + i + " dustParticlesDisabled is:" + val.dustParticlesDisabled));
				for (int m = 0; m < val.encounters.Count; m++)
				{
					Plugin.Log.LogMessage((object)("Dumping Region Data, region " + i + " encounters is:" + (object)val.encounters[m]));
				}
				for (int n = 0; n < val.fillerScenery.Count; n++)
				{
					Plugin.Log.LogMessage((object)("Dumping Region Data, region " + i + " fillerScenery is:" + (object)val.fillerScenery[n]));
					if (((Object)((SceneryEntry)val.fillerScenery[n]).data).name != null)
					{
						Plugin.Log.LogMessage((object)("Dumping Region Data, region " + i + " fillerScenery.data.name is:" + ((Object)((SceneryEntry)val.fillerScenery[n]).data).name));
					}
				}
				Plugin.Log.LogMessage((object)("Dumping Region Data, region " + i + " fogAlpha is:" + val.fogAlpha));
				Plugin.Log.LogMessage((object)("Dumping Region Data, region " + i + " fogEnabled is:" + val.fogEnabled));
				Plugin.Log.LogMessage((object)("Dumping Region Data, region " + i + " fogProfile is:" + (object)val.fogProfile));
				for (int num = 0; num < val.likelyCards.Count; num++)
				{
					Plugin.Log.LogMessage((object)("Dumping Region Data, region " + i + " likelyCards is:" + (object)val.likelyCards[num]));
				}
				Plugin.Log.LogMessage((object)("Dumping Region Data, region " + i + " mapAlbedo is:" + (object)val.mapAlbedo));
				Plugin.Log.LogMessage((object)("Dumping Region Data, region " + i + " mapEmission is:" + (object)val.mapEmission));
				ManualLogSource log5 = Plugin.Log;
				string text5 = i.ToString();
				val3 = val.mapEmissionColor;
				log5.LogMessage((object)("Dumping Region Data, region " + text5 + " mapEmissionColor is:" + ((object)(Color)(ref val3)).ToString()));
				for (int num2 = 0; num2 < val.mapParticlesPrefabs.Count; num2++)
				{
					Plugin.Log.LogMessage((object)("Dumping Region Data, region " + i + " mapParticlesPrefabs is:" + (object)val.mapParticlesPrefabs[num2]));
				}
				Plugin.Log.LogMessage((object)("Dumping Region Data, region " + i + " predefinedNodes is:" + (object)val.predefinedNodes));
				if ((Object)(object)val.predefinedScenery != (Object)null)
				{
					for (int num3 = 0; num3 < val.predefinedScenery.scenery.Count; num3++)
					{
						Plugin.Log.LogMessage((object)("Dumping Region Data, region " + i + " predefinedScenery is:" + ((Object)val.predefinedScenery.scenery[num3].data).name));
					}
				}
				for (int num4 = 0; num4 < val.scarceScenery.Count; num4++)
				{
					Plugin.Log.LogMessage((object)("Dumping Region Data, region " + i + " scarceScenery is:" + (object)val.scarceScenery[num4]));
					if (((Object)((SceneryEntry)val.scarceScenery[num4]).data).name != null)
					{
						Plugin.Log.LogMessage((object)("Dumping Region Data, region " + i + " scarceScenery.data.name is:" + ((Object)((SceneryEntry)val.scarceScenery[num4]).data).name));
					}
				}
				for (int num5 = 0; num5 < val.terrainCards.Count; num5++)
				{
					Plugin.Log.LogMessage((object)("Dumping Region Data, region " + i + " terrainCards is:" + (object)val.terrainCards[num5]));
				}
				for (int num6 = 0; num6 < val.encounters.Count; num6++)
				{
					Plugin.Log.LogMessage((object)("Dumping Region Data, region " + i + " terrainCards is:" + ((Object)val.encounters[num6]).name));
				}
			}
		}
	}
	internal class Region_Beach
	{
		public static void AddRegionIntroDialogue()
		{
			List<CustomLine> list = new List<CustomLine>();
			list.Add(("In the distance, you hear what sounds like singing... 'heave, ho'", (Speaker)1));
			list.Add(("Your curiosity of it brought you here to this place.", (Speaker)1));
			list.Add(("To get to the source, you must pass through... [c:bR]The Shoreline[c:]", (Speaker)1));
			List<CustomLine> list2 = new List<CustomLine>();
			list2.Add(("The smell of salt water assults your nose...", (Speaker)1));
			list2.Add(("as the sound of waves crash apon the sand.", (Speaker)1));
			list2.Add(("You journey on in... [c:bR]The Shoreline[c:]", (Speaker)1));
			List<CustomLine> list3 = new List<CustomLine>();
			list3.Add(("The sea is calm.", (Speaker)1));
			list3.Add(("The tide is full", (Speaker)1));
			list3.Add(("You walk along... [c:bR]The Shoreline[c:]", (Speaker)1));
			List<CustomLine> list4 = new List<CustomLine>();
			list4.Add(("The coarse sand on the beach entered your boots...", (Speaker)1));
			list4.Add(("You continued your travels despite the irritation...", (Speaker)1));
			list4.Add(("You tread through... [c:bR]The Shoreline.[c:]", (Speaker)1));
			List<List<CustomLine>> list5 = new List<List<CustomLine>>();
			list5.Add(list2);
			list5.Add(list3);
			list5.Add(list4);
			DialogueEventGenerator.GenerateEvent("RegionBeach", list, list5, (MaxRepeatsBehaviour)0, "Game Flow", (LetterAnimation)1, (LetterAnimation)1);
		}

		public static void AddRegion()
		{
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Expected O, but got Unknown
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Expected O, but got Unknown
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Expected O, but got Unknown
			//IL_010c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Expected O, but got Unknown
			//IL_0176: Unknown result type (might be due to invalid IL or missing references)
			//IL_017b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0191: Unknown result type (might be due to invalid IL or missing references)
			//IL_0196: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01da: Unknown result type (might be due to invalid IL or missing references)
			//IL_01df: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0356: Unknown result type (might be due to invalid IL or missing references)
			//IL_035d: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f4: Expected I4, but got Unknown
			//IL_0211: Unknown result type (might be due to invalid IL or missing references)
			//IL_0218: Unknown result type (might be due to invalid IL or missing references)
			//IL_025d: Unknown result type (might be due to invalid IL or missing references)
			RegionData regionData = EncounterHelper.GetRegionData("Pirateville");
			SceneryData data = ((SceneryEntry)regionData.fillerScenery[0]).data.Clone<SceneryData>();
			SceneryData data2 = regionData.predefinedScenery.scenery[0].data.Clone<SceneryData>();
			SceneryData data3 = regionData.predefinedScenery.scenery[7].data.Clone<SceneryData>();
			Texture2D val = (Texture2D)regionData.mapEmission;
			FillerSceneryEntry val2 = new FillerSceneryEntry();
			((SceneryEntry)val2).data = data;
			((SceneryEntry)val2).data.radius = ((SceneryEntry)val2).data.radius * 1.5f;
			ScarceSceneryEntry val3 = new ScarceSceneryEntry();
			((SceneryEntry)val3).data = data2;
			val3.minDensity = 200f;
			val3.minInstances = 20;
			val3.maxInstances = 40;
			((Object)((SceneryEntry)val3).data).name = "PalmTree";
			((SceneryEntry)val3).data.prefabNames = new List<string> { "PalmTree" };
			((SceneryEntry)val3).data.radius = 0.065f;
			((SceneryEntry)val3).data.perlinNoiseHeight = false;
			ScarceSceneryEntry val4 = new ScarceSceneryEntry();
			((SceneryEntry)val4).data = data3;
			val4.minDensity = 25f;
			val4.minInstances = 5;
			val4.maxInstances = 10;
			((Object)((SceneryEntry)val4).data).name = "TreasureChest";
			((SceneryEntry)val4).data.prefabNames = new List<string> { "TreasureChest" };
			((SceneryEntry)val4).data.maxScale = new Vector2(1.5f, 1.5f);
			((SceneryEntry)val4).data.minScale = new Vector2(0.5f, 0.5f);
			((SceneryEntry)val4).data.baseEulers = new Vector3(-90f, 0f, 0f);
			((SceneryEntry)val4).data.radius = 0.05f;
			((SceneryEntry)val4).data.perlinNoiseHeight = false;
			Color boardLightColor = regionData.boardLightColor;
			Color cardsLightColor = regionData.cardsLightColor;
			Texture mapAlbedo = regionData.mapAlbedo;
			if (!Chainloader.PluginInfos.ContainsKey("Lily.BOT"))
			{
				RegionExtensions.Build(RegionExtensions.AddTerrainCards(RegionExtensions.AddLikelyCards(RegionExtensions.AddLikelyCards(RegionExtensions.AddEncounters(RegionExtensions.AddDominantTribes(RegionExtensions.AddBosses(RegionExtensions.SetDustParticlesEnabled(RegionExtensions.SetFogEnabled(RegionExtensions.SetFogAlpha(RegionExtensions.SetMapEmissionColor(RegionExtensions.SetAmbientLoopId(RegionExtensions.SetMapEmission(RegionExtensions.SetMapAlbedo(RegionExtensions.AddScarceScenery(RegionExtensions.AddFillerScenery(RegionExtensions.SetCardsColor(RegionExtensions.SetBoardColor(RegionManager.New("Beach", 2, true), boardLightColor), cardsLightColor), (FillerSceneryEntry[])(object)new FillerSceneryEntry[1] { val2 }), (ScarceSceneryEntry[])(object)new ScarceSceneryEntry[2] { val3, val4 }), mapAlbedo), val), "boss_pirateskull_ambient"), regionData.mapEmissionColor), regionData.fogAlpha), regionData.fogEnabled), false), (Type[])(object)new Type[1] { (Type)20 }), (Tribe[])(object)new Tribe[1] { (Tribe)2 }), (EncounterBlueprintData[])(object)new EncounterBlueprintData[5]
				{
					EncounterHelper.GetBlueprintData("Submerge"),
					EncounterHelper.GetBlueprintData("BirdFlock"),
					EncounterHelper.GetCustomBlueprintData("BirdOfTheSea"),
					EncounterHelper.GetCustomBlueprintData("CrabsAndLobster"),
					EncounterHelper.GetCustomBlueprintData("TideOfFish")
				}), new string[1] { "Kingfisher" }), new string[1] { "portrait_skeletonparrot" }), new string[4] { "re_High_Tide", "re_Strong_Wind_1", "Boulder", "re_Low_Tide" }), false, false, false, false);
			}
			else
			{
				RegionExtensions.Build(RegionExtensions.AddTerrainCards(RegionExtensions.AddLikelyCards(RegionExtensions.AddLikelyCards(RegionExtensions.AddEncounters(RegionExtensions.AddDominantTribes(RegionExtensions.AddBosses(RegionExtensions.SetDustParticlesEnabled(RegionExtensions.SetFogEnabled(RegionExtensions.SetFogAlpha(RegionExtensions.SetMapEmissionColor(RegionExtensions.SetAmbientLoopId(RegionExtensions.SetMapEmission(RegionExtensions.SetMapAlbedo(RegionExtensions.AddScarceScenery(RegionExtensions.AddFillerScenery(RegionExtensions.SetCardsColor(RegionExtensions.SetBoardColor(RegionManager.New("Beach", 2, true), boardLightColor), cardsLightColor), (FillerSceneryEntry[])(object)new FillerSceneryEntry[1] { val2 }), (ScarceSceneryEntry[])(object)new ScarceSceneryEntry[2] { val3, val4 }), mapAlbedo), val), "boss_pirateskull_ambient"), regionData.mapEmissionColor), regionData.fogAlpha), regionData.fogEnabled), false), (Type[])(object)new Type[1] { (Type)20 }), (Tribe[])(object)new Tribe[2]
				{
					(Tribe)2,
					(Tribe)(int)GuidManager.GetEnumValue<Tribe>("Lily.BOT", "aquatic")
				}), (EncounterBlueprintData[])(object)new EncounterBlueprintData[5]
				{
					EncounterHelper.GetBlueprintData("Submerge"),
					EncounterHelper.GetBlueprintData("BirdFlock"),
					EncounterHelper.GetCustomBlueprintData("BirdOfTheSea"),
					EncounterHelper.GetCustomBlueprintData("CrabsAndLobster"),
					EncounterHelper.GetCustomBlueprintData("TideOfFish")
				}), new string[1] { "Kingfisher" }), new string[1] { "portrait_skeletonparrot" }), new string[4] { "re_High_Tide", "re_Strong_Wind_1", "Boulder", "re_Low_Tide" }), false, false, false, false);
			}
		}
	}
	internal class Region_Ridgeline
	{
		public static void AddRegionIntroDialogue()
		{
			List<CustomLine> list = new List<CustomLine>();
			list.Add(("Pines and bare rock formations jet up from the ground.", (Speaker)1));
			list.Add(("You hear a mining off in the distance.", (Speaker)1));
			list.Add(("To get to the source, you must pass through... [c:bR]The Ridgeline[c:]", (Speaker)1));
			List<CustomLine> list2 = new List<CustomLine>();
			list2.Add(("You see a glint of gold among the rocks above.", (Speaker)1));
			list2.Add(("As you climb for it, a rock slips out from under your foot and you tumble down.", (Speaker)1));
			list2.Add(("When you get back up, you decide to ignore it and continue on thrhough... [c:bR]The Ridgeline[c:]", (Speaker)1));
			List<List<CustomLine>> list3 = new List<List<CustomLine>>();
			list3.Add(list2);
			DialogueEventGenerator.GenerateEvent("RegionRidgeline", list, list3, (MaxRepeatsBehaviour)0, "Game Flow", (LetterAnimation)1, (LetterAnimation)1);
		}

		public static void AddRegion()
		{
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Expected O, but got Unknown
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Expected O, but got Unknown
			//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Expected O, but got Unknown
			//IL_013e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0148: Unknown result type (might be due to invalid IL or missing references)
			//IL_014d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0160: Unknown result type (might be due to invalid IL or missing references)
			//IL_016a: Unknown result type (might be due to invalid IL or missing references)
			//IL_016f: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01df: Unknown result type (might be due to invalid IL or missing references)
			//IL_0229: Unknown result type (might be due to invalid IL or missing references)
			RegionData regionData = EncounterHelper.GetRegionData("Forest");
			RegionData regionData2 = EncounterHelper.GetRegionData("Wetlands");
			SceneryData data = ((SceneryEntry)regionData.fillerScenery[0]).data.Clone<SceneryData>();
			SceneryData val = ((SceneryEntry)regionData.scarceScenery[0]).data.Clone<SceneryData>();
			SceneryData val2 = ((SceneryEntry)regionData2.fillerScenery[0]).data.Clone<SceneryData>();
			Plugin.Log.LogMessage((object)val2.prefabNames[0]);
			Texture2D val3 = (Texture2D)regionData.mapEmission;
			FillerSceneryEntry val4 = new FillerSceneryEntry();
			((SceneryEntry)val4).data = data;
			((Object)((SceneryEntry)val4).data).name = ((Object)val).name;
			((SceneryEntry)val4).data.prefabNames = val.prefabNames;
			((SceneryEntry)val4).data.minScale = new Vector2(0.05f, 0.01f);
			((SceneryEntry)val4).data.maxScale = new Vector2(0.1f, 0.02f);
			((SceneryEntry)val4).data.radius = ((SceneryEntry)val4).data.radius * 1.75f;
			ScarceSceneryEntry val5 = new ScarceSceneryEntry();
			((SceneryEntry)val5).data = val;
			val5.minDensity = 500f;
			val5.minInstances = 50;
			val5.maxInstances = 100;
			((SceneryEntry)val5).data.minScale = ((SceneryEntry)val5).data.minScale * 2f;
			((SceneryEntry)val5).data.maxScale = ((SceneryEntry)val5).data.maxScale * 2f;
			((SceneryEntry)val5).data.radius = ((SceneryEntry)val5).data.radius * 0.25f;
			((Object)((SceneryEntry)val5).data).name = ((Object)val2).name;
			((SceneryEntry)val5).data.prefabNames = val2.prefabNames;
			Color gray = Color.gray;
			Color grey = Color.grey;
			Texture mapAlbedo = regionData.mapAlbedo;
			RegionExtensions.Build(RegionExtensions.AddTerrainCards(RegionExtensions.AddEncounters(RegionExtensions.AddDominantTribes(RegionExtensions.AddBosses(RegionExtensions.SetDustParticlesEnabled(RegionExtensions.SetFogEnabled(RegionExtensions.SetFogAlpha(RegionExtensions.SetMapEmissionColor(RegionExtensions.SetAmbientLoopId(RegionExtensions.SetMapEmission(RegionExtensions.SetMapAlbedo(RegionExtensions.AddScarceScenery(RegionExtensions.AddFillerScenery(RegionExtensions.SetCardsColor(RegionExtensions.SetBoardColor(RegionManager.New("Ridgeline", 0, true), gray), grey), (FillerSceneryEntry[])(object)new FillerSceneryEntry[1] { val4 }), (ScarceSceneryEntry[])(object)new ScarceSceneryEntry[3] { val5, val5, val5 }), mapAlbedo), val3), "boss_prospector_ambient"), regionData.mapEmissionColor), regionData.fogAlpha), regionData.fogEnabled), false), (Type[])(object)new Type[1] { (Type)3 }), (Tribe[])(object)new Tribe[2]
			{
				(Tribe)3,
				(Tribe)4
			}), (EncounterBlueprintData[])(object)new EncounterBlueprintData[6]
			{
				EncounterHelper.GetBlueprintData("CoyotePack"),
				EncounterHelper.GetBlueprintData("WolfPack"),
				EncounterHelper.GetBlueprintData("DireWolfJuggernaut"),
				EncounterHelper.GetBlueprintData("ElkHerd"),
				EncounterHelper.GetBlueprintData("MooseJuggernaut"),
				EncounterHelper.GetBlueprintData("WildBulls")
			}), new string[2] { "Boulder", "GoldNugget" }), false, false, false, false);
		}
	}
}
namespace RegionExpansions.lib
{
	public static class CreateCardPack
	{
		public static void CreatePack()
		{
			PackInfo packInfo = PackManager.GetPackInfo("re");
			packInfo.Title = "Beach Region Card Pack";
			packInfo.SetTexture(TextureHelper.GetImageAsTexture("beach_pack.png", typeof(High_Tide).Assembly, (FilterMode)0));
			packInfo.Description = "Cards to help make the beach region with Royal as the boss more flavorful. Don't disable! Will break custom encounters for beach region!";
			packInfo.ValidFor.Add((PackMetacategory)0);
		}
	}
}
namespace RegionExpansions.Encounter
{
	internal class BirdOfTheSea
	{
		public static void AddEncounter()
		{
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Expected O, but got Unknown
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Expected O, but got Unknown
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: Expected O, but got Unknown
			//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f7: Expected O, but got Unknown
			//IL_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_0105: Unknown result type (might be due to invalid IL or missing references)
			//IL_0115: Unknown result type (might be due to invalid IL or missing references)
			//IL_0122: Expected O, but got Unknown
			//IL_0124: Unknown result type (might be due to invalid IL or missing references)
			//IL_0129: Unknown result type (might be due to invalid IL or missing references)
			//IL_0130: Unknown result type (might be due to invalid IL or missing references)
			//IL_0137: Unknown result type (might be due to invalid IL or missing references)
			//IL_013f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0154: Expected O, but got Unknown
			//IL_0156: Unknown result type (might be due to invalid IL or missing references)
			//IL_015b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0170: Expected O, but got Unknown
			//IL_0179: Unknown result type (might be due to invalid IL or missing references)
			//IL_017e: Unknown result type (might be due to invalid IL or missing references)
			//IL_018e: Unknown result type (might be due to invalid IL or missing references)
			//IL_019b: Expected O, but got Unknown
			//IL_019d: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bf: Expected O, but got Unknown
			//IL_01c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01db: Expected O, but got Unknown
			//IL_01e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0206: Expected O, but got Unknown
			//IL_0208: Unknown result type (might be due to invalid IL or missing references)
			//IL_020d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0214: Unknown result type (might be due to invalid IL or missing references)
			//IL_021b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0223: Unknown result type (might be due to invalid IL or missing references)
			//IL_0238: Expected O, but got Unknown
			//IL_023a: Unknown result type (might be due to invalid IL or missing references)
			//IL_023f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0246: Unknown result type (might be due to invalid IL or missing references)
			//IL_024d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0255: Unknown result type (might be due to invalid IL or missing references)
			//IL_026a: Expected O, but got Unknown
			//IL_0273: Unknown result type (might be due to invalid IL or missing references)
			//IL_0278: Unknown result type (might be due to invalid IL or missing references)
			//IL_0288: Unknown result type (might be due to invalid IL or missing references)
			//IL_0295: Expected O, but got Unknown
			//IL_0297: Unknown result type (might be due to invalid IL or missing references)
			//IL_029c: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b9: Expected O, but got Unknown
			List<Tribe> tribes = new List<Tribe> { (Tribe)2 };
			List<Ability> redundant = new List<Ability> { (Ability)19 };
			bool regionLocked = true;
			List<CardInfo> randomReplacementCards = EncounterHelper.AddRandomCards("Stoat", "Shark", "re_Starfish");
			List<List<CardBlueprint>> list = new List<List<CardBlueprint>>();
			List<CardBlueprint> item = new List<CardBlueprint>
			{
				new CardBlueprint
				{
					card = CardLoader.GetCardByName("re_Starfish")
				}
			};
			List<CardBlueprint> item2 = new List<CardBlueprint>
			{
				new CardBlueprint
				{
					card = null,
					difficultyReplace = true,
					difficultyReq = 13,
					replacement = CardLoader.GetCardByName("SkeletonParrot")
				},
				new CardBlueprint
				{
					card = CardLoader.GetCardByName("Kingfisher")
				}
			};
			List<CardBlueprint> item3 = new List<CardBlueprint>
			{
				new CardBlueprint
				{
					card = CardLoader.GetCardByName("Kingfisher")
				}
			};
			List<CardBlueprint> item4 = new List<CardBlueprint>
			{
				new CardBlueprint
				{
					card = CardLoader.GetCardByName("SkeletonParrot"),
					randomReplaceChance = 25
				},
				new CardBlueprint
				{
					card = null,
					difficultyReplace = true,
					difficultyReq = 18,
					replacement = CardLoader.GetCardByName("SkeletonParrot")
				},
				new CardBlueprint
				{
					card = CardLoader.GetCardByName("SkeletonParrot")
				}
			};
			List<CardBlueprint> item5 = new List<CardBlueprint>
			{
				new CardBlueprint
				{
					card = CardLoader.GetCardByName("SkeletonParrot"),
					randomReplaceChance = 25
				},
				new CardBlueprint
				{
					card = CardLoader.GetCardByName("SkeletonParrot"),
					randomReplaceChance = 25
				},
				new CardBlueprint
				{
					card = CardLoader.GetCardByName("SkeletonParrot")
				}
			};
			List<CardBlueprint> item6 = new List<CardBlueprint>
			{
				new CardBlueprint
				{
					card = CardLoader.GetCardByName("Kingfisher"),
					randomReplaceChance = 25
				},
				new CardBlueprint
				{
					card = null,
					difficultyReplace = true,
					difficultyReq = 18,
					replacement = CardLoader.GetCardByName("SkeletonParrot")
				},
				new CardBlueprint
				{
					card = null,
					difficultyReplace = true,
					difficultyReq = 13,
					replacement = CardLoader.GetCardByName("SkeletonParrot")
				}
			};
			List<CardBlueprint> item7 = new List<CardBlueprint>
			{
				new CardBlueprint
				{
					card = CardLoader.GetCardByName("Kingfisher"),
					randomReplaceChance = 25
				},
				new CardBlueprint
				{
					card = CardLoader.GetCardByName("SkeletonParrot"),
					randomReplaceChance = 25
				}
			};
			List<CardBlueprint> item8 = new List<CardBlueprint>();
			List<CardBlueprint> item9 = new List<CardBlueprint>();
			list.Add(item);
			list.Add(item2);
			list.Add(item3);
			list.Add(item4);
			list.Add(item5);
			list.Add(item6);
			list.Add(item7);
			list.Add(item8);
			list.Add(item9);
			EncounterManager.Add(EncounterHelper.BuildBlueprint("BirdOfTheSea", tribes, redundant, regionLocked, 0, 30, randomReplacementCards, list));
		}
	}
	internal class CrabsAndLobster
	{
		public static void AddEncounter()
		{
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Expected O, but got Unknown
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c3: Expected O, but got Unknown
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_010d: Expected O, but got Unknown
			//IL_0116: Unknown result type (might be due to invalid IL or missing references)
			//IL_011b: Unknown result type (might be due to invalid IL or missing references)
			//IL_012b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0132: Unknown result type (might be due to invalid IL or missing references)
			//IL_013a: Unknown result type (might be due to invalid IL or missing references)
			//IL_014a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0157: Expected O, but got Unknown
			//IL_0159: Unknown result type (might be due to invalid IL or missing references)
			//IL_015e: Unknown result type (might be due to invalid IL or missing references)
			//IL_016e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0175: Unknown result type (might be due to invalid IL or missing references)
			//IL_017d: Unknown result type (might be due to invalid IL or missing references)
			//IL_018d: Unknown result type (might be due to invalid IL or missing references)
			//IL_019a: Expected O, but got Unknown
			//IL_01a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e4: Expected O, but got Unknown
			//IL_01ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0200: Unknown result type (might be due to invalid IL or missing references)
			//IL_0208: Unknown result type (might be due to invalid IL or missing references)
			//IL_0218: Unknown result type (might be due to invalid IL or missing references)
			//IL_0225: Expected O, but got Unknown
			//IL_022e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0233: Unknown result type (might be due to invalid IL or missing references)
			//IL_023a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0241: Unknown result type (might be due to invalid IL or missing references)
			//IL_0249: Unknown result type (might be due to invalid IL or missing references)
			//IL_0259: Unknown result type (might be due to invalid IL or missing references)
			//IL_0266: Expected O, but got Unknown
			//IL_026f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0274: Unknown result type (might be due to invalid IL or missing references)
			//IL_027b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0282: Unknown result type (might be due to invalid IL or missing references)
			//IL_028a: Unknown result type (might be due to invalid IL or missing references)
			//IL_029a: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a7: Expected O, but got Unknown
			List<Tribe> list = new List<Tribe>();
			if (Chainloader.PluginInfos.ContainsKey("Lily.BOT"))
			{
				list.Add(GuidManager.GetEnumValue<Tribe>("Lily.BOT", "aquatic"));
			}
			else
			{
				list.Add((Tribe)2);
			}
			List<Ability> redundant = new List<Ability> { (Ability)13 };
			bool regionLocked = true;
			List<CardInfo> randomReplacementCards = EncounterHelper.AddRandomCards("re_Starfish", "Shark", "Kingfisher", "re_Moon_Jellyfish");
			List<List<CardBlueprint>> list2 = new List<List<CardBlueprint>>();
			List<CardBlueprint> item = new List<CardBlueprint>
			{
				new CardBlueprint
				{
					card = CardLoader.GetCardByName("re_Jonah_Crab")
				},
				new CardBlueprint
				{
					card = CardLoader.GetCardByName("Kingfisher")
				}
			};
			List<CardBlueprint> item2 = new List<CardBlueprint>
			{
				new CardBlueprint
				{
					card = CardLoader.GetCardByName("Kingfisher"),
					difficultyReplace = true,
					difficultyReq = 13,
					replacement = CardLoader.GetCardByName("re_American_Lobster"),
					randomReplaceChance = 25
				}
			};
			List<CardBlueprint> item3 = new List<CardBlueprint>
			{
				new CardBlueprint
				{
					card = CardLoader.GetCardByName("re_Jonah_Crab"),
					difficultyReplace = true,
					difficultyReq = 12,
					replacement = CardLoader.GetCardByName("re_Starfish"),
					randomReplaceChance = 25
				},
				new CardBlueprint
				{
					card = CardLoader.GetCardByName("re_Jonah_Crab"),
					difficultyReplace = true,
					difficultyReq = 19,
					replacement = CardLoader.GetCardByName("re_American_Lobster"),
					randomReplaceChance = 25
				}
			};
			List<CardBlueprint> item4 = new List<CardBlueprint>
			{
				new CardBlueprint
				{
					card = CardLoader.GetCardByName("Kingfisher"),
					difficultyReplace = true,
					difficultyReq = 13,
					replacement = CardLoader.GetCardByName("re_Jonah_Crab"),
					randomReplaceChance = 25
				}
			};
			List<CardBlueprint> item5 = new List<CardBlueprint>
			{
				new CardBlueprint
				{
					card = null,
					difficultyReplace = true,
					difficultyReq = 15,
					replacement = CardLoader.GetCardByName("re_Jonah_Crab"),
					randomReplaceChance = 25
				}
			};
			List<CardBlueprint> item6 = new List<CardBlueprint>
			{
				new CardBlueprint
				{
					card = null,
					difficultyReplace = true,
					difficultyReq = 17,
					replacement = CardLoader.GetCardByName("re_American_Lobster"),
					randomReplaceChance = 25
				}
			};
			List<CardBlueprint> item7 = new List<CardBlueprint>
			{
				new CardBlueprint
				{
					card = null,
					difficultyReplace = true,
					difficultyReq = 19,
					replacement = CardLoader.GetCardByName("Shark"),
					randomReplaceChance = 25
				}
			};
			List<CardBlueprint> item8 = new List<CardBlueprint>();
			List<CardBlueprint> item9 = new List<CardBlueprint>();
			list2.Add(item);
			list2.Add(item2);
			list2.Add(item3);
			list2.Add(item4);
			list2.Add(item5);
			list2.Add(item6);
			list2.Add(item7);
			list2.Add(item8);
			list2.Add(item9);
			EncounterManager.Add(EncounterHelper.BuildBlueprint("CrabsAndLobster", list, redundant, regionLocked, 0, 30, randomReplacementCards, list2));
		}
	}
	internal class TideOfFish
	{
		public static void AddEncounter()
		{
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Expected O, but got Unknown
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Expected O, but got Unknown
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_010d: Expected O, but got Unknown
			//IL_0116: Unknown result type (might be due to invalid IL or missing references)
			//IL_011b: Unknown result type (might be due to invalid IL or missing references)
			//IL_012b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0132: Unknown result type (might be due to invalid IL or missing references)
			//IL_013a: Unknown result type (might be due to invalid IL or missing references)
			//IL_014a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0157: Expected O, but got Unknown
			//IL_0159: Unknown result type (might be due to invalid IL or missing references)
			//IL_015e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0165: Unknown result type (might be due to invalid IL or missing references)
			//IL_016c: 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_0184: Unknown result type (might be due to invalid IL or missing references)
			//IL_0191: Expected O, but got Unknown
			//IL_019a: Unknown result type (might be due to invalid IL or missing references)
			//IL_019f: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d2: Expected O, but got Unknown
			//IL_01db: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0206: Unknown result type (might be due to invalid IL or missing references)
			//IL_0213: Expected O, but got Unknown
			//IL_021c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0221: Unknown result type (might be due to invalid IL or missing references)
			//IL_0228: Unknown result type (might be due to invalid IL or missing references)
			//IL_022f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0237: Unknown result type (might be due to invalid IL or missing references)
			//IL_0247: Unknown result type (might be due to invalid IL or missing references)
			//IL_0254: Expected O, but got Unknown
			//IL_025d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0262: Unknown result type (might be due to invalid IL or missing references)
			//IL_0269: Unknown result type (might be due to invalid IL or missing references)
			//IL_0270: Unknown result type (might be due to invalid IL or missing references)
			//IL_0278: Unknown result type (might be due to invalid IL or missing references)
			//IL_0288: Unknown result type (might be due to invalid IL or missing references)
			//IL_0295: Expected O, but got Unknown
			List<Tribe> list = new List<Tribe>();
			if (Chainloader.PluginInfos.ContainsKey("Lily.BOT"))
			{
				list.Add(GuidManager.GetEnumValue<Tribe>("Lily.BOT", "aquatic"));
			}
			else
			{
				list.Add((Tribe)2);
			}
			List<Ability> redundant = new List<Ability> { (Ability)13 };
			bool regionLocked = true;
			List<CardInfo> randomReplacementCards = EncounterHelper.AddRandomCards("re_Schoolling_Fish", "Shark", "Kingfisher");
			List<List<CardBlueprint>> list2 = new List<List<CardBlueprint>>();
			List<CardBlueprint> item = new List<CardBlueprint>
			{
				new CardBlueprint
				{
					card = CardLoader.GetCardByName("re_Moon_Jellyfish")
				}
			};
			List<CardBlueprint> item2 = new List<CardBlueprint>
			{
				new CardBlueprint
				{
					card = CardLoader.GetCardByName("re_Moon_Jellyfish"),
					difficultyReplace = true,
					difficultyReq = 18,
					replacement = CardLoader.GetCardByName("re_Costal_Salmon"),
					randomReplaceChance = 25
				},
				new CardBlueprint
				{
					card = CardLoader.GetCardByName("Kingfisher")
				}
			};
			List<CardBlueprint> item3 = new List<CardBlueprint>
			{
				new CardBlueprint
				{
					card = CardLoader.GetCardByName("re_Moon_Jellyfish"),
					difficultyReplace = true,
					difficultyReq = 12,
					replacement = CardLoader.GetCardByName("re_Costal_Salmon"),
					randomReplaceChance = 25
				},
				new CardBlueprint
				{
					card = null,
					difficultyReplace = true,
					difficultyReq = 19,
					replacement = CardLoader.GetCardByName("Shark"),
					randomReplaceChance = 25
				}
			};
			List<CardBlueprint> item4 = new List<CardBlueprint>
			{
				new CardBlueprint
				{
					card = null,
					difficultyReplace = true,
					difficultyReq = 15,
					replacement = CardLoader.GetCardByName("re_Costal_Salmon"),
					randomReplaceChance = 25
				}
			};
			List<CardBlueprint> item5 = new List<CardBlueprint>
			{
				new CardBlueprint
				{
					card = null,
					difficultyReplace = true,
					difficultyReq = 17,
					replacement = CardLoader.GetCardByName("re_Schoolling_Fish"),
					randomReplaceChance = 25
				}
			};
			List<CardBlueprint> item6 = new List<CardBlueprint>
			{
				new CardBlueprint
				{
					card = null,
					difficultyReplace = true,
					difficultyReq = 19,
					replacement = CardLoader.GetCardByName("re_Schoolling_Fish"),
					randomReplaceChance = 25
				}
			};
			List<CardBlueprint> item7 = new List<CardBlueprint>
			{
				new CardBlueprint
				{
					card = null,
					difficultyReplace = true,
					difficultyReq = 21,
					replacement = CardLoader.GetCardByName("Shark"),
					randomReplaceChance = 25
				}
			};
			List<CardBlueprint> item8 = new List<CardBlueprint>();
			List<CardBlueprint> item9 = new List<CardBlueprint>();
			list2.Add(item);
			list2.Add(item2);
			list2.Add(item3);
			list2.Add(item4);
			list2.Add(item5);
			list2.Add(item6);
			list2.Add(item7);
			list2.Add(item8);
			list2.Add(item9);
			EncounterManager.Add(EncounterHelper.BuildBlueprint("TideOfFish", list, redundant, regionLocked, 0, 30, randomReplacementCards, list2));
		}
	}
}
namespace RegionExpansions.cards
{
	public static class American_Lobster
	{
		public static readonly Ability CustomAbility1 = GuidManager.GetEnumValue<Ability>("extraVoid.inscryption.voidSigils", "Gripper");

		public static void AddCard()
		{
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			string displayName = "Small Lobster";
			string description = "Their claws can keep a grip on almost anything.";
			int attack = 2;
			int health = 1;
			int bloodCost = 2;
			int boneCost = 0;
			int energyCost = 0;
			List<CardMetaCategory> cardMetaCategories = new List<CardMetaCategory>
			{
				(CardMetaCategory)0,
				(CardMetaCategory)1
			};
			List<Tribe> list = new List<Tribe>();
			if (Chainloader.PluginInfos.ContainsKey("Lily.BOT"))
			{
				Plugin.Log.LogMessage((object)"Lily Totems found, Small Lobster is now aquatic");
				list.Add(GuidManager.GetEnumValue<Tribe>("Lily.BOT", "aquatic"));
			}
			if (Chainloader.PluginInfos.ContainsKey("nevernamed.inscryption.sigils"))
			{
				Plugin.Log.LogMessage((object)"Never stuff found, Small Lobster is now Crustacean");
				list.Add(GuidManager.GetEnumValue<Tribe>("nevernamed.inscryption.sigils", "Crustacean"));
			}
			List<Ability> abilities = new List<Ability>
			{
				CustomAbility1,
				(Ability)13
			};
			List<Trait> traits = new List<Trait>();
			Texture2D imageAsTexture = TextureHelper.GetImageAsTexture("re_Lobster.png", typeof(High_Tide).Assembly, (FilterMode)0);
			Texture2D imageAsTexture2 = TextureHelper.GetImageAsTexture("re_Lobster_e.png", typeof(High_Tide).Assembly, (FilterMode)0);
			CardInfo val = SigilUtils.CreateCardWithDefaultSettings("re_American_Lobster", displayName, attack, health, imageAsTexture, imageAsTexture2, cardMetaCategories, list, traits, abilities, null, bloodCost, boneCost, energyCost);
			val.description = description;
			CardManager.Add("re", val);
		}
	}
	public static class Costal_Salmon
	{
		public static void AddCard()
		{
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			string displayName = "Costal Salmon";
			string description = "A salmon found along the coast around this time.";
			int attack = 2;
			int health = 2;
			int bloodCost = 2;
			int boneCost = 0;
			int energyCost = 0;
			List<CardMetaCategory> cardMetaCategories = new List<CardMetaCategory>
			{
				(CardMetaCategory)0,
				(CardMetaCategory)1
			};
			List<Tribe> list = new List<Tribe>();
			if (Chainloader.PluginInfos.ContainsKey("Lily.BOT"))
			{
				Plugin.Log.LogMessage((object)"Lily Totems found, Costal Salmon is now aquatic");
				list.Add(GuidManager.GetEnumValue<Tribe>("Lily.BOT", "aquatic"));
			}
			List<Ability> abilities = new List<Ability>
			{
				(Ability)3,
				(Ability)13
			};
			List<Trait> traits = new List<Trait>();
			Texture2D imageAsTexture = TextureHelper.GetImageAsTexture("re_salmon.png", typeof(High_Tide).Assembly, (FilterMode)0);
			Texture2D imageAsTexture2 = TextureHelper.GetImageAsTexture("re_salmon_e.png", typeof(High_Tide).Assembly, (FilterMode)0);
			CardInfo val = SigilUtils.CreateCardWithDefaultSettings("re_Costal_Salmon", displayName, attack, health, imageAsTexture, imageAsTexture2, cardMetaCategories, list, traits, abilities, null, bloodCost, boneCost, energyCost);
			val.description = description;
			CardManager.Add("re", val);
		}
	}
	public static class High_Tide
	{
		public static readonly Ability CustomAbility1 = GuidManager.GetEnumValue<Ability>("extraVoid.inscryption.voidSigils", "High Tide");

		public static void AddCard()
		{
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			string displayName = "High Tide";
			string description = "A high tide swallows everything.";
			int attack = 0;
			int health = 2;
			int bloodCost = 0;
			int boneCost = 0;
			int energyCost = 0;
			List<CardMetaCategory> cardMetaCategories = new List<CardMetaCategory>();
			List<Tribe> tribes = new List<Tribe>();
			List<Ability> abilities = new List<Ability> { CustomAbility1 };
			List<Trait> traits = new List<Trait> { (Trait)12 };
			Texture2D imageAsTexture = TextureHelper.GetImageAsTexture("re_HighTide.png", typeof(High_Tide).Assembly, (FilterMode)0);
			Texture2D imageAsTexture2 = TextureHelper.GetImageAsTexture("re_HighTide.png", typeof(High_Tide).Assembly, (FilterMode)0);
			CardInfo val = SigilUtils.CreateCardWithDefaultSettings("re_High_Tide", displayName, attack, health, imageAsTexture, imageAsTexture2, cardMetaCategories, tribes, traits, abilities, null, bloodCost, boneCost, energyCost);
			val.description = description;
			CardExtensions.SetTerrain(val);
			CardManager.Add("re", val);
		}
	}
	public static class Jonah_Crab
	{
		public static readonly Ability CustomAbility1 = GuidManager.GetEnumValue<Ability>("extraVoid.inscryption.voidSigils", "Thick Shell");

		public static void AddCard()
		{
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			string displayName = "Jonah Crab";
			string description = "A crab with a thick shell.";
			int attack = 1;
			int health = 1;
			int bloodCost = 1;
			int boneCost = 0;
			int energyCost = 0;
			List<CardMetaCategory> cardMetaCategories = new List<CardMetaCategory>
			{
				(CardMetaCategory)0,
				(CardMetaCategory)1
			};
			List<Tribe> list = new List<Tribe>();
			if (Chainloader.PluginInfos.ContainsKey("Lily.BOT"))
			{
				Plugin.Log.LogMessage((object)"Lily Totems found, Jonah Crab is now aquatic");
				list.Add(GuidManager.GetEnumValue<Tribe>("Lily.BOT", "aquatic"));
			}
			if (Chainloader.PluginInfos.ContainsKey("nevernamed.inscryption.sigils"))
			{
				Plugin.Log.LogMessage((object)"Never stuff found, Jonah Crab is now Crustacean");
				list.Add(GuidManager.GetEnumValue<Tribe>("nevernamed.inscryption.sigils", "Crustacean"));
			}
			List<Ability> abilities = new List<Ability> { CustomAbility1 };
			List<Trait> traits = new List<Trait>();
			Texture2D imageAsTexture = TextureHelper.GetImageAsTexture("re_Crab.png", typeof(High_Tide).Assembly, (FilterMode)0);
			Texture2D imageAsTexture2 = TextureHelper.GetImageAsTexture("re_Crab_e.png", typeof(High_Tide).Assembly, (FilterMode)0);
			CardInfo val = SigilUtils.CreateCardWithDefaultSettings("re_Jonah_Crab", displayName, attack, health, imageAsTexture, imageAsTexture2, cardMetaCategories, list, traits, abilities, null, bloodCost, boneCost, energyCost);
			val.description = description;
			CardManager.Add("re", val);
		}
	}
	public static class Low_Tide
	{
		public static readonly Ability CustomAbility1 = GuidManager.GetEnumValue<Ability>("extraVoid.inscryption.voidSigils", "Low Tide");

		public static void AddCard()
		{
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			string displayName = "Low Tide";
			string description = "A low tide reveals treasure.";
			int attack = 0;
			int health = 2;
			int bloodCost = 0;
			int boneCost = 0;
			int energyCost = 0;
			List<CardMetaCategory> cardMetaCategories = new List<CardMetaCategory>();
			List<Tribe> tribes = new List<Tribe>();
			List<Ability> abilities = new List<Ability> { CustomAbility1 };
			List<Trait> traits = new List<Trait> { (Trait)12 };
			Texture2D imageAsTexture = TextureHelper.GetImageAsTexture("re_LowTide.png", typeof(Low_Tide).Assembly, (FilterMode)0);
			Texture2D imageAsTexture2 = TextureHelper.GetImageAsTexture("re_LowTide.png", typeof(Low_Tide).Assembly, (FilterMode)0);
			CardInfo val = SigilUtils.CreateCardWithDefaultSettings("re_Low_Tide", displayName, attack, health, imageAsTexture, imageAsTexture2, cardMetaCategories, tribes, traits, abilities, null, bloodCost, boneCost, energyCost);
			val.description = description;
			CardExtensions.SetTerrain(val);
			CardManager.Add("re", val);
		}
	}
	public static class Moon_Jellyfish
	{
		public static readonly Ability CustomAbility1 = GuidManager.GetEnumValue<Ability>("extraVoid.inscryption.voidSigils", "Submerged Ambush");

		public static void AddCard()
		{
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			string displayName = "Moon Jellyfish";
			string description = "A crab with a thick shell.";
			int attack = 1;
			int health = 1;
			int bloodCost = 1;
			int boneCost = 0;
			int energyCost = 0;
			List<CardMetaCategory> cardMetaCategories = new List<CardMetaCategory>
			{
				(CardMetaCategory)0,
				(CardMetaCategory)1
			};
			List<Tribe> list = new List<Tribe>();
			if (Chainloader.PluginInfos.ContainsKey("Lily.BOT"))
			{
				Plugin.Log.LogMessage((object)"Lily Totems found, Moon Jellyfish is now aquatic");
				list.Add(GuidManager.GetEnumValue<Tribe>("Lily.BOT", "aquatic"));
			}
			List<Ability> abilities = new List<Ability>
			{
				CustomAbility1,
				(Ability)13
			};
			List<Trait> traits = new List<Trait>();
			Texture2D imageAsTexture = TextureHelper.GetImageAsTexture("re_Jellyfish.png", typeof(High_Tide).Assembly, (FilterMode)0);
			Texture2D imageAsTexture2 = TextureHelper.GetImageAsTexture("re_Jellyfish_e.png", typeof(High_Tide).Assembly, (FilterMode)0);
			CardInfo val = SigilUtils.CreateCardWithDefaultSettings("re_Moon_Jellyfish", displayName, attack, health, imageAsTexture, imageAsTexture2, cardMetaCategories, list, traits, abilities, null, bloodCost, boneCost, energyCost);
			val.description = description;
			CardManager.Add("re", val);
		}
	}
	public static class Mussel
	{
		public static readonly Ability CustomAbility1 = GuidManager.GetEnumValue<Ability>("extraVoid.inscryption.voidSigils", "Sluggish");

		public static readonly Ability CustomAbility2 = GuidManager.GetEnumValue<Ability>("extraVoid.inscryption.voidSigils", "Sticky");

		public static void AddCard()
		{
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			string displayName = "Rock Mussel";
			string description = "A mussel that can stick to anything.";
			int attack = 0;
			int health = 3;
			int bloodCost = 1;
			int boneCost = 0;
			int energyCost = 0;
			List<CardMetaCategory> cardMetaCategories = new List<CardMetaCategory>
			{
				(CardMetaCategory)0,
				(CardMetaCategory)1
			};
			List<Tribe> list = new List<Tribe>();
			if (Chainloader.PluginInfos.ContainsKey("Lily.BOT"))
			{
				Plugin.Log.LogMessage((object)"Lily Totems found, Rock Mussel is now aquatic");
				list.Add(GuidManager.GetEnumValue<Tribe>("Lily.BOT", "aquatic"));
			}
			if (Chainloader.PluginInfos.ContainsKey("nevernamed.inscryption.sigils"))
			{
				Plugin.Log.LogMessage((object)"Never stuff found, Rock Mussel is now Crustacean");
				list.Add(GuidManager.GetEnumValue<Tribe>("nevernamed.inscryption.sigils", "Crustacean"));
			}
			List<Ability> abilities = new List<Ability> { CustomAbility1, CustomAbility2 };
			List<Trait> traits = new List<Trait>();
			Texture2D imageAsTexture = TextureHelper.GetImageAsTexture("re_Mussel.png", typeof(High_Tide).Assembly, (FilterMode)0);
			Texture2D imageAsTexture2 = TextureHelper.GetImageAsTexture("re_Mussel_e.png", typeof(High_Tide).Assembly, (FilterMode)0);
			CardInfo val = SigilUtils.CreateCardWithDefaultSettings("re_Mussel", displayName, attack, health, imageAsTexture, imageAsTexture2, cardMetaCategories, list, traits, abilities, null, bloodCost, boneCost, energyCost);
			val.description = description;
			CardManager.Add("re", val);
		}
	}
	public static class School_Fish
	{
		public static readonly Ability CustomAbility1 = GuidManager.GetEnumValue<Ability>("extraVoid.inscryption.voidSigils", "Schooling");

		public static void AddCard()
		{
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			string displayName = "Schooling Fish";
			string description = "A fish that likes to swim with fellow waterborne, increasing their numbers and strength.";
			int attack = 1;
			int health = 1;
			int bloodCost = 1;
			int boneCost = 0;
			int energyCost = 0;
			List<CardMetaCategory> cardMetaCategories = new List<CardMetaCategory>
			{
				(CardMetaCategory)0,
				(CardMetaCategory)1
			};
			List<Tribe> list = new List<Tribe>();
			if (Chainloader.PluginInfos.ContainsKey("Lily.BOT"))
			{
				Plugin.Log.LogMessage((object)"Lily Totems found, Schooling Fish is now aquatic");
				list.Add(GuidManager.GetEnumValue<Tribe>("Lily.BOT", "aquatic"));
			}
			List<Ability> abilities = new List<Ability>
			{
				CustomAbility1,
				(Ability)13
			};
			List<Trait> traits = new List<Trait>();
			Texture2D imageAsTexture = TextureHelper.GetImageAsTexture("re_Pogfish.png", typeof(High_Tide).Assembly, (FilterMode)0);
			Texture2D imageAsTexture2 = TextureHelper.GetImageAsTexture("re_Pogfish_e.png", typeof(High_Tide).Assembly, (FilterMode)0);
			CardInfo val = SigilUtils.CreateCardWithDefaultSettings("re_Schoolling_Fish", displayName, attack, health, imageAsTexture, imageAsTexture2, cardMetaCategories, list, traits, abilities, null, bloodCost, boneCost, energyCost);
			val.description = description;
			CardManager.Add("re", val);
		}
	}
	public static class Starfish
	{
		public static readonly Ability CustomAbility1 = GuidManager.GetEnumValue<Ability>("extraVoid.inscryption.voidSigils", "Sluggish");

		public static readonly Ability CustomAbility2 = GuidManager.GetEnumValue<Ability>("extraVoid.inscryption.voidSigils", "Regen 2");

		public static void AddCard()
		{
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			string displayName = "Beach Star";
			string description = "A starfish found in tidepools. They love to consume crab.";
			int attack = 1;
			int health = 4;
			int bloodCost = 2;
			int boneCost = 0;
			int energyCost = 0;
			List<CardMetaCategory> cardMetaCategories = new List<CardMetaCategory>
			{
				(CardMetaCategory)0,
				(CardMetaCategory)1
			};
			List<Tribe> list = new List<Tribe>();
			if (Chainloader.PluginInfos.ContainsKey("Lily.BOT"))
			{
				Plugin.Log.LogMessage((object)"Lily Totems found, Beach Star is now aquatic");
				list.Add(GuidManager.GetEnumValue<Tribe>("Lily.BOT", "aquatic"));
			}
			List<Ability> abilities = new List<Ability> { CustomAbility1, CustomAbility2 };
			List<Trait> traits = new List<Trait>();
			Texture2D imageAsTexture = TextureHelper.GetImageAsTexture("re_Starfish.png", typeof(High_Tide).Assembly, (FilterMode)0);
			Texture2D imageAsTexture2 = TextureHelper.GetImageAsTexture("re_Starfish_e.png", typeof(High_Tide).Assembly, (FilterMode)0);
			CardInfo val = SigilUtils.CreateCardWithDefaultSettings("re_Starfish", displayName, attack, health, imageAsTexture, imageAsTexture2, cardMetaCategories, list, traits, abilities, null, bloodCost, boneCost, energyCost);
			val.description = description;
			CardManager.Add("re", val);
		}
	}
	public static class Strong_Wind_1
	{
		public static readonly Ability CustomAbility2 = GuidManager.GetEnumValue<Ability>("extraVoid.inscryption.voidSigils", "Strong Wind");

		public static void AddCard()
		{
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Expected I4, but got Unknown
			string displayName = "Strong Wind";
			string description = "A strong wind forces fliers to land.";
			int attack = 0;
			int health = 1;
			int bloodCost = 0;
			int boneCost = 0;
			int energyCost = 0;
			List<CardMetaCategory> cardMetaCategories = new List<CardMetaCategory>();
			List<Tribe> tribes = new List<Tribe>();
			List<Ability> abilities = new List<Ability>
			{
				(Ability)23,
				CustomAbility2
			};
			List<Trait> traits = new List<Trait> { (Trait)12 };
			Texture2D imageAsTexture = TextureHelper.GetImageAsTexture("re_Strong_Wind.png", typeof(Strong_Wind_1).Assembly, (FilterMode)0);
			Texture2D imageAsTexture2 = TextureHelper.GetImageAsTexture("re_Strong_Wind.png", typeof(Strong_Wind_1).Assembly, (FilterMode)0);
			CardInfo val = SigilUtils.CreateCardWithDefaultSettings("re_Strong_Wind_1", displayName, attack, health, imageAsTexture, imageAsTexture2, cardMetaCategories, tribes, traits, abilities, null, bloodCost, boneCost, energyCost);
			val.description = description;
			CardExtensions.SetExtendedProperty(val, "void_dying_count", (object)1);
			CardExtensions.AddSpecialAbilities(val, (SpecialTriggeredAbility[])(object)new SpecialTriggeredAbility[1] { (SpecialTriggeredAbility)(int)DyingWind.specialAbility });
			CardExtensions.SetTerrain(val);
			CardManager.Add("re", val);
		}
	}
}