using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using Characters;
using Characters.Abilities.Darks;
using Data;
using DeadlyOfWorld;
using Hardmode;
using HarmonyLib;
using Level;
using Microsoft.CodeAnalysis;
using Services;
using Singletons;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETFramework,Version=v4.6.2", FrameworkDisplayName = "")]
[assembly: IgnoresAccessChecksTo("")]
[assembly: AssemblyCompany("DeadlyOfWorld")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyDescription("DeadlyWorld")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0")]
[assembly: AssemblyProduct("DeadlyOfWorld")]
[assembly: AssemblyTitle("DeadlyOfWorld")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.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;
}
}
}
[BepInPlugin("DeadlyOfWorld", "DeadlyOfWorld", "1.0")]
public class Plugin : BaseUnityPlugin
{
public enum DarkEnum
{
All = 1,
Common,
Rare,
Uniq,
Legend,
Percent
}
public static ConfigEntry<DarkEnum> Step;
public static ConfigEntry<int> isSetP;
public static ConfigEntry<bool> isNoDarker;
public static ConfigEntry<double> Death;
public static ConfigEntry<double> Death1;
public static ConfigEntry<double> Death2;
public static ConfigEntry<double> Death3;
public static ConfigEntry<bool> TrueAllDark;
private void Awake()
{
Step = ((BaseUnityPlugin)this).Config.Bind<DarkEnum>("General", "나오는 정도", DarkEnum.All, "All : 전부\nCommon : 일반템이 나오는정도\nRare : 레어템이 나오는정도\nUniq :유니크템이 나오는정도\nLegend : 레전드템이 뜨는정도\nPercent : 본인이 원하는만큼 설정합니다.");
isSetP = ((BaseUnityPlugin)this).Config.Bind<int>("General", "확율", 0, "Percent적용시\n0~100까지의확율로 검은적이 나오게 설정할수있습니다.");
isNoDarker = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "검은적 정상화", false, "검은적이 나오는것을 되돌립니다.");
Death = ((BaseUnityPlugin)this).Config.Bind<double>("General", "모험가/보스체력 조정", 1.0, "보스와 모험가의 체력을 곱합니다.");
Death1 = ((BaseUnityPlugin)this).Config.Bind<double>("General", "일반몹체력 조정", 1.0, "일반몹의 체력을 곱합니다.");
Death2 = ((BaseUnityPlugin)this).Config.Bind<double>("General", "모험가/보스데미지 조정", 1.0, "보스와 모험가의 데미지을 곱합니다.");
Death3 = ((BaseUnityPlugin)this).Config.Bind<double>("General", "일반몹 데미지 조정", 1.0, "보스와 모험가의 데미지을 곱합니다.");
TrueAllDark = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "진짜 모든 검은적", false, "지옥을 알고싶다면 이것을 켜보시오.");
Harmony.CreateAndPatchAll(typeof(DeadlyPath), (string)null);
((BaseUnityPlugin)this).Logger.LogInfo((object)"Mod DeadlyOfWorld is loaded!");
}
private void Update()
{
((BaseUnityPlugin)this).Config.Reload();
}
}
namespace DeadlyOfWorld
{
public class DeadlyPath
{
[HarmonyPostfix]
[HarmonyPatch(typeof(Character), "InitializeActions")]
private static void CharacterPostfix(ref Character __instance)
{
//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
//IL_00a8: Invalid comparison between Unknown and I4
//IL_0114: Unknown result type (might be due to invalid IL or missing references)
//IL_011a: Invalid comparison between Unknown and I4
//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
//IL_00dd: Expected O, but got Unknown
//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
//IL_0103: Expected O, but got Unknown
//IL_0103: Unknown result type (might be due to invalid IL or missing references)
//IL_010d: Expected O, but got Unknown
//IL_0183: Unknown result type (might be due to invalid IL or missing references)
//IL_0189: Invalid comparison between Unknown and I4
//IL_0149: Unknown result type (might be due to invalid IL or missing references)
//IL_014f: Expected O, but got Unknown
//IL_016f: Unknown result type (might be due to invalid IL or missing references)
//IL_0175: Expected O, but got Unknown
//IL_0175: Unknown result type (might be due to invalid IL or missing references)
//IL_017f: Expected O, but got Unknown
//IL_01b7: Unknown result type (might be due to invalid IL or missing references)
//IL_01bd: Expected O, but got Unknown
//IL_01d3: Unknown result type (might be due to invalid IL or missing references)
//IL_01d9: Expected O, but got Unknown
//IL_01d9: Unknown result type (might be due to invalid IL or missing references)
//IL_01e3: Expected O, but got Unknown
//IL_018d: Unknown result type (might be due to invalid IL or missing references)
if (Plugin.Death.Value < 1.0)
{
Plugin.Death.Value = 1.0;
}
if (Plugin.Death1.Value < 1.0)
{
Plugin.Death1.Value = 1.0;
}
if (Plugin.Death2.Value < 1.0)
{
Plugin.Death2.Value = 1.0;
}
if (Plugin.Death3.Value < 1.0)
{
Plugin.Death3.Value = 1.0;
}
if ((int)__instance.type == 3)
{
__instance.stat.AttachValues(new Values((Value[])(object)new Value[2]
{
new Value(Category.Percent, Kind.Health, Plugin.Death.Value * 5.0),
new Value(Category.Percent, Kind.AttackDamage, Plugin.Death1.Value * 5.0)
}));
}
else if ((int)__instance.type == 2)
{
__instance.stat.AttachValues(new Values((Value[])(object)new Value[2]
{
new Value(Category.Percent, Kind.Health, Plugin.Death.Value * 3.0),
new Value(Category.Percent, Kind.AttackDamage, Plugin.Death1.Value * 3.0)
}));
}
else if ((int)__instance.type == 1 || (int)__instance.type == 0)
{
__instance.stat.AttachValues(new Values((Value[])(object)new Value[2]
{
new Value(Category.Percent, Kind.Health, Plugin.Death2.Value),
new Value(Category.Percent, Kind.AttackDamage, Plugin.Death3.Value)
}));
}
List<Character> list = new List<Character>();
list.Add(__instance);
DarkEnemySelector.instance.ElectIn((ICollection<Character>)list);
}
[HarmonyPostfix]
[HarmonyPatch(typeof(DarkEnemySelector), "ElectIn")]
private static void SetCounters(object[] __args, ref DarkAbilityConstructor[] ____constructors)
{
//IL_031a: Unknown result type (might be due to invalid IL or missing references)
//IL_0342: Unknown result type (might be due to invalid IL or missing references)
//IL_034c: Unknown result type (might be due to invalid IL or missing references)
//IL_034d: Unknown result type (might be due to invalid IL or missing references)
//IL_0358: Unknown result type (might be due to invalid IL or missing references)
//IL_0365: Unknown result type (might be due to invalid IL or missing references)
//IL_036b: Expected I4, but got Unknown
//IL_037a: Unknown result type (might be due to invalid IL or missing references)
//IL_04c5: Unknown result type (might be due to invalid IL or missing references)
//IL_04ed: Unknown result type (might be due to invalid IL or missing references)
//IL_04f7: Unknown result type (might be due to invalid IL or missing references)
//IL_04f8: Unknown result type (might be due to invalid IL or missing references)
//IL_0503: Unknown result type (might be due to invalid IL or missing references)
//IL_0510: Unknown result type (might be due to invalid IL or missing references)
//IL_0516: Expected I4, but got Unknown
//IL_0525: Unknown result type (might be due to invalid IL or missing references)
//IL_052b: Invalid comparison between Unknown and I4
//IL_0660: Unknown result type (might be due to invalid IL or missing references)
//IL_0688: Unknown result type (might be due to invalid IL or missing references)
//IL_0692: 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_069e: Unknown result type (might be due to invalid IL or missing references)
//IL_06ab: Unknown result type (might be due to invalid IL or missing references)
//IL_06b1: Expected I4, but got Unknown
//IL_06c0: Unknown result type (might be due to invalid IL or missing references)
//IL_06c6: Invalid comparison between Unknown and I4
//IL_003d: Unknown result type (might be due to invalid IL or missing references)
//IL_07fb: Unknown result type (might be due to invalid IL or missing references)
//IL_0823: Unknown result type (might be due to invalid IL or missing references)
//IL_082d: Unknown result type (might be due to invalid IL or missing references)
//IL_082e: Unknown result type (might be due to invalid IL or missing references)
//IL_0839: Unknown result type (might be due to invalid IL or missing references)
//IL_0846: Unknown result type (might be due to invalid IL or missing references)
//IL_084c: Expected I4, but got Unknown
//IL_085b: Unknown result type (might be due to invalid IL or missing references)
//IL_0861: Invalid comparison between Unknown and I4
//IL_0057: Unknown result type (might be due to invalid IL or missing references)
//IL_0061: Invalid comparison between Unknown and I4
//IL_0045: Unknown result type (might be due to invalid IL or missing references)
//IL_004b: Invalid comparison between Unknown and I4
//IL_0231: Unknown result type (might be due to invalid IL or missing references)
//IL_012a: Unknown result type (might be due to invalid IL or missing references)
//IL_0064: Unknown result type (might be due to invalid IL or missing references)
//IL_006e: Invalid comparison between Unknown and I4
//IL_004e: Unknown result type (might be due to invalid IL or missing references)
//IL_0054: Invalid comparison between Unknown and I4
//IL_0251: Unknown result type (might be due to invalid IL or missing references)
//IL_025b: Invalid comparison between Unknown and I4
//IL_023a: Unknown result type (might be due to invalid IL or missing references)
//IL_0240: Invalid comparison between Unknown and I4
//IL_0136: Unknown result type (might be due to invalid IL or missing references)
//IL_0140: Invalid comparison between Unknown and I4
//IL_0071: Unknown result type (might be due to invalid IL or missing references)
//IL_007b: Invalid comparison between Unknown and I4
//IL_03ba: Unknown result type (might be due to invalid IL or missing references)
//IL_0262: Unknown result type (might be due to invalid IL or missing references)
//IL_026c: Invalid comparison between Unknown and I4
//IL_0244: Unknown result type (might be due to invalid IL or missing references)
//IL_024a: Invalid comparison between Unknown and I4
//IL_0147: Unknown result type (might be due to invalid IL or missing references)
//IL_0151: Invalid comparison between Unknown and I4
//IL_007e: Unknown result type (might be due to invalid IL or missing references)
//IL_0088: Invalid comparison between Unknown and I4
//IL_0566: Unknown result type (might be due to invalid IL or missing references)
//IL_03da: Unknown result type (might be due to invalid IL or missing references)
//IL_03e4: Invalid comparison between Unknown and I4
//IL_03c3: Unknown result type (might be due to invalid IL or missing references)
//IL_03c9: Invalid comparison between Unknown and I4
//IL_0270: Unknown result type (might be due to invalid IL or missing references)
//IL_027a: Invalid comparison between Unknown and I4
//IL_0158: Unknown result type (might be due to invalid IL or missing references)
//IL_0162: Invalid comparison between Unknown and I4
//IL_008b: Unknown result type (might be due to invalid IL or missing references)
//IL_0095: Invalid comparison between Unknown and I4
//IL_09c2: Unknown result type (might be due to invalid IL or missing references)
//IL_0701: Unknown result type (might be due to invalid IL or missing references)
//IL_0586: Unknown result type (might be due to invalid IL or missing references)
//IL_0590: Invalid comparison between Unknown and I4
//IL_056f: Unknown result type (might be due to invalid IL or missing references)
//IL_0575: Invalid comparison between Unknown and I4
//IL_03eb: Unknown result type (might be due to invalid IL or missing references)
//IL_03f5: Invalid comparison between Unknown and I4
//IL_03cd: Unknown result type (might be due to invalid IL or missing references)
//IL_03d3: Invalid comparison between Unknown and I4
//IL_027e: Unknown result type (might be due to invalid IL or missing references)
//IL_0288: Invalid comparison between Unknown and I4
//IL_0166: Unknown result type (might be due to invalid IL or missing references)
//IL_0170: Invalid comparison between Unknown and I4
//IL_0098: Unknown result type (might be due to invalid IL or missing references)
//IL_09e2: Unknown result type (might be due to invalid IL or missing references)
//IL_09ec: Invalid comparison between Unknown and I4
//IL_09cb: Unknown result type (might be due to invalid IL or missing references)
//IL_09d1: Invalid comparison between Unknown and I4
//IL_089c: Unknown result type (might be due to invalid IL or missing references)
//IL_0721: Unknown result type (might be due to invalid IL or missing references)
//IL_072b: Invalid comparison between Unknown and I4
//IL_070a: Unknown result type (might be due to invalid IL or missing references)
//IL_0710: Invalid comparison between Unknown and I4
//IL_0597: Unknown result type (might be due to invalid IL or missing references)
//IL_05a1: Invalid comparison between Unknown and I4
//IL_0579: Unknown result type (might be due to invalid IL or missing references)
//IL_057f: Invalid comparison between Unknown and I4
//IL_03fc: Unknown result type (might be due to invalid IL or missing references)
//IL_0406: Invalid comparison between Unknown and I4
//IL_028c: Unknown result type (might be due to invalid IL or missing references)
//IL_0296: Invalid comparison between Unknown and I4
//IL_0174: Unknown result type (might be due to invalid IL or missing references)
//IL_017e: Invalid comparison between Unknown and I4
//IL_09f3: Unknown result type (might be due to invalid IL or missing references)
//IL_09fd: Invalid comparison between Unknown and I4
//IL_09d5: Unknown result type (might be due to invalid IL or missing references)
//IL_09db: Invalid comparison between Unknown and I4
//IL_08bc: Unknown result type (might be due to invalid IL or missing references)
//IL_08c6: Invalid comparison between Unknown and I4
//IL_08a5: Unknown result type (might be due to invalid IL or missing references)
//IL_08ab: Invalid comparison between Unknown and I4
//IL_0732: Unknown result type (might be due to invalid IL or missing references)
//IL_073c: Invalid comparison between Unknown and I4
//IL_0714: Unknown result type (might be due to invalid IL or missing references)
//IL_071a: Invalid comparison between Unknown and I4
//IL_05a8: Unknown result type (might be due to invalid IL or missing references)
//IL_05b2: Invalid comparison between Unknown and I4
//IL_040d: Unknown result type (might be due to invalid IL or missing references)
//IL_0417: Invalid comparison between Unknown and I4
//IL_029a: Unknown result type (might be due to invalid IL or missing references)
//IL_02a4: Invalid comparison between Unknown and I4
//IL_0182: Unknown result type (might be due to invalid IL or missing references)
//IL_018c: Invalid comparison between Unknown and I4
//IL_0a04: Unknown result type (might be due to invalid IL or missing references)
//IL_0a0e: Invalid comparison between Unknown and I4
//IL_08cd: Unknown result type (might be due to invalid IL or missing references)
//IL_08d7: Invalid comparison between Unknown and I4
//IL_08af: Unknown result type (might be due to invalid IL or missing references)
//IL_08b5: Invalid comparison between Unknown and I4
//IL_0743: Unknown result type (might be due to invalid IL or missing references)
//IL_074d: Invalid comparison between Unknown and I4
//IL_05b6: Unknown result type (might be due to invalid IL or missing references)
//IL_05c0: Invalid comparison between Unknown and I4
//IL_041b: Unknown result type (might be due to invalid IL or missing references)
//IL_0425: Invalid comparison between Unknown and I4
//IL_02a8: Unknown result type (might be due to invalid IL or missing references)
//IL_02b2: Invalid comparison between Unknown and I4
//IL_0190: Unknown result type (might be due to invalid IL or missing references)
//IL_019a: Invalid comparison between Unknown and I4
//IL_0a12: Unknown result type (might be due to invalid IL or missing references)
//IL_0a1c: Invalid comparison between Unknown and I4
//IL_08de: Unknown result type (might be due to invalid IL or missing references)
//IL_08e8: Invalid comparison between Unknown and I4
//IL_0751: Unknown result type (might be due to invalid IL or missing references)
//IL_075b: Invalid comparison between Unknown and I4
//IL_05c4: Unknown result type (might be due to invalid IL or missing references)
//IL_05ce: Invalid comparison between Unknown and I4
//IL_0429: Unknown result type (might be due to invalid IL or missing references)
//IL_0433: Invalid comparison between Unknown and I4
//IL_02b6: Unknown result type (might be due to invalid IL or missing references)
//IL_02c0: Invalid comparison between Unknown and I4
//IL_019e: Unknown result type (might be due to invalid IL or missing references)
//IL_01a8: Invalid comparison between Unknown and I4
//IL_0a20: Unknown result type (might be due to invalid IL or missing references)
//IL_0a2a: Invalid comparison between Unknown and I4
//IL_08ec: Unknown result type (might be due to invalid IL or missing references)
//IL_08f6: Invalid comparison between Unknown and I4
//IL_075f: Unknown result type (might be due to invalid IL or missing references)
//IL_0769: Invalid comparison between Unknown and I4
//IL_05d2: Unknown result type (might be due to invalid IL or missing references)
//IL_05dc: Invalid comparison between Unknown and I4
//IL_0437: Unknown result type (might be due to invalid IL or missing references)
//IL_0441: Invalid comparison between Unknown and I4
//IL_02c4: Unknown result type (might be due to invalid IL or missing references)
//IL_01ac: Unknown result type (might be due to invalid IL or missing references)
//IL_01b6: Invalid comparison between Unknown and I4
//IL_0a2e: Unknown result type (might be due to invalid IL or missing references)
//IL_0a38: Invalid comparison between Unknown and I4
//IL_08fa: Unknown result type (might be due to invalid IL or missing references)
//IL_0904: Invalid comparison between Unknown and I4
//IL_076d: Unknown result type (might be due to invalid IL or missing references)
//IL_0777: Invalid comparison between Unknown and I4
//IL_05e0: Unknown result type (might be due to invalid IL or missing references)
//IL_05ea: Invalid comparison between Unknown and I4
//IL_0445: Unknown result type (might be due to invalid IL or missing references)
//IL_044f: Invalid comparison between Unknown and I4
//IL_01ba: Unknown result type (might be due to invalid IL or missing references)
//IL_0a3c: Unknown result type (might be due to invalid IL or missing references)
//IL_0a46: Invalid comparison between Unknown and I4
//IL_0908: Unknown result type (might be due to invalid IL or missing references)
//IL_0912: Invalid comparison between Unknown and I4
//IL_077b: Unknown result type (might be due to invalid IL or missing references)
//IL_0785: Invalid comparison between Unknown and I4
//IL_05ee: Unknown result type (might be due to invalid IL or missing references)
//IL_05f8: Invalid comparison between Unknown and I4
//IL_0453: Unknown result type (might be due to invalid IL or missing references)
//IL_045d: Invalid comparison between Unknown and I4
//IL_0a4a: Unknown result type (might be due to invalid IL or missing references)
//IL_0a54: Invalid comparison between Unknown and I4
//IL_0916: Unknown result type (might be due to invalid IL or missing references)
//IL_0920: Invalid comparison between Unknown and I4
//IL_0789: Unknown result type (might be due to invalid IL or missing references)
//IL_0793: Invalid comparison between Unknown and I4
//IL_05fc: Unknown result type (might be due to invalid IL or missing references)
//IL_0606: Invalid comparison between Unknown and I4
//IL_0461: Unknown result type (might be due to invalid IL or missing references)
//IL_046b: Invalid comparison between Unknown and I4
//IL_0a58: Unknown result type (might be due to invalid IL or missing references)
//IL_0a62: Invalid comparison between Unknown and I4
//IL_0924: Unknown result type (might be due to invalid IL or missing references)
//IL_092e: Invalid comparison between Unknown and I4
//IL_0797: Unknown result type (might be due to invalid IL or missing references)
//IL_07a1: Invalid comparison between Unknown and I4
//IL_060a: Unknown result type (might be due to invalid IL or missing references)
//IL_046f: Unknown result type (might be due to invalid IL or missing references)
//IL_0a66: Unknown result type (might be due to invalid IL or missing references)
//IL_0932: Unknown result type (might be due to invalid IL or missing references)
//IL_093c: Invalid comparison between Unknown and I4
//IL_07a5: Unknown result type (might be due to invalid IL or missing references)
//IL_0940: Unknown result type (might be due to invalid IL or missing references)
if (Plugin.isNoDarker.Value)
{
return;
}
object[] array;
if (Plugin.TrueAllDark.Value)
{
array = __args;
for (int i = 0; i < array.Length; i++)
{
foreach (Character item in (ICollection<Character>)array[i])
{
if (((int)item.type == 0 || (int)item.type == 2 || (int)item.type == 3) && (int)item.key != 15005 && (int)item.key != 30302 && (int)item.key != 30303 && (int)item.key != 30304 && (int)item.key != 15010 && (int)item.key != 0)
{
____constructors[Singleton<HardmodeManager>.Instance.currentLevel].Provide(item);
}
}
}
return;
}
if (Plugin.Step.Value == Plugin.DarkEnum.Percent)
{
if (new Random().Next(1, 101) > Plugin.isSetP.Value)
{
return;
}
array = __args;
for (int i = 0; i < array.Length; i++)
{
foreach (Character item2 in (ICollection<Character>)array[i])
{
if ((int)item2.type == 0 && (int)item2.key != 15005 && (int)item2.key != 30302 && (int)item2.key != 30303 && (int)item2.key != 30304 && (int)item2.key != 10101 && (int)item2.key != 15002 && (int)item2.key != 15001 && (int)item2.key != 15010 && (int)item2.key != 10001 && (int)item2.key != 0)
{
____constructors[Singleton<HardmodeManager>.Instance.currentLevel].Provide(item2);
}
}
}
return;
}
if (Plugin.Step.Value == Plugin.DarkEnum.All)
{
array = __args;
for (int i = 0; i < array.Length; i++)
{
foreach (Character item3 in (ICollection<Character>)array[i])
{
if (((int)item3.type == 0 || (int)item3.type == 2 || (int)item3.type == 3) && (int)item3.key != 15005 && (int)item3.key != 30302 && (int)item3.key != 30303 && (int)item3.key != 30304 && (int)item3.key != 10101 && (int)item3.key != 15001 && (int)item3.key != 15010 && (int)item3.key != 10001 && (int)item3.key != 0)
{
____constructors[Singleton<HardmodeManager>.Instance.currentLevel].Provide(item3);
}
}
}
return;
}
if (Plugin.Step.Value == Plugin.DarkEnum.Common)
{
RarityPossibilities val = new RarityPossibilities(Array.Empty<int>());
Chapter currentChapter = Singleton<Service>.Instance.levelManager.currentChapter;
Random random = new Random(Save.instance.randomSeed + 2028506624 + currentChapter.type * 256 + currentChapter.stageIndex * 16 + currentChapter.currentStage.pathIndex);
random.Next(0, 100);
if ((int)val.Evaluate(random) != 0)
{
return;
}
array = __args;
for (int i = 0; i < array.Length; i++)
{
ICollection<Character> obj = (ICollection<Character>)array[i];
Debug.LogError((object)obj.Count);
foreach (Character item4 in obj)
{
if (((int)item4.type == 0 || (int)item4.type == 2 || (int)item4.type == 3) && (int)item4.key != 15005 && (int)item4.key != 30302 && (int)item4.key != 30303 && (int)item4.key != 30301 && (int)item4.key != 30304 && (int)item4.key != 10101 && (int)item4.key != 15002 && (int)item4.key != 15001 && (int)item4.key != 15010 && (int)item4.key != 10001 && (int)item4.key != 0)
{
____constructors[Singleton<HardmodeManager>.Instance.currentLevel].Provide(item4);
}
}
}
return;
}
if (Plugin.Step.Value == Plugin.DarkEnum.Rare)
{
RarityPossibilities val2 = new RarityPossibilities(Array.Empty<int>());
Chapter currentChapter2 = Singleton<Service>.Instance.levelManager.currentChapter;
Random random2 = new Random(Save.instance.randomSeed + 2028506624 + currentChapter2.type * 256 + currentChapter2.stageIndex * 16 + currentChapter2.currentStage.pathIndex);
random2.Next(0, 100);
if ((int)val2.Evaluate(random2) != 1)
{
return;
}
array = __args;
for (int i = 0; i < array.Length; i++)
{
ICollection<Character> obj2 = (ICollection<Character>)array[i];
Debug.LogError((object)obj2.Count);
foreach (Character item5 in obj2)
{
if (((int)item5.type == 0 || (int)item5.type == 2 || (int)item5.type == 3) && (int)item5.key != 15005 && (int)item5.key != 30302 && (int)item5.key != 30303 && (int)item5.key != 30304 && (int)item5.key != 10101 && (int)item5.key != 15002 && (int)item5.key != 15001 && (int)item5.key != 15010 && (int)item5.key != 10001 && (int)item5.key != 0)
{
____constructors[Singleton<HardmodeManager>.Instance.currentLevel].Provide(item5);
}
}
}
return;
}
if (Plugin.Step.Value == Plugin.DarkEnum.Uniq)
{
RarityPossibilities val3 = new RarityPossibilities(Array.Empty<int>());
Chapter currentChapter3 = Singleton<Service>.Instance.levelManager.currentChapter;
Random random3 = new Random(Save.instance.randomSeed + 2028506624 + currentChapter3.type * 256 + currentChapter3.stageIndex * 16 + currentChapter3.currentStage.pathIndex);
random3.Next(0, 100);
if ((int)val3.Evaluate(random3) != 2)
{
return;
}
array = __args;
for (int i = 0; i < array.Length; i++)
{
ICollection<Character> obj3 = (ICollection<Character>)array[i];
Debug.LogError((object)obj3.Count);
foreach (Character item6 in obj3)
{
if (((int)item6.type == 0 || (int)item6.type == 2 || (int)item6.type == 3) && (int)item6.key != 15005 && (int)item6.key != 30302 && (int)item6.key != 30303 && (int)item6.key != 30304 && (int)item6.key != 10101 && (int)item6.key != 15002 && (int)item6.key != 15001 && (int)item6.key != 15010 && (int)item6.key != 10001 && (int)item6.key != 0)
{
____constructors[Singleton<HardmodeManager>.Instance.currentLevel].Provide(item6);
}
}
}
return;
}
if (Plugin.Step.Value == Plugin.DarkEnum.Legend)
{
RarityPossibilities val4 = new RarityPossibilities(Array.Empty<int>());
Chapter currentChapter4 = Singleton<Service>.Instance.levelManager.currentChapter;
Random random4 = new Random(Save.instance.randomSeed + 2028506624 + currentChapter4.type * 256 + currentChapter4.stageIndex * 16 + currentChapter4.currentStage.pathIndex);
random4.Next(0, 100);
if ((int)val4.Evaluate(random4) != 3)
{
return;
}
array = __args;
for (int i = 0; i < array.Length; i++)
{
ICollection<Character> obj4 = (ICollection<Character>)array[i];
Debug.LogError((object)obj4.Count);
foreach (Character item7 in obj4)
{
if (((int)item7.type == 0 || (int)item7.type == 2 || (int)item7.type == 3) && (int)item7.key != 15005 && (int)item7.key != 30302 && (int)item7.key != 30303 && (int)item7.key != 30304 && (int)item7.key != 10101 && (int)item7.key != 15002 && (int)item7.key != 15001 && (int)item7.key != 15010 && (int)item7.key != 10001 && (int)item7.key != 0)
{
____constructors[Singleton<HardmodeManager>.Instance.currentLevel].Provide(item7);
}
}
}
return;
}
Plugin.Step.Value = Plugin.DarkEnum.All;
array = __args;
for (int i = 0; i < array.Length; i++)
{
ICollection<Character> obj5 = (ICollection<Character>)array[i];
Debug.LogError((object)obj5.Count);
foreach (Character item8 in obj5)
{
if (((int)item8.type == 0 || (int)item8.type == 2 || (int)item8.type == 3) && (int)item8.key != 15005 && (int)item8.key != 30302 && (int)item8.key != 30303 && (int)item8.key != 30304 && (int)item8.key != 10101 && (int)item8.key != 15002 && (int)item8.key != 15001 && (int)item8.key != 15010 && (int)item8.key != 10001 && (int)item8.key != 0)
{
____constructors[Singleton<HardmodeManager>.Instance.currentLevel].Provide(item8);
}
}
}
}
[HarmonyPrefix]
[HarmonyPatch(typeof(DarkAbilityConstructor), "Provide")]
private static bool Preview(ref bool __result, ref Character target, ref DarkAbilityAttacher ____attacher)
{
//IL_0019: Unknown result type (might be due to invalid IL or missing references)
//IL_0022: Unknown result type (might be due to invalid IL or missing references)
//IL_0028: Invalid comparison between Unknown and I4
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Invalid comparison between Unknown and I4
//IL_0036: Unknown result type (might be due to invalid IL or missing references)
//IL_003c: Invalid comparison between Unknown and I4
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
//IL_005f: Invalid comparison between Unknown and I4
//IL_0063: Unknown result type (might be due to invalid IL or missing references)
//IL_0069: Invalid comparison between Unknown and I4
Debug.Log((object)"1");
if ((Object)(object)target != (Object)null)
{
if ((int)target.type == 0 || (int)target.type == 1 || (int)target.type == 6 || (int)target.type == 8)
{
Debug.Log((object)"2");
__result = false;
return true;
}
Debug.Log((object)"3");
if ((int)target.type == 3 || (int)target.type == 2)
{
Debug.Log((object)"4");
DarkAbilityAttacher obj = Object.Instantiate<DarkAbilityAttacher>(____attacher, target.attach.transform);
obj.Initialize(target);
obj.StartAttach();
__result = true;
return false;
}
Debug.Log((object)"5");
return true;
}
Debug.Log((object)"Null");
Debug.LogError((object)"target is null");
__result = false;
return false;
}
}
public static class MyPluginInfo
{
public const string PLUGIN_GUID = "DeadlyOfWorld";
public const string PLUGIN_NAME = "DeadlyOfWorld";
public const string PLUGIN_VERSION = "1.0";
}
}
namespace System.Runtime.CompilerServices
{
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
internal sealed class IgnoresAccessChecksToAttribute : Attribute
{
public IgnoresAccessChecksToAttribute(string assemblyName)
{
}
}
}