Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of Wanderer v0.8.10
plugins/UnforgivenMod.dll
Decompiled 2 weeks ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; 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 AncientScepter; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using EmotesAPI; using EntityStates; using EntityStates.AI.Walker; using EntityStates.Merc.Weapon; using HG; using HG.BlendableTypes; using JetBrains.Annotations; using KinematicCharacterController; using On.RoR2; using R2API; using R2API.Networking; using R2API.Networking.Interfaces; using R2API.Utils; using Rewired.ComponentControls.Effects; using RoR2; using RoR2.Achievements; using RoR2.Audio; using RoR2.CharacterAI; using RoR2.ContentManagement; using RoR2.HudOverlay; using RoR2.Projectile; using RoR2.Skills; using ThreeEyedGames; using UnforgivenMod.Modules; using UnforgivenMod.Modules.Achievements; using UnforgivenMod.Modules.BaseStates; using UnforgivenMod.Modules.Characters; using UnforgivenMod.Unforgiven; using UnforgivenMod.Unforgiven.Components; using UnforgivenMod.Unforgiven.Content; using UnforgivenMod.Unforgiven.SkillStates; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; using UnityEngine.Rendering; using UnityEngine.Rendering.PostProcessing; using UnityEngine.ResourceManagement.AsyncOperations; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("UnforgivenMod")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+fffe06f7a2627e697457126460a82e3144953db4")] [assembly: AssemblyProduct("UnforgivenMod")] [assembly: AssemblyTitle("UnforgivenMod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] internal enum UnforgivenCameraParams { DEFAULT, LAST_BREATH, AIM_SNIPER, EMOTE } namespace UnforgivenMod { internal static class Log { internal static ManualLogSource _logSource; internal static void Init(ManualLogSource logSource) { _logSource = logSource; } internal static void Debug(object data) { _logSource.LogDebug(data); } internal static void Error(object data) { _logSource.LogError(data); } internal static void ErrorAssetBundle(string assetName, string bundleName) { Error("failed to load asset, " + assetName + ", because it does not exist in asset bundle, " + bundleName); } internal static void Fatal(object data) { _logSource.LogFatal(data); } internal static void Info(object data) { _logSource.LogInfo(data); } internal static void Message(object data) { _logSource.LogMessage(data); } internal static void Warning(object data) { _logSource.LogWarning(data); } } [NetworkCompatibility(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.kenko.Unforgiven", "Unforgiven", "1.0.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class UnforgivenPlugin : BaseUnityPlugin { public const string MODUID = "com.kenko.Unforgiven"; public const string MODNAME = "Unforgiven"; public const string MODVERSION = "1.0.0"; public const string DEVELOPER_PREFIX = "KENKO"; public static UnforgivenPlugin instance; private static bool? _emotesInstalled; public static bool emotesInstalled { get { if (!_emotesInstalled.HasValue) { _emotesInstalled = Chainloader.PluginInfos.ContainsKey("com.weliveinasociety.CustomEmotesAPI"); } return _emotesInstalled.Value; } } public static bool scepterInstalled => Chainloader.PluginInfos.ContainsKey("com.DestroyedClone.AncientScepter"); private void Awake() { instance = this; NetworkingAPI.RegisterMessageType<SyncWindExplosion>(); NetworkingAPI.RegisterMessageType<SyncStacks>(); Log.Init(((BaseUnityPlugin)this).Logger); Language.Init(); new UnforgivenSurvivor().Initialize(); new ContentPacks().Initialize(); } } } namespace UnforgivenMod.Unforgiven { public class UnforgivenSurvivor : SurvivorBase<UnforgivenSurvivor> { public static class EmoteAPICompat { [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void Emotes() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown GameObject val = UnforgivenAssets.mainAssetBundle.LoadAsset<GameObject>("unforgiven_emoteskeleton"); CustomEmotesAPI.ImportArmature(characterPrefab, val, 0, true); CustomEmotesAPI.animChanged += new AnimationChanged(CustomEmotesAPI_animChanged); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void CustomEmotesAPI_animChanged(string newAnimation, BoneMapper mapper) { if (newAnimation != "none") { if (((Object)((Component)mapper).transform).name == "unforgiven_emoteskeleton") { ((Component)((Component)((Component)mapper).transform.parent).GetComponent<ChildLocator>().FindChild("KatanaModel")).gameObject.SetActive(false); } } else if (((Object)((Component)mapper).transform).name == "unforgiven_emoteskeleton") { ((Component)((Component)((Component)mapper).transform.parent).GetComponent<ChildLocator>().FindChild("KatanaModel")).gameObject.SetActive(true); } } } public const string UNFORGIVEN_PREFIX = "KENKO_UNFORGIVEN_"; internal static GameObject characterPrefab; public static SkillDef firstBreath; public override string assetBundleName => "unforgiven"; public override string bodyName => "UnforgivenBody"; public override string masterName => "UnforgivenMonsterMaster"; public override string modelPrefabName => "mdlUnforgiven"; public override string displayPrefabName => "UnforgivenDisplay"; public override string survivorTokenPrefix => "KENKO_UNFORGIVEN_"; public override BodyInfo bodyInfo => new BodyInfo { bodyName = bodyName, bodyNameToken = "KENKO_UNFORGIVEN_NAME", subtitleNameToken = "KENKO_UNFORGIVEN_SUBTITLE", characterPortrait = assetBundle.LoadAsset<Texture>("texUnforgivenIcon"), bodyColor = UnforgivenAssets.unforgivenColor, sortPosition = 7.9f, crosshair = CharacterAssets.LoadCrosshair("Standard"), podPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/NetworkedObjects/SurvivorPod"), damage = UnforgivenConfig.damage.Value, damageGrowth = UnforgivenConfig.damageGrowth.Value * UnforgivenConfig.damage.Value, attackSpeed = UnforgivenConfig.attackSpeed.Value, attackSpeedGrowth = UnforgivenConfig.attackSpeedGrowth.Value, crit = UnforgivenConfig.crit.Value, critGrowth = UnforgivenConfig.critGrowth.Value, maxHealth = UnforgivenConfig.maxHealth.Value, healthGrowth = UnforgivenConfig.healthGrowth.Value * UnforgivenConfig.maxHealth.Value, healthRegen = UnforgivenConfig.healthRegen.Value, regenGrowth = UnforgivenConfig.regenGrowth.Value * UnforgivenConfig.healthRegen.Value, shield = UnforgivenConfig.shield.Value, shieldGrowth = UnforgivenConfig.shieldGrowth.Value * UnforgivenConfig.shield.Value, armor = UnforgivenConfig.armor.Value, armorGrowth = UnforgivenConfig.armorGrowth.Value * UnforgivenConfig.armor.Value, moveSpeed = UnforgivenConfig.moveSpeed.Value, moveSpeedGrowth = UnforgivenConfig.moveSpeedGrowth.Value * UnforgivenConfig.moveSpeed.Value, jumpPower = UnforgivenConfig.jumpPower.Value, jumpPowerGrowth = UnforgivenConfig.jumpPowerGrowth.Value * UnforgivenConfig.jumpPower.Value, acceleration = UnforgivenConfig.acceleration.Value, jumpCount = UnforgivenConfig.jumpCount.Value, autoCalculateLevelStats = UnforgivenConfig.autoCalculateLevelStats.Value }; public override CustomRendererInfo[] customRendererInfos => new CustomRendererInfo[5] { new CustomRendererInfo { childName = "Model" }, new CustomRendererInfo { childName = "KatanaModel" }, new CustomRendererInfo { childName = "SheathModel" }, new CustomRendererInfo { childName = "EmpoweredSword" }, new CustomRendererInfo { childName = "ArmModel" } }; public override UnlockableDef characterUnlockableDef => UnforgivenUnlockables.characterUnlockableDef; public override ItemDisplaysBase itemDisplays => new UnforgivenItemDisplays(); public override AssetBundle assetBundle { get; protected set; } public override GameObject bodyPrefab { get; protected set; } public override CharacterBody prefabCharacterBody { get; protected set; } public override GameObject characterModelObject { get; protected set; } public override CharacterModel prefabCharacterModel { get; protected set; } public override GameObject displayPrefab { get; protected set; } public override void Initialize() { base.Initialize(); } public override void InitializeCharacter() { UnforgivenConfig.Init(); UnforgivenUnlockables.Init(); base.InitializeCharacter(); CameraParams.InitializeParams(); DamageTypes.Init(); UnforgivenStates.Init(); UnforgivenTokens.Init(); UnforgivenBuffs.Init(assetBundle); UnforgivenAssets.Init(assetBundle); InitializeEntityStateMachines(); InitializeSkills(); InitializeSkins(); InitializeCharacterMaster(); AdditionalBodySetup(); characterPrefab = bodyPrefab; AddHooks(); } private void AdditionalBodySetup() { //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Expected O, but got Unknown //IL_0092: Expected O, but got Unknown //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Expected O, but got Unknown //IL_00ba: Expected O, but got Unknown //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: 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_005b: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Expected O, but got Unknown //IL_006a: Expected O, but got Unknown AddHitboxes(); bodyPrefab.AddComponent<UnforgivenController>(); bodyPrefab.AddComponent<UnforgivenTracker>(); bodyPrefab.AddComponent<AirborneTargetLineController>(); if (!UnforgivenConfig.noShieldVisual.Value) { TempVisualEffectAPI.AddTemporaryVisualEffect(UnforgivenAssets.shieldEffect, new EffectRadius(tempAddShieldRadius), new EffectCondition(tempAddShield), ""); } TempVisualEffectAPI.AddTemporaryVisualEffect(UnforgivenAssets.dashCdEffect, new EffectRadius(dashCdRadius), new EffectCondition(dashCooldown), ""); TempVisualEffectAPI.AddTemporaryVisualEffect(UnforgivenAssets.nadoUpEffect, new EffectRadius(nadoUpRadius), new EffectCondition(tempNadoUp), ""); AkBank component = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Merc/MercBody.prefab").WaitForCompletion().GetComponent<AkBank>(); AkBank val = bodyPrefab.AddComponent<AkBank>(); ((AkTriggerHandler)val).triggerList = ((AkTriggerHandler)component).triggerList; val.data = component.data; ((AkTriggerHandler)val).useOtherObject = false; val.decodeBank = false; val.overrideLoadSetting = false; val.loadAsynchronous = false; val.saveDecodedBank = false; val.unloadTriggerList = component.unloadTriggerList; static float dashCdRadius(CharacterBody body) { return body.radius * 1.25f; } static bool dashCooldown(CharacterBody body) { return body.HasBuff(UnforgivenBuffs.dashCooldownBuff); } static float nadoUpRadius(CharacterBody body) { return body.radius * 5f; } static bool tempAddShield(CharacterBody body) { return body.HasBuff(UnforgivenBuffs.hasShieldBuff); } static float tempAddShieldRadius(CharacterBody body) { return body.radius * 0.9f; } static bool tempNadoUp(CharacterBody body) { return body.HasBuff(UnforgivenBuffs.stabMaxStacksBuff); } } public void AddHitboxes() { Prefabs.SetupHitBoxGroup(characterModelObject, "MeleeHitbox", "MeleeHitbox"); Prefabs.SetupHitBoxGroup(characterModelObject, "SteelTempestHitbox", "SteelTempestHitbox"); Prefabs.SetupHitBoxGroup(characterModelObject, "SteelTempestSpinHitbox", "SteelTempestSpinHitbox"); } public override void InitializeEntityStateMachines() { Prefabs.ClearEntityStateMachines(bodyPrefab); Prefabs.AddMainEntityStateMachine(bodyPrefab, "Body", typeof(MainState), typeof(SpawnTeleporterState)); Prefabs.AddEntityStateMachine(bodyPrefab, "Weapon"); Prefabs.AddEntityStateMachine(bodyPrefab, "Weapon2"); Prefabs.AddEntityStateMachine(bodyPrefab, "Dash"); Prefabs.AddEntityStateMachine(bodyPrefab, "Dash2"); } public override void InitializeSkills() { bodyPrefab.AddComponent<UnforgivenPassive>(); Skills.CreateSkillFamilies(bodyPrefab); AddPassiveSkills(); AddPrimarySkills(); AddSecondarySkills(); AddUtilitySkills(); AddSpecialSkills(); if (UnforgivenPlugin.scepterInstalled) { InitializeScepter(); } } private void AddPassiveSkills() { //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) UnforgivenPassive component = bodyPrefab.GetComponent<UnforgivenPassive>(); SkillLocator component2 = bodyPrefab.GetComponent<SkillLocator>(); component2.passiveSkill.enabled = false; component.unforgivenPassive = Skills.CreateSkillDef(new SkillDefInfo { skillName = "KENKO_UNFORGIVEN_PASSIVE_NAME", skillNameToken = "KENKO_UNFORGIVEN_PASSIVE_NAME", skillDescriptionToken = "KENKO_UNFORGIVEN_PASSIVE_DESCRIPTION", skillIcon = assetBundle.LoadAsset<Sprite>("texPassiveIcon"), keywordTokens = new string[0], activationState = new SerializableEntityStateType(typeof(Idle)), activationStateMachineName = "", baseMaxStock = 1, baseRechargeInterval = 0f, beginSkillCooldownOnSkillEnd = false, canceledFromSprinting = false, forceSprintDuringState = false, fullRestockOnAssign = true, interruptPriority = (InterruptPriority)0, resetCooldownTimerOnUse = false, isCombatSkill = false, mustKeyPress = false, cancelSprintingOnActivation = false, rechargeStock = 1, requiredStock = 2, stockToConsume = 1 }); Skills.AddPassiveSkills(component.passiveSkillSlot.skillFamily, component.unforgivenPassive); } private void AddPrimarySkills() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) UnforgivenSteppedSkillDef unforgivenSteppedSkillDef = Skills.CreateSkillDef<UnforgivenSteppedSkillDef>(new SkillDefInfo("Swift Strikes", "KENKO_UNFORGIVEN_PRIMARY_SWING_NAME", "KENKO_UNFORGIVEN_PRIMARY_SWING_DESCRIPTION", assetBundle.LoadAsset<Sprite>("texPrimaryIcon"), new SerializableEntityStateType(typeof(SlashCombo)))); unforgivenSteppedSkillDef.stepCount = 2; unforgivenSteppedSkillDef.stepGraceDuration = 0.1f; ((SkillDef)unforgivenSteppedSkillDef).keywordTokens = new string[0]; Skills.AddPrimarySkills(bodyPrefab, unforgivenSteppedSkillDef); } private void AddSecondarySkills() { //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) //IL_007c: Unknown result type (might be due to invalid IL or missing references) SkillDefInfo skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = "SteelTempest"; skillDefInfo.skillNameToken = "KENKO_UNFORGIVEN_SECONDARY_STEEL_NAME"; skillDefInfo.skillDescriptionToken = "KENKO_UNFORGIVEN_SECONDARY_STEEL_DESCRIPTION"; skillDefInfo.keywordTokens = new string[2] { Tokens.agileKeyword, Tokens.unforgivenSwiftKeyword }; skillDefInfo.skillIcon = assetBundle.LoadAsset<Sprite>("texSecondaryIcon"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(EnterStab)); skillDefInfo.activationStateMachineName = "Weapon2"; skillDefInfo.interruptPriority = (InterruptPriority)1; skillDefInfo.baseMaxStock = 1; skillDefInfo.baseRechargeInterval = 2.5f; skillDefInfo.rechargeStock = 1; skillDefInfo.requiredStock = 1; skillDefInfo.stockToConsume = 1; skillDefInfo.resetCooldownTimerOnUse = false; skillDefInfo.fullRestockOnAssign = false; skillDefInfo.dontAllowPastMaxStocks = false; skillDefInfo.beginSkillCooldownOnSkillEnd = true; skillDefInfo.mustKeyPress = false; skillDefInfo.isCombatSkill = true; skillDefInfo.canceledFromSprinting = false; skillDefInfo.cancelSprintingOnActivation = false; skillDefInfo.forceSprintDuringState = false; SkillDef val = (SkillDef)(object)Skills.CreateSkillDef<ScaleCDwAttackSpeed>(skillDefInfo); Skills.AddSecondarySkills(bodyPrefab, val); } private void AddUtilitySkills() { //IL_0055: 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_006c: Unknown result type (might be due to invalid IL or missing references) SkillDefInfo skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = "SweepingBlade"; skillDefInfo.skillNameToken = "KENKO_UNFORGIVEN_UTILITY_SWEEP_NAME"; skillDefInfo.skillDescriptionToken = "KENKO_UNFORGIVEN_UTILITY_SWEEP_DESCRIPTION"; skillDefInfo.keywordTokens = new string[0]; skillDefInfo.skillIcon = assetBundle.LoadAsset<Sprite>("texUtilityIcon"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(Dash)); skillDefInfo.activationStateMachineName = "Dash"; skillDefInfo.interruptPriority = (InterruptPriority)1; skillDefInfo.baseRechargeInterval = 0.25f; skillDefInfo.baseMaxStock = 1; skillDefInfo.rechargeStock = 1; skillDefInfo.requiredStock = 1; skillDefInfo.stockToConsume = 1; skillDefInfo.resetCooldownTimerOnUse = false; skillDefInfo.fullRestockOnAssign = true; skillDefInfo.dontAllowPastMaxStocks = false; skillDefInfo.mustKeyPress = false; skillDefInfo.beginSkillCooldownOnSkillEnd = false; skillDefInfo.isCombatSkill = true; skillDefInfo.canceledFromSprinting = false; skillDefInfo.cancelSprintingOnActivation = false; skillDefInfo.forceSprintDuringState = true; SkillDef val = (SkillDef)(object)Skills.CreateSkillDef<DashTrackerSkillDef>(skillDefInfo); Skills.AddUtilitySkills(bodyPrefab, val); } private void AddSpecialSkills() { //IL_0055: 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_006c: Unknown result type (might be due to invalid IL or missing references) SkillDefInfo skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = "LastBreath"; skillDefInfo.skillNameToken = "KENKO_UNFORGIVEN_SPECIAL_BREATH_NAME"; skillDefInfo.skillDescriptionToken = "KENKO_UNFORGIVEN_SPECIAL_BREATH_DESCRIPTION"; skillDefInfo.keywordTokens = new string[0]; skillDefInfo.skillIcon = assetBundle.LoadAsset<Sprite>("texSpecialIcon"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(DashSpecial)); skillDefInfo.activationStateMachineName = "Dash"; skillDefInfo.interruptPriority = (InterruptPriority)2; skillDefInfo.baseRechargeInterval = 9f; skillDefInfo.baseMaxStock = 1; skillDefInfo.rechargeStock = 1; skillDefInfo.requiredStock = 1; skillDefInfo.stockToConsume = 1; skillDefInfo.resetCooldownTimerOnUse = false; skillDefInfo.fullRestockOnAssign = true; skillDefInfo.dontAllowPastMaxStocks = false; skillDefInfo.mustKeyPress = true; skillDefInfo.beginSkillCooldownOnSkillEnd = true; skillDefInfo.isCombatSkill = true; skillDefInfo.canceledFromSprinting = false; skillDefInfo.cancelSprintingOnActivation = false; skillDefInfo.forceSprintDuringState = true; SkillDef val = (SkillDef)(object)Skills.CreateSkillDef<UnforgivenSpecialTrackerSkillDef>(skillDefInfo); Skills.AddSpecialSkills(bodyPrefab, val); } private void InitializeScepter() { //IL_0055: 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_006c: Unknown result type (might be due to invalid IL or missing references) SkillDefInfo skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = "FirstBreath"; skillDefInfo.skillNameToken = "KENKO_UNFORGIVEN_SPECIAL_SCEP_BREATH_NAME"; skillDefInfo.skillDescriptionToken = "KENKO_UNFORGIVEN_SPECIAL_SCEP_BREATH_DESCRIPTION"; skillDefInfo.keywordTokens = new string[0]; skillDefInfo.skillIcon = assetBundle.LoadAsset<Sprite>("texSpecialIcon"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(DashSpecial)); skillDefInfo.activationStateMachineName = "Dash"; skillDefInfo.interruptPriority = (InterruptPriority)2; skillDefInfo.baseRechargeInterval = 9f; skillDefInfo.baseMaxStock = 1; skillDefInfo.rechargeStock = 1; skillDefInfo.requiredStock = 1; skillDefInfo.stockToConsume = 1; skillDefInfo.resetCooldownTimerOnUse = false; skillDefInfo.fullRestockOnAssign = true; skillDefInfo.dontAllowPastMaxStocks = false; skillDefInfo.mustKeyPress = true; skillDefInfo.beginSkillCooldownOnSkillEnd = true; skillDefInfo.isCombatSkill = true; skillDefInfo.canceledFromSprinting = false; skillDefInfo.cancelSprintingOnActivation = false; skillDefInfo.forceSprintDuringState = true; firstBreath = (SkillDef)(object)Skills.CreateSkillDef<UnforgivenSpecialTrackerSkillDef>(skillDefInfo); ItemBase<AncientScepterItem>.instance.RegisterScepterSkill(firstBreath, bodyName, (SkillSlot)3, 0); } public override void InitializeSkins() { ModelSkinController val = ((Component)prefabCharacterModel).gameObject.AddComponent<ModelSkinController>(); RendererInfo[] baseRendererInfos = prefabCharacterModel.baseRendererInfos; List<SkinDef> list = new List<SkinDef>(); SkinDef val2 = Skins.CreateSkinDef("DEFAULT_SKIN", assetBundle.LoadAsset<Sprite>("texDefaultSkin"), baseRendererInfos, ((Component)prefabCharacterModel).gameObject); val2.meshReplacements = Skins.getMeshReplacements(assetBundle, baseRendererInfos, "meshBody", "meshDefaultSword", "meshSheath", "meshEmpoweredSword", "meshArm"); list.Add(val2); SkinDef val3 = Skins.CreateSkinDef("KENKO_UNFORGIVEN_MASTERY_SKIN_NAME", assetBundle.LoadAsset<Sprite>("texWhirlwindSkin"), baseRendererInfos, ((Component)prefabCharacterModel).gameObject, UnforgivenUnlockables.masterySkinUnlockableDef); val3.meshReplacements = Skins.getMeshReplacements(assetBundle, baseRendererInfos, "meshAscendancyBody", "meshAscendancySword", "meshAscendancySheath", "meshAscendancySwordEmpowered", "meshAscendancyArm"); val3.rendererInfos[0].defaultMaterial = UnforgivenAssets.ascendencyMat; val3.rendererInfos[1].defaultMaterial = UnforgivenAssets.ascendencyMat; val3.rendererInfos[2].defaultMaterial = UnforgivenAssets.ascendencyMat; val3.rendererInfos[3].defaultMaterial = UnforgivenAssets.ascendencyMat; val3.rendererInfos[4].defaultMaterial = UnforgivenAssets.ascendencyMat; list.Add(val3); val.skins = list.ToArray(); } public override void InitializeCharacterMaster() { UnforgivenAI.Init(bodyPrefab, masterName); } private void AddHooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown CharacterBody.RecalculateStats += new hook_RecalculateStats(CharacterBody_RecalculateStats); HealthComponent.TakeDamageProcess += new hook_TakeDamageProcess(HealthComponent_TakeDamageProcess); GlobalEventManager.onCharacterDeathGlobal += GlobalEventManager_onCharacterDeathGlobal; SurvivorCatalog.Init += new hook_Init(SurvivorCatalog_Init); } private void SurvivorCatalog_Init(orig_Init orig) { orig.Invoke(); if (UnforgivenPlugin.emotesInstalled) { EmoteAPICompat.Emotes(); } } private static void GlobalEventManager_onCharacterDeathGlobal(DamageReport damageReport) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0035: 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) CharacterBody attackerBody = damageReport.attackerBody; NetworkIdentity val = default(NetworkIdentity); if (Object.op_Implicit((Object)(object)attackerBody) && Object.op_Implicit((Object)(object)damageReport.attackerMaster) && Object.op_Implicit((Object)(object)damageReport.victim) && attackerBody.bodyIndex == BodyCatalog.FindBodyIndex("UnforgivenBody") && damageReport.victimBody.HasBuff(UnforgivenBuffs.airborneBuff) && ((Component)damageReport.victim).gameObject.TryGetComponent<NetworkIdentity>(ref val)) { NetMessageExtensions.Send((INetMessage)(object)new SyncWindExplosion(val.netId, ((Component)damageReport.victim).gameObject), (NetworkDestination)1); } } private void HealthComponent_TakeDamageProcess(orig_TakeDamageProcess orig, HealthComponent self, DamageInfo damageInfo) { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) if ((NetworkServer.active && self.alive) || !self.godMode || self.ospTimer <= 0f) { CharacterBody body = self.body; UnforgivenController unforgivenController = default(UnforgivenController); if (Object.op_Implicit((Object)(object)body) && body.bodyIndex == BodyCatalog.FindBodyIndex("UnforgivenBody") && !damageInfo.rejected && ((Component)body).TryGetComponent<UnforgivenController>(ref unforgivenController) && unforgivenController.shieldAmount == 100f) { body.healthComponent.AddBarrier(body.healthComponent.fullCombinedHealth * 0.25f); unforgivenController.shieldAmount = 0f; body.RemoveBuff(UnforgivenBuffs.hasShieldBuff); Util.PlaySound("sfx_unforgiven_nado_impact", ((Component)body).gameObject); Util.PlaySound("sfx_unforgiven_lost_stacks", ((Component)body).gameObject); } } orig.Invoke(self, damageInfo); } private void CharacterBody_RecalculateStats(orig_RecalculateStats orig, CharacterBody self) { //IL_0015: 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) orig.Invoke(self); if (Object.op_Implicit((Object)(object)self) && self.bodyIndex == BodyCatalog.FindBodyIndex("UnforgivenBody")) { self.crit *= 1.5f; self.critMultiplier *= 0.9f; } } } } namespace UnforgivenMod.Unforgiven.SkillStates { public class Dash : BaseUnforgivenSkillState { public static float baseDuration = 0.4f; public static float baseExtraDuration = 0.2f; public static float extraDistance = 2.5f; public static float hitRange = 4.5f; private const float minimumDashDuration = 0.2f; public int targetIndex = 0; public CharacterBody victimBody; private Transform modelTransform; private HurtBox hurtbox; private UnforgivenTracker tracker; private Vector3 direction; private float distance; private float duration; private float extraDuration; private float speed; private bool hasFired; private bool hasStartedDash; private float damageCoefficient = UnforgivenConfig.dashDamageCoefficient.Value; private float minDistance = 7f; private AimRequest aimRequest; private int maxStacks => UnforgivenConfig.baseMaxDashStacks.Value + (((EntityState)this).skillLocator.utility.maxStock - 1); public override void OnEnter() { //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: 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_01cd: Unknown result type (might be due to invalid IL or missing references) RefreshState(); base.OnEnter(); if (!(((BaseState)this).moveSpeedStat > 0f) || !(((EntityState)this).characterBody.baseMoveSpeed > 0f)) { Log.Warning("Sweeping Blade cannot start with non-positive movement speed."); if (((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); ((BaseSkillState)this).activatorSkillSlot.AddOneStock(); } return; } if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { aimRequest = ((EntityState)this).cameraTargetParams.RequestAimType((AimType)2); } if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && NetworkServer.active) { damageCoefficient = UnforgivenConfig.dashDamageCoefficient.Value + (float)((EntityState)this).characterBody.GetBuffCount(UnforgivenBuffs.stackingDashDamageBuff) * UnforgivenConfig.dashStackingDamageCoefficient.Value; } tracker = ((EntityState)this).GetComponent<UnforgivenTracker>(); if (Object.op_Implicit((Object)(object)tracker) && ((EntityState)this).isAuthority) { hurtbox = tracker.GetTrackingTarget(); } if (Object.op_Implicit((Object)(object)hurtbox) && Object.op_Implicit((Object)(object)hurtbox.healthComponent) && Object.op_Implicit((Object)(object)hurtbox.healthComponent.body)) { victimBody = hurtbox.healthComponent.body; } if (!Object.op_Implicit((Object)(object)victimBody)) { if (((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); ((BaseSkillState)this).activatorSkillSlot.AddOneStock(); } return; } hasStartedDash = true; if (NetworkServer.active) { CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 1); victimBody.AddTimedBuff(UnforgivenBuffs.dashCooldownBuff, 6f); ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility); } ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); Vector3 corePosition = Util.GetCorePosition(victimBody); float num = minDistance; Vector3 val = ((EntityState)this).transform.position - corePosition; distance = Mathf.Max(num, ((Vector3)(ref val)).magnitude); val = corePosition - ((EntityState)this).transform.position; direction = ((Vector3)(ref val)).normalized; float num2 = baseDuration + baseExtraDuration; float num3 = Mathf.Max(0.2f, num2 * ((EntityState)this).characterBody.baseMoveSpeed / ((BaseState)this).moveSpeedStat); duration = num3 * baseDuration / num2; extraDuration = num3 - duration; speed = distance / duration; if (((EntityState)this).isAuthority && ((EntityState)this).skillLocator.secondary.cooldownRemaining <= duration + extraDuration) { ((EntityState)this).skillLocator.secondary.RunRecharge(duration + extraDuration); } ((EntityState)this).gameObject.layer = LayerIndex.fakeActor.intVal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); unforgivenController.Unsheath(); ((EntityState)this).PlayCrossfade("FullBody, Override", "Dash", 0.1f); Util.PlaySound("Play_merc_shift_slice", ((EntityState)this).gameObject); if (((BaseState)this).isGrounded) { ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); } } public override void OnExit() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).gameObject.layer = LayerIndex.defaultLayer.intVal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); ((EntityState)this).characterMotor.velocity = Vector3.zero; AimRequest obj = aimRequest; if (obj != null) { obj.Dispose(); } if (NetworkServer.active && hasStartedDash) { ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility); CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags & -2); int num = ((EntityState)this).characterBody.GetBuffCount(UnforgivenBuffs.stackingDashDamageBuff); if (num >= maxStacks) { num = maxStacks - 1; } ((EntityState)this).characterBody.ClearTimedBuffs(UnforgivenBuffs.stackingDashDamageBuff); for (int i = 0; i < num + 1; i++) { ((EntityState)this).characterBody.AddTimedBuff(UnforgivenBuffs.stackingDashDamageBuff, 6f, maxStacks); } } ((EntityState)this).OnExit(); } private void Fire() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0037: 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) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0059: 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_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: 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_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0096: 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_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Expected O, but got Unknown //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_011b: 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_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: 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_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Expected O, but got Unknown if (!hasFired) { hasFired = true; if (NetworkServer.active) { DamageInfo val = new DamageInfo { position = victimBody.transform.position, attacker = ((EntityState)this).gameObject, inflictor = ((EntityState)this).gameObject, damage = damageCoefficient * ((BaseState)this).damageStat, damageColorIndex = (DamageColorIndex)0, damageType = DamageTypeCombo.op_Implicit((DamageType)(empoweredSpecial ? 2 : 0)), crit = ((BaseState)this).RollCrit(), force = Vector3.zero, procChainMask = default(ProcChainMask), procCoefficient = 1f }; val.damageType.damageSource = (DamageSource)4; victimBody.healthComponent.TakeDamage(val); GlobalEventManager.instance.OnHitEnemy(val, ((Component)victimBody).gameObject); GlobalEventManager.instance.OnHitAll(val, ((Component)victimBody).gameObject); EffectManager.SpawnEffect(UnforgivenAssets.unforgivenHitEffect, new EffectData { origin = victimBody.transform.position, rotation = Quaternion.identity, networkSoundEventIndex = UnforgivenAssets.swordImpactSoundEvent.index }, true); } } } public override void FixedUpdate() { //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007c: 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_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) base.FixedUpdate(); if (hasStartedDash) { if (((EntityState)this).fixedAge >= duration && extraDuration != 0f) { speed = extraDistance / extraDuration; } ((EntityState)this).characterDirection.forward = direction; CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += direction * speed * Time.fixedDeltaTime; ((EntityState)this).characterMotor.velocity = Vector3.zero; if (Object.op_Implicit((Object)(object)victimBody)) { Fire(); } if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration + extraDuration) { ((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 override void OnSerialize(NetworkWriter writer) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) NetworkExtensions.Write(writer, HurtBoxReference.FromHurtBox(hurtbox)); } public override void OnDeserialize(NetworkReader reader) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) HurtBoxReference val = NetworkExtensions.ReadHurtBoxReference(reader); hurtbox = ((HurtBoxReference)(ref val)).ResolveHurtBox(); } } public class DashSpecial : BaseUnforgivenSkillState { public int targetIndex = 0; public CharacterBody victimBody; private Transform modelTransform; private HurtBoxGroup hurtboxGroup; private Vector3 lastKnownPosition; private Vector3 direction; private float distance; private float duration; private float speed; private float stopwatch; public static float stopTrackTime = 0.8f; private float baseDuration = 0.1f; private const float baseExtraDuration = 0.05f; public float extraDuration; public static float extraDistance = 3.25f; public static float exitExtraDistance = 3.25f; public static float baseChainPrepDuration = 0.067f; public static float basePrepDuration = 0.067f; private float prepDuration; private float prepStopwatch; private bool holdBuffer; private bool hasStartedDash; private AimRequest aimRequest; public override void OnEnter() { //IL_006a: 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) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: 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_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: 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_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0169: 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_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: Unknown result type (might be due to invalid IL or missing references) //IL_02af: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) RefreshState(); base.OnEnter(); if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { aimRequest = ((EntityState)this).cameraTargetParams.RequestAimType((AimType)2); } RaycastHit val = default(RaycastHit); Vector3 val2; if (((EntityState)this).inputBank.GetAimRaycast(60f, ref val)) { val2 = Vector3.MoveTowards(((RaycastHit)(ref val)).point, ((EntityState)this).transform.position, 5f); } else { Ray aimRay = ((EntityState)this).inputBank.GetAimRay(); val2 = Vector3.MoveTowards(((Ray)(ref aimRay)).GetPoint(60f), ((EntityState)this).transform.position, 5f); } Vector3 origin = val2; origin.y += 2.5f; HurtBox[] hurtBoxes = new SphereSearch { origin = origin, radius = 30f, mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask }.RefreshCandidates().FilterCandidatesByHurtBoxTeam(TeamMask.GetEnemyTeams(((EntityState)this).teamComponent.teamIndex)).OrderCandidatesByDistance() .FilterCandidatesByDistinctHurtBoxEntities() .GetHurtBoxes(); if (hurtBoxes.Length != 0) { HurtBox[] array = hurtBoxes; foreach (HurtBox hurtBox in array) { if (UnforgivenSpecialTrackerSkillDef.TryGetEligibleBody(hurtBox, out var targetBody)) { victimBody = targetBody; break; } } } if (!Object.op_Implicit((Object)(object)victimBody)) { HurtBox[] hurtBoxes2 = new SphereSearch { origin = ((EntityState)this).transform.position, radius = 60f, mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask }.RefreshCandidates().FilterCandidatesByHurtBoxTeam(TeamMask.GetEnemyTeams(((EntityState)this).teamComponent.teamIndex)).OrderCandidatesByDistance() .FilterCandidatesByDistinctHurtBoxEntities() .GetHurtBoxes(); HurtBox[] array2 = hurtBoxes2; foreach (HurtBox hurtBox2 in array2) { if (UnforgivenSpecialTrackerSkillDef.TryGetEligibleBody(hurtBox2, out var targetBody2)) { victimBody = targetBody2; break; } } } if (!Object.op_Implicit((Object)(object)victimBody)) { if (((EntityState)this).isAuthority) { ((EntityState)this).skillLocator.special.AddOneStock(); ((EntityState)this).outer.SetNextStateToMain(); } return; } hasStartedDash = true; if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && NetworkServer.active) { CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 1); ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility); } ((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f); Vector3 val3 = ((EntityState)this).transform.position - victimBody.coreTransform.position; distance = ((Vector3)(ref val3)).magnitude + 4f; val3 = victimBody.coreTransform.position - ((EntityState)this).transform.position; direction = ((Vector3)(ref val3)).normalized; duration = baseDuration / ((BaseState)this).attackSpeedStat; extraDuration = 0.05f / ((BaseState)this).attackSpeedStat; speed = distance / duration; prepDuration = baseChainPrepDuration / ((BaseState)this).attackSpeedStat; unforgivenController.Unsheath(); ((EntityState)this).PlayCrossfade("FullBody, Override", "Dash", 0.05f); Util.PlaySound("Play_merc_shift_slice", ((EntityState)this).gameObject); } public override void OnExit() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0096: 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) ((EntityState)this).gameObject.layer = LayerIndex.defaultLayer.intVal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); ((EntityState)this).characterMotor.velocity = Vector3.zero; AimRequest obj = aimRequest; if (obj != null) { obj.Dispose(); } if (Object.op_Implicit((Object)(object)hurtboxGroup)) { HurtBoxGroup val = hurtboxGroup; int hurtBoxesDeactivatorCounter = val.hurtBoxesDeactivatorCounter - 1; val.hurtBoxesDeactivatorCounter = hurtBoxesDeactivatorCounter; } if (NetworkServer.active && hasStartedDash) { CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags & -2); ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility); } ((EntityState)this).OnExit(); } public override void FixedUpdate() { //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) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_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_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) base.FixedUpdate(); if (!hasStartedDash) { return; } if (prepStopwatch >= prepDuration) { stopwatch += Time.fixedDeltaTime; Vector3 val = ((!Object.op_Implicit((Object)(object)victimBody)) ? lastKnownPosition : (lastKnownPosition = victimBody.coreTransform.position)); if (stopwatch < duration * 0.5f) { Vector3 val2 = val - ((EntityState)this).transform.position; direction = ((Vector3)(ref val2)).normalized; } if (stopwatch >= duration && extraDuration != 0f) { speed = extraDistance / extraDuration; } ((EntityState)this).characterDirection.forward = direction; CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += direction * speed * Time.fixedDeltaTime; ((EntityState)this).characterMotor.velocity = Vector3.zero; ((EntityState)this).gameObject.layer = LayerIndex.fakeActor.intVal; ((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers(); if (((EntityState)this).isAuthority && stopwatch >= duration + 0.05f) { if (unforgivenController.bufferedSpin) { holdBuffer = true; } EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Dash").SetNextState((EntityState)(object)new Special { isBuffered = holdBuffer }); } } else { prepStopwatch += Time.fixedDeltaTime; } } 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 DashSpin : BaseMeleeAttack { public bool empoweredSpin; private bool hasGrantedStacks; private bool activateNado; private EntityStateMachine dashStateMachine; private bool waitingForDash; public bool IsWaitingForDash => !hasFired && Object.op_Implicit((Object)(object)dashStateMachine) && (dashStateMachine.state is Dash || dashStateMachine.state is DashSpecial || dashStateMachine.HasPendingState()); public override void OnEnter() { //IL_0055: 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_0061: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: 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_0190: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: 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_01bb: Unknown result type (might be due to invalid IL or missing references) RefreshState(); dashStateMachine = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Dash"); if (!Object.op_Implicit((Object)(object)dashStateMachine)) { Log.Error("DashSpin could not find the required Dash state machine; the spin cannot wait for a dash."); } hitboxGroupName = "SteelTempestSpinHitbox"; damageType = DamageTypeCombo.op_Implicit((DamageType)(empoweredSpecial ? 2 : 0)); damageSource = (DamageSource)2; damageCoefficient = (empoweredSpin ? UnforgivenConfig.tornadoDamageCoefficient.Value : UnforgivenConfig.stabDamageCoefficient.Value); procCoefficient = 1f; pushForce = 300f; bonusForce = (empoweredSpin ? (Vector3.up * 3000f) : Vector3.zero); baseDuration = 1.1f; attackStartPercentTime = 0f; attackEndPercentTime = 0.4f; earlyExitPercentTime = 0.5f; hitStopDuration = 0.05f; attackRecoil = 2f / ((BaseState)this).attackSpeedStat; hitHopVelocity = 8f; swingSoundString = GroundLight2.slash1Sound; hitSoundString = "sfx_unforgiven_stab"; playbackRateParam = "Slash.playbackRate"; muzzleString = "SpinMuzzle"; swingEffectPrefab = (empoweredSpin ? UnforgivenAssets.spinNadoEffect : (empoweredSpecial ? UnforgivenAssets.spinEmpoweredSlashEffect : UnforgivenAssets.spinSlashEffect)); hitEffectPrefab = UnforgivenAssets.unforgivenHitEffect; if (empoweredSpin) { activateNado = true; moddedDamageTypeHolder.Add(DamageTypes.KnockAirborne); } impactSound = (empoweredSpin ? UnforgivenAssets.nadoImpactSoundEvent.index : UnforgivenAssets.swordImpactSoundEvent.index); waitingForDash = IsWaitingForDash; base.OnEnter(); ((EntityState)this).characterBody.isSprinting = true; } protected override void PlayAttackAnimation() { if (!IsWaitingForDash) { unforgivenController.Unsheath(); ((EntityState)this).PlayCrossfade("FullBody, Override", "DashSpin", 0.05f); } } public override void FixedUpdate() { //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).characterBody.isSprinting = true; if (IsWaitingForDash) { waitingForDash = true; return; } if (waitingForDash) { waitingForDash = false; PlayAttackAnimation(); } hitPauseTimer -= Time.fixedDeltaTime; if (hitPauseTimer <= 0f && inHitPause) { RemoveHitstop(); } if (!inHitPause) { stopwatch += Time.fixedDeltaTime; } else { if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.velocity = Vector3.zero; } if (Object.op_Implicit((Object)(object)animator)) { animator.SetFloat(playbackRateParam, 0f); } } bool flag = stopwatch >= duration * attackStartPercentTime; bool flag2 = stopwatch >= duration * attackEndPercentTime; if ((flag && !flag2) || (flag && flag2 && !hasFired)) { if (!hasFired) { if (empoweredSpin && NetworkServer.active) { ((EntityState)this).characterBody.ClearTimedBuffs(UnforgivenBuffs.stabMaxStacksBuff); } EnterAttack(); } FireAttack(); } if (((EntityState)this).isAuthority && stopwatch >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } protected override void OnHitEnemyAuthority() { //IL_0039: Unknown result type (might be due to invalid IL or missing references) base.OnHitEnemyAuthority(); if (!hasGrantedStacks) { hasGrantedStacks = true; NetworkIdentity component = ((EntityState)this).gameObject.GetComponent<NetworkIdentity>(); if (Object.op_Implicit((Object)(object)component)) { NetMessageExtensions.Send((INetMessage)(object)new SyncStacks(component.netId, activateNado), (NetworkDestination)2); } } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) if (stopwatch >= duration * earlyExitPercentTime) { return (InterruptPriority)0; } return (InterruptPriority)2; } public override void OnSerialize(NetworkWriter writer) { base.OnSerialize(writer); writer.Write(empoweredSpin); } public override void OnDeserialize(NetworkReader reader) { base.OnDeserialize(reader); empoweredSpin = reader.ReadBoolean(); } } public class EnterStab : BaseUnforgivenSkillState { private EntityState savedState; private bool hasChosenState; private EntityStateMachine dashStateMachine; private bool hasLoggedMissingDash; public bool HasBufferedSpin => hasChosenState; public override void OnEnter() { RefreshState(); base.OnEnter(); dashStateMachine = EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Dash"); if (!Object.op_Implicit((Object)(object)dashStateMachine)) { LogMissingDashStateMachine(); } else if (dashStateMachine.state is Dash) { BufferSpin(); } } public override void FixedUpdate() { base.FixedUpdate(); EntityStateMachine val = dashStateMachine; if (!Object.op_Implicit((Object)(object)val)) { LogMissingDashStateMachine(); } if (Object.op_Implicit((Object)(object)val) && val.state is Dash && !hasChosenState) { BufferSpin(); } if (((EntityState)this).isAuthority) { if (hasChosenState) { ((EntityState)this).outer.SetNextState(savedState); } else if (empowered) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Tornado()); } else { ((EntityState)this).outer.SetNextState((EntityState)(object)new StabForward()); } } } private void BufferSpin() { hasChosenState = true; DashSpin obj = new DashSpin { empoweredSpin = empowered }; ((BaseSkillState)obj).activatorSkillSlot = ((BaseSkillState)this).activatorSkillSlot; savedState = (EntityState)(object)obj; } private void LogMissingDashStateMachine() { if (!hasLoggedMissingDash) { hasLoggedMissingDash = true; Log.Error("EnterStab could not find the required Dash state machine; continuing without waiting for a dash."); } } 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 MainState : GenericCharacterMain { private Animator animator; public LocalUser localUser; public override void OnEnter() { ((GenericCharacterMain)this).OnEnter(); animator = ((BaseCharacterMain)this).modelAnimator; FindLocalUser(); } private void FindLocalUser() { if (localUser != null || !Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { return; } foreach (LocalUser readOnlyLocalUsers in LocalUserManager.readOnlyLocalUsersList) { if ((Object)(object)readOnlyLocalUsers.cachedBody == (Object)(object)((EntityState)this).characterBody) { localUser = readOnlyLocalUsers; break; } } } public override void FixedUpdate() { ((GenericCharacterMain)this).FixedUpdate(); if (!Object.op_Implicit((Object)(object)animator)) { return; } bool flag = false; if (!((EntityState)this).characterBody.outOfDanger || !((EntityState)this).characterBody.outOfCombat) { flag = true; } animator.SetBool("inCombat", flag); if (((BaseState)this).isGrounded) { animator.SetFloat("airBlend", 0f); } else { animator.SetFloat("airBlend", 1f); } if (!flag) { if (animator.GetBool("isUnsheathed")) { animator.SetBool("isUnsheathed", false); if (((EntityState)this).characterBody.isSprinting) { EntityState.PlayAnimationOnAnimator(animator, "Transition", "SprintToSafe"); } else if (!((EntityState)this).characterBody.GetNotMoving()) { EntityState.PlayAnimationOnAnimator(animator, "Transition", "RunToSafe"); } else { EntityState.PlayAnimationOnAnimator(animator, "Transition", "ToSafe"); } } animator.SetLayerWeight(animator.GetLayerIndex("Body, Combat"), 0f); } else if (animator.GetBool("isUnsheathed")) { animator.SetLayerWeight(animator.GetLayerIndex("Body, Combat"), 1f); } } public override void ProcessJump() { //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Expected O, but got Unknown //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: Expected O, but got Unknown //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_030d: Unknown result type (might be due to invalid IL or missing references) //IL_0312: Unknown result type (might be due to invalid IL or missing references) //IL_031d: Expected O, but got Unknown if (!Object.op_Implicit((Object)(object)((EntityState)this).characterBody) || !Object.op_Implicit((Object)(object)((EntityState)this).characterBody.inventory) || !((BaseCharacterMain)this).hasCharacterMotor || ((EntityState)this).healthComponent.isInFrozenState) { return; } bool flag = false; bool flag2 = false; if (((EntityState)this).characterBody.inventory.GetItemCountEffective(Items.JumpDamageStrike) > 0) { ((EntityState)this).characterBody.GetBuffCount(Buffs.JumpDamageStrikeCharge); } if (!base.jumpInputReceived || ((EntityState)this).characterMotor.jumpCount >= ((EntityState)this).characterBody.maxJumpCount) { return; } int itemCountEffective = ((EntityState)this).characterBody.inventory.GetItemCountEffective(Items.JumpBoost); float num = 1f; float num2 = 1f; if (((EntityState)this).characterMotor.jumpCount >= ((EntityState)this).characterBody.baseJumpCount) { flag = true; num = 1.5f; num2 = 1.5f; } else if (itemCountEffective > 0 && ((EntityState)this).characterBody.isSprinting) { float num3 = ((EntityState)this).characterBody.acceleration * ((EntityState)this).characterMotor.airControl; if (((EntityState)this).characterBody.moveSpeed > 0f && num3 > 0f) { flag2 = true; float num4 = Mathf.Sqrt(10f * (float)itemCountEffective / num3); float num5 = ((EntityState)this).characterBody.moveSpeed / num3; num = (num4 + num5) / num5; } } GenericCharacterMain.ApplyJumpVelocity(((EntityState)this).characterMotor, ((EntityState)this).characterBody, num, num2, false); if (((BaseCharacterMain)this).hasModelAnimator) { int layerIndex = ((BaseCharacterMain)this).modelAnimator.GetLayerIndex("Body"); if (layerIndex >= 0) { if (((EntityState)this).characterBody.isSprinting) { ((BaseCharacterMain)this).modelAnimator.CrossFadeInFixedTime("SprintJump", ((BaseCharacterMain)this).smoothingParameters.intoJumpTransitionTime, layerIndex); } else if (flag) { ((BaseCharacterMain)this).modelAnimator.CrossFadeInFixedTime("BonusJump", ((BaseCharacterMain)this).smoothingParameters.intoJumpTransitionTime, layerIndex); } else { ((BaseCharacterMain)this).modelAnimator.CrossFadeInFixedTime("Jump", ((BaseCharacterMain)this).smoothingParameters.intoJumpTransitionTime, layerIndex); } } } if (flag) { EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/FeatherEffect"), new EffectData { origin = ((EntityState)this).characterBody.footPosition }, true); } else if (((EntityState)this).characterMotor.jumpCount > 0) { EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/ImpactEffects/CharacterLandImpact"), new EffectData { origin = ((EntityState)this).characterBody.footPosition, scale = ((EntityState)this).characterBody.radius }, true); } if (flag2) { EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/BoostJumpEffect"), new EffectData { origin = ((EntityState)this).characterBody.footPosition, rotation = Util.QuaternionSafeLookRotation(((EntityState)this).characterMotor.velocity) }, true); } CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.jumpCount++; ((EntityState)this).characterBody.TriggerJumpEventGlobally(); } } public class SlashCombo : BaseMeleeAttack { protected GameObject swingEffectInstance; public override void OnEnter() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_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) RefreshState(); hitboxGroupName = "MeleeHitbox"; damageType = DamageTypeCombo.op_Implicit((DamageType)(empoweredSpecial ? 2 : 0)); damageSource = (DamageSource)1; damageCoefficient = UnforgivenConfig.swingDamageCoefficient.Value; procCoefficient = 1f; pushForce = 300f; bonusForce = Vector3.zero; baseDuration = 1.1f; attackStartPercentTime = 0.2f; attackEndPercentTime = 0.4f; earlyExitPercentTime = 0.5f; hitStopDuration = 0.05f; attackRecoil = 2f / ((BaseState)this).attackSpeedStat; hitHopVelocity = 7f; swingSoundString = "Play_merc_sword_swing"; hitSoundString = ""; playbackRateParam = "Slash.playbackRate"; swingEffectPrefab = (empoweredSpecial ? UnforgivenAssets.swordSwingEmpoweredEffect : UnforgivenAssets.swordSwingEffect); hitEffectPrefab = UnforgivenAssets.unforgivenHitEffect; impactSound = UnforgivenAssets.swordImpactSoundEvent.index; switch (swingIndex) { case 0: muzzleString = "SwingMuzzle1"; break; case 1: muzzleString = "SwingMuzzle2"; break; } base.OnEnter(); } protected override void OnHitEnemyAuthority() { base.OnHitEnemyAuthority(); } protected override void FireAttack() { //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) //IL_001a: 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_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0044: 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) if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay)).direction; direction.y = Mathf.Max(direction.y, direction.y * 0.5f); ((BaseState)this).FindModelChild("MeleePivot").rotation = Util.QuaternionSafeLookRotation(direction); } base.FireAttack(); } protected override void PlaySwingEffect() { if (Object.op_Implicit((Object)(object)swingEffectPrefab)) { Transform val = ((BaseState)this).FindModelChild(muzzleString); if (Object.op_Implicit((Object)(object)val)) { swingEffectInstance = Object.Instantiate<GameObject>(swingEffectPrefab, val); } } } protected override void PlayAttackAnimation() { RefreshState(); if (!unforgivenController.isUnsheathed) { unforgivenController.Unsheath(); ((EntityState)this).PlayCrossfade("Gesture, Override", "DrawSlash", playbackRateParam, duration * 1.3f, 0.05f); } else { ((EntityState)this).PlayCrossfade("Gesture, Override", "Slash" + (1 + swingIndex), playbackRateParam, duration * 1.3f, 0.05f); } } public override void OnExit() { base.OnExit(); if (Object.op_Implicit((Object)(object)swingEffectInstance)) { EntityState.Destroy((Object)(object)swingEffectInstance); } } } public class Special : BaseUnforgivenSkillState { public static float damageCoefficient = 2.5f; public static float finalDamageCoefficient = 8f; public static float procCoefficient = 1f; public bool crit; public bool isBuffered; private float maxRange = 12f; private float roundDuration = 0.3f; private float roundStopwatch; private int numRounds = 3; private int roundsCompleted = 0; private readonly HashSet<HealthComponent> slamHits = new HashSet<HealthComponent>(); private Collider[] slamColliders; protected GameObject swingEffectInstance; private GameObject swingEffectPrefab = UnforgivenAssets.swordSwingEffect; private GameObject swingEffectPrefab2 = UnforgivenAssets.swordSwingEmpoweredEffect; private GameObject slashEffectPrefab = UnforgivenAssets.specialSlashingEffect; private GameObject slashEffectPrefab2 = UnforgivenAssets.specialEmpoweredSlashingEffect; private AimRequest aimRequest; public override void OnEnter() { if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(UnforgivenBuffs.lastBreathBuff); } RefreshState(); base.OnEnter(); if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { aimRequest = ((EntityState)this).cameraTargetParams.RequestAimType((AimType)2); } ((EntityState)this).characterBody.isSprinting = true; if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility); } ((EntityState)this).characterBody.SetAimTimer(1.5f); roundsCompleted = 0; roundStopwatch = roundDuration; float num = (((BaseState)this).attackSpeedStat - 1f) * 0.5f; roundDuration /= num + 1f; crit = ((BaseState)this).RollCrit(); unforgivenController.Unsheath(); if (!unforgivenController.bufferedSpin || !isBuffered) { ((EntityState)this).PlayCrossfade("FullBody, Override", "Special", "Slash.playbackRate", (float)numRounds * roundDuration, (float)numRounds * roundDuration * 0.05f); } Transform modelTransform = ((EntityState)this).characterBody.modelLocator.modelTransform; if (Object.op_Implicit((Object)(object)modelTransform)) { Animator component = ((Component)modelTransform).GetComponent<Animator>(); TemporaryOverlayInstance val = TemporaryOverlayManager.AddOverlay(((EntityState)this).gameObject); val.duration = 1.2f; val.destroyComponentOnEnd = true; val.originalMaterial = UnforgivenAssets.specialMaterial; val.inspectorCharacterModel = ((Component)component).gameObject.GetComponent<CharacterModel>(); val.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); val.animateShaderAlpha = true; } } public override void OnExit() { if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility); ((EntityState)this).characterBody.RemoveBuff(UnforgivenBuffs.lastBreathBuff); ((EntityState)this).characterBody.AddTimedBuff(UnforgivenBuffs.lastBreathBuff, 6f); } ((EntityState)this).OnExit(); AimRequest obj = aimRequest; if (obj != null) { obj.Dispose(); } if (Object.op_Implicit((Object)(object)swingEffectInstance)) { EntityState.Destroy((Object)(object)swingEffectInstance); } isBuffered = false; } private void Fire() { //IL_00b2: 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_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: 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_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0120: 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_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_0141: 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) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_015b: 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_0165: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Expected O, but got Unknown //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02ba: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Expected O, but got Unknown //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_02e7: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_02c6: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_0363: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_03bf: Unknown result type (might be due to invalid IL or missing references) //IL_03c6: Unknown result type (might be due to invalid IL or missing references) //IL_03cb: Unknown result type (might be due to invalid IL or missing references) //IL_03f5: Unknown result type (might be due to invalid IL or missing references) //IL_03fc: Unknown result type (might be due to invalid IL or missing references) bool flag = roundsCompleted == numRounds - 1; float num = (flag ? finalDamageCoefficient : damageCoefficient); Util.PlaySound(flag ? GroundLight2.slash3Sound : GroundLight2.slash1Sound, ((EntityState)this).gameObject); bool flag2 = (Object)(object)((EntityState)this).skillLocator.special.skillDef == (Object)(object)UnforgivenSurvivor.firstBreath; if (((EntityState)this).isAuthority && flag2 && ((EntityState)this).skillLocator.secondary.stock != ((EntityState)this).skillLocator.secondary.maxStock) { ((EntityState)this).skillLocator.secondary.Reset(); } if (NetworkServer.active) { BlastAttack val = new BlastAttack { attacker = ((EntityState)this).gameObject, procChainMask = default(ProcChainMask), losType = (LoSType)1, damageColorIndex = (DamageColorIndex)0, damageType = DamageTypeCombo.op_Implicit((DamageType)(empoweredSpecial ? 2 : 32)), procCoefficient = 1f, bonusForce = Vector3.down * 3000f, baseForce = 300f, baseDamage = num * ((BaseState)this).damageStat, falloffModel = (FalloffModel)0, radius = maxRange, position = ((EntityState)this).transform.position, attackerFiltering = (AttackerFiltering)2, teamIndex = ((BaseState)this).GetTeam(), inflictor = ((EntityState)this).gameObject, crit = crit }; val.damageType.damageSource = (DamageSource)8; if (flag2) { DamageAPI.AddModdedDamageType(val, DamageTypes.ResetDashes); } val.Fire(); if (Object.op_Implicit((Object)(object)slashEffectPrefab) && Object.op_Implicit((Object)(object)slashEffectPrefab2)) { EffectManager.SpawnEffect(flag ? slashEffectPrefab2 : slashEffectPrefab, new EffectData { origin = ((EntityState)this).transform.position }, true); } } Transform val2 = ((roundsCompleted % 2 == 0) ? ((BaseState)this).FindModelChild("SwingMuzzle2") : ((BaseState)this).FindModelChild("SwingMuzzle1")); if (Object.op_Implicit((Object)(object)val2) && Object.op_Implicit((Object)(object)swingEffectPrefab2) && Object.op_Implicit((Object)(object)swingEffectPrefab)) { if (Object.op_Implicit((Object)(object)swingEffectInstance)) { EntityState.Destroy((Object)(object)swingEffectInstance); } swingEffectInstance = Object.Instantiate<GameObject>(flag ? swingEffectPrefab2 : swingEffectPrefab, val2); } Util.PlayAttackSpeedSound(flag ? GroundLight2.slash3Sound : GroundLight2.slash1Sound, ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); if (!NetworkServer.active) { return; } Vector3 val3 = Vector3.down; if (!flag) { val3 = Random.insideUnitSphere; } val3.y = Mathf.Max(0f, val3.y); val3 = ((Vector3)(ref val3)).normalized; slamHits.Clear(); int num2 = CollectSlamColliders(); for (int i = 0; i < num2; i++) { HurtBox component = ((Component)slamColliders[i]).GetComponent<HurtBox>(); if (!Object.op_Implicit((Object)(object)component)) { continue; } HealthComponent healthComponent = component.healthComponent; if (!Object.op_Implicit((Object)(object)healthComponent) || !slamHits.Add(healthComponent)) { continue; } TeamComponent component2 = ((Component)healthComponent).GetComponent<TeamComponent>(); if (component2.teamIndex != ((EntityState)this).teamComponent.teamIndex && Object.op_Implicit((Object)(object)healthComponent.body)) { if (Object.op_Implicit((Object)(object)healthComponent.body.characterMotor)) { healthComponent.body.characterMotor.velocity = val3 * 12f; } else if (Object.op_Implicit((Object)(object)healthComponent.body.rigidbody)) { healthComponent.body.rigidbody.velocity = val3 * 12f; } healthComponent.body.AddTimedBuff(UnforgivenBuffs.specialSlamTrackerBuff, 2f, 1); } } Array.Clear(slamColliders, 0, num2); slamHits.Clear(); } private int CollectSlamColliders() { //IL_0023: 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_0042: 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) if (slamColliders == null) { slamColliders = (Collider[])(object)new Collider[32]; } Vector3 position = ((EntityState)this).transform.position; int result; while ((result = Physics.OverlapSphereNonAlloc(position, maxRange, slamColliders, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask), (QueryTriggerInteraction)0)) == slamColliders.Length) { slamColliders = (Collider[])(object)new Collider[slamColliders.Length * 2]; } return result; } public override void FixedUpdate() { //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) base.FixedUpdate(); ((EntityState)this).characterBody.isSprinting = true; ((EntityState)this).characterMotor.velocity = Vector3.zero; roundStopwatch += Time.fixedDeltaTime; if (roundStopwatch >= roundDuration && roundsCompleted < numRounds) { Fire(); roundsCompleted++; roundStopwatch = 0f; } if (roundsCompleted >= numRounds && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnSerialize(NetworkWriter writer) { ((BaseSkillState)this).OnSerialize(writer); writer.Write(isBuffered); } public override void OnDeserialize(NetworkReader reader) { ((BaseSkillState)this).OnDeserialize(reader); isBuffered = reader.ReadBoolean(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)9; } } public class StabForward : BaseMeleeAttack { private bool hasGrantedStacks; protected GameObject swingEffectInstance; public override void OnEnter() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: 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) RefreshState(); hitboxGroupName = "SteelTempestHitbox"; damageType = DamageTypeCombo.op_Implicit((DamageType)(empoweredSpecial ? 2 : 0)); damageSource = (DamageSource)2; damageCoefficient = UnforgivenConfig.stabDamageCoefficient.Value; procCoefficient = 1f; pushForce = 300f; bonusForce = Vector3.zero; baseDuration = 1.1f; attackStartPercentTime = 0.2f; attackEndPercentTime = 0.4f; earlyExitPercentTime = 0.5f; hitStopDuration = 0.05f; attackRecoil = 2f / ((BaseState)this).attackSpeedStat; hitHopVelocity = 6f; swingSoundString = "sfx_unforgiven_stab"; hitSoundString = ""; playbackRateParam = "Slash.playbackRate"; swingEffectPrefab = UnforgivenAssets.stabSwingEffect; hitEffectPrefab = UnforgivenAssets.unforgivenHitEffect; impactSound = UnforgivenAssets.stabImpactSoundEvent.index; muzzleString = "StabMuzzle"; base.OnEnter(); } protected override void OnHitEnemyAuthority() { //IL_0039: Unknown result type (might be due to invalid IL or missing references) base.OnHitEnemyAuthority(); if (!hasGrantedStacks) { hasGrantedStacks = true; NetworkIdentity component = ((EntityState)this).gameObject.GetComponent<NetworkIdentity>(); if (Object.op_Implicit((Object)(object)component)) { NetMessageExtensions.Send((INetMessage)(object)new SyncStacks(component.netId, empowered), (NetworkDestination)2); } } } protected override void FireAttack() { //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) //IL_001a: 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_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0044: 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) if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 direction = ((Ray)(ref aimRay)).direction; direction.y = Mathf.Max(direction.y, direction.y * 0.5f); ((BaseState)this).FindModelChild("MeleePivot").rotation = Util.QuaternionSafeLookRotation(direction); } base.FireAttack(); } public override void Update() { ((EntityState)this).Update(); if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).GetComponent<UnforgivenTracker>().GetTrackingTarget()) && ((EntityState)this).inputBank.skill3.down) { if (!hasFired) { FireAttack(); } ((EntityState)this).outer.SetNextStateToMain(); } } protected override void PlaySwingEffect() { Util.PlaySound(swingSoundString, ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)swingEffectPrefab)) { Transform val = ((BaseState)this).FindModelChild(muzzleString); if (Object.op_Implicit((Object)(object)val)) { swingEffectInstance = Object.Instantiate<GameObject>(swingEffectPrefab, val); } } } protected override void PlayAttackAnimation() { if (!unforgivenController.isUnsheathed) { unforgivenController.Unsheath(); ((EntityState)this).PlayCrossfade("Gesture, Override", "DrawStab", playbackRateParam, duration * 1.3f, duration * 0.05f); } else { ((EntityState)this).PlayCrossfade("Gesture, Override", "Stab", playbackRateParam, duration * 1.3f, duration * 0.05f); } } public override void OnExit() { base.OnExit(); if (Object.op_Implicit((Object)(object)swingEffectInstance)) { EntityState.Destroy((Object)(object)swingEffectInstance); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) if (stopwatch >= duration * earlyExitPercentTime) { return (InterruptPriority)0; } return (InterruptPriority)2; } } public class Tornado : BaseUnforgivenSkillState { public static float damageCoefficient = UnforgivenConfig.tornadoDamageCoefficient.Value; public static float procCoefficient = 1f; public static float baseDuration = 0.65f; public static float throwForce = 80f; public GameObject nado = UnforgivenAssets.nadoPrefab; private float duration; public override void OnEnter() { RefreshState(); base.OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((EntityState)this).characterBody.SetAimTimer(2f); if (!unforgivenController.isUnsheathed) { unforgivenController.Unsheath(); ((EntityState)this).PlayCrossfade("Gesture, Override", "DrawSlash", "Slash.playbackRate", duration, duration * 0.05f); } else { ((EntityState)this).PlayCrossfade("Gesture, Override", "Slash2", "Slash.playbackRate", duration, duration * 0.05f); } if (NetworkServer.active) { ((EntityState)this).characterBody.ClearTimedBuffs(UnforgivenBuffs.stabMaxStacksBuff); } Fire(); } public override void OnExit() { ((EntityState)this).OnExit(); } private void Fire() { //IL_001e: 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_0027: 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) //IL_0048: 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) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //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) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) Util.PlaySound("sfx_unforgiven_throw_nado", ((EntityState)this).gameObject); DamageTypeCombo value = DamageTypeCombo.op_Implicit((DamageType)(empoweredSpecial ? 2 : 0)); value.damageSource = (DamageSource)2; if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); ProjectileManager instance = ProjectileManager.instance; FireProjectileInfo val = new FireProjectileInfo { projectilePrefab = nado, position = ((Ray)(ref aimRay)).origin, rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), owner = ((EntityState)this).gameObject, damage = damageCoefficient * ((BaseState)this).damageStat, force = 800f, crit = ((BaseState)this).RollCrit(), damageColorIndex = (DamageColorIndex)0, target = null }; ((FireProjectileInfo)(ref val)).speedOverride = throwForce; val.useSpeedOverride = false; val.damageTypeOverride = value; instance.FireProjectile(val); } } public override void FixedUpdate() { base.FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((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 UnforgivenMod.Unforgiven.Content { public static class DamageTypes { public static ModdedDamageType Default; public static ModdedDamageType KnockAirborne; public static ModdedDamageType ResetDashes; internal static void Init() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //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_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) Default = DamageAPI.ReserveDamageType(); KnockAirborne = DamageAPI.ReserveDamageType(); ResetDashes = DamageAPI.ReserveDamageType(); Hook(); } private static void Hook() { GlobalEventManager.onServerDamageDealt += GlobalEventManager_onServerDamageDealt; } private static void GlobalEventManager_onServerDamageDealt(DamageReport damageReport) { //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) DamageInfo damageInfo = damageReport.damageInfo; if (!Object.op_Implicit((Object)(object)damageReport.attackerBody) || !Object.op_Implicit((Object)(object)damageReport.victimBody)) { return; } HealthComponent victim = damageReport.victim; GameObject inflictor = damageInfo.inflictor; CharacterBody victimBody = damageReport.victimBody; EntityStateMachine component = ((Component)victimBody).GetComponent<EntityStateMachine>(); CharacterBody attackerBody = damageReport.attackerBody; GameObject gameObject = damageReport.attacker.gameObject; UnforgivenController component2 = ((Component)attackerBody).GetComponent<UnforgivenController>(); if (NetworkServer.active && Object.op_Implicit((Object)(object)component2) && attackerBody.bodyIndex == BodyCatalog.FindBodyIndex("UnforgivenBody")) { AirborneComponent airborneComponent = default(AirborneComponent); if (DamageAPI.HasModdedDamageType(damageInfo, KnockAirborne) && Object.op_Implicit((Object)(object)victimBody.characterMotor) && !((Component)victimBody).TryGetComponent<AirborneComponent>(ref airborneComponent)) { ((Component)victimBody).gameObject.AddComponent<AirborneComponent>(); } if (DamageAPI.HasModdedDamageType(damageInfo, ResetDashes) && victimBody.HasBuff(UnforgivenBuffs.dashCooldownBuff)) { victimBody.RemoveOldestTimedBuff(UnforgivenBuffs.dashCooldownBuff); } } } } public static class UnforgivenAI { public static void Init(GameObject bodyPrefab, string masterName) { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: 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) //IL_0137: 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_0193: 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_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_0330: Unknown result type (might be due to invalid IL or missing references) //IL_0350: Unknown result type (might be due to invalid IL or missing references) //IL_0364: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Unknown result type (might be due to invalid IL or missing references) GameObject val = Prefabs.CreateBlankMasterPrefab(bodyPrefab, masterName); BaseAI component = val.GetComponent<BaseAI>(); component.aimVectorDampTime = 0.1f; component.aimVectorMaxSpeed = 360f; AISkillDriver val2 = val.AddComponent<AISkillDriver>(); val2.customName = "Use Primary Swing"; val2.skillSlot = (SkillSlot)0; val2.requiredSkill = null; val2.requireSkillReady = false; val2.requireEquipmentReady = false; val2.minUserHealthFraction = float.NegativeInfinity; val2.maxUserHealthFraction = float.PositiveInfinity; val2.minTargetHealthFraction = float.NegativeInfinity; val2.maxTargetHealthFraction = float.PositiveInfinity; val2.minDistance = 0f; val2.maxDistance = 8f; val2.selectionRequiresTargetLoS = false; val2.selectionRequiresOnGround = false; val2.selectionRequiresAimTarget = false; val2.maxTimesSelected = -1; val2.moveTargetType = (TargetType)0; val2.activationRequiresTargetLoS = false; val2.activationRequiresAimTargetLoS = false; val2.activationRequiresAimConfirmation = false; val2.movementType = (MovementType)1; val2.moveInputScale = 1f; val2.aimType = (AimType)1; val2.ignoreNodeGraph = false; val2.shouldSprint = false; val2.shouldFireEquipment = false; val2.buttonPressType = (ButtonPressType)0; val2.driverUpdateTimerOverride = -1f; val2.resetCurrentEnemyOnNextDriverSelection = false; val2.noRepeat = false; val2.nextHig