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 vinestweaks v0.5.0
vinestweaks.dll
Decompiled 2 weeks 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.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Configuration; using Microsoft.CodeAnalysis; using On.RoR2; using On.RoR2.Projectile; using R2API; using RiskOfOptions; using RiskOfOptions.OptionConfigs; using RiskOfOptions.Options; using RoR2; using RoR2.Projectile; using UnityEngine; using UnityEngine.Networking; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("VGMWorld")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyDescription("Adds Risk of Rain 2 artifacts and some other challenging tweaks. Highly configurable.")] [assembly: AssemblyFileVersion("0.5.0.0")] [assembly: AssemblyInformationalVersion("0.5.0")] [assembly: AssemblyProduct("vinestweaks")] [assembly: AssemblyTitle("vinestweaks")] [assembly: AssemblyVersion("0.5.0.0")] [module: RefSafetyRules(11)] 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; } } [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace VGMWorld.RiskOfRain2.VinesTweaks { [BepInPlugin("com.vgmworld.vinestweaks", "VinesTweaks", "0.5.0")] [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.*/)] [BepInProcess("Risk of Rain 2.exe")] public sealed class VinesTweaksPlugin : BaseUnityPlugin { private struct DamageBudget { public float WindowStart; public float DamageUsed; } private struct UndyingState { public float ExpireTime; public float NextPulseTime; public CharacterBody Body; } private struct SurvivalInstinctState { public float ExpireTime; public float CooldownUntil; public CharacterBody Body; } private enum ArtifactGlyph { RewardingVines, Recalibration, Undying, SurvivalInstinct, ScrappyBeginnings, Escalation } [CompilerGenerated] private static class <>O { public static Action<Run> <0>__OnRunStartGlobal; public static Action<DamageReport> <1>__OnCharacterDeathGlobal; public static StatHookEventHandler <2>__OnGetStatCoefficients; public static hook_TakeDamage <3>__OnTakeDamage; public static hook_OnHitEnemy <4>__OnHitEnemy; public static hook_OnInteractionBegin <5>__OnPurchaseInteractionBegin; public static hook_OnExecute <6>__OnGenericSkillExecute; public static hook_Fire <7>__OnBulletAttackFire; public static hook_Fire <8>__OnOverlapAttackFire; public static hook_FireProjectile_FireProjectileInfo <9>__OnFireProjectileInfo; public static hook_Start <10>__OnProjectileControllerStart; } public const string PluginGuid = "com.vgmworld.vinestweaks"; public const string PluginName = "VinesTweaks"; public const string PluginVersion = "0.5.0"; private const string RewardingVinesArtifactToken = "VINESTWEAKS_REWARDING_VINES"; private const string RewardingVinesArtifactNameToken = "ARTIFACT_VINESTWEAKS_REWARDING_VINES_NAME"; private const string RewardingVinesArtifactDescriptionToken = "ARTIFACT_VINESTWEAKS_REWARDING_VINES_DESCRIPTION"; private const string RewardingVinesWhiteRewardChatToken = "VINESTWEAKS_REWARDING_VINES_WHITE_REWARD_CHAT"; private const string RewardingVinesRedRewardChatToken = "VINESTWEAKS_REWARDING_VINES_RED_REWARD_CHAT"; private const string BloodTitheRewardChatToken = "VINESTWEAKS_BLOOD_TITHE_REWARD_CHAT"; private const string BloodInsuranceChatToken = "VINESTWEAKS_BLOOD_INSURANCE_CHAT"; private const string RecalibrationArtifactToken = "VINESTWEAKS_RECALIBRATION"; private const string RecalibrationArtifactNameToken = "ARTIFACT_VINESTWEAKS_RECALIBRATION_NAME"; private const string RecalibrationArtifactDescriptionToken = "ARTIFACT_VINESTWEAKS_RECALIBRATION_DESCRIPTION"; private const string UndyingArtifactToken = "VINESTWEAKS_UNDYING"; private const string UndyingArtifactNameToken = "ARTIFACT_VINESTWEAKS_UNDYING_NAME"; private const string UndyingArtifactDescriptionToken = "ARTIFACT_VINESTWEAKS_UNDYING_DESCRIPTION"; private const string UndyingBuffToken = "VINESTWEAKS_UNDYING_BUFF"; private const string UndyingBuffNameToken = "VINESTWEAKS_UNDYING_BUFF_NAME"; private const string SurvivalInstinctArtifactToken = "VINESTWEAKS_SURVIVAL_INSTINCT"; private const string SurvivalInstinctArtifactNameToken = "ARTIFACT_VINESTWEAKS_SURVIVAL_INSTINCT_NAME"; private const string SurvivalInstinctArtifactDescriptionToken = "ARTIFACT_VINESTWEAKS_SURVIVAL_INSTINCT_DESCRIPTION"; private const string ScrappyBeginningsArtifactToken = "VINESTWEAKS_SCRAPPY_BEGINNINGS"; private const string ScrappyBeginningsArtifactNameToken = "ARTIFACT_VINESTWEAKS_SCRAPPY_BEGINNINGS_NAME"; private const string ScrappyBeginningsArtifactDescriptionToken = "ARTIFACT_VINESTWEAKS_SCRAPPY_BEGINNINGS_DESCRIPTION"; private const string EscalationArtifactToken = "VINESTWEAKS_ESCALATION"; private const string EscalationArtifactNameToken = "ARTIFACT_VINESTWEAKS_ESCALATION_NAME"; private const string EscalationArtifactDescriptionToken = "ARTIFACT_VINESTWEAKS_ESCALATION_DESCRIPTION"; private const string GChickenBoosterItemToken = "VINESTWEAKS_G_CHICKEN_BOOSTER"; private const string GChickenBoosterNameToken = "ITEM_VINESTWEAKS_G_CHICKEN_BOOSTER_NAME"; private const string GChickenBoosterPickupToken = "ITEM_VINESTWEAKS_G_CHICKEN_BOOSTER_PICKUP"; private const string GChickenBoosterDescriptionToken = "ITEM_VINESTWEAKS_G_CHICKEN_BOOSTER_DESCRIPTION"; private const string GChickenBoosterLoreToken = "ITEM_VINESTWEAKS_G_CHICKEN_BOOSTER_LORE"; private const string DeflectiveYolkItemToken = "VINESTWEAKS_DEFLECTIVE_YOLK"; private const string DeflectiveYolkNameToken = "ITEM_VINESTWEAKS_DEFLECTIVE_YOLK_NAME"; private const string DeflectiveYolkPickupToken = "ITEM_VINESTWEAKS_DEFLECTIVE_YOLK_PICKUP"; private const string DeflectiveYolkDescriptionToken = "ITEM_VINESTWEAKS_DEFLECTIVE_YOLK_DESCRIPTION"; private const string DeflectiveYolkLoreToken = "ITEM_VINESTWEAKS_DEFLECTIVE_YOLK_LORE"; private const string ReachWaxItemToken = "VINESTWEAKS_REACH_WAX"; private const string ReachWaxNameToken = "ITEM_VINESTWEAKS_REACH_WAX_NAME"; private const string ReachWaxPickupToken = "ITEM_VINESTWEAKS_REACH_WAX_PICKUP"; private const string ReachWaxDescriptionToken = "ITEM_VINESTWEAKS_REACH_WAX_DESCRIPTION"; private const string ReachWaxLoreToken = "ITEM_VINESTWEAKS_REACH_WAX_LORE"; private const string BroadleafGripItemToken = "VINESTWEAKS_BROADLEAF_GRIP"; private const string BroadleafGripNameToken = "ITEM_VINESTWEAKS_BROADLEAF_GRIP_NAME"; private const string BroadleafGripPickupToken = "ITEM_VINESTWEAKS_BROADLEAF_GRIP_PICKUP"; private const string BroadleafGripDescriptionToken = "ITEM_VINESTWEAKS_BROADLEAF_GRIP_DESCRIPTION"; private const string BroadleafGripLoreToken = "ITEM_VINESTWEAKS_BROADLEAF_GRIP_LORE"; private const float PrimaryRangeWindowSeconds = 0.5f; private static ArtifactDef? rewardingVinesArtifact; private static ArtifactDef? recalibrationArtifact; private static ArtifactDef? undyingArtifact; private static ArtifactDef? survivalInstinctArtifact; private static ArtifactDef? scrappyBeginningsArtifact; private static ArtifactDef? escalationArtifact; private static ItemDef? gChickenBoosterItem; private static ItemDef? deflectiveYolkItem; private static ItemDef? reachWaxItem; private static ItemDef? broadleafGripItem; private static ConfigEntry<float>? monsterDropChance; private static ConfigEntry<float>? eliteDropChance; private static ConfigEntry<float>? bossExtraDropChance; private static ConfigEntry<int>? earlyWhiteLevelCount; private static ConfigEntry<float>? earlyWhiteDropChance; private static ConfigEntry<int>? redTierLevelThreshold; private static ConfigEntry<float>? redTierDropChance; private static ConfigEntry<float>? commonTierWeight; private static ConfigEntry<float>? uncommonTierWeight; private static ConfigEntry<float>? legendaryTierWeight; private static ConfigEntry<float>? dropUpVelocity; private static ConfigEntry<float>? dropSideVelocity; private static ConfigEntry<int>? maxRewardingVinesKillDropsPerSecond; private static ConfigEntry<float>? visualEffectThrottleSeconds; private static ConfigEntry<float>? commonDirectDamageCap; private static ConfigEntry<float>? eliteDirectDamageCap; private static ConfigEntry<float>? bossDirectDamageCap; private static ConfigEntry<float>? procDamageMultiplier; private static ConfigEntry<float>? procDamageCap; private static ConfigEntry<float>? damageBudgetWindow; private static ConfigEntry<bool>? showRecalibrationEffect; private static ConfigEntry<float>? commonUndyingSeconds; private static ConfigEntry<float>? eliteUndyingSeconds; private static ConfigEntry<float>? bossUndyingSeconds; private static ConfigEntry<float>? undyingPulseInterval; private static ConfigEntry<bool>? showUndyingEffect; private static ConfigEntry<float>? survivalCommonTriggerPercent; private static ConfigEntry<float>? survivalEliteTriggerPercent; private static ConfigEntry<float>? survivalBossTriggerPercent; private static ConfigEntry<float>? survivalDamageReductionPercent; private static ConfigEntry<float>? survivalDurationSeconds; private static ConfigEntry<float>? survivalCooldownSeconds; private static ConfigEntry<bool>? showSurvivalInstinctEffect; private static ConfigEntry<int>? scrappyProtectedStages; private static ConfigEntry<float>? scrappyDamageReductionPercent; private static ConfigEntry<bool>? showScrappyEffect; private static ConfigEntry<int>? escalationStartStage; private static ConfigEntry<float>? escalationDamageReductionPerStagePercent; private static ConfigEntry<float>? escalationEliteBonusPercent; private static ConfigEntry<float>? escalationBossBonusPercent; private static ConfigEntry<float>? escalationMaximumReductionPercent; private static ConfigEntry<bool>? showEscalationEffect; private static ConfigEntry<bool>? sanguineBargainsEnabled; private static ConfigEntry<float>? bloodTitheThresholdPercent; private static ConfigEntry<float>? bloodTitheRewardChancePercent; private static ConfigEntry<float>? bloodTitheGreenChancePercent; private static ConfigEntry<float>? bloodTitheRedChancePercent; private static ConfigEntry<int>? maxBloodTitheRewardsPerUse; private static ConfigEntry<bool>? bloodInsuranceEnabled; private static ConfigEntry<float>? bloodInsuranceHealthThresholdPercent; private static ConfigEntry<float>? bloodInsuranceBarrierPercent; private static ConfigEntry<bool>? showSanguineBargainsEffect; private static ConfigEntry<bool>? enableVinesTweaksItems; private static ConfigEntry<float>? gChickenBoosterCritChanceBase; private static ConfigEntry<float>? gChickenBoosterCritChanceStack; private static ConfigEntry<float>? gChickenBoosterCritDamageBase; private static ConfigEntry<float>? gChickenBoosterCritDamageStack; private static ConfigEntry<float>? deflectiveYolkCritChanceBase; private static ConfigEntry<float>? deflectiveYolkCritChanceStack; private static ConfigEntry<float>? deflectiveYolkBarrierBase; private static ConfigEntry<float>? deflectiveYolkBarrierStack; private static ConfigEntry<float>? deflectiveYolkBarrierCooldown; private static ConfigEntry<float>? reachWaxRangeBase; private static ConfigEntry<float>? reachWaxRangeStack; private static ConfigEntry<float>? reachWaxMeleeMultiplier; private static ConfigEntry<float>? broadleafGripRangeBase; private static ConfigEntry<float>? broadleafGripCoverageBaseDegrees; private static ConfigEntry<float>? broadleafGripCoverageStackDegrees; private static ConfigEntry<float>? broadleafGripMeleeMultiplier; private static ConfigEntry<bool>? debugLogging; private static int lastRewardedWhiteLevel; private static int lastRewardedRedTierMilestone; private static VinesTweaksPlugin? instance; private static GameObject? recalibrationImpactEffectPrefab; private static GameObject? damageRejectedEffectPrefab; private static GameObject? undyingPulseEffectPrefab; private static GameObject? survivalInstinctEffectPrefab; private static GameObject? scrappyBeginningsEffectPrefab; private static GameObject? escalationEffectPrefab; private static GameObject? sanguineBargainsEffectPrefab; private static BuffDef? undyingImmuneBuffDef; private static BuffDef? undyingVisibleBuffDef; private static bool forcingUndyingDeath; private static float rewardingVinesKillDropWindowStart; private static int rewardingVinesKillDropsInWindow; private static float nextVisualEffectTime; private static readonly Dictionary<HealthComponent, DamageBudget> recalibrationBudgets = new Dictionary<HealthComponent, DamageBudget>(); private static readonly Dictionary<HealthComponent, UndyingState> undyingMonsters = new Dictionary<HealthComponent, UndyingState>(); private static readonly HashSet<HealthComponent> spentUndyingMonsters = new HashSet<HealthComponent>(); private static readonly Dictionary<HealthComponent, SurvivalInstinctState> survivalInstinctMonsters = new Dictionary<HealthComponent, SurvivalInstinctState>(); private static readonly Dictionary<CharacterMaster, float> bloodTitheProgress = new Dictionary<CharacterMaster, float>(); private static readonly Dictionary<CharacterBody, float> deflectiveYolkCooldowns = new Dictionary<CharacterBody, float>(); private static readonly Dictionary<GameObject, float> primaryRangeWindows = new Dictionary<GameObject, float>(); private static readonly List<GameObject> primaryWindowCleanupBuffer = new List<GameObject>(); private static readonly List<HealthComponent> undyingBuffer = new List<HealthComponent>(); private static readonly List<HealthComponent> survivalInstinctBuffer = new List<HealthComponent>(); private void Awake() { //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown //IL_009a: 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_00a5: Expected O, but got Unknown //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Expected O, but got Unknown //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_00e5: Expected O, but got Unknown //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Expected O, but got Unknown //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Expected O, but got Unknown //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Expected O, but got Unknown //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Expected O, but got Unknown //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Expected O, but got Unknown instance = this; CreateConfig(); RegisterRiskOfOptions(); RegisterArtifacts(); RegisterItems(); EnsureVisualEffectPrefabs(); undyingImmuneBuffDef = Buffs.Immune; Run.onRunStartGlobal += OnRunStartGlobal; GlobalEventManager.onCharacterDeathGlobal += OnCharacterDeathGlobal; object obj = <>O.<2>__OnGetStatCoefficients; if (obj == null) { StatHookEventHandler val = OnGetStatCoefficients; <>O.<2>__OnGetStatCoefficients = val; obj = (object)val; } RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj; object obj2 = <>O.<3>__OnTakeDamage; if (obj2 == null) { hook_TakeDamage val2 = OnTakeDamage; <>O.<3>__OnTakeDamage = val2; obj2 = (object)val2; } HealthComponent.TakeDamage += (hook_TakeDamage)obj2; object obj3 = <>O.<4>__OnHitEnemy; if (obj3 == null) { hook_OnHitEnemy val3 = OnHitEnemy; <>O.<4>__OnHitEnemy = val3; obj3 = (object)val3; } GlobalEventManager.OnHitEnemy += (hook_OnHitEnemy)obj3; object obj4 = <>O.<5>__OnPurchaseInteractionBegin; if (obj4 == null) { hook_OnInteractionBegin val4 = OnPurchaseInteractionBegin; <>O.<5>__OnPurchaseInteractionBegin = val4; obj4 = (object)val4; } PurchaseInteraction.OnInteractionBegin += (hook_OnInteractionBegin)obj4; object obj5 = <>O.<6>__OnGenericSkillExecute; if (obj5 == null) { hook_OnExecute val5 = OnGenericSkillExecute; <>O.<6>__OnGenericSkillExecute = val5; obj5 = (object)val5; } GenericSkill.OnExecute += (hook_OnExecute)obj5; object obj6 = <>O.<7>__OnBulletAttackFire; if (obj6 == null) { hook_Fire val6 = OnBulletAttackFire; <>O.<7>__OnBulletAttackFire = val6; obj6 = (object)val6; } BulletAttack.Fire += (hook_Fire)obj6; object obj7 = <>O.<8>__OnOverlapAttackFire; if (obj7 == null) { hook_Fire val7 = OnOverlapAttackFire; <>O.<8>__OnOverlapAttackFire = val7; obj7 = (object)val7; } OverlapAttack.Fire += (hook_Fire)obj7; object obj8 = <>O.<9>__OnFireProjectileInfo; if (obj8 == null) { hook_FireProjectile_FireProjectileInfo val8 = OnFireProjectileInfo; <>O.<9>__OnFireProjectileInfo = val8; obj8 = (object)val8; } ProjectileManager.FireProjectile_FireProjectileInfo += (hook_FireProjectile_FireProjectileInfo)obj8; object obj9 = <>O.<10>__OnProjectileControllerStart; if (obj9 == null) { hook_Start val9 = OnProjectileControllerStart; <>O.<10>__OnProjectileControllerStart = val9; obj9 = (object)val9; } ProjectileController.Start += (hook_Start)obj9; ((BaseUnityPlugin)this).Logger.LogInfo((object)"VinesTweaks loaded. Enable any VinesTweaks artifact to activate its effect."); } private void OnDestroy() { //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown //IL_0070: 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_007b: Expected O, but got Unknown //IL_0090: 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_009b: Expected O, but got Unknown //IL_00b0: 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_00bb: Expected O, but got Unknown //IL_00d0: 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: Expected O, but got Unknown //IL_00f0: 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) //IL_00fb: Expected O, but got Unknown //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Expected O, but got Unknown //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Expected O, but got Unknown //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Expected O, but got Unknown Run.onRunStartGlobal -= OnRunStartGlobal; GlobalEventManager.onCharacterDeathGlobal -= OnCharacterDeathGlobal; object obj = <>O.<2>__OnGetStatCoefficients; if (obj == null) { StatHookEventHandler val = OnGetStatCoefficients; <>O.<2>__OnGetStatCoefficients = val; obj = (object)val; } RecalculateStatsAPI.GetStatCoefficients -= (StatHookEventHandler)obj; object obj2 = <>O.<3>__OnTakeDamage; if (obj2 == null) { hook_TakeDamage val2 = OnTakeDamage; <>O.<3>__OnTakeDamage = val2; obj2 = (object)val2; } HealthComponent.TakeDamage -= (hook_TakeDamage)obj2; object obj3 = <>O.<4>__OnHitEnemy; if (obj3 == null) { hook_OnHitEnemy val3 = OnHitEnemy; <>O.<4>__OnHitEnemy = val3; obj3 = (object)val3; } GlobalEventManager.OnHitEnemy -= (hook_OnHitEnemy)obj3; object obj4 = <>O.<5>__OnPurchaseInteractionBegin; if (obj4 == null) { hook_OnInteractionBegin val4 = OnPurchaseInteractionBegin; <>O.<5>__OnPurchaseInteractionBegin = val4; obj4 = (object)val4; } PurchaseInteraction.OnInteractionBegin -= (hook_OnInteractionBegin)obj4; object obj5 = <>O.<6>__OnGenericSkillExecute; if (obj5 == null) { hook_OnExecute val5 = OnGenericSkillExecute; <>O.<6>__OnGenericSkillExecute = val5; obj5 = (object)val5; } GenericSkill.OnExecute -= (hook_OnExecute)obj5; object obj6 = <>O.<7>__OnBulletAttackFire; if (obj6 == null) { hook_Fire val6 = OnBulletAttackFire; <>O.<7>__OnBulletAttackFire = val6; obj6 = (object)val6; } BulletAttack.Fire -= (hook_Fire)obj6; object obj7 = <>O.<8>__OnOverlapAttackFire; if (obj7 == null) { hook_Fire val7 = OnOverlapAttackFire; <>O.<8>__OnOverlapAttackFire = val7; obj7 = (object)val7; } OverlapAttack.Fire -= (hook_Fire)obj7; object obj8 = <>O.<9>__OnFireProjectileInfo; if (obj8 == null) { hook_FireProjectile_FireProjectileInfo val8 = OnFireProjectileInfo; <>O.<9>__OnFireProjectileInfo = val8; obj8 = (object)val8; } ProjectileManager.FireProjectile_FireProjectileInfo -= (hook_FireProjectile_FireProjectileInfo)obj8; object obj9 = <>O.<10>__OnProjectileControllerStart; if (obj9 == null) { hook_Start val9 = OnProjectileControllerStart; <>O.<10>__OnProjectileControllerStart = val9; obj9 = (object)val9; } ProjectileController.Start -= (hook_Start)obj9; instance = null; } private void FixedUpdate() { TryDropRewardingVinesLevelRewards(); CleanupPrimaryRangeWindows(); if (!NetworkServer.active || undyingMonsters.Count == 0) { CleanupSurvivalInstinctStates(); return; } undyingBuffer.Clear(); foreach (KeyValuePair<HealthComponent, UndyingState> undyingMonster in undyingMonsters) { undyingBuffer.Add(undyingMonster.Key); } foreach (HealthComponent item in undyingBuffer) { if (!Object.op_Implicit((Object)(object)item) || !undyingMonsters.TryGetValue(item, out var value)) { undyingMonsters.Remove(item); continue; } CharacterBody val = (CharacterBody)(Object.op_Implicit((Object)(object)value.Body) ? ((object)value.Body) : ((object)item.body)); if (!Object.op_Implicit((Object)(object)val) || !item.alive) { RemoveUndyingBuff(val); undyingMonsters.Remove(item); continue; } ConfigEntry<bool>? obj = showUndyingEffect; if (obj != null && obj.Value && Time.time >= value.NextPulseTime) { SpawnUndyingPulse(val); value.NextPulseTime = Time.time + Mathf.Max(0.05f, undyingPulseInterval.Value); undyingMonsters[item] = value; } if (Time.time >= value.ExpireTime) { undyingMonsters.Remove(item); RemoveUndyingBuff(val); ForceKillUndyingMonster(item, val); } } CleanupSurvivalInstinctStates(); } private void CreateConfig() { monsterDropChance = ((BaseUnityPlugin)this).Config.Bind<float>("Rewarding Vines", "Monster drop chance percent", 0.3f, "Percent chance for a non-elite, non-boss monster kill to drop a normal weighted item while the artifact is enabled."); eliteDropChance = ((BaseUnityPlugin)this).Config.Bind<float>("Rewarding Vines", "Elite drop chance percent", 1f, "Percent chance for an elite monster kill to drop a normal weighted item while the artifact is enabled."); bossExtraDropChance = ((BaseUnityPlugin)this).Config.Bind<float>("Rewarding Vines", "Boss extra drop chance percent", 10f, "Percent chance for a boss/champion monster kill to drop an extra normal weighted item while the artifact is enabled."); earlyWhiteLevelCount = ((BaseUnityPlugin)this).Config.Bind<int>("Rewarding Vines", "Early white item level count", 5, "First N player team level-ups that grant a white-tier item while the artifact is enabled. Set to 0 to disable."); earlyWhiteDropChance = ((BaseUnityPlugin)this).Config.Bind<float>("Rewarding Vines", "Early white item chance percent", 100f, "Percent chance to drop a white-tier item for each early player team level reward."); redTierLevelThreshold = ((BaseUnityPlugin)this).Config.Bind<int>("Rewarding Vines", "Player level red tier threshold", 25, "Player team level required before the red tier drop roll can happen."); redTierDropChance = ((BaseUnityPlugin)this).Config.Bind<float>("Rewarding Vines", "Red tier milestone chance percent", 100f, "Percent chance to drop a red-tier item when the player team reaches each configured level milestone."); commonTierWeight = ((BaseUnityPlugin)this).Config.Bind<float>("Item Tier Weights", "Common tier weight", 79f, "Relative weight for common items when a normal weighted item drops."); uncommonTierWeight = ((BaseUnityPlugin)this).Config.Bind<float>("Item Tier Weights", "Uncommon tier weight", 20f, "Relative weight for uncommon items when a normal weighted item drops."); legendaryTierWeight = ((BaseUnityPlugin)this).Config.Bind<float>("Item Tier Weights", "Legendary tier weight", 1f, "Relative weight for legendary items when a normal weighted item drops."); dropUpVelocity = ((BaseUnityPlugin)this).Config.Bind<float>("Drop Physics", "Upward drop velocity", 20f, "Vertical launch velocity for item drops."); dropSideVelocity = ((BaseUnityPlugin)this).Config.Bind<float>("Drop Physics", "Side drop velocity", 5f, "Sideways launch velocity for item drops."); maxRewardingVinesKillDropsPerSecond = ((BaseUnityPlugin)this).Config.Bind<int>("Safety Limits", "Max Rewarding Vines kill drops per second", 8, "Maximum random monster-kill item drops Artifact of Rewarding Vines can create per real-time second. Milestone, Blood Tithe, and other direct rewards are not counted."); visualEffectThrottleSeconds = ((BaseUnityPlugin)this).Config.Bind<float>("Safety Limits", "Visual effect throttle seconds", 0.08f, "Minimum seconds between non-essential VinesTweaks visual feedback effects. Set to 0 to disable throttling."); commonDirectDamageCap = ((BaseUnityPlugin)this).Config.Bind<float>("Recalibration", "Common direct damage cap", 0.5f, "Maximum fraction of a common monster's max health that one direct player hit can remove."); eliteDirectDamageCap = ((BaseUnityPlugin)this).Config.Bind<float>("Recalibration", "Elite direct damage cap", 0.15f, "Maximum fraction of an elite monster's max health that one direct player hit can remove."); bossDirectDamageCap = ((BaseUnityPlugin)this).Config.Bind<float>("Recalibration", "Boss direct damage cap", 0.03f, "Maximum fraction of a boss/champion monster's max health that one direct player hit can remove."); procDamageMultiplier = ((BaseUnityPlugin)this).Config.Bind<float>("Recalibration", "Passive proc damage multiplier", 0.15f, "Damage multiplier for low-proc-coefficient item chains while Artifact of Recalibration is enabled."); procDamageCap = ((BaseUnityPlugin)this).Config.Bind<float>("Recalibration", "Passive proc damage cap", 0.02f, "Maximum fraction of a monster's max health that one passive proc-chain hit can remove."); damageBudgetWindow = ((BaseUnityPlugin)this).Config.Bind<float>("Recalibration", "Direct damage budget window seconds", 0.1f, "Short per-target window where rapid direct hits share the same damage cap budget."); showRecalibrationEffect = ((BaseUnityPlugin)this).Config.Bind<bool>("Recalibration", "Show recalibration impact effect", true, "Show a distinct impact effect when Artifact of Recalibration reduces incoming damage."); commonUndyingSeconds = ((BaseUnityPlugin)this).Config.Bind<float>("Undying", "Common undying seconds", 1.5f, "Seconds a common monster remains alive and immune at 1 HP after taking lethal damage."); eliteUndyingSeconds = ((BaseUnityPlugin)this).Config.Bind<float>("Undying", "Elite undying seconds", 4f, "Seconds an elite monster remains alive and immune at 1 HP after taking lethal damage."); bossUndyingSeconds = ((BaseUnityPlugin)this).Config.Bind<float>("Undying", "Boss undying seconds", 8f, "Seconds a boss/champion monster remains alive and immune at 1 HP after taking lethal damage."); undyingPulseInterval = ((BaseUnityPlugin)this).Config.Bind<float>("Undying", "Undying visual pulse interval seconds", 0.35f, "Seconds between visual pulses on monsters during their undying immune period."); showUndyingEffect = ((BaseUnityPlugin)this).Config.Bind<bool>("Undying", "Show undying visual effect", true, "Show repeated visual pulses while a monster is in its undying immune period."); survivalCommonTriggerPercent = ((BaseUnityPlugin)this).Config.Bind<float>("Survival Instinct", "Common trigger damage percent", 35f, "Percent of max health a common monster must take in one hit before gaining temporary damage resistance."); survivalEliteTriggerPercent = ((BaseUnityPlugin)this).Config.Bind<float>("Survival Instinct", "Elite trigger damage percent", 20f, "Percent of max health an elite monster must take in one hit before gaining temporary damage resistance."); survivalBossTriggerPercent = ((BaseUnityPlugin)this).Config.Bind<float>("Survival Instinct", "Boss trigger damage percent", 8f, "Percent of max health a boss/champion monster must take in one hit before gaining temporary damage resistance."); survivalDamageReductionPercent = ((BaseUnityPlugin)this).Config.Bind<float>("Survival Instinct", "Damage reduction percent", 45f, "Percent of incoming damage prevented while Survival Instinct is active."); survivalDurationSeconds = ((BaseUnityPlugin)this).Config.Bind<float>("Survival Instinct", "Resistance duration seconds", 1.25f, "Seconds temporary damage resistance lasts after Survival Instinct triggers."); survivalCooldownSeconds = ((BaseUnityPlugin)this).Config.Bind<float>("Survival Instinct", "Per monster cooldown seconds", 4f, "Seconds before the same monster can trigger Survival Instinct again."); showSurvivalInstinctEffect = ((BaseUnityPlugin)this).Config.Bind<bool>("Survival Instinct", "Show survival instinct effect", true, "Show a defensive flash when Survival Instinct reduces damage or activates."); scrappyProtectedStages = ((BaseUnityPlugin)this).Config.Bind<int>("Scrappy Beginnings", "Protected stage count", 2, "Number of early stages where players receive damage reduction."); scrappyDamageReductionPercent = ((BaseUnityPlugin)this).Config.Bind<float>("Scrappy Beginnings", "Player damage reduction percent", 20f, "Percent of incoming player damage prevented during protected early stages."); showScrappyEffect = ((BaseUnityPlugin)this).Config.Bind<bool>("Scrappy Beginnings", "Show scrappy protection effect", false, "Show a defensive flash when Scrappy Beginnings reduces player damage."); escalationStartStage = ((BaseUnityPlugin)this).Config.Bind<int>("Escalation", "Start stage", 5, "One-based stage number where Artifact of Escalation begins reducing damage dealt to monsters."); escalationDamageReductionPerStagePercent = ((BaseUnityPlugin)this).Config.Bind<float>("Escalation", "Damage reduction per stage percent", 3f, "Additional monster damage reduction gained per stage after escalation starts."); escalationEliteBonusPercent = ((BaseUnityPlugin)this).Config.Bind<float>("Escalation", "Elite bonus reduction percent", 5f, "Extra damage reduction for elites after escalation starts."); escalationBossBonusPercent = ((BaseUnityPlugin)this).Config.Bind<float>("Escalation", "Boss bonus reduction percent", 12f, "Extra damage reduction for bosses/champions after escalation starts."); escalationMaximumReductionPercent = ((BaseUnityPlugin)this).Config.Bind<float>("Escalation", "Maximum reduction percent", 60f, "Maximum total damage reduction Artifact of Escalation can apply."); showEscalationEffect = ((BaseUnityPlugin)this).Config.Bind<bool>("Escalation", "Show escalation effect", true, "Show an impact flash when Artifact of Escalation reduces damage."); sanguineBargainsEnabled = ((BaseUnityPlugin)this).Config.Bind<bool>("Sanguine Bargains", "Enable blood shrine tweak", true, "Enable extra Blood Shrine rewards and optional low-health insurance."); bloodTitheThresholdPercent = ((BaseUnityPlugin)this).Config.Bind<float>("Sanguine Bargains", "Blood tithe threshold percent", 50f, "Cumulative percent of max health sacrificed at Blood Shrines before a reward roll is earned."); bloodTitheRewardChancePercent = ((BaseUnityPlugin)this).Config.Bind<float>("Sanguine Bargains", "Blood tithe reward chance percent", 100f, "Percent chance to drop an item each time the Blood Tithe threshold is reached."); bloodTitheGreenChancePercent = ((BaseUnityPlugin)this).Config.Bind<float>("Sanguine Bargains", "Blood tithe green chance percent", 25f, "Percent chance for a Blood Tithe reward to use the green item drop list instead of white."); bloodTitheRedChancePercent = ((BaseUnityPlugin)this).Config.Bind<float>("Sanguine Bargains", "Blood tithe red chance percent", 2f, "Percent chance for a Blood Tithe reward to use the red item drop list instead of white or green."); maxBloodTitheRewardsPerUse = ((BaseUnityPlugin)this).Config.Bind<int>("Sanguine Bargains", "Max Blood Tithe rewards per shrine use", 3, "Maximum Blood Tithe item rewards one Blood Shrine interaction can create. Excess progress is discarded to prevent item bursts from extreme config values."); bloodInsuranceEnabled = ((BaseUnityPlugin)this).Config.Bind<bool>("Sanguine Bargains", "Enable blood insurance barrier", true, "Grant temporary barrier if a Blood Shrine leaves the player below the configured health threshold."); bloodInsuranceHealthThresholdPercent = ((BaseUnityPlugin)this).Config.Bind<float>("Sanguine Bargains", "Insurance health threshold percent", 55f, "Combined health percent at or below which Blood Insurance grants barrier after using a Blood Shrine."); bloodInsuranceBarrierPercent = ((BaseUnityPlugin)this).Config.Bind<float>("Sanguine Bargains", "Insurance barrier percent", 25f, "Barrier granted as a percent of max combined health after Blood Insurance triggers."); showSanguineBargainsEffect = ((BaseUnityPlugin)this).Config.Bind<bool>("Sanguine Bargains", "Show sanguine bargains effect", true, "Show a small impact effect when Sanguine Bargains grants a reward or barrier."); enableVinesTweaksItems = ((BaseUnityPlugin)this).Config.Bind<bool>("Items", "Enable VinesTweaks items", true, "Enable custom VinesTweaks items such as G-Chicken Booster. Changing this during a run disables item effects immediately, but fully adding or removing item drops requires a game restart."); gChickenBoosterCritChanceBase = ((BaseUnityPlugin)this).Config.Bind<float>("G-Chicken Booster", "Base crit chance percent", 8f, "Critical strike chance granted by the first G-Chicken Booster stack."); gChickenBoosterCritChanceStack = ((BaseUnityPlugin)this).Config.Bind<float>("G-Chicken Booster", "Stack crit chance percent", 5f, "Additional critical strike chance granted by each G-Chicken Booster stack after the first."); gChickenBoosterCritDamageBase = ((BaseUnityPlugin)this).Config.Bind<float>("G-Chicken Booster", "Base crit damage percent", 6f, "Additional critical strike damage granted by the first G-Chicken Booster stack. This adds to the crit multiplier, so 6 means 200% crits become 206% crits."); gChickenBoosterCritDamageStack = ((BaseUnityPlugin)this).Config.Bind<float>("G-Chicken Booster", "Stack crit damage percent", 5f, "Additional critical strike damage granted by each G-Chicken Booster stack after the first."); deflectiveYolkCritChanceBase = ((BaseUnityPlugin)this).Config.Bind<float>("Deflective Yolk", "Base crit chance percent", 14f, "Critical strike chance granted by the first Deflective Yolk stack."); deflectiveYolkCritChanceStack = ((BaseUnityPlugin)this).Config.Bind<float>("Deflective Yolk", "Stack crit chance percent", 5f, "Additional critical strike chance granted by each Deflective Yolk stack after the first."); deflectiveYolkBarrierBase = ((BaseUnityPlugin)this).Config.Bind<float>("Deflective Yolk", "Base barrier percent", 3f, "Temporary barrier gained from a critical hit as a percent of maximum combined health for the first Deflective Yolk stack."); deflectiveYolkBarrierStack = ((BaseUnityPlugin)this).Config.Bind<float>("Deflective Yolk", "Stack barrier percent", 3f, "Additional temporary barrier percent gained from each Deflective Yolk stack after the first."); deflectiveYolkBarrierCooldown = ((BaseUnityPlugin)this).Config.Bind<float>("Deflective Yolk", "Barrier cooldown seconds", 0.25f, "Minimum seconds between Deflective Yolk barrier grants for the same player. Set to 0 to allow every critical hit."); reachWaxRangeBase = ((BaseUnityPlugin)this).Config.Bind<float>("Reach Wax", "Base primary range percent", 30f, "Primary attack range gained from the first Reach Wax stack."); reachWaxRangeStack = ((BaseUnityPlugin)this).Config.Bind<float>("Reach Wax", "Stack primary range percent", 20f, "Additional primary attack range gained from each Reach Wax stack after the first."); reachWaxMeleeMultiplier = ((BaseUnityPlugin)this).Config.Bind<float>("Reach Wax", "Melee range multiplier", 2f, "Multiplier applied to Reach Wax's range bonus when the primary attack uses melee hitboxes."); broadleafGripRangeBase = ((BaseUnityPlugin)this).Config.Bind<float>("Broadleaf Grip", "Base primary range percent", 25f, "Primary attack range gained from Broadleaf Grip. This does not stack."); broadleafGripCoverageBaseDegrees = ((BaseUnityPlugin)this).Config.Bind<float>("Broadleaf Grip", "Base primary coverage degrees", 10f, "Primary attack coverage gained from the first Broadleaf Grip stack. Implemented as conservative hitbox, bullet radius, and projectile coverage scaling."); broadleafGripCoverageStackDegrees = ((BaseUnityPlugin)this).Config.Bind<float>("Broadleaf Grip", "Stack primary coverage degrees", 5f, "Additional primary attack coverage gained from each Broadleaf Grip stack after the first."); broadleafGripMeleeMultiplier = ((BaseUnityPlugin)this).Config.Bind<float>("Broadleaf Grip", "Melee coverage multiplier", 2f, "Multiplier applied to Broadleaf Grip's coverage bonus when the primary attack uses melee hitboxes."); debugLogging = ((BaseUnityPlugin)this).Config.Bind<bool>("Debug", "Enable debug logging", false, "Log artifact drop rolls, milestone checks, damage tuning, and artifact state changes to the BepInEx console."); } private static void RegisterRiskOfOptions() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Expected O, but got Unknown //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Expected O, but got Unknown //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Expected O, but got Unknown //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Expected O, but got Unknown //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Expected O, but got Unknown //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Expected O, but got Unknown //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Expected O, but got Unknown //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Expected O, but got Unknown //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Expected O, but got Unknown //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Expected O, but got Unknown //IL_0143: 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_0153: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Expected O, but got Unknown //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Expected O, but got Unknown //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Expected O, but got Unknown //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Expected O, but got Unknown //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Expected O, but got Unknown //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Expected O, but got Unknown //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Expected O, but got Unknown //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Expected O, but got Unknown //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Expected O, but got Unknown //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Expected O, but got Unknown //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Expected O, but got Unknown //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Expected O, but got Unknown //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02af: Expected O, but got Unknown //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: 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_02df: Expected O, but got Unknown //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Expected O, but got Unknown //IL_02e9: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Expected O, but got Unknown //IL_02f8: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_0313: Unknown result type (might be due to invalid IL or missing references) //IL_0323: Expected O, but got Unknown //IL_031e: Unknown result type (might be due to invalid IL or missing references) //IL_0328: Expected O, but got Unknown //IL_032d: Unknown result type (might be due to invalid IL or missing references) //IL_0332: 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_0348: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Expected O, but got Unknown //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_035d: Expected O, but got Unknown //IL_0362: Unknown result type (might be due to invalid IL or missing references) //IL_0367: Unknown result type (might be due to invalid IL or missing references) //IL_0372: Unknown result type (might be due to invalid IL or missing references) //IL_037d: Unknown result type (might be due to invalid IL or missing references) //IL_038d: Expected O, but got Unknown //IL_0388: Unknown result type (might be due to invalid IL or missing references) //IL_0392: Expected O, but got Unknown //IL_0397: Unknown result type (might be due to invalid IL or missing references) //IL_039c: 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) //IL_03b2: Unknown result type (might be due to invalid IL or missing references) //IL_03c2: Expected O, but got Unknown //IL_03bd: Unknown result type (might be due to invalid IL or missing references) //IL_03c7: Expected O, but got Unknown //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_03d6: Expected O, but got Unknown //IL_03ef: Unknown result type (might be due to invalid IL or missing references) //IL_03f9: Expected O, but got Unknown //IL_0412: Unknown result type (might be due to invalid IL or missing references) //IL_041c: Expected O, but got Unknown //IL_0435: Unknown result type (might be due to invalid IL or missing references) //IL_043f: Expected O, but got Unknown //IL_0458: Unknown result type (might be due to invalid IL or missing references) //IL_0462: Expected O, but got Unknown //IL_0467: Unknown result type (might be due to invalid IL or missing references) //IL_046c: Unknown result type (might be due to invalid IL or missing references) //IL_0477: Unknown result type (might be due to invalid IL or missing references) //IL_0482: Unknown result type (might be due to invalid IL or missing references) //IL_0492: Expected O, but got Unknown //IL_048d: Unknown result type (might be due to invalid IL or missing references) //IL_0497: Expected O, but got Unknown //IL_049c: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Unknown result type (might be due to invalid IL or missing references) //IL_04ac: Unknown result type (might be due to invalid IL or missing references) //IL_04b7: Unknown result type (might be due to invalid IL or missing references) //IL_04c7: Expected O, but got Unknown //IL_04c2: Unknown result type (might be due to invalid IL or missing references) //IL_04cc: Expected O, but got Unknown //IL_04d1: Unknown result type (might be due to invalid IL or missing references) //IL_04db: Expected O, but got Unknown //IL_04e0: Unknown result type (might be due to invalid IL or missing references) //IL_04e5: Unknown result type (might be due to invalid IL or missing references) //IL_04ec: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Expected O, but got Unknown //IL_04f4: Unknown result type (might be due to invalid IL or missing references) //IL_04fe: Expected O, but got Unknown //IL_0517: Unknown result type (might be due to invalid IL or missing references) //IL_0521: Expected O, but got Unknown //IL_0526: Unknown result type (might be due to invalid IL or missing references) //IL_0530: Expected O, but got Unknown //IL_0535: Unknown result type (might be due to invalid IL or missing references) //IL_053a: Unknown result type (might be due to invalid IL or missing references) //IL_0541: Unknown result type (might be due to invalid IL or missing references) //IL_054e: Expected O, but got Unknown //IL_0549: Unknown result type (might be due to invalid IL or missing references) //IL_0553: Expected O, but got Unknown //IL_056c: Unknown result type (might be due to invalid IL or missing references) //IL_0576: Expected O, but got Unknown //IL_058f: Unknown result type (might be due to invalid IL or missing references) //IL_0599: Expected O, but got Unknown //IL_05b2: Unknown result type (might be due to invalid IL or missing references) //IL_05bc: Expected O, but got Unknown //IL_05d5: Unknown result type (might be due to invalid IL or missing references) //IL_05df: Expected O, but got Unknown //IL_05e4: Unknown result type (might be due to invalid IL or missing references) //IL_05ee: Expected O, but got Unknown //IL_05f3: Unknown result type (might be due to invalid IL or missing references) //IL_05fd: Expected O, but got Unknown //IL_0616: Unknown result type (might be due to invalid IL or missing references) //IL_0620: Expected O, but got Unknown //IL_0639: Unknown result type (might be due to invalid IL or missing references) //IL_0643: Expected O, but got Unknown //IL_065c: Unknown result type (might be due to invalid IL or missing references) //IL_0666: Expected O, but got Unknown //IL_067f: Unknown result type (might be due to invalid IL or missing references) //IL_0689: Expected O, but got Unknown //IL_068e: Unknown result type (might be due to invalid IL or missing references) //IL_0693: Unknown result type (might be due to invalid IL or missing references) //IL_069a: Unknown result type (might be due to invalid IL or missing references) //IL_06a7: Expected O, but got Unknown //IL_06a2: Unknown result type (might be due to invalid IL or missing references) //IL_06ac: Expected O, but got Unknown //IL_06b1: Unknown result type (might be due to invalid IL or missing references) //IL_06bb: Expected O, but got Unknown //IL_06d4: Unknown result type (might be due to invalid IL or missing references) //IL_06de: Expected O, but got Unknown //IL_06f7: Unknown result type (might be due to invalid IL or missing references) //IL_0701: Expected O, but got Unknown //IL_0706: Unknown result type (might be due to invalid IL or missing references) //IL_0710: Expected O, but got Unknown //IL_0715: Unknown result type (might be due to invalid IL or missing references) //IL_071f: Expected O, but got Unknown //IL_0738: Unknown result type (might be due to invalid IL or missing references) //IL_0742: Expected O, but got Unknown //IL_075b: Unknown result type (might be due to invalid IL or missing references) //IL_0765: Expected O, but got Unknown //IL_077e: Unknown result type (might be due to invalid IL or missing references) //IL_0788: Expected O, but got Unknown //IL_07a1: Unknown result type (might be due to invalid IL or missing references) //IL_07ab: Expected O, but got Unknown //IL_07c4: Unknown result type (might be due to invalid IL or missing references) //IL_07ce: Expected O, but got Unknown //IL_07e7: Unknown result type (might be due to invalid IL or missing references) //IL_07f1: Expected O, but got Unknown //IL_080a: Unknown result type (might be due to invalid IL or missing references) //IL_0814: Expected O, but got Unknown //IL_082d: Unknown result type (might be due to invalid IL or missing references) //IL_0837: Expected O, but got Unknown //IL_083c: Unknown result type (might be due to invalid IL or missing references) //IL_0841: Unknown result type (might be due to invalid IL or missing references) //IL_084c: Unknown result type (might be due to invalid IL or missing references) //IL_0857: Unknown result type (might be due to invalid IL or missing references) //IL_0867: Expected O, but got Unknown //IL_0862: Unknown result type (might be due to invalid IL or missing references) //IL_086c: Expected O, but got Unknown //IL_0885: Unknown result type (might be due to invalid IL or missing references) //IL_088f: Expected O, but got Unknown //IL_08a8: Unknown result type (might be due to invalid IL or missing references) //IL_08b2: Expected O, but got Unknown //IL_08b7: Unknown result type (might be due to invalid IL or missing references) //IL_08bc: Unknown result type (might be due to invalid IL or missing references) //IL_08c7: Unknown result type (might be due to invalid IL or missing references) //IL_08d2: Unknown result type (might be due to invalid IL or missing references) //IL_08e2: Expected O, but got Unknown //IL_08dd: Unknown result type (might be due to invalid IL or missing references) //IL_08e7: Expected O, but got Unknown //IL_0900: Unknown result type (might be due to invalid IL or missing references) //IL_090a: Expected O, but got Unknown //IL_090f: Unknown result type (might be due to invalid IL or missing references) //IL_0914: Unknown result type (might be due to invalid IL or missing references) //IL_091f: Unknown result type (might be due to invalid IL or missing references) //IL_092a: Unknown result type (might be due to invalid IL or missing references) //IL_093a: Expected O, but got Unknown //IL_0935: Unknown result type (might be due to invalid IL or missing references) //IL_093f: Expected O, but got Unknown //IL_0944: Unknown result type (might be due to invalid IL or missing references) //IL_0949: Unknown result type (might be due to invalid IL or missing references) //IL_0954: Unknown result type (might be due to invalid IL or missing references) //IL_095f: Unknown result type (might be due to invalid IL or missing references) //IL_096f: Expected O, but got Unknown //IL_096a: Unknown result type (might be due to invalid IL or missing references) //IL_0974: Expected O, but got Unknown //IL_0979: Unknown result type (might be due to invalid IL or missing references) //IL_097e: Unknown result type (might be due to invalid IL or missing references) //IL_0989: Unknown result type (might be due to invalid IL or missing references) //IL_0994: Unknown result type (might be due to invalid IL or missing references) //IL_09a4: Expected O, but got Unknown //IL_099f: Unknown result type (might be due to invalid IL or missing references) //IL_09a9: Expected O, but got Unknown //IL_09ae: Unknown result type (might be due to invalid IL or missing references) //IL_09b8: Expected O, but got Unknown ModSettingsManager.SetModDescription("Adds Risk of Rain 2 artifacts and some other challenging tweaks. Highly configurable."); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(monsterDropChance, PercentSlider(0f, 10f, 0.1f))); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(eliteDropChance, PercentSlider(0f, 25f, 0.1f))); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(bossExtraDropChance, PercentSlider(0f, 100f, 0.5f))); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(earlyWhiteLevelCount, new IntSliderConfig { min = 0, max = 25 })); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(earlyWhiteDropChance, PercentSlider(0f, 100f, 1f))); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(redTierLevelThreshold, new IntSliderConfig { min = 1, max = 250 })); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(redTierDropChance, PercentSlider(0f, 100f, 1f))); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(commonTierWeight, WeightSlider())); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(uncommonTierWeight, WeightSlider())); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(legendaryTierWeight, WeightSlider())); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(dropUpVelocity, new StepSliderConfig { min = 0f, max = 60f, increment = 1f })); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(dropSideVelocity, new StepSliderConfig { min = 0f, max = 30f, increment = 1f })); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(maxRewardingVinesKillDropsPerSecond, new IntSliderConfig { min = 0, max = 100 })); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(visualEffectThrottleSeconds, new StepSliderConfig { min = 0f, max = 1f, increment = 0.01f })); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(commonDirectDamageCap, FractionSlider(0.01f, 1f, 0.01f))); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(eliteDirectDamageCap, FractionSlider(0.001f, 1f, 0.001f))); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(bossDirectDamageCap, FractionSlider(0.0001f, 1f, 0.0001f))); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(procDamageMultiplier, FractionSlider(0f, 1f, 0.01f))); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(procDamageCap, FractionSlider(0f, 1f, 0.001f))); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(damageBudgetWindow, new StepSliderConfig { min = 0f, max = 1f, increment = 0.01f })); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(showRecalibrationEffect)); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(commonUndyingSeconds, new StepSliderConfig { min = 0f, max = 30f, increment = 0.1f })); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(eliteUndyingSeconds, new StepSliderConfig { min = 0f, max = 60f, increment = 0.1f })); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(bossUndyingSeconds, new StepSliderConfig { min = 0f, max = 120f, increment = 0.5f })); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(undyingPulseInterval, new StepSliderConfig { min = 0.05f, max = 2f, increment = 0.05f })); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(showUndyingEffect)); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(survivalCommonTriggerPercent, PercentSlider(1f, 100f, 1f))); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(survivalEliteTriggerPercent, PercentSlider(1f, 100f, 1f))); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(survivalBossTriggerPercent, PercentSlider(1f, 100f, 0.5f))); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(survivalDamageReductionPercent, PercentSlider(0f, 95f, 1f))); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(survivalDurationSeconds, new StepSliderConfig { min = 0f, max = 10f, increment = 0.05f })); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(survivalCooldownSeconds, new StepSliderConfig { min = 0f, max = 30f, increment = 0.1f })); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(showSurvivalInstinctEffect)); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(scrappyProtectedStages, new IntSliderConfig { min = 0, max = 10 })); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(scrappyDamageReductionPercent, PercentSlider(0f, 80f, 1f))); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(showScrappyEffect)); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(escalationStartStage, new IntSliderConfig { min = 1, max = 20 })); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(escalationDamageReductionPerStagePercent, PercentSlider(0f, 25f, 0.5f))); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(escalationEliteBonusPercent, PercentSlider(0f, 50f, 1f))); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(escalationBossBonusPercent, PercentSlider(0f, 75f, 1f))); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(escalationMaximumReductionPercent, PercentSlider(0f, 95f, 1f))); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(showEscalationEffect)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(sanguineBargainsEnabled)); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(bloodTitheThresholdPercent, PercentSlider(10f, 500f, 10f))); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(bloodTitheRewardChancePercent, PercentSlider(0f, 100f, 1f))); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(bloodTitheGreenChancePercent, PercentSlider(0f, 100f, 1f))); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(bloodTitheRedChancePercent, PercentSlider(0f, 100f, 0.5f))); ModSettingsManager.AddOption((BaseOption)new IntSliderOption(maxBloodTitheRewardsPerUse, new IntSliderConfig { min = 0, max = 20 })); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(bloodInsuranceEnabled)); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(bloodInsuranceHealthThresholdPercent, PercentSlider(1f, 100f, 1f))); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(bloodInsuranceBarrierPercent, PercentSlider(0f, 100f, 1f))); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(showSanguineBargainsEffect)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(enableVinesTweaksItems)); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(gChickenBoosterCritChanceBase, PercentSlider(0f, 25f, 0.5f))); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(gChickenBoosterCritChanceStack, PercentSlider(0f, 25f, 0.5f))); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(gChickenBoosterCritDamageBase, PercentSlider(0f, 100f, 1f))); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(gChickenBoosterCritDamageStack, PercentSlider(0f, 100f, 1f))); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(deflectiveYolkCritChanceBase, PercentSlider(0f, 50f, 0.5f))); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(deflectiveYolkCritChanceStack, PercentSlider(0f, 50f, 0.5f))); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(deflectiveYolkBarrierBase, PercentSlider(0f, 50f, 0.5f))); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(deflectiveYolkBarrierStack, PercentSlider(0f, 50f, 0.5f))); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(deflectiveYolkBarrierCooldown, new StepSliderConfig { min = 0f, max = 2f, increment = 0.05f })); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(reachWaxRangeBase, PercentSlider(0f, 100f, 0.5f))); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(reachWaxRangeStack, PercentSlider(0f, 100f, 0.5f))); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(reachWaxMeleeMultiplier, new StepSliderConfig { min = 1f, max = 4f, increment = 0.1f })); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(broadleafGripRangeBase, PercentSlider(0f, 100f, 0.5f))); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(broadleafGripCoverageBaseDegrees, new StepSliderConfig { min = 0f, max = 45f, increment = 0.5f })); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(broadleafGripCoverageStackDegrees, new StepSliderConfig { min = 0f, max = 30f, increment = 0.5f })); ModSettingsManager.AddOption((BaseOption)new StepSliderOption(broadleafGripMeleeMultiplier, new StepSliderConfig { min = 1f, max = 4f, increment = 0.1f })); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(debugLogging)); } private static StepSliderConfig PercentSlider(float min, float max, float increment) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown return new StepSliderConfig { min = min, max = max, increment = increment }; } private static StepSliderConfig WeightSlider() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: 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_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown return new StepSliderConfig { min = 0f, max = 100f, increment = 1f }; } private static StepSliderConfig FractionSlider(float min, float max, float increment) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown return new StepSliderConfig { min = min, max = max, increment = increment }; } private static void RegisterArtifacts() { //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) LanguageAPI.Add("ARTIFACT_VINESTWEAKS_REWARDING_VINES_NAME", "Artifact of Rewarding Vines"); LanguageAPI.Add("ARTIFACT_VINESTWEAKS_REWARDING_VINES_DESCRIPTION", "Monsters can drop items. Early player levels can grant white items, and later level milestones can drop red-tier items."); LanguageAPI.Add("VINESTWEAKS_REWARDING_VINES_WHITE_REWARD_CHAT", "<color=#7ED957>Rewarding Vines</color> grants an early white item."); LanguageAPI.Add("VINESTWEAKS_REWARDING_VINES_RED_REWARD_CHAT", "<color=#7ED957>Rewarding Vines</color> grants a red-tier milestone item."); LanguageAPI.Add("VINESTWEAKS_BLOOD_TITHE_REWARD_CHAT", "<color=#7ED957>Sanguine Bargains</color> grants a Blood Tithe item."); LanguageAPI.Add("VINESTWEAKS_BLOOD_INSURANCE_CHAT", "<color=#7ED957>Sanguine Bargains</color> grants Blood Insurance barrier."); rewardingVinesArtifact = ScriptableObject.CreateInstance<ArtifactDef>(); rewardingVinesArtifact.cachedName = "VINESTWEAKS_REWARDING_VINES"; rewardingVinesArtifact.nameToken = "ARTIFACT_VINESTWEAKS_REWARDING_VINES_NAME"; rewardingVinesArtifact.descriptionToken = "ARTIFACT_VINESTWEAKS_REWARDING_VINES_DESCRIPTION"; rewardingVinesArtifact.smallIconSelectedSprite = CreateArtifactGlyphSprite(ArtifactGlyph.RewardingVines, selected: true); rewardingVinesArtifact.smallIconDeselectedSprite = CreateArtifactGlyphSprite(ArtifactGlyph.RewardingVines, selected: false); ContentAddition.AddArtifactDef(rewardingVinesArtifact); LanguageAPI.Add("ARTIFACT_VINESTWEAKS_RECALIBRATION_NAME", "Artifact of Recalibration"); LanguageAPI.Add("ARTIFACT_VINESTWEAKS_RECALIBRATION_DESCRIPTION", "Massive player hits are recalibrated against enemy threat level. Passive proc-chain damage is dampened so late-game combat stays alive."); recalibrationArtifact = ScriptableObject.CreateInstance<ArtifactDef>(); recalibrationArtifact.cachedName = "VINESTWEAKS_RECALIBRATION"; recalibrationArtifact.nameToken = "ARTIFACT_VINESTWEAKS_RECALIBRATION_NAME"; recalibrationArtifact.descriptionToken = "ARTIFACT_VINESTWEAKS_RECALIBRATION_DESCRIPTION"; recalibrationArtifact.smallIconSelectedSprite = CreateArtifactGlyphSprite(ArtifactGlyph.Recalibration, selected: true); recalibrationArtifact.smallIconDeselectedSprite = CreateArtifactGlyphSprite(ArtifactGlyph.Recalibration, selected: false); ContentAddition.AddArtifactDef(recalibrationArtifact); LanguageAPI.Add("ARTIFACT_VINESTWEAKS_UNDYING_NAME", "Artifact of Undying"); LanguageAPI.Add("ARTIFACT_VINESTWEAKS_UNDYING_DESCRIPTION", "Monsters that would die cling to 1 HP, become immune for a short duration based on threat tier, then perish when their last stand ends."); LanguageAPI.Add("VINESTWEAKS_UNDYING_BUFF_NAME", "Undying"); undyingArtifact = ScriptableObject.CreateInstance<ArtifactDef>(); undyingArtifact.cachedName = "VINESTWEAKS_UNDYING"; undyingArtifact.nameToken = "ARTIFACT_VINESTWEAKS_UNDYING_NAME"; undyingArtifact.descriptionToken = "ARTIFACT_VINESTWEAKS_UNDYING_DESCRIPTION"; undyingArtifact.smallIconSelectedSprite = CreateArtifactGlyphSprite(ArtifactGlyph.Undying, selected: true); undyingArtifact.smallIconDeselectedSprite = CreateArtifactGlyphSprite(ArtifactGlyph.Undying, selected: false); ContentAddition.AddArtifactDef(undyingArtifact); undyingVisibleBuffDef = ScriptableObject.CreateInstance<BuffDef>(); ((Object)undyingVisibleBuffDef).name = "VINESTWEAKS_UNDYING_BUFF"; undyingVisibleBuffDef.buffColor = new Color(0.49f, 0.85f, 0.34f, 1f); undyingVisibleBuffDef.canStack = false; undyingVisibleBuffDef.isDebuff = false; undyingVisibleBuffDef.iconSprite = undyingArtifact.smallIconSelectedSprite; ContentAddition.AddBuffDef(undyingVisibleBuffDef); LanguageAPI.Add("ARTIFACT_VINESTWEAKS_SURVIVAL_INSTINCT_NAME", "Artifact of Survival Instinct"); LanguageAPI.Add("ARTIFACT_VINESTWEAKS_SURVIVAL_INSTINCT_DESCRIPTION", "Monsters that survive a heavy hit briefly resist follow-up damage, making burst windows feel less absolute."); survivalInstinctArtifact = ScriptableObject.CreateInstance<ArtifactDef>(); survivalInstinctArtifact.cachedName = "VINESTWEAKS_SURVIVAL_INSTINCT"; survivalInstinctArtifact.nameToken = "ARTIFACT_VINESTWEAKS_SURVIVAL_INSTINCT_NAME"; survivalInstinctArtifact.descriptionToken = "ARTIFACT_VINESTWEAKS_SURVIVAL_INSTINCT_DESCRIPTION"; survivalInstinctArtifact.smallIconSelectedSprite = CreateArtifactGlyphSprite(ArtifactGlyph.SurvivalInstinct, selected: true); survivalInstinctArtifact.smallIconDeselectedSprite = CreateArtifactGlyphSprite(ArtifactGlyph.SurvivalInstinct, selected: false); ContentAddition.AddArtifactDef(survivalInstinctArtifact); LanguageAPI.Add("ARTIFACT_VINESTWEAKS_SCRAPPY_BEGINNINGS_NAME", "Artifact of Scrappy Beginnings"); LanguageAPI.Add("ARTIFACT_VINESTWEAKS_SCRAPPY_BEGINNINGS_DESCRIPTION", "Players take reduced damage during the opening stages, softening rough starts without changing late-game scaling."); scrappyBeginningsArtifact = ScriptableObject.CreateInstance<ArtifactDef>(); scrappyBeginningsArtifact.cachedName = "VINESTWEAKS_SCRAPPY_BEGINNINGS"; scrappyBeginningsArtifact.nameToken = "ARTIFACT_VINESTWEAKS_SCRAPPY_BEGINNINGS_NAME"; scrappyBeginningsArtifact.descriptionToken = "ARTIFACT_VINESTWEAKS_SCRAPPY_BEGINNINGS_DESCRIPTION"; scrappyBeginningsArtifact.smallIconSelectedSprite = CreateArtifactGlyphSprite(ArtifactGlyph.ScrappyBeginnings, selected: true); scrappyBeginningsArtifact.smallIconDeselectedSprite = CreateArtifactGlyphSprite(ArtifactGlyph.ScrappyBeginnings, selected: false); ContentAddition.AddArtifactDef(scrappyBeginningsArtifact); LanguageAPI.Add("ARTIFACT_VINESTWEAKS_ESCALATION_NAME", "Artifact of Escalation"); LanguageAPI.Add("ARTIFACT_VINESTWEAKS_ESCALATION_DESCRIPTION", "After the early game, monsters gain stage-scaling damage resistance. Elites and bosses resist extra punishment."); escalationArtifact = ScriptableObject.CreateInstance<ArtifactDef>(); escalationArtifact.cachedName = "VINESTWEAKS_ESCALATION"; escalationArtifact.nameToken = "ARTIFACT_VINESTWEAKS_ESCALATION_NAME"; escalationArtifact.descriptionToken = "ARTIFACT_VINESTWEAKS_ESCALATION_DESCRIPTION"; escalationArtifact.smallIconSelectedSprite = CreateArtifactGlyphSprite(ArtifactGlyph.Escalation, selected: true); escalationArtifact.smallIconDeselectedSprite = CreateArtifactGlyphSprite(ArtifactGlyph.Escalation, selected: false); ContentAddition.AddArtifactDef(escalationArtifact); } private static void RegisterItems() { ConfigEntry<bool>? obj = enableVinesTweaksItems; if (obj == null || !obj.Value) { DebugLog("VinesTweaks item registration skipped because items are disabled."); return; } LanguageAPI.Add("ITEM_VINESTWEAKS_G_CHICKEN_BOOSTER_NAME", "G-Chicken Booster"); LanguageAPI.Add("ITEM_VINESTWEAKS_G_CHICKEN_BOOSTER_PICKUP", "Increase critical strike chance and critical strike damage."); LanguageAPI.Add("ITEM_VINESTWEAKS_G_CHICKEN_BOOSTER_DESCRIPTION", "Gain <style=cIsDamage>8% critical strike chance</style> <style=cStack>(+5% per stack)</style>. Critical strikes deal <style=cIsDamage>6% more damage</style> <style=cStack>(+5% per stack)</style>."); LanguageAPI.Add("ITEM_VINESTWEAKS_G_CHICKEN_BOOSTER_LORE", "Clinically untested. Emotionally convincing."); LanguageAPI.Add("ITEM_VINESTWEAKS_DEFLECTIVE_YOLK_NAME", "Deflective Yolk"); LanguageAPI.Add("ITEM_VINESTWEAKS_DEFLECTIVE_YOLK_PICKUP", "Critical hits grant temporary barrier."); LanguageAPI.Add("ITEM_VINESTWEAKS_DEFLECTIVE_YOLK_DESCRIPTION", "Gain <style=cIsDamage>14% critical strike chance</style> <style=cStack>(+5% per stack)</style>. Critical hits grant <style=cIsHealing>temporary barrier</style> equal to <style=cIsHealing>3% of your maximum health</style> <style=cStack>(+3% per stack)</style>."); LanguageAPI.Add("ITEM_VINESTWEAKS_DEFLECTIVE_YOLK_LORE", "Crack under pressure. Shine under worse."); LanguageAPI.Add("ITEM_VINESTWEAKS_REACH_WAX_NAME", "Reach Wax"); LanguageAPI.Add("ITEM_VINESTWEAKS_REACH_WAX_PICKUP", "Primary attacks reach farther."); LanguageAPI.Add("ITEM_VINESTWEAKS_REACH_WAX_DESCRIPTION", "Increase <style=cIsUtility>primary attack range</style> by <style=cIsUtility>30%</style> <style=cStack>(+20% per stack)</style>. Melee primary hitboxes gain <style=cIsUtility>twice</style> this range bonus."); LanguageAPI.Add("ITEM_VINESTWEAKS_REACH_WAX_LORE", "Applied generously. Measured generously."); LanguageAPI.Add("ITEM_VINESTWEAKS_BROADLEAF_GRIP_NAME", "Broadleaf Grip"); LanguageAPI.Add("ITEM_VINESTWEAKS_BROADLEAF_GRIP_PICKUP", "Primary attacks cover a wider area."); LanguageAPI.Add("ITEM_VINESTWEAKS_BROADLEAF_GRIP_DESCRIPTION", "Increase <style=cIsUtility>primary attack range</style> by <style=cIsUtility>25%</style>. Primary attacks gain <style=cIsUtility>10 degrees</style> of coverage <style=cStack>(+5 degrees per stack)</style>. Melee primary hitboxes gain <style=cIsUtility>twice</style> the coverage bonus."); LanguageAPI.Add("ITEM_VINESTWEAKS_BROADLEAF_GRIP_LORE", "Grip wider. Miss smaller."); gChickenBoosterItem = RegisterCustomItem("VINESTWEAKS_G_CHICKEN_BOOSTER", "ITEM_VINESTWEAKS_G_CHICKEN_BOOSTER_NAME", "ITEM_VINESTWEAKS_G_CHICKEN_BOOSTER_DESCRIPTION", "ITEM_VINESTWEAKS_G_CHICKEN_BOOSTER_LORE", "ITEM_VINESTWEAKS_G_CHICKEN_BOOSTER_PICKUP", CreateGChickenBoosterIconSprite(), (ItemTier)0, (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }); deflectiveYolkItem = RegisterCustomItem("VINESTWEAKS_DEFLECTIVE_YOLK", "ITEM_VINESTWEAKS_DEFLECTIVE_YOLK_NAME", "ITEM_VINESTWEAKS_DEFLECTIVE_YOLK_DESCRIPTION", "ITEM_VINESTWEAKS_DEFLECTIVE_YOLK_LORE", "ITEM_VINESTWEAKS_DEFLECTIVE_YOLK_PICKUP", CreateDeflectiveYolkIconSprite(), (ItemTier)1, (ItemTag[])(object)new ItemTag[2] { (ItemTag)2, (ItemTag)3 }); reachWaxItem = RegisterCustomItem("VINESTWEAKS_REACH_WAX", "ITEM_VINESTWEAKS_REACH_WAX_NAME", "ITEM_VINESTWEAKS_REACH_WAX_DESCRIPTION", "ITEM_VINESTWEAKS_REACH_WAX_LORE", "ITEM_VINESTWEAKS_REACH_WAX_PICKUP", CreateReachWaxIconSprite(), (ItemTier)0, (ItemTag[])(object)new ItemTag[1] { (ItemTag)3 }); broadleafGripItem = RegisterCustomItem("VINESTWEAKS_BROADLEAF_GRIP", "ITEM_VINESTWEAKS_BROADLEAF_GRIP_NAME", "ITEM_VINESTWEAKS_BROADLEAF_GRIP_DESCRIPTION", "ITEM_VINESTWEAKS_BROADLEAF_GRIP_LORE", "ITEM_VINESTWEAKS_BROADLEAF_GRIP_PICKUP", CreateBroadleafGripIconSprite(), (ItemTier)1, (ItemTag[])(object)new ItemTag[1] { (ItemTag)3 }); } private static ItemDef RegisterCustomItem(string name, string nameToken, string descriptionToken, string loreToken, string pickupToken, Sprite pickupIconSprite, ItemTier tier, ItemTag[] tags) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown CustomItem val = new CustomItem(name, nameToken, descriptionToken, loreToken, pickupToken, pickupIconSprite, (GameObject)null, tier, tags, true, false, (UnlockableDef)null, new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>())); ItemAPI.Add(val); return val.ItemDef; } private static Sprite CreateGChickenBoosterIconSprite() { Sprite val = TryLoadIconSprite("g-chicken-booster-icon.png", "VinesTweaksGChickenBoosterIcon"); if ((Object)(object)val != (Object)null) { return val; } return CreateProceduralGChickenBoosterIconSprite(); } private static Sprite CreateDeflectiveYolkIconSprite() { Sprite val = TryLoadIconSprite("deflective-yolk-icon.png", "VinesTweaksDeflectiveYolkIcon"); if ((Object)(object)val != (Object)null) { return val; } return CreateArtifactGlyphSprite(ArtifactGlyph.SurvivalInstinct, selected: true); } private static Sprite CreateReachWaxIconSprite() { Sprite val = TryLoadIconSprite("reach-wax-icon.png", "VinesTweaksReachWaxIcon"); if ((Object)(object)val != (Object)null) { return val; } return CreateProceduralReachWaxIconSprite(); } private static Sprite CreateBroadleafGripIconSprite() { Sprite val = TryLoadIconSprite("broadleaf-grip-icon.png", "VinesTweaksBroadleafGripIcon"); if ((Object)(object)val != (Object)null) { return val; } return CreateProceduralBroadleafGripIconSprite(); } private static Sprite? TryLoadIconSprite(string fileName, string textureName) { //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) string path = Path.GetDirectoryName(typeof(VinesTweaksPlugin).Assembly.Location) ?? string.Empty; string path2 = Path.Combine(path, "assets", fileName); if (!File.Exists(path2)) { path2 = Path.Combine(path, fileName); } if (!File.Exists(path2)) { DebugLog("Icon asset '" + fileName + "' was not found beside the plugin DLL; using generated fallback icon."); return null; } byte[] array = File.ReadAllBytes(path2); Texture2D val = new Texture2D(2, 2, (TextureFormat)4, false); ((Object)val).name = textureName; ((Texture)val).filterMode = (FilterMode)1; if (!ImageConversion.LoadImage(val, array, false)) { Object.Destroy((Object)(object)val); VinesTweaksPlugin? vinesTweaksPlugin = instance; if (vinesTweaksPlugin != null) { ((BaseUnityPlugin)vinesTweaksPlugin).Logger.LogWarning((object)("Icon asset '" + fileName + "' could not be loaded; using generated fallback icon.")); } return null; } return Sprite.Create(val, new Rect(0f, 0f, (float)((Texture)val).width, (float)((Texture)val).height), new Vector2(0.5f, 0.5f), (float)((Texture)val).width); } private static Sprite CreateProceduralGChickenBoosterIconSprite() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_0318: Unknown result type (might be due to invalid IL or missing references) //IL_0324: Unknown result type (might be due to invalid IL or missing references) //IL_0326: Unknown result type (might be due to invalid IL or missing references) //IL_0348: Unknown result type (might be due to invalid IL or missing references) //IL_0357: 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_0128: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: 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_02d6: Unknown result type (might be due to invalid IL or missing references) //IL_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Unknown result type (might be due to invalid IL or missing references) Texture2D val = new Texture2D(128, 128, (TextureFormat)4, false); ((Object)val).name = "VinesTweaksGChickenBoosterIcon"; ((Texture)val).filterMode = (FilterMode)1; Color val2 = default(Color); ((Color)(ref val2))..ctor(0.98f, 0.99f, 0.94f, 1f); Color val3 = default(Color); ((Color)(ref val3))..ctor(0.78f, 0.84f, 0.77f, 1f); Color val4 = default(Color); ((Color)(ref val4))..ctor(1f, 1f, 0.93f, 1f); Color val5 = default(Color); ((Color)(ref val5))..ctor(0.36f, 0.76f, 0.27f, 1f); Color val6 = default(Color); ((Color)(ref val6))..ctor(0.76f, 1f, 0.29f, 1f); Color val7 = default(Color); ((Color)(ref val7))..ctor(0.02f, 0.08f, 0.025f, 1f); Color fill = default(Color); ((Color)(ref fill))..ctor(0.07f, 0.26f, 0.08f, 1f); Color val8 = default(Color); ((Color)(ref val8))..ctor(0f, 0f, 0f, 0.36f); for (int i = 0; i < 128; i++) { for (int j = 0; j < 128; j++) { Vector2 val9 = RotateIntoBoosterSpace(new Vector2((float)j - 64f, (float)i - 64f), -28f); float x = val9.x; float y = val9.y; BoosterSilhouette(x, y, 0f); bool num = BoosterSilhouette(x, y, 3f); bool num2 = BoosterSilhouette(x, y, 7f); bool num3 = BoosterSilhouette(x - 5f, y + 6f, 8f); bool flag = IsCapsule(x, y, -38f, 24f, 14f); bool flag2 = x > 21f && x < 40f && Mathf.Abs(y) < 8f; bool flag3 = Distance(x, y, 34f, 12f) < 5f || Distance(x, y, 42f, 9f) < 4.5f; bool flag4 = x > -27f && x < 0f && Mathf.Abs(y) < 6f; bool flag5 = Distance(x, y, 11f, 0f) < 8.5f; bool flag6 = x > -28f && x < 1f && Mathf.Abs(y + 7f) < 1.4f; Color val10 = Color.clear; if (num3) { val10 = val8; } if (num2) { val10 = val2; } if (num) { val10 = val7; } if (flag || flag2 || flag3) { val10 = val3; } if (flag4) { val10 = Color.Lerp(val5, val6, Mathf.Clamp01((y + 6f) / 12f)); } if (flag6) { val10 = val4; } if (flag5) { val10 = val5; } if ((flag || flag2) && y > 4f && x < 16f) { val10 = Color.Lerp(val10, val4, 0.42f); } val.SetPixel(j, i, val10); } } DrawSimpleG(val, 75, 63, val7); DrawFeather(val, 45, 76, val7, fill); val.Apply(); return Sprite.Create(val, new Rect(0f, 0f, 128f, 128f), new Vector2(0.5f, 0.5f), 128f); } private static Sprite CreateProceduralReachWaxIconSprite() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) Texture2D val = new Texture2D(128, 128, (TextureFormat)4, false); ((Object)val).name = "VinesTweaksReachWaxIcon"; ((Texture)val).filterMode = (FilterMode)1; Color val2 = default(Color); ((Color)(ref val2))..ctor(0.98f, 1f, 0.98f, 1f); Color val3 = default(Color); ((Color)(ref val3))..ctor(0.04f, 0.08f, 0.09f, 1f); Color val4 = default(Color); ((Color)(ref val4))..ctor(0.76f, 0.84f, 0.78f, 1f); Color val5 = default(Color); ((Color)(ref val5))..ctor(0.93f, 0.95f, 0.86f, 1f); Color val6 = default(Color); ((Color)(ref val6))..ctor(0.48f, 0.94f, 1f, 1f); Color val7 = default(Color); ((Color)(ref val7))..ctor(0f, 0f, 0f, 0.34f); for (int i = 0; i < 128; i++) { for (int j = 0; j < 128; j++) { Vector2 val8 = RotateIntoBoosterSpace(new Vector2((float)j - 64f, (float)i - 64f), -24f); float x = val8.x; float y = val8.y; bool num = IsCapsule(x - 4f, y + 7f, -42f, 37f, 16f); bool flag = IsCapsule(x, y, -43f, 39f, 19f); bool flag2 = IsCapsule(x, y, -41f, 37f, 16f); bool flag3 = IsCapsule(x, y, -37f, 33f, 13f); bool flag4 = Distance(x, y, -29f, 0f) < 12f; bool flag5 = Distance(x, y, -29f, 0f) < 5f; bool flag6 = x > -9f && x < 31f && Mathf.Abs(y + 3f) < 3f; bool flag7 = x > 30f && x < 42f && Mathf.Abs(y + 2f) < 8f; Color val9 = Color.clear; if (num) { val9 = val7; } if (flag) { val9 = val2; } if (flag2) { val9 = val3; } if (flag3) { val9 = val4; } if (flag4) { val9 = Color.Lerp(val5, val4, Mathf.Clamp01((y + 12f) / 24f)); } if (flag5) { val9 = val3; } if (flag6 || flag7) { val9 = val5; } if (x > 4f && x < 36f && Mathf.Abs(y - 7f) < 1.8f) { val9 = val6; } val.SetPixel(j, i, val9); } } val.Apply(); return Sprite.Create(val, new Rect(0f, 0f, 128f, 128f), new Vector2(0.5f, 0.5f), 128f); } private static Sprite CreateProceduralBroadleafGripIconSprite() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_028d: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_010d: 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_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0220: 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) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) Texture2D val = new Texture2D(128, 128, (TextureFormat)4, false); ((Object)val).name = "VinesTweaksBroadleafGripIcon"; ((Texture)val).filterMode = (FilterMode)1; Color val2 = default(Color); ((Color)(ref val2))..ctor(0.28f, 1f, 0.36f, 1f); Color val3 = default(Color); ((Color)(ref val3))..ctor(0.02f, 0.1f, 0.03f, 1f); Color val4 = default(Color); ((Color)(ref val4))..ctor(0.1f, 0.16f, 0.15f, 1f); Color val5 = default(Color); ((Color)(ref val5))..ctor(0.26f, 0.35f, 0.3f, 1f); Color val6 = default(Color); ((Color)(ref val6))..ctor(0.32f, 0.78f, 0.22f, 1f); Color val7 = default(Color); ((Color)(ref val7))..ctor(0.68f, 1f, 0.35f, 1f); Color val8 = default(Color); ((Color)(ref val8))..ctor(0f, 0f, 0f, 0.35f); for (int i = 0; i < 128; i++) { for (int j = 0; j < 128; j++) { Vector2 val9 = RotateIntoBoosterSpace(new Vector2((float)j - 64f, (float)i - 64f), -18f); float x = val9.x; float y = val9.y; bool num = BroadleafShape(x - 4f, y + 6f, 8f); bool flag = BroadleafShape(x, y, 7f); bool flag2 = BroadleafShape(x, y, 3f); bool flag3 = IsCapsule(x, y, -22f, 24f, 13f); bool flag4 = IsLeaf(x, y, -5f, -25f, 32f, 15f); bool flag5 = IsLeaf(x, y, 5f, 24f, 34f, 15f); bool flag6 = IsCapsule(x, y, -12f, 10f, 4f); Color val10 = Color.clear; if (num) { val10 = val8; } if (flag) { val10 = val2; } if (flag2) { val10 = val3; } if (flag3) { val10 = ((y < 0f) ? val5 : val4); } if (flag4 || flag5) { val10 = Color.Lerp(val6, val7, Mathf.Clamp01((0f - y + 30f) / 60f)); } if (flag6) { val10 = val3; } if ((flag4 || flag5) && Mathf.Abs(x) < 3f) { val10 = val7; } val.SetPixel(j, i, val10); } } val.Apply(); return Sprite.Create(val, new Rect(0f, 0f, 128f, 128f), new Vector2(0.5f, 0.5f), 128f); } private static Vector2 RotateIntoBoosterSpace(Vector2 point, float degrees) { //IL_0014: 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_0025: 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_0036: Unknown result type (might be due to invalid IL or missing references) float num = degrees * (MathF.PI / 180f); float num2 = Mathf.Cos(num); float num3 = Mathf.Sin(num); return new Vector2(point.x * num2 - point.y * num3, point.x * num3 + point.y * num2); } private static bool BoosterSilhouette(float x, float y, float inflate) { if (!IsCapsule(x, y, -38f - inflate, 24f + inflate, 14f + inflate) && (!(x > 21f - inflate) || !(x < 40f + inflate) || !(Mathf.Abs(y) < 8f + inflate)) && !(Distance(x, y, 34f, 12f) < 5f + inflate)) { return Distance(x, y, 42f, 9f) < 4.5f + inflate; } return true; } private static bool BroadleafShape(float x, float y, float inflate) { if (!IsCapsule(x, y, -22f - inflate, 24f + inflate, 13f + inflate) && !IsLeaf(x, y, -5f, -25f, 32f + inflate, 15f + inflate)) { return IsLeaf(x, y, 5f, 24f, 34f + inflate, 15f + inflate); } return true; } private static bool IsLeaf(float x, float y, float centerX, float centerY, float width, float height) { float num = (x - centerX) / width; float num2 = (y - centerY) / height; if (num * num + num2 * num2 <= 1f) { return Mathf.Abs(x - centerX) < width * (1f - Mathf.Abs(num2) * 0.35f); } return false; } private static bool IsCapsule(float x, float y, float left, float right, float radius) { if (x >= left && x <= right && Mathf.Abs(y) <= radius) { return true; } if (!(Distance(x, y, left, 0f) <= radius)) { return Distance(x, y, right, 0f) <= radius; } return true; } private static float Distance(float x, float y, float centerX, float centerY) { float num = x - centerX; float num2 = y - centerY; return Mathf.Sqrt(num * num + num2 * num2); } private static void DrawSimpleG(Texture2D texture, int centerX, int centerY, Color color) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) DrawRect(texture, centerX - 5, centerY - 6, 11, 2, color); DrawRect(texture, centerX - 6, centerY - 5, 2, 11, color); DrawRect(texture, centerX - 5, centerY + 5, 11, 2, color); DrawRect(texture, centerX + 4, centerY + 1, 2, 5, color); DrawRect(texture, centerX + 1, centerY + 1, 5, 2, color); } private static void DrawFeather(Texture2D texture, int centerX, int centerY, Color outline, Color fill) { //IL_0068: 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_0047: Unknown result type (might be due to invalid IL or missing references) for (int i = -7; i <= 7; i++) { for (int j = -10; j <= 10; j++) { float num = (float)(j * j) / 100f + (float)(i * i) / 36f; if (num <= 1f) { texture.SetPixel(centerX + j, centerY + i, fill); } else if (num <= 1.18f) { texture.SetPixel(centerX + j, centerY + i, outline); } } } DrawRect(texture, centerX - 1, centerY - 8, 2, 17, outline); } private static void DrawRect(Texture2D texture, int x, int y, int width, int height, Color color) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) for (int i = y; i < y + height; i++) { for (int j = x; j < x + width; j++) { if (j >= 0 && i >= 0 && j < ((Texture)texture).width && i < ((Texture)texture).height) { texture.SetPixel(j, i, color); } } } } private static Sprite CreateArtifactGlyphSprite(ArtifactGlyph glyph, bool selected) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_0078: 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) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: 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_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be d