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.Core.Logging.Interpolation;
using BepInEx.Logging;
using BepInEx.Unity.IL2CPP;
using GKAPI;
using GKAPI.Difficulties;
using GKAPI.Enemies;
using GKAPI.Items;
using Gatekeeper.Char_Scripts.General.CharData;
using Gatekeeper.Enemy.Base;
using Gatekeeper.General.Events.Characters;
using Gatekeeper.General.Events.Enemies;
using Gatekeeper.General.Predictor;
using Gatekeeper.Items;
using Gatekeeper.PoolScripts;
using Gatekeeper.Utility;
using Gatekeeper.Utility.SceneHelper;
using I2.Loc;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using Microsoft.CodeAnalysis;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("RiftVariety")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("RiftVariety")]
[assembly: AssemblyTitle("RiftVariety")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[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 RiftVariety
{
[BepInPlugin("com.naccel.riftvariety", "RiftVariety", "1.2.0")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class Plugin : GkPlugin
{
public const string PluginGuid = "com.naccel.riftvariety";
public const string PluginName = "RiftVariety";
private const string PluginVersion = "1.2.0";
internal static ManualLogSource Log;
private static readonly Dictionary<string, string> RussianTerms = new Dictionary<string, string>
{
["ITEM.BASE.MONOCLE.NAME"] = "Монокль стрелка",
["ITEM.BASE.MONOCLE.DESC"] = "Твоя винтовка обретает голос.",
["ITEM.BASE.MONOCLE.STATS"] = "{[Mod1_Lvl1]}% (+{[Mod1_Lvl2]}% за стак) шанс крита. Пассивка: попадание <b>первым скилом</b> по врагу с полным здоровьем даёт +{[Mod2_Lvl1]}% урона крита на 5 сек (до 3 стаков).",
["ITEM.BASE.GREAVES.NAME"] = "Клинковые поножи",
["ITEM.BASE.GREAVES.DESC"] = "Каждый шаг оставляет шрам.",
["ITEM.BASE.GREAVES.STATS"] = "{[Mod1_Lvl1]}% (+{[Mod1_Lvl2]}% за стак) скорость передвижения, {[Mod2_Lvl1]}% скорость атаки. Пассивка: убийство даёт +12% скорости атаки на 4 сек (до 4 стаков).",
["ITEM.BASE.AEGIS.NAME"] = "Железный эгида",
["ITEM.BASE.AEGIS.DESC"] = "Стена, которая научилась истекать кровью.",
["ITEM.BASE.AEGIS.STATS"] = "−{[Mod1_Lvl1]}% (+{[Mod1_Lvl2]}% за стак) получаемого урона, +{[Mod2_Lvl1]} ХП/сек. Пассивка: получив урон, ты получаешь +8 урона на 6 сек (до 5 стаков).",
["ITEM.BASE.FANGS.NAME"] = "Клык Сирены",
["ITEM.BASE.FANGS.DESC"] = "Песня обрывается там, где ты бьёшь.",
["ITEM.BASE.FANGS.STATS"] = "{[Mod1_Lvl1]}% (+{[Mod1_Lvl2]}% за стак) урона по Сиренам, {[Mod2_Lvl1]}% скорость атаки. Пассивка: убийство даёт +3 ХП/сек реген на 4 сек (до 5 стаков).",
["ITEM.BASE.RIFTCORE.NAME"] = "Ядро Разлома",
["ITEM.BASE.RIFTCORE.DESC"] = "Разлом не пуст. Он терпелив.",
["ITEM.BASE.RIFTCORE.STATS"] = "{[Mod1_Lvl1]}% (+{[Mod1_Lvl2]}% за стак) стихийного урона, {[Mod2_Lvl1]}% урона крита. Пассивка: каждый 4-й удар скилом даёт +30% стихийного урона на 6 сек.",
["TRIAD.NAME.TRIAD OF THE VOID"] = "Триада Бездны",
["TRIAD.DESC.TRIAD OF THE VOID"] = "Пассивка «Всплеск Бездны»: третий скил даёт на 8 сек +20% скорости передвижения, +20% скорости атаки, +30% урона крита и +15 урона. Убийства во время всплеска продлевают его (+1 сек, до +5 сек).",
["TRIAD.NAME.TRIAD OF THE STORM"] = "Триада Бури",
["TRIAD.DESC.TRIAD OF THE STORM"] = "Пассивка «Грозовой двигатель»: каждый скил заряжает триаду; на 3-м заряде следующий скил детонирует — +40% урона крита и +20 урона на 6 сек. Пока эффект активен, он продлевается.",
["TRIAD.NAME.TRIAD OF THE TIDE"] = "Триада Прилива",
["TRIAD.DESC.TRIAD OF THE TIDE"] = "Пассивка «Приливная яма»: получив урон, ты запускаешь прилив — реген 20% от полученного урона на протяжении 5 сек (до 12 ХП/сек).",
["MENU.UI.DIFFICULTY.CHAOS"] = "Хаос: <b>330%</b>",
["MENU.UI.DIFFICULTY.RIFTSTORM"] = "Буря Разлома: <b>430%</b>"
};
public override void Load()
{
//IL_001b: Unknown result type (might be due to invalid IL or missing references)
//IL_0021: Expected O, but got Unknown
((GkPlugin)this).Load();
Log = ((BasePlugin)this).Log;
ManualLogSource log = Log;
bool flag = default(bool);
BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(18, 1, ref flag);
if (flag)
{
((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Plugin ");
((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>("RiftVariety");
((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" is loaded!");
}
log.LogInfo(val);
EventHandler.Init = (Action)Delegate.Combine(EventHandler.Init, (Action)delegate
{
EventHandler.LateInit = (Action)Delegate.Combine(EventHandler.LateInit, new Action(ApplyRussianLocalization));
});
}
private static void ApplyRussianLocalization()
{
//IL_012f: Unknown result type (might be due to invalid IL or missing references)
//IL_0136: Expected O, but got Unknown
//IL_00db: Unknown result type (might be due to invalid IL or missing references)
//IL_00e2: Expected O, but got Unknown
bool flag = default(bool);
try
{
LanguageSourceData val = LocalizationManager.Sources[0];
int num = -1;
for (int i = 0; i < val.mLanguages.Count; i++)
{
string name = val.mLanguages[i].Name;
if (name == "Russian" || name == "Русский")
{
num = i;
break;
}
}
if (num < 0)
{
Log.LogWarning((object)"Russian language not found in game localization sources");
return;
}
int num2 = 0;
for (int j = 0; j < val.mTerms.Count; j++)
{
TermData val2 = val.mTerms[j];
if (RussianTerms.TryGetValue(val2.Term, out var value) && num < ((Il2CppArrayBase<string>)(object)val2.Languages).Length)
{
((Il2CppArrayBase<string>)(object)val2.Languages)[num] = value;
num2++;
}
}
ManualLogSource log = Log;
BepInExInfoLogInterpolatedStringHandler val3 = new BepInExInfoLogInterpolatedStringHandler(56, 2, ref flag);
if (flag)
{
((BepInExLogInterpolatedStringHandler)val3).AppendLiteral("Applied Russian localization to ");
((BepInExLogInterpolatedStringHandler)val3).AppendFormatted<int>(num2);
((BepInExLogInterpolatedStringHandler)val3).AppendLiteral(" terms (language index ");
((BepInExLogInterpolatedStringHandler)val3).AppendFormatted<int>(num);
((BepInExLogInterpolatedStringHandler)val3).AppendLiteral(")");
}
log.LogInfo(val3);
}
catch (Exception ex)
{
ManualLogSource log2 = Log;
BepInExWarningLogInterpolatedStringHandler val4 = new BepInExWarningLogInterpolatedStringHandler(38, 1, ref flag);
if (flag)
{
((BepInExLogInterpolatedStringHandler)val4).AppendLiteral("Failed to apply Russian localization: ");
((BepInExLogInterpolatedStringHandler)val4).AppendFormatted<string>(ex.Message);
}
log2.LogWarning(val4);
}
}
public override void AddContent()
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
//IL_0021: Unknown result type (might be due to invalid IL or missing references)
//IL_0028: Expected O, but got Unknown
//IL_0060: Unknown result type (might be due to invalid IL or missing references)
//IL_00be: Unknown result type (might be due to invalid IL or missing references)
//IL_011b: Unknown result type (might be due to invalid IL or missing references)
//IL_017a: 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_0245: Unknown result type (might be due to invalid IL or missing references)
//IL_027c: 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_0294: Unknown result type (might be due to invalid IL or missing references)
//IL_02a0: Unknown result type (might be due to invalid IL or missing references)
//IL_02ad: Unknown result type (might be due to invalid IL or missing references)
//IL_02ba: Unknown result type (might be due to invalid IL or missing references)
//IL_0310: Unknown result type (might be due to invalid IL or missing references)
//IL_0364: Unknown result type (might be due to invalid IL or missing references)
if ((int)EventHandler.State != 0)
{
Log.LogError((object)"Content has to be added during PreInit!");
return;
}
ManualLogSource log = Log;
bool flag = default(bool);
BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(18, 1, ref flag);
if (flag)
{
((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Adding content of ");
((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>("RiftVariety");
}
log.LogInfo(val);
ItemAPI instance = ItemAPI.Instance;
GkItem val2 = instance.AddItem(new Builder("Sharpshooter Monocle", "Your rifle finds its voice.", "{[Mod1_Lvl1]}% (+{[Mod1_Lvl2]}% per stack) crit chance. Passive: hitting an enemy with your first skill while it is at full health grants +{[Mod2_Lvl1]}% crit damage for 5s (stacks up to 3).").WithId("Monocle").SetUnlocked(true).SetHidden(false)
.WithDropSource((ItemDropSource)(-1))
.WithMaxCount(1)
.AddModification((ItemParamModificationType)2, 0.05f, 0.02f)
.AddModification((ItemParamModificationType)83, 0.2f, 0.1f));
GkItem val3 = instance.AddItem(new Builder("Bladed Greaves", "Every step leaves a scar.", "{[Mod1_Lvl1]}% (+{[Mod1_Lvl2]}% per stack) move speed. Passive: killing an enemy grants +{[Mod2_Lvl1]}% attack speed for 4s (stacks up to 4).").WithId("Greaves").SetUnlocked(true).SetHidden(false)
.WithDropSource((ItemDropSource)(-1))
.WithMaxCount(1)
.AddModification((ItemParamModificationType)1, 0.08f, 0.03f)
.AddModification((ItemParamModificationType)0, 0.05f, 0.02f));
GkItem val4 = instance.AddItem(new Builder("Iron Aegis", "A wall that learned to bleed.", "{[Mod1_Lvl1]}% (+{[Mod1_Lvl2]}% per stack) damage taken reduction. Passive: taking damage grants +{[Mod2_Lvl1]} damage for 6s (stacks up to 5).").WithId("Aegis").SetUnlocked(true).SetHidden(false)
.WithDropSource((ItemDropSource)(-1))
.WithMaxCount(1)
.AddModification((ItemParamModificationType)13, 0.08f, 0.03f)
.AddModification((ItemParamModificationType)12, 1.5f, 0.5f));
GkItem val5 = instance.AddItem(new Builder("Siren's Fang", "The song ends where you strike.", "{[Mod1_Lvl1]}% (+{[Mod1_Lvl2]}% per stack) damage to Sirens. Passive: killing an enemy grants +{[Mod2_Lvl1]} HP/s regen for 4s (stacks up to 5).").WithId("Fangs").SetUnlocked(true).SetHidden(false)
.WithDropSource((ItemDropSource)(-1))
.WithMaxCount(1)
.AddModification((ItemParamModificationType)80, 0.15f, 0.08f)
.AddModification((ItemParamModificationType)0, 0.05f, 0.02f));
GkItem val6 = instance.AddItem(new Builder("Rift Core", "The void is not empty. It is patient.", "{[Mod1_Lvl1]}% (+{[Mod1_Lvl2]}% per stack) elemental damage. Passive: every 4th skill hit grants +{[Mod2_Lvl1]}% elemental damage for 6s.").WithId("RiftCore").SetUnlocked(true).SetHidden(false)
.WithDropSource((ItemDropSource)(-1))
.WithMaxCount(1)
.AddModification((ItemParamModificationType)28, 0.1f, 0.05f)
.AddModification((ItemParamModificationType)83, 0.15f, 0.08f));
GkItem val7 = instance.AddTriad("Triad of the Void", new List<ItemID>(new List<ItemID>
{
(ItemID)22,
(ItemID)49,
val2.GetItemID
}), (Func<Builder, Builder>)((Builder builder) => builder.SetUnlocked(true).SetHidden(false)));
instance.AddItemController<MonocleItemController>(val2.GetItemID);
instance.AddItemController<GreavesItemController>(val3.GetItemID);
instance.AddItemController<AegisItemController>(val4.GetItemID);
instance.AddItemController<FangItemController>(val5.GetItemID);
instance.AddItemController<RiftCoreItemController>(val6.GetItemID);
instance.AddItemController<VoidTriadItemController>(val7.GetItemID);
GkItem val8 = instance.AddTriad("Triad of the Storm", new List<ItemID>
{
(ItemID)25,
(ItemID)27,
(ItemID)9
}, (Func<Builder, Builder>)((Builder builder) => builder.SetUnlocked(true).SetHidden(false)));
instance.AddItemController<StormTriadItemController>(val8.GetItemID);
GkItem val9 = instance.AddTriad("Triad of the Tide", new List<ItemID>
{
(ItemID)7,
(ItemID)26,
(ItemID)97
}, (Func<Builder, Builder>)((Builder builder) => builder.SetUnlocked(true).SetHidden(false)));
instance.AddItemController<TideTriadItemController>(val9.GetItemID);
AddChaosDifficulty();
AddRiftstormDifficulty();
}
private void AddChaosDifficulty()
{
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0080: Unknown result type (might be due to invalid IL or missing references)
//IL_0094: Unknown result type (might be due to invalid IL or missing references)
//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
//IL_0102: Expected O, but got Unknown
//IL_013c: 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)
DifficultiesAPI instance = DifficultiesAPI.Instance;
EnemiesAPI instance2 = EnemiesAPI.Instance;
ValueTuple<GameDifficulty, GkDifficulty> valueTuple = instance.AddDifficulty(new Builder().WithName("Chaos").WithDifficultyValues("330%", 3.3f, 1.3f).WithGameEventsData(0, 2, 1, instance.CreateGameEventsProbabilities(0.8f))
.WithEliteSpawnData(1.1f, 0.3f, 0.6f, 0.12f, 8f, 4f, 0)
.WithInstabilityCapsuleSpeed(4.5f)
.WithColors(new Color(0.35f, 0.08f, 0.55f), new Color(0.85f, 0.15f, 0.65f))
.WithExpLoopPow(1.5f)
.WithExpPoints(30f, 180f, 50f)
.WithArenaValues(1.5f, 12f, 1.6f, 0.8f, -25f, 140f));
GameDifficulty item = valueTuple.Item1;
GkDifficulty item2 = valueTuple.Item2;
ManualLogSource log = Log;
bool flag = default(bool);
BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(39, 2, ref flag);
if (flag)
{
((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Added difficulty ");
((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(item2.DifficultyName);
((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" with game difficulty ");
((BepInExLogInterpolatedStringHandler)val).AppendFormatted<GameDifficulty>(item);
}
log.LogInfo(val);
AddChaosEnemyTemplates(instance2, item);
}
private void AddRiftstormDifficulty()
{
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0080: Unknown result type (might be due to invalid IL or missing references)
//IL_0094: Unknown result type (might be due to invalid IL or missing references)
//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
//IL_0102: Expected O, but got Unknown
//IL_013c: 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)
DifficultiesAPI instance = DifficultiesAPI.Instance;
EnemiesAPI instance2 = EnemiesAPI.Instance;
ValueTuple<GameDifficulty, GkDifficulty> valueTuple = instance.AddDifficulty(new Builder().WithName("Riftstorm").WithDifficultyValues("430%", 4.3f, 1.45f).WithGameEventsData(0, 0, 1, instance.CreateGameEventsProbabilities(1f))
.WithEliteSpawnData(1.5f, 0.4f, 0.8f, 0.15f, 10f, 5f, 0)
.WithInstabilityCapsuleSpeed(6f)
.WithColors(new Color(0.9f, 0.45f, 0.05f), new Color(0.85f, 0.15f, 0.15f))
.WithExpLoopPow(1.4f)
.WithExpPoints(35f, 200f, 60f)
.WithArenaValues(1.7f, 14f, 1.7f, 0.85f, -30f, 160f));
GameDifficulty item = valueTuple.Item1;
GkDifficulty item2 = valueTuple.Item2;
ManualLogSource log = Log;
bool flag = default(bool);
BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(39, 2, ref flag);
if (flag)
{
((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Added difficulty ");
((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(item2.DifficultyName);
((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" with game difficulty ");
((BepInExLogInterpolatedStringHandler)val).AppendFormatted<GameDifficulty>(item);
}
log.LogInfo(val);
AddRiftstormEnemyTemplates(instance2, item);
}
private void AddRiftstormEnemyTemplates(EnemiesAPI enemiesAPI, GameDifficulty gameDifficulty)
{
//IL_0102: Unknown result type (might be due to invalid IL or missing references)
//IL_0109: Expected O, but got Unknown
//IL_011f: Unknown result type (might be due to invalid IL or missing references)
//IL_0124: Unknown result type (might be due to invalid IL or missing references)
//IL_012f: 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_0150: Unknown result type (might be due to invalid IL or missing references)
(List<SceneDesignation>, string)[] array = new(List<SceneDesignation>, string)[5]
{
(TemplateHelper.AuroraScenes, "EST_1XX"),
(TemplateHelper.CelestiumScenes, "EST_2XX"),
(TemplateHelper.PurgatoryScenes, "EST_3XX"),
(TemplateHelper.AriduneScenes, "EST_4XX"),
(TemplateHelper.PaliumScenes, "EST_5XX")
};
(int, int, float)[] array2 = new(int, int, float)[3]
{
(1, 5, 0.55f),
(6, 11, 0.85f),
(12, -1, 1.2f)
};
(List<SceneDesignation>, string)[] array3 = array;
for (int i = 0; i < array3.Length; i++)
{
(List<SceneDesignation>, string) tuple = array3[i];
List<SceneDesignation> item = tuple.Item1;
string item2 = tuple.Item2;
int num = 1;
(int, int, float)[] array4 = array2;
for (int j = 0; j < array4.Length; j++)
{
(int, int, float) tuple2 = array4[j];
int item3 = tuple2.Item1;
int item4 = tuple2.Item2;
float item5 = tuple2.Item3;
ProbListBuilder val = new ProbListBuilder();
(PoolItemID, float)[] array5 = Mix(item5);
for (int k = 0; k < array5.Length; k++)
{
var (val2, num2) = array5[k];
val.AddItem(val2, num2);
}
enemiesAPI.AddKnowingTemplate(gameDifficulty, true, item, new Vector2Int(item3, item4), val.Build(), $"{item2} {num}Loop_430", false);
num++;
}
}
static (PoolItemID, float)[] Mix(float s)
{
return new(PoolItemID, float)[36]
{
((PoolItemID)301010, 0.05f * s),
((PoolItemID)301020, 0.05f * s),
((PoolItemID)301030, 0.1f * s),
((PoolItemID)301050, 0.12f * s),
((PoolItemID)301060, 0.08f * s),
((PoolItemID)301070, 0.05f * s),
((PoolItemID)301040, 0.08f * s),
((PoolItemID)302020, 0.06f * s),
((PoolItemID)302030, 0.06f * s),
((PoolItemID)302010, 0.08f * s),
((PoolItemID)302060, 0.06f * s),
((PoolItemID)302050, 0.05f * s),
((PoolItemID)302070, 0.05f * s),
((PoolItemID)302040, 0.03f * s),
((PoolItemID)303050, 0.04f * s),
((PoolItemID)303030, 0.05f * s),
((PoolItemID)303020, 0.05f * s),
((PoolItemID)303070, 0.05f * s),
((PoolItemID)303040, 0.08f * s),
((PoolItemID)303060, 0.07f * s),
((PoolItemID)303080, 0.05f * s),
((PoolItemID)304010, 0.04f * s),
((PoolItemID)304070, 0.05f * s),
((PoolItemID)304040, 0.04f * s),
((PoolItemID)304060, 0.05f * s),
((PoolItemID)304080, 0.05f * s),
((PoolItemID)304050, 0.06f * s),
((PoolItemID)304030, 0.05f * s),
((PoolItemID)305010, 0.04f * s),
((PoolItemID)305050, 0.04f * s),
((PoolItemID)305040, 0.03f * s),
((PoolItemID)305070, 0.05f * s),
((PoolItemID)305030, 0.04f * s),
((PoolItemID)305020, 0.05f * s),
((PoolItemID)305080, 0.05f * s),
((PoolItemID)305090, 0.05f * s)
};
}
}
private void AddChaosEnemyTemplates(EnemiesAPI enemiesAPI, GameDifficulty gameDifficulty)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_000a: Unknown result type (might be due to invalid IL or missing references)
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
//IL_0102: Unknown result type (might be due to invalid IL or missing references)
//IL_0107: Unknown result type (might be due to invalid IL or missing references)
//IL_01f0: 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_01ff: 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_02f1: Unknown result type (might be due to invalid IL or missing references)
//IL_02f6: Unknown result type (might be due to invalid IL or missing references)
//IL_03fd: Unknown result type (might be due to invalid IL or missing references)
//IL_0407: Unknown result type (might be due to invalid IL or missing references)
//IL_040c: Unknown result type (might be due to invalid IL or missing references)
//IL_0513: Unknown result type (might be due to invalid IL or missing references)
//IL_051d: Unknown result type (might be due to invalid IL or missing references)
//IL_0522: Unknown result type (might be due to invalid IL or missing references)
//IL_0629: Unknown result type (might be due to invalid IL or missing references)
//IL_0632: Unknown result type (might be due to invalid IL or missing references)
//IL_0637: Unknown result type (might be due to invalid IL or missing references)
//IL_072f: Unknown result type (might be due to invalid IL or missing references)
//IL_0739: Unknown result type (might be due to invalid IL or missing references)
//IL_073e: Unknown result type (might be due to invalid IL or missing references)
//IL_0836: Unknown result type (might be due to invalid IL or missing references)
//IL_0840: Unknown result type (might be due to invalid IL or missing references)
//IL_0845: Unknown result type (might be due to invalid IL or missing references)
//IL_093d: Unknown result type (might be due to invalid IL or missing references)
//IL_0946: Unknown result type (might be due to invalid IL or missing references)
//IL_094b: Unknown result type (might be due to invalid IL or missing references)
//IL_0a52: Unknown result type (might be due to invalid IL or missing references)
//IL_0a5c: Unknown result type (might be due to invalid IL or missing references)
//IL_0a61: Unknown result type (might be due to invalid IL or missing references)
//IL_0b68: Unknown result type (might be due to invalid IL or missing references)
//IL_0b72: Unknown result type (might be due to invalid IL or missing references)
//IL_0b77: Unknown result type (might be due to invalid IL or missing references)
//IL_0c7e: Unknown result type (might be due to invalid IL or missing references)
//IL_0c87: Unknown result type (might be due to invalid IL or missing references)
//IL_0c8c: Unknown result type (might be due to invalid IL or missing references)
//IL_0da2: Unknown result type (might be due to invalid IL or missing references)
//IL_0dac: Unknown result type (might be due to invalid IL or missing references)
//IL_0db1: Unknown result type (might be due to invalid IL or missing references)
//IL_0ec7: Unknown result type (might be due to invalid IL or missing references)
//IL_0ed1: Unknown result type (might be due to invalid IL or missing references)
//IL_0ed6: Unknown result type (might be due to invalid IL or missing references)
enemiesAPI.AddKnowingTemplate(gameDifficulty, true, TemplateHelper.AuroraScenes, new Vector2Int(1, 5), new ProbListBuilder().AddItem((PoolItemID)301010, 0.08f).AddItem((PoolItemID)301020, 0.06f).AddItem((PoolItemID)301030, 0.14f)
.AddItem((PoolItemID)301050, 0.2f)
.AddItem((PoolItemID)301060, 0.1f)
.AddItem((PoolItemID)301070, 0.06f)
.AddItem((PoolItemID)301040, 0.12f)
.AddItem((PoolItemID)302020, 0.06f)
.AddItem((PoolItemID)302030, 0.06f)
.AddItem((PoolItemID)302010, 0.08f)
.AddItem((PoolItemID)302060, 0.04f)
.AddItem((PoolItemID)302050, 0.02f)
.AddItem((PoolItemID)302070, 0.02f)
.AddItem((PoolItemID)302040, 0.02f)
.Build(), "EST_1XX 1Loop_330", false);
enemiesAPI.AddKnowingTemplate(gameDifficulty, true, TemplateHelper.AuroraScenes, new Vector2Int(6, 11), new ProbListBuilder().AddItem((PoolItemID)301010, 0.05f).AddItem((PoolItemID)301020, 0.04f).AddItem((PoolItemID)301030, 0.12f)
.AddItem((PoolItemID)301050, 0.24f)
.AddItem((PoolItemID)301060, 0.12f)
.AddItem((PoolItemID)301070, 0.06f)
.AddItem((PoolItemID)301040, 0.1f)
.AddItem((PoolItemID)302020, 0.06f)
.AddItem((PoolItemID)302030, 0.06f)
.AddItem((PoolItemID)302010, 0.08f)
.AddItem((PoolItemID)302060, 0.06f)
.AddItem((PoolItemID)302050, 0.03f)
.AddItem((PoolItemID)302070, 0.03f)
.AddItem((PoolItemID)302040, 0.03f)
.Build(), "EST_1XX 2Loop_330", false);
enemiesAPI.AddKnowingTemplate(gameDifficulty, true, TemplateHelper.AuroraScenes, new Vector2Int(12, -1), new ProbListBuilder().AddItem((PoolItemID)301010, 0.04f).AddItem((PoolItemID)301020, 0.03f).AddItem((PoolItemID)301030, 0.1f)
.AddItem((PoolItemID)301050, 0.22f)
.AddItem((PoolItemID)301060, 0.1f)
.AddItem((PoolItemID)301070, 0.05f)
.AddItem((PoolItemID)301040, 0.09f)
.AddItem((PoolItemID)302020, 0.07f)
.AddItem((PoolItemID)302030, 0.07f)
.AddItem((PoolItemID)302010, 0.08f)
.AddItem((PoolItemID)302060, 0.08f)
.AddItem((PoolItemID)302050, 0.04f)
.AddItem((PoolItemID)302070, 0.04f)
.AddItem((PoolItemID)302040, 0.04f)
.Build(), "EST_1XX 3Loop_330", false);
enemiesAPI.AddKnowingTemplate(gameDifficulty, true, TemplateHelper.CelestiumScenes, new Vector2Int(1, 5), new ProbListBuilder().AddItem((PoolItemID)303050, 0.06f).AddItem((PoolItemID)303030, 0.06f).AddItem((PoolItemID)303020, 0.06f)
.AddItem((PoolItemID)303070, 0.06f)
.AddItem((PoolItemID)303040, 0.1f)
.AddItem((PoolItemID)303060, 0.08f)
.AddItem((PoolItemID)303080, 0.04f)
.AddItem((PoolItemID)301010, 0.04f)
.AddItem((PoolItemID)301020, 0.04f)
.AddItem((PoolItemID)301030, 0.1f)
.AddItem((PoolItemID)301050, 0.16f)
.AddItem((PoolItemID)301060, 0.08f)
.AddItem((PoolItemID)301070, 0.05f)
.AddItem((PoolItemID)302020, 0.05f)
.AddItem((PoolItemID)302030, 0.05f)
.AddItem((PoolItemID)302010, 0.06f)
.Build(), "EST_2XX 1Loop_330", false);
enemiesAPI.AddKnowingTemplate(gameDifficulty, true, TemplateHelper.CelestiumScenes, new Vector2Int(6, 11), new ProbListBuilder().AddItem((PoolItemID)303050, 0.05f).AddItem((PoolItemID)303030, 0.05f).AddItem((PoolItemID)303020, 0.05f)
.AddItem((PoolItemID)303070, 0.05f)
.AddItem((PoolItemID)303040, 0.08f)
.AddItem((PoolItemID)303060, 0.06f)
.AddItem((PoolItemID)303080, 0.04f)
.AddItem((PoolItemID)301010, 0.05f)
.AddItem((PoolItemID)301020, 0.04f)
.AddItem((PoolItemID)301030, 0.11f)
.AddItem((PoolItemID)301050, 0.18f)
.AddItem((PoolItemID)301060, 0.09f)
.AddItem((PoolItemID)301070, 0.05f)
.AddItem((PoolItemID)302020, 0.05f)
.AddItem((PoolItemID)302030, 0.05f)
.AddItem((PoolItemID)302010, 0.07f)
.Build(), "EST_2XX 2Loop_330", false);
enemiesAPI.AddKnowingTemplate(gameDifficulty, true, TemplateHelper.CelestiumScenes, new Vector2Int(12, -1), new ProbListBuilder().AddItem((PoolItemID)303050, 0.04f).AddItem((PoolItemID)303030, 0.04f).AddItem((PoolItemID)303020, 0.04f)
.AddItem((PoolItemID)303070, 0.04f)
.AddItem((PoolItemID)303040, 0.07f)
.AddItem((PoolItemID)303060, 0.05f)
.AddItem((PoolItemID)303080, 0.03f)
.AddItem((PoolItemID)301010, 0.04f)
.AddItem((PoolItemID)301020, 0.04f)
.AddItem((PoolItemID)301030, 0.1f)
.AddItem((PoolItemID)301050, 0.16f)
.AddItem((PoolItemID)301060, 0.08f)
.AddItem((PoolItemID)301070, 0.05f)
.AddItem((PoolItemID)302020, 0.05f)
.AddItem((PoolItemID)302030, 0.05f)
.AddItem((PoolItemID)302010, 0.06f)
.Build(), "EST_2XX 3Loop_330", false);
enemiesAPI.AddKnowingTemplate(gameDifficulty, true, TemplateHelper.PurgatoryScenes, new Vector2Int(1, 5), new ProbListBuilder().AddItem((PoolItemID)303040, 0.08f).AddItem((PoolItemID)303060, 0.06f).AddItem((PoolItemID)303080, 0.05f)
.AddItem((PoolItemID)303030, 0.06f)
.AddItem((PoolItemID)303020, 0.06f)
.AddItem((PoolItemID)303070, 0.06f)
.AddItem((PoolItemID)301010, 0.06f)
.AddItem((PoolItemID)301020, 0.06f)
.AddItem((PoolItemID)301030, 0.1f)
.AddItem((PoolItemID)301050, 0.14f)
.AddItem((PoolItemID)301060, 0.06f)
.AddItem((PoolItemID)301070, 0.04f)
.AddItem((PoolItemID)302020, 0.05f)
.AddItem((PoolItemID)302030, 0.05f)
.AddItem((PoolItemID)302010, 0.05f)
.Build(), "EST_3XX 1Loop_330", false);
enemiesAPI.AddKnowingTemplate(gameDifficulty, true, TemplateHelper.PurgatoryScenes, new Vector2Int(6, 11), new ProbListBuilder().AddItem((PoolItemID)303040, 0.07f).AddItem((PoolItemID)303060, 0.05f).AddItem((PoolItemID)303080, 0.05f)
.AddItem((PoolItemID)303030, 0.05f)
.AddItem((PoolItemID)303020, 0.05f)
.AddItem((PoolItemID)303070, 0.05f)
.AddItem((PoolItemID)301010, 0.05f)
.AddItem((PoolItemID)301020, 0.05f)
.AddItem((PoolItemID)301030, 0.11f)
.AddItem((PoolItemID)301050, 0.16f)
.AddItem((PoolItemID)301060, 0.08f)
.AddItem((PoolItemID)301070, 0.05f)
.AddItem((PoolItemID)302020, 0.05f)
.AddItem((PoolItemID)302030, 0.05f)
.AddItem((PoolItemID)302010, 0.06f)
.Build(), "EST_3XX 2Loop_330", false);
enemiesAPI.AddKnowingTemplate(gameDifficulty, true, TemplateHelper.PurgatoryScenes, new Vector2Int(12, -1), new ProbListBuilder().AddItem((PoolItemID)303040, 0.06f).AddItem((PoolItemID)303060, 0.04f).AddItem((PoolItemID)303080, 0.04f)
.AddItem((PoolItemID)303030, 0.04f)
.AddItem((PoolItemID)303020, 0.04f)
.AddItem((PoolItemID)303070, 0.04f)
.AddItem((PoolItemID)301010, 0.04f)
.AddItem((PoolItemID)301020, 0.04f)
.AddItem((PoolItemID)301030, 0.09f)
.AddItem((PoolItemID)301050, 0.14f)
.AddItem((PoolItemID)301060, 0.06f)
.AddItem((PoolItemID)301070, 0.05f)
.AddItem((PoolItemID)302020, 0.06f)
.AddItem((PoolItemID)302030, 0.06f)
.AddItem((PoolItemID)302010, 0.06f)
.Build(), "EST_3XX 3Loop_330", false);
enemiesAPI.AddKnowingTemplate(gameDifficulty, true, TemplateHelper.AriduneScenes, new Vector2Int(1, 5), new ProbListBuilder().AddItem((PoolItemID)304010, 0.06f).AddItem((PoolItemID)304070, 0.06f).AddItem((PoolItemID)304040, 0.06f)
.AddItem((PoolItemID)304060, 0.06f)
.AddItem((PoolItemID)304080, 0.06f)
.AddItem((PoolItemID)304050, 0.08f)
.AddItem((PoolItemID)304030, 0.04f)
.AddItem((PoolItemID)301010, 0.05f)
.AddItem((PoolItemID)301020, 0.05f)
.AddItem((PoolItemID)301030, 0.1f)
.AddItem((PoolItemID)301050, 0.14f)
.AddItem((PoolItemID)301060, 0.06f)
.AddItem((PoolItemID)301070, 0.04f)
.AddItem((PoolItemID)302020, 0.05f)
.AddItem((PoolItemID)302030, 0.05f)
.AddItem((PoolItemID)302010, 0.05f)
.Build(), "EST_4XX 1Loop_330", false);
enemiesAPI.AddKnowingTemplate(gameDifficulty, true, TemplateHelper.AriduneScenes, new Vector2Int(6, 11), new ProbListBuilder().AddItem((PoolItemID)304010, 0.05f).AddItem((PoolItemID)304070, 0.05f).AddItem((PoolItemID)304040, 0.05f)
.AddItem((PoolItemID)304060, 0.05f)
.AddItem((PoolItemID)304080, 0.05f)
.AddItem((PoolItemID)304050, 0.07f)
.AddItem((PoolItemID)304030, 0.04f)
.AddItem((PoolItemID)301010, 0.05f)
.AddItem((PoolItemID)301020, 0.05f)
.AddItem((PoolItemID)301030, 0.11f)
.AddItem((PoolItemID)301050, 0.16f)
.AddItem((PoolItemID)301060, 0.07f)
.AddItem((PoolItemID)301070, 0.04f)
.AddItem((PoolItemID)302020, 0.05f)
.AddItem((PoolItemID)302030, 0.05f)
.AddItem((PoolItemID)302010, 0.05f)
.Build(), "EST_4XX 2Loop_330", false);
enemiesAPI.AddKnowingTemplate(gameDifficulty, true, TemplateHelper.AriduneScenes, new Vector2Int(12, -1), new ProbListBuilder().AddItem((PoolItemID)304010, 0.04f).AddItem((PoolItemID)304070, 0.04f).AddItem((PoolItemID)304040, 0.04f)
.AddItem((PoolItemID)304060, 0.04f)
.AddItem((PoolItemID)304080, 0.04f)
.AddItem((PoolItemID)304050, 0.06f)
.AddItem((PoolItemID)304030, 0.03f)
.AddItem((PoolItemID)301010, 0.05f)
.AddItem((PoolItemID)301020, 0.05f)
.AddItem((PoolItemID)301030, 0.1f)
.AddItem((PoolItemID)301050, 0.15f)
.AddItem((PoolItemID)301060, 0.07f)
.AddItem((PoolItemID)301070, 0.05f)
.AddItem((PoolItemID)302020, 0.05f)
.AddItem((PoolItemID)302030, 0.05f)
.AddItem((PoolItemID)302010, 0.05f)
.Build(), "EST_4XX 3Loop_330", false);
enemiesAPI.AddKnowingTemplate(gameDifficulty, true, TemplateHelper.PaliumScenes, new Vector2Int(1, 5), new ProbListBuilder().AddItem((PoolItemID)305010, 0.05f).AddItem((PoolItemID)305050, 0.05f).AddItem((PoolItemID)305040, 0.04f)
.AddItem((PoolItemID)305070, 0.05f)
.AddItem((PoolItemID)305030, 0.05f)
.AddItem((PoolItemID)305020, 0.06f)
.AddItem((PoolItemID)305080, 0.06f)
.AddItem((PoolItemID)305090, 0.03f)
.AddItem((PoolItemID)301010, 0.04f)
.AddItem((PoolItemID)301020, 0.04f)
.AddItem((PoolItemID)301030, 0.1f)
.AddItem((PoolItemID)301050, 0.14f)
.AddItem((PoolItemID)301060, 0.06f)
.AddItem((PoolItemID)301070, 0.05f)
.AddItem((PoolItemID)302020, 0.05f)
.AddItem((PoolItemID)302030, 0.05f)
.AddItem((PoolItemID)302010, 0.05f)
.Build(), "EST_5XX 1Loop_330", false);
enemiesAPI.AddKnowingTemplate(gameDifficulty, true, TemplateHelper.PaliumScenes, new Vector2Int(6, 11), new ProbListBuilder().AddItem((PoolItemID)305010, 0.04f).AddItem((PoolItemID)305050, 0.04f).AddItem((PoolItemID)305040, 0.03f)
.AddItem((PoolItemID)305070, 0.05f)
.AddItem((PoolItemID)305030, 0.05f)
.AddItem((PoolItemID)305020, 0.06f)
.AddItem((PoolItemID)305080, 0.06f)
.AddItem((PoolItemID)305090, 0.04f)
.AddItem((PoolItemID)301010, 0.05f)
.AddItem((PoolItemID)301020, 0.05f)
.AddItem((PoolItemID)301030, 0.11f)
.AddItem((PoolItemID)301050, 0.16f)
.AddItem((PoolItemID)301060, 0.07f)
.AddItem((PoolItemID)301070, 0.05f)
.AddItem((PoolItemID)302020, 0.05f)
.AddItem((PoolItemID)302030, 0.05f)
.AddItem((PoolItemID)302010, 0.05f)
.Build(), "EST_5XX 2Loop_330", false);
enemiesAPI.AddKnowingTemplate(gameDifficulty, true, TemplateHelper.PaliumScenes, new Vector2Int(12, -1), new ProbListBuilder().AddItem((PoolItemID)305010, 0.03f).AddItem((PoolItemID)305050, 0.03f).AddItem((PoolItemID)305040, 0.03f)
.AddItem((PoolItemID)305070, 0.04f)
.AddItem((PoolItemID)305030, 0.04f)
.AddItem((PoolItemID)305020, 0.05f)
.AddItem((PoolItemID)305080, 0.05f)
.AddItem((PoolItemID)305090, 0.03f)
.AddItem((PoolItemID)301010, 0.04f)
.AddItem((PoolItemID)301020, 0.04f)
.AddItem((PoolItemID)301030, 0.09f)
.AddItem((PoolItemID)301050, 0.13f)
.AddItem((PoolItemID)301060, 0.05f)
.AddItem((PoolItemID)301070, 0.04f)
.AddItem((PoolItemID)302020, 0.05f)
.AddItem((PoolItemID)302030, 0.05f)
.AddItem((PoolItemID)302010, 0.05f)
.Build(), "EST_5XX 3Loop_330", false);
}
}
public class VoidTriadItemController : CustomItemController
{
private const float BaseDuration = 8f;
private const float KillExtension = 1f;
private const float MaxExtension = 5f;
private const float SurgeMoveSpeed = 0.2f;
private const float SurgeAttackSpeed = 0.2f;
private const float SurgeCritDamage = 0.3f;
private const float SurgeDamage = 15f;
private bool _surgeActive;
private float _surgeEndTime;
private float _extension;
private float _attackSpeedBaseline = float.MinValue;
private void EndSurge()
{
//IL_007f: Unknown result type (might be due to invalid IL or missing references)
//IL_0085: Expected O, but got Unknown
_surgeActive = false;
CharData charData = ((ItemController)this).charData;
if ((Object)(object)charData == (Object)null)
{
return;
}
try
{
charData.DamageData.RemoveExtraCritDamagePercent(0.3f);
charData.DamageData.RemoveExtraDamage(15f);
charData.MoveSpeedData.AddMovementSpeedPercentageFromEvolution(-0.2f);
if (_attackSpeedBaseline != float.MinValue)
{
charData.AttackSpeedData.AttackSpeedPercentageFromSkillsTemporary = _attackSpeedBaseline;
}
_attackSpeedBaseline = float.MinValue;
}
catch (Exception ex)
{
ManualLogSource log = Plugin.Log;
bool flag = default(bool);
BepInExWarningLogInterpolatedStringHandler val = new BepInExWarningLogInterpolatedStringHandler(27, 1, ref flag);
if (flag)
{
((BepInExLogInterpolatedStringHandler)val).AppendLiteral("VoidTriad EndSurge failed: ");
((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(ex.Message);
}
log.LogWarning(val);
}
}
public override void OwnerHandleSkillUsed(EventClientCharacterSkillUsed eventData)
{
//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
//IL_00b0: Expected O, but got Unknown
//IL_0009: Unknown result type (might be due to invalid IL or missing references)
//IL_000f: Invalid comparison between Unknown and I4
if (!((ItemController)this).IsItemInInventory || (int)eventData.SkillType != 3)
{
return;
}
CharData charData = ((ItemController)this).charData;
if ((Object)(object)charData == (Object)null)
{
return;
}
if (_surgeActive)
{
_surgeEndTime = Time.time + 8f + _extension;
return;
}
try
{
charData.DamageData.AddExtraCritDamagePercent(0.3f);
charData.DamageData.AddExtraDamage(15f);
charData.MoveSpeedData.AddMovementSpeedPercentageFromEvolution(0.2f);
_attackSpeedBaseline = charData.AttackSpeedData.AttackSpeedPercentageFromSkillsTemporary;
charData.AttackSpeedData.AttackSpeedPercentageFromSkillsTemporary = _attackSpeedBaseline + 0.2f;
}
catch (Exception ex)
{
ManualLogSource log = Plugin.Log;
bool flag = default(bool);
BepInExWarningLogInterpolatedStringHandler val = new BepInExWarningLogInterpolatedStringHandler(29, 1, ref flag);
if (flag)
{
((BepInExLogInterpolatedStringHandler)val).AppendLiteral("VoidTriad StartSurge failed: ");
((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(ex.Message);
}
log.LogWarning(val);
return;
}
_extension = 0f;
_surgeActive = true;
_surgeEndTime = Time.time + 8f;
}
public override void OwnerHandleOnEnemyDied(EventClientEnemyDied eventData)
{
if (_surgeActive && _extension < 5f)
{
_extension += 1f;
_surgeEndTime += 1f;
}
}
private void Update()
{
if (_surgeActive && Time.time >= _surgeEndTime)
{
EndSurge();
}
}
}
public class MonocleItemController : CustomItemController
{
private const float CritDamagePerStack = 0.2f;
private const int MaxStacks = 3;
private const float Duration = 5f;
private int _stacks;
private float _stackExpiry;
public override void OwnerHandleFirstSkillHit(IEnemy enemy, EventOwnerCharacterHitSomething eventData)
{
//IL_0074: Unknown result type (might be due to invalid IL or missing references)
//IL_007a: Expected O, but got Unknown
if (!((ItemController)this).IsItemInInventory || !eventData.WasEnemyAtFullHealth)
{
return;
}
CharData charData = ((ItemController)this).charData;
if ((Object)(object)charData == (Object)null)
{
return;
}
if (_stacks == 0)
{
_stackExpiry = Time.time + 5f;
}
if (_stacks >= 3)
{
_stackExpiry = Time.time + 5f;
return;
}
try
{
charData.DamageData.AddExtraCritDamagePercent(0.2f);
}
catch (Exception ex)
{
ManualLogSource log = Plugin.Log;
bool flag = default(bool);
BepInExWarningLogInterpolatedStringHandler val = new BepInExWarningLogInterpolatedStringHandler(21, 1, ref flag);
if (flag)
{
((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Monocle proc failed: ");
((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(ex.Message);
}
log.LogWarning(val);
return;
}
_stacks++;
_stackExpiry = Time.time + 5f;
}
private void Update()
{
//IL_0046: Unknown result type (might be due to invalid IL or missing references)
//IL_004c: Expected O, but got Unknown
if (_stacks <= 0 || !(Time.time >= _stackExpiry))
{
return;
}
try
{
CharData charData = ((ItemController)this).charData;
if (charData != null)
{
charData.DamageData.RemoveExtraCritDamagePercent(0.2f * (float)_stacks);
}
}
catch (Exception ex)
{
ManualLogSource log = Plugin.Log;
bool flag = default(bool);
BepInExWarningLogInterpolatedStringHandler val = new BepInExWarningLogInterpolatedStringHandler(23, 1, ref flag);
if (flag)
{
((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Monocle expiry failed: ");
((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(ex.Message);
}
log.LogWarning(val);
}
_stacks = 0;
}
}
public class GreavesItemController : CustomItemController
{
private const float AttackSpeedPerStack = 0.12f;
private const int MaxStacks = 4;
private const float Duration = 4f;
private int _stacks;
private float _stackExpiry;
private float _baseline = float.MinValue;
public override void OwnerHandleOnEnemyDied(EventClientEnemyDied eventData)
{
//IL_007d: Unknown result type (might be due to invalid IL or missing references)
//IL_0083: Expected O, but got Unknown
if (!((ItemController)this).IsItemInInventory)
{
return;
}
CharData charData = ((ItemController)this).charData;
if ((Object)(object)charData == (Object)null)
{
return;
}
if (_stacks >= 4)
{
_stackExpiry = Time.time + 4f;
return;
}
if (_stacks == 0)
{
_baseline = charData.AttackSpeedData.AttackSpeedPercentageFromSkillsTemporary;
}
try
{
charData.AttackSpeedData.AttackSpeedPercentageFromSkillsTemporary = _baseline + 0.12f * (float)(_stacks + 1);
}
catch (Exception ex)
{
ManualLogSource log = Plugin.Log;
bool flag = default(bool);
BepInExWarningLogInterpolatedStringHandler val = new BepInExWarningLogInterpolatedStringHandler(21, 1, ref flag);
if (flag)
{
((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Greaves proc failed: ");
((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(ex.Message);
}
log.LogWarning(val);
return;
}
_stacks++;
_stackExpiry = Time.time + 4f;
}
private void Update()
{
//IL_0057: Unknown result type (might be due to invalid IL or missing references)
//IL_005d: Expected O, but got Unknown
if (_stacks <= 0 || !(Time.time >= _stackExpiry))
{
return;
}
try
{
if (_baseline != float.MinValue && (Object)(object)((ItemController)this).charData != (Object)null)
{
((ItemController)this).charData.AttackSpeedData.AttackSpeedPercentageFromSkillsTemporary = _baseline;
}
}
catch (Exception ex)
{
ManualLogSource log = Plugin.Log;
bool flag = default(bool);
BepInExWarningLogInterpolatedStringHandler val = new BepInExWarningLogInterpolatedStringHandler(23, 1, ref flag);
if (flag)
{
((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Greaves expiry failed: ");
((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(ex.Message);
}
log.LogWarning(val);
}
_stacks = 0;
_baseline = float.MinValue;
}
}
public class AegisItemController : CustomItemController
{
private const float DamagePerStack = 8f;
private const int MaxStacks = 5;
private const float Duration = 6f;
private int _stacks;
private float _stackExpiry;
public override void OwnerHandleDamageTaken(DamageType damageType, float damageTaken)
{
//IL_005b: Unknown result type (might be due to invalid IL or missing references)
//IL_0061: Expected O, but got Unknown
if (!((ItemController)this).IsItemInInventory || damageTaken <= 0f)
{
return;
}
CharData charData = ((ItemController)this).charData;
if ((Object)(object)charData == (Object)null)
{
return;
}
if (_stacks >= 5)
{
_stackExpiry = Time.time + 6f;
return;
}
try
{
charData.DamageData.AddDamageFromSkillsTemporary(8f);
}
catch (Exception ex)
{
ManualLogSource log = Plugin.Log;
bool flag = default(bool);
BepInExWarningLogInterpolatedStringHandler val = new BepInExWarningLogInterpolatedStringHandler(19, 1, ref flag);
if (flag)
{
((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Aegis proc failed: ");
((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(ex.Message);
}
log.LogWarning(val);
return;
}
_stacks++;
_stackExpiry = Time.time + 6f;
}
private void Update()
{
//IL_0046: Unknown result type (might be due to invalid IL or missing references)
//IL_004c: Expected O, but got Unknown
if (_stacks <= 0 || !(Time.time >= _stackExpiry))
{
return;
}
try
{
CharData charData = ((ItemController)this).charData;
if (charData != null)
{
charData.DamageData.RemoveDamageFromSkillsTemporary(8f * (float)_stacks);
}
}
catch (Exception ex)
{
ManualLogSource log = Plugin.Log;
bool flag = default(bool);
BepInExWarningLogInterpolatedStringHandler val = new BepInExWarningLogInterpolatedStringHandler(21, 1, ref flag);
if (flag)
{
((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Aegis expiry failed: ");
((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(ex.Message);
}
log.LogWarning(val);
}
_stacks = 0;
}
}
public class FangItemController : CustomItemController
{
private const float RegenPerStack = 3f;
private const int MaxStacks = 5;
private const float Duration = 4f;
private int _stacks;
private float _stackExpiry;
public override void OwnerHandleOnEnemyDied(EventClientEnemyDied eventData)
{
//IL_0053: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Expected O, but got Unknown
if (!((ItemController)this).IsItemInInventory)
{
return;
}
CharData charData = ((ItemController)this).charData;
if ((Object)(object)charData == (Object)null)
{
return;
}
if (_stacks >= 5)
{
_stackExpiry = Time.time + 4f;
return;
}
try
{
charData.HealthData.AddHealthRegenerationFromEvolution(3f);
}
catch (Exception ex)
{
ManualLogSource log = Plugin.Log;
bool flag = default(bool);
BepInExWarningLogInterpolatedStringHandler val = new BepInExWarningLogInterpolatedStringHandler(18, 1, ref flag);
if (flag)
{
((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Fang proc failed: ");
((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(ex.Message);
}
log.LogWarning(val);
return;
}
_stacks++;
_stackExpiry = Time.time + 4f;
}
private void Update()
{
//IL_0046: Unknown result type (might be due to invalid IL or missing references)
//IL_004c: Expected O, but got Unknown
if (_stacks <= 0 || !(Time.time >= _stackExpiry))
{
return;
}
try
{
CharData charData = ((ItemController)this).charData;
if (charData != null)
{
charData.HealthData.AddHealthRegenerationFromEvolution(-3f * (float)_stacks);
}
}
catch (Exception ex)
{
ManualLogSource log = Plugin.Log;
bool flag = default(bool);
BepInExWarningLogInterpolatedStringHandler val = new BepInExWarningLogInterpolatedStringHandler(20, 1, ref flag);
if (flag)
{
((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Fang expiry failed: ");
((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(ex.Message);
}
log.LogWarning(val);
}
_stacks = 0;
}
}
public class RiftCoreItemController : CustomItemController
{
private const int HitsPerProc = 4;
private const float ElementalPerProc = 0.3f;
private const float Duration = 6f;
private int _hitCounter;
private bool _procActive;
private float _procExpiry;
public override void OwnerSkillHit(IEnemy enemy, EventOwnerCharacterHitSomething eventData)
{
//IL_0071: Unknown result type (might be due to invalid IL or missing references)
//IL_0077: Expected O, but got Unknown
if (!((ItemController)this).IsItemInInventory)
{
return;
}
CharData charData = ((ItemController)this).charData;
if ((Object)(object)charData == (Object)null)
{
return;
}
_hitCounter++;
if (_hitCounter < 4)
{
return;
}
_hitCounter = 0;
if (_procActive)
{
_procExpiry = Time.time + 6f;
return;
}
try
{
charData.DamageData.AddElementalDamageFromEvolution(0.3f);
}
catch (Exception ex)
{
ManualLogSource log = Plugin.Log;
bool flag = default(bool);
BepInExWarningLogInterpolatedStringHandler val = new BepInExWarningLogInterpolatedStringHandler(22, 1, ref flag);
if (flag)
{
((BepInExLogInterpolatedStringHandler)val).AppendLiteral("RiftCore proc failed: ");
((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(ex.Message);
}
log.LogWarning(val);
return;
}
_procActive = true;
_procExpiry = Time.time + 6f;
}
private void Update()
{
//IL_003d: Unknown result type (might be due to invalid IL or missing references)
//IL_0043: Expected O, but got Unknown
if (!_procActive || !(Time.time >= _procExpiry))
{
return;
}
try
{
CharData charData = ((ItemController)this).charData;
if (charData != null)
{
charData.DamageData.AddElementalDamageFromEvolution(-0.3f);
}
}
catch (Exception ex)
{
ManualLogSource log = Plugin.Log;
bool flag = default(bool);
BepInExWarningLogInterpolatedStringHandler val = new BepInExWarningLogInterpolatedStringHandler(24, 1, ref flag);
if (flag)
{
((BepInExLogInterpolatedStringHandler)val).AppendLiteral("RiftCore expiry failed: ");
((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(ex.Message);
}
log.LogWarning(val);
}
_procActive = false;
}
}
public class StormTriadItemController : CustomItemController
{
private const int ChargesNeeded = 3;
private const float CritDamage = 0.4f;
private const float Damage = 20f;
private const float Duration = 6f;
private int _charges;
private bool _procActive;
private float _procExpiry;
public override void OwnerHandleSkillUsed(EventClientCharacterSkillUsed eventData)
{
//IL_0080: Unknown result type (might be due to invalid IL or missing references)
//IL_0086: Expected O, but got Unknown
if (!((ItemController)this).IsItemInInventory)
{
return;
}
CharData charData = ((ItemController)this).charData;
if ((Object)(object)charData == (Object)null)
{
return;
}
if (_procActive)
{
_procExpiry = Time.time + 6f;
return;
}
_charges++;
if (_charges < 3)
{
return;
}
_charges = 0;
try
{
charData.DamageData.AddExtraCritDamagePercent(0.4f);
charData.DamageData.AddExtraDamage(20f);
}
catch (Exception ex)
{
ManualLogSource log = Plugin.Log;
bool flag = default(bool);
BepInExWarningLogInterpolatedStringHandler val = new BepInExWarningLogInterpolatedStringHandler(24, 1, ref flag);
if (flag)
{
((BepInExLogInterpolatedStringHandler)val).AppendLiteral("StormTriad proc failed: ");
((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(ex.Message);
}
log.LogWarning(val);
return;
}
_procActive = true;
_procExpiry = Time.time + 6f;
}
private void Update()
{
//IL_0058: Unknown result type (might be due to invalid IL or missing references)
//IL_005e: Expected O, but got Unknown
if (!_procActive || !(Time.time >= _procExpiry))
{
return;
}
try
{
CharData charData = ((ItemController)this).charData;
if (charData != null)
{
charData.DamageData.RemoveExtraCritDamagePercent(0.4f);
}
CharData charData2 = ((ItemController)this).charData;
if (charData2 != null)
{
charData2.DamageData.RemoveExtraDamage(20f);
}
}
catch (Exception ex)
{
ManualLogSource log = Plugin.Log;
bool flag = default(bool);
BepInExWarningLogInterpolatedStringHandler val = new BepInExWarningLogInterpolatedStringHandler(26, 1, ref flag);
if (flag)
{
((BepInExLogInterpolatedStringHandler)val).AppendLiteral("StormTriad expiry failed: ");
((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(ex.Message);
}
log.LogWarning(val);
}
_procActive = false;
}
}
public class TideTriadItemController : CustomItemController
{
private const float RegenPerDamage = 0.2f;
private const float MaxRegen = 12f;
private const float Duration = 5f;
private float _regenAmount;
private float _tideExpiry;
public override void OwnerHandleDamageTaken(DamageType damageType, float damageTaken)
{
//IL_006f: Unknown result type (might be due to invalid IL or missing references)
//IL_0075: Expected O, but got Unknown
if (!((ItemController)this).IsItemInInventory || damageTaken <= 0f)
{
return;
}
CharData charData = ((ItemController)this).charData;
if ((Object)(object)charData == (Object)null)
{
return;
}
float num = Mathf.Min(damageTaken * 0.2f, 12f - _regenAmount);
if (num <= 0f)
{
_tideExpiry = Time.time + 5f;
return;
}
try
{
charData.HealthData.AddHealthRegenerationFromEvolution(num);
}
catch (Exception ex)
{
ManualLogSource log = Plugin.Log;
bool flag = default(bool);
BepInExWarningLogInterpolatedStringHandler val = new BepInExWarningLogInterpolatedStringHandler(23, 1, ref flag);
if (flag)
{
((BepInExLogInterpolatedStringHandler)val).AppendLiteral("TideTriad proc failed: ");
((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(ex.Message);
}
log.LogWarning(val);
return;
}
_regenAmount += num;
_tideExpiry = Time.time + 5f;
}
private void Update()
{
//IL_0044: Unknown result type (might be due to invalid IL or missing references)
//IL_004a: Expected O, but got Unknown
if (!(_regenAmount > 0f) || !(Time.time >= _tideExpiry))
{
return;
}
try
{
CharData charData = ((ItemController)this).charData;
if (charData != null)
{
charData.HealthData.AddHealthRegenerationFromEvolution(0f - _regenAmount);
}
}
catch (Exception ex)
{
ManualLogSource log = Plugin.Log;
bool flag = default(bool);
BepInExWarningLogInterpolatedStringHandler val = new BepInExWarningLogInterpolatedStringHandler(25, 1, ref flag);
if (flag)
{
((BepInExLogInterpolatedStringHandler)val).AppendLiteral("TideTriad expiry failed: ");
((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(ex.Message);
}
log.LogWarning(val);
}
_regenAmount = 0f;
}
}
public static class MyPluginInfo
{
public const string PLUGIN_GUID = "RiftVariety";
public const string PLUGIN_NAME = "RiftVariety";
public const string PLUGIN_VERSION = "1.0.0";
}
}