Decompiled source of RiskOfImpact v0.3.2
RiskOfImpact.dll
Decompiled a month ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using EntityStates; using HG; using LookingGlass.ItemStatsNameSpace; using On.RoR2; using On.RoR2.Items; using On.RoR2.Orbs; using On.RoR2.Projectile; using R2API; using R2API.Networking; using R2API.Networking.Interfaces; using RoR2; using RoR2.ContentManagement; using RoR2.ExpansionManagement; using RoR2.Items; using RoR2.Orbs; using RoR2.Projectile; using RoR2.Skills; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.0.0.0")] [module: UnverifiableCode] namespace RiskOfImpact; public class RiskOfImpactContent : IContentPackProvider { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static StatHookEventHandler <>9__34_0; internal void <FinalizeAsync>b__34_0(CharacterBody body, StatHookEventArgs statArgs) { if (!Object.op_Implicit((Object)(object)body.inventory)) { return; } int itemCountEffective = body.inventory.GetItemCountEffective(_mug); if (itemCountEffective > 0) { statArgs.moveSpeedMultAdd += 0.69f * (float)itemCountEffective; statArgs.attackSpeedMultAdd += 0.69f * (float)itemCountEffective; } int itemCountEffective2 = body.inventory.GetItemCountEffective(_comboStarItem); if (itemCountEffective2 <= 0) { return; } int buffCount = body.GetBuffCount(_comboStarBuff); if (buffCount > 0) { float num = (0.03f + (float)(itemCountEffective2 - 1) * 0.005f) * (float)buffCount; statArgs.damageMultAdd += num; if (body.GetBuffCount(_comboStarMaxBuff) > 0) { statArgs.critAdd += 5f + (float)(itemCountEffective2 - 1) * 2.5f; } } } } private static ItemDef _mug; private static EquipmentDef _lanceEquipmentDef; private static AssetBundle _myBundle; private static GameObject _lanceProjectilePrefab; private static GameObject _lanceGhost; private static ItemDef _comboStarItem; private static BuffDef _comboStarBuff; private static BuffDef _comboStarMaxBuff; private static GameObject _comboStarDisplayPrefab; private static GameObject _mugDisplayPrefab; private static ItemDef _redshifter; private static GameObject _redshifterDisplayPrefab; private static GameObject _redshifterDisplayFollowerPrefab; private static ItemDef _bioticShell; private static GameObject _bioticShellDisplayPrefab; private static ItemDef _doomedMoon; private static GameObject _doomedMoonDisplayPrefab; private static GameObject _doomedMoonDisplayFollowerPrefab; private static ItemDef _doomedMoonConsumed; private static ItemDef _doomedMoonStatToken; private static BuffDef _doomedMoonBuff; private static ItemDef _riskyDice; private static ItemDef _riskyDiceCount; private static ItemDef _riskyDiceAffliction; private static BuffDef _riskyDiceBuff; public string identifier => "com.MrE42.RiskOfImpact"; public static ReadOnlyContentPack readOnlyContentPack => new ReadOnlyContentPack(RiskOfImpactContentPack); internal static ContentPack RiskOfImpactContentPack { get; } = new ContentPack(); public IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args) { AssetBundleCreateRequest asyncOperation = AssetBundle.LoadFromFileAsync(RiskOfImpactMain.assetBundleDir); while (!((AsyncOperation)asyncOperation).isDone) { args.ReportProgress(((AsyncOperation)asyncOperation).progress); yield return null; } _myBundle = asyncOperation.assetBundle; _mug = _myBundle.LoadAsset<ItemDef>("Mug"); _mugDisplayPrefab = _myBundle.LoadAsset<GameObject>("PickupDD"); _comboStarItem = _myBundle.LoadAsset<ItemDef>("ComboStar"); _comboStarBuff = _myBundle.LoadAsset<BuffDef>("ComboStarBuff"); _comboStarMaxBuff = _myBundle.LoadAsset<BuffDef>("MaxStarBuff"); _comboStarDisplayPrefab = _myBundle.LoadAsset<GameObject>("PickupCS"); _redshifter = _myBundle.LoadAsset<ItemDef>("Redshifter"); _redshifterDisplayPrefab = _myBundle.LoadAsset<GameObject>("PlayerDisplayRS"); _redshifterDisplayFollowerPrefab = _myBundle.LoadAsset<GameObject>("DisplayFollowerRS"); _bioticShell = _myBundle.LoadAsset<ItemDef>("BioticShell"); _bioticShell.requiredExpansion = Addressables.LoadAssetAsync<ExpansionDef>((object)"RoR2/DLC1/Common/DLC1.asset").WaitForCompletion(); _bioticShellDisplayPrefab = _myBundle.LoadAsset<GameObject>("PickupBS"); _doomedMoon = _myBundle.LoadAsset<ItemDef>("DoomedMoon"); _doomedMoonDisplayPrefab = _myBundle.LoadAsset<GameObject>("PlayerDisplayDM"); _doomedMoonDisplayFollowerPrefab = _myBundle.LoadAsset<GameObject>("DisplayFollowerDM"); _doomedMoonConsumed = _myBundle.LoadAsset<ItemDef>("DoomedMoonConsumed"); _doomedMoonStatToken = _myBundle.LoadAsset<ItemDef>("DoomedMoonStatToken"); _doomedMoonBuff = _myBundle.LoadAsset<BuffDef>("DoomedMoonBuff"); _riskyDice = _myBundle.LoadAsset<ItemDef>("RiskyDice"); _riskyDiceCount = _myBundle.LoadAsset<ItemDef>("RiskyDiceCount"); _riskyDiceAffliction = _myBundle.LoadAsset<ItemDef>("RiskyDiceAffliction"); _riskyDiceBuff = _myBundle.LoadAsset<BuffDef>("RiskyDiceBuff"); _lanceEquipmentDef = _myBundle.LoadAsset<EquipmentDef>("LanceOfLonginusEquipmentDef"); _lanceProjectilePrefab = _myBundle.LoadAsset<GameObject>("LanceProjectilePrefab"); ExpansionDef val = _myBundle.LoadAsset<ExpansionDef>("RiskOfImpactExpansion"); _myBundle.LoadAsset<ExpansionDef>("ExtraExpansion"); _lanceGhost = _myBundle.LoadAsset<GameObject>("LanceGhost"); _lanceProjectilePrefab.GetComponent<ProjectileController>().ghostPrefab = _lanceGhost; ItemDisplayRuleDict val2 = new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>()); ItemDisplayRuleDict val3 = new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>()); ItemDisplayRuleDict val4 = new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>()); ItemDisplayRuleDict val5 = new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>()); ItemDisplayRuleDict val6 = new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>()); ItemDisplayRuleDict val7 = new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>()); val3.Add("mdlCommandoDualies", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _comboStarDisplayPrefab, childName = "Pelvis", localPos = new Vector3(0.20239f, -0.06471f, -0.01451f), localAngles = new Vector3(7.55425f, 100.9208f, 181.4531f), localScale = new Vector3(0.12f, 0.12f, 0.12f) } }); val2.Add("mdlCommandoDualies", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _mugDisplayPrefab, childName = "Pelvis", localPos = new Vector3(-0.22258f, -0.06758f, 0.03077f), localAngles = new Vector3(353.157f, 193.3047f, 206.7511f), localScale = new Vector3(0.1f, 0.1f, 0.1f) } }); val4.Add("mdlCommandoDualies", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _redshifterDisplayPrefab, childName = "Base", localPos = new Vector3(0.659f, 0.394f, -0.787f), localAngles = new Vector3(90.0003f, 180.079f, 180.4018f), localScale = new Vector3(1f, 1f, 1f) } }); val7.Add("mdlCommandoDualies", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _doomedMoonDisplayPrefab, childName = "Base", localPos = new Vector3(-0.92478f, -0.45384f, -1.30414f), localAngles = new Vector3(0f, 0f, 45f), localScale = new Vector3(0.8f, 0.8f, 0.8f) } }); val5.Add("mdlCommandoDualies", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _bioticShellDisplayPrefab, childName = "Chest", localPos = new Vector3(-3E-05f, 0.32895f, 0.17171f), localAngles = new Vector3(344.5746f, 359.8877f, 359.99f), localScale = new Vector3(0.12f, 0.12f, 0.12f) } }); val3.Add("mdlHuntress", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _comboStarDisplayPrefab, childName = "Pelvis", localPos = new Vector3(0.18116f, -0.05787f, 0.01043f), localAngles = new Vector3(32.08101f, 101.53f, 186.5844f), localScale = new Vector3(0.12f, 0.12f, 0.12f) } }); val2.Add("mdlHuntress", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _mugDisplayPrefab, childName = "Pelvis", localPos = new Vector3(-0.18304f, -0.07066f, -0.03466f), localAngles = new Vector3(1.01352f, 196.2477f, 177.5963f), localScale = new Vector3(0.1f, 0.1f, 0.1f) } }); val4.Add("mdlHuntress", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _redshifterDisplayPrefab, childName = "Base", localPos = new Vector3(0.659f, 0.394f, -0.787f), localAngles = new Vector3(90.0003f, 180.079f, 180.4018f), localScale = new Vector3(1f, 1f, 1f) } }); val7.Add("mdlHuntress", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _doomedMoonDisplayPrefab, childName = "Base", localPos = new Vector3(-0.92478f, -0.45384f, -1.30414f), localAngles = new Vector3(0f, 0f, 45f), localScale = new Vector3(0.8f, 0.8f, 0.8f) } }); val5.Add("mdlHuntress", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _bioticShellDisplayPrefab, childName = "Chest", localPos = new Vector3(-0.00947f, 0.15638f, 0.17891f), localAngles = new Vector3(337.9482f, 358.7204f, 52.48233f), localScale = new Vector3(0.12f, 0.12f, 0.12f) } }); val3.Add("mdlBandit2", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _comboStarDisplayPrefab, childName = "Pelvis", localPos = new Vector3(0.20239f, -0.06471f, -0.01451f), localAngles = new Vector3(7.55425f, 100.9208f, 181.4531f), localScale = new Vector3(0.12f, 0.12f, 0.12f) } }); val2.Add("mdlBandit2", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _mugDisplayPrefab, childName = "Pelvis", localPos = new Vector3(-0.24089f, -0.03475f, -0.08941f), localAngles = new Vector3(351.2207f, 180.0096f, 189.8164f), localScale = new Vector3(0.1f, 0.1f, 0.1f) } }); val4.Add("mdlBandit2", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _redshifterDisplayPrefab, childName = "ROOT", localPos = new Vector3(-0.36643f, 1.76863f, 0.55818f), localAngles = new Vector3(0.0713f, 344.7929f, 0f), localScale = new Vector3(1f, 1f, 1f) } }); val7.Add("mdlBandit2", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _doomedMoonDisplayPrefab, childName = "Base", localPos = new Vector3(0.76099f, 0.41951f, -1.30499f), localAngles = new Vector3(0f, 0f, 45f), localScale = new Vector3(0.8f, 0.8f, 0.8f) } }); val5.Add("mdlBandit2", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _bioticShellDisplayPrefab, childName = "UpperArmR", localPos = new Vector3(-0.00694f, 0.18783f, -0.07376f), localAngles = new Vector3(337.5303f, 183.404f, 317.6291f), localScale = new Vector3(0.12f, 0.12f, 0.12f) } }); val3.Add("mdlToolbot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _comboStarDisplayPrefab, childName = "Chest", localPos = new Vector3(2.66884f, 1.38091f, 1.85382f), localAngles = new Vector3(0f, 90f, 0f), localScale = new Vector3(1f, 1f, 1f) } }); val2.Add("mdlToolbot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _mugDisplayPrefab, childName = "Hip", localPos = new Vector3(2.45337f, 0.28995f, -0.52838f), localAngles = new Vector3(353.157f, 15.00789f, 206.7511f), localScale = new Vector3(1f, 1f, 1f) } }); val4.Add("mdlToolbot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _redshifterDisplayPrefab, childName = "Chest", localPos = new Vector3(5.86281f, 6.67238f, 1.90503f), localAngles = new Vector3(0f, 90f, 0f), localScale = new Vector3(1f, 1f, 1f) } }); val7.Add("mdlToolbot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _doomedMoonDisplayPrefab, childName = "Chest", localPos = new Vector3(-4.74067f, 8.84387f, -6.63475f), localAngles = new Vector3(0f, 0f, 45f), localScale = new Vector3(0.8f, 0.8f, 0.8f) } }); val5.Add("mdlToolbot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _bioticShellDisplayPrefab, childName = "Chest", localPos = new Vector3(-0.06f, 1.16f, 3.24f), localAngles = new Vector3(8.85492f, 346.6888f, 13.30589f), localScale = new Vector3(0.5f, 0.5f, 0.5f) } }); val3.Add("mdlEngi", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _comboStarDisplayPrefab, childName = "Pelvis", localPos = new Vector3(0.24459f, -0.04413f, -0.01453f), localAngles = new Vector3(7.55425f, 100.9208f, 181.4531f), localScale = new Vector3(0.12f, 0.12f, 0.12f) } }); val2.Add("mdlEngi", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _mugDisplayPrefab, childName = "Pelvis", localPos = new Vector3(-0.27511f, -0.00163f, 0.03076f), localAngles = new Vector3(353.157f, 193.3047f, 206.7511f), localScale = new Vector3(0.1f, 0.1f, 0.1f) } }); val4.Add("mdlEngi", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _redshifterDisplayPrefab, childName = "Base", localPos = new Vector3(0.659f, 0.394f, -0.787f), localAngles = new Vector3(90.0003f, 180.079f, 180.4018f), localScale = new Vector3(1f, 1f, 1f) } }); val7.Add("mdlEngi", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _doomedMoonDisplayPrefab, childName = "Base", localPos = new Vector3(-0.92478f, -0.45384f, -1.30414f), localAngles = new Vector3(0f, 0f, 45f), localScale = new Vector3(0.8f, 0.8f, 0.8f) } }); val5.Add("mdlEngi", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _bioticShellDisplayPrefab, childName = "Chest", localPos = new Vector3(-0.0041f, 0.2951f, 0.2481f), localAngles = new Vector3(337.6299f, 359.5753f, 0.39165f), localScale = new Vector3(0.12f, 0.12f, 0.12f) } }); val3.Add("mdlMage", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _comboStarDisplayPrefab, childName = "Pelvis", localPos = new Vector3(0.20239f, -0.06471f, -0.01451f), localAngles = new Vector3(7.55425f, 100.9208f, 181.4531f), localScale = new Vector3(0.12f, 0.12f, 0.12f) } }); val2.Add("mdlMage", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _mugDisplayPrefab, childName = "Pelvis", localPos = new Vector3(-0.22258f, -0.06758f, 0.03077f), localAngles = new Vector3(353.157f, 193.3047f, 206.7511f), localScale = new Vector3(0.1f, 0.1f, 0.1f) } }); val4.Add("mdlMage", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _redshifterDisplayPrefab, childName = "Base", localPos = new Vector3(0.659f, 0.394f, -0.787f), localAngles = new Vector3(90.0003f, 180.079f, 180.4018f), localScale = new Vector3(1f, 1f, 1f) } }); val7.Add("mdlMage", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _doomedMoonDisplayPrefab, childName = "Base", localPos = new Vector3(-0.92478f, -0.45384f, -1.30414f), localAngles = new Vector3(0f, 0f, 45f), localScale = new Vector3(0.8f, 0.8f, 0.8f) } }); val5.Add("mdlMage", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _bioticShellDisplayPrefab, childName = "Chest", localPos = new Vector3(-0.006f, 0.202f, 0.135f), localAngles = new Vector3(328.7007f, 21.62506f, 345.3727f), localScale = new Vector3(0.12f, 0.12f, 0.12f) } }); val3.Add("mdlMerc", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _comboStarDisplayPrefab, childName = "Pelvis", localPos = new Vector3(0.21235f, 0.06133f, -0.02965f), localAngles = new Vector3(15.33725f, 100.263f, 182.9367f), localScale = new Vector3(0.12f, 0.12f, 0.12f) } }); val2.Add("mdlMerc", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _mugDisplayPrefab, childName = "Pelvis", localPos = new Vector3(-0.23385f, 0.04143f, -0.05599f), localAngles = new Vector3(353.3026f, 173.733f, 204.3656f), localScale = new Vector3(0.1f, 0.1f, 0.1f) } }); val4.Add("mdlMerc", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _redshifterDisplayPrefab, childName = "Base", localPos = new Vector3(0.659f, 0.394f, -0.787f), localAngles = new Vector3(90.0003f, 180.079f, 180.4018f), localScale = new Vector3(1f, 1f, 1f) } }); val7.Add("mdlMerc", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _doomedMoonDisplayPrefab, childName = "Base", localPos = new Vector3(-0.92478f, -0.45384f, -1.30414f), localAngles = new Vector3(0f, 0f, 45f), localScale = new Vector3(0.8f, 0.8f, 0.8f) } }); val5.Add("mdlMerc", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _bioticShellDisplayPrefab, childName = "Chest", localPos = new Vector3(0.024f, 0.206f, 0.174f), localAngles = new Vector3(324.9625f, 6.28376f, 355.0841f), localScale = new Vector3(0.12f, 0.12f, 0.12f) } }); val3.Add("mdlTreebot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _comboStarDisplayPrefab, childName = "PlatformBase", localPos = new Vector3(0.7219f, 0.13116f, 0.2195f), localAngles = new Vector3(351.8981f, 73.25513f, 358.5338f), localScale = new Vector3(0.4f, 0.4f, 0.4f) } }); val2.Add("mdlTreebot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _mugDisplayPrefab, childName = "PlatformBase", localPos = new Vector3(-0.75075f, 0.07669f, 0.03075f), localAngles = new Vector3(5.2294f, 355.3522f, 20.07811f), localScale = new Vector3(0.4f, 0.4f, 0.4f) } }); val4.Add("mdlTreebot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _redshifterDisplayPrefab, childName = "PlatformBase", localPos = new Vector3(2.24017f, 2.11404f, 0.21945f), localAngles = new Vector3(351.8981f, 73.25513f, 358.5338f), localScale = new Vector3(1f, 1f, 1f) } }); val7.Add("mdlTreebot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _doomedMoonDisplayPrefab, childName = "PlatformBase", localPos = new Vector3(-1.57404f, 3.24967f, -1.88479f), localAngles = new Vector3(0f, 0f, 45f), localScale = new Vector3(1.5f, 1.5f, 1.5f) } }); val5.Add("mdlTreebot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _bioticShellDisplayPrefab, childName = "PlatformBase", localPos = new Vector3(0.661f, -0.186f, 0.157f), localAngles = new Vector3(352.855f, 89.99998f, 351.2419f), localScale = new Vector3(0.12f, 0.12f, 0.12f) } }); val3.Add("mdlLoader", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _comboStarDisplayPrefab, childName = "Chest", localPos = new Vector3(0.23944f, 0.01208f, -0.05754f), localAngles = new Vector3(0f, 90f, 0f), localScale = new Vector3(0.12f, 0.12f, 0.12f) } }); val2.Add("mdlLoader", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _mugDisplayPrefab, childName = "Chest", localPos = new Vector3(-0.2722f, -0.06754f, 0.03045f), localAngles = new Vector3(6.94817f, 3.35957f, 26.3395f), localScale = new Vector3(0.1f, 0.1f, 0.1f) } }); val4.Add("mdlLoader", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _redshifterDisplayPrefab, childName = "Chest", localPos = new Vector3(0.79858f, 0.55478f, 0.42963f), localAngles = new Vector3(6.94817f, 3.35957f, 26.3395f), localScale = new Vector3(1f, 1f, 1f) } }); val7.Add("mdlLoader", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _doomedMoonDisplayPrefab, childName = "Chest", localPos = new Vector3(-0.9262f, 1.13019f, -1.1029f), localAngles = new Vector3(0f, 0f, 45f), localScale = new Vector3(0.8f, 0.8f, 0.8f) } }); val5.Add("mdlLoader", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _bioticShellDisplayPrefab, childName = "Chest", localPos = new Vector3(-0.25771f, 0.01213f, -0.06079f), localAngles = new Vector3(0f, 90f, 0f), localScale = new Vector3(0.12f, 0.12f, 0.12f) } }); val3.Add("mdlCroco", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _comboStarDisplayPrefab, childName = "Hip", localPos = new Vector3(1.94228f, 0.39972f, -0.40409f), localAngles = new Vector3(7.55425f, 100.9208f, 181.4531f), localScale = new Vector3(1f, 1f, 1f) } }); val2.Add("mdlCroco", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _mugDisplayPrefab, childName = "Hip", localPos = new Vector3(-2.45304f, 0.54139f, 0.25251f), localAngles = new Vector3(19.53804f, 194.0312f, 213.1425f), localScale = new Vector3(1f, 1f, 1f) } }); val4.Add("mdlCroco", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _redshifterDisplayPrefab, childName = "Base", localPos = new Vector3(-5.04f, -3.02f, 5.34f), localAngles = new Vector3(84.9998f, 359.9714f, 359.584f), localScale = new Vector3(1f, 1f, 1f) } }); val7.Add("mdlCroco", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _doomedMoonDisplayPrefab, childName = "Chest", localPos = new Vector3(-7.60114f, 1.59776f, 9.56897f), localAngles = new Vector3(0f, 0f, 45f), localScale = new Vector3(1f, 1f, 1f) } }); val5.Add("mdlCroco", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _bioticShellDisplayPrefab, childName = "Chest", localPos = new Vector3(-2.55f, 2.94f, -0.59f), localAngles = new Vector3(356.9059f, 69.76768f, 25.01778f), localScale = new Vector3(1f, 1f, 1f) } }); val3.Add("mdlCaptain", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _comboStarDisplayPrefab, childName = "Pelvis", localPos = new Vector3(0.2758f, -0.10375f, -0.02017f), localAngles = new Vector3(7.55425f, 100.9208f, 181.4531f), localScale = new Vector3(0.12f, 0.12f, 0.12f) } }); val2.Add("mdlCaptain", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _mugDisplayPrefab, childName = "Pelvis", localPos = new Vector3(-0.30334f, -0.12005f, 0.02085f), localAngles = new Vector3(356.783f, 191.9943f, 191.5501f), localScale = new Vector3(0.1f, 0.1f, 0.1f) } }); val4.Add("mdlCaptain", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _redshifterDisplayPrefab, childName = "Base", localPos = new Vector3(0.659f, 0.394f, -0.787f), localAngles = new Vector3(90.0003f, 180.079f, 180.4018f), localScale = new Vector3(1f, 1f, 1f) } }); val7.Add("mdlCaptain", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _doomedMoonDisplayPrefab, childName = "Base", localPos = new Vector3(-0.92478f, -0.45384f, -1.30414f), localAngles = new Vector3(0f, 0f, 45f), localScale = new Vector3(0.8f, 0.8f, 0.8f) } }); val5.Add("mdlCaptain", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _bioticShellDisplayPrefab, childName = "Chest", localPos = new Vector3(-0.00288f, 0.22976f, 0.21501f), localAngles = new Vector3(343.283f, 350.7494f, 320.7523f), localScale = new Vector3(0.12f, 0.12f, 0.12f) } }); val3.Add("mdlHeretic", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _comboStarDisplayPrefab, childName = "Pelvis", localPos = new Vector3(-0.16834f, 0.20744f, -0.3221f), localAngles = new Vector3(321.7271f, 192.0575f, 270.6939f), localScale = new Vector3(0.2f, 0.2f, 0.2f) } }); val2.Add("mdlHeretic", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _mugDisplayPrefab, childName = "Pelvis", localPos = new Vector3(-0.21054f, 0.08455f, 0.4505f), localAngles = new Vector3(281.3847f, 102.9863f, 13.02637f), localScale = new Vector3(0.2f, 0.2f, 0.2f) } }); val4.Add("mdlHeretic", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _redshifterDisplayPrefab, childName = "Chest", localPos = new Vector3(-0.68984f, -1.22926f, -1.79202f), localAngles = new Vector3(295.4063f, 217.6076f, 232.8437f), localScale = new Vector3(1f, 1f, 1f) } }); val7.Add("mdlHeretic", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _doomedMoonDisplayPrefab, childName = "Chest", localPos = new Vector3(-1.06155f, -0.90547f, 1.83211f), localAngles = new Vector3(0f, 0f, 45f), localScale = new Vector3(1f, 1f, 1f) } }); val3.Add("mdlRailGunner", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _comboStarDisplayPrefab, childName = "GunRoot", localPos = new Vector3(0f, -0.12961f, 0.06076f), localAngles = new Vector3(0f, 0f, 180f), localScale = new Vector3(0.05f, 0.05f, 0.05f) } }); val2.Add("mdlRailGunner", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _mugDisplayPrefab, childName = "Backpack", localPos = new Vector3(0.37979f, -0.509f, 0.0309f), localAngles = new Vector3(24.20953f, 182.6858f, 49.19599f), localScale = new Vector3(0.1f, 0.1f, 0.1f) } }); val4.Add("mdlRailGunner", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _redshifterDisplayPrefab, childName = "Base", localPos = new Vector3(0.799f, 0.04025f, -0.28362f), localAngles = new Vector3(90.00027f, 180.079f, 180.4018f), localScale = new Vector3(1f, 1f, 1f) } }); val7.Add("mdlRailGunner", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _doomedMoonDisplayPrefab, childName = "Base", localPos = new Vector3(-0.92478f, -0.45384f, -1.30414f), localAngles = new Vector3(0f, 0f, 45f), localScale = new Vector3(0.8f, 0.8f, 0.8f) } }); val5.Add("mdlRailGunner", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _bioticShellDisplayPrefab, childName = "UpperArmL", localPos = new Vector3(0.00072f, 0.08052f, 0.06183f), localAngles = new Vector3(5.06661f, 358.0723f, 116.7787f), localScale = new Vector3(0.12f, 0.12f, 0.12f) } }); val3.Add("mdlVoidSurvivor", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _comboStarDisplayPrefab, childName = "Pelvis", localPos = new Vector3(-0.00645f, 0.02082f, 0.15709f), localAngles = new Vector3(11.41105f, 359.2993f, 165.3926f), localScale = new Vector3(0.12f, 0.12f, 0.12f) } }); val2.Add("mdlVoidSurvivor", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _mugDisplayPrefab, childName = "Pelvis", localPos = new Vector3(0.03053f, 0.00479f, -0.20481f), localAngles = new Vector3(10.27088f, 86.79462f, 192.5363f), localScale = new Vector3(0.1f, 0.1f, 0.1f) } }); val4.Add("mdlVoidSurvivor", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _redshifterDisplayPrefab, childName = "Base", localPos = new Vector3(0.81593f, 0.92553f, 0.42535f), localAngles = new Vector3(88.27319f, 357.384f, 352.9297f), localScale = new Vector3(1f, 1f, 1f) } }); val7.Add("mdlVoidSurvivor", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _doomedMoonDisplayPrefab, childName = "Base", localPos = new Vector3(-0.92478f, 0.24515f, 0.64663f), localAngles = new Vector3(0f, 0f, 45f), localScale = new Vector3(0.8f, 0.8f, 0.8f) } }); val5.Add("mdlVoidSurvivor", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _bioticShellDisplayPrefab, childName = "UpperArmR", localPos = new Vector3(0.21565f, -0.04918f, 0.00468f), localAngles = new Vector3(10.95605f, 105.0443f, 191.8376f), localScale = new Vector3(0.12f, 0.12f, 0.12f) } }); val3.Add("mdlSeeker", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _comboStarDisplayPrefab, childName = "Pelvis", localPos = new Vector3(0.22783f, 0.02224f, -0.00465f), localAngles = new Vector3(339.8495f, 78.9239f, 353.0269f), localScale = new Vector3(0.12f, 0.12f, 0.12f) } }); val2.Add("mdlSeeker", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _mugDisplayPrefab, childName = "Pelvis", localPos = new Vector3(-0.26268f, 0.04164f, -0.02405f), localAngles = new Vector3(354.4812f, 351.9723f, 342.0317f), localScale = new Vector3(0.1f, 0.1f, 0.1f) } }); val4.Add("mdlSeeker", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _redshifterDisplayPrefab, childName = "Base", localPos = new Vector3(0.649f, 1.727f, -0.109f), localAngles = new Vector3(14.33531f, 0.39733f, 0.22404f), localScale = new Vector3(1f, 1f, 1f) } }); val7.Add("mdlSeeker", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _doomedMoonDisplayPrefab, childName = "Base", localPos = new Vector3(-0.91217f, 2.18543f, -0.30558f), localAngles = new Vector3(0f, 0f, 45f), localScale = new Vector3(0.8f, 0.8f, 0.8f) } }); val5.Add("mdlSeeker", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _bioticShellDisplayPrefab, childName = "Chest", localPos = new Vector3(-0.0041f, 0.07456f, 0.1186f), localAngles = new Vector3(352.4757f, 353.3727f, 4.8746f), localScale = new Vector3(0.12f, 0.12f, 0.12f) } }); val3.Add("mdlFalseSon", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _comboStarDisplayPrefab, childName = "Pelvis", localPos = new Vector3(0.31534f, 0.11852f, -0.14177f), localAngles = new Vector3(339.1165f, 125.6798f, 352.5457f), localScale = new Vector3(0.12f, 0.12f, 0.12f) } }); val2.Add("mdlFalseSon", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _mugDisplayPrefab, childName = "Pelvis", localPos = new Vector3(-0.27259f, 0.11521f, -0.22216f), localAngles = new Vector3(358.424f, 318.1652f, 346.5849f), localScale = new Vector3(0.1f, 0.1f, 0.1f) } }); val4.Add("mdlFalseSon", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _redshifterDisplayPrefab, childName = "Root", localPos = new Vector3(0.966f, 3.37f, -0.347f), localAngles = new Vector3(11.01017f, 359.0091f, 0.39317f), localScale = new Vector3(1f, 1f, 1f) } }); val7.Add("mdlFalseSon", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _doomedMoonDisplayPrefab, childName = "Root", localPos = new Vector3(-1.25927f, 3.85099f, -1.37428f), localAngles = new Vector3(0f, 0f, 45f), localScale = new Vector3(1f, 1f, 1f) } }); val5.Add("mdlFalseSon", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _bioticShellDisplayPrefab, childName = "Chest", localPos = new Vector3(0.02305f, 0.42224f, 0.16099f), localAngles = new Vector3(308.0242f, 354.2237f, 354.7403f), localScale = new Vector3(0.12f, 0.12f, 0.12f) } }); val3.Add("mdlChef", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _comboStarDisplayPrefab, childName = "Chest", localPos = new Vector3(0.1323f, 0.20992f, -0.3466f), localAngles = new Vector3(352.6544f, 180.1904f, 314.3582f), localScale = new Vector3(0.12f, 0.12f, 0.12f) } }); val2.Add("mdlChef", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _mugDisplayPrefab, childName = "OvenDoor", localPos = new Vector3(-0.58416f, 0.06339f, 0.09305f), localAngles = new Vector3(4.14493f, 2.58369f, 8.85832f), localScale = new Vector3(0.1f, 0.1f, 0.1f) } }); val4.Add("mdlChef", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _redshifterDisplayPrefab, childName = "Root", localPos = new Vector3(-0.787f, 1.34229f, 0.41002f), localAngles = new Vector3(0.11209f, 89.41496f, 19.53264f), localScale = new Vector3(1f, 1f, 1f) } }); val7.Add("mdlChef", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _doomedMoonDisplayPrefab, childName = "Root", localPos = new Vector3(1.08621f, 2.5569f, -1.11563f), localAngles = new Vector3(0f, 0f, 45f), localScale = new Vector3(0.8f, 0.8f, 0.8f) } }); val5.Add("mdlChef", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _bioticShellDisplayPrefab, childName = "Chest", localPos = new Vector3(-0.2804f, 0.1809f, 0.0058f), localAngles = new Vector3(359.487f, 89.95702f, 183.1426f), localScale = new Vector3(0.12f, 0.12f, 0.12f) } }); val3.Add("mdlDroneTech", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _comboStarDisplayPrefab, childName = "Pelvis", localPos = new Vector3(0.18679f, 0.07799f, 0.0409f), localAngles = new Vector3(347.8549f, 103.8105f, 359.8152f), localScale = new Vector3(0.12f, 0.12f, 0.12f) } }); val2.Add("mdlDroneTech", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _mugDisplayPrefab, childName = "Pelvis", localPos = new Vector3(-0.14239f, 0.08143f, 0.07492f), localAngles = new Vector3(26.93316f, 359.0482f, 33.11788f), localScale = new Vector3(0.1f, 0.1f, 0.1f) } }); val4.Add("mdlDroneTech", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _redshifterDisplayPrefab, childName = "Base", localPos = new Vector3(-0.568f, 1.189f, 0f), localAngles = new Vector3(350.118f, 180f, 180f), localScale = new Vector3(1f, 1f, 1f) } }); val7.Add("mdlDroneTech", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _doomedMoonDisplayPrefab, childName = "Base", localPos = new Vector3(1.80938f, 1.72888f, 0.44503f), localAngles = new Vector3(0f, 0f, 45f), localScale = new Vector3(0.8f, 0.8f, 0.8f) } }); val5.Add("mdlDroneTech", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _bioticShellDisplayPrefab, childName = "Chest", localPos = new Vector3(-0.001f, -0.0999f, -0.0822f), localAngles = new Vector3(286.3296f, 353.8997f, 22.19561f), localScale = new Vector3(0.06f, 0.06f, 0.06f) } }); val3.Add("mdlDrifter", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _comboStarDisplayPrefab, childName = "Pelvis", localPos = new Vector3(-0.1024f, 0.00187f, -0.37851f), localAngles = new Vector3(357.0724f, 189.1636f, 280.7911f), localScale = new Vector3(0.12f, 0.12f, 0.12f) } }); val2.Add("mdlDrifter", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _mugDisplayPrefab, childName = "Pelvis", localPos = new Vector3(-0.18712f, -0.06656f, 0.3887f), localAngles = new Vector3(275.4132f, 1.23565f, 85.85339f), localScale = new Vector3(0.1f, 0.1f, 0.1f) } }); val4.Add("mdlDrifter", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _redshifterDisplayPrefab, childName = "Base", localPos = new Vector3(0.39681f, -0.65566f, 0.66076f), localAngles = new Vector3(318.5939f, 293.7787f, 169.5416f), localScale = new Vector3(1f, 1f, 1f) } }); val7.Add("mdlDrifter", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _doomedMoonDisplayPrefab, childName = "Base", localPos = new Vector3(-0.62317f, -1.03718f, -1.42457f), localAngles = new Vector3(0f, 0f, 45f), localScale = new Vector3(0.8f, 0.8f, 0.8f) } }); val5.Add("mdlDrifter", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _bioticShellDisplayPrefab, childName = "Chest", localPos = new Vector3(-0.03096f, 0.27478f, -0.01272f), localAngles = new Vector3(315.9871f, 247.1702f, 194.6353f), localScale = new Vector3(0.06f, 0.06f, 0.06f) } }); val3.Add("mdlBasicTank", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _comboStarDisplayPrefab, childName = "Bruiser_Hull", localPos = new Vector3(-0.94709f, 0.66307f, 0.0552f), localAngles = new Vector3(0f, 270f, 0f), localScale = new Vector3(0.2f, 0.2f, 0.2f) } }); val2.Add("mdlBasicTank", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _mugDisplayPrefab, childName = "CannonMuzzle0", localPos = new Vector3(0f, 0.16607f, -0.07901f), localAngles = new Vector3(0f, 270f, 0f), localScale = new Vector3(0.1f, 0.1f, 0.1f) } }); val4.Add("mdlBasicTank", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _redshifterDisplayPrefab, childName = "ROOT", localPos = new Vector3(1.50346f, 2.04334f, -0.38996f), localAngles = new Vector3(-1E-05f, 180f, 180f), localScale = new Vector3(1f, 1f, 1f) } }); val7.Add("mdlBasicTank", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _doomedMoonDisplayPrefab, childName = "ROOT", localPos = new Vector3(-1.71963f, 2.4493f, -1.30414f), localAngles = new Vector3(0f, 0f, 45f), localScale = new Vector3(1f, 1f, 1f) } }); val2.Add("mdlDefectiveUnit (1)", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _mugDisplayPrefab, childName = "Body", localPos = new Vector3(0.53761f, 0.58974f, 0.39026f), localAngles = new Vector3(65.78642f, 158.3518f, 326.1167f), localScale = new Vector3(0.2f, 0.2f, 0.2f) } }); val3.Add("mdlEngiTurret", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _comboStarDisplayPrefab, childName = "Head", localPos = new Vector3(0f, 0.83617f, -0.7562f), localAngles = new Vector3(298.6673f, 0f, 1E-05f), localScale = new Vector3(0.3f, 0.3f, 0.3f) } }); val2.Add("mdlEngiTurret", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _mugDisplayPrefab, childName = "Head", localPos = new Vector3(0f, 0.84778f, -1.66701f), localAngles = new Vector3(0f, 270f, 20.28025f), localScale = new Vector3(0.3f, 0.3f, 0.3f) } }); val4.Add("mdlEngiTurret", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _redshifterDisplayPrefab, childName = "Base", localPos = new Vector3(2.07f, 3.72f, 0.41f), localAngles = new Vector3(-0.0003f, 180.079f, 180.4018f), localScale = new Vector3(1f, 1f, 1f) } }); val7.Add("mdlEngiTurret", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _doomedMoonDisplayPrefab, childName = "Base", localPos = new Vector3(-2.34182f, 3.93022f, -1.91096f), localAngles = new Vector3(0f, 0f, 45f), localScale = new Vector3(0.8f, 0.8f, 0.8f) } }); val5.Add("mdlEngiTurret", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = _bioticShellDisplayPrefab, childName = "Head", localPos = new Vector3(0f, 0f, -0.326f), localAngles = new Vector3(358.6553f, 0f, 0f), localScale = new Vector3(0.42f, 0.42f, 0.42f) } }); _lanceEquipmentDef.requiredExpansion = val; _comboStarItem.requiredExpansion = val; _redshifter.requiredExpansion = val; _doomedMoon.requiredExpansion = val; _mug.requiredExpansion = val; _riskyDice.requiredExpansion = val; _riskyDiceCount.requiredExpansion = val; _riskyDiceAffliction.requiredExpansion = val; _riskyDiceCount.hidden = true; ItemAPI.Add(new CustomItem(_mug, val2)); ItemAPI.Add(new CustomItem(_comboStarItem, val3)); ItemAPI.Add(new CustomItem(_redshifter, val4)); ItemAPI.Add(new CustomItem(_bioticShell, val5)); ItemAPI.Add(new CustomEquipment(_lanceEquipmentDef, val6)); ItemAPI.Add(new CustomItem(_doomedMoon, val7)); ItemAPI.Add(new CustomItem(_doomedMoonConsumed, new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>()))); ItemAPI.Add(new CustomItem(_doomedMoonStatToken, new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>()))); ItemAPI.Add(new CustomItem(_riskyDice, new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>()))); ItemAPI.Add(new CustomItem(_riskyDiceCount, new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>()))); ItemAPI.Add(new CustomItem(_riskyDiceAffliction, new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>()))); RiskOfImpactContentPack.itemDefs.Add((ItemDef[])(object)new ItemDef[1] { _mug }); RiskOfImpactContentPack.itemDefs.Add((ItemDef[])(object)new ItemDef[1] { _comboStarItem }); RiskOfImpactContentPack.buffDefs.Add((BuffDef[])(object)new BuffDef[1] { _comboStarBuff }); RiskOfImpactContentPack.buffDefs.Add((BuffDef[])(object)new BuffDef[1] { _comboStarMaxBuff }); RiskOfImpactContentPack.itemDefs.Add((ItemDef[])(object)new ItemDef[1] { _redshifter }); RiskOfImpactContentPack.itemDefs.Add((ItemDef[])(object)new ItemDef[1] { _doomedMoon }); RiskOfImpactContentPack.itemDefs.Add((ItemDef[])(object)new ItemDef[1] { _doomedMoonConsumed }); RiskOfImpactContentPack.itemDefs.Add((ItemDef[])(object)new ItemDef[1] { _doomedMoonStatToken }); RiskOfImpactContentPack.buffDefs.Add((BuffDef[])(object)new BuffDef[1] { _doomedMoonBuff }); RiskOfImpactContentPack.itemDefs.Add((ItemDef[])(object)new ItemDef[1] { _riskyDice }); RiskOfImpactContentPack.itemDefs.Add((ItemDef[])(object)new ItemDef[1] { _riskyDiceCount }); RiskOfImpactContentPack.itemDefs.Add((ItemDef[])(object)new ItemDef[1] { _riskyDiceAffliction }); RiskOfImpactContentPack.buffDefs.Add((BuffDef[])(object)new BuffDef[1] { _riskyDiceBuff }); RiskOfImpactContentPack.itemDefs.Add((ItemDef[])(object)new ItemDef[1] { _bioticShell }); RiskOfImpactContentPack.equipmentDefs.Add((EquipmentDef[])(object)new EquipmentDef[1] { _lanceEquipmentDef }); RiskOfImpactContentPack.projectilePrefabs.Add((GameObject[])(object)new GameObject[1] { _lanceProjectilePrefab }); RiskOfImpactContentPack.expansionDefs.Add((ExpansionDef[])(object)new ExpansionDef[1] { val }); LanguageAPI.Add("EQUIPMENT_LANCEOFLONGINUS_NAME", "Lance of Longinus"); LanguageAPI.Add("EQUIPMENT_LANCEOFLONGINUS_PICKUP", "Throw a mighty lance that impales enemies and can be retrieved, <style=cIsLunar>but at a cost</style>."); LanguageAPI.Add("EQUIPMENT_LANCEOFLONGINUS_DESC", "Throw a spear for <style=cIsDamage>9000%</style> damage, <style=cIsLunar>but</style> lose <style=cIsHealth>20%</style> maximum health."); LanguageAPI.Add("DD_NAME", "Cheerful Mug"); LanguageAPI.Add("DD_PICKUP", "Wait, are those marshmallows or sugar cubes?"); LanguageAPI.Add("DD_DESC", "Gain <style=cIsUtility>69%</style> (<style=cStack>+69% per stack</style>) movement and attack speed"); LanguageAPI.Add("COMBOSTAR_NAME", "Combo Star"); LanguageAPI.Add("COMBOSTAR_PICKUP", "Hitting enemies builds damage, missing a hit resets it."); LanguageAPI.Add("COMBOSTAR_DESC", "Hitting an enemy increases your damage by <style=cIsDamage>3%</style> (<style=cStack>+0.5% per stack</style>), up to <style=cIsUtility>20</style> (<style=cStack>+10 per stack</style>). Missing a skill hit <style=cDeath>resets all stacks</style>. At maximum stacks, gain <style=cIsDamage>5%</style> (<style=cStack>+2.5% per stack</style>) crit chance."); LanguageAPI.Add("RS_NAME", "Redshifter"); LanguageAPI.Add("RS_PICKUP", "Expand space to your benefit"); LanguageAPI.Add("RS_DESC", "Gain <style=cIsUtility>50%</style> (<style=cStack>+50% per stack</style>) radius and range bonuses"); LanguageAPI.Add("BIOTICSHELL_NAME", "Biotic Shell"); LanguageAPI.Add("BIOTICSHELL_PICKUP", "<style=cIsVoid>Corrupts all Personal Shield Generators.</style> Slows the degradation of temporary barriers."); LanguageAPI.Add("BIOTICSHELL_DESC", "<style=cIsVoid>Corrupts all Personal Shield Generators.</style> Temporary barriers decay <style=cIsUtility>12%</style> <style=cStack>(+12% per stack)</style> slower."); LanguageAPI.Add("DM_NAME", "Doomed Moon"); LanguageAPI.Add("DM_PICKUP", "Revive each stage, but <style=cDeath>but lose items</style>"); LanguageAPI.Add("DM_DESC", "Gain a <style=cIsHealing>revive</style> <style=cStack>(per stack)</style> each stage. <style=cDeath>Breaks 10% of your items</style> <style=cStack>(5 items minimum)</style> on revive <style=cArtifact>(excluding Void items)</style>. After reviving, permanently gain <style=cIsUtility>+10%</style> to <style=cShrine>all stats</style>. <style=cDeath>Fails if fewer than 5 eligible items exist</style>."); LanguageAPI.Add("DMC_NAME", "Doomed Moon (Consumed)"); LanguageAPI.Add("DMC_DESC", "Gain a <style=cIsHealing>revive</style> <style=cStack>(per stack)</style> each stage. <style=cDeath>Breaks 10% of your items</style> <style=cStack>(5 items minimum)</style> on revive <style=cArtifact>(excluding Void items)</style>. After reviving, permanently gain <style=cIsUtility>+10%</style> to <style=cShrine>all stats</style>. <style=cDeath>Fails if fewer than 5 eligible items exist</style>."); LanguageAPI.Add("RD_NAME", "Risky Dice"); LanguageAPI.Add("RD_PICKUP", "Roll fate at chests and Shrines of Chance for bonus rewards... or pay the price."); LanguageAPI.Add("RD_DESC", "<style=cShrine>Chests</style> and <style=cShrine>Shrines of Chance</style> roll <style=cIsUtility>once</style> <style=cStack>(per stack)</style> per interaction.\n<style=cShrine>Success</style> (<style=cShrine>19 in 20</style>): Gain <style=cIsUtility>1 Risk</style> and the interactable drops <style=cIsDamage>+1 extra item</style> per successful roll.\n<style=cDeath>Misfortune</style> (<style=cDeath>1 in 20</style>): You still <style=cDeath>pay the cost</style>, the interaction is <style=cDeath>canceled</style>, and your <style=cIsUtility>Risk resets</style>.\nYou'll receive <style=cWorldEvent>permanent</style> debuffs to <style=cDeath>all stats</style> equal to your total <style=cIsUtility>Risk</style> <style=cStack>(2% per Risk)</style>.\nIf you have 20 or more Risk upon rolling Misfortune, you will <style=cDeath>die</style>."); LanguageAPI.Add("RDA_NAME", "Buyer's Remorse"); LanguageAPI.Add("RDA_DESC", "<style=cWorldEvent>Permanent</style>.\n<style=cDeath>Reduce all stats by 2%</style> <style=cStack>(+2% per stack)</style>."); ItemRelationshipType relationshipType = Addressables.LoadAssetAsync<ItemRelationshipType>((object)"RoR2/DLC1/Common/ContagiousItem.asset").WaitForCompletion(); ItemDef val8 = Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/Base/PersonalShield/PersonalShield.asset").WaitForCompletion(); if (!Object.op_Implicit((Object)(object)val8) || !Object.op_Implicit((Object)(object)_bioticShell)) { Debug.LogError((object)"[RiskOfImpact] BioticShell void corruption failed: missing PersonalShield or BioticShell ItemDef."); } else { ItemRelationshipProvider val9 = ScriptableObject.CreateInstance<ItemRelationshipProvider>(); val9.relationshipType = relationshipType; val9.relationships = (Pair[])(object)new Pair[1] { new Pair { itemDef1 = val8, itemDef2 = _bioticShell } }; RiskOfImpactContentPack.itemRelationshipProviders.Add((ItemRelationshipProvider[])(object)new ItemRelationshipProvider[1] { val9 }); } Debug.Log((object)"[RiskOfImpactContent] Assets and language tokens registered."); } public IEnumerator GenerateContentPackAsync(GetContentPackAsyncArgs args) { ContentPack.Copy(RiskOfImpactContentPack, args.output); args.ReportProgress(1f); yield break; } public IEnumerator FinalizeAsync(FinalizeAsyncArgs args) { object obj = <>c.<>9__34_0; if (obj == null) { StatHookEventHandler val = delegate(CharacterBody body, StatHookEventArgs statArgs) { if (Object.op_Implicit((Object)(object)body.inventory)) { int itemCountEffective = body.inventory.GetItemCountEffective(_mug); if (itemCountEffective > 0) { statArgs.moveSpeedMultAdd += 0.69f * (float)itemCountEffective; statArgs.attackSpeedMultAdd += 0.69f * (float)itemCountEffective; } int itemCountEffective2 = body.inventory.GetItemCountEffective(_comboStarItem); if (itemCountEffective2 > 0) { int buffCount = body.GetBuffCount(_comboStarBuff); if (buffCount > 0) { float num = (0.03f + (float)(itemCountEffective2 - 1) * 0.005f) * (float)buffCount; statArgs.damageMultAdd += num; if (body.GetBuffCount(_comboStarMaxBuff) > 0) { statArgs.critAdd += 5f + (float)(itemCountEffective2 - 1) * 2.5f; } } } } }; <>c.<>9__34_0 = val; obj = (object)val; } RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj; args.ReportProgress(1f); yield break; } private void AddSelf(AddContentPackProviderDelegate addContentPackProvider) { addContentPackProvider.Invoke((IContentPackProvider)(object)this); } internal RiskOfImpactContent() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown ContentManager.collectContentPackProviders += new CollectContentPackProvidersDelegate(AddSelf); } public static EquipmentDef GetLanceEquipmentDef() { return _lanceEquipmentDef; } public static GameObject GetLanceProjectilePrefab() { return _lanceProjectilePrefab; } public static ItemDef GetComboStarItemDef() { return _comboStarItem; } public static BuffDef GetComboStarBuffDef() { return _comboStarBuff; } public static BuffDef GetComboStarMaxBuffDef() { return _comboStarMaxBuff; } public static ItemDef GetMugItemDef() { return _mug; } public static ItemDef GetRedshifterItemDef() { return _redshifter; } public static ItemDef GetDoomedMoonItemDef() { return _doomedMoon; } public static ItemDef GetDoomedMoonConsumedItemDef() { return _doomedMoonConsumed; } public static ItemDef GetDoomedMoonStatTokenItemDef() { return _doomedMoonStatToken; } public static BuffDef GetDoomedMoonBuffDef() { return _doomedMoonBuff; } public static ItemDef GetRiskyDiceItemDef() { return _riskyDice; } public static ItemDef GetRiskyDiceCountItemDef() { return _riskyDiceCount; } public static ItemDef GetRiskyDiceAfflictionItemDef() { return _riskyDiceAffliction; } public static BuffDef GetRiskyDiceBuffDef() { return _riskyDiceBuff; } public static ItemDef GetBioticShellItemDef() { return _bioticShell; } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.MrE42.RiskOfImpact", "Risk Of Impact", "0.3.2")] public class RiskOfImpactMain : BaseUnityPlugin { public const string GUID = "com.MrE42.RiskOfImpact"; public const string MODNAME = "Risk Of Impact"; public const string VERSION = "0.3.2"; public static PluginInfo pluginInfo { get; private set; } public static RiskOfImpactMain instance { get; private set; } internal static AssetBundle assetBundle { get; private set; } internal static string assetBundleDir => Path.Combine(Path.GetDirectoryName(pluginInfo.Location), "RiskOfImpactAssets"); public static bool IsLookingGlassInstalled => Chainloader.PluginInfos.ContainsKey("droppod.lookingglass"); private void Awake() { instance = this; pluginInfo = ((BaseUnityPlugin)this).Info; Debug.Log((object)"[RiskOfImpactMain] Awake: Initializing mod..."); new RiskOfImpactContent(); Debug.Log((object)"[RiskOfImpactMain] Content loaded. Initializing Equipment Hook..."); if (IsLookingGlassInstalled) { LookingGlassCompat.Init(); } LanceOfLonginusEquipmentHook.Init(); ComboStarHooks.Init(); RedshifterHooks.Init(); BioticShellHooks.Init(); DoomedMoonHooks.Init(); RiskyDiceHooks.Init(); } internal static void LogFatal(object data) { ((BaseUnityPlugin)instance).Logger.LogFatal(data); } internal static void LogError(object data) { ((BaseUnityPlugin)instance).Logger.LogError(data); } internal static void LogWarning(object data) { ((BaseUnityPlugin)instance).Logger.LogWarning(data); } internal static void LogMessage(object data) { ((BaseUnityPlugin)instance).Logger.LogMessage(data); } internal static void LogInfo(object data) { ((BaseUnityPlugin)instance).Logger.LogInfo(data); } internal static void LogDebug(object data) { ((BaseUnityPlugin)instance).Logger.LogDebug(data); } } public static class BioticShellHooks { private const float k = 0.12f; public static void Init() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown HealthComponent.GetBarrierDecayRate += new hook_GetBarrierDecayRate(HealthComponent_GetBarrierDecayRate); } private static float HealthComponent_GetBarrierDecayRate(orig_GetBarrierDecayRate orig, HealthComponent self) { float num = orig.Invoke(self); CharacterBody obj = self?.body; Inventory val = ((obj != null) ? obj.inventory : null); ItemDef bioticShellItemDef = RiskOfImpactContent.GetBioticShellItemDef(); if ((Object)(object)val != (Object)null && (Object)(object)bioticShellItemDef != (Object)null) { int itemCount = val.GetItemCount(bioticShellItemDef); if (itemCount > 0) { float num2 = 1f / (1f + 0.12f * (float)itemCount); num *= num2; } } return num; } } public static class ComboStarHooks { public const int BaseMaxStacks = 20; public const int ExtraStacksPerItem = 10; public const float SkillHitTimeout = 5f; public static bool VerboseLogs = true; public static void Init() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Expected O, but got Unknown RiskOfImpactMain.LogInfo("[ComboStar] Init: registering hooks + net messages."); NetworkingAPI.RegisterMessageType<ComboStarSkillExecuteMessage>(); CharacterBody.onBodyStartGlobal += OnBodyStart; GlobalEventManager.OnHitEnemy += new hook_OnHitEnemy(GlobalEventManager_OnHitEnemy); GenericSkill.OnExecute += new hook_OnExecute(GenericSkill_OnExecute); } private static bool SkillCountsForCombo(GenericSkill skill) { if (!Object.op_Implicit((Object)(object)skill) || (Object)(object)skill.skillDef == (Object)null) { RiskOfImpactMain.LogDebug("[ComboStar] SkillCountsForCombo: skill or skillDef is null -> false"); return false; } SkillDef skillDef = skill.skillDef; string skillNameToken = skillDef.skillNameToken; switch (skillNameToken) { case "RAILGUNNER_SECONDARY_NAME": RiskOfImpactMain.LogDebug("[ComboStar] SkillCountsForCombo: " + skillNameToken + " is blacklisted (setup skill) -> false"); return false; case "RAILGUNNER_SPECIAL_NAME": RiskOfImpactMain.LogDebug("[ComboStar] SkillCountsForCombo: " + skillNameToken + " is blacklisted (setup skill) -> false"); return false; default: if (skillNameToken.StartsWith("CHEESEWITHHOLES_BASICTANK_BODY_UTILITY")) { RiskOfImpactMain.LogDebug("[ComboStar] SkillCountsForCombo: " + skillNameToken + " is exempt (tank utility) -> false"); return false; } break; case null: break; } if (!skillDef.isCombatSkill) { RiskOfImpactMain.LogDebug("[ComboStar] SkillCountsForCombo: " + skillNameToken + " isCombatSkill=false -> false"); return false; } RiskOfImpactMain.LogDebug("[ComboStar] SkillCountsForCombo: " + skillNameToken + " isCombatSkill=true -> true"); return true; } private static void OnBodyStart(CharacterBody body) { //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active || !Object.op_Implicit((Object)(object)body) || Object.op_Implicit((Object)(object)((Component)body).GetComponent<ComboStarTracker>())) { return; } ((Component)body).gameObject.AddComponent<ComboStarTracker>(); if (VerboseLogs) { NetworkIdentity component = ((Component)body).GetComponent<NetworkIdentity>(); string displayName = body.GetDisplayName(); object obj; if (!Object.op_Implicit((Object)(object)component)) { obj = "noNetId"; } else { NetworkInstanceId netId = component.netId; obj = ((object)(NetworkInstanceId)(ref netId)).ToString(); } RiskOfImpactMain.LogInfo("[ComboStar] OnBodyStart: Added tracker on SERVER. body=" + displayName + " netId=" + (string?)obj); } } private static void GlobalEventManager_OnHitEnemy(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim) { //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, damageInfo, victim); if (!NetworkServer.active) { return; } if (!Object.op_Implicit((Object)(object)damageInfo.attacker)) { if (VerboseLogs) { RiskOfImpactMain.LogDebug("[ComboStar] OnHitEnemy(SERVER): attacker is null, ignoring."); } return; } if (damageInfo.rejected || damageInfo.damage <= 0f) { if (VerboseLogs) { RiskOfImpactMain.LogDebug($"[ComboStar] OnHitEnemy(SERVER): rejected or zero damage (rejected={damageInfo.rejected}, damage={damageInfo.damage}), ignoring."); } return; } if (DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)67108864)) != 0L) { if (VerboseLogs) { RiskOfImpactMain.LogDebug("[ComboStar] OnHitEnemy(SERVER): DoT damage type, ignoring."); } return; } CharacterBody component = damageInfo.attacker.GetComponent<CharacterBody>(); if (!Object.op_Implicit((Object)(object)component)) { if (VerboseLogs) { RiskOfImpactMain.LogDebug("[ComboStar] OnHitEnemy(SERVER): attacker has no CharacterBody, ignoring."); } return; } ComboStarTracker component2 = ((Component)component).GetComponent<ComboStarTracker>(); if ((Object)(object)component2 != (Object)null) { if (VerboseLogs) { NetworkIdentity component3 = ((Component)component).GetComponent<NetworkIdentity>(); string displayName = component.GetDisplayName(); object arg; if (!Object.op_Implicit((Object)(object)component3)) { arg = "noNetId"; } else { NetworkInstanceId netId = component3.netId; arg = ((object)(NetworkInstanceId)(ref netId)).ToString(); } RiskOfImpactMain.LogDebug($"[ComboStar] OnHitEnemy(SERVER): RegisterHit body={displayName} netId={arg} dmg={damageInfo.damage:0.0}"); } component2.RegisterHit(); } else if (VerboseLogs) { RiskOfImpactMain.LogDebug("[ComboStar] OnHitEnemy(SERVER): NO tracker found on " + component.GetDisplayName()); } } private static void GenericSkill_OnExecute(orig_OnExecute orig, GenericSkill self) { //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (!Object.op_Implicit((Object)(object)self)) { return; } CharacterBody characterBody = self.characterBody; if (!Object.op_Implicit((Object)(object)characterBody) || !SkillCountsForCombo(self)) { return; } string text = (Object.op_Implicit((Object)(object)self.skillDef) ? self.skillDef.skillNameToken : "<null_token>"); NetworkIdentity component = ((Component)characterBody).GetComponent<NetworkIdentity>(); object obj; if (!Object.op_Implicit((Object)(object)component)) { obj = "noNetId"; } else { NetworkInstanceId netId = component.netId; obj = ((object)(NetworkInstanceId)(ref netId)).ToString(); } string text2 = (string)obj; if (NetworkServer.active) { ComboStarTracker component2 = ((Component)characterBody).GetComponent<ComboStarTracker>(); if ((Object)(object)component2 != (Object)null) { if (VerboseLogs) { RiskOfImpactMain.LogDebug("[ComboStar] GenericSkill_OnExecute(SERVER): body=" + characterBody.GetDisplayName() + " netId=" + text2 + " token=" + text); } component2.OnEligibleSkillExecutedToken(text); } else if (VerboseLogs) { RiskOfImpactMain.LogDebug("[ComboStar] GenericSkill_OnExecute(SERVER): NO tracker on body=" + characterBody.GetDisplayName() + " netId=" + text2); } } else if (NetworkClient.active && ((NetworkBehaviour)characterBody).hasAuthority && Object.op_Implicit((Object)(object)component)) { if (VerboseLogs) { RiskOfImpactMain.LogDebug("[ComboStar] GenericSkill_OnExecute(CLIENT->SERVER SEND): body=" + characterBody.GetDisplayName() + " netId=" + text2 + " token=" + text); } NetMessageExtensions.Send((INetMessage)(object)new ComboStarSkillExecuteMessage(component.netId, text), (NetworkDestination)2); } else if (VerboseLogs) { RiskOfImpactMain.LogDebug("[ComboStar] GenericSkill_OnExecute(CLIENT ignored): body=" + characterBody.GetDisplayName() + " netId=" + text2 + " " + $"NetworkClient.active={NetworkClient.active} hasAuthority={((NetworkBehaviour)characterBody).hasAuthority} hasNetId={(Object)(object)component != (Object)null} token={text}"); } } } public class ComboStarSkillExecuteMessage : INetMessage, ISerializableObject { private NetworkInstanceId bodyNetId; private string skillToken; public ComboStarSkillExecuteMessage() { } public ComboStarSkillExecuteMessage(NetworkInstanceId bodyNetId, string skillToken) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) this.bodyNetId = bodyNetId; this.skillToken = skillToken; } public void Serialize(NetworkWriter writer) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) writer.Write(bodyNetId); writer.Write(skillToken ?? ""); } public void Deserialize(NetworkReader reader) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) bodyNetId = reader.ReadNetworkId(); skillToken = reader.ReadString(); } public void OnReceived() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { return; } GameObject val = Util.FindNetworkObject(bodyNetId); if (!Object.op_Implicit((Object)(object)val)) { RiskOfImpactMain.LogDebug($"[ComboStarNet] OnReceived(SERVER): Could not find body object for netId={bodyNetId}"); return; } CharacterBody component = val.GetComponent<CharacterBody>(); if (!Object.op_Implicit((Object)(object)component)) { RiskOfImpactMain.LogDebug($"[ComboStarNet] OnReceived(SERVER): netId={bodyNetId} has no CharacterBody"); return; } ComboStarTracker component2 = ((Component)component).GetComponent<ComboStarTracker>(); if (!Object.op_Implicit((Object)(object)component2)) { RiskOfImpactMain.LogDebug($"[ComboStarNet] OnReceived(SERVER): netId={bodyNetId} body={component.GetDisplayName()} has NO tracker"); return; } if (ComboStarHooks.VerboseLogs) { RiskOfImpactMain.LogDebug($"[ComboStarNet] OnReceived(SERVER): Apply skill execute. body={component.GetDisplayName()} netId={bodyNetId} token={skillToken}"); } component2.OnEligibleSkillExecutedToken(skillToken); } } public class ComboStarTracker : MonoBehaviour { private struct Bucket { public float expiresAt; public bool hadHit; } private CharacterBody body; private readonly Queue<Bucket> buckets = new Queue<Bucket>(); private float currentBucketStartTime = -999f; private bool stackGrantedThisSkill; private const float BucketSeconds = 0.2f; private float lastEligibleExecuteTime = -1f; private float ewmaExecuteInterval = 0.15f; private const float ExecuteIntervalAlpha = 0.2f; private const float ActiveMinTimeout = 0.35f; private const float ActiveMaxTimeout = 2f; private const float ActiveBaseTimeout = 0.1f; private const float ActiveIntervalMultiplier = 4f; private const float DelayedSkillHitTimeout = 10f; private bool delayedPending; private float delayedPendingExpiresAt; private string delayedPendingToken; private static readonly HashSet<string> DelayedSkillTokens = new HashSet<string> { "ENGI_PRIMARY_NAME", "CHEESEWITHHOLES_BASICTANK_BODY_SECONDARY_OBLITERATOR_CANNON_NAME" }; private static bool SkillIsDelayedHitToken(string token) { if (!string.IsNullOrEmpty(token)) { return DelayedSkillTokens.Contains(token); } return false; } private void Awake() { body = ((Component)this).GetComponent<CharacterBody>(); } private void OnEnable() { ResetCombo("OnEnable"); } private void OnDisable() { ResetCombo("OnDisable"); } private float ComputeBucketTimeoutSeconds(bool comboActive) { if (!comboActive) { return 5f; } return Mathf.Clamp(0.1f + 4f * ewmaExecuteInterval, 0.35f, Mathf.Min(2f, 5f)); } public void OnEligibleSkillExecutedToken(string token) { if (!NetworkServer.active || !Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)body.inventory) || body.inventory.GetItemCountEffective(RiskOfImpactContent.GetComboStarItemDef()) <= 0) { return; } BuffDef comboStarBuffDef = RiskOfImpactContent.GetComboStarBuffDef(); int buffCount = body.GetBuffCount(comboStarBuffDef); float time = Time.time; if (lastEligibleExecuteTime > 0f) { float num = time - lastEligibleExecuteTime; if (num > 0f && num < 1f) { ewmaExecuteInterval = Mathf.Lerp(ewmaExecuteInterval, num, 0.2f); } } lastEligibleExecuteTime = time; if (SkillIsDelayedHitToken(token)) { if (buffCount > 0) { delayedPending = true; delayedPendingExpiresAt = time + 10f; delayedPendingToken = token; if (ComboStarHooks.VerboseLogs) { RiskOfImpactMain.LogDebug($"[ComboStarTracker] Delayed pending started. body={body.GetDisplayName()}, token={token}, expiresAt={delayedPendingExpiresAt:0.00}"); } } stackGrantedThisSkill = false; return; } if (buckets.Count == 0 || time - currentBucketStartTime > 0.2f) { currentBucketStartTime = time; bool comboActive = buffCount > 0; float num2 = ComputeBucketTimeoutSeconds(comboActive); buckets.Enqueue(new Bucket { hadHit = false, expiresAt = time + num2 }); if (ComboStarHooks.VerboseLogs) { RiskOfImpactMain.LogDebug($"[ComboStarTracker] New bucket. body={body.GetDisplayName()}, token={token}, stacks={buffCount}, buckets={buckets.Count}, expiresAt={time + num2:0.00}"); } } else if (ComboStarHooks.VerboseLogs) { RiskOfImpactMain.LogDebug($"[ComboStarTracker] Reuse bucket. body={body.GetDisplayName()}, token={token}, stacks={buffCount}, buckets={buckets.Count}"); } stackGrantedThisSkill = false; } public void RegisterHit() { if (!NetworkServer.active || !Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)body.inventory)) { return; } int itemCountEffective = body.inventory.GetItemCountEffective(RiskOfImpactContent.GetComboStarItemDef()); if (itemCountEffective <= 0) { return; } if (delayedPending) { delayedPending = false; if (ComboStarHooks.VerboseLogs) { RiskOfImpactMain.LogDebug("[ComboStarTracker] Delayed window satisfied by hit. body=" + body.GetDisplayName() + ", token=" + delayedPendingToken); } } if (buckets.Count > 0) { int count = buckets.Count; Bucket item = default(Bucket); for (int i = 0; i < count; i++) { Bucket bucket = buckets.Dequeue(); if (i == count - 1) { item = bucket; } else { buckets.Enqueue(bucket); } } item.hadHit = true; buckets.Enqueue(item); } else if (ComboStarHooks.VerboseLogs) { RiskOfImpactMain.LogDebug("[ComboStarTracker] RegisterHit: NO buckets (hit happened without execute tracking). body=" + body.GetDisplayName()); } BuffDef comboStarBuffDef = RiskOfImpactContent.GetComboStarBuffDef(); int buffCount = body.GetBuffCount(comboStarBuffDef); if (stackGrantedThisSkill) { if (ComboStarHooks.VerboseLogs) { RiskOfImpactMain.LogDebug($"[ComboStarTracker] RegisterHit: stack already granted this skill. body={body.GetDisplayName()} stacks={buffCount}"); } return; } int num = 20 + 10 * (itemCountEffective - 1); BuffDef comboStarMaxBuffDef = RiskOfImpactContent.GetComboStarMaxBuffDef(); if (buffCount >= num) { return; } body.AddBuff(comboStarBuffDef); buffCount++; stackGrantedThisSkill = true; if (ComboStarHooks.VerboseLogs) { RiskOfImpactMain.LogDebug($"[ComboStarTracker] +STACK. body={body.GetDisplayName()} stacksNow={buffCount}/{num}"); } if (buffCount == num) { body.AddBuff(comboStarMaxBuffDef); if (ComboStarHooks.VerboseLogs) { RiskOfImpactMain.LogDebug("[ComboStarTracker] MAX reached. body=" + body.GetDisplayName() + " added max buff."); } } } private void FixedUpdate() { if (!Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)body.inventory)) { return; } int itemCountEffective = body.inventory.GetItemCountEffective(RiskOfImpactContent.GetComboStarItemDef()); BuffDef comboStarBuffDef = RiskOfImpactContent.GetComboStarBuffDef(); int buffCount = body.GetBuffCount(comboStarBuffDef); int num = 20 + 10 * (itemCountEffective - 1); if (itemCountEffective <= 0) { if (buffCount > 0) { ResetCombo("Lost all items"); } return; } if (delayedPending && buffCount > 0 && Time.time >= delayedPendingExpiresAt) { RiskOfImpactMain.LogInfo("[ComboStarTracker] Delayed expired -> reset. body=" + body.GetDisplayName() + ", token=" + delayedPendingToken); ResetCombo("Delayed skill hit window expired"); return; } while (buckets.Count > 0 && Time.time >= buckets.Peek().expiresAt) { Bucket bucket = buckets.Dequeue(); if (buffCount > 0 && !bucket.hadHit) { RiskOfImpactMain.LogInfo("[ComboStarTracker] Bucket expired without hit -> reset. body=" + body.GetDisplayName()); ResetCombo("Bucket expired without hit"); return; } } BuffDef comboStarMaxBuffDef = RiskOfImpactContent.GetComboStarMaxBuffDef(); int buffCount2 = body.GetBuffCount(comboStarMaxBuffDef); if (buffCount < num && buffCount2 > 0) { body.RemoveBuff(comboStarMaxBuffDef); if (ComboStarHooks.VerboseLogs) { RiskOfImpactMain.LogDebug($"[ComboStarTracker] Removed max buff because stacks dropped. body={body.GetDisplayName()} stacks={buffCount}/{num}"); } } } private void ResetCombo(string reason) { if (!Object.op_Implicit((Object)(object)body)) { return; } BuffDef comboStarBuffDef = RiskOfImpactContent.GetComboStarBuffDef(); int buffCount = body.GetBuffCount(comboStarBuffDef); if (buffCount > 0) { RiskOfImpactMain.LogInfo($"[ComboStarTracker] ResetCombo: reason={reason}, body={body.GetDisplayName()}, removing {buffCount} stacks."); for (int i = 0; i < buffCount; i++) { body.RemoveBuff(comboStarBuffDef); } BuffDef comboStarMaxBuffDef = RiskOfImpactContent.GetComboStarMaxBuffDef(); if (body.GetBuffCount(comboStarMaxBuffDef) > 0) { body.RemoveBuff(comboStarMaxBuffDef); } } else if (ComboStarHooks.VerboseLogs) { RiskOfImpactMain.LogDebug("[ComboStarTracker] ResetCombo: reason=" + reason + ", body=" + body.GetDisplayName() + ", no stacks to remove."); } buckets.Clear(); currentBucketStartTime = -999f; delayedPending = false; delayedPendingExpiresAt = 0f; delayedPendingToken = null; stackGrantedThisSkill = false; } } internal static class DoomedMoonHooks { private const int ItemsToBreak = 5; private const float PctToBreak = 0.1f; private const float PctPerToken = 0.1f; private const float CritPerToken = 10f; private const float ArmorPerToken = 10f; private const float RegenBase = 0.1f; private const float RegenAddPerExtra = 0.02f; private static ItemIndex _doomedMoonIndex = (ItemIndex)(-1); private static ItemDef _doomedMoonDef; private static ItemDef _doomedMoonConsumedDef; private static ItemIndex _doomedMoonConsumedIndex = (ItemIndex)(-1); private static ItemDef _doomedMoonStatTokenDef; private static ItemIndex _doomedMoonStatTokenIndex = (ItemIndex)(-1); private static BuffDef _doomedMoonBuffDef; private static BuffIndex _doomedMoonBuffIndex = (BuffIndex)(-1); private static bool _initialized; private static bool _resolvedOnceLogged; internal static void Init() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Expected O, but got Unknown if (!_initialized) { _initialized = true; Stage.onServerStageBegin += OnServerStageBegin; CharacterMaster.TryReviveOnBodyDeath += new hook_TryReviveOnBodyDeath(CharacterMaster_TryReviveOnBodyDeath); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(ApplyStatBonuses); RiskOfImpactMain.LogInfo("[DoomedMoon] Hooks initialized."); } } private static bool EnsureResolved() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Invalid comparison between Unknown and I4 //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Invalid comparison between Unknown and I4 //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Invalid comparison between Unknown and I4 //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Invalid comparison between Unknown and I4 //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_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_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010b: 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_0162: Invalid comparison between Unknown and I4 //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Invalid comparison between Unknown and I4 //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Invalid comparison between Unknown and I4 //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Invalid comparison between Unknown and I4 if ((int)_doomedMoonIndex != -1 && (int)_doomedMoonConsumedIndex != -1 && (int)_doomedMoonStatTokenIndex != -1 && (int)_doomedMoonBuffIndex != -1 && Object.op_Implicit((Object)(object)_doomedMoonDef) && Object.op_Implicit((Object)(object)_doomedMoonConsumedDef) && Object.op_Implicit((Object)(object)_doomedMoonStatTokenDef) && Object.op_Implicit((Object)(object)_doomedMoonBuffDef)) { return true; } try { _doomedMoonDef = RiskOfImpactContent.GetDoomedMoonItemDef(); _doomedMoonConsumedDef = RiskOfImpactContent.GetDoomedMoonConsumedItemDef(); _doomedMoonStatTokenDef = RiskOfImpactContent.GetDoomedMoonStatTokenItemDef(); _doomedMoonBuffDef = RiskOfImpactContent.GetDoomedMoonBuffDef(); } catch (Exception arg) { if (!_resolvedOnceLogged) { _resolvedOnceLogged = true; RiskOfImpactMain.LogWarning($"[DoomedMoon] EnsureResolved failed to fetch defs from content provider: {arg}"); } return false; } if (!Object.op_Implicit((Object)(object)_doomedMoonDef) || !Object.op_Implicit((Object)(object)_doomedMoonConsumedDef) || !Object.op_Implicit((Object)(object)_doomedMoonStatTokenDef) || !Object.op_Implicit((Object)(object)_doomedMoonBuffDef)) { return false; } _doomedMoonIndex = _doomedMoonDef.itemIndex; _doomedMoonConsumedIndex = _doomedMoonConsumedDef.itemIndex; _doomedMoonStatTokenIndex = _doomedMoonStatTokenDef.itemIndex; _doomedMoonBuffIndex = _doomedMoonBuffDef.buffIndex; if ((Object)(object)_doomedMoonConsumedDef.requiredExpansion == (Object)null) { _doomedMoonConsumedDef.requiredExpansion = _doomedMoonDef.requiredExpansion; } if ((Object)(object)_doomedMoonStatTokenDef.requiredExpansion == (Object)null) { _doomedMoonStatTokenDef.requiredExpansion = _doomedMoonDef.requiredExpansion; } if ((int)_doomedMoonIndex != -1 && (int)_doomedMoonConsumedIndex != -1 && (int)_doomedMoonStatTokenIndex != -1) { return (int)_doomedMoonBuffIndex != -1; } return false; } private static void OnServerStageBegin(Stage stage) { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active || !EnsureResolved()) { return; } TryTransformResult val3 = default(TryTransformResult); foreach (CharacterMaster readOnlyInstances in CharacterMaster.readOnlyInstancesList) { Inventory val = ((readOnlyInstances != null) ? readOnlyInstances.inventory : null); if (Object.op_Implicit((Object)(object)val)) { int itemCountPermanent = val.GetItemCountPermanent(_doomedMoonConsumedIndex); if (itemCountPermanent > 0) { ItemTransformation val2 = default(ItemTransformation); ((ItemTransformation)(ref val2)).originalItemIndex = _doomedMoonConsumedIndex; ((ItemTransformation)(ref val2)).newItemIndex = _doomedMoonIndex; ((ItemTransformation)(ref val2)).minToTransform = itemCountPermanent; ((ItemTransformation)(ref val2)).maxToTransform = itemCountPermanent; val2.transformationType = (ItemTransformationTypeIndex)7; ((ItemTransformation)(ref val2)).TryTransform(val, ref val3); } } } } private static bool CharacterMaster_TryReviveOnBodyDeath(orig_TryReviveOnBodyDeath orig, CharacterMaster self, CharacterBody body) { //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: 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_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_0101: Unknown result type (might be due to invalid IL or missing references) //IL_010b: 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_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) if (orig.Invoke(self, body)) { return true; } if (!NetworkServer.active) { return false; } if (!Object.op_Implicit((Object)(object)self) || !Object.op_Implicit((Object)(object)body)) { return false; } if (!EnsureResolved()) { return false; } if (self.IsExtraLifePendingServer()) { return true; } Inventory inventory = self.inventory; if (!Object.op_Implicit((Object)(object)inventory)) { return false; } if (inventory.GetItemCountPermanent(_doomedMoonIndex) <= 0) { return false; } if (!BreakRandomItems(inventory, 5, 0.1f)) { return false; } ItemTransformation val = default(ItemTransformation); ((ItemTransformation)(ref val)).originalItemIndex = _doomedMoonIndex; ((ItemTransformation)(ref val)).newItemIndex = _doomedMoonConsumedIndex; ((ItemTransformation)(ref val)).minToTransform = 1; ((ItemTransformation)(ref val)).maxToTransform = 1; val.transformationType = (ItemTransformationTypeIndex)0; TakeResult pendingTransformation = default(TakeResult); if (!((ItemTransformation)(ref val)).TryTake(inventory, ref pendingTransformation)) { return false; } inventory.GiveItemPermanent(_doomedMoonStatTokenIndex, 1); ExtraLifeServerBehavior obj = ((Component)self).gameObject.AddComponent<ExtraLifeServerBehavior>(); obj.pendingTransformation = pendingTransformation; obj.consumedItemIndex = _doomedMoonConsumedIndex; obj.completionTime = FixedTimeStamp.now + 2f; obj.completionCallback = delegate { RespawnDoomedMoon(self); }; obj.soundTime = obj.completionTime - 1f; obj.soundCallback = delegate { PlayDoomedMoonSfx(self); }; return true; } private static void RespawnDoomedMoon(CharacterMaster master) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0106: 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_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_0128: Expected O, but got Unknown //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)master)) { return; } Vector3 val = master.deathFootPosition; if (master.killedByUnsafeArea) { CharacterBody val2 = (Object.op_Implicit((Object)(object)master.bodyPrefab) ? master.bodyPrefab.GetComponent<CharacterBody>() : null); if (Object.op_Implicit((Object)(object)val2)) { val = (Vector3)(((??)TeleportHelper.FindSafeTeleportDestination(master.deathFootPosition, val2, RoR2Application.rng)) ?? master.deathFootPosition); } } master.Respawn(val, Quaternion.Euler(0f, Random.Range(0f, 360f), 0f), true); CharacterBody body = master.GetBody(); if (Object.op_Implicit((Object)(object)body)) { body.AddTimedBuff(Buffs.Immune, 3f); EntityStateMachine[] components = ((Component)body).GetComponents<EntityStateMachine>(); foreach (EntityStateMachine obj in components) { obj.initialStateType = obj.mainStateType; } SyncDoomedMoonBuff(body); } GameObject val3 = LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/HippoRezEffect"); if (Object.op_Implicit((Object)(object)val3) && Object.op_Implicit((Object)(object)master.bodyInstanceObject)) { EffectManager.SpawnEffect(val3, new EffectData { origin = val, rotation = master.bodyInstanceObject.transform.rotation }, true); } } private static void PlayDoomedMoonSfx(CharacterMaster master) { if (Object.op_Implicit((Object)(object)master) && Object.op_Implicit((Object)(object)master.bodyInstanceObject)) { Util.PlaySound("Play_item_proc_extraLife", master.bodyInstanceObject); } } private static void ApplyStatBonuses(CharacterBody body, StatHookEventArgs args) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.inventory) && EnsureResolved()) { if (NetworkServer.active) { SyncDoomedMoonBuff(body); } int itemCountPermanent = body.inventory.GetItemCountPermanent(_doomedMoonStatTokenIndex); if (itemCountPermanent > 0) { float num = 0.1f * (float)itemCountPermanent; float num2 = 1f + num; args.healthTotalMult *= num2; args.damageTotalMult *= num2; args.moveSpeedTotalMult *= num2; args.attackSpeedTotalMult *= num2; args.critAdd += 10f * (float)itemCountPermanent; args.armorAdd += 10f * (float)itemCountPermanent; args.baseRegenAdd += 0.1f + 0.02f * (float)Mathf.Max(0, itemCountPermanent - 1); } } } private static bool BreakRandomItems(Inventory inv, int toBreak, float pctBreak) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0099: 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_00a1: Unknown result type (might be due to invalid IL or missing references) List<ItemIndex> list = new List<ItemIndex>(256); AllItemsEnumerator enumerator = ItemCatalog.allItems.GetEnumerator(); try { while (((AllItemsEnumerator)(ref enumerator)).MoveNext()) { ItemIndex current = ((AllItemsEnumerator)(ref enumerator)).Current; if (IsBreakable(inv, current)) { int itemCountPermanent = inv.GetItemCountPermanent(current); for (int i = 0; i < itemCountPermanent; i++) { list.Add(current); } } } } finally { ((IDisposable)(AllItemsEnumerator)(ref enumerator)).Dispose(); } if (list.Count < toBreak) { return false; } int num = Mathf.Max(toBreak, Mathf.CeilToInt(pctBreak * (float)list.Count)); for (int j = 0; j < num; j++) { int index = Random.Range(0, list.Count); ItemIndex val = list[index]; inv.RemoveItemPermanent(val, 1); list.RemoveAt(index); } return true; } private static bool IsBreakable(Inventory inv, ItemIndex idx) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Invalid comparison between Unknown and I4 //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Invalid comparison between Unknown and I4 //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Invalid comparison between Unknown and I4 //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Invalid comparison between Unknown and I4 //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Invalid comparison between Unknown and I4 //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Invalid comparison between Unknown and I4 //IL_007c: Unknown result type (might be due to invalid IL or missing references) if ((int)idx == -1) { return false; } if (!Object.op_Implicit((Object)(object)inv)) { return false; } if (idx == _doomedMoonIndex) { return false; } if (idx == _doomedMoonConsumedIndex) { return false; } if (idx == _doomedMoonStatTokenIndex) { return false; } ItemDef itemDef = ItemCatalog.GetItemDef(idx); if (!Object.op_Implicit((Object)(object)itemDef)) { return false; } if ((int)itemDef.tier == 6 || (int)itemDef.tier == 7 || (int)itemDef.tier == 8 || (int)itemDef.tier == 9) { return false; } if ((int)itemDef.tier == 5) { return false; } if (!itemDef.canRemove) { return false; } return inv.GetItemCountPermanent(idx) > 0; } private static void SyncDoomedMoonBuff(CharacterBody body) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Invalid comparison between Unknown and I4 //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active && Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.inventory) && (int)_doomedMoonBuffIndex != -1) { int itemCountPermanent = body.inventory.GetItemCountPermanent(_doomedMoonStatTokenIndex); itemCountPermanent = Mathf.Clamp(itemCountPermanent, 0, 255); body.SetBuffCount(_doomedMoonBuffIndex, itemCountPermanent); } } } public class LanceOfLonginusEquipment : MonoBehaviour { public EquipmentDef lanceEquipmentDef; public GameObject lanceProjectilePrefab; public float damageCoefficient = 90f; public float projectileSpeed = 200f; public float projectileForce; public bool Activate(EquipmentSlot slot) { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: 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_0087: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)slot) || !Object.op_Implicit((Object)(object)slot.characterBody)) { return false; } if (!NetworkServer.active) { return false; } CharacterBody characterBody = slot.characterBody; Ray aimRay = slot.GetAimRay(); Vector3 position = characterBody.corePosition + Vector3.up * 1f + ((Ray)(ref aimRay)).direction * 1.5f; Quaternion rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction) * Quaternion.Euler(90f, 0f, 0f); FireProjectileInfo val = default(FireProjectileInfo); val.projectilePrefab = lanceProjectilePrefab; val.position = position; val.rotation = rotation; val.owner = ((Component)characterBody).gameObject; val.damage = characterBody.damage * damageCoefficient;