Decompiled source of STAWE v9999999999.9.1

STAWE.dll

Decompiled 2 weeks ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using DM;
using HarmonyLib;
using Landfall.TABS;
using SLMA;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("SW")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SW")]
[assembly: AssemblyCopyright("Copyright ©  2022")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("3a45c3cf-230c-4310-952f-0887d4266a22")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.1.1.1")]
[module: UnverifiableCode]
namespace STAWE
{
	public static class UManager
	{
		public static string modname;

		public static string modder;

		private static string com;

		static UManager()
		{
			modname = "adjust";
			modder = "Shogoho";
		}

		public static void SetRiders(UnitBlueprint me, UnitBlueprint[] riders)
		{
			s.SetField<UnitBlueprint>(me, "Riders", (object)riders);
		}

		public static void EditBlueprint(UnitBlueprint unit, LandfallContentDatabase db)
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0138: 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_00d2: Expected O, but got Unknown
			//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Expected O, but got Unknown
			//IL_010e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0114: Expected O, but got Unknown
			//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_025b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0261: Expected O, but got Unknown
			//IL_027c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0282: Expected O, but got Unknown
			//IL_029d: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a3: Expected O, but got Unknown
			//IL_02be: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c4: Expected O, but got Unknown
			//IL_02df: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e5: Expected O, but got Unknown
			//IL_0300: Unknown result type (might be due to invalid IL or missing references)
			//IL_0306: Expected O, but got Unknown
			//IL_0321: Unknown result type (might be due to invalid IL or missing references)
			//IL_0327: Expected O, but got Unknown
			//IL_0342: Unknown result type (might be due to invalid IL or missing references)
			//IL_0348: Expected O, but got Unknown
			//IL_0363: Unknown result type (might be due to invalid IL or missing references)
			//IL_0369: Expected O, but got Unknown
			//IL_0385: Unknown result type (might be due to invalid IL or missing references)
			//IL_038b: Expected O, but got Unknown
			//IL_03a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ad: Expected O, but got Unknown
			//IL_03c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_03cf: Expected O, but got Unknown
			//IL_0461: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0523: Unknown result type (might be due to invalid IL or missing references)
			//IL_058d: Unknown result type (might be due to invalid IL or missing references)
			//IL_05f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0656: Unknown result type (might be due to invalid IL or missing references)
			//IL_06d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0738: Unknown result type (might be due to invalid IL or missing references)
			//IL_08c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_07f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_07fd: Expected O, but got Unknown
			//IL_0818: Unknown result type (might be due to invalid IL or missing references)
			//IL_081e: Expected O, but got Unknown
			//IL_0839: Unknown result type (might be due to invalid IL or missing references)
			//IL_083f: Expected O, but got Unknown
			//IL_085a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0860: Expected O, but got Unknown
			//IL_087b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0881: Expected O, but got Unknown
			//IL_089c: Unknown result type (might be due to invalid IL or missing references)
			//IL_08a2: Expected O, but got Unknown
			//IL_0930: Unknown result type (might be due to invalid IL or missing references)
			//IL_09a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a12: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a83: Unknown result type (might be due to invalid IL or missing references)
			//IL_0af4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b82: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bd7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cc5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c59: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c5f: Expected O, but got Unknown
			//IL_0c7a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c80: Expected O, but got Unknown
			//IL_0c9b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ca1: Expected O, but got Unknown
			//IL_0d88: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d3b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d45: Expected O, but got Unknown
			//IL_0d5f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d69: Expected O, but got Unknown
			//IL_0e08: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e79: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ec6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f37: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fa8: Unknown result type (might be due to invalid IL or missing references)
			//IL_1019: Unknown result type (might be due to invalid IL or missing references)
			//IL_1091: Unknown result type (might be due to invalid IL or missing references)
			//IL_10f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_1132: Unknown result type (might be due to invalid IL or missing references)
			//IL_11f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_11a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_11af: Expected O, but got Unknown
			//IL_11ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_11d0: Expected O, but got Unknown
			//IL_1262: Unknown result type (might be due to invalid IL or missing references)
			//IL_12a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_1303: Unknown result type (might be due to invalid IL or missing references)
			//IL_146d: Unknown result type (might be due to invalid IL or missing references)
			//IL_139e: Unknown result type (might be due to invalid IL or missing references)
			//IL_13a4: Expected O, but got Unknown
			//IL_13bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_13c5: Expected O, but got Unknown
			//IL_13e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_13e6: Expected O, but got Unknown
			//IL_1401: Unknown result type (might be due to invalid IL or missing references)
			//IL_1407: Expected O, but got Unknown
			//IL_1422: Unknown result type (might be due to invalid IL or missing references)
			//IL_1428: Expected O, but got Unknown
			//IL_1443: Unknown result type (might be due to invalid IL or missing references)
			//IL_1449: Expected O, but got Unknown
			//IL_153e: Unknown result type (might be due to invalid IL or missing references)
			//IL_14d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_14d8: Expected O, but got Unknown
			//IL_14f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_14f9: Expected O, but got Unknown
			//IL_1514: Unknown result type (might be due to invalid IL or missing references)
			//IL_151a: Expected O, but got Unknown
			//IL_15a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_1619: Unknown result type (might be due to invalid IL or missing references)
			//IL_168a: Unknown result type (might be due to invalid IL or missing references)
			//IL_16d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_175a: Unknown result type (might be due to invalid IL or missing references)
			//IL_17b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_1827: Unknown result type (might be due to invalid IL or missing references)
			//IL_1886: Unknown result type (might be due to invalid IL or missing references)
			//IL_18f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_1980: Unknown result type (might be due to invalid IL or missing references)
			//IL_1956: Unknown result type (might be due to invalid IL or missing references)
			//IL_195c: Expected O, but got Unknown
			//IL_19ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_1a3b: Unknown result type (might be due to invalid IL or missing references)
			//IL_1a81: Unknown result type (might be due to invalid IL or missing references)
			//IL_1b0f: Unknown result type (might be due to invalid IL or missing references)
			//IL_1b5c: Unknown result type (might be due to invalid IL or missing references)
			//IL_1bb8: Unknown result type (might be due to invalid IL or missing references)
			//IL_1c02: Unknown result type (might be due to invalid IL or missing references)
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_SECRET_SHOGUN"]).Name)
			{
				unit.holdinigWithTwoHands = true;
				unit.health = 1780f;
				unit.targetingPriorityMultiplier *= 0.9f;
				unit.balanceForceMultiplier *= 1.25f;
				unit.balanceMultiplier *= 1.25f;
				unit.movementSpeedMuiltiplier *= 1.2f;
				unit.massMultiplier *= 5f;
				SLMATool.UnitCost(unit, 3500);
				unit.objectsToSpawnAsChildren = (GameObject[])(object)new GameObject[3]
				{
					(GameObject)SLMALoader.SDic["moves"]["Shogun_Dodge"],
					(GameObject)SLMALoader.SDic["moves"]["BlockShogun"],
					(GameObject)SLMALoader.SDic["moves"]["Move_Shogun_Slash"]
				};
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_SECRET_REDJADE"]).Name)
			{
				unit.health = 2200f;
				unit.damageMultiplier *= 3f;
				unit.attackSpeedMultiplier *= 1.1f;
				SLMATool.UnitCost(unit, 3500);
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_LEGACY_LEG_SUPERBOXER"]).Name)
			{
				unit.health = 6750f;
				unit.damageMultiplier *= 3f;
				unit.rangeMultiplier *= 5f;
				SLMATool.UnitCost(unit, 10000);
				unit.massMultiplier *= 50f;
				unit.movementSpeedMuiltiplier *= 1.75f;
				unit.targetingPriorityMultiplier *= 50f;
				unit.attackSpeedMultiplier *= -1f;
				unit.objectsToSpawnAsChildren = (GameObject[])(object)new GameObject[12]
				{
					(GameObject)SLMALoader.SDic["moves"]["BarrelArmor_ArmLeft"],
					(GameObject)SLMALoader.SDic["moves"]["BarrelArmor_ArmRight"],
					(GameObject)SLMALoader.SDic["moves"]["BarrelArmor_ElbowLeft"],
					(GameObject)SLMALoader.SDic["moves"]["BarrelArmor_ElbowRight"],
					(GameObject)SLMALoader.SDic["moves"]["BarrelArmor_Torso"],
					(GameObject)SLMALoader.SDic["moves"]["BarrelArmor_LegRight"],
					(GameObject)SLMALoader.SDic["moves"]["BarrelArmor_ArmLeft"],
					(GameObject)SLMALoader.SDic["moves"]["BarrelArmor_LegLeft"],
					(GameObject)SLMALoader.SDic["moves"]["BarrelArmor_Head"],
					(GameObject)SLMALoader.SDic["moves"]["BarrelArmor_KneeLeft"],
					(GameObject)SLMALoader.SDic["moves"]["BarrelArmor_Hip"],
					(GameObject)SLMALoader.SDic["moves"]["BarrelArmor_KneeRight"]
				};
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_LEGACY_LEG_SUPERPEASANT"]).Name)
			{
				unit.damageMultiplier = float.MaxValue;
				unit.movementSpeedMuiltiplier = 10f;
				SLMATool.UnitCost(unit, 9999999);
				unit.attackSpeedMultiplier *= -1f;
				unit.health = float.MaxValue;
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_ANCIENT_MINOTAUR"]).Name)
			{
				unit.damageMultiplier *= 1.2f;
				SLMATool.UnitCost(unit, 1600);
				unit.health = 2000f;
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_TRIBAL_MAMMOTH"]).Name)
			{
				unit.damageMultiplier *= 1.55f;
				unit.health = 3750f;
				unit.targetingPriorityMultiplier *= 2f;
				SLMATool.UnitCost(unit, 2200);
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_TRIBAL_THROWER_BOULDER"]).Name)
			{
				unit.damageMultiplier *= 1.2f;
				unit.health = 200f;
				SLMATool.UnitCost(unit, 200);
				unit.attackSpeedMultiplier *= 2.2f;
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_FANTASYEVIL_FANTASYASSASSIN"]).Name)
			{
				unit.damageMultiplier *= 0.5f;
				unit.health = 20f;
				unit.attackSpeedMultiplier *= 0.88f;
				SLMATool.UnitCost(unit, 200);
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_MEDIEVAL_KNIGHT"]).Name)
			{
				unit.damageMultiplier *= 1.8f;
				unit.healthMultiplier *= 1.8f;
				SLMATool.UnitCost(unit, 650);
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_SECRET_ULLR"]).Name)
			{
				unit.damageMultiplier *= 3.3f;
				SLMATool.UnitCost(unit, 3000);
				unit.rangeMultiplier *= 0.75f;
				unit.massMultiplier *= 3f;
				unit.attackSpeedMultiplier *= 1.5f;
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_SECRET_ARTEMIS"]).Name)
			{
				unit.damageMultiplier *= 1.4f;
				SLMATool.UnitCost(unit, 5500);
				unit.attackSpeedMultiplier *= 1.3f;
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_FANTASYEVIL_WARGLAIVE"]).Name)
			{
				unit.damageMultiplier *= 2.105f;
				unit.attackSpeedMultiplier *= -1f;
				unit.massMultiplier *= 1.5f;
				unit.movementSpeedMuiltiplier *= 1.2f;
				unit.balanceForceMultiplier *= 1.1f;
				unit.balanceMultiplier *= 1.1f;
				SLMATool.UnitCost(unit, 2000);
				unit.targetingPriorityMultiplier *= 0.9f;
				unit.objectsToSpawnAsChildren = (GameObject[])(object)new GameObject[6]
				{
					(GameObject)SLMALoader.SDic["moves"]["BarrelArmor_Head"],
					(GameObject)SLMALoader.SDic["moves"]["SwordArtParry_Piratequeen"],
					(GameObject)SLMALoader.SDic["moves"]["SkeletonGiant_Damage_R"],
					(GameObject)SLMALoader.SDic["moves"]["SkeletonGiant_Damage_L"],
					(GameObject)SLMALoader.SDic["moves"]["ProjectileDodge_Painter"],
					(GameObject)SLMALoader.SDic["moves"]["Sensei_Dodge"]
				};
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_FANTASYGOOD_GOOD_CLERIC"]).Name)
			{
				unit.damageMultiplier *= 1.5f;
				unit.attackSpeedMultiplier *= 1.25f;
				SLMATool.UnitCost(unit, 800);
				unit.health = 850f;
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_SECRET_WITCH_BROOM"]).Name)
			{
				unit.damageMultiplier *= 0.1f;
				unit.attackSpeedMultiplier *= 0.25f;
				unit.healthMultiplier *= 0.5f;
				SLMATool.UnitCost(unit, 1000);
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_FANTASYEVIL_DARKKING"]).Name)
			{
				unit.damageMultiplier *= 0.5f;
				unit.attackSpeedMultiplier *= 0.8f;
				unit.healthMultiplier *= 0.8f;
				SLMATool.UnitCost(unit, 3000);
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_SECRET_CHEERLEADER"]).Name)
			{
				unit.damageMultiplier *= 0f;
				unit.healthMultiplier *= 0.1f;
				SLMATool.UnitCost(unit, 500);
				unit.attackSpeedMultiplier *= 0.1f;
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_SECRET_MACESPINNER"]).Name)
			{
				unit.damageMultiplier *= 1.5f;
				unit.healthMultiplier *= 1.25f;
				SLMATool.UnitCost(unit, 500);
				unit.attackSpeedMultiplier *= 2f;
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_SECRET_THROWER_PRESENT"]).Name)
			{
				unit.damageMultiplier *= 0f;
				unit.maxSizeRandom *= 0.9f;
				SLMATool.UnitCost(unit, 500);
				unit.minSizeRandom *= 0.9f;
				unit.health = 1f;
				unit.targetingPriorityMultiplier *= 0.79f;
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_MEDIEVAL_SQUIRE"]).Name)
			{
				unit.damageMultiplier *= 1.1f;
				unit.health = 240f;
				SLMATool.UnitCost(unit, 100);
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_SECRET_SENSEI"]).Name)
			{
				unit.health = 490f;
				unit.sizeMultiplier *= 1.08f;
				unit.targetingPriorityMultiplier *= 0.8f;
				SLMATool.UnitCost(unit, 3500);
				unit.movementSpeedMuiltiplier *= 1.3f;
				unit.objectsToSpawnAsChildren = (GameObject[])(object)new GameObject[3]
				{
					(GameObject)SLMALoader.SDic["moves"]["Sensei_Dodge"],
					(GameObject)SLMALoader.SDic["moves"]["ProjectileDodge_Painter"],
					(GameObject)SLMALoader.SDic["moves"]["Move_Sensei_Tornado"]
				};
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_FANTASYGOOD_TIMENINJATRANSFORMED"]).Name)
			{
				unit.healthMultiplier *= 1.35f;
				unit.damageMultiplier *= 2f;
				unit.holdinigWithTwoHands = false;
				unit.healthMultiplier *= 1.1f;
				SLMATool.UnitCost(unit, 3000);
				unit.LeftWeapon = (GameObject)SLMALoader.SDic["weapons"]["TimeNinjaGauntlet"];
				unit.RightWeapon = (GameObject)SLMALoader.SDic["weapons"]["TimeNinjaGauntlet"];
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_SECRET_BALLOONER"]).Name)
			{
				unit.healthMultiplier *= 0.001f;
				unit.attackSpeedMultiplier *= 0.45f;
				unit.movementSpeedMuiltiplier *= 0.8f;
				SLMATool.UnitCost(unit, 120);
				unit.targetingPriorityMultiplier *= 1.45f;
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_SECRET_BOMBCANNON"]).Name)
			{
				unit.attackSpeedMultiplier *= 1.3f;
				unit.damageMultiplier *= 10f;
				unit.healthMultiplier *= 2f;
				SLMATool.UnitCost(unit, 1500);
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_PIRATE_CANNON"]).Name)
			{
				unit.attackSpeedMultiplier *= 0.79f;
				SLMATool.UnitCost(unit, 1000);
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_SECRET_VLAD"]).Name)
			{
				unit.attackSpeedMultiplier *= 1.12f;
				unit.damageMultiplier *= 1.295f;
				unit.healthMultiplier *= 2f;
				SLMATool.UnitCost(unit, 1800);
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_SECRET_CAVALRYONHORSE"]).Name)
			{
				unit.attackSpeedMultiplier *= 1f;
				unit.damageMultiplier *= 40f;
				SLMATool.UnitCost(unit, 1800);
				unit.healthMultiplier *= 3.5f;
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_SUBUNITS_WITCH"]).Name)
			{
				unit.attackSpeedMultiplier *= 0.3f;
				unit.damageMultiplier *= 0.15f;
				unit.healthMultiplier *= 0.25f;
				SLMATool.UnitCost(unit, 1000);
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_SUBUNITS_CAVALRY_KNIGHT"]).Name)
			{
				unit.attackSpeedMultiplier *= 1.1f;
				unit.damageMultiplier *= 3.571f;
				unit.targetingPriorityMultiplier *= 0.77f;
				unit.healthMultiplier *= 6f;
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_SUBUNITS_CHARIOTRIDER"]).Name)
			{
				unit.attackSpeedMultiplier *= 1.09f;
				unit.damageMultiplier *= 2f;
				unit.healthMultiplier *= 11f;
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_LEGACY_CHARIOT"]).Name)
			{
				SLMATool.UnitCost(unit, 1800);
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_SUBUNITS_HORSE_CHARIOT"]).Name)
			{
				unit.attackSpeedMultiplier *= 1.5f;
				unit.damageMultiplier *= 500f;
				SLMATool.UnitCost(unit, 1800);
				unit.healthMultiplier *= 3.8f;
				unit.objectsToSpawnAsChildren = (GameObject[])(object)new GameObject[2]
				{
					(GameObject)SLMALoader.SDic["moves"]["SkeletonGiant_Damage_R"],
					(GameObject)SLMALoader.SDic["moves"]["SkeletonGiant_Damage_L"]
				};
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_LEGACY_LEG_DARKP"]).Name)
			{
				unit.damageMultiplier = float.MaxValue;
				unit.movementSpeedMuiltiplier = 2f;
				SLMATool.UnitCost(unit, 9999999);
				unit.attackSpeedMultiplier *= 7.5f;
				unit.health = float.MaxValue;
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_SUBUNITS_DAVINCI"]).Name)
			{
				unit.healthMultiplier *= 7f;
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WESTERN_QUICKDRAW"]).Name)
			{
				unit.healthMultiplier *= 3.8f;
				unit.attackSpeedMultiplier *= 1.3f;
				SLMATool.UnitCost(unit, 1200);
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_VIKING_VALKYRIE"]).Name)
			{
				unit.healthMultiplier *= 3.15f;
				unit.attackSpeedMultiplier *= 1.1f;
				unit.damageMultiplier *= 1.5f;
				SLMATool.UnitCost(unit, 500);
				unit.targetingPriorityMultiplier *= 0.9f;
				unit.movementSpeedMuiltiplier *= 4f;
				unit.objectsToSpawnAsChildren = (GameObject[])(object)new GameObject[6]
				{
					(GameObject)SLMALoader.SDic["moves"]["SwordArtParry_Piratequeen"],
					(GameObject)SLMALoader.SDic["moves"]["ProjectileDodge_Quickdraw"],
					(GameObject)SLMALoader.SDic["moves"]["Sensei_Dodge"],
					(GameObject)SLMALoader.SDic["moves"]["SkeletonGiant_Damage_R"],
					(GameObject)SLMALoader.SDic["moves"]["SkeletonGiant_Damage_L"],
					(GameObject)SLMALoader.SDic["moves"]["Wings"]
				};
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_SECRET_TAEKWONDO"]).Name)
			{
				unit.healthMultiplier *= 3.3f;
				unit.targetingPriorityMultiplier *= 0.9f;
				SLMATool.UnitCost(unit, 400);
				unit.objectsToSpawnAsChildren = (GameObject[])(object)new GameObject[3]
				{
					(GameObject)SLMALoader.SDic["moves"]["Taekwondo_Damage_R"],
					(GameObject)SLMALoader.SDic["moves"]["JumpKick_Taekwondo_L"],
					(GameObject)SLMALoader.SDic["moves"]["Sensei_Dodge"]
				};
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_FANTASYEVIL_EVIL_CLERIC"]).Name)
			{
				unit.damageMultiplier *= 1.5f;
				unit.attackSpeedMultiplier *= 1.25f;
				SLMATool.UnitCost(unit, 800);
				unit.health = 850f;
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_ANCIENT_HOPLITE"]).Name)
			{
				unit.healthMultiplier *= 2.2f;
				unit.attackSpeedMultiplier *= 1.1f;
				unit.damageMultiplier *= 1.5f;
				SLMATool.UnitCost(unit, 180);
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_VIKING_BRAWLER"]).Name)
			{
				unit.healthMultiplier *= 2.2f;
				unit.attackSpeedMultiplier *= 1.1f;
				SLMATool.UnitCost(unit, 220);
				unit.damageMultiplier *= 1.5f;
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_TRIBAL_CHIEFTAIN"]).Name)
			{
				unit.healthMultiplier *= 1.7f;
				SLMATool.UnitCost(unit, 400);
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_TRIBAL_BONEMAGE"]).Name)
			{
				unit.attackSpeedMultiplier *= 3f;
				unit.healthMultiplier *= 1.2f;
				unit.damageMultiplier *= 2f;
				SLMATool.UnitCost(unit, 300);
				unit.rangeMultiplier *= 1.2f;
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_VIKING_ARCHER_ICE"]).Name)
			{
				unit.attackSpeedMultiplier *= 3f;
				unit.healthMultiplier *= 1.2f;
				SLMATool.UnitCost(unit, 160);
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_LEGACY_PEASANT"]).Name)
			{
				unit.attackSpeedMultiplier *= 0.75f;
				unit.healthMultiplier *= 0.2f;
				SLMATool.UnitCost(unit, 30);
				unit.targetingPriorityMultiplier *= 0.4f;
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_FANTASYGOOD_ELEPHANT"]).Name)
			{
				unit.healthMultiplier *= 1.75f;
				unit.targetingPriorityMultiplier *= 1.1f;
				SLMATool.UnitCost(unit, 2000);
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_FARMER_PITCHFORK"]).Name)
			{
				unit.attackSpeedMultiplier *= 1.2f;
				unit.healthMultiplier *= 1.4f;
				SLMATool.UnitCost(unit, 80);
				unit.targetingPriorityMultiplier *= 1.1f;
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_ASIA_NINJA"]).Name)
			{
				unit.attackSpeedMultiplier *= 1.8f;
				unit.healthMultiplier *= 1.3f;
				SLMATool.UnitCost(unit, 500);
				unit.objectsToSpawnAsChildren = (GameObject[])(object)new GameObject[1] { (GameObject)SLMALoader.SDic["moves"]["ProjectileDodge_Cool2"] };
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_HALLOWEEN_SKELETONWARRIOR"]).Name)
			{
				unit.healthMultiplier *= 1.4f;
				SLMATool.UnitCost(unit, 80);
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_FARMER_POTIONSELLER"]).Name)
			{
				unit.attackSpeedMultiplier *= 2f;
				unit.damageMultiplier *= 1.5f;
				SLMATool.UnitCost(unit, 340);
				unit.targetingPriorityMultiplier *= 1.2f;
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_SECRET_JESTER"]).Name)
			{
				unit.health = 225f;
				SLMATool.UnitCost(unit, 300);
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_SECRET_TEACHER"]).Name)
			{
				unit.health = 300f;
				unit.attackSpeedMultiplier *= -1f;
				unit.balanceForceMultiplier *= 1.15f;
				unit.balanceMultiplier *= 1.15f;
				unit.damageMultiplier *= 1.249f;
				SLMATool.UnitCost(unit, 200);
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_FARMER_HAY"]).Name)
			{
				unit.healthMultiplier *= 2f;
				SLMATool.UnitCost(unit, 140);
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_ANCIENT_SARISSA"]).Name)
			{
				unit.healthMultiplier *= 2.2f;
				unit.attackSpeedMultiplier *= 1.1f;
				SLMATool.UnitCost(unit, 120);
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_TRIBAL_PROTECTOR"]).Name)
			{
				unit.healthMultiplier *= 1.6f;
				SLMATool.UnitCost(unit, 80);
			}
			if (unit.Name == ((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_LEGACY_LEG_BOXER"]).Name)
			{
				unit.healthMultiplier *= 1.75f;
				SLMATool.UnitCost(unit, 450);
			}
		}

		public static void EditClothes(GameObject cloth, CharacterItem item, PropItemData data, Unit unit, int index, LandfallContentDatabase db)
		{
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Expected O, but got Unknown
			Debug.Log((object)"Hey");
			if (unit.unitBlueprint.Entity.Name == "unit name")
			{
				Renderer[] componentsInChildren = cloth.GetComponentsInChildren<Renderer>();
				for (int i = 0; i < componentsInChildren.Length; i++)
				{
					componentsInChildren[i].materials = (Material[])(object)new Material[1] { (Material)SLMALoader.SDic["materials"]["Glow_Neon_Green_143734"] };
				}
			}
		}

		public static void EditProjectiles(GameObject proj, ProjectileHit projhit, Unit unit, LandfallContentDatabase db)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			if (unit.unitBlueprint.Entity.Name == "unit name")
			{
				Transform transform = proj.transform;
				transform.localScale *= 3f;
			}
		}

		public static void EditCombatMoves(GameObject move, int index, Unit unit, LandfallContentDatabase db)
		{
		}

		public static void CodeAfterSpawn(Unit unit, LandfallContentDatabase db)
		{
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			if (unit.unitBlueprint.Entity.Name == "unit name")
			{
				Transform head = unit.data.head;
				head.localScale *= 2f;
			}
		}

		public static void Init(LandfallContentDatabase db)
		{
		}

		public static void EditWeapons(GameObject weapon, Team team, Unit unit, MeleeWeapon melee, RangeWeapon range, LandfallContentDatabase db)
		{
		}
	}
	[BepInPlugin("SW", "SW", "1.0.0")]
	internal class Loader : BaseUnityPlugin
	{
		private void Awake()
		{
			((MonoBehaviour)this).StartCoroutine("call");
		}

		private IEnumerator call()
		{
			yield return (object)new WaitUntil((Func<bool>)(() => (Object)(object)Object.FindObjectOfType<ServiceLocator>() != (Object)null));
			yield return (object)new WaitUntil((Func<bool>)(() => ServiceLocator.GetService<ISaveLoaderService>() != null));
			yield return (object)new WaitForSecondsRealtime(0.3f);
			SLMALoader.GetInstance();
			LandfallContentDatabase landfallContentDatabase = ContentDatabase.Instance().LandfallContentDatabase;
			UManager.Init(landfallContentDatabase);
			new Harmony(UManager.modname).PatchAll();
			GOSLMA.EditWeapons = ((GOSLMA.EditWeapons == null) ? new Action<GameObject, Team, Unit, MeleeWeapon, RangeWeapon, LandfallContentDatabase>(UManager.EditWeapons) : ((Action<GameObject, Team, Unit, MeleeWeapon, RangeWeapon, LandfallContentDatabase>)Delegate.Combine(new Action<GameObject, Team, Unit, MeleeWeapon, RangeWeapon, LandfallContentDatabase>(UManager.EditWeapons), GOSLMA.EditWeapons)));
			GOSLMA.EditClothes = ((GOSLMA.EditClothes == null) ? new Action<GameObject, CharacterItem, PropItemData, Unit, int, LandfallContentDatabase>(UManager.EditClothes) : ((Action<GameObject, CharacterItem, PropItemData, Unit, int, LandfallContentDatabase>)Delegate.Combine(new Action<GameObject, CharacterItem, PropItemData, Unit, int, LandfallContentDatabase>(UManager.EditClothes), GOSLMA.EditClothes)));
			GOSLMA.EditCombatMoves = ((GOSLMA.EditCombatMoves == null) ? new Action<GameObject, int, Unit, LandfallContentDatabase>(UManager.EditCombatMoves) : ((Action<GameObject, int, Unit, LandfallContentDatabase>)Delegate.Combine(new Action<GameObject, int, Unit, LandfallContentDatabase>(UManager.EditCombatMoves), GOSLMA.EditCombatMoves)));
			GOSLMA.CodeAfterSpawn = ((GOSLMA.CodeAfterSpawn == null) ? new Action<Unit, LandfallContentDatabase>(UManager.CodeAfterSpawn) : ((Action<Unit, LandfallContentDatabase>)Delegate.Combine(new Action<Unit, LandfallContentDatabase>(UManager.CodeAfterSpawn), GOSLMA.CodeAfterSpawn)));
			GOSLMA.EditProjectiles = ((GOSLMA.EditProjectiles == null) ? new Action<GameObject, ProjectileHit, Unit, LandfallContentDatabase>(UManager.EditProjectiles) : ((Action<GameObject, ProjectileHit, Unit, LandfallContentDatabase>)Delegate.Combine(new Action<GameObject, ProjectileHit, Unit, LandfallContentDatabase>(UManager.EditProjectiles), GOSLMA.EditProjectiles)));
			UnitBlueprint[] array = Resources.FindObjectsOfTypeAll<UnitBlueprint>();
			for (int i = 0; i < array.Length; i++)
			{
				UManager.EditBlueprint(array[i], landfallContentDatabase);
			}
			Debug.Log((object)("Loaded " + UManager.modname + " Successfully"));
			Debug.Log((object)(UManager.modname + "strengtheningandweakening"));
			Debug.Log((object)(UManager.modder + "aaa"));
		}
	}
}
public class Item : MonoBehaviour
{
	public enum kind
	{
		Weapon,
		Cloth,
		Skill,
		Unit,
		Projectile,
		Other
	}

	public string name;

	public kind Kind;
}
namespace STAWE
{
	public class MyModItems : MonoBehaviour
	{
		private static Dictionary<string, Item> items;

		private static MyModItems instance { get; set; }

		public static MyModItems GetInstance()
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)instance == (Object)null)
			{
				instance = new GameObject("MyModItems").AddComponent<MyModItems>();
				Object.DontDestroyOnLoad((Object)(object)instance);
			}
			return instance;
		}

		public void AddItem(Item item)
		{
			items.Add(item.name, item);
		}

		public Item GetItem(string name)
		{
			Item value = new Item
			{
				name = null,
				Kind = Item.kind.Other
			};
			items.TryGetValue(name, out value);
			return value;
		}
	}
}