Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of BalanceoItems v1.0.0
BalanceoItems.dll
Decompiled 14 hours agousing System; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Reflection.Emit; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using HarmonyLib; using Microsoft.CodeAnalysis; using R2API; using RoR2; using UnityEngine; using UnityEngine.Networking; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("BalanceoItems")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("BalanceoItems")] [assembly: AssemblyTitle("BalanceoItems")] [assembly: AssemblyVersion("1.0.0.0")] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } } namespace BalanceoItems { [BepInPlugin("com.miusario.BalanceoItems", "BalanceoItems", "1.0.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class MainPlugin : BaseUnityPlugin { [HarmonyPatch(typeof(HealthComponent), "TakeDamage")] public class ModificarProyectilesPerforantes { private static void Prefix(HealthComponent __instance, DamageInfo damageInfo) { if (damageInfo == null || !((Object)(object)damageInfo.attacker != (Object)null)) { return; } CharacterBody component = damageInfo.attacker.GetComponent<CharacterBody>(); if ((Object)(object)component != (Object)null && (Object)(object)component.inventory != (Object)null) { int itemCountEffective = component.inventory.GetItemCountEffective(Items.BossDamageBonus); if (itemCountEffective > 0 && (Object)(object)__instance.body != (Object)null && __instance.body.isBoss) { float num = 1f + 0.2f * (float)itemCountEffective; float num2 = 1.2f + 0.1f * (float)(itemCountEffective - 1); damageInfo.damage *= num2 / num; } } } } [HarmonyPatch(typeof(HealthComponent), "TakeDamage")] public class ModificarTuboDeMonedas { private static void Prefix(HealthComponent __instance, DamageInfo damageInfo) { if ((Object)(object)__instance != (Object)null && (Object)(object)__instance.body != (Object)null && (Object)(object)__instance.body.inventory != (Object)null) { int itemCountEffective = __instance.body.inventory.GetItemCountEffective(Items.GoldOnHurt); if (itemCountEffective > 0) { damageInfo.damage *= 0.95f; } } } private static void Postfix(HealthComponent __instance, DamageInfo damageInfo) { if (damageInfo == null || damageInfo.rejected || !(damageInfo.damage > 0f) || !((Object)(object)__instance != (Object)null) || !((Object)(object)__instance.body != (Object)null) || !((Object)(object)__instance.body.master != (Object)null) || !((Object)(object)__instance.body.inventory != (Object)null)) { return; } int itemCountEffective = __instance.body.inventory.GetItemCountEffective(Items.GoldOnHurt); if (itemCountEffective > 0 && (Object)(object)Run.instance != (Object)null) { float difficultyCoefficient = Run.instance.difficultyCoefficient; uint num = (uint)(3f * (float)itemCountEffective * difficultyCoefficient); uint num2 = (uint)((6f + 4f * (float)(itemCountEffective - 1)) * difficultyCoefficient); if (num2 > num) { __instance.body.master.GiveMoney(num2 - num); } } } } [HarmonyPatch(typeof(HealthComponent), "TakeDamage")] public class ModificarCristalConcentracion { private static void Prefix(HealthComponent __instance, DamageInfo damageInfo) { //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) if (damageInfo == null || !((Object)(object)damageInfo.attacker != (Object)null)) { return; } CharacterBody component = damageInfo.attacker.GetComponent<CharacterBody>(); if (!((Object)(object)component != (Object)null) || !((Object)(object)component.inventory != (Object)null)) { return; } int itemCountEffective = component.inventory.GetItemCountEffective(Items.NearbyDamageBonus); if (itemCountEffective > 0) { Vector3 val = damageInfo.attacker.transform.position - ((Component)__instance).transform.position; if (((Vector3)(ref val)).sqrMagnitude <= 169f) { float num = 1f + 0.2f * (float)itemCountEffective; float num2 = 1.25f + 0.2f * (float)(itemCountEffective - 1); damageInfo.damage *= num2 / num; } } } } [HarmonyPatch(typeof(HealthComponent), "TakeDamage")] public class PatchOpalo { private static void Prefix(HealthComponent __instance, DamageInfo damageInfo) { if (!((Object)(object)__instance != (Object)null) || !((Object)(object)__instance.body != (Object)null) || damageInfo == null || !(damageInfo.damage > 0f)) { return; } RastreadorOpalo component = ((Component)__instance.body).GetComponent<RastreadorOpalo>(); if ((Object)(object)component != (Object)null) { int num = (Object.op_Implicit((Object)(object)__instance.body.inventory) ? __instance.body.inventory.GetItemCountEffective(Items.OutOfCombatArmor) : 0); if (num > 0) { component.ActivarProteccionExtra(); } } } } public class RastreadorOpalo : MonoBehaviour { private CharacterBody body = null; private bool estabaFueraDePeligro = false; public float TiempoArmaduraRestante { get; private set; } public float TiempoLatigoRestante { get; private set; } private void Awake() { body = ((Component)this).GetComponent<CharacterBody>(); } private void Update() { if (TiempoArmaduraRestante > 0f) { TiempoArmaduraRestante -= Time.deltaTime; } if (TiempoLatigoRestante > 0f) { TiempoLatigoRestante -= Time.deltaTime; } if ((Object)(object)body != (Object)null) { bool outOfDanger = body.outOfDanger; if (estabaFueraDePeligro && !outOfDanger) { TiempoLatigoRestante = 1.5f; } estabaFueraDePeligro = outOfDanger; } } public void ActivarProteccionExtra() { TiempoArmaduraRestante = 1.5f; } } [HarmonyPatch(typeof(GlobalEventManager), "OnHitEnemy")] public class ModificarProbabilidadesOnHit { private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions) { string itemActual = null; foreach (CodeInstruction instr in instructions) { if (instr.operand != null) { string opStr = instr.operand.ToString(); if (opStr.Contains("StickyBomb")) { itemActual = "StickyBomb"; } else if (opStr.Contains("StunChanceOnHit")) { itemActual = "StunChanceOnHit"; } } if (itemActual != null && CodeInstructionExtensions.LoadsConstant(instr, 5.0)) { instr.operand = 25f; itemActual = null; } yield return instr; } } } [HarmonyPatch(typeof(GlobalEventManager), "OnHitEnemy")] public class ModificarMarcaDeMuerte { private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions) { bool cercaDeDeathMark = false; foreach (CodeInstruction instr in instructions) { if (instr.operand != null && instr.operand.ToString().Contains("DeathMark")) { cercaDeDeathMark = true; } if (cercaDeDeathMark && CodeInstructionExtensions.LoadsConstant(instr, 4L)) { instr.opcode = OpCodes.Ldc_I4_2; instr.operand = null; cercaDeDeathMark = false; } yield return instr; } } } [HarmonyPatch(typeof(CharacterBody), "AddMultiKill")] public class DesactivarHombreraVanilla { private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions) { foreach (CodeInstruction instr in instructions) { if (CodeInstructionExtensions.LoadsConstant(instr, 3L)) { yield return new CodeInstruction(OpCodes.Ldc_I4, (object)9999); } else { yield return instr; } } } } [HarmonyPatch(typeof(GlobalEventManager), "OnHitEnemy")] public class ModificarCuracionGuadaña { private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions) { bool cercaDeHealOnCrit = false; int reemplazos = 0; foreach (CodeInstruction instr in instructions) { if (instr.operand != null && instr.operand.ToString().Contains("HealOnCrit")) { cercaDeHealOnCrit = true; } if (cercaDeHealOnCrit && CodeInstructionExtensions.LoadsConstant(instr, 4.0) && reemplazos < 2) { instr.operand = 5f; reemplazos++; if (reemplazos == 2) { cercaDeHealOnCrit = false; } } yield return instr; } } } [HarmonyPatch(typeof(GlobalEventManager), "OnHitEnemy")] public class ModificarSemillas { private static void Postfix(DamageInfo damageInfo) { //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) if (damageInfo == null || damageInfo.rejected || (Object)(object)damageInfo.attacker == (Object)null) { return; } CharacterBody component = damageInfo.attacker.GetComponent<CharacterBody>(); if (!((Object)(object)component != (Object)null) || !((Object)(object)component.inventory != (Object)null) || !((Object)(object)component.healthComponent != (Object)null)) { return; } int itemCountEffective = component.inventory.GetItemCountEffective(Items.Seed); if (itemCountEffective > 0) { float num = 1f * (float)itemCountEffective; float num2 = 5f + (2f + (float)(itemCountEffective - 1)); float num3 = num2 - num; if (num3 > 0f) { component.healthComponent.Heal(num3, default(ProcChainMask), true); } } } } public class RastreadorHombrera : MonoBehaviour { [HarmonyPatch(typeof(GlobalEventManager), "OnCharacterDeath")] public class ModificarMascaraFeliz { private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions) { bool cercaDeGhostOnKill = false; foreach (CodeInstruction instr in instructions) { if (instr.operand != null && instr.operand.ToString().Contains("GhostOnKill")) { cercaDeGhostOnKill = true; } if (cercaDeGhostOnKill && CodeInstructionExtensions.LoadsConstant(instr, 7.0)) { instr.operand = 15f; cercaDeGhostOnKill = false; } yield return instr; } } } [HarmonyPatch(typeof(HealthComponent), "Heal")] public class ModificarEstanteRejuvenecedor { private static void Prefix(HealthComponent __instance, ref float amount) { if ((Object)(object)__instance != (Object)null && (Object)(object)__instance.body != (Object)null && (Object)(object)__instance.body.inventory != (Object)null) { int itemCountEffective = __instance.body.inventory.GetItemCountEffective(Items.IncreaseHealing); if (itemCountEffective > 0) { float num = 1f + (float)itemCountEffective; float num2 = 2f + (float)itemCountEffective; amount *= num2 / num; } } } } [HarmonyPatch(typeof(GlobalEventManager), "OnCharacterDeath")] public class ModificarSusurrosSonoros { private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions) { bool cercaDeSusurros = false; foreach (CodeInstruction instr in instructions) { if (instr.operand != null && instr.operand.ToString().Contains("ItemDropChanceOnKill")) { cercaDeSusurros = true; } if (cercaDeSusurros && CodeInstructionExtensions.LoadsConstant(instr, 4.0)) { instr.operand = 10f; cercaDeSusurros = false; } yield return instr; } } } private CharacterBody body = null; private readonly List<float> tiemposDeMuertes = new List<float>(); private void Awake() { body = ((Component)this).GetComponent<CharacterBody>(); GlobalEventManager.onCharacterDeathGlobal += AlMorirAlguien; } private void OnDestroy() { GlobalEventManager.onCharacterDeathGlobal -= AlMorirAlguien; } private void AlMorirAlguien(DamageReport report) { if (!((Object)(object)report.attackerBody == (Object)(object)body) || !Object.op_Implicit((Object)(object)body.inventory)) { return; } int itemCountEffective = body.inventory.GetItemCountEffective(Items.WarCryOnMultiKill); if (itemCountEffective > 0) { tiemposDeMuertes.Add(Time.time); float tiempoActual = Time.time; tiemposDeMuertes.RemoveAll((float t) => tiempoActual - t > 7f); if (tiemposDeMuertes.Count >= 4) { tiemposDeMuertes.Clear(); float num = 2f + 4f * (float)itemCountEffective; body.AddTimedBuff(Buffs.WarCryBuff, num); } } } } public void Awake() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown Harmony val = new Harmony("com.miusario.BalanceoItems"); val.PatchAll(); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(ModificarEstadisticas); ((ResourceAvailability)(ref ItemCatalog.availability)).CallWhenAvailable((Action)ModificarRarezas); Language.onCurrentLanguageChanged += ActualizarDescripciones; Stage.onStageStartGlobal += RestablecerElixires; GlobalEventManager.onServerDamageDealt += CuracionGenesisLoop; CharacterBody.onBodyStartGlobal += delegate(CharacterBody body) { ((Component)body).gameObject.AddComponent<RastreadorHombrera>(); }; CharacterBody.onBodyStartGlobal += delegate(CharacterBody body) { ((Component)body).gameObject.AddComponent<RastreadorHombrera>(); ((Component)body).gameObject.AddComponent<RastreadorOpalo>(); }; Debug.Log((object)"[BalanceoItems] Mod cargado correctamente."); } private void CuracionGenesisLoop(DamageReport report) { //IL_00cf: 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) if (report == null || report.damageInfo == null || (Object)(object)report.attackerBody == (Object)null || (Object)(object)report.damageInfo.inflictor == (Object)null || !((Object)report.damageInfo.inflictor).name.Contains("VagrantNovaItem")) { return; } int num = (Object.op_Implicit((Object)(object)report.attackerBody.inventory) ? report.attackerBody.inventory.GetItemCountEffective(Items.NovaOnLowHealth) : 0); if (num > 0) { float num2 = report.damageDealt * 0.15f; if (Object.op_Implicit((Object)(object)report.attackerBody.healthComponent) && num2 > 0f) { report.attackerBody.healthComponent.Heal(num2, default(ProcChainMask), true); } } } private void ModificarEstadisticas(CharacterBody sender, StatHookEventArgs args) { if ((Object)(object)sender == (Object)null || (Object)(object)sender.inventory == (Object)null) { return; } int itemCountEffective = sender.inventory.GetItemCountEffective(Items.BossDamageBonus); if (itemCountEffective > 0) { args.critAdd += 5f; } int itemCountEffective2 = sender.inventory.GetItemCountEffective(Items.FlatHealth); if (itemCountEffective2 > 0) { float num = 25f * (float)itemCountEffective2; float num2 = 45f + 35f * (float)(itemCountEffective2 - 1); args.baseHealthAdd += num2 - num; } int itemCountEffective3 = sender.inventory.GetItemCountEffective(Items.OutOfCombatArmor); if (itemCountEffective3 > 0) { RastreadorOpalo component = ((Component)sender).GetComponent<RastreadorOpalo>(); if ((Object)(object)component != (Object)null && component.TiempoArmaduraRestante > 0f && !sender.HasBuff(Buffs.OutOfCombatArmorBuff)) { args.armorAdd += 100f * (float)itemCountEffective3; } } int itemCountEffective4 = sender.inventory.GetItemCountEffective(Items.AttackSpeedOnCrit); if (itemCountEffective4 > 0) { args.critAdd += 5f; } if (sender.HasBuff(Buffs.Energized)) { args.attackSpeedMultAdd += 0.8f; } int itemCountEffective5 = sender.inventory.GetItemCountEffective(Items.HealOnCrit); if (itemCountEffective5 > 0) { args.critAdd += 5f; } int itemCountEffective6 = sender.inventory.GetItemCountEffective(Items.SprintOutOfCombat); if (itemCountEffective6 > 0) { RastreadorOpalo component2 = ((Component)sender).GetComponent<RastreadorOpalo>(); bool flag = (Object)(object)component2 != (Object)null && component2.TiempoLatigoRestante > 0f; if (!sender.outOfDanger && flag) { args.moveSpeedMultAdd += 0.3f * (float)itemCountEffective6; } } if (sender.HasBuff(Buffs.WarCryBuff)) { args.moveSpeedMultAdd -= 0.05f; args.attackSpeedMultAdd += 0.4f; } int itemCountEffective7 = sender.inventory.GetItemCountEffective(Items.Knurl); if (itemCountEffective7 > 0) { float num3 = 40f * (float)itemCountEffective7; float num4 = 85f + 60f * (float)(itemCountEffective7 - 1); args.baseHealthAdd += num4 - num3; float num5 = 1.6f * (float)itemCountEffective7; float num6 = 3f + 2.6f * (float)(itemCountEffective7 - 1); args.baseRegenAdd += num6 - num5; float maxHealth = sender.maxHealth; float num7 = Mathf.Floor(maxHealth / 100f); args.armorAdd += num7; } } private void ModificarRarezas() { ItemDef fragileDamageBonus = Items.FragileDamageBonus; if ((Object)(object)fragileDamageBonus != (Object)null) { fragileDamageBonus.tier = (ItemTier)3; } ItemDef jumpBoost = Items.JumpBoost; if ((Object)(object)jumpBoost != (Object)null) { jumpBoost.tier = (ItemTier)0; } ItemDef barrierOnOverHeal = Items.BarrierOnOverHeal; if ((Object)(object)barrierOnOverHeal != (Object)null) { barrierOnOverHeal.tier = (ItemTier)1; } ItemDef extraShrineItem = Items.ExtraShrineItem; if ((Object)(object)extraShrineItem != (Object)null) { extraShrineItem.tier = (ItemTier)0; } ItemDef extraStatsOnLevelUp = Items.ExtraStatsOnLevelUp; if ((Object)(object)extraStatsOnLevelUp != (Object)null) { extraStatsOnLevelUp.tier = (ItemTier)0; } Debug.Log((object)"[BalanceoItems] Varios Items cambiaron de Rareza."); } private void ActualizarDescripciones() { if (Language.currentLanguage != null) { Language.currentLanguage.SetStringByToken("ITEM_ATTACKSPEEDPERNEARBYALLYORENEMY_DESC", "Aumenta la <style=cIsDamage>velocidad de ataque</style> un <style=cIsDamage>10%<style=cStack>(+3,5 % por acumulación)</style> hasta <style=cIsUtility>3</style> <style=cStack>(+1 por acumulación)</style> por cada aliado y enemigo en un radio de <style=cIsUtility>20 metros</style>."); Language.currentLanguage.SetStringByToken("ITEM_BOSSDAMAGEBONUS_DESC", "Aumenta el <style=cIsDamage>daño</style> a jefes en <style=cIsDamage>20%</style> <style=cStack>(+10% por acumulación)</style> y otorga <style=cIsDamage>5%</style> de probabilidad de <style=cIsDamage>golpe crítico</style>."); Language.currentLanguage.SetStringByToken("ITEM_GOLDONHURT_DESC", "Reduce el <style=cIsDamage>daño</style> recibido en <style=cIsDamage>5%</style> y otorga <style=cIsUtility>6 monedas</style> <style=cStack>(+4 por acumulación)</style> al recibir daño."); Language.currentLanguage.SetStringByToken("ITEM_HEALINGPOTION_DESC", "Recibir daño que te deje debajo del <style=cIsHealth>25% de tu salud máxima</style> consumirá este objeto y te curará <style=cIsHealing>75% de tu salud máxima</style>. Este objeto se restaura cada ronda."); Language.currentLanguage.SetStringByToken("ITEM_FLATHEALTH_DESC", "Aumenta la <style=cIsHealing>salud máxima</style> en <style=cIsHealing>45</style> <style=cStack>(+35 por acumulación)</style>."); Language.currentLanguage.SetStringByToken("ITEM_NEARBYDAMAGEBONUS_DESC", "Aumenta el daño que le haces a los enemigos dentro de un radio de <style=cIsUtility>13 metros</style> en un <style=cIsDamage>25%</style> <style=cStack>(+20% por acumulación)</style>."); Language.currentLanguage.SetStringByToken("ITEM_OUTOFCOMBATARMOR_DESC", "Al estar fuera de peligro, aumenta la armadura en <style=cIsUtility>100</style> <style=cStack>(+100 por acumulación)</style>. Al entrar en combate esta bonificación dura 1,5s."); Language.currentLanguage.SetStringByToken("ITEM_STICKYBOMB_DESC", "Al impactar,hay una probabilidad del <style=cIsDamage>25%</style> <style=cStack>(+5% por acumulación)</style> de fijar una <style=cIsDamage>bomba </style> a un enemigo, detonándola e infligiendo un <style=cIsDamage>180%</style> de daño <style=cIsDamage>TOTAL</style>."); Language.currentLanguage.SetStringByToken("ITEM_STUNCHANCEONHIT_DESC", "Al impactar, hay una probabilidad del <style=cIsDamage>25%</style> <style=cStack>(+5% por acumulación)</style> de aturdir a un enemigo durante <style=cIsUtility>2 segundos</style>."); Language.currentLanguage.SetStringByToken("ITEM_ATTACKSPEEDONCRIT_DESC", "los <style=cIsDamage>golpes críticos</style> aumentan la <style=cIsDamage>velocidad de ataque</style> en un <style=cIsDamage>12%</style>. Limite máximo de <style=cIsDamage>36%</style> <style=cStack>(+12% por acumulación) <style=cIsDamage> de velocidad de ataque</style>. </style>Obtienes <style=cIsDamage>10% de probabilidad de crítico</style>."); Language.currentLanguage.SetStringByToken("ITEM_DEATHMARK_DESC", "Los enemigos con <style=cIsDamage>2</style> o más penalizaciones tienen una <style=cIsDamage>marca de muerte</style> que aumenta el <style=cIsDamage>daño que reciban</style> de cualquier fuente en un <style=cIsDamage>50%</style> durante <style=cIsUtility>7 <style=cStack>(+7 por acumulación)</style> segundos</style>."); Language.currentLanguage.SetStringByToken("ITEM_ENERGIZEDONEQUIPMENTUSE_DESC", "Activar tu equipamiento te concede un incremento de <style=cIsDamage>+150 % de velocidad de ataque</style> durante <style=cIsUtility>8 s</style> <style=cStack>(+4 s por acumulación)</style>."); Language.currentLanguage.SetStringByToken("ITEM_HEALONCRIT_DESC", "Obtienes <style=cIsDamage>10% de probabilidad de crítico</style>. Los <style=cIsDamage>golpes críticos</style> te curan <style=cIsHealing>10</style> <style=cStack>(+5 por acumulación)</style> de salud."); Language.currentLanguage.SetStringByToken("ITEM_SEED_DESC", "Infligir daño te cura <style=cIsHealing>5</style> <style=cStack>(+2 por acumulación)</style> puntos de <style=cIsHealing>salud</style>."); Language.currentLanguage.SetStringByToken("ITEM_SPRINTOUTOFCOMBAT_DESC", "Al estar fuera de peligro, aumenta la velocidad de movimiento en un <style=cIsUtility>30%</style> <style=cStack>(+30% por acumulación)</style>. Al entrar en combate esta bonificación dura 1,5s."); Language.currentLanguage.SetStringByToken("ITEM_WARCRYONMULTIKILL_DESC", "Matar a 4 enemigos en 7 segundos te enfurece con <style=cIsUtility>+45 % de velocidad de movimiento</style> y <style=cIsDamage>+140 % de velocidad de ataque</style> durante <style=cIsUtility>6 s</style> <style=cStack>(+4 s por acumulación)</style>."); Language.currentLanguage.SetStringByToken("ITEM_EXTRALIFE_DESC", "<style=cIsUtility>Al morir</style>, este objeto se <style=cIsUtility>consumirá</style> y <style=cIsUtility>reviviras con 3 segundos de invulnerabilidad</style>. Este objeto se restaura cada ronda."); Language.currentLanguage.SetStringByToken("ITEM_GHOSTONKILL_DESC", "Tras matar a un enemigo hay un <style=cIsDamage>15%</style> de probabilidad de hacer aparecer un <style=cIsDamage>fantasma</style> del enemigo que hayas matado con un <style=cIsDamage>1500%</style> de daño. Dura <style=cIsUtility>30s</style> <style=cStack>(+30s por acumulación)</style>."); Language.currentLanguage.SetStringByToken("ITEM_INCREASEHEALING_DESC", "Aumenta la <style=cIsHealing>eficacia de la curación</style> en un <style=cIsHealing>200%</style> <style=cStack>(+100% por acumulación)</style>."); Language.currentLanguage.SetStringByToken("ITEM_ITEMDROPCHANCEONKILL_DESC", "Al matar a un <style=cIsDamage>Jefe</style> o a un enemigo de <style=cIsDamage>élite</style>, hay un <style=cIsUtility>10% <style=cStack>(+4% por acumulación)</style> de probabilidad de que suelte un <style=cIsUtility>objeto</style>."); Language.currentLanguage.SetStringByToken("ITEM_KNURL_DESC", "Aumenta la <style=cIsHealing>salud máxima</style> en <style=cIsHealing>85</style> <style=cStack>(+60 por acumulación)</style> y la <style=cIsHealing>regeneración de salud</style> en <style=cIsHealing>3</style> <style=cStack>(+2,6 por acumulación)</style>. Además, aumenta la <style=cIsUtility>armadura</style> en 1 por cada 35 de <style=cIsHealing>salud máxima</style>."); Language.currentLanguage.SetStringByToken("ITEM_NOVAONLOWHEALTH_DESC", "Bajar del <style=cIsHealth>15%</style> de salud hace que explotes, infligiendo <style=cIsDamage>6000%</style> de daño base. Este efecto te <style=cIsHealing>curara</style> un <style=cIsHealing>15%</style> del <style=cIsHealth>daño infligido</style>. Se recarga cada <style=cIsUtility>30 s</style> <style=cStack>(-50% por acumulación)</style>."); } } private static void RestablecerElixires(Stage _) { //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { return; } foreach (PlayerCharacterMasterController instance in PlayerCharacterMasterController.instances) { if (Object.op_Implicit((Object)(object)instance) && Object.op_Implicit((Object)(object)instance.master) && Object.op_Implicit((Object)(object)instance.master.inventory)) { Inventory inventory = instance.master.inventory; int itemCountPermanent = inventory.GetItemCountPermanent(Items.HealingPotionConsumed); if (itemCountPermanent > 0) { inventory.RemoveItemPermanent(Items.HealingPotionConsumed, itemCountPermanent); inventory.GiveItemPermanent(Items.HealingPotion, itemCountPermanent); CharacterMasterNotificationQueue.SendTransformNotification(instance.master, Items.HealingPotionConsumed.itemIndex, Items.HealingPotion.itemIndex, (TransformationType)0); } int itemCountPermanent2 = inventory.GetItemCountPermanent(Items.ExtraLifeConsumed); if (itemCountPermanent2 > 0) { inventory.RemoveItemPermanent(Items.ExtraLifeConsumed, itemCountPermanent2); inventory.GiveItemPermanent(Items.ExtraLife, itemCountPermanent2); CharacterMasterNotificationQueue.SendTransformNotification(instance.master, Items.ExtraLifeConsumed.itemIndex, Items.ExtraLife.itemIndex, (TransformationType)0); } } } } } }