using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using R2API; using RoR2; using RoR2.CharacterAI; using RoR2.Navigation; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("PartySupplies")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("PartySupplies")] [assembly: AssemblyTitle("PartySupplies")] [assembly: AssemblyVersion("1.0.0.0")] namespace PartySupplies; [BepInPlugin("com.prizzys.partysupplies", "Party Supplies", "1.0.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class PartySuppliesPlugin : BaseUnityPlugin { private class ToxicVialInfectionData { public float expireTime; public float damageBonus; public GameObject markerObject; } private class PanicData { public CharacterBody attackerBody; public GameObject markerObject; public BaseAI aiComponent; public bool aiWasEnabled; public float expireTime; public float nextSpreadTime; public int generation; public float spreadChance; public float spreadRadius; } private class WorldDestroyerData { public Vector3 position; public CharacterBody attackerBody; public GameObject singularityObject; public float spawnTime; public float explodeTime; public float radius; public float damage; public float pullStrength; } private class RadioactiveHazardData { public CharacterBody attackerBody; public GameObject markerObject; public float expireTime; public float nextTickTime; public float radius; public float damage; } private class TeslaRelayData { public Vector3 position; public CharacterBody attackerBody; public GameObject relayObject; public float expireTime; public float nextZapTime; public float radius; public float damage; public int maxTargets; } private class ElectricOverloadData { public CharacterBody attackerBody; public GameObject markerObject; public float dischargeTime; } private class ElectricMarkerData { public GameObject markerObject; public float expireTime; } private class NapalmFirePoolData { public Vector3 position; public CharacterBody attackerBody; public GameObject fireObject; public float expireTime; public float nextTickTime; public float radius; public float damage; } private class ChemicalSpillData { public Vector3 position; public CharacterBody attackerBody; public GameObject spillObject; public float expireTime; public float nextTickTime; public float radius; public float damage; } public const string PluginGUID = "com.prizzys.partysupplies"; public const string PluginName = "Party Supplies"; public const string PluginVersion = "1.0.0"; public static ItemDef councilMomentumItem; public static ItemDef redBarItem; public static ItemDef perc30Item; public static ItemDef adderall30Item; public static ItemDef b707Item; public static ItemDef teslaPillItem; public static ItemDef narcanItem; public static ItemDef bloodBagItem; public static ItemDef bandAidItem; public static ItemDef vitaminBottleItem; public static ItemDef razorBladeItem; public static ItemDef vampireFangsItem; public static ItemDef dynamiteBundleItem; public static ItemDef toxicVialItem; public static ItemDef chemicalSpillItem; public static ItemDef napalmCanisterItem; public static ItemDef overchargedBatteryItem; public static ItemDef teslaRelayItem; public static ItemDef radioactiveHazardItem; public static ItemDef falseAlarmItem; public static ItemDef worldDestroyerItem; public static GameObject dynamiteBundlePickupPrefab; public static AssetBundle mainAssetBundle; public static GameObject redBarPickupPrefab; public static GameObject perc30PickupPrefab; public static GameObject adderall30PickupPrefab; public static GameObject b707PickupPrefab; public static GameObject teslaPillPickupPrefab; public static GameObject narcanPickupPrefab; public static GameObject councilMomentumPickupPrefab; public static GameObject bloodBagPickupPrefab; public static GameObject bandAidPickupPrefab; public static GameObject VitaminBottlePrefab; public static GameObject razorBladePickupPrefab; public static GameObject vampireFangsPickupPrefab; public static GameObject toxicVialPickupPrefab; public static GameObject toxicVialMarkerPrefab; public static GameObject chemicalSpillPickupPrefab; public static GameObject chemicalSpillPuddlePrefab; public static GameObject napalmCanisterPickupPrefab; public static GameObject napalmFirePoolPrefab; public static GameObject overchargedBatteryPickupPrefab; public static GameObject electricShockMarkerPrefab; public static GameObject teslaRelayPickupPrefab; public static GameObject teslaRelayDeployPrefab; public static GameObject radioactiveHazardPickupPrefab; public static GameObject radioactiveMarkerPrefab; public static GameObject falseAlarmPickupPrefab; public static GameObject panicMarkerPrefab; public static GameObject worldDestroyerPickupPrefab; public static GameObject worldDestroyerSingularityPrefab; private Dictionary dynamiteBurnedEnemies = new Dictionary(); private Dictionary toxicVialInfectedEnemies = new Dictionary(); private bool toxicVialApplyingBonusDamage = false; private List activeChemicalSpills = new List(); private bool chemicalSpillApplyingDamage = false; private List activeNapalmFirePools = new List(); private bool napalmApplyingDamage = false; private Dictionary overloadedEnemies = new Dictionary(); private List activeElectricMarkers = new List(); private bool electricApplyingDamage = false; private List activeTeslaRelays = new List(); private bool teslaRelayApplyingDamage = false; private Dictionary irradiatedEnemies = new Dictionary(); private bool radioactiveApplyingDamage = false; private Dictionary panickedEnemies = new Dictionary(); private Dictionary panicImmuneEnemies = new Dictionary(); private List activeWorldDestroyers = new List(); private bool worldDestroyerApplyingDamage = false; private Dictionary worldDestroyerHitCharges = new Dictionary(); public void Awake() { //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Expected O, but got Unknown LoadAssetBundle(); CreateItem(); CreateRedBarItem(); CreatePerc30Item(); CreateAdderall30Item(); CreateB707Item(); CreateTeslaPillItem(); CreateNarcanItem(); CreateBloodBagItem(); CreateBandAidItem(); CreateVitaminBottleItem(); CreateRazorBladeItem(); CreateVampireFangsItem(); CreateDynamiteBundleItem(); CreateToxicVialItem(); CreateChemicalSpillItem(); CreateNapalmCanisterItem(); CreateOverchargedBatteryItem(); CreateTeslaRelayItem(); CreateRadioactiveHazardItem(); CreateWorldDestroyerItem(); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(AddCouncilMomentumStats); GlobalEventManager.onCharacterDeathGlobal += NarcanRevive; GlobalEventManager.onCharacterDeathGlobal += BloodBagHealOnKill; GlobalEventManager.onServerDamageDealt += RazorBladeBleed; GlobalEventManager.onServerDamageDealt += VampireFangsHealOnCrit; GlobalEventManager.onServerDamageDealt += DynamiteBundleIgniteOnHit; GlobalEventManager.onCharacterDeathGlobal += DynamiteBundleExplodeOnDeath; GlobalEventManager.onServerDamageDealt += ToxicVialOnDamageDealt; GlobalEventManager.onServerDamageDealt += ChemicalSpillOnDamageDealt; GlobalEventManager.onServerDamageDealt += NapalmCanisterOnDamageDealt; GlobalEventManager.onServerDamageDealt += OverchargedBatteryOnDamageDealt; GlobalEventManager.onCharacterDeathGlobal += OverchargedBatteryExplodeOnDeath; GlobalEventManager.onServerDamageDealt += TeslaRelayOnDamageDealt; GlobalEventManager.onServerDamageDealt += RadioactiveHazardOnDamageDealt; GlobalEventManager.onCharacterDeathGlobal += RadioactiveHazardOnDeath; GlobalEventManager.onServerDamageDealt += WorldDestroyerOnDamageDealt; ((BaseUnityPlugin)this).Logger.LogInfo((object)"Party Supplies have been purchased :)"); } private void LoadAssetBundle() { //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) string text = Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location), "partysuppliesbundle"); mainAssetBundle = AssetBundle.LoadFromFile(text); if ((Object)(object)mainAssetBundle == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)("Failed to load AssetBundle at: " + text)); return; } ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded AssetBundle: partysuppliesbundle"); string[] allAssetNames = mainAssetBundle.GetAllAssetNames(); foreach (string text2 in allAssetNames) { ((BaseUnityPlugin)this).Logger.LogInfo((object)("AssetBundle contains: " + text2)); } redBarPickupPrefab = mainAssetBundle.LoadAsset("xanaxbarfinalcopy1"); if ((Object)(object)redBarPickupPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Failed to load red bar prefab from AssetBundle."); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded red bar pickup prefab."); } worldDestroyerPickupPrefab = mainAssetBundle.LoadAsset("WorldDestroyerPrefab"); if ((Object)(object)worldDestroyerPickupPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: WorldDestroyerPrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: WorldDestroyerPrefab"); } worldDestroyerSingularityPrefab = worldDestroyerPickupPrefab; falseAlarmPickupPrefab = mainAssetBundle.LoadAsset("FalseAlarmCleanPrefab"); if ((Object)(object)falseAlarmPickupPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: FalseAlarmPickPrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: FalseAlarmPickupPrefab"); } if ((Object)(object)falseAlarmPickupPrefab != (Object)null) { falseAlarmPickupPrefab.transform.localScale = Vector3.one * 0.15f; panicMarkerPrefab = falseAlarmPickupPrefab; } radioactiveHazardPickupPrefab = mainAssetBundle.LoadAsset("RadioactiveHazardPrefab"); if ((Object)(object)radioactiveHazardPickupPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: RadioactiveHazardPrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: RadioactiveHazardPrefab"); } radioactiveMarkerPrefab = mainAssetBundle.LoadAsset("RadioactiveMarkerPrefab"); if ((Object)(object)radioactiveMarkerPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: RadioactiveMarkerPrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: RadioactiveMarkerPrefab"); } teslaRelayPickupPrefab = mainAssetBundle.LoadAsset("TeslaRelayPickUpPrefab"); if ((Object)(object)teslaRelayPickupPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: TeslaRelayPrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: TeslaRelayPrefab"); } teslaRelayDeployPrefab = mainAssetBundle.LoadAsset("TeslaRelayPrefab"); if ((Object)(object)teslaRelayDeployPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: TeslaRelayPrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded deploy prefab."); } overchargedBatteryPickupPrefab = mainAssetBundle.LoadAsset("OverchargedBatteryPrefab"); if ((Object)(object)overchargedBatteryPickupPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: OverchargedBatteryPrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: OverchargedBatteryPrefab"); } electricShockMarkerPrefab = mainAssetBundle.LoadAsset("ElectricShockMarkerPrefab"); if ((Object)(object)electricShockMarkerPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: ElectricShockMarkerPrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: ElectricShockMarkerPrefab"); } napalmCanisterPickupPrefab = mainAssetBundle.LoadAsset("NapalmCanisterPrefab"); if ((Object)(object)napalmCanisterPickupPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: NapalmCanisterPrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: NapalmCanisterPrefab"); } napalmFirePoolPrefab = mainAssetBundle.LoadAsset("NapalmFirePoolPrefab"); if ((Object)(object)napalmFirePoolPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: NapalmFirePoolPrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: NapalmFirePoolPrefab"); } chemicalSpillPuddlePrefab = mainAssetBundle.LoadAsset("ChemicalSpillPuddlePrefab"); if ((Object)(object)chemicalSpillPuddlePrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: ChemicalSpillPuddlePrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: ChemicalSpillPuddlePrefab"); } chemicalSpillPickupPrefab = mainAssetBundle.LoadAsset("ChemicalSpillPrefab"); if ((Object)(object)chemicalSpillPickupPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: ChemicalSpillPrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: ChemicalSpillPrefab"); } toxicVialMarkerPrefab = mainAssetBundle.LoadAsset("ToxicVialMarkerPrefab"); if ((Object)(object)toxicVialMarkerPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: ToxicVialMarkerPrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: ToxicVialMarkerPrefab"); } toxicVialPickupPrefab = mainAssetBundle.LoadAsset("ToxicVialPrefab"); if ((Object)(object)toxicVialPickupPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: ToxicVialPrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: ToxicVialPrefab"); } dynamiteBundlePickupPrefab = mainAssetBundle.LoadAsset("DynamiteBundlePrefab"); if ((Object)(object)dynamiteBundlePickupPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: DynamiteBundlePrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: DynamiteBundlePrefab"); } vampireFangsPickupPrefab = mainAssetBundle.LoadAsset("VampireFangsPrefab"); if ((Object)(object)vampireFangsPickupPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: VampireFangsPrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: VampireFangsPrefab"); } razorBladePickupPrefab = mainAssetBundle.LoadAsset("RazorBladePrefab"); if ((Object)(object)razorBladePickupPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: RazorBladePrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: RazorBladePrefab"); } VitaminBottlePrefab = mainAssetBundle.LoadAsset("VitaminBottlePrefab"); if ((Object)(object)VitaminBottlePrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: VitaminBottlePrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: VitaminBottlePrefab"); } bandAidPickupPrefab = mainAssetBundle.LoadAsset("BandAidPrefab"); if ((Object)(object)bandAidPickupPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: BandAidPrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: BandAidPrefab"); } councilMomentumPickupPrefab = mainAssetBundle.LoadAsset("CouncilMomentumPrefab"); if ((Object)(object)councilMomentumPickupPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: CouncilMomentumPrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: CouncilMomentumPrefab"); } bloodBagPickupPrefab = mainAssetBundle.LoadAsset("BloodBagPrefab"); if ((Object)(object)bloodBagPickupPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: BloodBagPrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: BloodBagPrefab"); } narcanPickupPrefab = mainAssetBundle.LoadAsset("NarcanPrefab"); if ((Object)(object)narcanPickupPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: NarcanPrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: NarcanPrefab"); } teslaPillPickupPrefab = mainAssetBundle.LoadAsset("TeslaPillPrefab"); if ((Object)(object)teslaPillPickupPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: TeslaPillPrefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: TeslaPillPrefab"); } b707PickupPrefab = mainAssetBundle.LoadAsset("B707Prefab"); if ((Object)(object)b707PickupPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: B707Prefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: B707Prefab"); } perc30PickupPrefab = mainAssetBundle.LoadAsset("Perc30Prefab"); if ((Object)(object)perc30PickupPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: Perc30Prefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: Perc30Prefab"); } adderall30PickupPrefab = mainAssetBundle.LoadAsset("Addy30Prefab"); if ((Object)(object)adderall30PickupPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Could not load prefab: Addy30Prefab"); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded prefab: Addy30Prefab"); } } private void NarcanRevive(DamageReport damageReport) { //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) if (damageReport == null) { return; } CharacterBody victimBody = damageReport.victimBody; if ((Object)(object)victimBody == (Object)null || (Object)(object)victimBody.inventory == (Object)null) { return; } int itemCount = victimBody.inventory.GetItemCount(narcanItem); if (itemCount <= 0) { return; } CharacterMaster master = victimBody.master; if (!((Object)(object)master == (Object)null)) { victimBody.inventory.RemoveItem(narcanItem, 1); master.Respawn(((Component)victimBody).transform.position, ((Component)victimBody).transform.rotation, false); if ((Object)(object)master.GetBody() != (Object)null && (Object)(object)master.GetBody().healthComponent != (Object)null) { HealthComponent healthComponent = master.GetBody().healthComponent; healthComponent.health = healthComponent.fullHealth * 0.5f; healthComponent.shield = 0f; } ((BaseUnityPlugin)this).Logger.LogInfo((object)("Narcan revived: " + ((Object)victimBody).name)); } } private void WorldDestroyerOnDamageDealt(DamageReport damageReport) { //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: 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_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: 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_01e4: 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_0194: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) if (worldDestroyerApplyingDamage || damageReport == null || (Object)(object)damageReport.attackerBody == (Object)null || (Object)(object)damageReport.victimBody == (Object)null) { return; } CharacterBody attackerBody = damageReport.attackerBody; if ((Object)(object)attackerBody.inventory == (Object)null || (Object)(object)attackerBody.master == (Object)null || damageReport.damageInfo == null || damageReport.damageInfo.procCoefficient <= 0f) { return; } int itemCount = attackerBody.inventory.GetItemCount(worldDestroyerItem); if (itemCount <= 0) { return; } CharacterMaster master = attackerBody.master; if (!worldDestroyerHitCharges.ContainsKey(master)) { worldDestroyerHitCharges[master] = 0; } worldDestroyerHitCharges[master]++; if (worldDestroyerHitCharges[master] < 10) { return; } worldDestroyerHitCharges[master] = 0; Vector3 val = damageReport.victimBody.corePosition; NodeGraph groundNodes = SceneInfo.instance.groundNodes; if ((Object)(object)groundNodes != (Object)null) { NodeIndex val2 = groundNodes.FindClosestNode(val, (HullClassification)0, float.PositiveInfinity); if (val2 != NodeIndex.invalid) { groundNodes.GetNodePosition(val2, ref val); val += Vector3.up * 1.5f; } } GameObject val3 = null; if ((Object)(object)worldDestroyerSingularityPrefab != (Object)null) { val3 = Object.Instantiate(worldDestroyerSingularityPrefab, val, Quaternion.identity); val3.transform.localScale = Vector3.one * 4f; } WorldDestroyerData worldDestroyerData = new WorldDestroyerData(); worldDestroyerData.position = val; worldDestroyerData.attackerBody = attackerBody; worldDestroyerData.singularityObject = val3; worldDestroyerData.spawnTime = Time.time; worldDestroyerData.explodeTime = Time.time + 5f; worldDestroyerData.radius = 22f; worldDestroyerData.damage = attackerBody.damage * (8f + 2f * (float)(itemCount - 1)); worldDestroyerData.pullStrength = 10f; activeWorldDestroyers.Add(worldDestroyerData); ((BaseUnityPlugin)this).Logger.LogInfo((object)"World Destroyer singularity created."); } private void FalseAlarmOnDamageDealt(DamageReport damageReport) { if (damageReport == null || (Object)(object)damageReport.attackerBody == (Object)null || (Object)(object)damageReport.victimBody == (Object)null) { return; } CharacterBody attackerBody = damageReport.attackerBody; CharacterBody victimBody = damageReport.victimBody; CharacterMaster val = (((Object)(object)damageReport.victimMaster != (Object)null) ? damageReport.victimMaster : victimBody.master); if ((Object)(object)attackerBody.inventory == (Object)null || (Object)(object)val == (Object)null) { return; } int itemCount = attackerBody.inventory.GetItemCount(falseAlarmItem); if (itemCount > 0) { float num = 15f; if (Util.CheckRoll(num, attackerBody.master)) { float spreadChance = Mathf.Min(35f + 5f * (float)((itemCount - 1) / 3), 60f); float spreadRadius = 15f + (float)itemCount; PanicEnemy(attackerBody, victimBody, val, 1, spreadChance, spreadRadius); ((BaseUnityPlugin)this).Logger.LogInfo((object)("False Alarm panicked enemy: " + ((Object)victimBody).name)); } } } private void PanicEnemy(CharacterBody attackerBody, CharacterBody victimBody, CharacterMaster victimMaster, int generation, float spreadChance, float spreadRadius) { //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)attackerBody == (Object)null) && !((Object)(object)victimBody == (Object)null) && !((Object)(object)victimMaster == (Object)null) && generation <= 3 && (!panicImmuneEnemies.ContainsKey(victimMaster) || !(Time.time < panicImmuneEnemies[victimMaster])) && !panickedEnemies.ContainsKey(victimMaster)) { float num = 2f; if (victimBody.isChampion) { num = 0.5f; } BaseAI component = ((Component)victimMaster).GetComponent(); PanicData panicData = new PanicData(); panicData.attackerBody = attackerBody; panicData.markerObject = null; panicData.aiComponent = component; panicData.aiWasEnabled = (Object)(object)component != (Object)null && ((Behaviour)component).enabled; panicData.expireTime = Time.time + num; panicData.nextSpreadTime = Time.time + 1f; panicData.generation = generation; panicData.spreadChance = spreadChance; panicData.spreadRadius = spreadRadius; if ((Object)(object)component != (Object)null) { ((Behaviour)component).enabled = false; } if ((Object)(object)panicMarkerPrefab != (Object)null && (Object)(object)victimBody.coreTransform != (Object)null) { GameObject val = Object.Instantiate(panicMarkerPrefab); val.transform.SetParent(victimBody.coreTransform); val.transform.localPosition = new Vector3(0f, 2.5f, 0f); val.transform.localRotation = Quaternion.identity; val.transform.localScale = Vector3.one * 1f; panicData.markerObject = val; } panickedEnemies[victimMaster] = panicData; } } private void RadioactiveHazardOnDamageDealt(DamageReport damageReport) { if (radioactiveApplyingDamage || damageReport == null || (Object)(object)damageReport.attackerBody == (Object)null || (Object)(object)damageReport.victimBody == (Object)null) { return; } CharacterBody attackerBody = damageReport.attackerBody; CharacterBody victimBody = damageReport.victimBody; CharacterMaster val = (((Object)(object)damageReport.victimMaster != (Object)null) ? damageReport.victimMaster : victimBody.master); if ((Object)(object)attackerBody.inventory == (Object)null || (Object)(object)val == (Object)null) { return; } int itemCount = attackerBody.inventory.GetItemCount(radioactiveHazardItem); if (itemCount > 0) { float num = 10f * (float)itemCount; if (Util.CheckRoll(num, attackerBody.master)) { IrradiateEnemy(attackerBody, victimBody, val, itemCount); ((BaseUnityPlugin)this).Logger.LogInfo((object)("Radioactive Hazard irradiated enemy: " + ((Object)victimBody).name)); } } } private void IrradiateEnemy(CharacterBody attackerBody, CharacterBody victimBody, CharacterMaster victimMaster, int hazardCount) { //IL_0132: 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_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)attackerBody == (Object)null || (Object)(object)victimBody == (Object)null || (Object)(object)victimMaster == (Object)null) { return; } if (irradiatedEnemies.ContainsKey(victimMaster)) { RadioactiveHazardData radioactiveHazardData = irradiatedEnemies[victimMaster]; if (radioactiveHazardData != null && (Object)(object)radioactiveHazardData.markerObject != (Object)null) { Object.Destroy((Object)(object)radioactiveHazardData.markerObject); } irradiatedEnemies.Remove(victimMaster); } RadioactiveHazardData radioactiveHazardData2 = new RadioactiveHazardData(); radioactiveHazardData2.attackerBody = attackerBody; radioactiveHazardData2.markerObject = null; radioactiveHazardData2.expireTime = Time.time + 8f; radioactiveHazardData2.nextTickTime = Time.time + 1f; radioactiveHazardData2.radius = 8f + (float)hazardCount; radioactiveHazardData2.damage = attackerBody.damage * (0.5f + 0.15f * (float)hazardCount); if ((Object)(object)radioactiveMarkerPrefab != (Object)null && (Object)(object)victimBody.coreTransform != (Object)null) { GameObject val = Object.Instantiate(radioactiveMarkerPrefab); val.transform.SetParent(victimBody.coreTransform); val.transform.localPosition = new Vector3(0f, 2.5f, 0f); val.transform.localRotation = Quaternion.identity; val.transform.localScale = Vector3.one * 35f; radioactiveHazardData2.markerObject = val; } irradiatedEnemies[victimMaster] = radioactiveHazardData2; } private void RadioactiveHazardOnDeath(DamageReport damageReport) { //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: 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_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Expected O, but got Unknown //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Expected O, but got Unknown //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) if (damageReport == null || (Object)(object)damageReport.victimBody == (Object)null || (Object)(object)damageReport.victimMaster == (Object)null) { return; } CharacterMaster victimMaster = damageReport.victimMaster; if (!irradiatedEnemies.ContainsKey(victimMaster)) { return; } RadioactiveHazardData radioactiveHazardData = irradiatedEnemies[victimMaster]; irradiatedEnemies.Remove(victimMaster); if (radioactiveHazardData != null && (Object)(object)radioactiveHazardData.markerObject != (Object)null) { Object.Destroy((Object)(object)radioactiveHazardData.markerObject); } if (radioactiveHazardData == null || (Object)(object)radioactiveHazardData.attackerBody == (Object)null || (Object)(object)radioactiveHazardData.attackerBody.teamComponent == (Object)null) { return; } CharacterBody attackerBody = radioactiveHazardData.attackerBody; Vector3 corePosition = damageReport.victimBody.corePosition; int num = ((!((Object)(object)attackerBody.inventory != (Object)null)) ? 1 : attackerBody.inventory.GetItemCount(radioactiveHazardItem)); TeamMask allButNeutral = TeamMask.allButNeutral; ((TeamMask)(ref allButNeutral)).RemoveTeam(attackerBody.teamComponent.teamIndex); BullseyeSearch val = new BullseyeSearch(); val.teamMaskFilter = allButNeutral; val.filterByLoS = false; val.searchOrigin = corePosition; val.searchDirection = Vector3.up; val.maxDistanceFilter = 12f + (float)num; val.maxAngleFilter = 360f; val.sortMode = (SortMode)1; val.RefreshCandidates(); foreach (HurtBox result in val.GetResults()) { if (!((Object)(object)result == (Object)null) && !((Object)(object)result.healthComponent == (Object)null) && !((Object)(object)result.healthComponent.body == (Object)null)) { CharacterBody body = result.healthComponent.body; DamageInfo val2 = new DamageInfo(); val2.damage = attackerBody.damage * (1.2f + 0.25f * (float)num); val2.attacker = ((Component)attackerBody).gameObject; val2.inflictor = ((Component)attackerBody).gameObject; val2.position = body.corePosition; val2.force = Vector3.up * 300f; val2.procCoefficient = 0f; val2.crit = false; radioactiveApplyingDamage = true; body.healthComponent.TakeDamage(val2); radioactiveApplyingDamage = false; if ((Object)(object)body.master != (Object)null) { IrradiateEnemy(attackerBody, body, body.master, num); } } } ((BaseUnityPlugin)this).Logger.LogInfo((object)"Radioactive Hazard burst triggered."); } private void TeslaRelayOnDamageDealt(DamageReport damageReport) { //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) if (teslaRelayApplyingDamage || damageReport == null || (Object)(object)damageReport.attackerBody == (Object)null || (Object)(object)damageReport.victimBody == (Object)null) { return; } CharacterBody attackerBody = damageReport.attackerBody; if ((Object)(object)attackerBody.inventory == (Object)null) { return; } int itemCount = attackerBody.inventory.GetItemCount(teslaRelayItem); if (itemCount <= 0) { return; } float num = 15f; if (!Util.CheckRoll(num, attackerBody.master)) { return; } int num2 = 3; while (activeTeslaRelays.Count >= num2) { TeslaRelayData teslaRelayData = activeTeslaRelays[0]; if (teslaRelayData != null && (Object)(object)teslaRelayData.relayObject != (Object)null) { Object.Destroy((Object)(object)teslaRelayData.relayObject); } activeTeslaRelays.RemoveAt(0); } Vector3 val = damageReport.victimBody.corePosition; NodeGraph groundNodes = SceneInfo.instance.groundNodes; if ((Object)(object)groundNodes != (Object)null) { NodeIndex val2 = groundNodes.FindClosestNode(val, (HullClassification)0, float.PositiveInfinity); if (val2 != NodeIndex.invalid) { groundNodes.GetNodePosition(val2, ref val); val += Vector3.up * 0.1f; } } GameObject val3 = null; if ((Object)(object)teslaRelayDeployPrefab != (Object)null) { val3 = Object.Instantiate(teslaRelayDeployPrefab, val, Quaternion.identity); val3.transform.localScale = Vector3.one * 2.4f; } TeslaRelayData teslaRelayData2 = new TeslaRelayData(); teslaRelayData2.position = val; teslaRelayData2.attackerBody = attackerBody; teslaRelayData2.relayObject = val3; teslaRelayData2.expireTime = Time.time + 12f; teslaRelayData2.nextZapTime = Time.time + 1f; teslaRelayData2.radius = 9f + 1.5f * (float)itemCount; teslaRelayData2.damage = attackerBody.damage * (0.9f + 0.2f * (float)itemCount); teslaRelayData2.maxTargets = 3 + itemCount - 1; activeTeslaRelays.Add(teslaRelayData2); ((BaseUnityPlugin)this).Logger.LogInfo((object)("Tesla Relay deployed. Active relays: " + activeTeslaRelays.Count)); } private void OverchargedBatteryOnDamageDealt(DamageReport damageReport) { //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) if (electricApplyingDamage || damageReport == null || (Object)(object)damageReport.attackerBody == (Object)null || (Object)(object)damageReport.victimBody == (Object)null) { return; } CharacterBody attackerBody = damageReport.attackerBody; CharacterBody victimBody = damageReport.victimBody; CharacterMaster val = (((Object)(object)damageReport.victimMaster != (Object)null) ? damageReport.victimMaster : victimBody.master); if ((Object)(object)attackerBody.inventory == (Object)null || (Object)(object)val == (Object)null) { return; } int itemCount = attackerBody.inventory.GetItemCount(overchargedBatteryItem); if (itemCount <= 0) { return; } float num = 10f * (float)itemCount; if (Util.CheckRoll(num, attackerBody.master) && !overloadedEnemies.ContainsKey(val)) { ElectricOverloadData electricOverloadData = new ElectricOverloadData(); electricOverloadData.attackerBody = attackerBody; electricOverloadData.markerObject = null; electricOverloadData.dischargeTime = Time.time + 0.75f; if ((Object)(object)electricShockMarkerPrefab != (Object)null && (Object)(object)victimBody.coreTransform != (Object)null) { GameObject val2 = Object.Instantiate(electricShockMarkerPrefab); val2.transform.SetParent(victimBody.coreTransform); val2.transform.localPosition = new Vector3(0f, 2.5f, 0f); val2.transform.localRotation = Quaternion.identity; val2.transform.localScale = Vector3.one * 35f; electricOverloadData.markerObject = val2; } overloadedEnemies[val] = electricOverloadData; ((BaseUnityPlugin)this).Logger.LogInfo((object)("Enemy overloaded: " + ((Object)victimBody).name)); } } private void OverchargedBatteryExplodeOnDeath(DamageReport damageReport) { //IL_00b3: Unknown result type (might be due to invalid IL or missing references) if (damageReport == null || (Object)(object)damageReport.victimBody == (Object)null || (Object)(object)damageReport.victimMaster == (Object)null) { return; } CharacterMaster victimMaster = damageReport.victimMaster; if (overloadedEnemies.ContainsKey(victimMaster)) { ElectricOverloadData electricOverloadData = overloadedEnemies[victimMaster]; overloadedEnemies.Remove(victimMaster); if (electricOverloadData != null && (Object)(object)electricOverloadData.markerObject != (Object)null) { Object.Destroy((Object)(object)electricOverloadData.markerObject); } if (electricOverloadData != null && !((Object)(object)electricOverloadData.attackerBody == (Object)null)) { TriggerElectricDischarge(electricOverloadData.attackerBody, damageReport.victimBody.corePosition); ((BaseUnityPlugin)this).Logger.LogInfo((object)"Overloaded enemy died and exploded electrically."); } } } private void TriggerElectricDischarge(CharacterBody attackerBody, Vector3 dischargePosition) { //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Expected O, but got Unknown //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_00ad: 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_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: 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) //IL_0168: Expected O, but got Unknown //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)attackerBody == (Object)null || (Object)(object)attackerBody.inventory == (Object)null || (Object)(object)attackerBody.teamComponent == (Object)null) { return; } int itemCount = attackerBody.inventory.GetItemCount(overchargedBatteryItem); if (itemCount <= 0) { return; } int num = 5 + itemCount - 1; float maxDistanceFilter = 25f; float damage = attackerBody.damage * (1.5f + 0.25f * (float)itemCount); TeamMask allButNeutral = TeamMask.allButNeutral; ((TeamMask)(ref allButNeutral)).RemoveTeam(attackerBody.teamComponent.teamIndex); BullseyeSearch val = new BullseyeSearch(); val.teamMaskFilter = allButNeutral; val.filterByLoS = false; val.searchOrigin = dischargePosition; val.searchDirection = Vector3.up; val.maxDistanceFilter = maxDistanceFilter; val.maxAngleFilter = 360f; val.sortMode = (SortMode)1; val.RefreshCandidates(); int num2 = 0; foreach (HurtBox result in val.GetResults()) { if (num2 >= num) { break; } if (!((Object)(object)result == (Object)null) && !((Object)(object)result.healthComponent == (Object)null) && !((Object)(object)result.healthComponent.body == (Object)null)) { CharacterBody body = result.healthComponent.body; DamageInfo val2 = new DamageInfo(); val2.damage = damage; val2.attacker = ((Component)attackerBody).gameObject; val2.inflictor = ((Component)attackerBody).gameObject; val2.position = body.corePosition; val2.force = Vector3.up * 300f; val2.procCoefficient = 0f; val2.crit = false; electricApplyingDamage = true; body.healthComponent.TakeDamage(val2); electricApplyingDamage = false; SpawnTemporaryElectricMarker(body); num2++; } } ((BaseUnityPlugin)this).Logger.LogInfo((object)("Electric discharge hit " + num2 + " enemies.")); } private void SpawnTemporaryElectricMarker(CharacterBody targetBody) { //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)electricShockMarkerPrefab == (Object)null) && !((Object)(object)targetBody == (Object)null) && !((Object)(object)targetBody.coreTransform == (Object)null)) { GameObject val = Object.Instantiate(electricShockMarkerPrefab); val.transform.SetParent(targetBody.coreTransform); val.transform.localPosition = new Vector3(0f, 2.5f, 0f); val.transform.localRotation = Quaternion.identity; val.transform.localScale = Vector3.one * 30f; ElectricMarkerData electricMarkerData = new ElectricMarkerData(); electricMarkerData.markerObject = val; electricMarkerData.expireTime = Time.time + 1f; activeElectricMarkers.Add(electricMarkerData); } } private void NapalmCanisterOnDamageDealt(DamageReport damageReport) { //IL_00a5: 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_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: 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_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) if (napalmApplyingDamage || damageReport == null || (Object)(object)damageReport.attackerBody == (Object)null || (Object)(object)damageReport.victimBody == (Object)null) { return; } CharacterBody attackerBody = damageReport.attackerBody; if ((Object)(object)attackerBody.inventory == (Object)null) { return; } int itemCount = attackerBody.inventory.GetItemCount(napalmCanisterItem); if (itemCount <= 0) { return; } float num = 10f * (float)itemCount; if (!Util.CheckRoll(num, 0f, (CharacterMaster)null)) { return; } Vector3 val = damageReport.victimBody.corePosition; NodeGraph groundNodes = SceneInfo.instance.groundNodes; if ((Object)(object)groundNodes != (Object)null) { NodeIndex val2 = groundNodes.FindClosestNode(val, (HullClassification)0, float.PositiveInfinity); if (val2 != NodeIndex.invalid) { groundNodes.GetNodePosition(val2, ref val); val += Vector3.up * 0.1f; } } GameObject val3 = null; if ((Object)(object)napalmFirePoolPrefab != (Object)null) { val3 = Object.Instantiate(napalmFirePoolPrefab, val, Quaternion.identity); val3.transform.localScale = Vector3.one; } NapalmFirePoolData napalmFirePoolData = new NapalmFirePoolData(); napalmFirePoolData.position = val; napalmFirePoolData.attackerBody = attackerBody; napalmFirePoolData.fireObject = val3; napalmFirePoolData.expireTime = Time.time + 6f; napalmFirePoolData.nextTickTime = Time.time + 1f; napalmFirePoolData.radius = 8f; napalmFirePoolData.damage = attackerBody.damage * (1f + 0.25f * (float)itemCount); activeNapalmFirePools.Add(napalmFirePoolData); ((BaseUnityPlugin)this).Logger.LogInfo((object)"Napalm fire pool created."); } private void ChemicalSpillOnDamageDealt(DamageReport damageReport) { //IL_00a5: 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_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: 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_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) if (chemicalSpillApplyingDamage || damageReport == null || (Object)(object)damageReport.attackerBody == (Object)null || (Object)(object)damageReport.victimBody == (Object)null) { return; } CharacterBody attackerBody = damageReport.attackerBody; if ((Object)(object)attackerBody.inventory == (Object)null) { return; } int itemCount = attackerBody.inventory.GetItemCount(chemicalSpillItem); if (itemCount <= 0) { return; } float num = 10f * (float)itemCount; if (!Util.CheckRoll(num, 0f, (CharacterMaster)null)) { return; } Vector3 val = damageReport.victimBody.corePosition; NodeGraph groundNodes = SceneInfo.instance.groundNodes; if ((Object)(object)groundNodes != (Object)null) { NodeIndex val2 = groundNodes.FindClosestNode(val, (HullClassification)0, float.PositiveInfinity); if (val2 != NodeIndex.invalid) { groundNodes.GetNodePosition(val2, ref val); val += Vector3.up * 0.1f; } } GameObject val3 = null; if ((Object)(object)chemicalSpillPuddlePrefab != (Object)null) { val3 = Object.Instantiate(chemicalSpillPuddlePrefab, val, Quaternion.identity); val3.transform.localScale = Vector3.one; } ChemicalSpillData chemicalSpillData = new ChemicalSpillData(); chemicalSpillData.position = val; chemicalSpillData.attackerBody = attackerBody; chemicalSpillData.spillObject = val3; chemicalSpillData.expireTime = Time.time + 6f; chemicalSpillData.nextTickTime = Time.time + 1f; chemicalSpillData.radius = 8f; chemicalSpillData.damage = attackerBody.damage * (0.8f + 0.2f * (float)itemCount); activeChemicalSpills.Add(chemicalSpillData); ((BaseUnityPlugin)this).Logger.LogInfo((object)"Chemical Spill created."); } private void FixedUpdate() { //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Expected O, but got Unknown //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: 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_0111: 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_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0348: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_0363: Unknown result type (might be due to invalid IL or missing references) //IL_036a: Expected O, but got Unknown //IL_036c: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_037f: Unknown result type (might be due to invalid IL or missing references) //IL_0384: Unknown result type (might be due to invalid IL or missing references) //IL_038b: Unknown result type (might be due to invalid IL or missing references) //IL_0390: Unknown result type (might be due to invalid IL or missing references) //IL_03b3: 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_01ba: Expected O, but got Unknown //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: 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_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0426: Unknown result type (might be due to invalid IL or missing references) //IL_042d: Expected O, but got Unknown //IL_045b: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Unknown result type (might be due to invalid IL or missing references) //IL_0467: Unknown result type (might be due to invalid IL or missing references) //IL_046c: Unknown result type (might be due to invalid IL or missing references) //IL_04b8: Unknown result type (might be due to invalid IL or missing references) //IL_04dd: Unknown result type (might be due to invalid IL or missing references) //IL_06aa: Unknown result type (might be due to invalid IL or missing references) //IL_0834: Unknown result type (might be due to invalid IL or missing references) //IL_0839: Unknown result type (might be due to invalid IL or missing references) //IL_0844: Unknown result type (might be due to invalid IL or missing references) //IL_084f: Unknown result type (might be due to invalid IL or missing references) //IL_0856: Expected O, but got Unknown //IL_0858: Unknown result type (might be due to invalid IL or missing references) //IL_085a: Unknown result type (might be due to invalid IL or missing references) //IL_086b: Unknown result type (might be due to invalid IL or missing references) //IL_0870: Unknown result type (might be due to invalid IL or missing references) //IL_0877: Unknown result type (might be due to invalid IL or missing references) //IL_087c: Unknown result type (might be due to invalid IL or missing references) //IL_089f: Unknown result type (might be due to invalid IL or missing references) //IL_0b1c: Unknown result type (might be due to invalid IL or missing references) //IL_0b21: 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_0b37: Unknown result type (might be due to invalid IL or missing references) //IL_0b3e: Expected O, but got Unknown //IL_0b40: Unknown result type (might be due to invalid IL or missing references) //IL_0b42: 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_0b58: Unknown result type (might be due to invalid IL or missing references) //IL_0b5f: Unknown result type (might be due to invalid IL or missing references) //IL_0b64: Unknown result type (might be due to invalid IL or missing references) //IL_0b87: Unknown result type (might be due to invalid IL or missing references) //IL_092f: Unknown result type (might be due to invalid IL or missing references) //IL_0936: Expected O, but got Unknown //IL_097c: Unknown result type (might be due to invalid IL or missing references) //IL_0981: Unknown result type (might be due to invalid IL or missing references) //IL_0988: Unknown result type (might be due to invalid IL or missing references) //IL_0992: Unknown result type (might be due to invalid IL or missing references) //IL_0997: Unknown result type (might be due to invalid IL or missing references) //IL_0c0c: Unknown result type (might be due to invalid IL or missing references) //IL_0c13: Expected O, but got Unknown //IL_0c41: Unknown result type (might be due to invalid IL or missing references) //IL_0c46: Unknown result type (might be due to invalid IL or missing references) //IL_0c4d: Unknown result type (might be due to invalid IL or missing references) //IL_0c52: Unknown result type (might be due to invalid IL or missing references) //IL_0e0e: Unknown result type (might be due to invalid IL or missing references) //IL_0e1a: Unknown result type (might be due to invalid IL or missing references) //IL_0e1f: Unknown result type (might be due to invalid IL or missing references) //IL_0e24: Unknown result type (might be due to invalid IL or missing references) //IL_0e32: Unknown result type (might be due to invalid IL or missing references) //IL_0e34: Unknown result type (might be due to invalid IL or missing references) //IL_0e66: Unknown result type (might be due to invalid IL or missing references) //IL_0e6f: Unknown result type (might be due to invalid IL or missing references) //IL_0e79: Unknown result type (might be due to invalid IL or missing references) //IL_0e7e: Unknown result type (might be due to invalid IL or missing references) //IL_1272: Unknown result type (might be due to invalid IL or missing references) //IL_1279: Unknown result type (might be due to invalid IL or missing references) //IL_1290: Unknown result type (might be due to invalid IL or missing references) //IL_1306: Unknown result type (might be due to invalid IL or missing references) //IL_130b: Unknown result type (might be due to invalid IL or missing references) //IL_1316: Unknown result type (might be due to invalid IL or missing references) //IL_1321: Unknown result type (might be due to invalid IL or missing references) //IL_1328: Expected O, but got Unknown //IL_132a: Unknown result type (might be due to invalid IL or missing references) //IL_132c: Unknown result type (might be due to invalid IL or missing references) //IL_133d: Unknown result type (might be due to invalid IL or missing references) //IL_1342: Unknown result type (might be due to invalid IL or missing references) //IL_1349: Unknown result type (might be due to invalid IL or missing references) //IL_134e: Unknown result type (might be due to invalid IL or missing references) //IL_1371: Unknown result type (might be due to invalid IL or missing references) //IL_0f0c: Unknown result type (might be due to invalid IL or missing references) //IL_0f11: Unknown result type (might be due to invalid IL or missing references) //IL_0f1c: Unknown result type (might be due to invalid IL or missing references) //IL_0f27: Unknown result type (might be due to invalid IL or missing references) //IL_0f2e: Expected O, but got Unknown //IL_0f30: Unknown result type (might be due to invalid IL or missing references) //IL_0f32: Unknown result type (might be due to invalid IL or missing references) //IL_0f43: Unknown result type (might be due to invalid IL or missing references) //IL_0f48: Unknown result type (might be due to invalid IL or missing references) //IL_0f4f: Unknown result type (might be due to invalid IL or missing references) //IL_0f54: Unknown result type (might be due to invalid IL or missing references) //IL_0f77: Unknown result type (might be due to invalid IL or missing references) //IL_14de: Unknown result type (might be due to invalid IL or missing references) //IL_14e5: Expected O, but got Unknown //IL_14e7: Unknown result type (might be due to invalid IL or missing references) //IL_14e9: Unknown result type (might be due to invalid IL or missing references) //IL_14fa: Unknown result type (might be due to invalid IL or missing references) //IL_14ff: Unknown result type (might be due to invalid IL or missing references) //IL_1506: Unknown result type (might be due to invalid IL or missing references) //IL_150b: Unknown result type (might be due to invalid IL or missing references) //IL_152e: Unknown result type (might be due to invalid IL or missing references) //IL_13ff: Unknown result type (might be due to invalid IL or missing references) //IL_1406: Unknown result type (might be due to invalid IL or missing references) //IL_140b: Unknown result type (might be due to invalid IL or missing references) //IL_1410: Unknown result type (might be due to invalid IL or missing references) //IL_141e: Unknown result type (might be due to invalid IL or missing references) //IL_1420: Unknown result type (might be due to invalid IL or missing references) //IL_145b: Unknown result type (might be due to invalid IL or missing references) //IL_1464: Unknown result type (might be due to invalid IL or missing references) //IL_1471: Unknown result type (might be due to invalid IL or missing references) //IL_1476: Unknown result type (might be due to invalid IL or missing references) //IL_1486: Unknown result type (might be due to invalid IL or missing references) //IL_148b: Unknown result type (might be due to invalid IL or missing references) //IL_1494: Unknown result type (might be due to invalid IL or missing references) //IL_149e: Unknown result type (might be due to invalid IL or missing references) //IL_14a3: Unknown result type (might be due to invalid IL or missing references) //IL_15a4: Unknown result type (might be due to invalid IL or missing references) //IL_15ab: Expected O, but got Unknown //IL_15f1: Unknown result type (might be due to invalid IL or missing references) //IL_15f6: Unknown result type (might be due to invalid IL or missing references) //IL_15fd: Unknown result type (might be due to invalid IL or missing references) //IL_1607: Unknown result type (might be due to invalid IL or missing references) //IL_160c: Unknown result type (might be due to invalid IL or missing references) for (int num = activeChemicalSpills.Count - 1; num >= 0; num--) { ChemicalSpillData chemicalSpillData = activeChemicalSpills[num]; if (chemicalSpillData == null || Time.time > chemicalSpillData.expireTime) { if (chemicalSpillData != null && (Object)(object)chemicalSpillData.spillObject != (Object)null) { Object.Destroy((Object)(object)chemicalSpillData.spillObject); } activeChemicalSpills.RemoveAt(num); } else if (!(Time.time < chemicalSpillData.nextTickTime)) { chemicalSpillData.nextTickTime = Time.time + 1f; CharacterBody attackerBody = chemicalSpillData.attackerBody; if (!((Object)(object)attackerBody == (Object)null) && !((Object)(object)attackerBody.teamComponent == (Object)null)) { TeamMask allButNeutral = TeamMask.allButNeutral; ((TeamMask)(ref allButNeutral)).RemoveTeam(attackerBody.teamComponent.teamIndex); BullseyeSearch val = new BullseyeSearch(); val.teamMaskFilter = allButNeutral; val.filterByLoS = false; val.searchOrigin = chemicalSpillData.position; val.searchDirection = Vector3.up; val.maxDistanceFilter = chemicalSpillData.radius; val.maxAngleFilter = 360f; val.sortMode = (SortMode)1; val.RefreshCandidates(); foreach (HurtBox result in val.GetResults()) { if (!((Object)(object)result == (Object)null) && !((Object)(object)result.healthComponent == (Object)null) && !((Object)(object)result.healthComponent.body == (Object)null)) { CharacterBody body = result.healthComponent.body; DamageInfo val2 = new DamageInfo(); val2.damage = chemicalSpillData.damage; val2.attacker = ((Component)attackerBody).gameObject; val2.inflictor = ((Component)attackerBody).gameObject; val2.position = body.corePosition; val2.force = Vector3.zero; val2.procCoefficient = 0f; val2.crit = false; chemicalSpillApplyingDamage = true; body.healthComponent.TakeDamage(val2); chemicalSpillApplyingDamage = false; } } ((BaseUnityPlugin)this).Logger.LogInfo((object)"Chemical Spill tick damage applied."); } } } for (int num2 = activeNapalmFirePools.Count - 1; num2 >= 0; num2--) { NapalmFirePoolData napalmFirePoolData = activeNapalmFirePools[num2]; if (napalmFirePoolData == null || Time.time > napalmFirePoolData.expireTime) { if (napalmFirePoolData != null && (Object)(object)napalmFirePoolData.fireObject != (Object)null) { Object.Destroy((Object)(object)napalmFirePoolData.fireObject); } activeNapalmFirePools.RemoveAt(num2); } else if (!(Time.time < napalmFirePoolData.nextTickTime)) { napalmFirePoolData.nextTickTime = Time.time + 1f; CharacterBody attackerBody2 = napalmFirePoolData.attackerBody; if (!((Object)(object)attackerBody2 == (Object)null) && !((Object)(object)attackerBody2.teamComponent == (Object)null)) { TeamMask allButNeutral2 = TeamMask.allButNeutral; ((TeamMask)(ref allButNeutral2)).RemoveTeam(attackerBody2.teamComponent.teamIndex); BullseyeSearch val3 = new BullseyeSearch(); val3.teamMaskFilter = allButNeutral2; val3.filterByLoS = false; val3.searchOrigin = napalmFirePoolData.position; val3.searchDirection = Vector3.up; val3.maxDistanceFilter = napalmFirePoolData.radius; val3.maxAngleFilter = 360f; val3.sortMode = (SortMode)1; val3.RefreshCandidates(); foreach (HurtBox result2 in val3.GetResults()) { if (!((Object)(object)result2 == (Object)null) && !((Object)(object)result2.healthComponent == (Object)null) && !((Object)(object)result2.healthComponent.body == (Object)null)) { CharacterBody body2 = result2.healthComponent.body; DamageInfo val4 = new DamageInfo(); val4.damage = napalmFirePoolData.damage; val4.attacker = ((Component)attackerBody2).gameObject; val4.inflictor = ((Component)attackerBody2).gameObject; val4.position = body2.corePosition; val4.force = Vector3.zero; val4.procCoefficient = 0f; val4.crit = false; napalmApplyingDamage = true; body2.healthComponent.TakeDamage(val4); napalmApplyingDamage = false; if ((Object)(object)body2.healthComponent != (Object)null) { InflictDotInfo val5 = new InflictDotInfo { attackerObject = ((Component)attackerBody2).gameObject, victimObject = ((Component)body2).gameObject, dotIndex = (DotIndex)1, duration = 3f + 0.5f * (float)attackerBody2.inventory.GetItemCount(napalmCanisterItem), damageMultiplier = 1f }; DotController.InflictDot(ref val5); } } } ((BaseUnityPlugin)this).Logger.LogInfo((object)"Napalm fire pool tick damage applied."); } } } List list = new List(); foreach (KeyValuePair overloadedEnemy in overloadedEnemies) { if (overloadedEnemy.Value == null) { list.Add(overloadedEnemy.Key); } else if (Time.time >= overloadedEnemy.Value.dischargeTime) { list.Add(overloadedEnemy.Key); } } foreach (CharacterMaster item in list) { if (overloadedEnemies.ContainsKey(item)) { ElectricOverloadData electricOverloadData = overloadedEnemies[item]; overloadedEnemies.Remove(item); CharacterBody val6 = (((Object)(object)item != (Object)null) ? item.GetBody() : null); if (electricOverloadData != null && (Object)(object)electricOverloadData.markerObject != (Object)null) { Object.Destroy((Object)(object)electricOverloadData.markerObject); } if (electricOverloadData != null && !((Object)(object)electricOverloadData.attackerBody == (Object)null) && !((Object)(object)val6 == (Object)null)) { TriggerElectricDischarge(electricOverloadData.attackerBody, val6.corePosition); } } } for (int num3 = activeElectricMarkers.Count - 1; num3 >= 0; num3--) { ElectricMarkerData electricMarkerData = activeElectricMarkers[num3]; if (electricMarkerData == null || Time.time > electricMarkerData.expireTime) { if (electricMarkerData != null && (Object)(object)electricMarkerData.markerObject != (Object)null) { Object.Destroy((Object)(object)electricMarkerData.markerObject); } activeElectricMarkers.RemoveAt(num3); } } for (int num4 = activeTeslaRelays.Count - 1; num4 >= 0; num4--) { TeslaRelayData teslaRelayData = activeTeslaRelays[num4]; if (teslaRelayData == null || Time.time > teslaRelayData.expireTime) { if (teslaRelayData != null && (Object)(object)teslaRelayData.relayObject != (Object)null) { Object.Destroy((Object)(object)teslaRelayData.relayObject); } activeTeslaRelays.RemoveAt(num4); } else if (!(Time.time < teslaRelayData.nextZapTime)) { teslaRelayData.nextZapTime = Time.time + 1f; CharacterBody attackerBody3 = teslaRelayData.attackerBody; if (!((Object)(object)attackerBody3 == (Object)null) && !((Object)(object)attackerBody3.teamComponent == (Object)null)) { TeamMask allButNeutral3 = TeamMask.allButNeutral; ((TeamMask)(ref allButNeutral3)).RemoveTeam(attackerBody3.teamComponent.teamIndex); BullseyeSearch val7 = new BullseyeSearch(); val7.teamMaskFilter = allButNeutral3; val7.filterByLoS = false; val7.searchOrigin = teslaRelayData.position; val7.searchDirection = Vector3.up; val7.maxDistanceFilter = teslaRelayData.radius; val7.maxAngleFilter = 360f; val7.sortMode = (SortMode)1; val7.RefreshCandidates(); int num5 = 0; foreach (HurtBox result3 in val7.GetResults()) { if (num5 >= teslaRelayData.maxTargets) { break; } if (!((Object)(object)result3 == (Object)null) && !((Object)(object)result3.healthComponent == (Object)null) && !((Object)(object)result3.healthComponent.body == (Object)null)) { CharacterBody body3 = result3.healthComponent.body; DamageInfo val8 = new DamageInfo(); val8.damage = teslaRelayData.damage; val8.attacker = ((Component)attackerBody3).gameObject; val8.inflictor = (((Object)(object)teslaRelayData.relayObject != (Object)null) ? teslaRelayData.relayObject : ((Component)attackerBody3).gameObject); val8.position = body3.corePosition; val8.force = Vector3.up * 250f; val8.procCoefficient = 0f; val8.crit = false; teslaRelayApplyingDamage = true; body3.healthComponent.TakeDamage(val8); teslaRelayApplyingDamage = false; SpawnTemporaryElectricMarker(body3); num5++; } } ((BaseUnityPlugin)this).Logger.LogInfo((object)("Tesla Relay shocked " + num5 + " enemies.")); } } } List list2 = new List(); foreach (KeyValuePair irradiatedEnemy in irradiatedEnemies) { CharacterMaster key = irradiatedEnemy.Key; RadioactiveHazardData value = irradiatedEnemy.Value; if ((Object)(object)key == (Object)null || value == null || Time.time > value.expireTime) { list2.Add(key); continue; } CharacterBody body4 = key.GetBody(); if ((Object)(object)body4 == (Object)null || (Object)(object)value.attackerBody == (Object)null || (Object)(object)value.attackerBody.teamComponent == (Object)null) { list2.Add(key); } else { if (Time.time < value.nextTickTime) { continue; } value.nextTickTime = Time.time + 1f; CharacterBody attackerBody4 = value.attackerBody; TeamMask allButNeutral4 = TeamMask.allButNeutral; ((TeamMask)(ref allButNeutral4)).RemoveTeam(attackerBody4.teamComponent.teamIndex); BullseyeSearch val9 = new BullseyeSearch(); val9.teamMaskFilter = allButNeutral4; val9.filterByLoS = false; val9.searchOrigin = body4.corePosition; val9.searchDirection = Vector3.up; val9.maxDistanceFilter = value.radius; val9.maxAngleFilter = 360f; val9.sortMode = (SortMode)1; val9.RefreshCandidates(); foreach (HurtBox result4 in val9.GetResults()) { if (!((Object)(object)result4 == (Object)null) && !((Object)(object)result4.healthComponent == (Object)null) && !((Object)(object)result4.healthComponent.body == (Object)null)) { CharacterBody body5 = result4.healthComponent.body; if (!((Object)(object)body5 == (Object)(object)body4)) { DamageInfo val10 = new DamageInfo(); val10.damage = value.damage; val10.attacker = ((Component)attackerBody4).gameObject; val10.inflictor = ((Component)body4).gameObject; val10.position = body5.corePosition; val10.force = Vector3.zero; val10.procCoefficient = 0f; val10.crit = false; radioactiveApplyingDamage = true; body5.healthComponent.TakeDamage(val10); radioactiveApplyingDamage = false; } } } ((BaseUnityPlugin)this).Logger.LogInfo((object)"Radioactive Hazard aura ticked."); } } foreach (CharacterMaster item2 in list2) { if ((Object)(object)item2 != (Object)null && irradiatedEnemies.ContainsKey(item2)) { RadioactiveHazardData radioactiveHazardData = irradiatedEnemies[item2]; if (radioactiveHazardData != null && (Object)(object)radioactiveHazardData.markerObject != (Object)null) { Object.Destroy((Object)(object)radioactiveHazardData.markerObject); } irradiatedEnemies.Remove(item2); } } List list3 = new List(); foreach (KeyValuePair panickedEnemy in panickedEnemies) { CharacterMaster key2 = panickedEnemy.Key; PanicData value2 = panickedEnemy.Value; if ((Object)(object)key2 == (Object)null || value2 == null || Time.time > value2.expireTime) { list3.Add(key2); continue; } CharacterBody body6 = key2.GetBody(); if ((Object)(object)body6 == (Object)null || (Object)(object)value2.attackerBody == (Object)null) { list3.Add(key2); continue; } Vector3 val11 = body6.corePosition - value2.attackerBody.corePosition; val11.y = 0f; if (val11 != Vector3.zero && (Object)(object)body6.characterMotor != (Object)null) { ((Vector3)(ref val11)).Normalize(); body6.characterMotor.velocity = val11 * body6.moveSpeed * 1.75f; } if (Time.time < value2.nextSpreadTime) { continue; } value2.nextSpreadTime = Time.time + 1f; if (value2.generation >= 3 || !Util.CheckRoll(value2.spreadChance, 0f, (CharacterMaster)null)) { continue; } CharacterBody attackerBody5 = value2.attackerBody; if ((Object)(object)attackerBody5.teamComponent == (Object)null) { continue; } TeamMask allButNeutral5 = TeamMask.allButNeutral; ((TeamMask)(ref allButNeutral5)).RemoveTeam(attackerBody5.teamComponent.teamIndex); BullseyeSearch val12 = new BullseyeSearch(); val12.teamMaskFilter = allButNeutral5; val12.filterByLoS = false; val12.searchOrigin = body6.corePosition; val12.searchDirection = Vector3.up; val12.maxDistanceFilter = value2.spreadRadius; val12.maxAngleFilter = 360f; val12.sortMode = (SortMode)1; val12.RefreshCandidates(); foreach (HurtBox result5 in val12.GetResults()) { if (!((Object)(object)result5 == (Object)null) && !((Object)(object)result5.healthComponent == (Object)null) && !((Object)(object)result5.healthComponent.body == (Object)null)) { CharacterBody body7 = result5.healthComponent.body; CharacterMaster master = body7.master; if (!((Object)(object)master == (Object)null) && !((Object)(object)master == (Object)(object)key2) && !panickedEnemies.ContainsKey(master) && (!panicImmuneEnemies.ContainsKey(master) || !(Time.time < panicImmuneEnemies[master]))) { PanicEnemy(attackerBody5, body7, master, value2.generation + 1, value2.spreadChance, value2.spreadRadius); ((BaseUnityPlugin)this).Logger.LogInfo((object)("False Alarm panic spread to: " + ((Object)body7).name)); break; } } } } foreach (CharacterMaster item3 in list3) { if (!((Object)(object)item3 != (Object)null) || !panickedEnemies.ContainsKey(item3)) { continue; } PanicData panicData = panickedEnemies[item3]; if (panicData != null) { if ((Object)(object)panicData.markerObject != (Object)null) { Object.Destroy((Object)(object)panicData.markerObject); } if ((Object)(object)panicData.aiComponent != (Object)null) { ((Behaviour)panicData.aiComponent).enabled = panicData.aiWasEnabled; } } panicImmuneEnemies[item3] = Time.time + 5f; panickedEnemies.Remove(item3); } for (int num6 = activeWorldDestroyers.Count - 1; num6 >= 0; num6--) { WorldDestroyerData worldDestroyerData = activeWorldDestroyers[num6]; if (worldDestroyerData == null) { activeWorldDestroyers.RemoveAt(num6); } else { float num7 = 5f; float num8 = Time.time - worldDestroyerData.spawnTime; float num9 = Mathf.Clamp01(num8 / num7); if ((Object)(object)worldDestroyerData.singularityObject != (Object)null) { float num10 = Mathf.Lerp(4f, 10f, num9); if (num8 >= 4.7f) { num10 = 10f; } worldDestroyerData.singularityObject.transform.localScale = Vector3.one * num10; worldDestroyerData.singularityObject.transform.Rotate(Vector3.up, 180f * Time.fixedDeltaTime); } CharacterBody attackerBody6 = worldDestroyerData.attackerBody; if ((Object)(object)attackerBody6 == (Object)null || (Object)(object)attackerBody6.teamComponent == (Object)null) { if ((Object)(object)worldDestroyerData.singularityObject != (Object)null) { Object.Destroy((Object)(object)worldDestroyerData.singularityObject); } activeWorldDestroyers.RemoveAt(num6); } else { TeamMask allButNeutral6 = TeamMask.allButNeutral; ((TeamMask)(ref allButNeutral6)).RemoveTeam(attackerBody6.teamComponent.teamIndex); BullseyeSearch val13 = new BullseyeSearch(); val13.teamMaskFilter = allButNeutral6; val13.filterByLoS = false; val13.searchOrigin = worldDestroyerData.position; val13.searchDirection = Vector3.up; val13.maxDistanceFilter = worldDestroyerData.radius; val13.maxAngleFilter = 360f; val13.sortMode = (SortMode)1; val13.RefreshCandidates(); foreach (HurtBox result6 in val13.GetResults()) { if ((Object)(object)result6 == (Object)null || (Object)(object)result6.healthComponent == (Object)null || (Object)(object)result6.healthComponent.body == (Object)null) { continue; } CharacterBody body8 = result6.healthComponent.body; if (!((Object)(object)body8.characterMotor == (Object)null)) { Vector3 val14 = worldDestroyerData.position - body8.corePosition; val14.y = 0f; if (!(val14 == Vector3.zero)) { float magnitude = ((Vector3)(ref val14)).magnitude; ((Vector3)(ref val14)).Normalize(); float num11 = Mathf.Clamp01(1f - magnitude / worldDestroyerData.radius); Vector3 val15 = val14 * worldDestroyerData.pullStrength * (0.4f + num11); body8.characterMotor.velocity = Vector3.Lerp(body8.characterMotor.velocity, val14 * worldDestroyerData.pullStrength, 0.15f); } } } if (!(Time.time < worldDestroyerData.explodeTime)) { BullseyeSearch val16 = new BullseyeSearch(); val16.teamMaskFilter = allButNeutral6; val16.filterByLoS = false; val16.searchOrigin = worldDestroyerData.position; val16.searchDirection = Vector3.up; val16.maxDistanceFilter = worldDestroyerData.radius; val16.maxAngleFilter = 360f; val16.sortMode = (SortMode)1; val16.RefreshCandidates(); int num12 = 0; foreach (HurtBox result7 in val16.GetResults()) { if (!((Object)(object)result7 == (Object)null) && !((Object)(object)result7.healthComponent == (Object)null) && !((Object)(object)result7.healthComponent.body == (Object)null)) { CharacterBody body9 = result7.healthComponent.body; DamageInfo val17 = new DamageInfo(); val17.damage = worldDestroyerData.damage; val17.attacker = ((Component)attackerBody6).gameObject; val17.inflictor = (((Object)(object)worldDestroyerData.singularityObject != (Object)null) ? worldDestroyerData.singularityObject : ((Component)attackerBody6).gameObject); val17.position = body9.corePosition; val17.force = Vector3.up * 800f; val17.procCoefficient = 0f; val17.crit = false; worldDestroyerApplyingDamage = true; body9.healthComponent.TakeDamage(val17); worldDestroyerApplyingDamage = false; num12++; } } if ((Object)(object)worldDestroyerData.singularityObject != (Object)null) { Object.Destroy((Object)(object)worldDestroyerData.singularityObject); } activeWorldDestroyers.RemoveAt(num6); ((BaseUnityPlugin)this).Logger.LogInfo((object)("World Destroyer exploded and hit " + num12 + " enemies.")); } } } } } private void ToxicVialOnDamageDealt(DamageReport damageReport) { //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Expected O, but got Unknown //IL_014c: 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) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_02f9: Unknown result type (might be due to invalid IL or missing references) //IL_030b: Unknown result type (might be due to invalid IL or missing references) //IL_031d: Unknown result type (might be due to invalid IL or missing references) //IL_0327: Unknown result type (might be due to invalid IL or missing references) //IL_0348: Unknown result type (might be due to invalid IL or missing references) if (damageReport == null || (Object)(object)damageReport.victimBody == (Object)null) { return; } CharacterBody victimBody = damageReport.victimBody; CharacterMaster val = (((Object)(object)damageReport.victimMaster != (Object)null) ? damageReport.victimMaster : victimBody.master); if ((Object)(object)val == (Object)null) { return; } CharacterBody attackerBody = damageReport.attackerBody; if ((Object)(object)attackerBody == (Object)null || (Object)(object)attackerBody.inventory == (Object)null) { return; } int itemCount = attackerBody.inventory.GetItemCount(toxicVialItem); if (itemCount <= 0) { return; } if (!toxicVialApplyingBonusDamage && toxicVialInfectedEnemies.ContainsKey(val)) { ToxicVialInfectionData toxicVialInfectionData = toxicVialInfectedEnemies[val]; if (toxicVialInfectionData != null && Time.time <= toxicVialInfectionData.expireTime && (Object)(object)victimBody.healthComponent != (Object)null && damageReport.damageInfo != null) { float damage = damageReport.damageInfo.damage * toxicVialInfectionData.damageBonus; DamageInfo val2 = new DamageInfo(); val2.damage = damage; val2.attacker = ((Component)attackerBody).gameObject; val2.inflictor = ((Component)attackerBody).gameObject; val2.position = victimBody.corePosition; val2.force = Vector3.zero; val2.procCoefficient = 0f; val2.crit = false; toxicVialApplyingBonusDamage = true; victimBody.healthComponent.TakeDamage(val2); toxicVialApplyingBonusDamage = false; } else { if (toxicVialInfectionData != null && (Object)(object)toxicVialInfectionData.markerObject != (Object)null) { Object.Destroy((Object)(object)toxicVialInfectionData.markerObject); } toxicVialInfectedEnemies.Remove(val); } } float num = 10f * (float)itemCount; if (!Util.CheckRoll(num, 0f, (CharacterMaster)null)) { return; } ToxicVialInfectionData toxicVialInfectionData2 = new ToxicVialInfectionData(); toxicVialInfectionData2.expireTime = Time.time + 6f; toxicVialInfectionData2.damageBonus = 0.1f + 0.1f * (float)itemCount; toxicVialInfectionData2.markerObject = null; if (toxicVialInfectedEnemies.ContainsKey(val)) { ToxicVialInfectionData toxicVialInfectionData3 = toxicVialInfectedEnemies[val]; if (toxicVialInfectionData3 != null && (Object)(object)toxicVialInfectionData3.markerObject != (Object)null) { Object.Destroy((Object)(object)toxicVialInfectionData3.markerObject); } } if ((Object)(object)toxicVialMarkerPrefab == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"ToxicVialMarkerPrefab is NULL."); } else if ((Object)(object)victimBody.coreTransform == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Victim coreTransform is NULL."); } else { GameObject val3 = Object.Instantiate(toxicVialMarkerPrefab); val3.transform.SetParent(victimBody.coreTransform); val3.transform.localPosition = new Vector3(0f, 5f, 0f); val3.transform.localRotation = Quaternion.identity; val3.transform.localScale = Vector3.one * 50f; val3.transform.localPosition = new Vector3(0f, 2f, 0f); toxicVialInfectionData2.markerObject = val3; ((BaseUnityPlugin)this).Logger.LogInfo((object)("Toxic marker spawned above: " + ((Object)victimBody).name)); } toxicVialInfectedEnemies[val] = toxicVialInfectionData2; ((BaseUnityPlugin)this).Logger.LogInfo((object)("Toxic Vial infected enemy: " + ((Object)victimBody).name)); } private void DynamiteBundleIgniteOnHit(DamageReport damageReport) { if (damageReport == null) { return; } CharacterBody attackerBody = damageReport.attackerBody; CharacterBody victimBody = damageReport.victimBody; if ((Object)(object)attackerBody == (Object)null || (Object)(object)attackerBody.inventory == (Object)null || (Object)(object)victimBody == (Object)null || (Object)(object)victimBody.master == (Object)null) { return; } int itemCount = attackerBody.inventory.GetItemCount(dynamiteBundleItem); if (itemCount > 0) { float num = 10f * (float)itemCount; if (Util.CheckRoll(num, attackerBody.master)) { DotController.InflictDot(((Component)victimBody).gameObject, ((Component)attackerBody).gameObject, (HurtBox)null, (DotIndex)1, 4f, 1f, (uint?)null); dynamiteBurnedEnemies[victimBody.master] = attackerBody; ((BaseUnityPlugin)this).Logger.LogInfo((object)("Dynamite marked burned enemy: " + ((Object)victimBody).name)); } } } private void DynamiteBundleExplodeOnDeath(DamageReport damageReport) { //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: 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_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Expected O, but got Unknown //IL_011d: 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) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Expected O, but got Unknown //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) if (damageReport == null || (Object)(object)damageReport.victimBody == (Object)null || (Object)(object)damageReport.victimMaster == (Object)null) { return; } CharacterMaster victimMaster = damageReport.victimMaster; if (!dynamiteBurnedEnemies.ContainsKey(victimMaster)) { return; } CharacterBody val = dynamiteBurnedEnemies[victimMaster]; dynamiteBurnedEnemies.Remove(victimMaster); if ((Object)(object)val == (Object)null || (Object)(object)val.inventory == (Object)null || (Object)(object)val.teamComponent == (Object)null) { return; } int itemCount = val.inventory.GetItemCount(dynamiteBundleItem); if (itemCount <= 0) { return; } Vector3 corePosition = damageReport.victimBody.corePosition; float maxDistanceFilter = 8f; float damage = val.damage * (1.5f + 0.5f * (float)itemCount); ((BaseUnityPlugin)this).Logger.LogInfo((object)"Dynamite AOE explosion triggered!"); TeamMask allButNeutral = TeamMask.allButNeutral; ((TeamMask)(ref allButNeutral)).RemoveTeam(val.teamComponent.teamIndex); BullseyeSearch val2 = new BullseyeSearch(); val2.teamMaskFilter = allButNeutral; val2.filterByLoS = false; val2.searchOrigin = corePosition; val2.searchDirection = Vector3.up; val2.maxDistanceFilter = maxDistanceFilter; val2.maxAngleFilter = 360f; val2.sortMode = (SortMode)1; val2.RefreshCandidates(); foreach (HurtBox result in val2.GetResults()) { if (!((Object)(object)result == (Object)null) && !((Object)(object)result.healthComponent == (Object)null)) { CharacterBody body = result.healthComponent.body; if (!((Object)(object)body == (Object)null) && !((Object)(object)body.healthComponent == (Object)null)) { DamageInfo val3 = new DamageInfo(); val3.damage = damage; val3.attacker = ((Component)val).gameObject; val3.inflictor = ((Component)val).gameObject; val3.position = body.corePosition; val3.force = Vector3.up * 800f; val3.procCoefficient = 0.5f; val3.crit = false; body.healthComponent.TakeDamage(val3); } } } ((BaseUnityPlugin)this).Logger.LogInfo((object)"Dynamite AOE damage applied."); } private void VampireFangsHealOnCrit(DamageReport damageReport) { //IL_0081: 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) if (damageReport == null) { return; } CharacterBody attackerBody = damageReport.attackerBody; if (!((Object)(object)attackerBody == (Object)null) && !((Object)(object)attackerBody.inventory == (Object)null) && damageReport.damageInfo.crit) { int itemCount = attackerBody.inventory.GetItemCount(vampireFangsItem); if (itemCount > 0) { float num = 3f * (float)itemCount; attackerBody.healthComponent.Heal(num, default(ProcChainMask), true); } } } private void RazorBladeBleed(DamageReport damageReport) { if (damageReport == null) { return; } CharacterBody attackerBody = damageReport.attackerBody; CharacterBody victimBody = damageReport.victimBody; if ((Object)(object)attackerBody == (Object)null || (Object)(object)attackerBody.inventory == (Object)null || (Object)(object)victimBody == (Object)null) { return; } int itemCount = attackerBody.inventory.GetItemCount(razorBladeItem); if (itemCount > 0) { float num = 10f * (float)itemCount; if (Util.CheckRoll(num, attackerBody.master)) { DotController.InflictDot(((Component)victimBody).gameObject, ((Component)attackerBody).gameObject, (HurtBox)null, (DotIndex)0, 3f, 1f, (uint?)null); } } } private void BloodBagHealOnKill(DamageReport damageReport) { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) if (damageReport != null && !((Object)(object)damageReport.attackerBody == (Object)null)) { CharacterBody attackerBody = damageReport.attackerBody; int itemCount = attackerBody.inventory.GetItemCount(bloodBagItem); if (itemCount > 0) { float num = 3f * (float)itemCount; attackerBody.healthComponent.Heal(num, default(ProcChainMask), true); } } } private void CreateRedBarItem() { //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Expected O, but got Unknown redBarItem = ScriptableObject.CreateInstance(); ((Object)redBarItem).name = "RED_BAR"; redBarItem.nameToken = "RED_BAR_NAME"; redBarItem.pickupToken = "RED_BAR_PICKUP"; redBarItem.descriptionToken = "RED_BAR_DESC"; redBarItem.loreToken = "RED_BAR_LORE"; redBarItem.tier = (ItemTier)1; redBarItem.canRemove = true; redBarItem.hidden = false; redBarItem.pickupIconSprite = LoadSpriteFromEmbeddedResource("PartySupplies.Assets.redbar_icon.png"); LanguageAPI.Add("RED_BAR_NAME", "Red Devils"); LanguageAPI.Add("RED_BAR_PICKUP", "Take the edge off."); LanguageAPI.Add("RED_BAR_DESC", "Increase damage by 10% and critical strike chance by 5% per stack."); LanguageAPI.Add("RED_BAR_LORE", "Calm is power."); redBarItem.pickupModelPrefab = redBarPickupPrefab; ItemAPI.Add(new CustomItem("RED_BAR", "RED_BAR_NAME", "RED_BAR_DESC", "RED_BAR_LORE", "RED_BAR_PICKUP", LoadSpriteFromEmbeddedResource("PartySupplies.Assets.redbar_icon.png"), redBarPickupPrefab, (ItemTier)1, (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }, true, false, (UnlockableDef)null, CreateDisplayRules())); } private void CreateWorldDestroyerItem() { //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Expected O, but got Unknown worldDestroyerItem = ScriptableObject.CreateInstance(); ((Object)worldDestroyerItem).name = "WORLD_DESTROYER"; worldDestroyerItem.nameToken = "WORLD_DESTROYER_NAME"; worldDestroyerItem.pickupToken = "WORLD_DESTROYER_PICKUP"; worldDestroyerItem.descriptionToken = "WORLD_DESTROYER_DESC"; worldDestroyerItem.loreToken = "WORLD_DESTROYER_LORE"; worldDestroyerItem.canRemove = true; worldDestroyerItem.hidden = false; LanguageAPI.Add("WORLD_DESTROYER_NAME", "World Destroyer"); LanguageAPI.Add("WORLD_DESTROYER_PICKUP", "Create unstable singularities on hit."); LanguageAPI.Add("WORLD_DESTROYER_DESC", "Every 10th hit creates a singularity that pulls enemies inward for 5 seconds, then detonates for 800% base damage. Damage increases with stacks."); LanguageAPI.Add("WORLD_DESTROYER_LORE", "A small world. A smaller warning."); ItemAPI.Add(new CustomItem("WORLD_DESTROYER", "WORLD_DESTROYER_NAME", "WORLD_DESTROYER_DESC", "WORLD_DESTROYER_LORE", "WORLD_DESTROYER_PICKUP", LoadSpriteFromEmbeddedResource("PartySupplies.Assets.worlddestroyer_icon.png"), worldDestroyerPickupPrefab, (ItemTier)1, (ItemTag[])(object)new ItemTag[2] { (ItemTag)1, (ItemTag)3 }, true, false, (UnlockableDef)null, CreateDisplayRules())); } private void CreateFalseAlarmItem() { //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Expected O, but got Unknown falseAlarmItem = ScriptableObject.CreateInstance(); ((Object)falseAlarmItem).name = "FALSE_ALARM"; falseAlarmItem.nameToken = "FALSE_ALARM_NAME"; falseAlarmItem.pickupToken = "FALSE_ALARM_PICKUP"; falseAlarmItem.descriptionToken = "FALSE_ALARM_DESC"; falseAlarmItem.loreToken = "FALSE_ALARM_LORE"; falseAlarmItem.canRemove = true; falseAlarmItem.hidden = false; LanguageAPI.Add("FALSE_ALARM_NAME", "False Alarm"); LanguageAPI.Add("FALSE_ALARM_PICKUP", "Cause enemies to panic."); LanguageAPI.Add("FALSE_ALARM_DESC", "Gain a 15% chance on hit to panic enemies for 2 seconds. Panicked enemies can spread panic to nearby enemies. Spread chance and radius improve with stacks."); LanguageAPI.Add("FALSE_ALARM_LORE", "Somebody always runs."); ItemAPI.Add(new CustomItem("FALSE_ALARM", "FALSE_ALARM_NAME", "FALSE_ALARM_DESC", "FALSE_ALARM_LORE", "FALSE_ALARM_PICKUP", LoadSpriteFromEmbeddedResource("PartySupplies.Assets.falsealarm_icon.png"), falseAlarmPickupPrefab, (ItemTier)1, (ItemTag[])(object)new ItemTag[1] { (ItemTag)3 }, true, false, (UnlockableDef)null, CreateDisplayRules())); } private void CreateRadioactiveHazardItem() { //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Expected O, but got Unknown radioactiveHazardItem = ScriptableObject.CreateInstance(); ((Object)radioactiveHazardItem).name = "RADIOACTIVE_HAZARD"; radioactiveHazardItem.nameToken = "RADIOACTIVE_HAZARD_NAME"; radioactiveHazardItem.pickupToken = "RADIOACTIVE_HAZARD_PICKUP"; radioactiveHazardItem.descriptionToken = "RADIOACTIVE_HAZARD_DESC"; radioactiveHazardItem.loreToken = "RADIOACTIVE_HAZARD_LORE"; radioactiveHazardItem.canRemove = true; radioactiveHazardItem.hidden = false; LanguageAPI.Add("RADIOACTIVE_HAZARD_NAME", "Radioactive Hazard"); LanguageAPI.Add("RADIOACTIVE_HAZARD_PICKUP", "Irradiate enemies on hit."); LanguageAPI.Add("RADIOACTIVE_HAZARD_DESC", "Gain a 10% chance to irradiate enemies on hit. Irradiated enemies damage nearby enemies every second. If they die while irradiated, they burst and irradiate nearby enemies."); LanguageAPI.Add("RADIOACTIVE_HAZARD_LORE", "Warning signs were posted. Nobody listened."); ItemAPI.Add(new CustomItem("RADIOACTIVE_HAZARD", "RADIOACTIVE_HAZARD_NAME", "RADIOACTIVE_HAZARD_DESC", "RADIOACTIVE_HAZARD_LORE", "RADIOACTIVE_HAZARD_PICKUP", LoadSpriteFromEmbeddedResource("PartySupplies.Assets.radioactivehazard_icon.png"), radioactiveHazardPickupPrefab, (ItemTier)1, (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }, true, false, (UnlockableDef)null, CreateDisplayRules())); } private void CreateTeslaRelayItem() { //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Expected O, but got Unknown teslaRelayItem = ScriptableObject.CreateInstance(); ((Object)teslaRelayItem).name = "TESLA_RELAY"; teslaRelayItem.nameToken = "TESLA_RELAY_NAME"; teslaRelayItem.pickupToken = "TESLA_RELAY_PICKUP"; teslaRelayItem.descriptionToken = "TESLA_RELAY_DESC"; teslaRelayItem.loreToken = "TESLA_RELAY_LORE"; teslaRelayItem.canRemove = true; teslaRelayItem.hidden = false; LanguageAPI.Add("TESLA_RELAY_NAME", "Tesla Relay"); LanguageAPI.Add("TESLA_RELAY_PICKUP", "Deploy an electrical relay on hit."); LanguageAPI.Add("TESLA_RELAY_DESC", "Every 10 hits, deploy a Tesla Relay. Up to 3 relays can exist at once. Relays last 12 seconds and shock up to 3 enemies every second."); LanguageAPI.Add("TESLA_RELAY_LORE", "Area denial, powered by unstable voltage."); ItemAPI.Add(new CustomItem("TESLA_RELAY", "TESLA_RELAY_NAME", "TESLA_RELAY_DESC", "TESLA_RELAY_LORE", "TESLA_RELAY_PICKUP", LoadSpriteFromEmbeddedResource("PartySupplies.Assets.teslarelay_icon.png"), teslaRelayPickupPrefab, (ItemTier)1, (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }, true, false, (UnlockableDef)null, CreateDisplayRules())); } private void CreateOverchargedBatteryItem() { //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Expected O, but got Unknown overchargedBatteryItem = ScriptableObject.CreateInstance(); ((Object)overchargedBatteryItem).name = "OVERCHARGED_BATTERY"; overchargedBatteryItem.nameToken = "OVERCHARGED_BATTERY_NAME"; overchargedBatteryItem.pickupToken = "OVERCHARGED_BATTERY_PICKUP"; overchargedBatteryItem.descriptionToken = "OVERCHARGED_BATTERY_DESC"; overchargedBatteryItem.loreToken = "OVERCHARGED_BATTERY_LORE"; overchargedBatteryItem.canRemove = true; overchargedBatteryItem.hidden = false; LanguageAPI.Add("OVERCHARGED_BATTERY_NAME", "Overcharged Battery"); LanguageAPI.Add("OVERCHARGED_BATTERY_PICKUP", "Overload enemies with unstable electricity."); LanguageAPI.Add("OVERCHARGED_BATTERY_DESC", "Gain a 10% chance to overload enemies on hit. Overloaded enemies discharge electricity to up to 5 nearby enemies. If they die before discharging, they explode instantly."); LanguageAPI.Add("OVERCHARGED_BATTERY_LORE", "Stored power always finds a way out."); ItemAPI.Add(new CustomItem("OVERCHARGED_BATTERY", "OVERCHARGED_BATTERY_NAME", "OVERCHARGED_BATTERY_DESC", "OVERCHARGED_BATTERY_LORE", "OVERCHARGED_BATTERY_PICKUP", LoadSpriteFromEmbeddedResource("PartySupplies.Assets.overchargedbattery_icon.png"), overchargedBatteryPickupPrefab, (ItemTier)1, (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }, true, false, (UnlockableDef)null, CreateDisplayRules())); } private void CreateNapalmCanisterItem() { //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Expected O, but got Unknown napalmCanisterItem = ScriptableObject.CreateInstance(); ((Object)napalmCanisterItem).name = "NAPALM_CANISTER"; napalmCanisterItem.nameToken = "NAPALM_CANISTER_NAME"; napalmCanisterItem.pickupToken = "NAPALM_CANISTER_PICKUP"; napalmCanisterItem.descriptionToken = "NAPALM_CANISTER_DESC"; napalmCanisterItem.loreToken = "NAPALM_CANISTER_LORE"; napalmCanisterItem.canRemove = true; napalmCanisterItem.hidden = false; LanguageAPI.Add("NAPALM_CANISTER_NAME", "Napalm Canister"); LanguageAPI.Add("NAPALM_CANISTER_PICKUP", "Ignite the ground on hit."); LanguageAPI.Add("NAPALM_CANISTER_DESC", "Gain a 10% chance to create a pool of burning napalm on hit. Enemies standing in napalm take damage every second."); LanguageAPI.Add("NAPALM_CANISTER_LORE", "Sticky fire. Zero containment."); ItemAPI.Add(new CustomItem("NAPALM_CANISTER", "NAPALM_CANISTER_NAME", "NAPALM_CANISTER_DESC", "NAPALM_CANISTER_LORE", "NAPALM_CANISTER_PICKUP", LoadSpriteFromEmbeddedResource("PartySupplies.Assets.napalm_icon.png"), napalmCanisterPickupPrefab, (ItemTier)1, (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }, true, false, (UnlockableDef)null, CreateDisplayRules())); } private void CreateChemicalSpillItem() { //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Expected O, but got Unknown chemicalSpillItem = ScriptableObject.CreateInstance(); ((Object)chemicalSpillItem).name = "CHEMICAL_SPILL"; chemicalSpillItem.nameToken = "CHEMICAL_SPILL_NAME"; chemicalSpillItem.pickupToken = "CHEMICAL_SPILL_PICKUP"; chemicalSpillItem.descriptionToken = "CHEMICAL_SPILL_DESC"; chemicalSpillItem.loreToken = "CHEMICAL_SPILL_LORE"; chemicalSpillItem.canRemove = true; chemicalSpillItem.hidden = false; LanguageAPI.Add("CHEMICAL_SPILL_NAME", "Chemical Spill"); LanguageAPI.Add("CHEMICAL_SPILL_PICKUP", "Spill toxic waste on hit."); LanguageAPI.Add("CHEMICAL_SPILL_DESC", "Gain a 10% chance to spill toxic sludge on hit. Enemies standing in sludge take damage every second."); LanguageAPI.Add("CHEMICAL_SPILL_LORE", "Containment failed."); ItemAPI.Add(new CustomItem("CHEMICAL_SPILL", "CHEMICAL_SPILL_NAME", "CHEMICAL_SPILL_DESC", "CHEMICAL_SPILL_LORE", "CHEMICAL_SPILL_PICKUP", LoadSpriteFromEmbeddedResource("PartySupplies.Assets.chemicalspill_icon.png"), chemicalSpillPickupPrefab, (ItemTier)1, (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }, true, false, (UnlockableDef)null, CreateDisplayRules())); } private void CreateToxicVialItem() { //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Expected O, but got Unknown toxicVialItem = ScriptableObject.CreateInstance(); ((Object)toxicVialItem).name = "TOXIC_VIAL"; toxicVialItem.nameToken = "TOXIC_VIAL_NAME"; toxicVialItem.pickupToken = "TOXIC_VIAL_PICKUP"; toxicVialItem.descriptionToken = "TOXIC_VIAL_DESC"; toxicVialItem.loreToken = "TOXIC_VIAL_LORE"; toxicVialItem.canRemove = true; toxicVialItem.hidden = false; LanguageAPI.Add("TOXIC_VIAL_NAME", "Toxic Vial"); LanguageAPI.Add("TOXIC_VIAL_PICKUP", "Infect enemies, making them take increased damage."); LanguageAPI.Add("TOXIC_VIAL_DESC", "Gain a 10% chance to infect enemies on hit. Infected enemies take 20% increased damage. Damage increase improves by 10% per stack."); LanguageAPI.Add("TOXIC_VIAL_LORE", "Do not inhale. Do not touch. Do not drop."); ItemAPI.Add(new CustomItem("TOXIC_VIAL", "TOXIC_VIAL_NAME", "TOXIC_VIAL_DESC", "TOXIC_VIAL_LORE", "TOXIC_VIAL_PICKUP", LoadSpriteFromEmbeddedResource("PartySupplies.Assets.toxicvial_icon.png"), toxicVialPickupPrefab, (ItemTier)1, (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }, true, false, (UnlockableDef)null, CreateDisplayRules())); } private void CreateDynamiteBundleItem() { //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Expected O, but got Unknown dynamiteBundleItem = ScriptableObject.CreateInstance(); ((Object)dynamiteBundleItem).name = "DYNAMITE_BUNDLE"; dynamiteBundleItem.nameToken = "DYNAMITE_BUNDLE_NAME"; dynamiteBundleItem.pickupToken = "DYNAMITE_BUNDLE_PICKUP"; dynamiteBundleItem.descriptionToken = "DYNAMITE_BUNDLE_DESC"; dynamiteBundleItem.loreToken = "DYNAMITE_BUNDLE_LORE"; dynamiteBundleItem.canRemove = true; dynamiteBundleItem.hidden = false; LanguageAPI.Add("DYNAMITE_BUNDLE_NAME", "Dynamite Bundle"); LanguageAPI.Add("DYNAMITE_BUNDLE_PICKUP", "Light them up."); LanguageAPI.Add("DYNAMITE_BUNDLE_DESC", "Gain a 10% chance to ignite enemies on hit. Enemies ignited by Dynamite Bundle explode on death."); LanguageAPI.Add("DYNAMITE_BUNDLE_LORE", "Handle with confidence. Or don't."); ItemAPI.Add(new CustomItem("DYNAMITE_BUNDLE", "DYNAMITE_BUNDLE_NAME", "DYNAMITE_BUNDLE_DESC", "DYNAMITE_BUNDLE_LORE", "DYNAMITE_BUNDLE_PICKUP", LoadSpriteFromEmbeddedResource("PartySupplies.Assets.dynamitebundle_icon.png"), dynamiteBundlePickupPrefab, (ItemTier)0, (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }, true, false, (UnlockableDef)null, CreateDisplayRules())); } private void CreateVampireFangsItem() { //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Expected O, but got Unknown vampireFangsItem = ScriptableObject.CreateInstance(); ((Object)vampireFangsItem).name = "VAMPIRE_FANGS"; vampireFangsItem.nameToken = "VAMPIRE_FANGS_NAME"; vampireFangsItem.pickupToken = "VAMPIRE_FANGS_PICKUP"; vampireFangsItem.descriptionToken = "VAMPIRE_FANGS_DESC"; vampireFangsItem.loreToken = "VAMPIRE_FANGS_LORE"; vampireFangsItem.canRemove = true; vampireFangsItem.hidden = false; LanguageAPI.Add("VAMPIRE_FANGS_NAME", "Vampire Fangs"); LanguageAPI.Add("VAMPIRE_FANGS_PICKUP", "Critical strikes restore health."); LanguageAPI.Add("VAMPIRE_FANGS_DESC", "Gain 5% critical chance. Critical strikes heal for 3 health. Both effects increase per stack."); LanguageAPI.Add("VAMPIRE_FANGS_LORE", "The bite always takes something back."); ItemAPI.Add(new CustomItem("VAMPIRE_FANGS", "VAMPIRE_FANGS_NAME", "VAMPIRE_FANGS_DESC", "VAMPIRE_FANGS_LORE", "VAMPIRE_FANGS_PICKUP", LoadSpriteFromEmbeddedResource("PartySupplies.Assets.vampirefangs_icon.png"), vampireFangsPickupPrefab, (ItemTier)0, (ItemTag[])(object)new ItemTag[2] { (ItemTag)2, (ItemTag)1 }, true, false, (UnlockableDef)null, CreateDisplayRules())); } private void CreateRazorBladeItem() { //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Expected O, but got Unknown razorBladeItem = ScriptableObject.CreateInstance(); ((Object)razorBladeItem).name = "RAZOR_BLADE"; razorBladeItem.nameToken = "RAZOR_BLADE_NAME"; razorBladeItem.pickupToken = "RAZOR_BLADE_PICKUP"; razorBladeItem.descriptionToken = "RAZOR_BLADE_DESC"; razorBladeItem.loreToken = "RAZOR_BLADE_LORE"; razorBladeItem.canRemove = true; razorBladeItem.hidden = false; LanguageAPI.Add("RAZOR_BLADE_NAME", "Razor Blade"); LanguageAPI.Add("RAZOR_BLADE_PICKUP", "Cut deeper."); LanguageAPI.Add("RAZOR_BLADE_DESC", "Gain a 10% chance to inflict Bleed on hit. Chance increases by 10% per stack."); LanguageAPI.Add("RAZOR_BLADE_LORE", "Clean edge. Dirty work."); ItemAPI.Add(new CustomItem("RAZOR_BLADE", "RAZOR_BLADE_NAME", "RAZOR_BLADE_DESC", "RAZOR_BLADE_LORE", "RAZOR_BLADE_PICKUP", LoadSpriteFromEmbeddedResource("PartySupplies.Assets.razorblade_icon.png"), razorBladePickupPrefab, (ItemTier)0, (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }, true, false, (UnlockableDef)null, CreateDisplayRules())); } private void CreateBandAidItem() { //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Expected O, but got Unknown bandAidItem = ScriptableObject.CreateInstance(); ((Object)bandAidItem).name = "BAND_AID"; bandAidItem.nameToken = "BAND_AID_NAME"; bandAidItem.pickupToken = "BAND_AID_PICKUP"; bandAidItem.descriptionToken = "BAND_AID_DESC"; bandAidItem.loreToken = "BAND_AID_LORE"; bandAidItem.canRemove = true; bandAidItem.hidden = false; LanguageAPI.Add("BAND_AID_NAME", "Band-Aid"); LanguageAPI.Add("BAND_AID_PICKUP", "Patch yourself up."); LanguageAPI.Add("BAND_AID_DESC", "Increase health regeneration by 2.5 hp/s per stack."); LanguageAPI.Add("BAND_AID_LORE", "Good enough."); ItemAPI.Add(new CustomItem("BAND_AID", "BAND_AID_NAME", "BAND_AID_DESC", "BAND_AID_LORE", "BAND_AID_PICKUP", LoadSpriteFromEmbeddedResource("PartySupplies.Assets.bandaid_icon.png"), bandAidPickupPrefab, (ItemTier)0, (ItemTag[])(object)new ItemTag[1] { (ItemTag)2 }, true, false, (UnlockableDef)null, CreateDisplayRules())); } private void CreateVitaminBottleItem() { //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Expected O, but got Unknown vitaminBottleItem = ScriptableObject.CreateInstance(); ((Object)vitaminBottleItem).name = "VITAMIN_BOTTLE"; vitaminBottleItem.nameToken = "VITAMIN_BOTTLE_NAME"; vitaminBottleItem.pickupToken = "VITAMIN_BOTTLE_PICKUP"; vitaminBottleItem.descriptionToken = "VITAMIN_BOTTLE_DESC"; vitaminBottleItem.loreToken = "VITAMIN_BOTTLE_LORE"; vitaminBottleItem.canRemove = true; vitaminBottleItem.hidden = false; LanguageAPI.Add("VITAMIN_BOTTLE_NAME", "Vitamin Bottle"); LanguageAPI.Add("VITAMIN_BOTTLE_PICKUP", "Stay healthy."); LanguageAPI.Add("VITAMIN_BOTTLE_DESC", "Increase maximum health by 15 and health regeneration by 2.5 hp/s per stack."); LanguageAPI.Add("VITAMIN_BOTTLE_LORE", "Daily essentials."); ItemAPI.Add(new CustomItem("VITAMIN_BOTTLE", "VITAMIN_BOTTLE_NAME", "VITAMIN_BOTTLE_DESC", "VITAMIN_BOTTLE_LORE", "VITAMIN_BOTTLE_PICKUP", LoadSpriteFromEmbeddedResource("PartySupplies.Assets.vitaminbottle_icon.png"), VitaminBottlePrefab, (ItemTier)0, (ItemTag[])(object)new ItemTag[1] { (ItemTag)2 }, true, false, (UnlockableDef)null, CreateDisplayRules())); } private void CreateBloodBagItem() { //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Expected O, but got Unknown bloodBagItem = ScriptableObject.CreateInstance(); ((Object)bloodBagItem).name = "BLOOD_BAG"; bloodBagItem.nameToken = "BLOOD_BAG_NAME"; bloodBagItem.pickupToken = "BLOOD_BAG_PICKUP"; bloodBagItem.descriptionToken = "BLOOD_BAG_DESC"; bloodBagItem.loreToken = "BLOOD_BAG_LORE"; bloodBagItem.canRemove = true; bloodBagItem.hidden = false; LanguageAPI.Add("BLOOD_BAG_NAME", "Blood Bag"); LanguageAPI.Add("BLOOD_BAG_PICKUP", "Fresh supply."); LanguageAPI.Add("BLOOD_BAG_DESC", "Heal for 3 health on kill. Healing increases by 3 per stack."); LanguageAPI.Add("BLOOD_BAG_LORE", "Still warm."); ItemAPI.Add(new CustomItem("BLOOD_BAG", "BLOOD_BAG_NAME", "BLOOD_BAG_DESC", "BLOOD_BAG_LORE", "BLOOD_BAG_PICKUP", LoadSpriteFromEmbeddedResource("PartySupplies.Assets.bloodbag_icon.png"), bloodBagPickupPrefab, (ItemTier)1, (ItemTag[])(object)new ItemTag[1] { (ItemTag)2 }, true, false, (UnlockableDef)null, CreateDisplayRules())); } private void CreateNarcanItem() { //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Expected O, but got Unknown narcanItem = ScriptableObject.CreateInstance(); ((Object)narcanItem).name = "NARCAN"; narcanItem.nameToken = "NARCAN_NAME"; narcanItem.pickupToken = "NARCAN_PICKUP"; narcanItem.descriptionToken = "NARCAN_DESC"; narcanItem.loreToken = "NARCAN_LORE"; narcanItem.tier = (ItemTier)2; narcanItem.canRemove = true; narcanItem.hidden = false; narcanItem.pickupIconSprite = LoadSpriteFromEmbeddedResource("PartySupplies.Assets.narcan_icon.png"); LanguageAPI.Add("NARCAN_NAME", "Narcan"); LanguageAPI.Add("NARCAN_PICKUP", "Not today."); LanguageAPI.Add("NARCAN_DESC", "Gain one extra life. Upon taking fatal damage, consume one stack and return with 50% health."); LanguageAPI.Add("NARCAN_LORE", "The line goes flat. Then it doesn't."); narcanItem.pickupModelPrefab = narcanPickupPrefab; ItemAPI.Add(new CustomItem("NARCAN", "NARCAN_NAME", "NARCAN_DESC", "NARCAN_LORE", "NARCAN_PICKUP", LoadSpriteFromEmbeddedResource("PartySupplies.Assets.narcan_icon.png"), narcanPickupPrefab, (ItemTier)2, (ItemTag[])(object)new ItemTag[1] { (ItemTag)9 }, true, false, (UnlockableDef)null, CreateDisplayRules())); } private void CreateTeslaPillItem() { //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Expected O, but got Unknown teslaPillItem = ScriptableObject.CreateInstance(); ((Object)teslaPillItem).name = "TESLA_PILL"; teslaPillItem.nameToken = "TESLA_PILL_NAME"; teslaPillItem.pickupToken = "TESLA_PILL_PICKUP"; teslaPillItem.descriptionToken = "TESLA_PILL_DESC"; teslaPillItem.loreToken = "TESLA_PILL_LORE"; teslaPillItem.tier = (ItemTier)1; teslaPillItem.canRemove = true; teslaPillItem.hidden = false; teslaPillItem.pickupIconSprite = LoadSpriteFromEmbeddedResource("PartySupplies.Assets.teslapill_icon.png"); LanguageAPI.Add("TESLA_PILL_NAME", "Tesla Pill"); LanguageAPI.Add("TESLA_PILL_PICKUP", "Overcharge the signal."); LanguageAPI.Add("TESLA_PILL_DESC", "Increase attack speed by 10% and movement speed by 10% per stack."); LanguageAPI.Add("TESLA_PILL_LORE", "The current moves before the body does."); teslaPillItem.pickupModelPrefab = teslaPillPickupPrefab; ItemAPI.Add(new CustomItem("TESLA_PILL", "TESLA_PILL_NAME", "TESLA_PILL_DESC", "TESLA_PILL_LORE", "TESLA_PILL_PICKUP", LoadSpriteFromEmbeddedResource("PartySupplies.Assets.teslapill_icon.png"), teslaPillPickupPrefab, (ItemTier)1, (ItemTag[])(object)new ItemTag[1] { (ItemTag)3 }, true, false, (UnlockableDef)null, CreateDisplayRules())); } private void CreateB707Item() { //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Expected O, but got Unknown b707Item = ScriptableObject.CreateInstance(); ((Object)b707Item).name = "B707"; b707Item.nameToken = "B707_NAME"; b707Item.pickupToken = "B707_PICKUP"; b707Item.descriptionToken = "B707_DESC"; b707Item.loreToken = "B707_LORE"; b707Item.tier = (ItemTier)1; b707Item.canRemove = true; b707Item.hidden = false; b707Item.pickupIconSprite = LoadSpriteFromEmbeddedResource("PartySupplies.Assets.b707_icon.png"); LanguageAPI.Add("B707_NAME", "B707s"); LanguageAPI.Add("B707_PICKUP", "Smooth the signal."); LanguageAPI.Add("B707_DESC", "Increase movement speed by 10% and reduce incoming damage by 5% per stack."); LanguageAPI.Add("B707_LORE", "The transmission slows. The body follows."); b707Item.pickupModelPrefab = b707PickupPrefab; ItemAPI.Add(new CustomItem("B707", "B707_NAME", "B707_DESC", "B707_LORE", "B707_PICKUP", LoadSpriteFromEmbeddedResource("PartySupplies.Assets.b707_icon.png"), b707PickupPrefab, (ItemTier)1, (ItemTag[])(object)new ItemTag[1] { (ItemTag)3 }, true, false, (UnlockableDef)null, CreateDisplayRules())); } private void CreateAdderall30Item() { //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Expected O, but got Unknown adderall30Item = ScriptableObject.CreateInstance(); ((Object)adderall30Item).name = "ADDERALL_30"; adderall30Item.nameToken = "ADDERALL_30_NAME"; adderall30Item.pickupToken = "ADDERALL_30_PICKUP"; adderall30Item.descriptionToken = "ADDERALL_30_DESC"; adderall30Item.loreToken = "ADDERALL_30_LORE"; adderall30Item.tier = (ItemTier)1; adderall30Item.canRemove = true; adderall30Item.hidden = false; adderall30Item.pickupIconSprite = LoadSpriteFromEmbeddedResource("PartySupplies.Assets.adderall30_icon.png"); LanguageAPI.Add("ADDERALL_30_NAME", "Adderall 30"); LanguageAPI.Add("ADDERALL_30_PICKUP", "Lock in."); LanguageAPI.Add("ADDERALL_30_DESC", "Increase movement speed by 15% and attack speed by 15% per stack."); LanguageAPI.Add("ADDERALL_30_LORE", "The objective becomes the only thing left."); adderall30Item.pickupModelPrefab = adderall30PickupPrefab; ItemAPI.Add(new CustomItem("ADDERALL_30", "ADDERALL_30_NAME", "ADDERALL_30_DESC", "ADDERALL_30_LORE", "ADDERALL_30_PICKUP", LoadSpriteFromEmbeddedResource("PartySupplies.Assets.adderall30_icon.png"), adderall30PickupPrefab, (ItemTier)1, (ItemTag[])(object)new ItemTag[1] { (ItemTag)3 }, true, false, (UnlockableDef)null, CreateDisplayRules())); } private void CreatePerc30Item() { //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Expected O, but got Unknown perc30Item = ScriptableObject.CreateInstance(); ((Object)perc30Item).name = "PERC_30"; perc30Item.nameToken = "PERC_30_NAME"; perc30Item.pickupToken = "PERC_30_PICKUP"; perc30Item.descriptionToken = "PERC_30_DESC"; perc30Item.loreToken = "PERC_30_LORE"; perc30Item.tier = (ItemTier)1; perc30Item.canRemove = true; perc30Item.hidden = false; perc30Item.pickupIconSprite = LoadSpriteFromEmbeddedResource("PartySupplies.Assets.perc30_icon.png"); LanguageAPI.Add("PERC_30_NAME", "Perc 30"); LanguageAPI.Add("PERC_30_PICKUP", "Feel no pain."); LanguageAPI.Add("PERC_30_DESC", "Gain 25 shield and 8 armor per stack."); LanguageAPI.Add("PERC_30_LORE", "The hit lands. The signal does not."); perc30Item.pickupModelPrefab = perc30PickupPrefab; ItemAPI.Add(new CustomItem("PERC_30", "PERC_30_NAME", "PERC_30_DESC", "PERC_30_LORE", "PERC_30_PICKUP", LoadSpriteFromEmbeddedResource("PartySupplies.Assets.perc30_icon.png"), perc30PickupPrefab, (ItemTier)1, (ItemTag[])(object)new ItemTag[1] { (ItemTag)2 }, true, false, (UnlockableDef)null, CreateDisplayRules())); } private void CreateItem() { //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Expected O, but got Unknown councilMomentumItem = ScriptableObject.CreateInstance(); ((Object)councilMomentumItem).name = "COUNCIL_MOMENTUM"; councilMomentumItem.nameToken = "COUNCIL_MOMENTUM_NAME"; councilMomentumItem.pickupToken = "COUNCIL_MOMENTUM_PICKUP"; councilMomentumItem.descriptionToken = "COUNCIL_MOMENTUM_DESC"; councilMomentumItem.loreToken = "COUNCIL_MOMENTUM_LORE"; councilMomentumItem.tier = (ItemTier)0; councilMomentumItem.canRemove = true; councilMomentumItem.hidden = false; councilMomentumItem.pickupIconSprite = LoadSpriteFromEmbeddedResource("PartySupplies.Assets.councilmomentum_icon.png"); LanguageAPI.Add("COUNCIL_MOMENTUM_NAME", "Go Fast"); LanguageAPI.Add("COUNCIL_MOMENTUM_PICKUP", "Move faster. Attack faster."); LanguageAPI.Add("COUNCIL_MOMENTUM_DESC", "Increase attack speed by 6% and movement speed by 7% per stack."); LanguageAPI.Add("COUNCIL_MOMENTUM_LORE", "The Council rewards motion. Hesitation is decay."); councilMomentumItem.pickupModelPrefab = councilMomentumPickupPrefab; ItemAPI.Add(new CustomItem("COUNCIL_MOMENTUM", "COUNCIL_MOMENTUM_NAME", "COUNCIL_MOMENTUM_DESC", "COUNCIL_MOMENTUM_LORE", "COUNCIL_MOMENTUM_PICKUP", LoadSpriteFromEmbeddedResource("PartySupplies.Assets.councilmomentum_icon.png"), councilMomentumPickupPrefab, (ItemTier)0, (ItemTag[])(object)new ItemTag[1] { (ItemTag)3 }, true, false, (UnlockableDef)null, CreateDisplayRules())); } private ItemDisplayRuleDict CreateDisplayRules() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown return new ItemDisplayRuleDict((ItemDisplayRule[])null); } private void AddCouncilMomentumStats(CharacterBody sender, StatHookEventArgs args) { if (!((Object)(object)sender.inventory == (Object)null)) { int itemCountEffective = sender.inventory.GetItemCountEffective(councilMomentumItem); if (itemCountEffective > 0) { args.attackSpeedMultAdd += 0.06f * (float)itemCountEffective; args.moveSpeedMultAdd += 0.07f * (float)itemCountEffective; } int itemCountEffective2 = sender.inventory.GetItemCountEffective(redBarItem); if (itemCountEffective2 > 0) { args.damageMultAdd += 0.1f * (float)itemCountEffective2; args.critAdd += 5f * (float)itemCountEffective2; } int itemCount = sender.inventory.GetItemCount(vitaminBottleItem); if (itemCount > 0) { args.baseHealthAdd += 15f * (float)itemCount; args.baseRegenAdd += 2.5f * (float)itemCount; } int itemCount2 = sender.inventory.GetItemCount(bandAidItem); if (itemCount2 > 0) { args.baseRegenAdd += 2.5f * (float)itemCount2; } int itemCountEffective3 = sender.inventory.GetItemCountEffective(teslaPillItem); if (itemCountEffective3 > 0) { args.attackSpeedMultAdd += 0.1f * (float)itemCountEffective3; args.moveSpeedMultAdd += 0.1f * (float)itemCountEffective3; } int itemCount3 = sender.inventory.GetItemCount(vampireFangsItem); if (itemCount3 > 0) { args.critAdd += 5f * (float)itemCount3; } int itemCount4 = sender.inventory.GetItemCount(b707Item); if (itemCount4 > 0) { args.moveSpeedMultAdd += 0.1f * (float)itemCount4; } int itemCount5 = sender.inventory.GetItemCount(adderall30Item); if (itemCount5 > 0) { args.moveSpeedMultAdd += 0.15f * (float)itemCount5; args.attackSpeedMultAdd += 0.15f * (float)itemCount5; } int itemCount6 = sender.inventory.GetItemCount(perc30Item); if (itemCount6 > 0) { args.baseShieldAdd += 25f * (float)itemCount6; args.armorAdd += 8f * (float)itemCount6; } } } private Sprite LoadSpriteFromEmbeddedResource(string resourceName) { //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Expected O, but got Unknown //IL_00f5: 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) Assembly executingAssembly = Assembly.GetExecutingAssembly(); string[] manifestResourceNames = executingAssembly.GetManifestResourceNames(); foreach (string text in manifestResourceNames) { ((BaseUnityPlugin)this).Logger.LogInfo((object)("Embedded resource found: " + text)); } using Stream stream = executingAssembly.GetManifestResourceStream(resourceName); if (stream == null) { ((BaseUnityPlugin)this).Logger.LogError((object)("Could not find embedded resource: " + resourceName)); return null; } byte[] array = new byte[stream.Length]; stream.Read(array, 0, array.Length); Texture2D val = new Texture2D(2, 2, (TextureFormat)4, false); if (!ImageConversion.LoadImage(val, array)) { ((BaseUnityPlugin)this).Logger.LogError((object)("Could not load image data for: " + resourceName)); return null; } ((Texture)val).filterMode = (FilterMode)1; ((Texture)val).wrapMode = (TextureWrapMode)1; return Sprite.Create(val, new Rect(0f, 0f, (float)((Texture)val).width, (float)((Texture)val).height), new Vector2(0.5f, 0.5f), 100f); } }