Decompiled source of BraqsItems v1.5.1
BraqsItems.dll
Decompiled 3 days ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using BraqsItems.Misc; using BraqsItems.Util; using HG; using IL.RoR2; using Mono.Cecil.Cil; using MonoMod.Cil; using On.RoR2; using On.RoR2.Items; using On.RoR2.Orbs; using R2API; using RiskOfOptions; using RiskOfOptions.OptionConfigs; using RiskOfOptions.Options; using RoR2; using RoR2.ExpansionManagement; using RoR2.Orbs; using RoR2.Projectile; 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")] namespace BraqsItems { [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.Braquen.BraqsItems", "Braqs Items", "1.5.1")] [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.*/)] public class BraqsItemsMain : BaseUnityPlugin { public const string GUID = "com.Braquen.BraqsItems"; public const string MODNAME = "Braqs Items"; public const string VERSION = "1.5.1"; public static ExpansionDef BraqsItemsExpansion; internal static AssetBundle assetBundle; public static PluginInfo PluginInfo { get; private set; } public static BraqsItemsMain instance { get; private set; } internal static string assetBundleDir => Path.Combine(Path.GetDirectoryName(PluginInfo.Location), "braqsitemsassets"); private void Awake() { //IL_005d: 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) Log.Init(((BaseUnityPlugin)this).Logger); instance = this; PluginInfo = ((BaseUnityPlugin)this).Info; assetBundle = AssetBundle.LoadFromFile(assetBundleDir); ConfigManager.Init(Paths.ConfigPath); Stats.Init(); CharacterEvents.Init(); BraqsItemsExpansion = assetBundle.LoadAsset<ExpansionDef>("BraqsItemsExpansion"); BraqsItemsExpansion.disabledIconSprite = Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Common/MiscIcons/texUnlockIcon.png").WaitForCompletion(); ContentAddition.AddExpansionDef(BraqsItemsExpansion); BrokenItemRelationships.CreateBrokenItemProvider(); BiggerExplosions.Init(); AttackSpeedOnHit.Init(); LightningOnOverkill.Init(); LightningOnOverkillVoid.Init(); ExplodeAgain.Init(); RepairBrokenItems.Init(); HealFromBleed.Init(); HealFromBleedVoid.Init(); ExplosionFrenzy.Init(); HundredRendingFists.Init(); LightningDamageBoost.Init(); } } public class AttackSpeedOnHit { public class BraqsItems_AttackSpeedOnHitTracker : ItemBehavior { public List<CharacterBody> victims = new List<CharacterBody>(); private void Start() { } public bool TryAddVictim(CharacterBody victim) { if (!victims.Contains(victim)) { victims.Add(victim); base.body.RecalculateStats(); return true; } return false; } public void RemoveVictim(CharacterBody victim) { if (victims.Contains(victim)) { victims.Remove(victim); base.body.RecalculateStats(); } } private void OnDestroy() { } } public static ItemDef itemDef; internal static void Init() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown if (ConfigManager.AttackSpeedOnHit_isEnabled.Value) { Log.Info("Initializing Hundreds and Thousands Item"); itemDef = Helpers.GetItemDef("AttackSpeedOnHit"); ItemDisplayRuleDict val = new ItemDisplayRuleDict((ItemDisplayRule[])null); ItemAPI.Add(new CustomItem(itemDef, val)); Hooks(); Log.Info("Hundreds and Thousands Initialized"); } } private static void Hooks() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); CharacterBody.OnInventoryChanged += new hook_OnInventoryChanged(CharacterBody_OnInventoryChanged); GlobalEventManager.onServerDamageDealt += GlobalEventManager_onServerDamageDealt; } private static void GlobalEventManager_onServerDamageDealt(DamageReport obj) { BraqsItems_AttackSpeedOnHitTracker braqsItems_AttackSpeedOnHitTracker = default(BraqsItems_AttackSpeedOnHitTracker); CharacterEvents.BraqsItems_CharacterEventComponent braqsItems_CharacterEventComponent = default(CharacterEvents.BraqsItems_CharacterEventComponent); if (Object.op_Implicit((Object)(object)obj.attackerBody) && Object.op_Implicit((Object)(object)obj.victimMaster) && Object.op_Implicit((Object)(object)obj.victimBody.healthComponent) && obj.victimBody.healthComponent.alive && ((Component)obj.attackerBody).TryGetComponent<BraqsItems_AttackSpeedOnHitTracker>(ref braqsItems_AttackSpeedOnHitTracker) && ((Component)obj.victimMaster).TryGetComponent<CharacterEvents.BraqsItems_CharacterEventComponent>(ref braqsItems_CharacterEventComponent) && Object.op_Implicit((Object)(object)braqsItems_CharacterEventComponent.body) && braqsItems_AttackSpeedOnHitTracker.TryAddVictim(braqsItems_CharacterEventComponent.body)) { braqsItems_CharacterEventComponent.OnCharacterDeath += braqsItems_AttackSpeedOnHitTracker.RemoveVictim; } } private static void CharacterBody_OnInventoryChanged(orig_OnInventoryChanged orig, CharacterBody self) { self.AddItemBehavior<BraqsItems_AttackSpeedOnHitTracker>(self.inventory.GetItemCount(itemDef)); orig.Invoke(self); } public static void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { BraqsItems_AttackSpeedOnHitTracker braqsItems_AttackSpeedOnHitTracker = default(BraqsItems_AttackSpeedOnHitTracker); if (((Component)sender).TryGetComponent<BraqsItems_AttackSpeedOnHitTracker>(ref braqsItems_AttackSpeedOnHitTracker)) { args.attackSpeedMultAdd += (float)braqsItems_AttackSpeedOnHitTracker.victims.Count * ((float)(((ItemBehavior)braqsItems_AttackSpeedOnHitTracker).stack - 1) * ConfigManager.AttackSpeedOnHit_percentPerStack.Value + ConfigManager.AttackSpeedOnHit_percentBase.Value); } } } public class BiggerExplosions { public static ItemDef itemDef; internal static void Init() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown if (ConfigManager.BiggerExplosions_isEnabled.Value) { Log.Info("Initializing Accelerant Item"); itemDef = Helpers.GetItemDef("BiggerExplosions"); ItemDisplayRuleDict val = new ItemDisplayRuleDict((ItemDisplayRule[])null); ItemAPI.Add(new CustomItem(itemDef, val)); Hooks(); Log.Info("Acclerant Initialized"); } } private static void Hooks() { Stats.StatsCompEvent.StatsCompRecalc = (EventHandler<Stats.StatsCompRecalcArgs>)Delegate.Combine(Stats.StatsCompEvent.StatsCompRecalc, new EventHandler<Stats.StatsCompRecalcArgs>(StatsCompEvent_StatsCompRecalc)); } public static void StatsCompEvent_StatsCompRecalc(object sender, Stats.StatsCompRecalcArgs args) { if (Object.op_Implicit((Object)(object)args.Stats) && NetworkServer.active && Object.op_Implicit((Object)(object)args.Stats.inventory)) { int itemCount = args.Stats.inventory.GetItemCount(itemDef); if (itemCount > 0) { args.Stats.blastRadiusBoostAdd *= 1f + (float)(itemCount - 1) * ConfigManager.BiggerExplosions_percentPerStack.Value + ConfigManager.BiggerExplosions_percentBase.Value; } } } } public class LightningOnOverkill { public static ItemDef itemDef; internal static void Init() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown if (ConfigManager.LightningOnOverkill_isEnabled.Value) { Log.Info("Initializing Jumper Cables Item"); itemDef = Helpers.GetItemDef("LightningOnOverkill"); ItemDisplayRuleDict val = new ItemDisplayRuleDict((ItemDisplayRule[])null); ItemAPI.Add(new CustomItem(itemDef, val)); Hooks(); Log.Info("Jumper Cables Initialized"); } } private static void Hooks() { GlobalEventManager.onCharacterDeathGlobal += GlobalEventManager_onCharacterDeathGlobal; } private static void GlobalEventManager_onCharacterDeathGlobal(DamageReport obj) { //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: 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_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: 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_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Expected O, but got Unknown //IL_0148: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)obj.attackerBody) || !Object.op_Implicit((Object)(object)obj.attackerBody.inventory)) { return; } int itemCount = obj.attackerBody.inventory.GetItemCount(itemDef); if (itemCount <= 0) { return; } float num = Util.OnHitProcDamage(obj.damageDealt - obj.combinedHealthBeforeDamage, obj.attackerBody.baseDamage, (float)(itemCount - 1) * ConfigManager.LightningOnOverkill_damagePercentPerStack.Value + ConfigManager.LightningOnOverkill_damagePercentBase.Value); if (!(num <= 0f)) { LightningOrb val = new LightningOrb { origin = obj.victimBody.corePosition, damageValue = num, isCrit = obj.damageInfo.crit, bouncesRemaining = ConfigManager.LightningOnOverkill_bounceBase.Value + (itemCount - 1) * ConfigManager.LightningOnOverkill_bouncePerStack.Value, teamIndex = obj.attackerBody.teamComponent.teamIndex, attacker = obj.attacker, procCoefficient = 0.2f, bouncedObjects = new List<HealthComponent> { obj.victim }, lightningType = (LightningType)0, damageColorIndex = (DamageColorIndex)3, range = ConfigManager.LightningOnOverkill_rangeBase.Value + (float)(itemCount - 1) * ConfigManager.LightningOnOverkill_rangePerStack.Value }; HurtBox val2 = val.PickNextTarget(obj.victimBody.corePosition); if (Object.op_Implicit((Object)(object)val2)) { ((Orb)val).target = val2; OrbManager.instance.AddOrb((Orb)(object)val); } } } } public class LightningOnOverkillVoid { public class BraqsItems_LightningOnOverkillVoidBehavior : ItemBehavior { private class DamageBonus { public float damage; public int hitsLeft; } private List<DamageBonus> damageBonuses = new List<DamageBonus>(); private float totalDamageBonus; public void StoreDeathDamage(float damage) { totalDamageBonus += damage; damageBonuses.Add(new DamageBonus { damage = damage, hitsLeft = ConfigManager.LightningOnOverkillVoid_hitsBase.Value + (base.stack - 1) * ConfigManager.LightningOnOverkillVoid_hitsPerStack.Value }); } public void FireVoidLightning(DamageInfo damageInfo, CharacterBody victimBody) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: 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_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: 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_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Expected O, but got Unknown int count = damageBonuses.Count; if (count > 0 && !(totalDamageBonus <= 0f)) { float damageValue = totalDamageBonus / (float)count; ProcChainMask procChainMask = damageInfo.procChainMask; ProcTypeAPI.AddModdedProc(ref procChainMask, procType); VoidLightningOrb val = new VoidLightningOrb { origin = damageInfo.position, damageValue = damageValue, isCrit = damageInfo.crit, totalStrikes = count, teamIndex = base.body.teamComponent.teamIndex, attacker = damageInfo.attacker, procCoefficient = 0.3f, procChainMask = procChainMask, damageColorIndex = (DamageColorIndex)9, secondsPerStrike = 0.1f }; HurtBox mainHurtBox = victimBody.mainHurtBox; if (Object.op_Implicit((Object)(object)mainHurtBox)) { ((Orb)val).target = mainHurtBox; OrbManager.instance.AddOrb((Orb)(object)val); } OnBonusProcced(); } } private void OnBonusProcced() { for (int num = damageBonuses.Count - 1; num >= 0; num--) { if (--damageBonuses[num].hitsLeft <= 0) { totalDamageBonus -= damageBonuses[num].damage; damageBonuses.RemoveAt(num); } } } } public static ItemDef itemDef; public static ModdedProcType procType; internal static void Init() { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Expected O, but got Unknown //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) if (ConfigManager.LightningOnOverkillVoid_isEnabled.Value) { Log.Info("Initializing Sunken Chains Item"); itemDef = Helpers.GetItemDef("LightningOnOverkillVoid"); if (ConfigManager.LightningOnOverkill_isEnabled.Value) { itemDef.AddContagiousRelationship(LightningOnOverkill.itemDef); } ItemDisplayRuleDict val = new ItemDisplayRuleDict((ItemDisplayRule[])null); ItemAPI.Add(new CustomItem(itemDef, val)); procType = ProcTypeAPI.ReserveProcType(); Hooks(); Log.Info("Sunken Chains Initialized"); } } private static void Hooks() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown GlobalEventManager.onCharacterDeathGlobal += GlobalEventManager_onCharacterDeathGlobal; GlobalEventManager.OnHitEnemy += new hook_OnHitEnemy(GlobalEventManager_OnHitEnemy); CharacterBody.OnInventoryChanged += new hook_OnInventoryChanged(CharacterBody_OnInventoryChanged); } private static void CharacterBody_OnInventoryChanged(orig_OnInventoryChanged orig, CharacterBody self) { self.AddItemBehavior<BraqsItems_LightningOnOverkillVoidBehavior>(self.inventory.GetItemCount(itemDef)); orig.Invoke(self); } private static void GlobalEventManager_OnHitEnemy(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim) { //IL_0016: 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) CharacterBody val = default(CharacterBody); BraqsItems_LightningOnOverkillVoidBehavior braqsItems_LightningOnOverkillVoidBehavior = default(BraqsItems_LightningOnOverkillVoidBehavior); CharacterBody val2 = default(CharacterBody); if (!damageInfo.rejected && damageInfo.procCoefficient > 0f && !ProcTypeAPI.HasModdedProc(damageInfo.procChainMask, procType) && Object.op_Implicit((Object)(object)damageInfo.attacker) && damageInfo.attacker.TryGetComponent<CharacterBody>(ref val) && ((Component)val).TryGetComponent<BraqsItems_LightningOnOverkillVoidBehavior>(ref braqsItems_LightningOnOverkillVoidBehavior) && victim.TryGetComponent<CharacterBody>(ref val2) && Object.op_Implicit((Object)(object)val2.healthComponent) && val2.healthComponent.alive && ((DamageTypeCombo)(ref damageInfo.damageType)).IsDamageSourceSkillBased) { braqsItems_LightningOnOverkillVoidBehavior.FireVoidLightning(damageInfo, val2); } orig.Invoke(self, damageInfo, victim); } private static void GlobalEventManager_onCharacterDeathGlobal(DamageReport obj) { BraqsItems_LightningOnOverkillVoidBehavior braqsItems_LightningOnOverkillVoidBehavior = default(BraqsItems_LightningOnOverkillVoidBehavior); if (!Object.op_Implicit((Object)(object)obj.attackerBody) || !((Component)obj.attackerBody).TryGetComponent<BraqsItems_LightningOnOverkillVoidBehavior>(ref braqsItems_LightningOnOverkillVoidBehavior)) { return; } int itemCount = obj.attackerBody.inventory.GetItemCount(itemDef); if (itemCount > 0) { float num = ConfigManager.LightningOnOverkillVoid_damagePercentBase.Value + (float)(itemCount - 1) * ConfigManager.LightningOnOverkillVoid_damagePercentPerStack.Value; num *= (obj.damageDealt - obj.combinedHealthBeforeDamage) / obj.damageDealt; float num2 = Util.OnHitProcDamage(obj.attackerBody.damage, obj.attackerBody.baseDamage, num); Debug.Log((object)("Storing " + num2 + " damage from overkill.")); if (!(num2 <= 0f)) { braqsItems_LightningOnOverkillVoidBehavior.StoreDeathDamage(num2); } } } } public class ExplodeAgain { public static ItemDef itemDef; public static ModdedProcType procType; private static GameObject bomblettePrefab; internal static void Init() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //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_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) if (ConfigManager.ExplodeAgain_isEnabled.Value) { Log.Info("Initializing Bomblette Item"); itemDef = Helpers.GetItemDef("ExplodeAgain"); ItemDisplayRuleDict val = new ItemDisplayRuleDict((ItemDisplayRule[])null); ItemAPI.Add(new CustomItem(itemDef, val)); procType = ProcTypeAPI.ReserveProcType(); bomblettePrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Toolbot/CryoCanisterBombletsProjectile.prefab").WaitForCompletion(), "inertBomblet"); Hooks(); Log.Info("Bomblette Initialized"); } } private static void Hooks() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown BlastAttack.Fire += new hook_Fire(BlastAttack_Fire); } private static Result BlastAttack_Fire(orig_Fire orig, BlastAttack self) { //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) CharacterBody val = default(CharacterBody); if (NetworkServer.active && Object.op_Implicit((Object)(object)self.attacker) && self.attacker.TryGetComponent<CharacterBody>(ref val) && Object.op_Implicit((Object)(object)val.inventory)) { int itemCount = val.inventory.GetItemCount(itemDef); if (itemCount > 0 && !ProcTypeAPI.HasModdedProc(self.procChainMask, procType)) { FireChildExplosions(self, val, itemCount); } } return orig.Invoke(self); } private static void FireChildExplosions(BlastAttack self, CharacterBody body, int items) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: 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_0026: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0148: 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_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) if (self.procCoefficient == 0f && !ConfigManager.ExplodeAgain_ignoreProcCoefficient.Value) { return; } Vector3 position = self.position; Vector3 up = Vector3.up; int num = (items - 1) * ConfigManager.ExplodeAgain_maxBombsPerStack.Value + ConfigManager.ExplodeAgain_maxBombsBase.Value; GameObject val = bomblettePrefab; ProjectileExplosion component = val.GetComponent<ProjectileExplosion>(); component.blastRadius = self.radius * ConfigManager.ExplodeAgain_radiusCoefficient.Value; component.blastProcCoefficient = self.procCoefficient; float damage = Util.OnHitProcDamage(self.baseDamage, body.damage, ConfigManager.ExplodeAgain_damageCoefficient.Value); ProcChainMask procChainMask = self.procChainMask; ProcTypeAPI.AddModdedProc(ref procChainMask, procType); float num2 = (ConfigManager.ExplodeAgain_ignoreProcCoefficient.Value ? 1f : self.procCoefficient); for (int i = 0; i < num; i++) { if (Util.CheckRoll(ConfigManager.ExplodeAgain_chance.Value * num2, body.master)) { float speedOverride = Random.Range(0.5f, 1f) * self.radius * 3f; float num3 = (float)i * MathF.PI * 2f / (float)num; up.x += Mathf.Sin(num3); up.z += Mathf.Cos(num3); FireProjectileInfo val2 = default(FireProjectileInfo); val2.projectilePrefab = val; val2.position = position + new Vector3(Mathf.Sin(num3), 0f, Mathf.Cos(num3)); val2.rotation = Util.QuaternionSafeLookRotation(up); val2.procChainMask = procChainMask; val2.owner = self.attacker; val2.damage = damage; val2.crit = self.crit; val2.force = self.baseForce; val2.damageColorIndex = (DamageColorIndex)3; ((FireProjectileInfo)(ref val2)).speedOverride = speedOverride; val2.useSpeedOverride = true; FireProjectileInfo val3 = val2; ProjectileManager.instance.FireProjectile(val3); } } } } public class HealFromBleed { public static ItemDef itemDef; internal static void Init() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown if (ConfigManager.HealFromBleed_isEnabled.Value) { Log.Info("Initializing Leech Jar Item"); itemDef = Helpers.GetItemDef("HealFromBleed"); ItemDisplayRuleDict val = new ItemDisplayRuleDict((ItemDisplayRule[])null); ItemAPI.Add(new CustomItem(itemDef, val)); Hooks(); Log.Info("Leech Jar Initialized"); } } private static void Hooks() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); } private static void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (Object.op_Implicit((Object)(object)sender) && Object.op_Implicit((Object)(object)sender.inventory) && sender.inventory.GetItemCount(itemDef) > 0) { args.bleedChanceAdd += 5f; } } private static float GetExtraBleedChance(Inventory inventory) { if (inventory.GetItemCount(itemDef) <= 0) { return 0f; } return 5f; } private static void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Invalid comparison between Unknown and I4 //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Expected O, but got Unknown //IL_009d: 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) CharacterBody val = default(CharacterBody); if (((!damageInfo.rejected && (int)damageInfo.dotIndex == 0) || (int)damageInfo.dotIndex == 6) && Object.op_Implicit((Object)(object)damageInfo.attacker) && damageInfo.attacker.TryGetComponent<CharacterBody>(ref val) && Object.op_Implicit((Object)(object)val.inventory)) { int itemCount = val.inventory.GetItemCount(itemDef); if (itemCount > 0) { float healValue = ((float)(itemCount - 1) * ConfigManager.HealFromBleed_percentPerStack.Value + ConfigManager.HealFromBleed_percentBase.Value) * val.maxHealth * damageInfo.damage / val.damage; HealOrb val2 = new HealOrb(); ((Orb)val2).origin = ((Component)self).transform.position; ((Orb)val2).target = val.mainHurtBox; val2.healValue = healValue; OrbManager.instance.AddOrb((Orb)(object)val2); } } orig.Invoke(self, damageInfo); } } public class RepairBrokenItems { public static ItemDef itemDef; public static Dictionary<ItemTier, int> tierWeights; internal static void Init() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown if (ConfigManager.RepairBrokenItems_isEnabled.Value) { Log.Info("Initializing Goobo Sr. Item"); itemDef = Helpers.GetItemDef("RepairBrokenItems"); ItemDisplayRuleDict val = new ItemDisplayRuleDict((ItemDisplayRule[])null); ItemAPI.Add(new CustomItem(itemDef, val)); Hooks(); Log.Info("Goobo Sr. Initialized"); } } private static void Hooks() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown CharacterMaster.OnServerStageBegin += new hook_OnServerStageBegin(CharacterMaster_OnServerStageBegin); } private unsafe static void CharacterMaster_OnServerStageBegin(orig_OnServerStageBegin orig, CharacterMaster self, Stage stage) { //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0082: 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_008f: 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_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Invalid comparison between Unknown and I4 //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Invalid comparison between Unknown and I4 //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Invalid comparison between Unknown and I4 //IL_01cc: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, stage); int itemCount = self.inventory.GetItemCount(itemDef); if (itemCount <= 0 || !Object.op_Implicit((Object)(object)self) || !Object.op_Implicit((Object)(object)stage)) { return; } itemCount = (itemCount - 1) * ConfigManager.RepairBrokenItems_repairsPerStack.Value + ConfigManager.RepairBrokenItems_repairsBase.Value; ReadOnlyArray<Pair> itemPairsForRelationship = ItemCatalog.GetItemPairsForRelationship(BrokenItemRelationships.brokenItemRelationship); int length = itemPairsForRelationship.Length; float[] array = new float[length]; float[] array2 = new float[length]; float num = 0f; for (int i = 0; i < length; i++) { Pair val = Unsafe.Read<Pair>((void*)itemPairsForRelationship[i]); int itemCount2 = self.inventory.GetItemCount(val.itemDef2); if ((int)val.itemDef1.tier == 0 || (int)val.itemDef1.tier == 6) { array2[i] = ConfigManager.RepairBrokenItems_whiteChance.Value; } else if ((int)val.itemDef1.tier == 2 || (int)val.itemDef1.tier == 8) { array2[i] = ConfigManager.RepairBrokenItems_redChance.Value; } else { array2[i] = ConfigManager.RepairBrokenItems_defaultChance.Value; } array[i] = itemCount2; num += (float)itemCount2; } if (num <= 0f) { return; } int[] array3 = new int[length]; for (int j = 0; j < itemCount; j++) { if (!(num > 0f)) { break; } float num2 = 0f; float num3 = Random.Range(0f, num); for (int k = 0; k < length; k++) { num2 += array[k]; if (num2 >= num3) { if (Util.CheckRoll(array2[k], self)) { array3[k]++; } array[k] -= 1f; num -= 1f; break; } } } for (int l = 0; l < array3.Length; l++) { tryRepairItems(self, Unsafe.Read<Pair>((void*)itemPairsForRelationship[l]), array3[l]); } } public static void tryRepairItems(CharacterMaster master, Pair pair, int count) { //IL_0015: 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_003f: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)master == (Object)null) && count > 0) { count = Math.Min(count, master.inventory.GetItemCount(pair.itemDef2)); master.inventory.RemoveItem(pair.itemDef2, count); master.inventory.GiveItem(pair.itemDef1, count); CharacterMasterNotificationQueue.SendTransformNotification(master, pair.itemDef2.itemIndex, pair.itemDef1.itemIndex, (TransformationType)5); } } } public class HealFromBleedVoid { public static ItemDef itemDef; private static GameObject healBurstPrefab; internal static void Init() { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Expected O, but got Unknown Log.Info("Initializing Royal Tick Item"); itemDef = Helpers.GetItemDef("HealFromBleedVoid"); if (ConfigManager.HealFromBleed_isEnabled.Value) { itemDef.AddContagiousRelationship(HealFromBleed.itemDef); } ItemDisplayRuleDict val = new ItemDisplayRuleDict((ItemDisplayRule[])null); ItemAPI.Add(new CustomItem(itemDef, val)); healBurstPrefab = generateEffects(); ContentAddition.AddEffect(healBurstPrefab); Hooks(); Log.Info("Royal Tick Initialized"); } private static GameObject generateEffects() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_002e: 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_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_02d8: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: Unknown result type (might be due to invalid IL or missing references) //IL_02fb: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0304: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_0316: Unknown result type (might be due to invalid IL or missing references) //IL_0327: Unknown result type (might be due to invalid IL or missing references) //IL_032c: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_0351: Unknown result type (might be due to invalid IL or missing references) //IL_0356: Unknown result type (might be due to invalid IL or missing references) //IL_0363: Unknown result type (might be due to invalid IL or missing references) //IL_0368: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Unknown result type (might be due to invalid IL or missing references) //IL_0376: Unknown result type (might be due to invalid IL or missing references) //IL_037b: Unknown result type (might be due to invalid IL or missing references) //IL_0388: Unknown result type (might be due to invalid IL or missing references) //IL_038d: Unknown result type (might be due to invalid IL or missing references) //IL_0391: Unknown result type (might be due to invalid IL or missing references) //IL_039e: Unknown result type (might be due to invalid IL or missing references) //IL_03a3: Unknown result type (might be due to invalid IL or missing references) //IL_03a7: Unknown result type (might be due to invalid IL or missing references) Color val = default(Color); ((Color)(ref val))..ctor(87.1f, 67.8f, 98f); Gradient val2 = new Gradient(); val2.mode = (GradientMode)0; val2.alphaKeys = (GradientAlphaKey[])(object)new GradientAlphaKey[2] { new GradientAlphaKey { alpha = 181f, time = 0f }, new GradientAlphaKey { alpha = 0f, time = 1f } }; val2.colorKeys = (GradientColorKey[])(object)new GradientColorKey[2] { new GradientColorKey { color = val, time = 0f }, new GradientColorKey { color = new Color(0f, 0f, 0f), time = 1f } }; GameObject obj = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/EliteEarth/AffixEarthHealExplosion.prefab").WaitForCompletion(), "VoidHealPulse"); Texture val3 = Addressables.LoadAssetAsync<Texture>((object)"RoR2/Base/Common/ColorRamps/texRampNullifierSmooth.png").WaitForCompletion(); GameObject obj2 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/MushroomVoid/MushroomVoidEffect.prefab").WaitForCompletion(); ParticleSystem component = ((Component)obj2.transform.Find("Visual/Stars")).gameObject.GetComponent<ParticleSystem>(); ParticleSystemRenderer component2 = ((Component)obj2.transform.Find("Visual/Stars")).gameObject.GetComponent<ParticleSystemRenderer>(); Object.Destroy((Object)(object)((Component)obj.transform.Find("Flash, White")).gameObject); Object.Destroy((Object)(object)((Component)obj.transform.Find("Flash, Blue")).gameObject); ((Renderer)((Component)obj.transform.Find("Chunks")).gameObject.GetComponent<ParticleSystemRenderer>()).material.SetTexture("_RemapTex", val3); Light component3 = ((Component)obj.transform.Find("Point Light")).gameObject.GetComponent<Light>(); component3.color = val; component3.range = 1f; ((Renderer)((Component)obj.transform.Find("Nova Sphere")).gameObject.GetComponent<ParticleSystemRenderer>()).material.SetTexture("_RemapTex", val3); ParticleSystem component4 = ((Component)obj.transform.Find("LightShafts")).gameObject.GetComponent<ParticleSystem>(); MainModule main = component4.main; ((MainModule)(ref main)).startColor = MinMaxGradient.op_Implicit(val); ColorOverLifetimeModule colorOverLifetime = component4.colorOverLifetime; ((ColorOverLifetimeModule)(ref colorOverLifetime)).color = new MinMaxGradient(val2); ((Renderer)((Component)obj.transform.Find("Rapid Small FLash, Blue")).gameObject.GetComponent<ParticleSystemRenderer>()).materials = ((Renderer)component2).materials; ParticleSystem component5 = ((Component)obj.transform.Find("Rapid Small FLash, Blue")).gameObject.GetComponent<ParticleSystem>(); MainModule main2 = component5.main; ((MainModule)(ref main2)).maxParticles = 100; ((MainModule)(ref main2)).startLifetime = MinMaxCurve.op_Implicit(0.5f); RotationOverLifetimeModule rotationOverLifetime = component5.rotationOverLifetime; ((RotationOverLifetimeModule)(ref rotationOverLifetime)).enabled = true; RotationOverLifetimeModule rotationOverLifetime2 = component.rotationOverLifetime; ((RotationOverLifetimeModule)(ref rotationOverLifetime)).x = ((RotationOverLifetimeModule)(ref rotationOverLifetime2)).x; rotationOverLifetime2 = component.rotationOverLifetime; ((RotationOverLifetimeModule)(ref rotationOverLifetime)).y = ((RotationOverLifetimeModule)(ref rotationOverLifetime2)).y; rotationOverLifetime2 = component.rotationOverLifetime; ((RotationOverLifetimeModule)(ref rotationOverLifetime)).z = ((RotationOverLifetimeModule)(ref rotationOverLifetime2)).z; rotationOverLifetime2 = component.rotationOverLifetime; ((RotationOverLifetimeModule)(ref rotationOverLifetime)).xMultiplier = ((RotationOverLifetimeModule)(ref rotationOverLifetime2)).xMultiplier; rotationOverLifetime2 = component.rotationOverLifetime; ((RotationOverLifetimeModule)(ref rotationOverLifetime)).yMultiplier = ((RotationOverLifetimeModule)(ref rotationOverLifetime2)).yMultiplier; rotationOverLifetime2 = component.rotationOverLifetime; ((RotationOverLifetimeModule)(ref rotationOverLifetime)).zMultiplier = ((RotationOverLifetimeModule)(ref rotationOverLifetime2)).zMultiplier; ColorOverLifetimeModule colorOverLifetime2 = component5.colorOverLifetime; ((ColorOverLifetimeModule)(ref colorOverLifetime2)).enabled = true; ColorOverLifetimeModule colorOverLifetime3 = component.colorOverLifetime; ((ColorOverLifetimeModule)(ref colorOverLifetime2)).color = ((ColorOverLifetimeModule)(ref colorOverLifetime3)).color; SizeOverLifetimeModule sizeOverLifetime = component5.sizeOverLifetime; ((SizeOverLifetimeModule)(ref sizeOverLifetime)).enabled = true; SizeOverLifetimeModule sizeOverLifetime2 = component.sizeOverLifetime; ((SizeOverLifetimeModule)(ref sizeOverLifetime)).size = ((SizeOverLifetimeModule)(ref sizeOverLifetime2)).size; MainModule main3 = component.main; ((MainModule)(ref main2)).startColor = ((MainModule)(ref main3)).startColor; EffectComponent val4 = default(EffectComponent); obj.TryGetComponent<EffectComponent>(ref val4); val4.applyScale = true; return obj; } private static void Hooks() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown GlobalEventManager.ProcessHitEnemy += new Manipulator(GlobalEventManager_ProcessHitEnemy); HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage); } private static void GlobalEventManager_ProcessHitEnemy(ILContext il) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); try { val.GotoNext((MoveType)0, new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 29), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0) }); val.Remove(); val.Remove(); val.Remove(); val.GotoNext((MoveType)2, new Func<Instruction, bool>[7] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 1), (Instruction x) => ILPatternMatchingExt.MatchLdfld<DamageInfo>(x, "procCoefficient"), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 29), (Instruction x) => ILPatternMatchingExt.MatchConvR4(x), (Instruction x) => ILPatternMatchingExt.MatchMul(x), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 10f), (Instruction x) => ILPatternMatchingExt.MatchMul(x) }); val.Emit(OpCodes.Ldloc, 7); val.EmitDelegate<Func<Inventory, float>>((Func<Inventory, float>)GetExtraCollapseChance); val.Emit(OpCodes.Add); } catch (Exception e) { Helpers.ErrorHookFailed("Add base collapse chance", e); } } private static float GetExtraCollapseChance(Inventory inventory) { if (inventory.GetItemCount(itemDef) <= 0) { return 0f; } return 5f; } private static void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Invalid comparison between Unknown and I4 CharacterBody val = default(CharacterBody); if (!damageInfo.rejected && (int)damageInfo.dotIndex == 8 && Object.op_Implicit((Object)(object)damageInfo.attacker) && damageInfo.attacker.TryGetComponent<CharacterBody>(ref val) && Object.op_Implicit((Object)(object)val.inventory)) { int itemCount = val.inventory.GetItemCount(itemDef); if (itemCount > 0 && Object.op_Implicit((Object)(object)val.healthComponent)) { _ = val.healthComponent; FireHealBurst(((float)(itemCount - 1) * ConfigManager.HealFromBleedVoid_percentPerStack.Value + ConfigManager.HealFromBleedVoid_percentBase.Value) * damageInfo.damage / val.damage, itemCount, val); } } orig.Invoke(self, damageInfo); } private static void FireHealBurst(float fractionalHeal, int stack, CharacterBody body) { //IL_002a: 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_0036: 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_0043: Expected O, but got Unknown //IL_004f: 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_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: 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_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0080: 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_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) if (stack <= 0) { Log.Warning("FireHealBurst called with no stacks"); return; } float num = ConfigManager.HealFromBleedVoid_radiusBase.Value + ConfigManager.HealFromBleedVoid_radiusPerStack.Value * (float)(stack - 1); EffectData val = new EffectData { scale = num, origin = body.corePosition }; EffectManager.SpawnEffect(healBurstPrefab, val, true); SphereSearch val2 = new SphereSearch { mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask, origin = body.corePosition, queryTriggerInteraction = (QueryTriggerInteraction)2, radius = num }; TeamMask val3 = default(TeamMask); ((TeamMask)(ref val3)).AddTeam(body.teamComponent.teamIndex); List<HurtBox> list = new List<HurtBox>(); val2.RefreshCandidates().FilterCandidatesByHurtBoxTeam(val3).FilterCandidatesByDistinctHurtBoxEntities() .GetHurtBoxes(list); int i = 0; for (int count = list.Count; i < count; i++) { HealthComponent healthComponent = list[i].healthComponent; healthComponent.HealFraction(fractionalHeal, default(ProcChainMask)); Util.PlaySound("Play_item_proc_TPhealingNova_hitPlayer", ((Component)healthComponent).gameObject); } } } public class ConfusionOnHit { public class BraqsItems_BetrayedBehavior : MonoBehaviour { public CharacterBody body; private HealthComponent healthComponent; private List<HealthComponent> previousTargetList = new List<HealthComponent>(); private float coinFireTimer; private float resetListTimer; private const float resetListInterval = 1f; private const float coinFireInterval = 0.5f; private bool hasBuff { get { if (body.GetBuffCount(buffDef) > 0) { return Object.op_Implicit((Object)(object)healthComponent); } return false; } } private void Start() { if (Object.op_Implicit((Object)(object)body.healthComponent)) { healthComponent = body.healthComponent; previousTargetList.Add(healthComponent); } } private void OnDestroy() { } private void FixedUpdate() { if (!hasBuff) { Object.Destroy((Object)(object)this); } coinFireTimer += Time.fixedDeltaTime; resetListTimer += Time.fixedDeltaTime; if (coinFireTimer >= 0.5f) { coinFireTimer = 0f; FireDistractionOrb(); previousTargetList.Clear(); if (Object.op_Implicit((Object)(object)healthComponent)) { previousTargetList.Add(healthComponent); } } } private void FireDistractionOrb() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0038: 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) DistractionOrb distractionOrb = new DistractionOrb { origin = body.transform.position, attacker = ((Component)body).gameObject, victimTeam = body.teamComponent.teamIndex, bouncedObjects = previousTargetList }; HurtBox val = distractionOrb.PickTarget(); if (Object.op_Implicit((Object)(object)val)) { ((Orb)distractionOrb).target = val; previousTargetList.Add(val.healthComponent); OrbManager.instance.AddOrb((Orb)(object)distractionOrb); } } } private class DistractionOrb : GenericDamageOrb { public float overrideDuration = 0.6f; public float range = 50f; private BullseyeSearch search; public List<HealthComponent> bouncedObjects; public TeamIndex victimTeam; public override void Begin() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0028: 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_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Expected O, but got Unknown //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) ((Orb)this).duration = overrideDuration; base.scale = 1f; EffectData val = new EffectData { scale = base.scale, origin = ((Orb)this).origin, genericFloat = ((Orb)this).duration }; val.SetHurtBoxReference(((Orb)this).target); EffectManager.SpawnEffect(((GenericDamageOrb)this).GetOrbEffect(), val, true); base.isCrit = false; base.procCoefficient = 0f; base.damageValue = 0f; base.damageType = DamageTypeCombo.op_Implicit((DamageType)0); } public override GameObject GetOrbEffect() { return distractionOrbEffect; } public HurtBox PickTarget() { //IL_0001: 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_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown _ = ((Orb)this).origin; if (search == null) { search = new BullseyeSearch(); } search.searchOrigin = ((Orb)this).origin; search.searchDirection = Vector3.zero; search.teamMaskFilter = TeamMask.none; ((TeamMask)(ref search.teamMaskFilter)).AddTeam(victimTeam); search.filterByLoS = false; search.sortMode = (SortMode)1; search.maxDistanceFilter = range; search.RefreshCandidates(); HurtBox val = (from v in search.GetResults() where !bouncedObjects.Contains(v.healthComponent) select v).FirstOrDefault(); if (Object.op_Implicit((Object)(object)val)) { bouncedObjects.Add(val.healthComponent); } else { Debug.Log((object)"DistractionOrb:PickTarget() | No Target Found"); } return val; } public override void OnArrival() { ((GenericDamageOrb)this).OnArrival(); } public static void FireDistractionOrbs(GameObject victim, int count, float buffDuration = 0f) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown //IL_003b: 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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got I4 //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0068->IL0068: Incompatible stack types: O vs I4 //IL_005c->IL0068: Incompatible stack types: I4 vs O //IL_005c->IL0068: Incompatible stack types: O vs I4 List<HealthComponent> list = new List<HealthComponent>(); HealthComponent item = default(HealthComponent); if (victim.TryGetComponent<HealthComponent>(ref item)) { list.Add(item); } BullseyeSearch val = new BullseyeSearch(); CharacterBody val2 = default(CharacterBody); for (int i = 0; i < count; i++) { DistractionOrb distractionOrb = new DistractionOrb(); distractionOrb.search = val; ((Orb)distractionOrb).origin = victim.transform.position; ((GenericDamageOrb)distractionOrb).attacker = victim; object obj = distractionOrb; int num; if (victim.TryGetComponent<CharacterBody>(ref val2)) { obj = val2.teamComponent.teamIndex; num = (int)obj; } else { num = -1; obj = num; num = (int)obj; } ((DistractionOrb)num).victimTeam = (TeamIndex)obj; distractionOrb.bouncedObjects = list; HurtBox val3 = distractionOrb.PickTarget(); if (Object.op_Implicit((Object)(object)val3)) { ((Orb)distractionOrb).target = val3; list.Add(val3.healthComponent); OrbManager.instance.AddOrb((Orb)(object)distractionOrb); continue; } break; } } } public static ItemDef itemDef; public static BuffDef buffDef; public static DotIndex dotIndex; private static GameObject distractionOrbEffect; internal static void Init() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //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_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: 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_00d1: 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_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Expected O, but got Unknown //IL_00e5: Unknown result type (might be due to invalid IL or missing references) if (ConfigManager.ConfusionOnHit_isEnabled.Value) { Log.Info("Initializing Pieces of Silver Item"); itemDef = Helpers.GetItemDef("ConfusionOnHit"); ItemDisplayRuleDict val = new ItemDisplayRuleDict((ItemDisplayRule[])null); ItemAPI.Add(new CustomItem(itemDef, val)); buffDef = ScriptableObject.CreateInstance<BuffDef>(); ((Object)buffDef).name = "Betrayed"; buffDef.canStack = false; buffDef.isHidden = false; buffDef.isDebuff = true; buffDef.buffColor = Color.white; buffDef.isCooldown = false; buffDef.iconSprite = BraqsItemsMain.assetBundle.LoadAsset<Sprite>("texBuffBetrayedIcon"); ContentAddition.AddBuffDef(buffDef); DotAPI.RegisterDotDef(new DotDef { interval = 0.2f, damageCoefficient = 0f, damageColorIndex = (DamageColorIndex)3, associatedBuff = buffDef }, (CustomDotBehaviour)null, (CustomDotVisual)null); distractionOrbEffect = GenerateEffect(); ContentAddition.AddEffect(distractionOrbEffect); Hooks(); Log.Info("Pieces of Silver Initialized"); } } private static GameObject GenerateEffect() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: 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_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0098: 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_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Expected O, but got Unknown //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: 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_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: 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_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/GoldOrbEffect.prefab").WaitForCompletion(), "DistractionCoins"); Texture val2 = Addressables.LoadAssetAsync<Texture>((object)"RoR2/Base/Common/ColorRamps/texRampBrotherPillar.png").WaitForCompletion(); try { ((Renderer)((Component)val.transform.Find("TrailParent/Trail")).gameObject.GetComponent<TrailRenderer>()).material.SetTexture("_RemapTex", val2); } catch (Exception ex) { Log.Warning("ConfusionOnHit:GenerateEffect() ; Could not edit coin orb trail.\n" + ex); } try { ColorOverLifetimeModule colorOverLifetime = ((Component)val.transform.Find("VFX/Core")).gameObject.GetComponent<ParticleSystem>().colorOverLifetime; Gradient val3 = new Gradient(); MinMaxGradient color = ((ColorOverLifetimeModule)(ref colorOverLifetime)).color; val3.mode = ((MinMaxGradient)(ref color)).gradient.mode; color = ((ColorOverLifetimeModule)(ref colorOverLifetime)).color; val3.alphaKeys = ((MinMaxGradient)(ref color)).gradient.alphaKeys; val3.colorKeys = (GradientColorKey[])(object)new GradientColorKey[3] { new GradientColorKey { color = new Color(1f, 1f, 1f), time = 0f }, new GradientColorKey { color = new Color(0.62f, 0.52f, 0.62f), time = 0.3f }, new GradientColorKey { color = new Color(0.43f, 0.42f, 0.66f), time = 1f } }; ((ColorOverLifetimeModule)(ref colorOverLifetime)).color = new MinMaxGradient(val3); } catch (Exception ex2) { Log.Warning("ConfusionOnHit:GenerateEffect() ; Could not edit coin orb core.\n" + ex2); } try { ((Renderer)((Component)val.transform.Find("VFX/CoinParticle")).gameObject.GetComponent<ParticleSystemRenderer>()).material.SetColor("_Color", new Color(0.53f, 0.52f, 0.76f)); } catch (Exception ex3) { Log.Warning("ConfusionOnHit:GenerateEffect() ; Could not edit coin orb particles.\n" + ex3); } return val; } private static void Hooks() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Expected O, but got Unknown FriendlyFireManager.ShouldDirectHitProceed += new hook_ShouldDirectHitProceed(FriendlyFireManager_ShouldDirectHitProceed); FriendlyFireManager.ShouldSplashHitProceed += new hook_ShouldSplashHitProceed(FriendlyFireManager_ShouldSplashHitProceed); FriendlyFireManager.ShouldSeekingProceed += new hook_ShouldSeekingProceed(FriendlyFireManager_ShouldSeekingProceed); GlobalEventManager.onServerDamageDealt += GlobalEventManager_onServerDamageDealt; CharacterBody.OnBuffFirstStackGained += new hook_OnBuffFirstStackGained(CharacterBody_OnBuffFirstStackGained); } private static bool FriendlyFireManager_ShouldSeekingProceed(orig_ShouldSeekingProceed orig, HealthComponent victim, TeamIndex attackerTeamIndex) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) if (victim.body.HasBuff(buffDef)) { return true; } return orig.Invoke(victim, attackerTeamIndex); } private static bool FriendlyFireManager_ShouldSplashHitProceed(orig_ShouldSplashHitProceed orig, HealthComponent victim, TeamIndex attackerTeamIndex) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) if (victim.body.HasBuff(buffDef)) { return true; } return orig.Invoke(victim, attackerTeamIndex); } private static bool FriendlyFireManager_ShouldDirectHitProceed(orig_ShouldDirectHitProceed orig, HealthComponent victim, TeamIndex attackerTeamIndex) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) if (victim.body.HasBuff(buffDef)) { return true; } return orig.Invoke(victim, attackerTeamIndex); } private static void GlobalEventManager_onServerDamageDealt(DamageReport obj) { if (obj.damageInfo.procCoefficient > 0f && !obj.damageInfo.rejected && Object.op_Implicit((Object)(object)obj.attacker) && Object.op_Implicit((Object)(object)obj.attackerMaster) && Object.op_Implicit((Object)(object)obj.attackerMaster.inventory) && Object.op_Implicit((Object)(object)obj.victim) && Object.op_Implicit((Object)(object)obj.victimBody)) { int itemCount = obj.attackerMaster.inventory.GetItemCount(itemDef); if (itemCount > 0) { float num = ConfigManager.ConfusionOnHit_durationBase.Value + (float)(itemCount - 1) * ConfigManager.ConfusionOnHit_durationPerStack.Value; _ = ConfigManager.ConfusionOnHit_enemiesAggroed.Value; obj.victimBody.AddTimedBuff(buffDef, num); } } } private static void CharacterBody_OnBuffFirstStackGained(orig_OnBuffFirstStackGained orig, CharacterBody self, BuffDef buff) { if ((Object)(object)buff == (Object)(object)buffDef) { BraqsItems_BetrayedBehavior braqsItems_BetrayedBehavior = ((Component)self).gameObject.AddComponent<BraqsItems_BetrayedBehavior>(); braqsItems_BetrayedBehavior.body = self; ((Behaviour)braqsItems_BetrayedBehavior).enabled = true; } orig.Invoke(self, buff); } } public class ExplosionFrenzy { public class BraqsItems_ExplosionFrenzyBehavior : ItemBehavior { private int maxBonus; public int bonus; private List<BraqsItems_BurnTracker> victims = new List<BraqsItems_BurnTracker>(); private void Start() { maxBonus = ConfigManager.ExplosionFrenzy_bonusCapPerStack.Value * (base.stack - 1) + ConfigManager.ExplosionFrenzy_bonusCapBase.Value; } private void OnDestroy() { } public void AddVictim(GameObject victim) { BraqsItems_BurnTracker braqsItems_BurnTracker = default(BraqsItems_BurnTracker); victim.TryGetComponent<BraqsItems_BurnTracker>(ref braqsItems_BurnTracker); if (!Object.op_Implicit((Object)(object)braqsItems_BurnTracker)) { braqsItems_BurnTracker = victim.AddComponent<BraqsItems_BurnTracker>(); braqsItems_BurnTracker.victimBodyObject = victim; } else if (victims.Contains(braqsItems_BurnTracker)) { return; } braqsItems_BurnTracker.AddAttacker(this); victims.Add(braqsItems_BurnTracker); ApplyBonus(); } public void RemoveVictim(BraqsItems_BurnTracker victim) { victims.Remove(victim); ApplyBonus(); } private void ApplyBonus() { bonus = Math.Min(victims.Count, maxBonus); base.body.RecalculateStats(); } } public class BraqsItems_BurnTracker : MonoBehaviour { public List<BraqsItems_ExplosionFrenzyBehavior> attackers = new List<BraqsItems_ExplosionFrenzyBehavior>(); public GameObject victimBodyObject; private CharacterBody victimCharacterBody; public void Start() { victimCharacterBody = (Object.op_Implicit((Object)(object)victimBodyObject) ? victimBodyObject.GetComponent<CharacterBody>() : null); } public void OnDestroy() { foreach (BraqsItems_ExplosionFrenzyBehavior attacker in attackers) { attacker.RemoveVictim(this); } } public void FixedUpdate() { if (!Object.op_Implicit((Object)(object)victimCharacterBody) || !victimCharacterBody.HasBuff(Buffs.OnFire)) { Object.Destroy((Object)(object)this); } } public void AddAttacker(BraqsItems_ExplosionFrenzyBehavior attacker) { if (!attackers.Contains(attacker)) { attackers.Add(attacker); } } } public static ItemDef itemDef; internal static void Init() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown if (ConfigManager.ExplosionFrenzy_isEnabled.Value) { Log.Info("Initializing My Manifesto Item"); itemDef = Helpers.GetItemDef("ExplosionFrenzy"); ItemDisplayRuleDict val = new ItemDisplayRuleDict((ItemDisplayRule[])null); ItemAPI.Add(new CustomItem(itemDef, val)); Hooks(); Log.Info("My Manifesto Initialized"); } } private static void Hooks() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown CharacterBody.OnInventoryChanged += new hook_OnInventoryChanged(CharacterBody_OnInventoryChanged); BlastAttack.Fire += new hook_Fire(BlastAttack_Fire); DotController.onDotInflictedServerGlobal += new OnDotInflictedServerGlobalDelegate(DotController_onDotInflictedServerGlobal); Stats.StatsCompEvent.StatsCompRecalc = (EventHandler<Stats.StatsCompRecalcArgs>)Delegate.Combine(Stats.StatsCompEvent.StatsCompRecalc, new EventHandler<Stats.StatsCompRecalcArgs>(StatsCompEvent_StatsCompRecalc)); } private static void DotController_onDotInflictedServerGlobal(DotController dotController, ref InflictDotInfo inflictDotInfo) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Invalid comparison between Unknown and I4 //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Invalid comparison between Unknown and I4 CharacterEvents.BraqsItems_CharacterEventComponent braqsItems_CharacterEventComponent = default(CharacterEvents.BraqsItems_CharacterEventComponent); CharacterBody val = default(CharacterBody); BraqsItems_ExplosionFrenzyBehavior braqsItems_ExplosionFrenzyBehavior = default(BraqsItems_ExplosionFrenzyBehavior); if (((int)inflictDotInfo.dotIndex == 1 || (int)inflictDotInfo.dotIndex == 7) && Object.op_Implicit((Object)(object)dotController.victimBody) && Object.op_Implicit((Object)(object)dotController.victimHealthComponent) && dotController.victimHealthComponent.alive && Object.op_Implicit((Object)(object)dotController.victimBody.master) && ((Component)dotController.victimBody.master).TryGetComponent<CharacterEvents.BraqsItems_CharacterEventComponent>(ref braqsItems_CharacterEventComponent) && inflictDotInfo.attackerObject.TryGetComponent<CharacterBody>(ref val) && ((Component)val).TryGetComponent<BraqsItems_ExplosionFrenzyBehavior>(ref braqsItems_ExplosionFrenzyBehavior)) { braqsItems_ExplosionFrenzyBehavior.AddVictim(dotController.victimObject); } } private static void CharacterBody_OnInventoryChanged(orig_OnInventoryChanged orig, CharacterBody self) { self.AddItemBehavior<BraqsItems_ExplosionFrenzyBehavior>(self.inventory.GetItemCount(itemDef)); orig.Invoke(self); } private static Result BlastAttack_Fire(orig_Fire orig, BlastAttack self) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_011e: 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_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) Result val = orig.Invoke(self); CharacterBody val2 = default(CharacterBody); if (Object.op_Implicit((Object)(object)self.attacker) && self.attacker.TryGetComponent<CharacterBody>(ref val2) && Object.op_Implicit((Object)(object)val2.inventory)) { int itemCount = val2.inventory.GetItemCount(itemDef); if (itemCount > 0 && val.hitCount > 0) { float value = ((float)(itemCount - 1) * ConfigManager.ExplosionFrenzy_igniteDamagePerStack.Value + ConfigManager.ExplosionFrenzy_igniteDamageBase.Value) * self.baseDamage; for (int i = 0; i < val.hitCount; i++) { HurtBox hurtBox = val.hitPoints[i].hurtBox; if (Object.op_Implicit((Object)(object)hurtBox.healthComponent)) { InflictDotInfo val3 = default(InflictDotInfo); val3.victimObject = ((Component)hurtBox.healthComponent).gameObject; val3.attackerObject = self.attacker; val3.totalDamage = value; val3.dotIndex = (DotIndex)1; val3.damageMultiplier = 1f; InflictDotInfo val4 = val3; StrengthenBurnUtils.CheckDotForUpgrade(val2.inventory, ref val4); DotController.InflictDot(ref val4); } } } } return val; } public static void StatsCompEvent_StatsCompRecalc(object sender, Stats.StatsCompRecalcArgs args) { BraqsItems_ExplosionFrenzyBehavior braqsItems_ExplosionFrenzyBehavior = default(BraqsItems_ExplosionFrenzyBehavior); if (Object.op_Implicit((Object)(object)args.Stats) && NetworkServer.active && Object.op_Implicit((Object)(object)args.Stats.body) && ((Component)args.Stats.body).TryGetComponent<BraqsItems_ExplosionFrenzyBehavior>(ref braqsItems_ExplosionFrenzyBehavior)) { int bonus = braqsItems_ExplosionFrenzyBehavior.bonus; if (bonus > 0) { args.Stats.blastRadiusBoostAdd *= (float)bonus * ConfigManager.ExplosionFrenzy_bonusPerBurn.Value + 1f; } } } } public class HundredRendingFists { public class BraqsItems_RendController : MonoBehaviour { private class DamageStore { public GameObject attackerObject; public float damage; public float damageCoefficient; } private GameObject delayedDamageIndicator; private List<DamageStore> damageStores = new List<DamageStore>(); public float storeBonus; private bool firstStackApplied; public CharacterBody body; public HealthComponent healthComponent; private void Start() { CharacterBody val = default(CharacterBody); if (((Component)this).gameObject.TryGetComponent<CharacterBody>(ref val)) { body = val; healthComponent = body.healthComponent; } else { Object.Destroy((Object)(object)this); } } private void OnDestroy() { if (Object.op_Implicit((Object)(object)delayedDamageIndicator)) { Object.Destroy((Object)(object)delayedDamageIndicator); } } private void FixedUpdate() { if (!body.HasBuff(RendDebuff) && firstStackApplied) { DealStoredDamage(); } } public static void ApplyRend(GameObject attacker, CharacterBody victim, DamageInfo damage, float damageCoefficient) { BraqsItems_RendController braqsItems_RendController = default(BraqsItems_RendController); ((Component)victim).TryGetComponent<BraqsItems_RendController>(ref braqsItems_RendController); if (!Object.op_Implicit((Object)(object)braqsItems_RendController)) { braqsItems_RendController = ((Component)victim).gameObject.AddComponent<BraqsItems_RendController>(); braqsItems_RendController.body = victim; } braqsItems_RendController.StoreDamage(attacker, damage, damageCoefficient); braqsItems_RendController.firstStackApplied = true; } private void StoreDamage(GameObject attacker, DamageInfo damageInfo, float damageCoefficient) { bool flag = true; float damage = damageInfo.damage; for (int i = 0; i < damageStores.Count; i++) { if ((Object)(object)damageStores[i].attackerObject == (Object)(object)attacker) { damageStores[i].damage += damage; damageStores[i].damageCoefficient = damageCoefficient; flag = false; } } if (flag) { damageStores.Add(new DamageStore { attackerObject = attacker, damage = damage, damageCoefficient = damageCoefficient }); } storeBonus += damageInfo.procCoefficient; UpdateBuffStacks(); } private void DealStoredDamage() { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0064: 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_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Expected O, but got Unknown //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Expected O, but got Unknown //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: 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) if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)healthComponent)) { float num = storeBonus * ConfigManager.HundredRendingFists_storeBonus.Value; float scale = Mathf.Min(ConfigManager.HundredRendingFists_storedDamageBase.Value + num, 3f); EffectManager.SpawnEffect(delayedDamageActivateEffect, new EffectData { origin = body.corePosition, color = Color32.op_Implicit(Color.white), scale = scale }, true); for (int i = 0; i < damageStores.Count; i++) { DamageStore damageStore = damageStores[i]; DamageInfo val = new DamageInfo(); val.crit = false; val.damage = damageStore.damage * (damageStore.damageCoefficient + num); val.force = Vector3.zero; val.inflictor = ((Component)this).gameObject; val.position = body.corePosition; val.procCoefficient = 0f; val.damageColorIndex = (DamageColorIndex)8; val.damageType = DamageTypeCombo.op_Implicit((DamageType)67108864); val.attacker = damageStore.attackerObject; healthComponent.TakeDamage(val); } } Object.Destroy((Object)(object)this); } private void UpdateBuffStacks() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) float value = ConfigManager.HundredRendingFists_rendDuration.Value; for (int i = 0; i < body.timedBuffs.Count; i++) { TimedBuff val = body.timedBuffs[i]; if (val.buffIndex == RendDebuff.buffIndex) { val.timer = value; } } for (int j = 0; (float)j < storeBonus - (float)body.GetBuffCount(RendDebuff); j++) { body.AddTimedBuff(RendDebuff, value); } } } public static ItemDef itemDef; public static BuffDef RendDebuff; private static GameObject delayedDamageActivateEffect; private static GameObject delayedDamageEffect; internal static void Init() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //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_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) if (ConfigManager.HundredRendingFists_isEnabled.Value) { Log.Info("Initializing North Star Hand Wraps Item"); itemDef = Helpers.GetItemDef("HundredRendingFists"); ItemDisplayRuleDict val = new ItemDisplayRuleDict((ItemDisplayRule[])null); ItemAPI.Add(new CustomItem(itemDef, val)); RendDebuff = ScriptableObject.CreateInstance<BuffDef>(); ((Object)RendDebuff).name = "Rend"; RendDebuff.canStack = true; RendDebuff.isHidden = false; RendDebuff.isDebuff = true; RendDebuff.buffColor = Color.white; RendDebuff.isCooldown = false; RendDebuff.iconSprite = BraqsItemsMain.assetBundle.LoadAsset<Sprite>("texBuffRendIcon"); ContentAddition.AddBuffDef(RendDebuff); delayedDamageEffect = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC2/Items/DelayedDamage/DelayedDamageIndicator.prefab").WaitForCompletion(); delayedDamageActivateEffect = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/BleedOnHitVoid/FractureImpactEffect.prefab").WaitForCompletion(); Hooks(); Log.Info("North Star Hand Wraps Initialized"); } } private static void Hooks() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown GlobalEventManager.OnHitEnemy += new hook_OnHitEnemy(GlobalEventManager_OnHitEnemy); } private static void GlobalEventManager_OnHitEnemy(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim) { CharacterBody val = default(CharacterBody); CharacterBody val2 = default(CharacterBody); if (!damageInfo.rejected && damageInfo.procCoefficient > 0f && Object.op_Implicit((Object)(object)damageInfo.attacker) && damageInfo.attacker.TryGetComponent<CharacterBody>(ref val) && Object.op_Implicit((Object)(object)val.inventory) && victim.TryGetComponent<CharacterBody>(ref val2) && Object.op_Implicit((Object)(object)val2.healthComponent)) { int itemCount = val.inventory.GetItemCount(itemDef); if (itemCount > 0 && Object.op_Implicit((Object)(object)val.master)) { float damageCoefficient = (float)(itemCount - 1) * ConfigManager.HundredRendingFists_storedDamagePerStack.Value + ConfigManager.HundredRendingFists_storedDamageBase.Value; BraqsItems_RendController.ApplyRend(damageInfo.attacker, val2, damageInfo, damageCoefficient); } } orig.Invoke(self, damageInfo, victim); } } public class LightningDamageBoost { public static ItemDef itemDef; private static DamageColorIndex chargedColor; internal static void Init() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) if (ConfigManager.InductionCoil_isEnabled.Value) { Log.Info("Initializing Induction Coil Item"); itemDef = Helpers.GetItemDef("LightningDamageBoost"); ItemDisplayRuleDict val = new ItemDisplayRuleDict((ItemDisplayRule[])null); ItemAPI.Add(new CustomItem(itemDef, val)); Hooks(); chargedColor = ColorsAPI.RegisterDamageColor(new Color(0.37f, 0.5f, 0.924f)); Log.Info("Induction Coil Initialized"); } } private static void Hooks() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown LightningOrb.Begin += new hook_Begin(LightningOrb_Begin); VoidLightningOrb.Begin += new hook_Begin(VoidLightningOrb_Begin); } private static void VoidLightningOrb_Begin(orig_Begin orig, VoidLightningOrb self) { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) CharacterBody val = default(CharacterBody); if (Object.op_Implicit((Object)(object)self.attacker) && self.attacker.TryGetComponent<CharacterBody>(ref val) && Object.op_Implicit((Object)(object)val.inventory)) { int itemCount = val.inventory.GetItemCount(itemDef); if (itemCount > 0) { self.damageColorIndex = chargedColor; self.damageValue *= 1f + (float)(itemCount - 1) * ConfigManager.InductionCoil_damageBonusPerStack.Value + ConfigManager.InductionCoil_damageBonusBase.Value; } } orig.Invoke(self); } private static void LightningOrb_Begin(orig_Begin orig, LightningOrb self) { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) CharacterBody val = default(CharacterBody); if (Object.op_Implicit((Object)(object)self.attacker) && self.attacker.TryGetComponent<CharacterBody>(ref val) && Object.op_Implicit((Object)(object)val.inventory)) { int itemCount = val.inventory.GetItemCount(itemDef); if (itemCount > 0) { self.damageColorIndex = chargedColor; self.damageValue *= 1f + (float)(itemCount - 1) * ConfigManager.InductionCoil_damageBonusPerStack.Value + ConfigManager.InductionCoil_damageBonusBase.Value; } } orig.Invoke(self); } } public class ConfigManager { public static ConfigEntry<string> ConfigVersion; public static ConfigEntry<bool> AttackSpeedOnHit_isEnabled; public static ConfigEntry<float> AttackSpeedOnHit_percentPerStack; public static ConfigEntry<float> AttackSpeedOnHit_percentBase; public static ConfigEntry<bool> BiggerExplosions_isEnabled; public static ConfigEntry<float> BiggerExplosions_percentPerStack; public static ConfigEntry<float> BiggerExplosions_percentBase; public static ConfigEntry<bool> LightningOnOverkill_isEnabled; public static ConfigEntry<float> LightningOnOverkill_damagePercentPerStack; public static ConfigEntry<float> LightningOnOverkill_damagePercentBase; public static ConfigEntry<int> LightningOnOverkill_bouncePerStack; public static ConfigEntry<int> LightningOnOverkill_bounceBase; public static ConfigEntry<float> LightningOnOverkill_rangePerStack; public static ConfigEntry<float> LightningOnOverkill_rangeBase; public static ConfigEntry<bool> LightningOnOverkillVoid_isEnabled; public static ConfigEntry<float> LightningOnOverkillVoid_damagePercentPerStack; public static ConfigEntry<float> LightningOnOverkillVoid_damagePercentBase; public static ConfigEntry<int> LightningOnOverkillVoid_hitsPerStack; public static ConfigEntry<int> LightningOnOverkillVoid_hitsBase; public static ConfigEntry<bool> ExplodeAgain_isEnabled; public static ConfigEntry<float> ExplodeAgain_chance; public static ConfigEntry<float> ExplodeAgain_radiusCoefficient; public static ConfigEntry<float> ExplodeAgain_damageCoefficient; public static ConfigEntry<int> ExplodeAgain_maxBombsBase; public static ConfigEntry<int> ExplodeAgain_maxBombsPerStack; public static ConfigEntry<bool> ExplodeAgain_ignoreProcCoefficient; public static ConfigEntry<bool> HealFromBleed_isEnabled; public static ConfigEntry<float> HealFromBleed_percentBase; public static ConfigEntry<float> HealFromBleed_percentPerStack; public static ConfigEntry<bool> RepairBrokenItems_isEnabled; public static ConfigEntry<int> RepairBrokenItems_repairsBase; public static ConfigEntry<int> RepairBrokenItems_repairsPerStack; public static ConfigEntry<float> RepairBrokenItems_whiteChance; public static ConfigEntry<float> RepairBrokenItems_defaultChance; public static ConfigEntry<float> RepairBrokenItems_redChance; public static ConfigEntry<bool> HealFromBleedVoid_isEnabled; public static ConfigEntry<float> HealFromBleedVoid_percentBase; public static ConfigEntry<float> HealFromBleedVoid_percentPerStack; public static ConfigEntry<float> HealFromBleedVoid_radiusBase; public static ConfigEntry<float> HealFromBleedVoid_radiusPerStack; public static ConfigEntry<bool> ConfusionOnHit_isEnabled; public static ConfigEntry<float> ConfusionOnHit_chanceBase; public static ConfigEntry<float> ConfusionOnHit_chancePerStack; public static ConfigEntry<float> ConfusionOnHit_durationBase; public static ConfigEntry<float> ConfusionOnHit_durationPerStack; public static ConfigEntry<int> ConfusionOnHit_enemiesAggroed; public static ConfigEntry<bool> ConfusionOnHit_spreadDebuff; public static ConfigEntry<bool> ExplosionFrenzy_isEnabled; public static ConfigEntry<float> ExplosionFrenzy_igniteDamageBase; public static ConfigEntry<float> ExplosionFrenzy_igniteDamagePerStack; public static ConfigEntry<float> ExplosionFrenzy_bonusPerBurn; public static ConfigEntry<int> ExplosionFrenzy_bonusCapBase; public static ConfigEntry<int> ExplosionFrenzy_bonusCapPerStack; public static ConfigEntry<bool> HundredRendingFists_isEnabled; public static ConfigEntry<float> HundredRendingFists_rendDuration; public static ConfigEntry<float> HundredRendingFists_storedDamagePerStack; public static ConfigEntry<float> HundredRendingFists_storedDamageBase; public static ConfigEntry<float> HundredRendingFists_storeBonus; public static ConfigEntry<bool> InductionCoil_isEnabled; public static ConfigEntry<float> InductionCoil_damageBonusBase; public static ConfigEntry<float> InductionCoil_damageBonusPerStack; public static void Init(string configPath) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_07cb: Unknown result type (might be due to invalid IL or missing references) //IL_07d5: Expected O, but got Unknown //IL_07f9: Unknown result type (might be due to invalid IL or missing references) //IL_07fe: Unknown result type (might be due to invalid IL or missing references) //IL_0805: Unknown result type (might be due to invalid IL or missing references) //IL_0826: Expected O, but got Unknown //IL_0821: Unknown result type (might be due to invalid IL or missing references) //IL_082b: Expected O, but got Unknown //IL_084f: Unknown result type (might be due to invalid IL or missing references) //IL_0854: Unknown result type (might be due to invalid IL or missing references) //IL_085f: Unknown result type (might be due to invalid IL or missing references) //IL_0881: Unknown result type (might be due to invalid IL or missing references) //IL_08a8: Expected O, but got Unknown //IL_08a3: Unknown result type (might be due to invalid IL or missing references) //IL_08ad: Expected O, but got Unknown ConfigFile val = new ConfigFile(Path.Combine(configPath, "braquen-BraqsItems.cfg"), true); ConfigVersion = val.Bind<string>("Version", "Version", "1.5.1", "Don't touch. Used to determine if a config file is out of date."); string text = ConfigVersion.Value.Split('.')[0] + "." + ConfigVersion.Value.Split('.')[1]; string text2 = "1.5.1".Split('.')[0] + "." + "1.5.1".Split('.')[1]; if (text != text2) { val.Clear(); val.Save(); ConfigVersion = val.Bind<string>("Version", "Version", "1.5.1", "Don't touch. Used to determine if a config file is out of date."); } AttackSpeedOnHit_isEnabled = val.Bind<bool>("ATTACKSPEEDONHIT", "Enable", true, "Load this item."); AttackSpeedOnHit_percentBase = val.Bind<float>("ATTACKSPEEDONHIT", "Base Attack Speed Bonus", 0.01f, "Attack speed bonus gained on hit with one stack."); AttackSpeedOnHit_percentPerStack = val.Bind<float>("ATTACKSPEEDONHIT", "Attack Speed Bonus Per Stack", 0.01f, "Attack speed bonus gained on hit per additional stack."); BiggerExplosions_isEnabled = val.Bind<bool>("BIGGEREXPLOSIONS", "Enable", true, "Load this item."); BiggerExplosions_percentBase = val.Bind<float>("BIGGEREXPLOSIONS", "Base Blast Radius Increase", 0.05f, "Blast radius increase with one stack."); BiggerExplosions_percentPerStack = val.Bind<float>("BIGGEREXPLOSIONS", "Attack Speed Bonus Per Stack", 0.05f, "Blast radius increase per additional stack."); LightningOnOverkill_isEnabled = val.Bind<bool>("LIGHTNINGONOVERKILL", "Enable", true, "Load this item."); LightningOnOverkill_damagePercentPerStack = val.Bind<float>("LIGHTNINGONOVERKILL", "Damage Per Stack", 0f, "Excess damage per additional stack."); LightningOnOverkill_damagePercentBase = val.Bind<float>("LIGHTNINGONOVERKILL", "Base Damage", 1f, "Fraction of excess damage from a kill dealt to nearby enemies with one stack."); LightningOnOverkill_bouncePerStack = val.Bind<int>("LIGHTNINGONOVERKILL", "Bounces Per Stack", 1, "Number of enemies hit per additional stack."); LightningOnOverkill_bounceBase = val.Bind<int>("LIGHTNINGONOVERKILL", "Base Bounces", 3, "Number of enemies hit with one stack."); LightningOnOverkill_rangePerStack = val.Bind<float>("LIGHTNINGONOVERKILL", "Range Per Stack", 3f, "Range of the lightning per additional stack."); LightningOnOverkill_rangeBase = val.Bind<float>("LIGHTNINGONOVERKILL", "Range", 12f, "Range of the lightning with one stack."); LightningOnOverkillVoid_isEnabled = val.Bind<bool>("LIGHTNINGONOVERKILLVOID", "Enable", true, "Load this item."); LightningOnOverkillVoid_damagePercentPerStack = val.Bind<float>("LIGHTNINGONOVERKILLVOID", "Damage Per Stack", 0.5f, "Maximum possible bonus base damage per additional stack."); LightningOnOverkillVoid_damagePercentBase = val.Bind<float>("LIGHTNINGONOVERKILLVOID", "Base Damage", 3f, "Maximum possible bonus base damage dealt on the next hit after kill."); LightningOnOverkillVoid_hitsPerStack = val.Bind<int>("LIGHTNINGONOVERKILLVOID", "Hits Per Stack", 1, "Number of hits that recieve bonus damage per additional stack."); LightningOnOverkillVoid_hitsBase = val.Bind<int>("LIGHTNINGONOVERKILLVOID", "Hits with bonus", 2, "Number of hits that recieve bonus damage after kill."); ExplodeAgain_isEnabled = val.Bind<bool>("EXPLODEAGAIN", "Enable", true, "Load this item."); ExplodeAgain_chance = val.Bind<float>("EXPLODEAGAIN", "Bomblet Chance", 25f, "The chance to fire a bomblet. This chance is rolled repeatedly to determine how many bomblets to fire."); ExplodeAgain_maxBombsBase = val.Bind<int>("EXPLODEAGAIN", "Number of Bombs", 3, "The maximum number of bomblets that can be fired with one stack."); ExplodeAgain_maxBombsPerStack = val.Bind<int>("EXPLODEAGAIN", "Number of Bombs Per Stack", 2, "The number of additinal bomblets that can be fired per additional stack."); ExplodeAgain_radiusCoefficient = val.Bind<float>("EXPLODEAGAIN", "Radius Coefficient", 0.75f, "Multiplied by the radius of the initial explosion to determine the bomblet's blast radius."); ExplodeAgain_damageCoefficient = val.Bind<float>("EXPLODEAGAIN", "Damage Coefficient", 0.75f, "Multiplied by the damage of the initial explosion to determine the bomblet's damage."); ExplodeAgain_ignoreProcCoefficient = val.Bind<bool>("EXPLODEAGAIN", "Ignore Proc Coefficients", false, "When enabled, bomblets have the same chance to fire regardless of the proc coefficient of the initial explosion. This allows Behemoth and Sticky bomb to fire bomblets. Turn on at your own risk."); HealFromBleed_isEnabled = val.Bind<bool>("HEALFROMBLEED", "Enable", true, "Load this item."); HealFromBleed_percentBase = val.Bind<float>("HEALFROMBLEED", "Percent Health Healed", 0.01f, "Fraction of health healed for every 100% bleed damage with one stack."); HealFromBleed_percentPerStack = val.Bind<float>("HEALFROMBLEED", "Percent Health Healed Per Stack", 0.01f, "Fraction of health healed for every 100% bleed damage per additional stack."); RepairBrokenItems_isEn