Decompiled source of Bomber v1.4.0

Bomber.dll

Decompiled 3 weeks ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using EntityStates;
using EntityStates.CaptainSupplyDrop;
using EntityStates.Commando;
using EntityStates.GolemMonster;
using EntityStates.Huntress;
using IL.RoR2;
using KinematicCharacterController;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using On.RoR2;
using On.RoR2.Projectile;
using R2API;
using R2API.Utils;
using Rewired.ComponentControls.Effects;
using RoR2;
using RoR2.Achievements;
using RoR2.Projectile;
using RoR2.Skills;
using RoR2.UI;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;
using UnityEngine.Rendering;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("Bomber")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("Bomber")]
[assembly: AssemblyTitle("Bomber")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace Bomber;

internal class BomberCrosshairController : MonoBehaviour
{
	internal static float bombStacks;

	internal static GameObject crosshairStack1;

	internal static GameObject crosshairStack2;

	internal static GameObject crosshairStack3;

	internal static GameObject crosshairStack4;

	internal static GameObject crosshairStack5;

	internal static GameObject crosshairStack6;

	public HudElement hudElement { get; private set; }

	private void Awake()
	{
		hudElement = ((Component)this).GetComponent<HudElement>();
		crosshairStack1 = ((Component)((Component)this).gameObject.transform.Find("BomberCrosshairStack1")).gameObject;
		crosshairStack2 = ((Component)((Component)this).gameObject.transform.Find("BomberCrosshairStack2")).gameObject;
		crosshairStack3 = ((Component)((Component)this).gameObject.transform.Find("BomberCrosshairStack3")).gameObject;
		crosshairStack4 = ((Component)((Component)this).gameObject.transform.Find("BomberCrosshairStack4")).gameObject;
		crosshairStack5 = ((Component)((Component)this).gameObject.transform.Find("BomberCrosshairStack5")).gameObject;
		crosshairStack6 = ((Component)((Component)this).gameObject.transform.Find("BomberCrosshairStack6")).gameObject;
	}

	private void ChangeColor()
	{
	}

	private void Update()
	{
		bombStacks = ((Component)hudElement.targetCharacterBody).GetComponent<StickyBombController>().BombCount();
		if (bombStacks >= 1f)
		{
			crosshairStack1.SetActive(true);
		}
		else
		{
			crosshairStack1.SetActive(false);
		}
		if (bombStacks >= 2f)
		{
			crosshairStack2.SetActive(true);
		}
		else
		{
			crosshairStack2.SetActive(false);
		}
		if (bombStacks >= 3f)
		{
			crosshairStack3.SetActive(true);
		}
		else
		{
			crosshairStack3.SetActive(false);
		}
		if (bombStacks >= 4f)
		{
			crosshairStack4.SetActive(true);
		}
		else
		{
			crosshairStack4.SetActive(false);
		}
		if (bombStacks >= 5f)
		{
			crosshairStack5.SetActive(true);
		}
		else
		{
			crosshairStack5.SetActive(false);
		}
		if (bombStacks >= 6f)
		{
			crosshairStack6.SetActive(true);
		}
		else
		{
			crosshairStack6.SetActive(false);
		}
	}
}
internal class BounceBehaviour : MonoBehaviour
{
	private GameObject owner;

	private CharacterBody body;

	private SphereSearch sphereSearch = new SphereSearch();

	private float force = 12000f;

	private float radius = 12f;

	private void Start()
	{
		ProjectileController component = ((Component)this).GetComponent<ProjectileController>();
		if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.owner))
		{
			owner = component.owner;
			body = owner.GetComponent<CharacterBody>();
		}
	}

	private void OnDisable()
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Expected O, but got Unknown
		//IL_0018: 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_003e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0043: Unknown result type (might be due to invalid IL or missing references)
		//IL_0054: Unknown result type (might be due to invalid IL or missing references)
		//IL_0059: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
		//IL_0104: Unknown result type (might be due to invalid IL or missing references)
		//IL_0109: Unknown result type (might be due to invalid IL or missing references)
		//IL_010c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0117: Unknown result type (might be due to invalid IL or missing references)
		//IL_0154: Unknown result type (might be due to invalid IL or missing references)
		//IL_015a: Invalid comparison between Unknown and I4
		//IL_0180: Unknown result type (might be due to invalid IL or missing references)
		//IL_0185: 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_01a8: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b0: 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_01c0: Unknown result type (might be due to invalid IL or missing references)
		//IL_01cc: 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_01e5: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ea: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ef: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f4: Unknown result type (might be due to invalid IL or missing references)
		//IL_0201: Expected O, but got Unknown
		sphereSearch = new SphereSearch();
		sphereSearch.origin = ((Component)this).transform.position;
		sphereSearch.radius = radius;
		sphereSearch.mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask;
		sphereSearch.origin = ((Component)this).transform.position;
		HurtBox[] hurtBoxes = sphereSearch.RefreshCandidates().FilterCandidatesByDistinctHurtBoxEntities().OrderCandidatesByDistance()
			.FilterCandidatesByDistinctHurtBoxEntities()
			.GetHurtBoxes();
		for (int i = 0; i < hurtBoxes.Length; i++)
		{
			if (!Object.op_Implicit((Object)(object)hurtBoxes[i]) || !Object.op_Implicit((Object)(object)hurtBoxes[i].healthComponent) || !Object.op_Implicit((Object)(object)hurtBoxes[i].healthComponent.body) || !Object.op_Implicit((Object)(object)hurtBoxes[i].healthComponent.body.characterMotor))
			{
				continue;
			}
			CharacterMotor characterMotor = hurtBoxes[i].healthComponent.body.characterMotor;
			Vector3 val = hurtBoxes[i].healthComponent.body.corePosition - ((Component)this).transform.position;
			characterMotor.ApplyForce(((Vector3)(ref val)).normalized * force, true, false);
			if (((Object)hurtBoxes[i].healthComponent.body).name.Contains("DragonBomberBody") || (int)hurtBoxes[i].healthComponent.body.teamComponent.teamIndex != 1)
			{
				if (!NetworkServer.active)
				{
					break;
				}
				DamageInfo val2 = new DamageInfo
				{
					attacker = owner,
					damage = body.damage * 4f,
					damageColorIndex = (DamageColorIndex)10,
					damageType = DamageTypeCombo.op_Implicit((DamageType)131072),
					inflictor = owner,
					position = hurtBoxes[i].healthComponent.body.corePosition - ((Component)this).transform.position,
					procCoefficient = 0f
				};
				hurtBoxes[i].healthComponent.TakeDamage(val2);
			}
		}
	}
}
internal class StickyBombBonusController : MonoBehaviour
{
	public float targetMaxHealth;

	public void DetonateBonus(float num)
	{
		//IL_0028: 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)
		//IL_0039: Unknown result type (might be due to invalid IL or missing references)
		//IL_0045: Unknown result type (might be due to invalid IL or missing references)
		//IL_004c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0051: Unknown result type (might be due to invalid IL or missing references)
		//IL_0056: Unknown result type (might be due to invalid IL or missing references)
		//IL_0070: Unknown result type (might be due to invalid IL or missing references)
		//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_008c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0091: Unknown result type (might be due to invalid IL or missing references)
		//IL_009c: 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)
		//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00aa: 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_00b7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
		//IL_00be: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
		if (NetworkServer.active)
		{
			ProjectileController component = ((Component)this).gameObject.GetComponent<ProjectileController>();
			if (Object.op_Implicit((Object)(object)component))
			{
				new BlastAttack
				{
					attacker = component.owner,
					inflictor = component.owner,
					teamIndex = TeamComponent.GetObjectTeam(component.owner),
					baseDamage = targetMaxHealth * (0.005f + 0.0013f * num),
					baseForce = 0f,
					position = ((Component)this).gameObject.transform.position,
					radius = 10f,
					attackerFiltering = (AttackerFiltering)2,
					crit = false,
					procCoefficient = 0f,
					damageColorIndex = (DamageColorIndex)5,
					falloffModel = (FalloffModel)2
				}.Fire();
			}
		}
	}
}
internal class StickyBombController : MonoBehaviour
{
	public List<GameObject> BombList;

	public List<GameObject> PoppyBombList;

	public List<GameObject> PulseBombList;

	internal static void Awake()
	{
	}

	public void DetonatePoppyBomb()
	{
		for (int i = 0; i < PulseBombList.Count; i++)
		{
			if ((Object)(object)PulseBombList[i] != (Object)null)
			{
				PulseBombList[i].GetComponent<ProjectileExplosion>().Detonate();
				PulseBombList.RemoveAt(i);
			}
		}
		for (int j = 0; j < PoppyBombList.Count; j++)
		{
			if ((Object)(object)PoppyBombList[j] != (Object)null)
			{
				PoppyBombList[j].GetComponent<ProjectileExplosion>().Detonate();
				PoppyBombList.RemoveAt(j);
			}
		}
	}

	public void Detonate(float num)
	{
		for (int i = 0; i < BombList.Count; i++)
		{
			if ((Object)(object)BombList[i] != (Object)null)
			{
				BombList[i].GetComponent<ProjectileExplosion>().Detonate();
				StickyBombBonusController component = BombList[i].GetComponent<StickyBombBonusController>();
				if (Object.op_Implicit((Object)(object)component))
				{
					component.DetonateBonus(num);
				}
			}
		}
		BombList.Clear();
	}

	public void DetonateIncreasedDamage(float lul, float num)
	{
		for (int i = 0; i < BombList.Count; i++)
		{
			if ((Object)(object)BombList[i] != (Object)null)
			{
				BombList[i].GetComponent<ProjectileExplosion>().blastDamageCoefficient = lul;
				BombList[i].GetComponent<ProjectileExplosion>().Detonate();
				StickyBombBonusController component = BombList[i].GetComponent<StickyBombBonusController>();
				if (Object.op_Implicit((Object)(object)component))
				{
					component.DetonateBonus(num);
				}
			}
		}
		BombList.Clear();
	}

	public float BombCount()
	{
		int num = 0;
		for (int i = 0; i < BombList.Count; i++)
		{
			if ((Object)(object)BombList[i] != (Object)null)
			{
				num++;
			}
		}
		return num;
	}
}
[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.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("com.Dragonyck.Bomber", "Bomber", "1.4.0")]
[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
public class Bomber : BaseUnityPlugin
{
	public const string MODUID = "com.Dragonyck.Bomber";

	public static GameObject characterPrefab;

	public GameObject characterDisplay;

	public GameObject doppelganger;

	public static ConfigEntry<float> crosshairSize;

	public static ConfigEntry<bool> skillIconSprite;

	private static readonly Color characterColor = new Color(0.7f, 0.7f, 0.9f);

	private void Awake()
	{
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		//IL_0026: Unknown result type (might be due to invalid IL or missing references)
		//IL_0030: Expected O, but got Unknown
		//IL_0030: Expected O, but got Unknown
		//IL_0045: Unknown result type (might be due to invalid IL or missing references)
		//IL_0056: Unknown result type (might be due to invalid IL or missing references)
		//IL_0060: Expected O, but got Unknown
		//IL_0060: Expected O, but got Unknown
		crosshairSize = ((BaseUnityPlugin)this).Config.Bind<float>(new ConfigDefinition("Crosshair Size", "Size"), 60f, new ConfigDescription("Changes the size of the crosshair.", (AcceptableValueBase)null, Array.Empty<object>()));
		skillIconSprite = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Enable Old Skill Icon Sprites", "Enable"), false, new ConfigDescription("Enable the old skill icon sprites.", (AcceptableValueBase)null, Array.Empty<object>()));
		Assets.PopulateAssets();
		Achievements.RegisterUnlockables();
		Prefabs.CreatePrefabs();
		Equipment.AddEquip();
		CreatePrefab();
		RegisterStates();
		RegisterCharacter();
		CreateDoppelganger();
		Hook.Hooks();
		if (!ModCompat.EmoteAPIEnabled)
		{
		}
	}

	private static GameObject CreateModel(GameObject main)
	{
		Object.Destroy((Object)(object)((Component)main.transform.Find("ModelBase")).gameObject);
		Object.Destroy((Object)(object)((Component)main.transform.Find("CameraPivot")).gameObject);
		Object.Destroy((Object)(object)((Component)main.transform.Find("AimOrigin")).gameObject);
		return Assets.MainAssetBundle.LoadAsset<GameObject>("bomber");
	}

	internal static void CreatePrefab()
	{
		//IL_0047: Unknown result type (might be due to invalid IL or missing references)
		//IL_004d: Expected O, but got Unknown
		//IL_0078: 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_00a9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bf: Expected O, but got Unknown
		//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
		//IL_0108: Unknown result type (might be due to invalid IL or missing references)
		//IL_0118: Unknown result type (might be due to invalid IL or missing references)
		//IL_011e: Expected O, but got Unknown
		//IL_0145: Unknown result type (might be due to invalid IL or missing references)
		//IL_0156: Unknown result type (might be due to invalid IL or missing references)
		//IL_0167: Unknown result type (might be due to invalid IL or missing references)
		//IL_018a: 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_01b3: Unknown result type (might be due to invalid IL or missing references)
		//IL_01cc: Unknown result type (might be due to invalid IL or missing references)
		//IL_01d1: 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_0386: Unknown result type (might be due to invalid IL or missing references)
		//IL_03c2: Unknown result type (might be due to invalid IL or missing references)
		//IL_03c7: Unknown result type (might be due to invalid IL or missing references)
		//IL_042b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0430: Unknown result type (might be due to invalid IL or missing references)
		//IL_045c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0461: Unknown result type (might be due to invalid IL or missing references)
		//IL_04e6: Unknown result type (might be due to invalid IL or missing references)
		//IL_050e: Unknown result type (might be due to invalid IL or missing references)
		//IL_051b: Unknown result type (might be due to invalid IL or missing references)
		//IL_051d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0526: Unknown result type (might be due to invalid IL or missing references)
		//IL_0564: Unknown result type (might be due to invalid IL or missing references)
		//IL_0571: Unknown result type (might be due to invalid IL or missing references)
		//IL_0573: Unknown result type (might be due to invalid IL or missing references)
		//IL_057c: Unknown result type (might be due to invalid IL or missing references)
		//IL_05ba: Unknown result type (might be due to invalid IL or missing references)
		//IL_05c7: Unknown result type (might be due to invalid IL or missing references)
		//IL_05c9: Unknown result type (might be due to invalid IL or missing references)
		//IL_05d2: Unknown result type (might be due to invalid IL or missing references)
		//IL_0610: Unknown result type (might be due to invalid IL or missing references)
		//IL_061d: Unknown result type (might be due to invalid IL or missing references)
		//IL_061f: Unknown result type (might be due to invalid IL or missing references)
		//IL_06cf: Unknown result type (might be due to invalid IL or missing references)
		//IL_0707: Unknown result type (might be due to invalid IL or missing references)
		//IL_072d: Unknown result type (might be due to invalid IL or missing references)
		//IL_072f: 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_075e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0760: Unknown result type (might be due to invalid IL or missing references)
		//IL_0769: Unknown result type (might be due to invalid IL or missing references)
		//IL_078f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0791: Unknown result type (might be due to invalid IL or missing references)
		//IL_079d: Unknown result type (might be due to invalid IL or missing references)
		//IL_07b1: Unknown result type (might be due to invalid IL or missing references)
		//IL_07c5: Unknown result type (might be due to invalid IL or missing references)
		//IL_07d9: Unknown result type (might be due to invalid IL or missing references)
		//IL_07fd: Unknown result type (might be due to invalid IL or missing references)
		//IL_081a: Unknown result type (might be due to invalid IL or missing references)
		//IL_081c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0825: Unknown result type (might be due to invalid IL or missing references)
		//IL_0861: Unknown result type (might be due to invalid IL or missing references)
		//IL_0863: Unknown result type (might be due to invalid IL or missing references)
		//IL_086c: Unknown result type (might be due to invalid IL or missing references)
		//IL_08a8: Unknown result type (might be due to invalid IL or missing references)
		//IL_08aa: Unknown result type (might be due to invalid IL or missing references)
		//IL_08b3: Unknown result type (might be due to invalid IL or missing references)
		//IL_08ef: Unknown result type (might be due to invalid IL or missing references)
		//IL_08f1: Unknown result type (might be due to invalid IL or missing references)
		//IL_0936: Unknown result type (might be due to invalid IL or missing references)
		//IL_0976: Unknown result type (might be due to invalid IL or missing references)
		//IL_0994: Unknown result type (might be due to invalid IL or missing references)
		//IL_0a8f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0a9a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0ad5: Unknown result type (might be due to invalid IL or missing references)
		//IL_0ae9: Unknown result type (might be due to invalid IL or missing references)
		//IL_0afd: Unknown result type (might be due to invalid IL or missing references)
		//IL_0b11: Unknown result type (might be due to invalid IL or missing references)
		//IL_0b2c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0b51: Unknown result type (might be due to invalid IL or missing references)
		//IL_0b53: Unknown result type (might be due to invalid IL or missing references)
		//IL_0b5c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0b8c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0b8e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0bd3: Unknown result type (might be due to invalid IL or missing references)
		//IL_0a0a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0a37: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c0a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0c28: Unknown result type (might be due to invalid IL or missing references)
		//IL_0cb0: Unknown result type (might be due to invalid IL or missing references)
		//IL_0fb0: Unknown result type (might be due to invalid IL or missing references)
		//IL_102f: Unknown result type (might be due to invalid IL or missing references)
		//IL_108e: Unknown result type (might be due to invalid IL or missing references)
		//IL_10a5: Unknown result type (might be due to invalid IL or missing references)
		//IL_10aa: Unknown result type (might be due to invalid IL or missing references)
		//IL_10b2: Unknown result type (might be due to invalid IL or missing references)
		//IL_1104: Unknown result type (might be due to invalid IL or missing references)
		//IL_11ca: Unknown result type (might be due to invalid IL or missing references)
		//IL_11dc: Unknown result type (might be due to invalid IL or missing references)
		//IL_1318: Unknown result type (might be due to invalid IL or missing references)
		//IL_131d: Unknown result type (might be due to invalid IL or missing references)
		//IL_134b: Unknown result type (might be due to invalid IL or missing references)
		//IL_1350: Unknown result type (might be due to invalid IL or missing references)
		//IL_1379: Unknown result type (might be due to invalid IL or missing references)
		//IL_137e: Unknown result type (might be due to invalid IL or missing references)
		//IL_138f: Unknown result type (might be due to invalid IL or missing references)
		//IL_1394: Unknown result type (might be due to invalid IL or missing references)
		//IL_13bd: Unknown result type (might be due to invalid IL or missing references)
		//IL_13c2: Unknown result type (might be due to invalid IL or missing references)
		//IL_13d3: Unknown result type (might be due to invalid IL or missing references)
		//IL_13d8: Unknown result type (might be due to invalid IL or missing references)
		characterPrefab = PrefabAPI.InstantiateClone(Prefabs.Load<GameObject>("RoR2/Base/Commando/CommandoBody.prefab"), "DragonBomberBody", true);
		characterPrefab.GetComponent<NetworkIdentity>().localPlayerAuthority = true;
		characterPrefab.AddComponent<StickyBombController>();
		GameObject val = CreateModel(characterPrefab);
		GameObject val2 = new GameObject("ModelBase");
		val2.transform.parent = characterPrefab.transform;
		val2.transform.localPosition = new Vector3(0f, -0.94f, 0f);
		val2.transform.localRotation = Quaternion.identity;
		val2.transform.localScale = new Vector3(1f, 1f, 1f);
		GameObject val3 = new GameObject("CameraPivot");
		val3.transform.parent = val2.transform;
		val3.transform.localPosition = new Vector3(0f, 1.6f, 0f);
		val3.transform.localRotation = Quaternion.identity;
		val3.transform.localScale = Vector3.one;
		GameObject val4 = new GameObject("AimOrigin");
		val4.transform.parent = val2.transform;
		val4.transform.localPosition = new Vector3(0f, 2f, 0f);
		val4.transform.localRotation = Quaternion.identity;
		val4.transform.localScale = Vector3.one;
		Transform transform = val.transform;
		transform.parent = val2.transform;
		transform.localPosition = Vector3.zero;
		transform.localScale = new Vector3(1f, 1f, 1f);
		transform.localRotation = Quaternion.identity;
		CharacterDirection component = characterPrefab.GetComponent<CharacterDirection>();
		component.moveVector = Vector3.zero;
		component.targetTransform = val2.transform;
		component.overrideAnimatorForwardTransform = null;
		component.rootMotionAccumulator = null;
		component.modelAnimator = val.GetComponentInChildren<Animator>();
		component.driveFromRootRotation = false;
		component.turnSpeed = 720f;
		CharacterBody component2 = characterPrefab.GetComponent<CharacterBody>();
		((Object)component2).name = "DragonBomberBody";
		component2.baseNameToken = "BOMBER_NAME";
		component2.subtitleNameToken = "BOMBER_SUBTITLE";
		component2.bodyFlags = (BodyFlags)16;
		component2.rootMotionInMainState = false;
		component2.mainRootSpeed = 0f;
		component2.baseMaxHealth = 100f;
		component2.levelMaxHealth = 35f;
		component2.baseRegen = 1f;
		component2.levelRegen = 0.33f;
		component2.baseMaxShield = 0f;
		component2.levelMaxShield = 0f;
		component2.baseMoveSpeed = 7f;
		component2.levelMoveSpeed = 0f;
		component2.baseAcceleration = 110f;
		component2.baseJumpPower = 15f;
		component2.levelJumpPower = 0f;
		component2.baseDamage = 12f;
		component2.levelDamage = 2.4f;
		component2.baseAttackSpeed = 1f;
		component2.levelAttackSpeed = 0f;
		component2.baseCrit = 1f;
		component2.levelCrit = 0f;
		component2.baseArmor = 0f;
		component2.levelArmor = 0f;
		component2.baseJumpCount = 1;
		component2.sprintingSpeedMultiplier = 1.45f;
		component2.wasLucky = false;
		component2._defaultCrosshairPrefab = Prefabs.Crosshair;
		component2.hideCrosshair = false;
		component2.aimOriginTransform = val4.transform;
		component2.hullClassification = (HullClassification)0;
		component2.portraitIcon = Assets.charPortrait;
		component2.isChampion = false;
		component2.currentVehicle = null;
		component2.skinIndex = 0u;
		component2.preferredPodPrefab = Prefabs.Load<GameObject>("RoR2/Base/Toolbot/RoboCratePod.prefab");
		component2.bodyColor = characterColor;
		CharacterMotor component3 = characterPrefab.GetComponent<CharacterMotor>();
		component3.walkSpeedPenaltyCoefficient = 1f;
		component3.characterDirection = component;
		component3.muteWalkMotion = false;
		component3.mass = 160f;
		component3.airControl = 0.25f;
		component3.disableAirControlUntilCollision = false;
		component3.generateParametersOnAwake = true;
		InputBankTest component4 = characterPrefab.GetComponent<InputBankTest>();
		component4.moveVector = Vector3.zero;
		CameraTargetParams component5 = characterPrefab.GetComponent<CameraTargetParams>();
		component5.cameraParams = Prefabs.Load<CharacterCameraParams>("RoR2/Base/Common/ccpStandard.asset");
		component5.cameraPivotTransform = null;
		component5.recoil = Vector2.zero;
		component5.dontRaycastToPivot = false;
		ModelLocator component6 = characterPrefab.GetComponent<ModelLocator>();
		component6.modelTransform = transform;
		component6.modelBaseTransform = val2.transform;
		component6.dontReleaseModelOnDeath = false;
		component6.autoUpdateModelTransform = true;
		component6.dontDetatchFromParent = false;
		component6.noCorpse = false;
		component6.normalizeToFloor = false;
		component6.preserveModel = false;
		ChildLocator component7 = val.GetComponent<ChildLocator>();
		CharacterModel val5 = val.AddComponent<CharacterModel>();
		val5.body = component2;
		val5.baseRendererInfos = (RendererInfo[])(object)new RendererInfo[4]
		{
			new RendererInfo
			{
				defaultMaterial = ((Renderer)val.GetComponentInChildren<SkinnedMeshRenderer>()).material,
				renderer = (Renderer)(object)val.GetComponentInChildren<SkinnedMeshRenderer>(),
				defaultShadowCastingMode = (ShadowCastingMode)1,
				ignoreOverlays = false
			},
			new RendererInfo
			{
				renderer = (Renderer)(object)((Component)component7.FindChild("Head")).GetComponentInChildren<SkinnedMeshRenderer>(),
				defaultMaterial = ((Renderer)((Component)component7.FindChild("Head")).GetComponentInChildren<SkinnedMeshRenderer>()).material,
				defaultShadowCastingMode = (ShadowCastingMode)1,
				ignoreOverlays = false
			},
			new RendererInfo
			{
				renderer = (Renderer)(object)((Component)component7.FindChild("Wheel")).GetComponentInChildren<SkinnedMeshRenderer>(),
				defaultMaterial = ((Renderer)((Component)component7.FindChild("Wheel")).GetComponentInChildren<SkinnedMeshRenderer>()).material,
				defaultShadowCastingMode = (ShadowCastingMode)1,
				ignoreOverlays = false
			},
			new RendererInfo
			{
				renderer = (Renderer)(object)((Component)component7.FindChild("StickyBombs")).GetComponentInChildren<SkinnedMeshRenderer>(),
				defaultMaterial = ((Renderer)((Component)component7.FindChild("StickyBombs")).GetComponentInChildren<SkinnedMeshRenderer>()).material,
				defaultShadowCastingMode = (ShadowCastingMode)1,
				ignoreOverlays = false
			}
		};
		val5.autoPopulateLightInfos = true;
		val5.invisibilityCount = 0;
		val5.temporaryOverlays = new List<TemporaryOverlayInstance>();
		Reflection.SetFieldValue<SkinnedMeshRenderer>((object)val5, "mainSkinnedMeshRenderer", ((Component)val5.baseRendererInfos[0].renderer).gameObject.GetComponent<SkinnedMeshRenderer>());
		GameObject gameObject = ((Component)characterPrefab.GetComponentInChildren<ModelLocator>().modelTransform).gameObject;
		CharacterModel component8 = gameObject.GetComponent<CharacterModel>();
		ModelSkinController val6 = gameObject.AddComponent<ModelSkinController>();
		ChildLocator component9 = gameObject.GetComponent<ChildLocator>();
		SkinnedMeshRenderer fieldValue = Reflection.GetFieldValue<SkinnedMeshRenderer>((object)component8, "mainSkinnedMeshRenderer");
		LanguageAPI.Add("BOMBERBODY_DEFAULT_SKIN_NAME", "Default");
		LanguageAPI.Add("TBOMBERBODY_MASTERY_SKIN_NAME", "Solus");
		SkinDefInfo val7 = default(SkinDefInfo);
		val7.BaseSkins = Array.Empty<SkinDef>();
		val7.MinionSkinReplacements = (MinionSkinReplacement[])(object)new MinionSkinReplacement[0];
		val7.ProjectileGhostReplacements = (ProjectileGhostReplacement[])(object)new ProjectileGhostReplacement[0];
		val7.GameObjectActivations = (GameObjectActivation[])(object)new GameObjectActivation[3]
		{
			new GameObjectActivation
			{
				gameObject = ((Component)component9.FindChild("Head")).gameObject,
				shouldActivate = true
			},
			new GameObjectActivation
			{
				gameObject = ((Component)component9.FindChild("Wheel")).gameObject,
				shouldActivate = true
			},
			new GameObjectActivation
			{
				gameObject = ((Component)component9.FindChild("StickyBombs")).gameObject,
				shouldActivate = true
			}
		};
		val7.Icon = Skins.CreateSkinIcon(Color.white, new Color(29f / 51f, 0.6745098f, 69f / 85f), new Color(0.6784314f, 2f / 3f, 0.7098039f), new Color(0.1490196f, 0.172549f, 0.2352941f));
		RendererInfo[] baseRendererInfos = val5.baseRendererInfos;
		val7.MeshReplacements = (MeshReplacement[])(object)new MeshReplacement[4]
		{
			new MeshReplacement
			{
				renderer = (Renderer)(object)fieldValue,
				mesh = fieldValue.sharedMesh
			},
			new MeshReplacement
			{
				renderer = baseRendererInfos[1].renderer,
				mesh = ((Component)component9.FindChild("Head")).gameObject.GetComponent<SkinnedMeshRenderer>().sharedMesh
			},
			new MeshReplacement
			{
				renderer = baseRendererInfos[2].renderer,
				mesh = ((Component)component9.FindChild("Wheel")).gameObject.GetComponent<SkinnedMeshRenderer>().sharedMesh
			},
			new MeshReplacement
			{
				renderer = baseRendererInfos[3].renderer,
				mesh = ((Component)component9.FindChild("StickyBombs")).gameObject.GetComponent<SkinnedMeshRenderer>().sharedMesh
			}
		};
		val7.Name = "BOMBERBODY_DEFAULT_SKIN_NAME";
		val7.NameToken = "BOMBERBODY_DEFAULT_SKIN_NAME";
		val7.RendererInfos = component8.baseRendererInfos;
		val7.RootObject = gameObject;
		val7.UnlockableDef = Achievements.bomberUnlockDef;
		RendererInfo[] rendererInfos = val7.RendererInfos;
		RendererInfo[] array = (RendererInfo[])(object)new RendererInfo[rendererInfos.Length];
		rendererInfos.CopyTo(array, 0);
		Material defaultMaterial = array[0].defaultMaterial;
		bool flag = Object.op_Implicit((Object)(object)defaultMaterial);
		if (flag)
		{
			defaultMaterial = Utils.InstantiateMaterial(Color.white, Assets.MainAssetBundle.LoadAsset<Material>("bomber").GetTexture("_MainTex"), Color.black, 0f, null, 1f, null);
			array[0].defaultMaterial = defaultMaterial;
			array[1].defaultMaterial = defaultMaterial;
			array[2].defaultMaterial = defaultMaterial;
		}
		defaultMaterial = array[1].defaultMaterial;
		defaultMaterial = array[2].defaultMaterial;
		if (Object.op_Implicit((Object)(object)defaultMaterial))
		{
			defaultMaterial = Utils.InstantiateMaterial(Color.white, Assets.MainAssetBundle.LoadAsset<Material>("stickybomb").GetTexture("_MainTex"), new Color(0f, 2f, 0.9960784f), 1f, Assets.MainAssetBundle.LoadAsset<Material>("stickybomb").GetTexture("_EmissionMap"), 1f, null);
			array[3].defaultMaterial = defaultMaterial;
		}
		defaultMaterial = array[3].defaultMaterial;
		val7.RendererInfos = array;
		SkinDef val8 = Skins.CreateNewSkinDef(val7);
		SkinDefInfo val9 = default(SkinDefInfo);
		val9.BaseSkins = Array.Empty<SkinDef>();
		val9.MinionSkinReplacements = (MinionSkinReplacement[])(object)new MinionSkinReplacement[0];
		val9.ProjectileGhostReplacements = (ProjectileGhostReplacement[])(object)new ProjectileGhostReplacement[0];
		val9.GameObjectActivations = (GameObjectActivation[])(object)new GameObjectActivation[0];
		val9.Icon = Skins.CreateSkinIcon(Color.white, new Color(0.4941176f, 0.509804f, 0.5568628f), new Color(0.1803922f, 0.2196078f, 0.2117647f), new Color(3f / 85f, 0.09019608f, 0.1803922f));
		val9.MeshReplacements = (MeshReplacement[])(object)new MeshReplacement[2]
		{
			new MeshReplacement
			{
				renderer = (Renderer)(object)fieldValue,
				mesh = Assets.MainAssetBundle.LoadAsset<Mesh>("mBomber")
			},
			new MeshReplacement
			{
				renderer = array[1].renderer,
				mesh = Assets.MainAssetBundle.LoadAsset<Mesh>("mHead")
			}
		};
		val9.Name = "TBOMBERBODY_MASTERY_SKIN_NAME";
		val9.NameToken = "TBOMBERBODY_MASTERY_SKIN_NAME";
		val9.RendererInfos = component8.baseRendererInfos;
		val9.RootObject = gameObject;
		val9.UnlockableDef = Achievements.bomberMasteryDef;
		rendererInfos = val7.RendererInfos;
		array = (RendererInfo[])(object)new RendererInfo[rendererInfos.Length];
		rendererInfos.CopyTo(array, 0);
		defaultMaterial = array[0].defaultMaterial;
		if (flag)
		{
			defaultMaterial = Utils.InstantiateMaterial(Color.white, Assets.MainAssetBundle.LoadAsset<Material>("masterybomber").GetTexture("_MainTex"), Color.black, 0f, null, 1f, null);
			array[0].defaultMaterial = defaultMaterial;
			array[2].defaultMaterial = defaultMaterial;
		}
		defaultMaterial = array[0].defaultMaterial;
		if (flag)
		{
			defaultMaterial = Assets.MainAssetBundle.LoadAsset<Material>("masterybomberhead");
			array[1].defaultMaterial = defaultMaterial;
		}
		defaultMaterial = array[1].defaultMaterial;
		val9.RendererInfos = array;
		SkinDef val10 = Skins.CreateNewSkinDef(val9);
		val6.skins = (SkinDef[])(object)new SkinDef[2] { val8, val10 };
		PhysicMaterial val11 = Prefabs.Load<PhysicMaterial>("RoR2/Base/Common/physmatRagdoll.physicMaterial");
		RagdollController val12 = val.AddComponent<RagdollController>();
		val12.bones = (Transform[])(object)new Transform[10]
		{
			component9.FindChild("stomach"),
			component9.FindChild("chest"),
			component9.FindChild("head"),
			component9.FindChild("bomb.r"),
			component9.FindChild("bomb.l"),
			component9.FindChild("lower_arm.r"),
			component9.FindChild("upper_arm.r"),
			component9.FindChild("upper_arm.l"),
			component9.FindChild("lower_arm.l"),
			component9.FindChild("wheelbone")
		};
		Transform[] bones = val12.bones;
		foreach (Transform val13 in bones)
		{
			if (Object.op_Implicit((Object)(object)val13))
			{
				((Component)val13).gameObject.layer = LayerIndex.ragdoll.intVal;
				Collider component10 = ((Component)val13).GetComponent<Collider>();
				if (Object.op_Implicit((Object)(object)component10))
				{
					component10.material = val11;
					component10.sharedMaterial = val11;
				}
			}
		}
		TeamComponent val14 = null;
		val14 = ((!((Object)(object)characterPrefab.GetComponent<TeamComponent>() != (Object)null)) ? characterPrefab.GetComponent<TeamComponent>() : characterPrefab.GetComponent<TeamComponent>());
		val14.hideAllyCardDisplay = false;
		val14.teamIndex = (TeamIndex)(-1);
		HealthComponent component11 = characterPrefab.GetComponent<HealthComponent>();
		component11.health = 110f;
		component11.shield = 0f;
		component11.barrier = 0f;
		component11.magnetiCharge = 0f;
		component11.body = null;
		component11.dontShowHealthbar = false;
		component11.globalDeathEventChanceCoefficient = 1f;
		characterPrefab.GetComponent<Interactor>().maxInteractionDistance = 3f;
		characterPrefab.GetComponent<InteractionDriver>().highlightInteractor = true;
		SfxLocator component12 = characterPrefab.GetComponent<SfxLocator>();
		component12.deathSound = "Play_ui_player_death";
		component12.barkSound = "";
		component12.openSound = "";
		component12.landingSound = "Play_char_land";
		component12.fallDamageSound = "Play_char_land_fall_damage";
		component12.aliveLoopStart = "";
		component12.aliveLoopStop = "";
		Rigidbody component13 = characterPrefab.GetComponent<Rigidbody>();
		component13.mass = 160f;
		component13.drag = 0f;
		component13.angularDrag = 0f;
		component13.useGravity = false;
		component13.isKinematic = true;
		component13.interpolation = (RigidbodyInterpolation)0;
		component13.collisionDetectionMode = (CollisionDetectionMode)0;
		component13.constraints = (RigidbodyConstraints)0;
		CapsuleCollider component14 = characterPrefab.GetComponent<CapsuleCollider>();
		((Collider)component14).isTrigger = false;
		((Collider)component14).material = null;
		component14.center = new Vector3(0f, 0f, 0f);
		component14.radius = 0.7f;
		component14.height = 1.9f;
		component14.direction = 1;
		KinematicCharacterMotor component15 = characterPrefab.GetComponent<KinematicCharacterMotor>();
		component15.CharacterController = (ICharacterController)(object)component3;
		component15.Capsule = component14;
		component15.playerCharacter = true;
		component14.radius = 0.7f;
		component14.height = 1.9f;
		component14.center = new Vector3(0f, 0f, 0f);
		((Collider)component14).material = null;
		component15.GroundDetectionExtraDistance = 0f;
		component15.MaxStepHeight = 0.2f;
		component15.MinRequiredStepDepth = 0.1f;
		component15.MaxStableSlopeAngle = 55f;
		component15.MaxStableDistanceFromLedge = 0.5f;
		component15.MaxStableDenivelationAngle = 55f;
		component15.RigidbodyInteractionType = (RigidbodyInteractionType)0;
		component15.PreserveAttachedRigidbodyMomentum = true;
		component15.HasPlanarConstraint = false;
		component15.PlanarConstraintAxis = Vector3.up;
		component15.StepHandling = (StepHandlingMethod)0;
		component15.InteractiveRigidbodyHandling = true;
		HurtBoxGroup val15 = val.AddComponent<HurtBoxGroup>();
		HurtBox val16 = ((Component)val.GetComponentInChildren<CapsuleCollider>()).gameObject.AddComponent<HurtBox>();
		((Component)val16).gameObject.layer = LayerIndex.entityPrecise.intVal;
		val16.healthComponent = component11;
		val16.isBullseye = true;
		val16.damageModifier = (DamageModifier)0;
		val16.hurtBoxGroup = val15;
		val16.indexInGroup = 0;
		val15.hurtBoxes = (HurtBox[])(object)new HurtBox[1] { val16 };
		val15.mainHurtBox = val16;
		val15.bullseyeCount = 1;
		Transform modelTransform = Prefabs.Load<GameObject>("RoR2/Base/Engi/EngiBody.prefab").GetComponent<ModelLocator>().modelTransform;
		GameObject val17 = PrefabAPI.InstantiateClone(((Component)modelTransform.Find("SprintSoundFX")).gameObject, "BomberSprintSoundFX");
		GameObject val18 = PrefabAPI.InstantiateClone(((Component)modelTransform.Find("SprintDust")).gameObject, "BomberSprintDust");
		val17.AddComponent<NetworkIdentity>();
		val18.AddComponent<NetworkIdentity>();
		val17.transform.SetParent(val.transform);
		val18.transform.SetParent(val.transform);
		val17.transform.localPosition = Vector3.zero;
		val18.transform.localPosition = Vector3.zero;
		LoopSoundWhileCharacterMoving val19 = characterPrefab.AddComponent<LoopSoundWhileCharacterMoving>();
		val19.startSoundName = "Play_MULT_move_loop";
		val19.stopSoundName = "Stop_MULT_move_loop";
		val19.minSpeed = 3f;
		val19.requireGrounded = false;
		val19.disableWhileSprinting = false;
		val19.applyScale = true;
		SkateSparks val20 = val.AddComponent<SkateSparks>();
		val20.maxStress = 16f;
		val20.minStressForEmission = 4f;
		val20.overspeedStressCoefficient = 40f;
		val20.accelerationStressCoefficient = 8f;
		val20.perpendicularTravelStressCoefficient = 22f;
		val20.maxEmissionRate = 400f;
		val20.landingStress = 4;
		val20.leftParticleSystem = val18.GetComponent<ParticleSystem>();
		AimAnimator val21 = val.AddComponent<AimAnimator>();
		val21.inputBank = component4;
		val21.directionComponent = component;
		val21.pitchRangeMax = 55f;
		val21.pitchRangeMin = -50f;
		val21.yawRangeMin = -44f;
		val21.yawRangeMax = 44f;
		val21.pitchGiveupRange = 30f;
		val21.yawGiveupRange = 10f;
		val21.giveupDuration = 8f;
		EntityStateMachine component16 = ((Component)component2).GetComponent<EntityStateMachine>();
		component16.mainStateType = new SerializableEntityStateType(typeof(BomberMain));
		CharacterDeathBehavior component17 = characterPrefab.GetComponent<CharacterDeathBehavior>();
		component17.deathStateMachine = characterPrefab.GetComponent<EntityStateMachine>();
		component17.deathState = new SerializableEntityStateType(typeof(DeathState));
		EntityStateMachine val22 = characterPrefab.AddComponent<EntityStateMachine>();
		val22.customName = "PoppyBomb";
		val22.initialStateType = new SerializableEntityStateType(typeof(Idle));
		val22.mainStateType = new SerializableEntityStateType(typeof(Idle));
		EntityStateMachine val23 = characterPrefab.AddComponent<EntityStateMachine>();
		val23.customName = "PoppyBombDetonate";
		val23.initialStateType = new SerializableEntityStateType(typeof(Idle));
		val23.mainStateType = new SerializableEntityStateType(typeof(Idle));
		NetworkStateMachine component18 = ((Component)component2).GetComponent<NetworkStateMachine>();
		List<EntityStateMachine> list = component18.stateMachines.ToList();
		list.Add(val22);
		list.Add(val23);
		component18.stateMachines = list.ToArray();
		ContentAddition.AddBody(characterPrefab);
	}

	private void RegisterCharacter()
	{
		//IL_0192: Unknown result type (might be due to invalid IL or missing references)
		//IL_0197: Unknown result type (might be due to invalid IL or missing references)
		characterDisplay = PrefabAPI.InstantiateClone(((Component)characterPrefab.GetComponent<ModelLocator>().modelBaseTransform).gameObject, "BomberDisplay", true);
		characterDisplay.AddComponent<NetworkIdentity>();
		SkinDef[] skins = characterDisplay.GetComponentInChildren<ModelSkinController>().skins;
		for (int i = 0; i < skins.Length; i++)
		{
			RendererInfo[] rendererInfos = skins[i].rendererInfos;
			for (int j = 0; j < rendererInfos.Length; j++)
			{
				if (((Object)rendererInfos[j].defaultMaterial).name.Contains("matCommandoDualies(Clone)"))
				{
					rendererInfos[j].defaultMaterial.shaderKeywords = null;
				}
			}
		}
		string text = "Bomber is a great mid-range AOE damage dealer with great damage and Crowd Control output.<style=cSub>\r\n\r\n< ! > Sticky Bomb excels at mid-range, good placement, positioning and specially good active bomb count management is required for the best damage output and wave clearing. A good aim and enemy movement prediction is also required to get the bonus damage output." + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > Detonate has no cooldown, so it can be spammed with no negative consequences. For short-range encounters, it can be used immediately after the first bomb is active, for quick damage output." + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > Pulse Bomb is a great utility to keep Bomber out of danger, it's low cd ensures you're constantly in the air. Additionally it can be used aggressively to blast your enemies away from battle for a while." + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > Flash Bomb is a great source of AOE damage and Crowd Control. With very low cd, it's possible to take control of enemy waves and ensure they'll stay where you want them to be, while also giving you a good time frame to get your Sticky Bombs placed right in their faces.";
		string text2 = "..and so he left, seeking the destruction of his next target.";
		string text3 = "..and so he vanished, saddened by the missed opportunities.";
		string text4 = "\"Sure you ain't gonna help 'em?\"\r\n\r\nThe prosthetic globe's induction motors chitter here and there in brief electrical whirs, keeping her client perfectly poised as he turns his head to reply.\r\n\r\n\"Am I not paying you enough yet, miss?\"\r\n\r\n\"No, no, I just- Look, man, money's good. All I'm sayin' is, you got arms like you bench-press boulders for a livin', and I reckon we'd be better off wrappin' this thing up sooner rather'n later.\"\r\n\r\nBeside him, her weary colleague suppresses a grunt as they heave their full body weight onto the wedged crowbar, coaxing a strained groan out of the crate's plasteel rivets. The softly humming sphere makes no moves to bear its rider any closer.\r\n\r\n\"This loading bay is slated for a colony ship, yes?\"\r\n\r\n\"Yeah, n' I get that, but we seen a couple more'a them UAS boys-in-blue on our way in here'n we shoulda, don't'cha think, big man?\"\r\n\r\n\"By the crew's quarters. Here, we have three sets of eyes, three sets of ears, plenty of time to work with... and your friend, who could use the exercise.\"\r\n\r\nShe takes a second to draft up a suitably pointed retort before the thought is cut by the sharp crack of a popped rivet, giving her accomplice just a moment to steady their grip on the crowbar as the rest start to shear away in rapid-fire. They barely manage to get their footing and step aside from the freed panel while it falls forwards on its remaining hinges, prompting a curse under the woman's breath at the loud clap of its collision with the floor. Wordlessly, the man glides ahead.\r\n\r\n\"...Ain't no way someone didn't hear that.\"\r\n\r\nHe rolls up onto the fallen plate, unfazed by her insistent tapping on his arm, and runs his gaze over the crate's contents. An old MUL-T unit; outdated, speckled all over with paint chips and rust. Newer models had already made circulation all the way out to Solus. They won't miss this one too badly.\r\n\r\n\"You listenin' to me? Wrap this shit up n' let's go, man. C'mon!\"\r\n\r\nHer client pulls a fist-sized parcel from his vest, wedging it into the robot's memory bay before tearing one of a pair of oblong plastic tags off of the package's side. A little indicator light set on the token's edge flickers softly as he tosses it over to the freight-runner with the crowbar, leaving them stumbling to catch it without dropping the tool in the process. Still adjusting the parcel's position with one hand, he idly brushes at his shoulder, shooing away the woman's attempts to prod him along with the same sort of graceful empathy one might set aside for a particularly tenacious mosquito.\r\n\r\n\"You can leave at any time, miss.\"\r\n\r\n\"I can-! Ohhhhh-ho-ho-ho, this motherfucker. Alright, you look HERE, mister funny man, all high-up on your fuckin' CLOWN-ass circus ball-\"\r\n\r\nThe double-handed shove she throws at his back is met by a clean forwards pivot atop the sphere, putting him just beyond her reach. He swivels at the waist on the spot, catching her by a wrist as she tries to fight her own momentum, and sends her footing wildly off-kilter with one sharp tug. Adrenaline surges, muscles tense, eyes shut - she knows the counterattack is coming, and she knows there's no way she can stop it.\r\n\r\nA plastic card is soundly pressed into her palm.\r\n\r\nHer accomplice, mid-windup to take a swing with the crowbar, pauses in tension.\r\n\r\nAgain, he speaks.\r\n\r\n\"You are free to go.\"\r\n\r\nStill half-sensing a blow to come, it takes her a second to gather her wits. The grip on her arm is gradually eased as she regains her balance, leaving her free to pull herself away from his reach, and she breaks off to slither brusquely away, inspecting the card once she's gotten a few sour sideways glances out of her system.\r\n\r\nIt's a credit card.\r\n\r\nA CORPORATE ACCESS credit card.\r\n\r\nIn a rush, she seizes up in frantic gestures for her partner to hurry over, leaving their client to pull the stored robot from its crate.\r\n\r\n\"You- You're seein' this, right? Ain't jus' me?\"\r\n\r\nDropping the lookout routine, they can only take a couple steps before the faint huff of a far-off pneumatic door ripples out over the sprawling maze of waiting cargo, stopping them in their tracks. Delicately, they dip to a crouch and set down the crowbar, their voice falling to an urgent hiss as they slink to her in measured silence.\r\n\r\n\"Man said go. We walk away now.\"\r\n\r\n\"With that freak-show still rollin' around!? If this uppity fuck gets caught n' rats us out, then this card gets shut down on the spot, AND we get the UES tailin' our asses all the way off to Tahiti and back. If we ain't around keepin' his head down on the way out, then big ol' mister fuckin' bowling-ball over there's gonna be stickin' out like-\"\r\n\r\nKA-CHUNK.\r\n\r\nThe MUL-T beats a fresh rivet into the crate at full tilt, very nearly ending the conversation on a double cardiac arrest. The far-off shouts for identification which follow immediately afterwards seem awfully intent on finishing what the rivet gun started.\r\n\r\nSiezing her wrist so tightly that she feels something pop, the freight-runner takes off in a dire sprint, leaving the robot behind as it reels back to knock in another rivet. She hardly has a moment to look around before she's swept up in their escape, but it's long enough for her to tell that their client has either ditched them completely or evaporated on the spot, and as far as she cares at the moment, that makes it a big fat load of not-her-problem.\r\n\r\nThe rolling thunder of combat boots over concrete ebbs at a snail's pace as the smugglers barrel across the aisles, diving through a heady mix of fight-or-flight and runner's high to distance themselves from the rhythmic clang of the machine at work. Skidding around a corner to find a mercifully barren corridor, grasping at just enough hope of escape for her racing mind to move on to another source of looming horror, one spares a ragged breath to speak.\r\n\r\n\"Where's the fuckin'- Where did'e-\"\r\n\r\nHer companion doesn't respond, their eyes still wild. She tugs back the arm they're holding onto, but they only drive even harder, and in desperation, she throws her heels down, using herself as dead weight to force a stop and pull them aside into an unlit office. Legs on fire, gasping for breath, almost collapsing beneath the lost momentum - for a brief moment, the two can only listen.\r\n\r\nSilence.\r\n\r\nPure, beautiful, intoxicating silence.\r\n\r\nShe gets a good five seconds of unparalleled bliss - she'd have laughed, if she had the breath for it - before that horrid notion floats gently back in to re-spoil the placidity of her thoughts. The urge to ignore it crosses her mind - to just bury it, and to move on to... well, to move on to what?\r\n\r\n\"Is- Is th'...\"\r\n\r\nA ragged cough shoves up and out of her lungs, with all the tender love and care of a plastic bag full of fillet knives. She's left sputtering, cursing the pain with absent breath, but they knew the question long before she tried to ask it.\r\n\r\n\"He did not... come with us.\"\r\n\r\n\"Fff-fuck.\"\r\n\r\nThey grunt in numb acknowledgement.\r\n\r\nShe lets her back slide down the wall, clutching at the stitch in her side, just trying to corral some good air into her system.\r\n\r\nIt takes a while.\r\n\r\nA few seconds.\r\n\r\nA minute,\r\n\r\nThen two,\r\n\r\nUntil even time seems to waver.\r\n\r\nJust waiting, in the placid dread of idleness amidst uncertainty.\r\n\r\nBut, eventually, finally, something beyond the pained panting pricks at her ears. Smoothly up the peaceful hall, rolling gently as the wind, comes the soft, mechanical whirr of muffled servos. In an instant, a new form of relief surges through her, and the woman bolts upright, eyes wide, hissing across the room.\r\n\r\n\"Tell him he can go fuck himself. We ain't bringin' him here again.\"\r\n\r\nHer colleague glances up at her from the rhythmic flash of the little plastic stub resting in their palm, if only to shake out a gentle \"no,\" as the incoming glare of the hallway bulbs momentarily dims. Wheels humming, a rusty old MUL-T trundles past the office door. It never turns to look.\r\n\r\n\"I do not think he will ask.\"\r\n\r\nThe tag sails across the room from their hold to hers, the modest glow of its cherry-red indicator returning her inquisitive blinks, pulsing in lockstep with its twin still stuck to the errant robot's carefully-stashed package. In the dark as they are, the soft, rosy light offers just enough clarity to spot the tangled scrawl across its glossy surface, one half-second at a time.\r\n\r\nLetter by letter,\r\n\r\nMeasure by measure,\r\n\r\nShe sees to the march of the flickering crimson heartbeat.\r\n\r\n<style=cMono>DET. DIST: 1 KM\r\nDISPOSAL CHARGE</style>";
		LanguageAPI.Add("BOMBER_NAME", "Bomber");
		LanguageAPI.Add("BOMBER_DESCRIPTION", text);
		LanguageAPI.Add("BOMBER_SUBTITLE", "The Demolitioner");
		LanguageAPI.Add("BOMBER_LORE", text4);
		LanguageAPI.Add("BOMBER_OUTRO", text2);
		LanguageAPI.Add("BOMBER_FAIL", text3);
		SurvivorDef val = ScriptableObject.CreateInstance<SurvivorDef>();
		val.cachedName = "BOMBER_NAME";
		val.unlockableDef = Achievements.bomberUnlockDef;
		val.descriptionToken = "BOMBER_DESCRIPTION";
		val.primaryColor = characterColor;
		val.bodyPrefab = characterPrefab;
		val.displayPrefab = characterDisplay;
		val.outroFlavorToken = "BOMBER_OUTRO";
		val.desiredSortPosition = 0.2f;
		val.mainEndingEscapeFailureFlavorToken = "BOMBER_FAIL";
		ContentAddition.AddSurvivorDef(val);
		SkillSetup();
	}

	private void RegisterStates()
	{
		//IL_0003: 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_0013: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0023: 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_0033: Unknown result type (might be due to invalid IL or missing references)
		//IL_003b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0043: Unknown result type (might be due to invalid IL or missing references)
		//IL_004b: Unknown result type (might be due to invalid IL or missing references)
		bool flag = default(bool);
		ContentAddition.AddEntityState<StickyBomb>(ref flag);
		ContentAddition.AddEntityState<Detonate>(ref flag);
		ContentAddition.AddEntityState<PoppyBomb>(ref flag);
		ContentAddition.AddEntityState<PoppyBombBase>(ref flag);
		ContentAddition.AddEntityState<FlashBomb>(ref flag);
		ContentAddition.AddEntityState<FlashBombBase>(ref flag);
		ContentAddition.AddEntityState<BomberMain>(ref flag);
		ContentAddition.AddEntityState<FlashBombMainStateExit>(ref flag);
		ContentAddition.AddEntityState<FlashbombEntryState>(ref flag);
		ContentAddition.AddEntityState<FlashBombHitGroundState>(ref flag);
	}

	private void SkillSetup()
	{
		GenericSkill[] componentsInChildren = characterPrefab.GetComponentsInChildren<GenericSkill>();
		foreach (GenericSkill val in componentsInChildren)
		{
			Object.DestroyImmediate((Object)(object)val);
		}
		PassiveSetup();
		PrimarySetup();
		SecondarySetup();
		UtilitySetup();
		SpecialSetup();
	}

	public static Sprite SetSkillIcon(string skillFamily, bool skillOverride)
	{
		switch (skillFamily)
		{
		case "primary":
			if (!skillIconSprite.Value)
			{
				return Assets.MainAssetBundle.LoadAsset<Sprite>("M1New");
			}
			return Assets.MainAssetBundle.LoadAsset<Sprite>("m1");
		case "secondary":
			if (!skillIconSprite.Value)
			{
				return Assets.MainAssetBundle.LoadAsset<Sprite>("M2New");
			}
			return Assets.MainAssetBundle.LoadAsset<Sprite>("m2");
		case "utility":
			if (!skillOverride)
			{
				if (!skillIconSprite.Value)
				{
					return Assets.MainAssetBundle.LoadAsset<Sprite>("UtilNew");
				}
				return Assets.MainAssetBundle.LoadAsset<Sprite>("util");
			}
			if (!skillIconSprite.Value)
			{
				return Assets.MainAssetBundle.LoadAsset<Sprite>("Util2New");
			}
			return Assets.MainAssetBundle.LoadAsset<Sprite>("util2");
		case "special":
			if (!skillIconSprite.Value)
			{
				return Assets.MainAssetBundle.LoadAsset<Sprite>("SpecialNew");
			}
			return Assets.MainAssetBundle.LoadAsset<Sprite>("spec");
		default:
			return null;
		}
	}

	private void PassiveSetup()
	{
		SkillLocator component = characterPrefab.GetComponent<SkillLocator>();
		LanguageAPI.Add("BOMBER_PASSIVE_NAME", "Galvanized Coating");
		LanguageAPI.Add("BOMBER_PASSIVE_DESCRIPTION", "Bomber resists <style=cIsUtility>70% + level</style> damage from explosions and getting hit by them grants <style=cKeywordName>Lightweight</style><style=cSub>");
		LanguageAPI.Add("BOMBER_LIGHTWEIGHT_KEYWORD", "<style=cKeywordName>Lightweight</style><style=cSub>Gain <style=cIsDamage>fall damage immunity</style>. <style=cIsDamage>+20% movement speed</style>.");
		component.passiveSkill.enabled = true;
		component.passiveSkill.skillNameToken = "BOMBER_PASSIVE_NAME";
		component.passiveSkill.skillDescriptionToken = "BOMBER_PASSIVE_DESCRIPTION";
		component.passiveSkill.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("passiveNew");
		component.passiveSkill.keywordToken = "BOMBER_LIGHTWEIGHT_KEYWORD";
	}

	private void PrimarySetup()
	{
		//IL_003d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: Unknown result type (might be due to invalid IL or missing references)
		//IL_012c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0144: Unknown result type (might be due to invalid IL or missing references)
		//IL_014e: Expected O, but got Unknown
		//IL_014f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0151: Unknown result type (might be due to invalid IL or missing references)
		SkillLocator component = characterPrefab.GetComponent<SkillLocator>();
		LanguageAPI.Add("BOMBER_M1", "Sticky Bomb");
		LanguageAPI.Add("BOMBER_M1_DESCRIPTION", "Throw Sticky Bombs that attach to any surface or enemy. Up to 6 Sticky Bombs can be active at all times.");
		SkillDef val = ScriptableObject.CreateInstance<SkillDef>();
		val.activationState = new SerializableEntityStateType(typeof(StickyBomb));
		val.activationStateMachineName = "Weapon";
		val.baseMaxStock = 0;
		val.baseRechargeInterval = 0f;
		val.beginSkillCooldownOnSkillEnd = true;
		val.canceledFromSprinting = false;
		val.fullRestockOnAssign = true;
		val.interruptPriority = (InterruptPriority)0;
		val.isCombatSkill = true;
		val.mustKeyPress = false;
		val.cancelSprintingOnActivation = true;
		val.rechargeStock = 0;
		val.requiredStock = 0;
		val.stockToConsume = 0;
		val.icon = SetSkillIcon("primary", skillOverride: false);
		val.skillDescriptionToken = "BOMBER_M1_DESCRIPTION";
		val.skillName = "BOMBER_M1";
		val.skillNameToken = "BOMBER_M1";
		ContentAddition.AddSkillDef(val);
		component.primary = characterPrefab.AddComponent<GenericSkill>();
		SkillFamily val2 = ScriptableObject.CreateInstance<SkillFamily>();
		val2.variants = (Variant[])(object)new Variant[1];
		Reflection.SetFieldValue<SkillFamily>((object)component.primary, "_skillFamily", val2);
		SkillFamily skillFamily = component.primary.skillFamily;
		Variant[] variants = skillFamily.variants;
		Variant val3 = new Variant
		{
			skillDef = val
		};
		((Variant)(ref val3)).viewableNode = new Node(val.skillNameToken, false, (Node)null);
		variants[0] = val3;
		ContentAddition.AddSkillFamily(skillFamily);
	}

	private void SecondarySetup()
	{
		//IL_003d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: Unknown result type (might be due to invalid IL or missing references)
		//IL_012c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0144: Unknown result type (might be due to invalid IL or missing references)
		//IL_014e: Expected O, but got Unknown
		//IL_014f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0151: Unknown result type (might be due to invalid IL or missing references)
		SkillLocator component = characterPrefab.GetComponent<SkillLocator>();
		LanguageAPI.Add("BOMBER_M2", "Detonate");
		LanguageAPI.Add("BOMBER_M2_DESCRIPTION", "Detonate all active Sticky Bombs for <style=cIsDamage>260% damage</style> each. For each Sticky Bomb attached to an enemy, deal bonus <style=cIsDamage>2.5% max hp damage</style> based on the attached enemy health.");
		SkillDef val = ScriptableObject.CreateInstance<SkillDef>();
		val.activationState = new SerializableEntityStateType(typeof(Detonate));
		val.activationStateMachineName = "Slide";
		val.baseMaxStock = 0;
		val.baseRechargeInterval = 0f;
		val.beginSkillCooldownOnSkillEnd = true;
		val.canceledFromSprinting = false;
		val.fullRestockOnAssign = false;
		val.interruptPriority = (InterruptPriority)0;
		val.isCombatSkill = true;
		val.mustKeyPress = true;
		val.cancelSprintingOnActivation = false;
		val.rechargeStock = 0;
		val.requiredStock = 0;
		val.stockToConsume = 0;
		val.icon = SetSkillIcon("secondary", skillOverride: false);
		val.skillDescriptionToken = "BOMBER_M2_DESCRIPTION";
		val.skillName = "BOMBER_M2";
		val.skillNameToken = "BOMBER_M2";
		ContentAddition.AddSkillDef(val);
		component.secondary = characterPrefab.AddComponent<GenericSkill>();
		SkillFamily val2 = ScriptableObject.CreateInstance<SkillFamily>();
		val2.variants = (Variant[])(object)new Variant[1];
		Reflection.SetFieldValue<SkillFamily>((object)component.secondary, "_skillFamily", val2);
		SkillFamily skillFamily = component.secondary.skillFamily;
		Variant[] variants = skillFamily.variants;
		Variant val3 = new Variant
		{
			skillDef = val
		};
		((Variant)(ref val3)).viewableNode = new Node(val.skillNameToken, false, (Node)null);
		variants[0] = val3;
		ContentAddition.AddSkillFamily(skillFamily);
	}

	private void UtilitySetup()
	{
		//IL_003d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: Unknown result type (might be due to invalid IL or missing references)
		//IL_012c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0144: Unknown result type (might be due to invalid IL or missing references)
		//IL_014e: Expected O, but got Unknown
		//IL_014f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0151: Unknown result type (might be due to invalid IL or missing references)
		SkillLocator component = characterPrefab.GetComponent<SkillLocator>();
		LanguageAPI.Add("BOMBER_UTIL", "Pulse Bomb");
		LanguageAPI.Add("BOMBER_UTIL_DESCRIPTION", "Throw a Pulse Bomb that attaches to the environment. Activate again to detonate, dealing <style=cIsDamage>400% damage</style> and pushing away anything near it.");
		SkillDef val = ScriptableObject.CreateInstance<SkillDef>();
		val.activationState = new SerializableEntityStateType(typeof(PoppyBombBase));
		val.activationStateMachineName = "PoppyBomb";
		val.baseMaxStock = 1;
		val.baseRechargeInterval = 5f;
		val.beginSkillCooldownOnSkillEnd = true;
		val.canceledFromSprinting = false;
		val.fullRestockOnAssign = false;
		val.interruptPriority = (InterruptPriority)0;
		val.isCombatSkill = false;
		val.mustKeyPress = true;
		val.cancelSprintingOnActivation = false;
		val.rechargeStock = 1;
		val.requiredStock = 1;
		val.stockToConsume = 1;
		val.icon = SetSkillIcon("utility", skillOverride: false);
		val.skillDescriptionToken = "BOMBER_UTIL_DESCRIPTION";
		val.skillName = "BOMBER_UTIL";
		val.skillNameToken = "BOMBER_UTIL";
		ContentAddition.AddSkillDef(val);
		component.utility = characterPrefab.AddComponent<GenericSkill>();
		SkillFamily val2 = ScriptableObject.CreateInstance<SkillFamily>();
		val2.variants = (Variant[])(object)new Variant[1];
		Reflection.SetFieldValue<SkillFamily>((object)component.utility, "_skillFamily", val2);
		SkillFamily skillFamily = component.utility.skillFamily;
		Variant[] variants = skillFamily.variants;
		Variant val3 = new Variant
		{
			skillDef = val
		};
		((Variant)(ref val3)).viewableNode = new Node(val.skillNameToken, false, (Node)null);
		variants[0] = val3;
		ContentAddition.AddSkillFamily(skillFamily);
	}

	private void SpecialSetup()
	{
		//IL_004d: 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_008b: Unknown result type (might be due to invalid IL or missing references)
		//IL_013c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0154: Unknown result type (might be due to invalid IL or missing references)
		//IL_015e: Expected O, but got Unknown
		//IL_015f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0161: Unknown result type (might be due to invalid IL or missing references)
		SkillLocator component = characterPrefab.GetComponent<SkillLocator>();
		LanguageAPI.Add("BOMBER_SPEC", "Flash Bomb");
		LanguageAPI.Add("BOMBER_SPEC_USE", "Flash Bomb");
		LanguageAPI.Add("BOMBER_SPEC_DESCRIPTION", "Target an area to launch a massive Flash Bomb that detonates 2 seconds after impact, dealing <style=cIsDamage>800% damage</style> and <style=cIsDamage>stuns</style> nearby enemies for <style=cIsDamage>3 seconds</style>.");
		SkillDef val = ScriptableObject.CreateInstance<SkillDef>();
		val.activationState = new SerializableEntityStateType(typeof(FlashBombBase));
		val.activationStateMachineName = "Slide";
		val.baseMaxStock = 1;
		val.baseRechargeInterval = 8f;
		val.beginSkillCooldownOnSkillEnd = true;
		val.canceledFromSprinting = false;
		val.fullRestockOnAssign = false;
		val.interruptPriority = (InterruptPriority)0;
		val.isCombatSkill = true;
		val.mustKeyPress = true;
		val.cancelSprintingOnActivation = false;
		val.rechargeStock = 1;
		val.requiredStock = 1;
		val.stockToConsume = 1;
		val.icon = SetSkillIcon("special", skillOverride: false);
		val.skillDescriptionToken = "BOMBER_SPEC_DESCRIPTION";
		val.skillName = "BOMBER_SPEC";
		val.skillNameToken = "BOMBER_SPEC";
		ContentAddition.AddSkillDef(val);
		component.special = characterPrefab.AddComponent<GenericSkill>();
		SkillFamily val2 = ScriptableObject.CreateInstance<SkillFamily>();
		val2.variants = (Variant[])(object)new Variant[1];
		Reflection.SetFieldValue<SkillFamily>((object)component.special, "_skillFamily", val2);
		SkillFamily skillFamily = component.special.skillFamily;
		Variant[] variants = skillFamily.variants;
		Variant val3 = new Variant
		{
			skillDef = val
		};
		((Variant)(ref val3)).viewableNode = new Node(val.skillNameToken, false, (Node)null);
		variants[0] = val3;
		ContentAddition.AddSkillFamily(skillFamily);
	}

	private void CreateDoppelganger()
	{
		doppelganger = PrefabAPI.InstantiateClone(Prefabs.Load<GameObject>("RoR2/Base/Commando/CommandoMonsterMaster.prefab"), "BomberMaster", true);
		ContentAddition.AddMaster(doppelganger);
		CharacterMaster component = doppelganger.GetComponent<CharacterMaster>();
		component.bodyPrefab = characterPrefab;
	}
}
public static class Assets
{
	public static AssetBundle MainAssetBundle;

	public static Texture charPortrait;

	public static Sprite charPortraitSkin;

	public static Sprite icon1;

	public static Sprite icon2;

	public static Sprite icon3;

	public static Sprite icon3Alt;

	public static Sprite icon4;

	public static void PopulateAssets()
	{
		if ((Object)(object)MainAssetBundle == (Object)null)
		{
			using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Bomber.AssetBundle.bomber");
			MainAssetBundle = AssetBundle.LoadFromStream(stream);
		}
		using (Stream stream2 = Assembly.GetExecutingAssembly().GetManifestResourceStream("Bomber.Bomber.bnk"))
		{
			byte[] array = new byte[stream2.Length];
			stream2.Read(array, 0, array.Length);
			SoundBanks.Add(array);
		}
		charPortrait = (Texture)(object)MainAssetBundle.LoadAsset<Sprite>("portrait").texture;
		charPortraitSkin = MainAssetBundle.LoadAsset<Sprite>("portrait");
		icon1 = MainAssetBundle.LoadAsset<Sprite>("m1");
		icon2 = MainAssetBundle.LoadAsset<Sprite>("m2");
		icon3 = MainAssetBundle.LoadAsset<Sprite>("util");
		icon3Alt = MainAssetBundle.LoadAsset<Sprite>("util2");
		icon4 = MainAssetBundle.LoadAsset<Sprite>("spec");
	}
}
internal class Achievements
{
	internal static UnlockableDef bomberUnlockDef;

	internal static UnlockableDef bomberMasteryDef;

	public static void RegisterUnlockables()
	{
		bomberUnlockDef = NewUnlockable<SurvivorChallenge>("SURVIVORUNLOCKABLE", Assets.MainAssetBundle.LoadAsset<Sprite>("portrait"), "Demolitionist", "Pickup 20 Sticky Bombs in a single run.");
		bomberMasteryDef = Achievements.NewUnlockable<BomberMonsoonChallenge>("MASTERYUNLOCKABLE", Assets.charPortraitSkin, "Bomber: Mastery", "As Bomber, beat the game or obliterate on Monsoon.");
	}

	internal static UnlockableDef NewUnlockable<T>(string AchievementIdentifier, Sprite Icon, string Title, string Description) where T : BaseAchievement
	{
		string text = "ACHIEVEMENT_BOMBER_";
		UnlockableDef val = ScriptableObject.CreateInstance<UnlockableDef>();
		string langName = text + AchievementIdentifier + "_NAME";
		string langDesc = text + AchievementIdentifier + "_DESCRIPTION";
		LanguageAPI.Add(langName, Title);
		LanguageAPI.Add(langDesc, Description);
		Func<string> func = () => Language.GetStringFormatted("UNLOCKED_FORMAT", new object[2]
		{
			Language.GetString(langName),
			Language.GetString(langDesc)
		});
		Type typeFromHandle = typeof(T);
		val.cachedName = text + AchievementIdentifier + "_UNLOCKABLE_ID";
		val.getHowToUnlockString = func;
		val.getUnlockedString = func;
		val.achievementIcon = Icon;
		val.sortScore = 200;
		val.hidden = false;
		ContentAddition.AddUnlockableDef(val);
		return val;
	}
}
[RegisterAchievement("BOMBER_SURVIVORUNLOCKABLE", "ACHIEVEMENT_BOMBER_SURVIVORUNLOCKABLE_UNLOCKABLE_ID", null, 10u, null)]
internal class SurvivorChallenge : BaseAchievement
{
	private void OnInventoryChanged(orig_OnInventoryChanged orig, CharacterMaster self)
	{
		//IL_0015: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: Invalid comparison between Unknown and I4
		orig.Invoke(self);
		if (Object.op_Implicit((Object)(object)self) && (int)self.teamIndex == 1 && Object.op_Implicit((Object)(object)self.inventory) && Object.op_Implicit((Object)(object)self.GetBody()))
		{
			ItemDef stickyBomb = Items.StickyBomb;
			if (self.inventory.GetItemCount(stickyBomb) >= 20)
			{
				((BaseAchievement)this).Grant();
			}
		}
	}

	public override void OnInstall()
	{
		//IL_000f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0019: Expected O, but got Unknown
		((BaseAchievement)this).OnInstall();
		CharacterMaster.OnInventoryChanged += new hook_OnInventoryChanged(OnInventoryChanged);
	}

	public override void OnUninstall()
	{
		//IL_000f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0019: Expected O, but got Unknown
		((BaseAchievement)this).OnUninstall();
		CharacterMaster.OnInventoryChanged -= new hook_OnInventoryChanged(OnInventoryChanged);
	}
}
[RegisterAchievement("BOMBER_MASTERYUNLOCKABLE", "ACHIEVEMENT_BOMBER_MASTERYUNLOCKABLE_UNLOCKABLE_ID", null, 10u, null)]
internal class BomberMonsoonChallenge : BasePerSurvivorClearGameMonsoonAchievement
{
	public override BodyIndex LookUpRequiredBodyIndex()
	{
		//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_000e: Unknown result type (might be due to invalid IL or missing references)
		return BodyCatalog.FindBodyIndex("DragonBomberBody");
	}
}
internal class ProgressiveScale : MonoBehaviour
{
	internal float baseScale;

	private void OnEnable()
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		baseScale = ((Component)this).transform.localScale.x + 2f;
	}

	private void FixedUpdate()
	{
		//IL_002b: Unknown result type (might be due to invalid IL or missing references)
		baseScale += Time.fixedDeltaTime;
		((Component)this).transform.localScale = new Vector3(baseScale, baseScale, baseScale);
	}
}
internal class Equipment
{
	internal static EquipmentDef AADef;

	internal static void AddEquip()
	{
		//IL_0047: Unknown result type (might be due to invalid IL or missing references)
		//IL_0065: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
		LanguageAPI.Add("BOMBER_AA_EQUIP_NAME", "NOV_AA");
		LanguageAPI.Add("BOMBER_AA_EQUIP_DESCRIPTION", "Target a location to launch a timed bomb. It has a base damage of 600% and 15 radius. Increases damage by 100% and radius by 1 for every second the bomb is active. Activate again to detonate.");
		LanguageAPI.Add("BOMBER_AA_EQUIP_PICKUP", "Target a location to launch a timed bomb.");
		GameObject val = Assets.MainAssetBundle.LoadAsset<GameObject>("AAdisplay");
		val.GetComponentInChildren<Renderer>().material = Utils.InstantiateMaterial(Color.white, Assets.MainAssetBundle.LoadAsset<Material>("AAMat").GetTexture("_MainTex"), Color.yellow, 5f, Assets.MainAssetBundle.LoadAsset<Material>("AAMat").GetTexture("_EmissionMap"), 1f, null);
		AADef = ScriptableObject.CreateInstance<EquipmentDef>();
		((Object)AADef).name = "DragonBomberAAEquip";
		AADef.colorIndex = (ColorIndex)5;
		AADef.appearsInMultiPlayer = true;
		AADef.appearsInSinglePlayer = true;
		AADef.canBeRandomlyTriggered = false;
		AADef.canDrop = true;
		AADef.cooldown = 25f;
		AADef.nameToken = "BOMBER_AA_EQUIP_NAME";
		AADef.descriptionToken = "BOMBER_AA_EQUIP_DESCRIPTION";
		AADef.pickupToken = "BOMBER_AA_EQUIP_PICKUP";
		AADef.loreToken = "BOMBER_AA_EQUIP_LORE";
		AADef.enigmaCompatible = false;
		AADef.isBoss = false;
		AADef.isLunar = false;
		AADef.pickupIconSprite = Assets.MainAssetBundle.LoadAsset<Sprite>("aa");
		AADef.pickupModelPrefab = val;
		ContentAddition.AddEquipmentDef(AADef);
	}
}
internal class AABehaviour : MonoBehaviour
{
	private static GameObject bomb;

	private GameObject ghost;

	private CharacterBody body;

	private ProjectileImpactExplosion explosion;

	public static float duration;

	private float sfxStopwatch;

	private MeshRenderer renderer;

	private Transform sphere;

	private float sphereScale = 31.5f;

	private float effectScale = 60f;

	private Material AAMatInstance;

	private void OnEnable()
	{
		CharacterBody component = ((Component)this).gameObject.GetComponent<CharacterBody>();
		if (Object.op_Implicit((Object)(object)component))
		{
			body = component;
		}
		ProjectileController component2 = ((Component)this).gameObject.GetComponent<ProjectileController>();
		if (Object.op_Implicit((Object)(object)component2) && Object.op_Implicit((Object)(object)component2.ghostPrefab))
		{
			ghost = component2.ghostPrefab;
		}
		ProjectileImpactExplosion component3 = ((Component)this).gameObject.GetComponent<ProjectileImpactExplosion>();
		if (!Object.op_Implicit((Object)(object)component3))
		{
			return;
		}
		explosion = component3;
		GameObject gameObject = ((Component)((Component)ghost.transform.Find("BomberAAGhostPrefab0")).GetComponent<ModelLocator>().modelTransform).gameObject;
		if (!Object.op_Implicit((Object)(object)gameObject))
		{
			return;
		}
		GameObject gameObject2 = ((Component)gameObject.transform.Find("AAmodel(Clone)")).gameObject;
		if (Object.op_Implicit((Object)(object)gameObject2))
		{
			renderer = gameObject2.GetComponent<MeshRenderer>();
			if (Object.op_Implicit((Object)(object)renderer))
			{
				AAMatInstance = Object.Instantiate<Material>(((Renderer)renderer).material);
				((Renderer)renderer).material = AAMatInstance;
			}
		}
		sphere = gameObject.transform.Find("Sphere");
	}

	private void FixedUpdate()
	{
		//IL_003b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0083: Unknown result type (might be due to invalid IL or missing references)
		if (Object.op_Implicit((Object)(object)renderer) && sfxStopwatch >= 0f && sfxStopwatch < 0.4f)
		{
			AAMatInstance.SetColor("_EmColor", Color.red);
		}
		if (sfxStopwatch >= 0.4f && Object.op_Implicit((Object)(object)renderer))
		{
			AkSoundEngine.PostEvent(Sounds.SpecOut, ((Component)this).gameObject);
			AAMatInstance.SetColor("_EmColor", Color.yellow);
			sfxStopwatch = -2f;
		}
		if (Object.op_Implicit((Object)(object)explosion) && Object.op_Implicit((Object)(object)sphere) && ((Component)sphere).gameObject.activeSelf)
		{
			duration += Time.fixedDeltaTime;
			sfxStopwatch += Time.fixedDeltaTime;
			ProjectileImpactExplosion obj = explosion;
			((ProjectileExplosion)obj).blastRadius = ((ProjectileExplosion)obj).blastRadius + Time.fixedDeltaTime;
			ProjectileImpactExplosion obj2 = explosion;
			((ProjectileExplosion)obj2).blastDamageCoefficient = ((ProjectileExplosion)obj2).blastDamageCoefficient + Time.fixedDeltaTime;
		}
	}

	private void OnDisable()
	{
		if (Object.op_Implicit((Object)(object)explosion))
		{
			Util.PlaySound("item_void_critGlasses_01", ((Component)this).gameObject);
		}
		if (Object.op_Implicit((Object)(object)bomb))
		{
			Object.Destroy((Object)(object)bomb);
		}
	}
}
internal class AAController : MonoBehaviour
{
	internal GameObject bomb;

	private CharacterBody body;

	internal GameObject indicatorInstance;

	private Ray aimRay;

	private float maxDistance = 1000f;

	internal Vector3 position;

	internal float stopwatch;

	private void OnEnable()
	{
		CharacterBody component = ((Component)this).gameObject.GetComponent<CharacterBody>();
		if (Object.op_Implicit((Object)(object)component))
		{
			body = component;
			if (Object.op_Implicit((Object)(object)body) && !Object.op_Implicit((Object)(object)body.equipmentSlot))
			{
			}
		}
	}

	public void Detonate()
	{
		//IL_0043: Unknown result type (might be due to invalid IL or missing references)
		//IL_0048: Unknown result type (might be due to invalid IL or missing references)
		//IL_0054: Unknown result type (might be due to invalid IL or missing references)
		//IL_005f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0077: Expected O, but got Unknown
		if (Object.op_Implicit((Object)(object)bomb))
		{
			ProjectileImpactExplosion component = bomb.GetComponent<ProjectileImpactExplosion>();
			if (Object.op_Implicit((Object)(object)component))
			{
				component.lifetimeAfterImpact = 0f;
				component.lifetime = 0f;
				EffectManager.SpawnEffect(Prefabs.AAEffect, new EffectData
				{
					origin = bomb.transform.position,
					scale = ((ProjectileExplosion)component).blastRadius / 1000f
				}, true);
			}
		}
	}

	private void Update()
	{
		//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_00a1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ee: 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_010a: Unknown result type (might be due to invalid IL or missing references)
		if (!Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)body.equipmentSlot))
		{
			return;
		}
		aimRay = body.equipmentSlot.GetAimRay();
		if (!Object.op_Implicit((Object)(object)bomb))
		{
			stopwatch = 0f;
			RaycastHit val = default(RaycastHit);
			if (!Object.op_Implicit((Object)(object)indicatorInstance))
			{
				if (body.equipmentSlot.stock > 0)
				{
					indicatorInstance = Object.Instantiate<GameObject>(Prefabs.AAIndicator);
				}
			}
			else if (Physics.Raycast(aimRay, ref val, maxDistance, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask)))
			{
				indicatorInstance.transform.position = ((RaycastHit)(ref val)).point;
				indicatorInstance.transform.up = ((RaycastHit)(ref val)).normal;
				position = indicatorInstance.transform.position;
			}
		}
		else
		{
			stopwatch += Time.fixedDeltaTime;
			if (Object.op_Implicit((Object)(object)indicatorInstance))
			{
				Object.Destroy((Object)(object)indicatorInstance);
			}
		}
	}

	private void OnDisable()
	{
		if (Object.op_Implicit((Object)(object)bomb))
		{
			Object.Destroy((Object)(object)bomb);
		}
	}
}
internal class Hook
{
	internal static void Hooks()
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Expected O, but got Unknown
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0024: Expected O, but got Unknown
		//IL_002c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0036: Expected O, but got Unknown
		//IL_003e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0048: Expected O, but got Unknown
		//IL_0050: Unknown result type (might be due to invalid IL or missing references)
		//IL_005a: Expected O, but got Unknown
		//IL_0062: Unknown result type (might be due to invalid IL or missing references)
		//IL_006c: Expected O, but got Unknown
		//IL_0074: Unknown result type (might be due to invalid IL or missing references)
		//IL_007e: Expected O, but got Unknown
		//IL_0086: Unknown result type (might be due to invalid IL or missing references)
		//IL_0090: Expected O, but got Unknown
		ProjectileController.Start += new hook_Start(ProjectileController_Start);
		HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage);
		RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients);
		CharacterBody.OnBuffFinalStackLost += new hook_OnBuffFinalStackLost(CharacterBody_OnBuffFinalStackLost);
		ProjectileStickOnImpact.OnProjectileImpact += new hook_OnProjectileImpact(ProjectileStickOnImpact_OnProjectileImpact);
		CharacterBody.OnEquipmentGained += new hook_OnEquipmentGained(CharacterBody_OnEquipmentGained);
		CharacterBody.OnEquipmentLost += new hook_OnEquipmentLost(CharacterBody_OnEquipmentLost);
		EquipmentSlot.PerformEquipmentAction += new hook_PerformEquipmentAction(EquipmentSlot_PerformEquipmentAction);
	}

	private static bool EquipmentSlot_PerformEquipmentAction(orig_PerformEquipmentAction orig, EquipmentSlot self, EquipmentDef equipmentDef)
	{
		//IL_003e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0043: 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_004c: 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_007b: 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_00cf: 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_00e0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
		//IL_0116: Unknown result type (might be due to invalid IL or missing references)
		//IL_0118: Unknown result type (might be due to invalid IL or missing references)
		//IL_011f: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)equipmentDef == (Object)(object)Equipment.AADef)
		{
			AAController component = ((Component)self.characterBody).GetComponent<AAController>();
			if (Object.op_Implicit((Object)(object)component) && NetworkServer.active)
			{
				Vector3 position = ((Component)self).transform.position;
				Vector3 val = default(Vector3);
				((Vector3)(ref val))..ctor(position.x, position.y - 1f, position.z);
				if ((Object)(object)component.bomb == (Object)null)
				{
					FireProjectileInfo val2 = default(FireProjectileInfo);
					val2.crit = self.characterBody.RollCrit();
					val2.damage = self.characterBody.damage * 6f;
					val2.damageColorIndex = (DamageColorIndex)0;
					val2.force = 500f;
					val2.owner = ((Component)self).gameObject;
					val2.position = component.position;
					val2.procChainMask = default(ProcChainMask);
					val2.projectilePrefab = Prefabs.AAPrefab;
					val2.rotation = Quaternion.identity;
					val2.useFuseOverride = false;
					val2.useSpeedOverride = false;
					val2.target = null;
					FireProjectileInfo val3 = val2;
					ProjectileManager.instance.FireProjectile(val3);
					return false;
				}
				if (component.stopwatch >= 3f)
				{
					component.Detonate();
					return true;
				}
				return false;
			}
			orig.Invoke(self, equipmentDef);
			return true;
		}
		return orig.Invoke(self, equipmentDef);
	}

	private static void CharacterBody_OnEquipmentLost(orig_OnEquipmentLost orig, CharacterBody self, EquipmentDef equipmentDef)
	{
		orig.Invoke(self, equipmentDef);
		if (!Object.op_Implicit((Object)(object)self) || !((Object)(object)equipmentDef == (Object)(object)Equipment.AADef))
		{
			return;
		}
		AAController component = ((Component)self).gameObject.GetComponent<AAController>();
		if (Object.op_Implicit((Object)(object)component))
		{
			component.Detonate();
			if (Object.op_Implicit((Object)(object)component.indicatorInstance))
			{
				Object.Destroy((Object)(object)component.indicatorInstance);
			}
			Object.Destroy((Object)(object)((Component)self).gameObject.GetComponent<AAController>());
		}
	}

	private static void CharacterBody_OnEquipmentGained(orig_OnEquipmentGained orig, CharacterBody self, EquipmentDef equipmentDef)
	{
		orig.Invoke(self, equipmentDef);
		if (Object.op_Implicit((Object)(object)self) && (Object)(object)equipmentDef == (Object)(object)Equipment.AADef)
		{
			((Component)self).gameObject.AddComponent<AAController>();
		}
	}

	private static void ProjectileStickOnImpact_OnProjectileImpact(orig_OnProjectileImpact orig, ProjectileStickOnImpact self, ProjectileImpactInfo impactInfo)
	{
		//IL_0003: Unknown result type (might be due to invalid IL or missing references)
		orig.Invoke(self, impactInfo);
		if (!Object.op_Implicit((Object)(object)self) || !Object.op_Implicit((Object)(object)((Component)self).gameObject) || !((Object)((Component)self).gameObject).name.Contains("BomberStickyBombPrefab") || !Object.op_Implicit((Object)(object)self.victim))
		{
			return;
		}
		CharacterBody component = self.victim.GetComponent<CharacterBody>();
		if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.healthComponent) && !component.isPlayerControlled)
		{
			AkSoundEngine.PostEvent(Sounds.Enemy_Attach, self.victim);
			StickyBombBonusController component2 = ((Component)self).gameObject.GetComponent<StickyBombBonusController>();
			if (!Object.op_Implicit((Object)(object)component2))
			{
				((Component)self).gameObject.AddComponent<StickyBombBonusController>().targetMaxHealth = component.healthComponent.fullHealth;
			}
		}
	}

	private static void CharacterBody_OnBuffFinalStackLost(orig_OnBuffFinalStackLost orig, CharacterBody self, BuffDef buffDef)
	{
		//IL_001c: 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_0023: Unknown result type (might be due to invalid IL or missing references)
		orig.Invoke(self, buffDef);
		if ((Object)(object)buffDef == (Object)(object)Prefabs.poppyBombBuff)
		{
			self.bodyFlags = (BodyFlags)(self.bodyFlags - 1);
		}
	}

	private static void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args)
	{
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		if (sender.HasBuff(Prefabs.poppyBombBuff))
		{
			sender.bodyFlags = (BodyFlags)(sender.bodyFlags | 1);
			args.moveSpeedMultAdd += 0.2f;
		}
	}

	private static void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo)
	{
		//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_0011: Invalid comparison between Unknown and I4
		//IL_0085: Unknown result type (might be due to invalid IL or missing references)
		//IL_0069: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
		if ((int)DamageTypeCombo.op_Implicit(damageInfo.damageType) == 131072 && ((Object)self.body).name.Contains("DragonBomberBody"))
		{
			damageInfo.damage *= 0.3f - self.body.level / 10f;
			if (NetworkServer.active)
			{
				self.body.AddTimedBuffAuthority(Prefabs.poppyBombBuff.buffIndex, 5f);
			}
		}
		orig.Invoke(self, damageInfo);
		if (DamageAPI.HasModdedDamageType(damageInfo, Prefabs.stickyBombHit) && Object.op_Implicit((Object)(object)self.body) && self.body.isFlying)
		{
			int num = Random.Range(0, 100);
			if ((float)num <= 6f / (5f * self.combinedHealthFraction))
			{
				SetStateOnHurt.SetStunOnObject(((Component)self.body).gameObject, 0.25f);
			}
		}
		if (DamageAPI.HasModdedDamageType(damageInfo, Prefabs.flashBombHit) && Object.op_Implicit((Object)(object)self.body))
		{
			SetStateOnHurt.SetStunOnObject(((Component)self.body).gameObject, 3f);
		}
	}

	private static void ProjectileController_Start(orig_Start orig, ProjectileController self)
	{
		orig.Invoke(self);
		if (!Object.op_Implicit((Object)(object)self) || !Object.op_Implicit((Object)(object)self) || !Object.op_Implicit((Object)(object)((Component)self).gameObject))
		{
			return;
		}
		if (((Object)((Component)self).gameObject).name.Contains("BomberAA") && Object.op_Implicit((Object)(object)self.owner))
		{
			AAController component = self.owner.GetComponent<AAController>();
			if (Object.op_Implicit((Object)(object)component))
			{
				component.bomb = ((Component)self).gameObject;
			}
		}
		if (((Object)((Component)self).gameObject).name.Contains("BomberStickyBombPrefab") && Object.op_Implicit((Object)(object)self.owner))
		{
			StickyBombController component2 = self.owner.GetComponent<StickyBombController>();
			if (Object.op_Implicit((Object)(object)component2))
			{
				if (component2.BombList.Count >= 6)
				{
					component2.BombList.FirstOrDefault().GetComponent<ProjectileExplosion>().Detonate();
					component2.BombList.RemoveAt(0);
				}
				component2.BombList.Add(((Component)self).gameObject);
			}
		}
		if (((Object)((Component)self).gameObject).name.Contains("BomberPoppyBomb") && Object.op_Implicit((Object)(object)self.owner))
		{
			StickyBombController component3 = self.owner.GetComponent<StickyBombController>();
			if (Object.op_Implicit((Object)(object)component3))
			{
				if (component3.PoppyBombList.Count >= 2)
				{
					component3.PoppyBombList.RemoveAt(0);
				}
				component3.PoppyBombList.Add(((Component)self).gameObject);
			}
		}
		if (!((Object)((Component)self).gameObject).name.Contains("BomberPulseBombProjectile") || !Object.op_Implicit((Object)(object)self.owner))
		{
			return;
		}
		TeamFilter component4 = ((Component)self).GetComponent<TeamFilter>();
		if (Object.op_Implicit((Object)(object)component4))
		{
			component4.teamIndex = (TeamIndex)2;
		}
		StickyBombController component5 = self.owner.GetComponent<StickyBombController>();
		if (Object.op_Implicit((Object)(object)component5))
		{
			if (component5.PulseBombList.Count >= 1)
			{
				component5.PulseBombList.RemoveAt(0);
			}
			component5.PulseBombList.Add(((Component)self).gameObject);
		}
	}
}
public static class ModCompat
{
	private static bool? emoteEnabled;

	private static bool? skillsEnabled;

	private static bool? ancientEnabled;

	public static bool EmoteAPIEnabled
	{
		get
		{
			if (!emoteEnabled.HasValue)
			{
				emoteEnabled = Chainloader.PluginInfos.ContainsKey("com.weliveinasociety.CustomEmotesAPI");
			}
			return emoteEnabled.Value;
		}
	}

	public static bool SkillsPlusPlusEnabled
	{
		get
		{
			if (!skillsEnabled.HasValue)
			{
				skillsEnabled = Chainloader.PluginInfos.ContainsKey("com.cwmlolzlz.skills");
			}
			return skillsEnabled.Value;
		}
	}

	public static bool AncientScepterEnabled
	{
		get
		{
			if (!ancientEnabled.HasValue)
			{
				ancientEnabled = Chainloader.PluginInfos.ContainsKey("com.DestroyedClone.AncientScepter");
			}
			return ancientEnabled.Value;
		}
	}

	public static void AddSkillsSupport()
	{
	}

	public static void AddEmoteSupport()
	{
	}
}
internal class Prefabs
{
	internal static GameObject stickybombPrefab;

	internal static GameObject stickybombGhostPrefab;

	internal static GameObject flashbombPrefab;

	internal static GameObject flashbombGhostPrefab;

	internal static GameObject flashbombGhostPrefab0;

	internal static GameObject poppybombPrefab;

	internal static GameObject Crosshair;

	internal static GameObject flashbombCrosshair;

	internal static GameObject AAPrefab;

	internal static GameObject AAGhostPrefab;

	internal static GameObject AAIndicator;

	internal static GameObject AAEffect;

	internal static GameObject DetonateEffect;

	internal static Material flashingbombmat1;

	internal static Material detonatemat;

	internal static ModdedDamageType stickyBombHit;

	internal static ModdedDamageType poppyBombHit;

	internal static ModdedDamageType flashBombHit;

	internal static BuffDef poppyBombBuff;

	internal static void CreatePrefabs()
	{
		CreateProjectilePrefabs();
		CreateCrosshairPrefab();
	}

	internal static T Load<T>(string path)
	{
		//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)
		return Addressables.LoadAssetAsync<T>((object)path).WaitForCompletion();
	}

	internal static GameObject Instantiate(string path, string name, bool registerNetwork = false)
	{
		return PrefabAPI.InstantiateClone(Load<GameObject>(path), name, registerNetwork);
	}

	internal static GameObject Instantiate(GameObject obj, string name, bool registerNetwork = false)
	{
		return PrefabAPI.InstantiateClone(obj, name, registerNetwork);
	}

	internal static void CreateCrosshairPrefab()
	{
		//IL_004d: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b1: Expected O, but got Unknown
		//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
		//IL_0154: 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_02a5: Unknown result type (might be due to invalid IL or missing references)
		//IL_02ab: Expected O, but got Unknown
		//IL_02c4: Unknown result type (might be due to invalid IL or missing references)
		//IL_02c9: Unknown result type (might be due to invalid IL or missing references)
		//IL_035e: Unknown result type (might be due to invalid IL or missing references)
		//IL_03ba: Unknown result type (might be due to invalid IL or missing references)
		//IL_03c1: Expected O, but got Unknown
		//IL_03db: Unknown result type (might be due to invalid IL or missing references)
		//IL_03e0: Unknown result type (might be due to invalid IL or missing references)
		//IL_0479: Unknown result type (might be due to invalid IL or missing references)
		GameObject val = Load<GameObject>("RoR2/Base/UI/StandardCrosshair.prefab");
		Crosshair = Instantiate(val, "BomberCrosshair");
		Object.Destroy((Object)(object)Crosshair.GetComponent<RawImage>());
		foreach (object item in Crosshair.transform)
		{
			Object.Destroy((Object)(object)((Component)(Transform)item).gameObject);
		}
		Crosshair.GetComponent<CrosshairController>().spriteSpreadPositions = Array.Empty<SpritePosition>();
		GameObject val2 = new GameObject("BomberCrosshairImage", new Type[1] { typeof(RectTransform) });
		Transform transform = val2.transform;
		RectTransform val3 = (RectTransform)(object)((transform is RectTransform) ? transform : null);
		((Transform)val3).localPosition = Vector2.op_Implicit(new Vector2(0f, 0f));
		val3.SetSizeWithCurrentAnchors((Axis)0, Bomber.crosshairSize.Value);
		val3.SetSizeWithCurrentAnchors((Axis)1, Bomber.crosshairSize.Value);
		val2.transform.SetParent(Crosshair.transform);
		val2.AddComponent<Image>().sprite = Assets.MainAssetBundle.LoadAsset<Sprite>("crosshairx128");
		val2.GetComponent<Image>().preserveAspect = true;
		((Transform)((Graphic)val2.GetComponent<Image>()).rectTransform).localPosition = new Vector3(0f, 0f, 0f);
		CreateRectTransform("BomberCrosshairStack1", Assets.MainAssetBundle.LoadAsset<Sprite>("crosshairStack1"));
		CreateRectTransform("BomberCrosshairStack2", Assets.MainAssetBundle.LoadAsset<Sprite>("crosshairStack2"));
		CreateRectTransform("BomberCrosshairStack3", Assets.MainAssetBundle.LoadAsset<Sprite>("crosshairStack3"));
		CreateRectTransform("BomberCrosshairStack4", Assets.MainAssetBundle.LoadAsset<Sprite>("crosshairStack4"));
		CreateRectTransform("BomberCrosshairStack5", Assets.MainAssetBundle.LoadAsset<Sprite>("crosshairStack5"));
		CreateRectTransform("BomberCrosshairStack6", Assets.MainAssetBundle.LoadAsset<Sprite>("crosshairStack6"));
		Crosshair.AddComponent<BomberCrosshairController>();
		flashbombCrosshair = PrefabAPI.InstantiateClone(val, "BomberFlashBombCrosshair", false);
		Object.Destroy((Object)(object)flashbombCrosshair.GetComponent<RawImage>());
		foreach (object item2 in flashbombCrosshair.transform)
		{
			Object.Destroy((Object)(object)((Component)(Transform)item2).gameObject);
		}
		flashbombCrosshair.GetComponent<CrosshairController>().spriteSpreadPositions = Array.Empty<SpritePosition>();
		GameObject val4 = new GameObject("BomberFlashbombCrosshairImage", new Type[1] { typeof(RectTransform) });
		Transform transform2 = val4.transform;
		RectTransform val5 = (RectTransform)(object)((transform2 is RectTransform) ? transform2 : null);
		((Transform)val5).localPosition = Vector2.op_Implicit(new Vector2(0f, 0f));
		val5.SetSizeWithCurrentAnchors((Axis)0, Bomber.cr