Decompiled source of SkillsReturns v0.6.1
SkillsReturns.dll
Decompiled 2 days ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using EntityStates; using EntityStates.Captain.Weapon; using EntityStates.Merc; using IL.RoR2; using Microsoft.CodeAnalysis; using Mono.Cecil.Cil; using MonoMod.Cil; using On.RoR2; using R2API; using RoR2; using RoR2.Projectile; using RoR2.Skills; using RoR2.UI; using ShaderSwapper; using SkillsReturns.SharedHooks; using SkillsReturns.SkillSetup; using SkillsReturns.SkillSetup.Bandit2.Components.Dynamite; using SkillsReturns.SkillSetup.Commando; using SkillsReturns.SkillSetup.Engineer.Components; using SkillsReturns.SkillStates.Bandit2.Dynamite; using SkillsReturns.SkillStates.Bandit2.FlashBang; using SkillsReturns.SkillStates.Commando; using SkillsReturns.SkillStates.Engineer; using SkillsReturns.SkillStates.Huntress; using SkillsReturns.SkillStates.Merc.Parry; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("SkillsReturns")] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: AssemblyProduct("SkillsReturns")] [assembly: AssemblyTitle("SkillsReturns")] [assembly: AssemblyInformationalVersion("1.0.0+733f3c4b5df1dd929a9c533891efe5d240dbe25e")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [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 { [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] [Microsoft.CodeAnalysis.Embedded] [CompilerGenerated] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace SkillsReturns { internal static class Assets { public static AssetBundle mainAssetBundle; internal static void Init() { using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("SkillsReturns.skillsreturnsbundle")) { mainAssetBundle = AssetBundle.LoadFromStream(stream); ShaderSwapper.UpgradeStubbedShaders(mainAssetBundle); } using Stream stream2 = Assembly.GetExecutingAssembly().GetManifestResourceStream("SkillsReturns.SkillsReturnsSoundbank.bnk"); byte[] array = new byte[stream2.Length]; stream2.Read(array, 0, array.Length); SoundBanks.Add(array); } } internal static class ModCompat { internal static class AncientScepterCompat { public static bool pluginLoaded; internal static void Init() { pluginLoaded = Chainloader.PluginInfos.ContainsKey("com.DestroyedClone.AncientScepter"); } public static void AddScepterSkill(SkillDef scepterSkill, string targetBodyName, SkillDef originalSkill) { if (pluginLoaded) { AddScepterSkillInternal(scepterSkill, targetBodyName, originalSkill); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void AddScepterSkillInternal(SkillDef scepterSkill, string targetBodyName, SkillDef originalSkill) { } } internal static void Init() { AncientScepterCompat.Init(); } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.Forced_Reassembly.SkillsReturns", "Skills Returns", "1.4.3")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class SkillsReturnsPlugin : BaseUnityPlugin { [CompilerGenerated] private static class <>O { public static Manipulator <0>__ModfyFinalDamageHook; } public static ConfigFile configFile; private void Awake() { //IL_0028: 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_0033: Expected O, but got Unknown configFile = ((BaseUnityPlugin)this).Config; ModCompat.Init(); Assets.Init(); object obj = <>O.<0>__ModfyFinalDamageHook; if (obj == null) { Manipulator val = ModifyFinalDamage.ModfyFinalDamageHook; <>O.<0>__ModfyFinalDamageHook = val; obj = (object)val; } HealthComponent.TakeDamageProcess += (Manipulator)obj; AddToAssembly(); } private void AddToAssembly() { IEnumerable<Type> enumerable = from type in Assembly.GetExecutingAssembly().GetTypes() where !type.IsAbstract && type.IsSubclassOf(typeof(SkillBase)) select type; foreach (Type item in enumerable) { SkillBase skillBase = (SkillBase)Activator.CreateInstance(item); } } } internal class Utilities { public static BuffDef CreateBuffDef(string name, bool canStack, bool isCooldown, bool isDebuff, Color color, Sprite iconSprite, bool isHidden = false) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) BuffDef val = ScriptableObject.CreateInstance<BuffDef>(); ((Object)val).name = name; val.canStack = canStack; val.isCooldown = isCooldown; val.isDebuff = isDebuff; val.buffColor = color; val.iconSprite = iconSprite; val.isHidden = isHidden; ContentAddition.AddBuffDef(val); ((Object)val).name = ((Object)val).name; return val; } public static NetworkSoundEventDef CreateNetworkSoundEventDef(string eventName) { NetworkSoundEventDef val = ScriptableObject.CreateInstance<NetworkSoundEventDef>(); val.eventName = eventName; ContentAddition.AddNetworkSoundEventDef(val); return val; } } } namespace SkillsReturns.SkillStates.Merc.Parry { public class FireParry : BaseState { public static float baseDuration = 0.5f; public static float parryDuration = 1f / 3f; public static float parryHitboxScale = 4f; public static BuffDef parryBuff; public static NetworkSoundEventDef soundSlashStandard; public static NetworkSoundEventDef soundSlashSuccessful; public static NetworkSoundEventDef soundDeflect; public static GameObject startEffect; public static GameObject impactEffect = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Merc/OmniImpactVFXSlashMerc.prefab").WaitForCompletion(); public static GameObject slashEffect = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Merc/MercSwordSlashWhirlwind.prefab").WaitForCompletion(); public static float damageCoefficient = 5f; public static float perfectDamageCoefficient = 15f; public static float radius = 12f; public static float perfectRadius = 20f; private float internalDeflectSoundCooldown = 0f; private int parryCount = 0; private bool attackFired = false; private float duration; private bool modifiedHitbox = false; private Vector3 originalHitboxScale; public override void OnEnter() { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); Util.PlaySound("Play_SkillsReturns_Merc_Parry_Release", ((EntityState)this).gameObject); duration = baseDuration / base.attackSpeedStat; ((EntityState)this).PlayAnimation("FullBody, Override", "GroundLight2", "GroundLight.playbackRate", duration, 0f); if (Object.op_Implicit((Object)(object)startEffect)) { EffectManager.SimpleImpactEffect(startEffect, ((EntityState)this).transform.position, Vector3.up, false); } if (NetworkServer.active && Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { ((EntityState)this).characterBody.AddTimedBuff(parryBuff, 10f); } } public override void FixedUpdate() { //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); ApplyHitboxModifier(); if (NetworkServer.active && Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && !attackFired) { internalDeflectSoundCooldown -= ((EntityState)this).GetDeltaTime(); int num = ((EntityState)this).characterBody.GetBuffCount(parryBuff) - 1; if (num > parryCount) { parryCount = num; if (Object.op_Implicit((Object)(object)soundDeflect) && internalDeflectSoundCooldown <= 0f) { internalDeflectSoundCooldown = 0.05f; EffectManager.SimpleSoundEffect(soundDeflect.index, ((EntityState)this).transform.position, true); } } } if (((EntityState)this).fixedAge >= parryDuration && !attackFired) { FireAttack(); } if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= parryDuration + duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { RemoveHitboxModifier(); if (!attackFired) { FireAttackServer(); } if (NetworkServer.active && Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { ((EntityState)this).characterBody.ClearTimedBuffs(parryBuff); } Animator modelAnimator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)modelAnimator)) { int layerIndex = modelAnimator.GetLayerIndex("Impact"); if (layerIndex >= 0) { modelAnimator.SetLayerWeight(layerIndex, 3f); ((EntityState)this).PlayAnimation("Impact", "LightImpact"); } } ((EntityState)this).OnExit(); } private void FireAttack() { if (!attackFired) { if (NetworkServer.active) { FireAttackServer(); } attackFired = true; ((EntityState)this).PlayCrossfade("FullBody, Override", "WhirlwindGround", "Whirlwind.playbackRate", duration, 0.1f); if (Object.op_Implicit((Object)(object)slashEffect)) { EffectManager.SimpleMuzzleFlash(slashEffect, ((EntityState)this).gameObject, "WhirlwindGround", false); } } } private void FireAttackServer() { //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: 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_0113: 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_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: 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_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0177: 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_0183: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_0201: 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_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0239: 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) if (!NetworkServer.active || attackFired) { return; } bool flag = parryCount > 0; if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { ((EntityState)this).characterBody.ClearTimedBuffs(parryBuff); if (flag) { ((EntityState)this).characterBody.AddTimedBuff(Buffs.Immune, duration + 0.3f); } } NetworkSoundEventDef val = (flag ? soundSlashSuccessful : soundSlashStandard); if (Object.op_Implicit((Object)(object)val)) { EffectManager.SimpleSoundEffect(val.index, ((EntityState)this).transform.position, true); } EffectIndex val2 = (EffectIndex)(-1); if (Object.op_Implicit((Object)(object)impactEffect)) { EffectComponent component = impactEffect.GetComponent<EffectComponent>(); if (Object.op_Implicit((Object)(object)component)) { val2 = component.effectIndex; } } float num = (flag ? perfectRadius : radius); DestroyProjectiles(num); new BlastAttack { position = ((EntityState)this).transform.position, attacker = ((EntityState)this).gameObject, inflictor = ((EntityState)this).gameObject, radius = num, baseDamage = base.damageStat * (flag ? perfectDamageCoefficient : damageCoefficient), attackerFiltering = (AttackerFiltering)2, crit = ((BaseState)this).RollCrit(), damageType = (DamageTypeCombo.op_Implicit((DamageType)(flag ? 8388640 : 32)) | DamageTypeCombo.op_Implicit((DamageSource)2)), procChainMask = default(ProcChainMask), procCoefficient = 1f, falloffModel = (FalloffModel)0, teamIndex = ((BaseState)this).GetTeam(), damageColorIndex = (DamageColorIndex)(flag ? 12 : 0), baseForce = 0f, bonusForce = Vector3.zero, impactEffect = val2 }.Fire(); if (flag) { EffectManager.SimpleImpactEffect(Evis.hitEffectPrefab, ((EntityState)this).characterBody.corePosition, Vector3.one, true); EffectManager.SimpleImpactEffect(Evis.hitEffectPrefab, ((EntityState)this).characterBody.corePosition, Vector3.zero, true); EffectManager.SimpleImpactEffect(Evis.hitEffectPrefab, ((EntityState)this).characterBody.corePosition, Vector3.left, true); EffectManager.SimpleImpactEffect(Evis.hitEffectPrefab, ((EntityState)this).characterBody.corePosition, Vector3.right, true); } } private void ApplyHitboxModifier() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) if (!modifiedHitbox && Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.mainHurtBox)) { modifiedHitbox = true; originalHitboxScale = ((Component)((EntityState)this).characterBody.mainHurtBox).transform.localScale; Transform transform = ((Component)((EntityState)this).characterBody.mainHurtBox).transform; transform.localScale *= parryHitboxScale; } } private void RemoveHitboxModifier() { //IL_0046: Unknown result type (might be due to invalid IL or missing references) if (modifiedHitbox && Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.mainHurtBox)) { ((Component)((EntityState)this).characterBody.mainHurtBox).transform.localScale = originalHitboxScale; } } private void DestroyProjectiles(float radius) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) float num = radius * radius; TeamIndex team = ((BaseState)this).GetTeam(); List<ProjectileController> instancesList = InstanceTracker.GetInstancesList<ProjectileController>(); List<ProjectileController> list = new List<ProjectileController>(); foreach (ProjectileController item in instancesList) { if (item.cannotBeDeleted || item.teamFilter.teamIndex == team) { continue; } Vector3 val = ((Component)item).transform.position - ((EntityState)this).transform.position; if (!(((Vector3)(ref val)).sqrMagnitude > num)) { ProjectileSimple component = ((Component)item).gameObject.GetComponent<ProjectileSimple>(); ProjectileCharacterController component2 = ((Component)item).gameObject.GetComponent<ProjectileCharacterController>(); if ((Object.op_Implicit((Object)(object)component) && (!Object.op_Implicit((Object)(object)component) || component.desiredForwardSpeed != 0f)) || Object.op_Implicit((Object)(object)component2)) { list.Add(item); } } } foreach (ProjectileController item2 in list) { Object.Destroy((Object)(object)((Component)item2).gameObject); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: 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) return (InterruptPriority)2; } } public class PrepParry : BaseState { public static float baseStartDelay = 0.25f; public static GameObject readyEffect; private bool playedReadySound = false; private float startDelay; public override void OnEnter() { ((BaseState)this).OnEnter(); startDelay = baseStartDelay / base.attackSpeedStat; Util.PlayAttackSpeedSound("Play_SkillsReturns_Merc_Parry_Ready", ((EntityState)this).gameObject, base.attackSpeedStat); ((EntityState)this).PlayCrossfade("FullBody, Override", "GroundLight2", "GroundLight.playbackRate", 999f, startDelay); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= startDelay) { if (!playedReadySound) { playedReadySound = true; } if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && !((EntityState)this).inputBank.skill2.down && ((EntityState)this).fixedAge >= startDelay) { ((EntityState)this).outer.SetNextState((EntityState)(object)new FireParry()); } } } public override void OnExit() { ((EntityState)this).PlayAnimation("FullBody, Override", "Empty"); ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: 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) return (InterruptPriority)2; } } } namespace SkillsReturns.SkillStates.Huntress { internal class HuntressBowCharge : BaseSkillState { public static float baseMinDuration = 0f; public static float baseChargeDuration = 1.5f; private float minDuration; public float chargeDuration; public float spread; private bool playedChargeSound = false; public static GameObject ChargeEffectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Loader/OmniImpactVFXLoader.prefab").WaitForCompletion(); public static GameObject crosshairOverridePrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/UI/StandardCrosshair.prefab").WaitForCompletion(); private OverrideRequest crosshairOverrideRequest; private Animator animator; private bool changedState; private float origPlaybackRate; public override void OnEnter() { //IL_0056: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); Util.PlaySound("Play_huntress_m1_ready", ((EntityState)this).gameObject); chargeDuration = baseChargeDuration / ((BaseState)this).attackSpeedStat; minDuration = baseMinDuration / ((BaseState)this).attackSpeedStat; crosshairOverrideRequest = CrosshairUtils.RequestOverrideForBody(((EntityState)this).characterBody, crosshairOverridePrefab, (OverridePriority)1); ((BaseState)this).StartAimMode(((BaseState)this).GetAimRay(), 2f, false); ((EntityState)this).PlayCrossfade("Gesture, Override", "FireSeekingShot", "FireSeekingShot.playbackRate", chargeDuration * 2.3f, chargeDuration * 0.2f / ((BaseState)this).attackSpeedStat); ((EntityState)this).PlayCrossfade("Gesture, Additive", "FireSeekingShot", "FireSeekingShot.playbackRate", chargeDuration * 2.3f, chargeDuration * 0.2f / ((BaseState)this).attackSpeedStat); animator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)animator)) { origPlaybackRate = animator.GetFloat("FireSeekingShot.playbackRate"); } } public override void OnExit() { if (crosshairOverrideRequest != null) { crosshairOverrideRequest.Dispose(); } if (!changedState) { ((EntityState)this).PlayAnimation("Gesture, Override", "BufferEmpty"); ((EntityState)this).PlayAnimation("Gesture, Additive", "BufferEmpty"); } if (Object.op_Implicit((Object)(object)animator)) { animator.SetFloat("FireSeekingShot.playbackRate", origPlaybackRate); } ((EntityState)this).OnExit(); } public override void FixedUpdate() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); ((BaseState)this).StartAimMode(((BaseState)this).GetAimRay(), 2f, false); spread = Mathf.Lerp(1f, 0f, CalculateChargePercent()); ((EntityState)this).characterBody.SetSpreadBloom(spread, false); if (!playedChargeSound && CalculateChargePercent() >= 1f) { playedChargeSound = true; EffectManager.SimpleMuzzleFlash(ChargeEffectPrefab, ((EntityState)this).gameObject, "Muzzle", false); Util.PlaySound("Play_SkillsReturns_Huntress_ChargeBow_Ready", ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)animator)) { animator.SetFloat("FireSeekingShot.playbackRate", 0f); } } if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && !((EntityState)this).inputBank.skill1.down && ((EntityState)this).fixedAge >= minDuration) { changedState = true; ((EntityState)this).outer.SetNextState((EntityState)(object)new HuntressChargeArrowFire { chargeFraction = CalculateChargePercent() }); } } public float CalculateChargePercent() { return Mathf.Lerp(0f, 1f, ((EntityState)this).fixedAge / chargeDuration); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: 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) return (InterruptPriority)2; } } internal class HuntressChargeArrowFire : BaseSkillState { public static float baseDuration = 0.5f; private float duration; public float chargeFraction; public static GameObject ProjectilePrefab; public float minForce = 500f; public float maxForce = 2000f; public static float minDamageCoefficient = 2f; public static float maxDamageCoefficient = 8f; public static GameObject crosshairOverridePrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/UI/StandardCrosshair.prefab").WaitForCompletion(); public static NetworkSoundEventDef soundShoot; public static NetworkSoundEventDef soundShootCharged; private OverrideRequest crosshairOverrideRequest; private Animator animator; public override void OnEnter() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: 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_012a: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).StartAimMode(aimRay, 2f, false); crosshairOverrideRequest = CrosshairUtils.RequestOverrideForBody(((EntityState)this).characterBody, crosshairOverridePrefab, (OverridePriority)1); if (((EntityState)this).isAuthority) { ProjectileManager.instance.FireProjectile(ProjectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, ((BaseState)this).damageStat * Mathf.Lerp(minDamageCoefficient, maxDamageCoefficient, chargeFraction), Mathf.Lerp(minForce, maxForce, chargeFraction), ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, 180f, (DamageTypeCombo?)DamageTypeCombo.GenericPrimary); if (chargeFraction >= 1f) { if (Object.op_Implicit((Object)(object)soundShootCharged)) { EffectManager.SimpleSoundEffect(soundShootCharged.index, ((EntityState)this).transform.position, true); } } else if (Object.op_Implicit((Object)(object)soundShoot)) { EffectManager.SimpleSoundEffect(soundShoot.index, ((EntityState)this).transform.position, true); } } ((EntityState)this).PlayCrossfade("Gesture, Override", "FireSeekingShot", "FireSeekingShot.playbackRate", duration * 0.8f, duration * 0.2f / ((BaseState)this).attackSpeedStat); ((EntityState)this).PlayCrossfade("Gesture, Additive", "FireSeekingShot", "FireSeekingShot.playbackRate", duration * 0.8f, duration * 0.2f / ((BaseState)this).attackSpeedStat); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: 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) return (InterruptPriority)2; } } } namespace SkillsReturns.SkillStates.Engineer { public class EngiMortarFire : BaseSkillState, IStepSetter { public static float baseDuration = 0.2f; private float duration; public static GameObject engiMortarProjectilePrefab; public static GameObject muzzleflashEffectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/MuzzleflashSmokeRing.prefab").WaitForCompletion(); public float damageCoefficient = 1f; public float force = 100f; public static float upwardsAimFactor = 0.5f; private int step; public override void OnEnter() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0022: 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_00c3: 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_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).StartAimMode(aimRay, 2f, false); Util.PlaySound("Play_SkillsReturns_Engi_Shoot", ((EntityState)this).gameObject); if (step % 2 == 0) { EffectManager.SimpleMuzzleFlash(muzzleflashEffectPrefab, ((EntityState)this).gameObject, "MuzzleLeft", false); ((EntityState)this).PlayCrossfade("Gesture Left Cannon, Additive", "FireGrenadeLeft", duration); } else { EffectManager.SimpleMuzzleFlash(muzzleflashEffectPrefab, ((EntityState)this).gameObject, "MuzzleRight", false); ((EntityState)this).PlayCrossfade("Gesture Right Cannon, Additive", "FireGrenadeRight", duration); } if (((EntityState)this).isAuthority) { Vector3 direction = ((Ray)(ref aimRay)).direction; direction.y = 0f; ((Vector3)(ref direction)).Normalize(); direction.y = upwardsAimFactor; ((Vector3)(ref direction)).Normalize(); ProjectileManager.instance.FireProjectile(engiMortarProjectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(direction), ((EntityState)this).gameObject, ((BaseState)this).damageStat * damageCoefficient, force, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)null); } ((EntityState)this).characterBody.AddSpreadBloom(0.3f); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: 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) return (InterruptPriority)2; } public void SetStep(int i) { step = i; } } } namespace SkillsReturns.SkillStates.Commando { public class SlashKnife : BaseSkillState { public static GameObject biteEffectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Lemurian/LemurianBiteTrail.prefab").WaitForCompletion(); public static float baseDuration = 0.5f; private float duration; public override void OnEnter() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0118: 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_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //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_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0152: 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_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Expected O, but got Unknown //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: 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_0204: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).StartAimMode(aimRay, 2f, false); ((EntityState)this).PlayAnimation("Gesture, Additive", "ThrowGrenade", "FireFMJ.playbackRate", duration * 2f, 0f); ((EntityState)this).PlayAnimation("Gesture, Override", "ThrowGrenade", "FireFMJ.playbackRate", duration * 2f, 0f); Util.PlaySound("Play_bandit2_m2_impact", ((EntityState)this).gameObject); ((BaseState)this).AddRecoil(-0.6f, 0.6f, -0.6f, 0.6f); if (Object.op_Implicit((Object)(object)biteEffectPrefab)) { EffectManager.SimpleMuzzleFlash(biteEffectPrefab, ((EntityState)this).gameObject, "MuzzleRight", false); } if (((EntityState)this).isAuthority) { BlastAttack val = new BlastAttack { attacker = ((EntityState)this).gameObject, inflictor = ((EntityState)this).gameObject, procCoefficient = 1f, baseDamage = ((BaseState)this).damageStat * 3.6f, position = ((EntityState)this).characterBody.corePosition, teamIndex = ((BaseState)this).GetTeam(), radius = 8f, falloffModel = (FalloffModel)0, baseForce = 0f, bonusForce = Vector3.zero, damageType = (DamageTypeCombo.op_Implicit((DamageType)32) | DamageTypeCombo.op_Implicit((DamageSource)2)), attackerFiltering = (AttackerFiltering)2 }; DamageAPI.AddModdedDamageType(val, CommandoKnife.knifeDamageType); Result val2 = val.Fire(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((EntityState)this).characterMotor.isGrounded && val2.hitCount > 0) { ((EntityState)this).characterMotor.velocity = new Vector3(((EntityState)this).characterMotor.velocity.x, Mathf.Max(((EntityState)this).characterMotor.velocity.y, 6f), ((EntityState)this).characterMotor.velocity.z); } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: 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) return (InterruptPriority)2; } } public class SpecialShotgunBlast : BaseSkillState { public static GameObject shotgunHitsparkEffectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Junk/Commando/HitsparkCommandoBarrage.prefab").WaitForCompletion(); public static GameObject shotgunBulletEffectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Commando/TracerCommandoDefault.prefab").WaitForCompletion(); public static float baseDuration = 0.5f; private float duration; public override void OnEnter() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0143: 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_0160: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01da: 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_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_020c: 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_0224: Expected O, but got Unknown ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).StartAimMode(aimRay, 2f, false); ((EntityState)this).PlayAnimation("Gesture, Additive", "FireBarrage", "FireBarrage.playbackRate", duration, 0f); ((EntityState)this).PlayAnimation("Gesture, Override", "FireBarrage", "FireBarrage.playbackRate", duration, 0f); Util.PlaySound(FireCaptainShotgun.wideSoundString, ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)shotgunHitsparkEffectPrefab)) { EffectManager.SimpleMuzzleFlash(shotgunHitsparkEffectPrefab, ((EntityState)this).gameObject, "MuzzleRight", false); } if (Object.op_Implicit((Object)(object)shotgunBulletEffectPrefab)) { EffectManager.SimpleMuzzleFlash(shotgunBulletEffectPrefab, ((EntityState)this).gameObject, "MuzzleRight", false); } if (((EntityState)this).isAuthority) { bool flag = Object.op_Implicit((Object)(object)((EntityState)this).skillLocator) && Object.op_Implicit((Object)(object)((EntityState)this).skillLocator.special) && (Object)(object)((EntityState)this).skillLocator.special.skillDef == (Object)(object)SkillBase<CommandoSpecialShotgun>.Instance.scepterDef; uint num = 6u; if (flag) { num *= 2; } BulletAttack val = new BulletAttack { owner = ((EntityState)this).gameObject, damage = ((BaseState)this).damageStat * 3f, procCoefficient = 1f, force = 1f, damageType = (DamageTypeCombo.op_Implicit((DamageType)32) | DamageTypeCombo.op_Implicit((DamageSource)8)), falloffModel = (FalloffModel)1, origin = ((Ray)(ref aimRay)).origin, aimVector = ((Ray)(ref aimRay)).direction, maxDistance = 25f, radius = 1f, bulletCount = num, minSpread = 1f, maxSpread = 3f, filterCallback = BulletAttack.defaultFilterCallback, hitCallback = BulletAttack.defaultHitCallback, stopperMask = ((LayerIndex)(ref LayerIndex.world)).collisionMask, isCrit = ((BaseState)this).RollCrit(), tracerEffectPrefab = shotgunBulletEffectPrefab, hitEffectPrefab = shotgunHitsparkEffectPrefab }; val.Fire(); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: 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) return (InterruptPriority)2; } } } namespace SkillsReturns.SkillStates.Bandit2.FlashBang { public class ThrowFlashbang : AimThrowableBase { public static GameObject smokeProjectilePrefab; public static GameObject aimEndpointVisualizerPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Huntress/HuntressArrowRainIndicator.prefab").WaitForCompletion(); public static GameObject aimArcVisualizerPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/BasicThrowableVisualizer.prefab").WaitForCompletion(); public override void OnEnter() { base.maxDistance = 48f; base.rayRadius = 2f; base.arcVisualizerPrefab = aimArcVisualizerPrefab; base.projectilePrefab = smokeProjectilePrefab; base.endpointVisualizerPrefab = aimEndpointVisualizerPrefab; base.endpointVisualizerRadiusScale = 4f; base.setFuse = false; base.damageCoefficient = 0f; base.baseMinimumDuration = 0f; base.projectileBaseSpeed = 80f; ((AimThrowableBase)this).OnEnter(); } public override void OnExit() { //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).PlayAnimation("Gesture, Additive", "SlashBlade", "SlashBlade.playbackRate", 0.5f, 0f); ((EntityState)this).PlayAnimation("Gesture, Override", "SlashBlade", "SlashBlade.playbackRate", 0.5f, 0f); Util.PlaySound("Play_commando_M2_grenade_throw", ((EntityState)this).gameObject); if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((EntityState)this).characterMotor.isGrounded) { ((EntityState)this).characterMotor.velocity = new Vector3(((EntityState)this).characterMotor.velocity.x, Mathf.Max(((EntityState)this).characterMotor.velocity.y, 6f), ((EntityState)this).characterMotor.velocity.z); } ((AimThrowableBase)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: 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) return (InterruptPriority)3; } } } namespace SkillsReturns.SkillStates.Bandit2.Dynamite { public class ThrowDynamite : BaseState { public static float damageCoefficient = 4.2f; public static GameObject projectilePrefab; public static float baseDuration = 0.5f; private float duration; public override void OnEnter() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).StartAimMode(aimRay, 2f, false); ((EntityState)this).PlayAnimation("Gesture, Additive", "SlashBlade", "SlashBlade.playbackRate", duration, 0f); Util.PlaySound("Play_SkillsReturns_Bandit_Dynamite_Throw", ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((EntityState)this).characterMotor.isGrounded) { ((EntityState)this).characterMotor.velocity = new Vector3(((EntityState)this).characterMotor.velocity.x, Mathf.Max(((EntityState)this).characterMotor.velocity.y, 6f), ((EntityState)this).characterMotor.velocity.z); } ProjectileManager.instance.FireProjectile(projectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, base.damageStat * damageCoefficient, 0f, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, -1f, (DamageTypeCombo?)(DamageTypeCombo.op_Implicit((DamageType)128) | DamageTypeCombo.op_Implicit((DamageSource)2))); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && ((EntityState)this).inputBank.skill2.down) { return (InterruptPriority)2; } return (InterruptPriority)1; } } } namespace SkillsReturns.SkillSetup { public abstract class SkillBase<T> : SkillBase where T : SkillBase<T> { public static T Instance { get; private set; } public SkillBase() { if (Instance != null) { throw new InvalidOperationException("Singleton class \"" + typeof(T).Name + "\" inheriting SkillBase was instantiated twice"); } Instance = this as T; Instance.Init(); } } public abstract class SkillBase { private bool enabled; public SkillDef skillDef; public abstract string SkillName { get; } public abstract string SkillLangTokenName { get; } public abstract string SkillLangTokenDesc { get; } public abstract SkillFamily SkillFamily { get; } protected void Init() { CreateConfig(); if (enabled) { Hooks(); RegisterStates(); CreateSkillDef(); CreateAssets(); if (Object.op_Implicit((Object)(object)skillDef)) { ContentAddition.AddSkillDef(skillDef); } AddSkillToSlot(); } } protected virtual void CreateSkillDef() { skillDef = ScriptableObject.CreateInstance<SkillDef>(); skillDef.skillName = SkillLangTokenName; skillDef.skillNameToken = SkillLangTokenName; skillDef.skillDescriptionToken = SkillLangTokenDesc; skillDef.keywordTokens = new string[0]; ((Object)skillDef).name = SkillLangTokenName; } protected virtual void CreateAssets() { } protected virtual void Hooks() { } protected virtual void CreateConfig() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown //IL_002d: Expected O, but got Unknown enabled = SkillsReturnsPlugin.configFile.Bind<bool>(new ConfigDefinition(SkillName, "Enabled"), true, new ConfigDescription("Enable this skill.", (AcceptableValueBase)null, Array.Empty<object>())).Value; } protected abstract void RegisterStates(); protected virtual void AddSkillToSlot() { //IL_0091: 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_00c9: Expected O, but got Unknown //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)skillDef)) { Debug.LogError((object)("SkillsReturns: Could not add " + SkillName + ": SkillDef is null.")); return; } if ((Object)(object)SkillFamily == (Object)null) { Debug.LogError((object)("SkillsReturns: Could not add " + SkillName + ": SkillFamily is null.")); return; } SkillFamily skillFamily = SkillFamily; Array.Resize(ref skillFamily.variants, skillFamily.variants.Length + 1); Variant[] variants = skillFamily.variants; int num = skillFamily.variants.Length - 1; Variant val = new Variant { skillDef = skillDef, unlockableName = "" }; ((Variant)(ref val)).viewableNode = new Node(skillDef.skillNameToken, false, (Node)null); variants[num] = val; } } } namespace SkillsReturns.SkillSetup.Merc { public class Parry : SkillBase<Parry> { public override string SkillName => "Mercenary - Focused Strike"; public override string SkillLangTokenName => "MERC_SECONDARY_SKILLSRETURNS_PARRY_NAME"; public override string SkillLangTokenDesc => "MERC_SECONDARY_SKILLSRETURNS_PARRY_DESCRIPTION"; public override SkillFamily SkillFamily => Addressables.LoadAssetAsync<SkillFamily>((object)"RoR2/Base/Merc/MercBodySecondaryFamily.asset").WaitForCompletion(); protected override void CreateAssets() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) FireParry.soundSlashStandard = Utilities.CreateNetworkSoundEventDef("Play_SkillsReturns_Merc_Parry_StandardSlash"); FireParry.soundSlashSuccessful = Utilities.CreateNetworkSoundEventDef("Play_SkillsReturns_Merc_Parry_SuccessfulSlash"); FireParry.parryBuff = Utilities.CreateBuffDef("SkillsReturnsMercParry", canStack: true, isCooldown: false, isDebuff: false, Color.white, null, isHidden: true); FireParry.startEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Merc/MercExposeConsumeEffect.prefab").WaitForCompletion(), "SkillsReturnsParryReadyEffect", false); EffectComponent component = FireParry.startEffect.GetComponent<EffectComponent>(); component.soundName = ""; ContentAddition.AddEffect(FireParry.startEffect); } protected override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown HealthComponent.TakeDamage += new hook_TakeDamage(HandleParry); } private void HandleParry(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo) { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Invalid comparison between Unknown and I4 //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Invalid comparison between Unknown and I4 if (NetworkServer.active && self.body.HasBuff(FireParry.parryBuff) && (Object.op_Implicit((Object)(object)damageInfo.attacker) || Object.op_Implicit((Object)(object)damageInfo.inflictor) || (int)damageInfo.damageColorIndex != 9 || (int)DamageTypeCombo.op_Implicit(damageInfo.damageType) != 66)) { self.body.AddTimedBuff(FireParry.parryBuff, 10f); damageInfo.rejected = true; } else { orig.Invoke(self, damageInfo); } } protected override void CreateSkillDef() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) base.CreateSkillDef(); skillDef.activationState = new SerializableEntityStateType(typeof(PrepParry)); skillDef.activationStateMachineName = "Body"; skillDef.baseMaxStock = 1; skillDef.baseRechargeInterval = 5f; skillDef.beginSkillCooldownOnSkillEnd = true; skillDef.canceledFromSprinting = false; skillDef.cancelSprintingOnActivation = true; skillDef.fullRestockOnAssign = true; skillDef.interruptPriority = (InterruptPriority)1; skillDef.isCombatSkill = true; skillDef.mustKeyPress = true; skillDef.rechargeStock = 1; skillDef.requiredStock = 1; skillDef.stockToConsume = 1; skillDef.icon = Assets.mainAssetBundle.LoadAsset<Sprite>("ParryIcon"); skillDef.keywordTokens = new string[2] { "KEYWORD_STUNNING", "KEYWORD_EXPOSE" }; LanguageAPI.Add(SkillLangTokenName, "Focused Strike"); LanguageAPI.Add(SkillLangTokenDesc, "Hold to sheathe your weapon. Release before an incoming strike to <style=cIsDamage>parry</style> enemy attacks for <style=cIsDamage>500%-1500% damage</style>. Perfect parries <style=cIsUtility>Expose</style> enemies."); } protected override void RegisterStates() { //IL_000d: 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) bool flag = default(bool); ContentAddition.AddEntityState(typeof(PrepParry), ref flag); ContentAddition.AddEntityState(typeof(FireParry), ref flag); } } } namespace SkillsReturns.SkillSetup.Huntress { public class HuntressChargePrimary : SkillBase<HuntressChargePrimary> { public override string SkillName => "Huntress - Pierce"; public override string SkillLangTokenName => "HUNTRESS_PRIMARY_SKILLSRETURNS_CHARGEBOW_NAME"; public override string SkillLangTokenDesc => "HUNTRESS_PRIMARY_SKILLSRETURNS_CHARGEBOW_DESCRIPTION"; public override SkillFamily SkillFamily => Addressables.LoadAssetAsync<SkillFamily>((object)"RoR2/Base/Huntress/HuntressBodyPrimaryFamily.asset").WaitForCompletion(); protected override void CreateSkillDef() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) base.CreateSkillDef(); skillDef.activationState = new SerializableEntityStateType(typeof(HuntressBowCharge)); skillDef.activationStateMachineName = "Weapon"; skillDef.baseMaxStock = 1; skillDef.baseRechargeInterval = 0f; skillDef.beginSkillCooldownOnSkillEnd = false; skillDef.canceledFromSprinting = false; skillDef.cancelSprintingOnActivation = false; skillDef.fullRestockOnAssign = true; skillDef.interruptPriority = (InterruptPriority)1; skillDef.isCombatSkill = true; skillDef.mustKeyPress = false; skillDef.rechargeStock = 1; skillDef.requiredStock = 1; skillDef.stockToConsume = 0; skillDef.icon = Assets.mainAssetBundle.LoadAsset<Sprite>("PierceIcon"); skillDef.keywordTokens = new string[1] { "KEYWORD_AGILE" }; LanguageAPI.Add(SkillLangTokenName, "Pierce"); LanguageAPI.Add(SkillLangTokenDesc, "<style=cIsUtility>Agile</style>. Charge up a <style=cIsDamage>piercing</style> arrow for <style=cIsDamage>200%-800%</style> damage."); } protected override void CreateAssets() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) HuntressChargeArrowFire.soundShoot = Utilities.CreateNetworkSoundEventDef("Play_SkillsReturns_Huntress_ChargeBow_Shoot"); HuntressChargeArrowFire.soundShootCharged = Utilities.CreateNetworkSoundEventDef("Play_SkillsReturns_Huntress_ChargeBow_ShootCharged"); GameObject val = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Commando/FMJRamping.prefab").WaitForCompletion(), "SkillsReturnsHuntressChargeArrowProjectile", true); ContentAddition.AddProjectile(val); ProjectileController component = val.GetComponent<ProjectileController>(); component.ghostPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Junk/Huntress/ArrowGhost.prefab").WaitForCompletion(); component.allowPrediction = true; ProjectileOverlapAttack component2 = val.GetComponent<ProjectileOverlapAttack>(); component2.onServerHit = null; component2.impactEffect = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Huntress/OmniImpactVFXHuntress.prefab").WaitForCompletion(); ProjectileSimple component3 = val.GetComponent<ProjectileSimple>(); component3.lifetime = 5f; ContentAddition.AddProjectile(val); HuntressChargeArrowFire.ProjectilePrefab = val; val.transform.localScale = new Vector3(2f, 2f, 2f); } protected override void RegisterStates() { //IL_000d: 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) bool flag = default(bool); ContentAddition.AddEntityState(typeof(HuntressBowCharge), ref flag); ContentAddition.AddEntityState(typeof(HuntressChargeArrowFire), ref flag); } } } namespace SkillsReturns.SkillSetup.Engineer { public class EngiMortarPrimary : SkillBase<EngiMortarPrimary> { public SkillDef scepterDef; public override string SkillName => "Engineer - Mortar Barrage"; public override string SkillLangTokenName => "ENGI_PRIMARY_SKILLSRETURNS_MORTARS_NAME"; public override string SkillLangTokenDesc => "ENGI_PRIMARY_SKILLSRETURNS_MORTARS_DESCRIPTION"; public override SkillFamily SkillFamily => Addressables.LoadAssetAsync<SkillFamily>((object)"RoR2/Base/Engi/EngiBodyPrimaryFamily.asset").WaitForCompletion(); protected override void CreateSkillDef() { //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) SteppedSkillDef val = ScriptableObject.CreateInstance<SteppedSkillDef>(); ((SkillDef)val).skillName = SkillLangTokenName; ((SkillDef)val).skillNameToken = SkillLangTokenName; ((SkillDef)val).skillDescriptionToken = SkillLangTokenDesc; ((SkillDef)val).keywordTokens = new string[0]; ((Object)val).name = ((SkillDef)val).skillName; ((SkillDef)val).activationState = new SerializableEntityStateType(typeof(EngiMortarFire)); ((SkillDef)val).activationStateMachineName = "Weapon"; ((SkillDef)val).baseMaxStock = 1; ((SkillDef)val).baseRechargeInterval = 0f; ((SkillDef)val).beginSkillCooldownOnSkillEnd = false; ((SkillDef)val).canceledFromSprinting = false; ((SkillDef)val).cancelSprintingOnActivation = true; ((SkillDef)val).fullRestockOnAssign = true; ((SkillDef)val).interruptPriority = (InterruptPriority)1; ((SkillDef)val).isCombatSkill = true; ((SkillDef)val).mustKeyPress = false; ((SkillDef)val).rechargeStock = 1; ((SkillDef)val).requiredStock = 1; ((SkillDef)val).stockToConsume = 0; ((SkillDef)val).icon = Assets.mainAssetBundle.LoadAsset<Sprite>("MortarBarrageIcon"); val.stepCount = 2; skillDef = (SkillDef)(object)val; LanguageAPI.Add(SkillLangTokenName, "Mortar Barrage"); LanguageAPI.Add(SkillLangTokenDesc, "<style=cIsDamage>Slowing.</style> Launch mortar rounds in a fixed arc for <style=cIsDamage>100% damage</style>."); } protected override void CreateAssets() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: 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_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Toolbot/ToolbotGrenadeLauncherProjectile.prefab").WaitForCompletion(), "SkillsReturnsEngiMortarProjectile", true); ContentAddition.AddProjectile(val); val.AddComponent<MortarPointAtForwardDirection>(); EngiMortarFire.engiMortarProjectilePrefab = val; Rigidbody component = val.GetComponent<Rigidbody>(); component.useGravity = true; component.mass = 1f; component.angularDrag = 300f; ProjectileSimple component2 = val.GetComponent<ProjectileSimple>(); component2.desiredForwardSpeed = 25f; ProjectileImpactExplosion component3 = val.GetComponent<ProjectileImpactExplosion>(); ((ProjectileExplosion)component3).falloffModel = (FalloffModel)0; component3.lifetimeAfterImpact = 0f; ((ProjectileExplosion)component3).blastRadius = 5f; component3.impactEffect = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Engi/EngiGrenadeExplosion.prefab").WaitForCompletion(); ProjectileDamage component4 = val.GetComponent<ProjectileDamage>(); component4.damageType = DamageTypeCombo.op_Implicit((DamageType)8); component4.damageType.damageSource = (DamageSource)1; GameObject val2 = Assets.mainAssetBundle.LoadAsset<GameObject>("EngiMortar"); val2.AddComponent<ProjectileGhostController>(); val2.layer = LayerIndex.noCollision.intVal; ProjectileController component5 = val.GetComponent<ProjectileController>(); component5.ghostPrefab = val2; val2.transform.Rotate(0f, 0f, 1f); } protected override void RegisterStates() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) bool flag = default(bool); ContentAddition.AddEntityState(typeof(EngiMortarFire), ref flag); } } } namespace SkillsReturns.SkillSetup.Engineer.Components { public class MortarPointAtForwardDirection : MonoBehaviour { private Rigidbody rigidBody; private void Awake() { rigidBody = ((Component)this).GetComponent<Rigidbody>(); if (!NetworkServer.active || !Object.op_Implicit((Object)(object)rigidBody)) { Object.Destroy((Object)(object)this); } } private void FixedUpdate() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: 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) Transform transform = ((Component)this).transform; Vector3 velocity = rigidBody.velocity; transform.forward = ((Vector3)(ref velocity)).normalized; } } } namespace SkillsReturns.SkillSetup.Commando { public class CommandoKnife : SkillBase<CommandoKnife> { public static ModdedDamageType knifeDamageType; public static BuffDef knifeDebuff; public override string SkillName => "Commando - Combat Knife"; public override string SkillLangTokenName => "COMMANDO_SECONDARY_SKILLSRETURNS_SLASHKNIFE_NAME"; public override string SkillLangTokenDesc => "COMMANDO_SECONDARY_SKILLSRETURNS_SLASHKNIFE_DESCRIPTION"; public override SkillFamily SkillFamily => Addressables.LoadAssetAsync<SkillFamily>((object)"RoR2/Base/Commando/CommandoBodySecondaryFamily.asset").WaitForCompletion(); protected override void CreateAssets() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)knifeDebuff)) { knifeDamageType = DamageAPI.ReserveDamageType(); knifeDebuff = Utilities.CreateBuffDef("CommandoKnifeDebuff", canStack: false, isCooldown: false, isDebuff: true, Color32.op_Implicit(new Color32((byte)81, (byte)0, (byte)0, byte.MaxValue)), Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Bandit2/texBuffSuperBleedingIcon.tif").WaitForCompletion()); } } protected override void Hooks() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown GlobalEventManager.onServerDamageDealt += ApplyKnifeDebuff; HealthComponent.TakeDamage += new hook_TakeDamage(ChangeDamageColor); ModifyFinalDamage.ModifyFinalDamageActions = (ModifyFinalDamage.ModifyFinalDamageDelegate)Delegate.Combine(ModifyFinalDamage.ModifyFinalDamageActions, new ModifyFinalDamage.ModifyFinalDamageDelegate(AmplifyDamage)); } private void AmplifyDamage(ModifyFinalDamage.DamageMult damageMult, DamageInfo damageInfo, HealthComponent victim, CharacterBody victimBody) { if (victimBody.HasBuff(knifeDebuff)) { damageMult.value += 0.5f; } } private void ApplyKnifeDebuff(DamageReport report) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)report.victimBody) && !report.damageInfo.rejected && DamageAPI.HasModdedDamageType(report.damageInfo, knifeDamageType)) { report.victimBody.AddTimedBuff(knifeDebuff, 5f); } } private void ChangeDamageColor(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo) { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 if (NetworkServer.active && Object.op_Implicit((Object)(object)self.body) && self.body.HasBuff(knifeDebuff) && (int)damageInfo.damageColorIndex == 0) { damageInfo.damageColorIndex = (DamageColorIndex)8; } orig.Invoke(self, damageInfo); } protected override void CreateSkillDef() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) base.CreateSkillDef(); skillDef.activationState = new SerializableEntityStateType(typeof(SlashKnife)); skillDef.activationStateMachineName = "Weapon"; skillDef.baseMaxStock = 1; skillDef.baseRechargeInterval = 3f; skillDef.beginSkillCooldownOnSkillEnd = false; skillDef.canceledFromSprinting = false; skillDef.cancelSprintingOnActivation = true; skillDef.fullRestockOnAssign = true; skillDef.interruptPriority = (InterruptPriority)1; skillDef.isCombatSkill = true; skillDef.mustKeyPress = false; skillDef.rechargeStock = 1; skillDef.requiredStock = 1; skillDef.stockToConsume = 1; skillDef.icon = Assets.mainAssetBundle.LoadAsset<Sprite>("CombatKnifeIcon"); skillDef.keywordTokens = new string[1] { "KEYWORD_STUNNING" }; LanguageAPI.Add(SkillLangTokenName, "Combat Knife"); LanguageAPI.Add(SkillLangTokenDesc, "Slash enemies for <style=cIsDamage>360% damage</style>, wounding and <style=cIsDamage>stunning</style> enemies. Wounded enemies take <style=cIsDamage>50% more damage</style>."); } protected override void RegisterStates() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) bool flag = default(bool); ContentAddition.AddEntityState(typeof(SlashKnife), ref flag); } } public class CommandoSpecialShotgun : SkillBase<CommandoSpecialShotgun> { public SkillDef scepterDef; public override string SkillName => "Commando - Point Blank"; public override string SkillLangTokenName => "COMMANDO_SPECIAL_SKILLSRETURNS_SHOTGUNBLAST_NAME"; public override string SkillLangTokenDesc => "COMMANDO_SPECIAL_SKILLSRETURNS_SHOTGUNBLAST_DESCRIPTION"; public override SkillFamily SkillFamily => Addressables.LoadAssetAsync<SkillFamily>((object)"RoR2/Base/Commando/CommandoBodySpecialFamily.asset").WaitForCompletion(); protected override void CreateSkillDef() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) base.CreateSkillDef(); skillDef.activationState = new SerializableEntityStateType(typeof(SpecialShotgunBlast)); skillDef.activationStateMachineName = "Weapon"; skillDef.baseMaxStock = 1; skillDef.baseRechargeInterval = 6f; skillDef.beginSkillCooldownOnSkillEnd = false; skillDef.canceledFromSprinting = false; skillDef.cancelSprintingOnActivation = true; skillDef.fullRestockOnAssign = true; skillDef.interruptPriority = (InterruptPriority)1; skillDef.isCombatSkill = true; skillDef.mustKeyPress = false; skillDef.rechargeStock = 1; skillDef.requiredStock = 1; skillDef.stockToConsume = 1; skillDef.icon = Assets.mainAssetBundle.LoadAsset<Sprite>("PointBlankIcon"); skillDef.keywordTokens = new string[1] { "KEYWORD_STUNNING" }; LanguageAPI.Add(SkillLangTokenName, "Point-Blank"); LanguageAPI.Add(SkillLangTokenDesc, "<style=cIsDamage>Stunning.</style> Fire a <style=cIsDamage>piercing</style> shotgun blast for <style=cIsDamage>6x300% damage</style>."); if (ModCompat.AncientScepterCompat.pluginLoaded) { BuildScepterSkill(); } } private void BuildScepterSkill() { //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) scepterDef = ScriptableObject.CreateInstance<SkillDef>(); scepterDef.skillName = SkillLangTokenName + "_SCEPTER"; scepterDef.skillNameToken = SkillLangTokenName + "_SCEPTER"; scepterDef.skillDescriptionToken = SkillLangTokenDesc + "_SCEPTER"; scepterDef.keywordTokens = new string[1] { "KEYWORD_STUNNING" }; ((Object)scepterDef).name = SkillLangTokenName; scepterDef.activationState = new SerializableEntityStateType(typeof(SpecialShotgunBlast)); scepterDef.activationStateMachineName = skillDef.activationStateMachineName; scepterDef.baseMaxStock = skillDef.baseMaxStock; scepterDef.baseRechargeInterval = skillDef.baseRechargeInterval; scepterDef.beginSkillCooldownOnSkillEnd = skillDef.beginSkillCooldownOnSkillEnd; scepterDef.canceledFromSprinting = skillDef.canceledFromSprinting; scepterDef.cancelSprintingOnActivation = skillDef.cancelSprintingOnActivation; scepterDef.fullRestockOnAssign = skillDef.fullRestockOnAssign; scepterDef.interruptPriority = skillDef.interruptPriority; scepterDef.isCombatSkill = skillDef.isCombatSkill; scepterDef.mustKeyPress = skillDef.mustKeyPress; scepterDef.rechargeStock = skillDef.rechargeStock; scepterDef.requiredStock = skillDef.requiredStock; scepterDef.stockToConsume = skillDef.stockToConsume; scepterDef.icon = Assets.mainAssetBundle.LoadAsset<Sprite>("PointBlankIcon"); ContentAddition.AddSkillDef(scepterDef); ModCompat.AncientScepterCompat.AddScepterSkill(scepterDef, "CommandoBody", skillDef); LanguageAPI.Add(SkillLangTokenName + "_SCEPTER", "Lead Shot"); LanguageAPI.Add(SkillLangTokenDesc + "_SCEPTER", "<style=cIsDamage>Stunning.</style> Fire a <style=cIsDamage>piercing</style> shotgun blast for <style=cIsDamage>12x200% damage</style>."); } protected override void RegisterStates() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) bool flag = default(bool); ContentAddition.AddEntityState(typeof(SpecialShotgunBlast), ref flag); } } } namespace SkillsReturns.SkillSetup.Bandit2 { public class Dynamite : SkillBase<Dynamite> { public override string SkillName => "Bandit - Dynamite Toss"; public override string SkillLangTokenName => "BANDIT2_SECONDARY_SKILLSRETURNS_DYNAMITE_NAME"; public override string SkillLangTokenDesc => "BANDIT2_SECONDARY_SKILLSRETURNS_DYNAMITE_DESCRIPTION"; public override SkillFamily SkillFamily => Addressables.LoadAssetAsync<SkillFamily>((object)"RoR2/Base/Bandit2/Bandit2BodySecondaryFamily.asset").WaitForCompletion(); protected override void CreateSkillDef() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) base.CreateSkillDef(); skillDef.activationState = new SerializableEntityStateType(typeof(ThrowDynamite)); skillDef.activationStateMachineName = "Weapon"; skillDef.baseMaxStock = 1; skillDef.baseRechargeInterval = 6f; skillDef.beginSkillCooldownOnSkillEnd = false; skillDef.canceledFromSprinting = false; skillDef.cancelSprintingOnActivation = true; skillDef.fullRestockOnAssign = true; skillDef.interruptPriority = (InterruptPriority)1; skillDef.isCombatSkill = true; skillDef.mustKeyPress = false; skillDef.rechargeStock = 1; skillDef.requiredStock = 1; skillDef.stockToConsume = 1; skillDef.icon = Assets.mainAssetBundle.LoadAsset<Sprite>("DynamiteIcon"); skillDef.keywordTokens = new string[1] { "KEYWORD_IGNITE" }; LanguageAPI.Add(SkillLangTokenName, "Dynamite Toss"); LanguageAPI.Add(SkillLangTokenDesc, "<style=cIsDamage>Ignite</style>. Throw a dynamite bundle in an arc for <style=cIsDamage>420% damage</style>. Deals <style=cIsDamage>double damage</style> when shot."); } protected override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage); } private void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo) { //IL_0012: 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_008e: 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_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Invalid comparison between Unknown and I4 //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: 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_01e5: Unknown result type (might be due to invalid IL or missing references) bool flag = false; bool flag2 = false; if (NetworkServer.active && ((Enum)self.body.bodyFlags).HasFlag((Enum)(object)(BodyFlags)4)) { AssignDynamiteTeamFilter component = ((Component)self).gameObject.GetComponent<AssignDynamiteTeamFilter>(); if (Object.op_Implicit((Object)(object)component)) { flag = Object.op_Implicit((Object)(object)component); CharacterBody val = null; if (Object.op_Implicit((Object)(object)damageInfo.attacker)) { val = damageInfo.attacker.GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)val)) { flag2 = val.bodyIndex == BodyCatalog.FindBodyIndex("Bandit2Body"); } } } if (flag) { if (flag2 && !component.fired && !((Enum)damageInfo.damageType.damageType).HasFlag((Enum)(object)(DamageType)131072) && ((DamageTypeCombo)(ref damageInfo.damageType)).IsDamageSourceSkillBased && damageInfo.procCoefficient > 0f) { component.fired = true; damageInfo.procCoefficient = 0f; damageInfo.crit = true; ProjectileImpactExplosion component2 = ((Component)self).gameObject.GetComponent<ProjectileImpactExplosion>(); if (Object.op_Implicit((Object)(object)component2)) { ((ProjectileExplosion)component2).blastRadius = ((ProjectileExplosion)component2).blastRadius * 2f; } ProjectileDamage component3 = ((Component)self).gameObject.GetComponent<ProjectileDamage>(); if (Object.op_Implicit((Object)(object)component3)) { component3.damage *= 2f; if ((int)damageInfo.damageType.damageSource == 8) { component3.damage *= 1.5f; component3.damageType = damageInfo.damageType; component3.damageType.damageSource = (DamageSource)2; ref DamageType damageType = ref component3.damageType.damageType; damageType = (DamageType)((uint)damageType | 0x20080u); ref DamageType damageType2 = ref component3.damageType.damageType; damageType2 = (DamageType)((uint)damageType2 & 0xFFF7FFFFu); damageInfo.damageType = DamageTypeCombo.GenericSpecial; DynamiteNetworkCommands component4 = damageInfo.attacker.GetComponent<DynamiteNetworkCommands>(); if (Object.op_Implicit((Object)(object)component4)) { component4.CallRpcResetSpecialCooldown(); } } } } else { damageInfo.rejected = true; } } } orig.Invoke(self, damageInfo); } protected override void CreateAssets() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Unknown result type (might be due to invalid IL or missing references) GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Bandit2/Bandit2Body.prefab").WaitForCompletion(); val.AddComponent<DynamiteNetworkCommands>(); GameObject val2 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/OmniExplosionVFX.prefab").WaitForCompletion(), "SkillsReturnsDynamiteExplosion", false); EffectComponent component = val2.GetComponent<EffectComponent>(); component.soundName = "Play_SkillsReturns_Bandit_Dynamite_Explo"; ContentAddition.AddEffect(val2); GameObject val3 = Assets.mainAssetBundle.LoadAsset<GameObject>("DynamiteBundle"); val3.layer = LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.noCollision)).mask); val3.AddComponent<ProjectileGhostController>(); GameObject val4 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Mage/MageLightningboltBasic.prefab").WaitForCompletion(), "SkillsReturnsDynamiteProjectile", true); ProjectileController component2 = val4.GetComponent<ProjectileController>(); component2.allowPrediction = false; component2.ghostPrefab = val3; Object.Destroy((Object)(object)val4.GetComponent<MineProximityDetonator>()); val4.AddComponent<DynamiteRotation>(); ProjectileSimple component3 = val4.GetComponent<ProjectileSimple>(); component3.desiredForwardSpeed = 60f; component3.lifetime = 10f; Rigidbody component4 = val4.GetComponent<Rigidbody>(); component4.useGravity = true; ProjectileImpactExplosion component5 = val4.GetComponent<ProjectileImpactExplosion>(); ((ProjectileExplosion)component5).blastRadius = 10f; component5.impactEffect = val2; component5.destroyOnEnemy = true; component5.destroyOnWorld = false; ((ProjectileExplosion)component5).falloffModel = (FalloffModel)0; ((ProjectileExplosion)component5).blastProcCoefficient = 1f; component5.timerAfterImpact = true; component5.lifetimeAfterImpact = 1f; TeamComponent val5 = val4.AddComponent<TeamComponent>(); val5.hideAllyCardDisplay = true; val4.AddComponent<SkillLocator>(); CharacterBody val6 = val4.AddComponent<CharacterBody>(); val6.rootMotionInMainState = false; val6.bodyFlags = (BodyFlags)4; val6.baseMaxHealth = 1f; val6.baseCrit = 0f; val6.baseAcceleration = 0f; val6.baseArmor = 0f; val6.baseAttackSpeed = 0f; val6.baseDamage = 0f; val6.baseJumpCount = 0; val6.baseJumpPower = 0f; val6.baseMoveSpeed = 0f; val6.baseMaxShield = 0f; val6.baseRegen = 0f; val6.autoCalculateLevelStats = true; val6.levelArmor = 0f; val6.levelAttackSpeed = 0f; val6.levelCrit = 0f; val6.levelDamage = 0f; val6.levelJumpPower = 0f; val6.levelMaxHealth = 0f; val6.levelMaxShield = 0f; val6.levelMoveSpeed = 0f; val6.levelRegen = 0f; val6.hullClassification = (HullClassification)0; HealthComponent val7 = val4.AddComponent<HealthComponent>(); val7.globalDeathEventChanceCoefficient = 0f; val7.body = val6; ((ProjectileExplosion)component5).projectileHealthComponent = val7; val4.AddComponent<AssignDynamiteTeamFilter>(); AddDynamiteHurtbox(val4); ContentAddition.AddProjectile(val4); ThrowDynamite.projectilePrefab = val4; } private void AddDynamiteHurtbox(GameObject go) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject(); val.transform.parent = go.transform; val.layer = LayerIndex.entityPrecise.intVal; SphereCollider val2 = val.AddComponent<SphereCollider>(); val2.radius = 1f; HurtBoxGroup val3 = val.AddComponent<HurtBoxGroup>(); HurtBox val4 = val.AddComponent<HurtBox>(); val4.isBullseye = false; val4.healthComponent = go.GetComponent<HealthComponent>(); val4.damageModifier = (DamageModifier)0; val4.hurtBoxGroup = val3; val4.indexInGroup = 0; HurtBox[] hurtBoxes = (HurtBox[])(object)new HurtBox[1] { val4 }; val3.bullseyeCount = 0; val3.hurtBoxes = hurtBoxes; val3.mainHurtBox = val4; DisableCollisionsBetweenColliders val5 = go.AddComponent<DisableCollisionsBetweenColliders>(); val5.collidersA = go.GetComponentsInChildren<Collider>(); val5.collidersB = val.GetComponents<Collider>(); } protected override void RegisterStates() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) bool flag = default(bool); ContentAddition.AddEntityState(typeof(ThrowDynamite), ref flag); } } public class Smokescreen : SkillBase<Smokescreen> { public static ModdedDamageType SmokescreenDamageType; public static BuffDef BlindingDebuff; public override string SkillName => "Bandit - Flashbang"; public override string SkillLangTokenName => "BANDIT2_UTILITY_SKILLSRETURNS_FLASHBANG_NAME"; public override string SkillLangTokenDesc => "BANDIT2_UTILITY_SKILLSRETURNS_FLASHBANG_DESCRIPTION"; public override SkillFamily SkillFamily => Addressables.LoadAssetAsync<SkillFamily>((object)"RoR2/Base/Bandit2/Bandit2BodyUtilityFamily.asset").WaitForCompletion(); protected override void RegisterStates() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) bool flag = default(bool); ContentAddition.AddEntityState(typeof(ThrowFlashbang), ref flag); } protected override void CreateAssets() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)BlindingDebuff)) { SmokescreenDamageType = DamageAPI.ReserveDamageType(); BlindingDebuff = Utilities.CreateBuffDef("SmokescreenDebuff", canStack: false, isCooldown: false, isDebuff: true, new Color(41f / 51f, 41f / 85f, 43f / 51f), Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Common/texBuffCloakIcon.tif").WaitForCompletion()); BuildProjectile(); } } protected override void Hooks() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Expected O, but got Unknown GlobalEventManager.onServerDamageDealt += ApplySmokescreenDebuff; HealthComponent.TakeDamage += new hook_TakeDamage(ChangeDamageColor); ModifyFinalDamage.ModifyFinalDamageActions = (ModifyFinalDamage.ModifyFinalDamageDelegate)Delegate.Combine(ModifyFinalDamage.ModifyFinalDamageActions, new ModifyFinalDamage.ModifyFinalDamageDelegate(AmplifyDamage)); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(Bandit2SmokebombDebuffModifier); } private void AmplifyDamage(ModifyFinalDamage.DamageMult damageMult, DamageInfo damageInfo, HealthComponent victim, CharacterBody victimBody) { if (victimBody.HasBuff(BlindingDebuff)) { damageMult.value += 0.25f; } } private void ApplySmokescreenDebuff(DamageReport report) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)report.victimBody) && !report.damageInfo.rejected && DamageAPI.HasModdedDamageType(report.damageInfo, SmokescreenDamageType)) { report.victimBody.AddTimedBuff(BlindingDebuff, 3f); } } private void ChangeDamageColor(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo) { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 if (NetworkServer.active && Object.op_Implicit((Object)(object)self.body) && self.body.HasBuff(BlindingDebuff) && (int)damageInfo.damageColorIndex == 0) { damageInfo.damageColorIndex = (DamageColorIndex)4; } orig.Invoke(self, damageInfo); } private void Bandit2SmokebombDebuffModifier(CharacterBody sender, StatHookEventArgs args) { if (sender.HasBuff(BlindingDebuff)) { args.moveSpeedReductionMultAdd += 0.8f; args.attackSpeedReductionMultAdd += 0.3f; } } private void BuildProjectile() { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //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_0290: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_0347: 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) float duration = 7f; float num = 15f; GameObject val = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("Prefabs/Projectiles/CommandoGrenadeProjectile"), "SkillsReturns_SmokeGrenade", true); ProjectileController component = val.GetComponent<ProjectileController>(); ProjectileDamage component2 = val.GetComponent<ProjectileDamage>(); component2.damageType = DamageTypeCombo.op_Implicit((DamageType)0); component2.damageType.damageSource = (DamageSource)1; ProjectileSimple component3 = val.GetComponent<ProjectileSimple>(); ProjectileImpactExplosion component4 = val.GetComponent<ProjectileImpactExplosion>(); GameObject val2 = PrefabAPI.InstantiateClone(Assets.mainAssetBundle.LoadAsset<GameObject>("SmokeGrenade"), "SniperClassic_SmokeGhost", true); val2.AddComponent<NetworkIdentity>(); val2.AddComponent<ProjectileGhostController>(); component.ghostPrefab = val2; component.startSound = ""; component.procCoefficient = 1f; component2.crit = false; component2.damage = 0f; component2.damageColorIndex = (DamageColorIndex)0; component2.damageType = DamageTypeCombo.op_Implicit((DamageType)33); component2.force = 0f; GameObject val3 = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("Prefabs/Projectiles/SporeGrenadeProjectileDotZone"), "SkillsReturns_SmokeDotZone", true); ProjectileController component5 = val3.GetComponent<ProjectileController>(); ProjectileDamage component6 = val3.GetComponent<ProjectileDamage>(); Object.Destroy((Object)(object)val3.GetComponent<ProjectileDotZone>()); component5.procCoefficient = 0f; component6.crit = false; component6.damage = 0f; component6.damageColorIndex = (DamageColorIndex)5; component6.damageType = DamageTypeCombo.op_Implicit((DamageType)33); component6.force = 0f; BuffWard val4 = val3.AddComponent<BuffWard>(); val4.radius = num; val4.interval = 0.25f; val4.buffDef = Addressables.LoadAssetAsync<BuffDef>((object)"RoR2/Base/Common/bdCloak.asset").WaitForCompletion(); val4.buffDuration = 1f; val4.floorWard = false; val4.expires = false; val4.invertTeamFilter = false; val4.expireDuration = 0f; val4.animateRadius = false; val4.rangeIndicator = null; BuffWard val5 = val3.AddComponent<BuffWard>(); val5.radius = num; val5.interval = 0.5f; val5.buffDef = BlindingDebuff; val5.buffDuration = 1f; val5.floorWard = false; val5.expires = false; val5.invertTeamFilter = true; val5.expireDuration = 0f; val5.animateRadius = false; val5.rangeIndicator = null; Object.Destroy((Object)(object)((Component)val3.transform.GetChild(0)).gameObject); GameObject val6 = PrefabAPI.InstantiateClone(Assets.mainAssetBundle.LoadAsset<GameObject>("SmokeEffect"), "FX", false); val6.AddComponent<DestroyOnTimer>().duration = duration; val6.transform.parent = val3.transform; val6.transform.localPosition = Vector3.zero; val3.AddComponent<DestroyOnTimer>().duration = duration; HackyTeamAreaIndicator hackyTeamAreaIndicator = val3.AddComponent<HackyTeamAreaIndicator>(); hackyTeamAreaIndicator.radius = num; component4.offsetForLifetimeExpiredSound = 1f; component4.destroyOnEnemy = true; component4.destroyOnWorld = true; component4.timerAfterImpact = false; ((ProjectileExplosion)component4).falloffModel = (FalloffModel)0; component4.lifetime = 12f; component4.lifetimeRandomOffset = 0f; ((ProjectileExplosion)component4).blastRadius = num; ((ProjectileExplosion)component4).blastDamageCoefficient = 1f; ((ProjectileExplosion)component4).blastProcCoefficient = 1f; ((ProjectileExplosion)component4).fireChildren = true; ((ProjectileExplosion)component4).childrenCount = 1; ((ProjectileExplosion)component4).childrenProjectilePrefab = val3; ((ProjectileExplosion)component4).childrenDamageCoefficient = 0f; GameObject val7 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Bandit2/Bandit2SmokeBomb.prefab").WaitForCompletion(), "SkillsReturns_SmokescreenImpactEffect", false); val7.GetComponent<EffectComponent>().soundName = "Play_bandit2_shift_exit"; ContentAddition.AddEffect(val7); component4.impactEffect = val7; ContentAddition.AddProjectile(val); ContentAddition.AddProjectile(val3); ThrowFlashbang.smokeProjectilePrefab = val; } protected override void CreateSkillDef() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) base.CreateSkillDef(); skillDef.activationState = new SerializableEntityStateType(typeof(ThrowFlashbang)); skillDef.activationStateMachineName = "Weapon"; skillDef.baseMaxStock = 1; skillDef.baseRechargeInterval = 15f; skillDef.beginSkillCooldownOnSkillEnd = false; skillDef.canceledFromSprinting = false; skillDef.cancelSprintingOnActivation = true; skillDef.fullRestockOnAssign = true; skillDef.interruptPriority = (InterruptPriority)2; skillDef.isCombatSkill = false; skillDef.mustKeyPress = true; skillDef.rechargeStock = 1; skillDef.requiredStock = 1; skillDef.stockToConsume = 1; skillDef.icon = Assets.mainAssetBundle.LoadAsset<Sprite>("FlashbangIcon"); skillDef.keywordTokens = new string[1] { "KEYWORD_STUNNING" }; LanguageAPI.Add(SkillLangTokenName, "Flashbang"); LanguageAPI.Add(SkillLangTokenDesc, "Toss a flash grenade, <style=cIsDamage>stunning and blinding</style> enemies. Blinded enemies have <style=cIsDamage>reduced mobility</style> and take <style=cIsDamage>25% more damage</style>."); } } public class HackyTeamAreaIndicator : MonoBehaviour { public GameObject indicatorPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/TeamAreaIndicator, FullSphere.prefab").WaitForCompletion(); public float radius = 12f; private GameObject indicatorInstance; public void Awake() { //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) TeamFilter component = ((Component)this).GetComponent<TeamFilter>(); if (!Object.op_Implicit((Object)(object)component)) { return; } indicatorInstance = Object.Instantiate<GameObject>(indicatorPrefab, ((Component)this).transform); if (Object.op_Implicit((Object)(object)indicatorInstance)) { TeamAreaIndicator component2 = indicatorInstance.GetComponent<TeamAreaIndicator>(); if (Object.op_Implicit((Object)(object)component2)) { component2.teamFilter = component; ((Component)component2).transform.localScale = radius * Vector3.one; } } } private void OnDestroy() { if (Object.op_Implicit((Object)(object)indicatorInstance)) { Object.Destroy((Object)(object)indicatorInstance); } } } } namespace SkillsReturns.SkillSetup.Bandit2.Components.Dynamite { public class AssignDynamiteTeamFilter : MonoBehaviour { public bool fired = false; private void Start() { if (NetworkServer.active) { TeamComponent component = ((Component)this).GetComponent<TeamComponent>(); if (Object.op_Implicit((Object)(object)component)) { component.teamIndex = (TeamIndex)(-1); } } } } public class DynamiteNetworkCommands : NetworkBehaviour { private SkillLocator skillLocator; private CharacterBody characterBody; private static int kRpcRpcResetSpecialCooldown; [ClientRpc] public void RpcResetSpecialCooldown() { if (((NetworkBehaviour)this).hasAuthority) { skillLocator.special.stock = skillLocator.special.maxStock; skillLocator.special.rechargeStopwatch = 0f; } } private void Awake() { characterBody = ((Component)this).GetComponent<CharacterBody>(); skillLocator = ((Component)this).GetComponent<SkillLocator>(); } private void UNetVersion() { } protected static void InvokeRpcRpcResetSpecialCooldown(NetworkBehaviour obj, NetworkReader reader) { if (!NetworkClient.active) { Debug.LogError((object)"RPC RpcResetSpecialCooldown called on server."); } else { ((DynamiteNetworkCommands)(object)obj).RpcResetSpecialCooldown(); } } public void CallRpcResetSpeci