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 BAMod v1.1.4
Plugin/BAMod.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.Collections.ObjectModel; 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 BAMod.Arisu; using BAMod.Arisu.Content; using BAMod.Arisu.SkillStates.BaseStates; using BAMod.Arisu.SkillStates.Primary; using BAMod.Arisu.SkillStates.Secondary; using BAMod.Arisu.SkillStates.Special; using BAMod.Arisu.SkillStates.SpecialLock; using BAMod.Arisu.SkillStates.Utility; using BAMod.GlobalContent.Components; using BAMod.GlobalContent.Interfaces; using BAMod.GlobalContent.Scripts; using BAMod.Mashiro; using BAMod.Mashiro.Components; using BAMod.Mashiro.Content; using BAMod.Mashiro.SkillStates.BaseStates; using BAMod.Mashiro.SkillStates.Primary; using BAMod.Mashiro.SkillStates.Secondary; using BAMod.Mashiro.SkillStates.Special; using BAMod.Mashiro.SkillStates.SpecialLock; using BAMod.Mashiro.SkillStates.Utility; using BAMod.Modules; using BAMod.Modules.Achievements; using BAMod.Modules.Characters; using BAMod.Momoi; using BAMod.Momoi.Content; using BAMod.Momoi.SkillStates.BaseStates; using BAMod.Momoi.SkillStates.Primary; using BAMod.Momoi.SkillStates.Secondary; using BAMod.Momoi.SkillStates.Special; using BAMod.Momoi.SkillStates.SpecialLock; using BAMod.Momoi.SkillStates.Utility; using BAMod.Saori; using BAMod.Saori.Content; using BAMod.Saori.SkillStates.BaseStates; using BAMod.Saori.SkillStates.Primary; using BAMod.Saori.SkillStates.Secondary; using BAMod.Saori.SkillStates.Special; using BAMod.Saori.SkillStates.SpecialLock; using BAMod.Saori.SkillStates.Utility; using BAMod.Tsurugi; using BAMod.Tsurugi.Components; using BAMod.Tsurugi.Content; using BAMod.Tsurugi.SkillStates.BaseStates; using BAMod.Tsurugi.SkillStates.Primary; using BAMod.Tsurugi.SkillStates.Secondary; using BAMod.Tsurugi.SkillStates.Special; using BAMod.Tsurugi.SkillStates.SpecialLock; using BAMod.Tsurugi.SkillStates.Utility; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using EntityStates; using EntityStates.AI.Walker; using EntityStates.Commando.CommandoWeapon; using HG; using HG.BlendableTypes; using KinematicCharacterController; using Microsoft.CodeAnalysis; using On.RoR2; using R2API; using R2API.Utils; using RoR2; using RoR2.Achievements; using RoR2.CharacterAI; using RoR2.ContentManagement; using RoR2.Projectile; using RoR2.Skills; using Unity.Collections; using Unity.Jobs; using UnityEngine; using UnityEngine.Networking; using UnityEngine.Rendering; [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("BAMod")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+18a8850b193f0c910aa70439cf1ea2ddb602614d")] [assembly: AssemblyProduct("BAMod")] [assembly: AssemblyTitle("BAMod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: RefSafetyRules(11)] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } internal class DisplayAboveModelTransform : MonoBehaviour { public Vector3 offset = new Vector3(0f, 2f, 0f); public HealthComponent victimHealthComponent; public BuffDef parentBuff; private Collider victimCollider; private Transform victimTransform; private void Start() { //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_0067: 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_0081: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)victimHealthComponent == (Object)null) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } victimTransform = ((Component)victimHealthComponent).transform; victimCollider = ((Component)victimHealthComponent).GetComponent<Collider>(); if ((Object)(object)victimCollider != (Object)null) { Bounds bounds = victimCollider.bounds; offset = new Vector3(0f, ((Bounds)(ref bounds)).extents.y + 0.5f, 0f); } } private void FixedUpdate() { //IL_008d: 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_0098: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)victimHealthComponent == (Object)null || !victimHealthComponent.alive) { Object.Destroy((Object)(object)((Component)this).gameObject); } else if ((Object)(object)parentBuff != (Object)null && !victimHealthComponent.body.HasBuff(parentBuff)) { Object.Destroy((Object)(object)((Component)this).gameObject); } else if ((Object)(object)victimTransform != (Object)null) { ((Component)this).transform.position = victimTransform.position + offset; } } } namespace BAMod { [NetworkCompatibility(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.ami.BAMod", "BASurvivors", "1.1.4")] public class BAPlugin : BaseUnityPlugin { public const string MODUID = "com.ami.BAMod"; public const string MODNAME = "BASurvivors"; public const string MODVERSION = "1.1.4"; public const string DEVELOPER_PREFIX = "AMI"; public static BAPlugin instance; private void Awake() { instance = this; Log.Init(((BaseUnityPlugin)this).Logger); Language.Init(); new ArisuSurvivor().Initialize(); new MashiroSurvivor().Initialize(); new TsurugiSurvivor().Initialize(); new SaoriSurvivor().Initialize(); new MomoiSurvivor().Initialize(); new ContentPacks().Initialize(); } } 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); } } } namespace BAMod.Tsurugi { public class TsurugiSurvivor : SurvivorBase<TsurugiSurvivor> { public const string V1_PREFIX = "AMI_TSURUGI_"; public static SkillDef BloodReload; public static SkillDef Blood; public static SkillDef Gunpowder; public static SkillDef GunpowderReload; public static SkillDef TsurugiUlt; public static SkillDef TsurugiStunRoll; public static SkillDef Lock; public override string assetBundleName => "tsurugiassetbundle"; public override string bodyName => "TsurugiBody"; public override string masterName => "TsurugiMonsterMaster"; public override string modelPrefabName => "mdlTsurugi"; public override string displayPrefabName => "TsurugiDisplay"; public override string survivorTokenPrefix => "AMI_TSURUGI_"; public override BodyInfo bodyInfo => new BodyInfo { bodyName = bodyName, bodyNameToken = "AMI_TSURUGI_NAME", subtitleNameToken = "AMI_TSURUGI_SUBTITLE", characterPortrait = LegacyResourcesAPI.Load<Texture>("RoR2/Base/Commando/texCommandoIcon"), bodyColor = Color.white, sortPosition = 100f, crosshair = Asset.LoadCrosshair("Standard"), podPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/NetworkedObjects/SurvivorPod"), maxHealth = 90f, healthRegen = 0.5f, armor = 0f, healthGrowth = 10f, moveSpeed = 10f, jumpCount = 2 }; public override UnlockableDef characterUnlockableDef => TsurugiUnlockables.characterUnlockableDef; public override ItemDisplaysBase itemDisplays => new TsurugiItemDisplays(); public override CustomRendererInfo[] customRendererInfos => new CustomRendererInfo[0]; 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() { TsurugiUnlockables.Init(); base.InitializeCharacter(); TsurugiConfig.Init(); TsurugiStates.Init(); TsurugiTokens.Init(); TsurugiAssets.Init(assetBundle); TsurugiBuffs.Init(); InitializeEntityStateMachines(); InitializeSkills(); AdditionalBodySetup(); AddHooks(); InitializeCharacterMaster(); } private void AdditionalBodySetup() { AddHitboxes(); bodyPrefab.AddComponent<BAMod.Tsurugi.Components.CrazyWomanPassiveDictator>(); bodyPrefab.AddComponent<ModelSkinController>(); displayPrefab.AddComponent<ModelSkinController>(); } public void AddHitboxes() { } public override void InitializeEntityStateMachines() { Prefabs.ClearEntityStateMachines(bodyPrefab); Prefabs.AddMainEntityStateMachine(bodyPrefab, "Body", typeof(TsurugiCharacterMain), typeof(SpawnTeleporterState)); Prefabs.AddEntityStateMachine(bodyPrefab, "RightShotgun"); Prefabs.AddEntityStateMachine(bodyPrefab, "LeftShotgun"); Prefabs.AddEntityStateMachine(bodyPrefab, "Movement"); Prefabs.AddEntityStateMachine(bodyPrefab, "Ult"); prefabCharacterBody.vehicleIdleStateMachine = (EntityStateMachine[])(object)new EntityStateMachine[4] { EntityStateMachine.FindByCustomName(bodyPrefab, "RightShotgun"), EntityStateMachine.FindByCustomName(bodyPrefab, "LeftShotgun"), EntityStateMachine.FindByCustomName(bodyPrefab, "Movement"), EntityStateMachine.FindByCustomName(bodyPrefab, "Ult") }; } public override void InitializeSkills() { Skills.ClearGenericSkills(bodyPrefab); AddPrimarySkills(); AddSecondarySkills(); AddUtiitySkills(); AddSpecialSkills(); AddLockSkill(); } private void AddPrimarySkills() { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: 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) //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_016b: Unknown result type (might be due to invalid IL or missing references) Skills.CreateGenericSkillWithSkillFamily(bodyPrefab, (SkillSlot)0); SkillDefInfo skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = "Blood"; skillDefInfo.skillNameToken = "AMI_TSURUGI_PRIMARY_GUN_NAME"; skillDefInfo.skillDescriptionToken = "AMI_TSURUGI_PRIMARY_GUN_DESCRIPTION"; skillDefInfo.keywordTokens = new string[1] { "KEYWORD_AGILE" }; skillDefInfo.skillIcon = assetBundle.LoadAsset<Sprite>("texUtilityIcon"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(Blood)); skillDefInfo.activationStateMachineName = "LeftShotgun"; skillDefInfo.interruptPriority = (InterruptPriority)1; skillDefInfo.baseRechargeInterval = float.MaxValue; skillDefInfo.rechargeStock = 0; skillDefInfo.requiredStock = 1; skillDefInfo.stockToConsume = 1; skillDefInfo.baseMaxStock = 5; skillDefInfo.resetCooldownTimerOnUse = false; skillDefInfo.fullRestockOnAssign = true; skillDefInfo.dontAllowPastMaxStocks = false; skillDefInfo.mustKeyPress = false; skillDefInfo.beginSkillCooldownOnSkillEnd = false; skillDefInfo.isCombatSkill = false; skillDefInfo.canceledFromSprinting = false; skillDefInfo.cancelSprintingOnActivation = false; skillDefInfo.forceSprintDuringState = false; Blood = Skills.CreateSkillDef(skillDefInfo); skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = "Blood_Reload"; skillDefInfo.skillNameToken = "AMI_TSURUGI_PRIMARY_RELOAD_NAME"; skillDefInfo.skillDescriptionToken = "AMI_TSURUGI_PRIMARY_RELOAD_DESCRIPTION"; skillDefInfo.keywordTokens = new string[1] { "KEYWORD_AGILE" }; skillDefInfo.skillIcon = assetBundle.LoadAsset<Sprite>("texUtilityIcon"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(BloodReload)); skillDefInfo.activationStateMachineName = "LeftShotgun"; skillDefInfo.interruptPriority = (InterruptPriority)1; skillDefInfo.baseRechargeInterval = float.MaxValue; skillDefInfo.rechargeStock = 0; skillDefInfo.requiredStock = 0; skillDefInfo.stockToConsume = 0; skillDefInfo.baseMaxStock = 0; skillDefInfo.resetCooldownTimerOnUse = false; skillDefInfo.fullRestockOnAssign = true; skillDefInfo.dontAllowPastMaxStocks = true; skillDefInfo.mustKeyPress = true; skillDefInfo.beginSkillCooldownOnSkillEnd = false; skillDefInfo.isCombatSkill = false; skillDefInfo.canceledFromSprinting = false; skillDefInfo.cancelSprintingOnActivation = false; skillDefInfo.forceSprintDuringState = false; BloodReload = Skills.CreateSkillDef(skillDefInfo); Skills.AddPrimarySkills(bodyPrefab, Blood); } private void AddSecondarySkills() { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: 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) //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_016b: Unknown result type (might be due to invalid IL or missing references) Skills.CreateGenericSkillWithSkillFamily(bodyPrefab, (SkillSlot)1); SkillDefInfo skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = "Gunpowder"; skillDefInfo.skillNameToken = "AMI_TSURUGI_SECONDARY_GUN_NAME"; skillDefInfo.skillDescriptionToken = "AMI_TSURUGI_SECONDARY_GUN_DESCRIPTION"; skillDefInfo.keywordTokens = new string[1] { "KEYWORD_AGILE" }; skillDefInfo.skillIcon = assetBundle.LoadAsset<Sprite>("texUtilityIcon"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(Gunpowder)); skillDefInfo.activationStateMachineName = "RightShotgun"; skillDefInfo.interruptPriority = (InterruptPriority)1; skillDefInfo.baseRechargeInterval = float.MaxValue; skillDefInfo.rechargeStock = 0; skillDefInfo.requiredStock = 1; skillDefInfo.stockToConsume = 1; skillDefInfo.baseMaxStock = 5; skillDefInfo.resetCooldownTimerOnUse = false; skillDefInfo.fullRestockOnAssign = true; skillDefInfo.dontAllowPastMaxStocks = false; skillDefInfo.mustKeyPress = false; skillDefInfo.beginSkillCooldownOnSkillEnd = false; skillDefInfo.isCombatSkill = false; skillDefInfo.canceledFromSprinting = false; skillDefInfo.cancelSprintingOnActivation = false; skillDefInfo.forceSprintDuringState = false; Gunpowder = Skills.CreateSkillDef(skillDefInfo); skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = "Gunpowder_Reload"; skillDefInfo.skillNameToken = "AMI_TSURUGI_SECONDARY_RELOAD_NAME"; skillDefInfo.skillDescriptionToken = "AMI_TSURUGI_SECONDARY_RELOAD_DESCRIPTION"; skillDefInfo.keywordTokens = new string[1] { "KEYWORD_AGILE" }; skillDefInfo.skillIcon = assetBundle.LoadAsset<Sprite>("texUtilityIcon"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(GunpowderReload)); skillDefInfo.activationStateMachineName = "LeftShotgun"; skillDefInfo.interruptPriority = (InterruptPriority)1; skillDefInfo.baseRechargeInterval = float.MaxValue; skillDefInfo.rechargeStock = 0; skillDefInfo.requiredStock = 0; skillDefInfo.stockToConsume = 0; skillDefInfo.baseMaxStock = 0; skillDefInfo.resetCooldownTimerOnUse = false; skillDefInfo.fullRestockOnAssign = true; skillDefInfo.dontAllowPastMaxStocks = true; skillDefInfo.mustKeyPress = true; skillDefInfo.beginSkillCooldownOnSkillEnd = false; skillDefInfo.isCombatSkill = false; skillDefInfo.canceledFromSprinting = false; skillDefInfo.cancelSprintingOnActivation = false; skillDefInfo.forceSprintDuringState = false; GunpowderReload = Skills.CreateSkillDef(skillDefInfo); Skills.AddSecondarySkills(bodyPrefab, Gunpowder); } private void AddUtiitySkills() { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: 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) Skills.CreateGenericSkillWithSkillFamily(bodyPrefab, (SkillSlot)2); SkillDefInfo skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = "StunRoll"; skillDefInfo.skillNameToken = "AMI_TSURUGI_UTILITY_STUN_NAME"; skillDefInfo.skillDescriptionToken = "AMI_TSURUGI_UTILITY_STUN_DESCRIPTION"; skillDefInfo.keywordTokens = new string[1] { "KEYWORD_AGILE" }; skillDefInfo.skillIcon = assetBundle.LoadAsset<Sprite>("texUtilityIcon"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(BAMod.Tsurugi.SkillStates.Utility.StunRoll)); skillDefInfo.activationStateMachineName = "Movement"; skillDefInfo.interruptPriority = (InterruptPriority)1; skillDefInfo.baseRechargeInterval = 3f; skillDefInfo.rechargeStock = 1; skillDefInfo.requiredStock = 1; skillDefInfo.stockToConsume = 1; skillDefInfo.baseMaxStock = 1; skillDefInfo.resetCooldownTimerOnUse = false; skillDefInfo.fullRestockOnAssign = true; skillDefInfo.dontAllowPastMaxStocks = false; skillDefInfo.mustKeyPress = true; skillDefInfo.beginSkillCooldownOnSkillEnd = false; skillDefInfo.isCombatSkill = false; skillDefInfo.canceledFromSprinting = false; skillDefInfo.cancelSprintingOnActivation = false; skillDefInfo.forceSprintDuringState = false; TsurugiStunRoll = Skills.CreateSkillDef(skillDefInfo); Skills.AddUtilitySkills(bodyPrefab, TsurugiStunRoll); } private void AddSpecialSkills() { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: 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) Skills.CreateGenericSkillWithSkillFamily(bodyPrefab, (SkillSlot)3); SkillDefInfo skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = "Ultimate"; skillDefInfo.skillNameToken = "AMI_TSURUGI_SPECIAL_ULTIMATE_NAME"; skillDefInfo.skillDescriptionToken = "AMI_TSURUGI_SPECIAL_ULTIMATE_DESCRIPTION"; skillDefInfo.keywordTokens = new string[1] { "KEYWORD_AGILE" }; skillDefInfo.skillIcon = assetBundle.LoadAsset<Sprite>("texUtilityIcon"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(TsurugiUlt)); skillDefInfo.activationStateMachineName = "Ult"; skillDefInfo.interruptPriority = (InterruptPriority)1; skillDefInfo.baseRechargeInterval = 120f; skillDefInfo.rechargeStock = 1; skillDefInfo.requiredStock = 1; skillDefInfo.stockToConsume = 1; skillDefInfo.baseMaxStock = 1; skillDefInfo.resetCooldownTimerOnUse = false; skillDefInfo.fullRestockOnAssign = true; skillDefInfo.dontAllowPastMaxStocks = true; skillDefInfo.mustKeyPress = true; skillDefInfo.beginSkillCooldownOnSkillEnd = true; skillDefInfo.isCombatSkill = false; skillDefInfo.canceledFromSprinting = false; skillDefInfo.cancelSprintingOnActivation = false; skillDefInfo.forceSprintDuringState = false; TsurugiUlt = Skills.CreateSkillDef(skillDefInfo); Skills.AddSpecialSkills(bodyPrefab, TsurugiUlt); } private void AddLockSkill() { //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) SkillDefInfo skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = "Ultimate"; skillDefInfo.skillNameToken = "AMI_TSURUGI_SPECIAL_ULTIMATE_NAME"; skillDefInfo.skillDescriptionToken = "AMI_TSURUGI_SPECIAL_ULTIMATE_DESCRIPTION"; skillDefInfo.keywordTokens = new string[1] { "KEYWORD_AGILE" }; skillDefInfo.skillIcon = assetBundle.LoadAsset<Sprite>("texUtilityIcon"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(BAMod.Tsurugi.SkillStates.SpecialLock.SpecialLockDown)); skillDefInfo.activationStateMachineName = "Ult"; skillDefInfo.interruptPriority = (InterruptPriority)1; skillDefInfo.baseRechargeInterval = float.MaxValue; skillDefInfo.rechargeStock = 0; skillDefInfo.requiredStock = 1; skillDefInfo.stockToConsume = 1; skillDefInfo.baseMaxStock = 0; skillDefInfo.resetCooldownTimerOnUse = false; skillDefInfo.fullRestockOnAssign = true; skillDefInfo.dontAllowPastMaxStocks = true; skillDefInfo.mustKeyPress = true; skillDefInfo.beginSkillCooldownOnSkillEnd = true; skillDefInfo.isCombatSkill = false; skillDefInfo.canceledFromSprinting = false; skillDefInfo.cancelSprintingOnActivation = false; skillDefInfo.forceSprintDuringState = false; Lock = Skills.CreateSkillDef(skillDefInfo); } public override void InitializeSkins() { ModelSkinController val = ((Component)prefabCharacterModel).gameObject.AddComponent<ModelSkinController>(); RendererInfo[] baseRendererInfos = prefabCharacterModel.baseRendererInfos; List<SkinDef> list = new List<SkinDef>(); SkinDef item = Skins.CreateSkinDef("DEFAULT_SKIN", assetBundle.LoadAsset<Sprite>("texMainSkin"), baseRendererInfos, ((Component)prefabCharacterModel).gameObject); list.Add(item); val.skins = list.ToArray(); } public override void InitializeCharacterMaster() { TsurugiAI.Init(bodyPrefab, masterName); } private void AddHooks() { TsurugiHooks.Init(); } } } namespace BAMod.Tsurugi.SkillStates.Utility { internal class StunRoll : BaseTsurugiSkillState { private float tick; protected override float baseFireDelay => 0f; protected override float baseDuration => 0.3f; protected override float fireTime => 0f; public override void OnEnter() { base.OnEnter(); CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.fakeActorCounter += 1; ((EntityState)this).characterBody.AddBuff(LegacyResourcesAPI.Load<BuffDef>("RoR2/Base/Common/bdHiddenInvincibility")); } public override void FixedUpdate() { //IL_0032: 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_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: 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_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Expected O, but got Unknown //IL_008a: 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_0096: 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_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: 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_010b: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (!((EntityState)this).isAuthority) { return; } if (((EntityState)this).fixedAge < baseDuration) { ((EntityState)this).characterMotor.velocity = Vector3.zero; CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.rootMotion += GetMoveVector(); tick += 1f; if (!(tick >= 10f)) { return; } BullseyeSearch val = new BullseyeSearch(); val.sortMode = (SortMode)3; Ray aimRay = ((BaseState)this).GetAimRay(); val.searchDirection = ((Ray)(ref aimRay)).direction; val.searchOrigin = ((EntityState)this).gameObject.transform.position; val.maxAngleFilter = 360f; val.maxDistanceFilter = 5f; val.RefreshCandidates(); { SetStateOnHurt val2 = default(SetStateOnHurt); foreach (CandidateInfo item in val.candidatesEnumerable) { if (item.hurtBox.teamIndex != ((EntityState)this).teamComponent.teamIndex && ((Component)item.hurtBox.healthComponent).TryGetComponent<SetStateOnHurt>(ref val2)) { val2.CallRpcSetStun(5f); } } return; } } ((EntityState)this).outer.SetNextStateToMain(); } public override void OnExit() { CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.fakeActorCounter -= 1; ((EntityState)this).characterBody.RemoveBuff(LegacyResourcesAPI.Load<BuffDef>("RoR2/Base/Common/bdHiddenInvincibility")); ((EntityState)this).OnExit(); } private Vector3 GetMoveVector() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0030: 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_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) Vector3 val = ((((EntityState)this).inputBank.moveVector == Vector3.zero) ? ((EntityState)this).characterDirection.forward : ((EntityState)this).inputBank.moveVector); Vector3 normalized = ((Vector3)(ref val)).normalized; return normalized * (5f * ((BaseState)this).moveSpeedStat * ((EntityState)this).GetDeltaTime()); } } } namespace BAMod.Tsurugi.SkillStates.Special { internal class TsurugiUlt : BaseTsurugiSkillState { protected override float baseDuration => 3f; protected override float baseFireDelay => 2f; protected override float fireTime => 0f; public override void OnEnter() { base.OnEnter(); TsurugiMain.primaryStock = ((EntityState)this).skillLocator.primary.stock; TsurugiMain.secondaryStock = ((EntityState)this).skillLocator.secondary.stock; ((EntityState)this).skillLocator.primary.SetSkillOverride((object)((EntityState)this).gameObject, TsurugiSurvivor.Lock, (SkillOverridePriority)0); ((EntityState)this).skillLocator.secondary.SetSkillOverride((object)((EntityState)this).gameObject, TsurugiSurvivor.Lock, (SkillOverridePriority)0); ((EntityState)this).skillLocator.utility.SetSkillOverride((object)((EntityState)this).gameObject, TsurugiSurvivor.Lock, (SkillOverridePriority)0); ((Behaviour)((EntityState)this).characterMotor).enabled = false; ((EntityState)this).characterBody.AddBuff(TsurugiBuffs.TsurugiUltShield); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority) { CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.fakeActorCounter += 1; if (((EntityState)this).fixedAge > base.duration) { TsurugiMain.primaryMysterious = true; TsurugiMain.secondaryMysterious = true; ((EntityState)this).outer.SetNextStateToMain(); } } } public override void OnExit() { //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) ((EntityState)this).OnExit(); ((EntityState)this).skillLocator.primary.UnsetSkillOverride((object)((EntityState)this).gameObject, TsurugiSurvivor.Lock, (SkillOverridePriority)0); ((EntityState)this).skillLocator.secondary.UnsetSkillOverride((object)((EntityState)this).gameObject, TsurugiSurvivor.Lock, (SkillOverridePriority)0); ((EntityState)this).skillLocator.utility.UnsetSkillOverride((object)((EntityState)this).gameObject, TsurugiSurvivor.Lock, (SkillOverridePriority)0); ((Behaviour)((EntityState)this).characterMotor).enabled = true; ((EntityState)this).characterMotor.velocity = Vector3.zero; ((EntityState)this).characterBody.RemoveBuff(TsurugiBuffs.TsurugiUltShield); } } } namespace BAMod.Tsurugi.SkillStates.SpecialLock { internal class SpecialLockDown : BaseSkillState { public override void FixedUpdate() { ((EntityState)this).outer.SetNextStateToMain(); } } } namespace BAMod.Tsurugi.SkillStates.Secondary { internal class Gunpowder : BaseTsurugiSkillState { private bool fired = false; public GameObject hitEffectPrefab = FireBarrage.hitEffectPrefab; public GameObject tracerEffectPrefab = FireBarrage.tracerEffectPrefab; public DamageTypeCombo damageType = DamageTypeCombo.op_Implicit((DamageType)0); protected override float baseDuration => 4f; protected override float baseFireDelay => 0.5f; protected override float fireTime => 1f; public override void OnEnter() { base.OnEnter(); } public override void FixedUpdate() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Expected O, but got Unknown //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: 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_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: 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_0240: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02be: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Expected O, but got Unknown //IL_02cd: 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_0088: 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_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: 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_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: 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_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_013c: 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_0154: 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_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Expected O, but got Unknown //IL_0199: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (!((EntityState)this).isAuthority) { return; } if (((EntityState)this).fixedAge > base.fireDelay && ((BaseSkillState)this).IsKeyDownAuthority() && !fired) { Ray aimRay = ((BaseState)this).GetAimRay(); if (!TsurugiMain.secondaryMysterious) { List<Vector3> list = ScatterVectors(((Ray)(ref aimRay)).direction, 30, 20f, 0.2f); foreach (Vector3 item in list) { BulletAttack val = new BulletAttack { owner = ((EntityState)this).gameObject, weapon = ((EntityState)this).gameObject, origin = ((Ray)(ref aimRay)).origin, aimVector = item + ((Ray)(ref aimRay)).direction * 2f, minSpread = 0f, maxSpread = ((EntityState)this).characterBody.spreadBloomAngle, bulletCount = 1u, procCoefficient = 1f, damage = ((EntityState)this).characterBody.damage * 0.1f, force = 3f, falloffModel = (FalloffModel)1, tracerEffectPrefab = tracerEffectPrefab, hitEffectPrefab = hitEffectPrefab, isCrit = ((BaseState)this).RollCrit(), HitEffectNormal = false, stopperMask = ((LayerIndex)(ref LayerIndex.world)).collisionMask, smartCollision = true, maxDistance = 300f, damageType = damageType, radius = 4f }; DamageAPI.AddModdedDamageType(val, TsurugiCustomDamageTypes.GunpowderHeal); val.Fire(); } } else { BullseyeSearch val2 = new BullseyeSearch(); val2.sortMode = (SortMode)3; val2.searchDirection = ((Ray)(ref aimRay)).direction; val2.searchOrigin = ((Ray)(ref aimRay)).origin; val2.maxAngleFilter = 60f; val2.maxDistanceFilter = 100f; val2.viewer = ((EntityState)this).characterBody; val2.RefreshCandidates(); foreach (CandidateInfo item2 in val2.candidatesEnumerable) { BlastAttack val3 = new BlastAttack { attacker = ((EntityState)this).gameObject, radius = 5f, canRejectForce = true, baseForce = 0f, crit = ((BaseState)this).RollCrit(), teamIndex = ((EntityState)this).characterBody.teamComponent.teamIndex, falloffModel = (FalloffModel)0, position = item2.position, baseDamage = 10f * ((BaseState)this).damageStat, procCoefficient = 5f }; DamageAPI.AddModdedDamageType(val3, TsurugiCustomDamageTypes.GunpowderHeal); val3.Fire(); } } ((BaseState)this).AddRecoil(20f, 20f, 0f, 0f); fired = true; } if (fired && ((EntityState)this).fixedAge > base.duration) { ((EntityState)this).outer.SetNextStateToMain(); } else if (!fired && !((BaseSkillState)this).IsKeyDownAuthority() && ((EntityState)this).fixedAge < base.fireDelay) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); if (!fired) { ((BaseSkillState)this).activatorSkillSlot.AddOneStock(); } else if (base.stock <= 0) { TsurugiMain.confirmedSecondaryKills = 0; TsurugiMain.secondaryMysterious = false; ((EntityState)this).skillLocator.secondary.SetSkillOverride((object)((EntityState)this).gameObject, TsurugiSurvivor.GunpowderReload, (SkillOverridePriority)0); } } public static List<Vector3> ScatterVectors(Vector3 forward, int pelletCount, float maxAngle, float randomness = 0.5f) { //IL_000f: 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_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: 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_006c: 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_0076: 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_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: 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_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) List<Vector3> list = new List<Vector3>(); ((Vector3)(ref forward)).Normalize(); Quaternion val = Quaternion.LookRotation(forward); for (int i = 0; i < pelletCount; i++) { float num = ((float)i + Random.value * randomness) / (float)pelletCount; float num2 = maxAngle * Mathf.Sqrt(num); float num3 = (float)i * 137.5f % 360f; num3 += Random.Range(-180f, 180f) * randomness; Quaternion val2 = Quaternion.AngleAxis(num3, Vector3.forward); Quaternion val3 = Quaternion.AngleAxis(num2, Vector3.right); Vector3 val4 = val * (val2 * val3 * Vector3.forward); val4 = Vector3.Slerp(forward, val4, 0.9f); list.Add(((Vector3)(ref val4)).normalized); } return list; } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } } internal class GunpowderReload : BaseTsurugiSkillState { protected override float baseDuration => 1f; protected override float baseFireDelay => 1f; protected override float fireTime => 1f; public override void OnEnter() { base.OnEnter(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= base.duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); ((EntityState)this).skillLocator.secondary.UnsetSkillOverride((object)((EntityState)this).gameObject, TsurugiSurvivor.GunpowderReload, (SkillOverridePriority)0); } } } namespace BAMod.Tsurugi.SkillStates.Primary { internal class Blood : BaseTsurugiSkillState { private bool fired = false; public GameObject hitEffectPrefab = FireBarrage.hitEffectPrefab; public GameObject tracerEffectPrefab = FireBarrage.tracerEffectPrefab; public DamageTypeCombo damageType = DamageTypeCombo.op_Implicit((DamageType)0); protected override float baseDuration => 3f; protected override float baseFireDelay => 0.5f; protected override float fireTime => 1f; public override void OnEnter() { base.OnEnter(); } public override void FixedUpdate() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: 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_01d3: Expected O, but got Unknown //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: 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_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_0243: 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_0254: Unknown result type (might be due to invalid IL or missing references) //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_0293: 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_029a: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_029d: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_02c6: Expected O, but got Unknown //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02d5: Unknown result type (might be due to invalid IL or missing references) //IL_0088: 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_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: 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_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: 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_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_013c: 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_0154: 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_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Expected O, but got Unknown //IL_0194: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (!((EntityState)this).isAuthority) { return; } if (((EntityState)this).fixedAge > base.fireDelay && ((BaseSkillState)this).IsKeyDownAuthority() && !fired) { Ray aimRay = ((BaseState)this).GetAimRay(); if (!TsurugiMain.primaryMysterious) { List<Vector3> list = ScatterVectors(((Ray)(ref aimRay)).direction, 30, 20f, 0.2f); foreach (Vector3 item in list) { BulletAttack val = new BulletAttack { owner = ((EntityState)this).gameObject, weapon = ((EntityState)this).gameObject, origin = ((Ray)(ref aimRay)).origin, aimVector = item + ((Ray)(ref aimRay)).direction * 2f, minSpread = 0f, maxSpread = ((EntityState)this).characterBody.spreadBloomAngle, bulletCount = 1u, procCoefficient = 1f, damage = ((EntityState)this).characterBody.damage * 0.1f, force = 3f, falloffModel = (FalloffModel)1, tracerEffectPrefab = tracerEffectPrefab, hitEffectPrefab = hitEffectPrefab, isCrit = ((BaseState)this).RollCrit(), HitEffectNormal = false, stopperMask = BulletAttack.defaultHitMask, smartCollision = true, maxDistance = 300f, damageType = damageType, radius = 4f }; DamageAPI.AddModdedDamageType(val, TsurugiCustomDamageTypes.BloodBleed); val.Fire(); } } else { BullseyeSearch val2 = new BullseyeSearch(); val2.sortMode = (SortMode)3; val2.searchDirection = ((Ray)(ref aimRay)).direction; val2.searchOrigin = ((Ray)(ref aimRay)).origin; val2.maxAngleFilter = 60f; val2.maxDistanceFilter = 100f; val2.viewer = ((EntityState)this).characterBody; val2.RefreshCandidates(); foreach (CandidateInfo item2 in val2.candidatesEnumerable) { BlastAttack val3 = new BlastAttack { attacker = ((EntityState)this).gameObject, radius = 5f, canRejectForce = true, baseForce = 0f, crit = ((BaseState)this).RollCrit(), teamIndex = ((EntityState)this).characterBody.teamComponent.teamIndex, falloffModel = (FalloffModel)0, position = item2.position, baseDamage = 10f * ((BaseState)this).damageStat, procCoefficient = 5f }; DamageAPI.AddModdedDamageType(val3, TsurugiCustomDamageTypes.BloodBleed); val3.Fire(); } } ((BaseState)this).AddRecoil(20f, 20f, 0f, 0f); fired = true; } if (fired && ((EntityState)this).fixedAge > base.duration) { ((EntityState)this).outer.SetNextStateToMain(); } else if (!fired && !((BaseSkillState)this).IsKeyDownAuthority() && ((EntityState)this).fixedAge < base.fireDelay) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); if (!fired) { ((EntityState)this).skillLocator.primary.AddOneStock(); } else if (base.stock <= 0) { TsurugiMain.confirmedPrimaryKills = 0; TsurugiMain.primaryMysterious = false; ((EntityState)this).skillLocator.primary.SetSkillOverride((object)((EntityState)this).gameObject, TsurugiSurvivor.BloodReload, (SkillOverridePriority)0); } } public static List<Vector3> ScatterVectors(Vector3 forward, int pelletCount, float maxAngle, float randomness = 0.5f) { //IL_000f: 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_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: 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_006c: 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_0076: 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_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: 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_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) List<Vector3> list = new List<Vector3>(); ((Vector3)(ref forward)).Normalize(); Quaternion val = Quaternion.LookRotation(forward); for (int i = 0; i < pelletCount; i++) { float num = ((float)i + Random.value * randomness) / (float)pelletCount; float num2 = maxAngle * Mathf.Sqrt(num); float num3 = (float)i * 137.5f % 360f; num3 += Random.Range(-180f, 180f) * randomness; Quaternion val2 = Quaternion.AngleAxis(num3, Vector3.forward); Quaternion val3 = Quaternion.AngleAxis(num2, Vector3.right); Vector3 val4 = val * (val2 * val3 * Vector3.forward); val4 = Vector3.Slerp(forward, val4, 0.9f); list.Add(((Vector3)(ref val4)).normalized); } return list; } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } } internal class BloodReload : BaseTsurugiSkillState { protected override float baseDuration => 2f; protected override float baseFireDelay => 1f; protected override float fireTime => 1f; public override void OnEnter() { base.OnEnter(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= base.duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); ((EntityState)this).skillLocator.primary.UnsetSkillOverride((object)((EntityState)this).gameObject, TsurugiSurvivor.BloodReload, (SkillOverridePriority)0); } } } namespace BAMod.Tsurugi.SkillStates.BaseStates { public abstract class BaseTsurugiSkillState : BaseSkillState { public TsurugiCharacterMain TsurugiMain; protected abstract float baseFireDelay { get; } public float fireDelay => baseFireDelay * ((BaseState)this).attackSpeedStat; protected abstract float baseDuration { get; } public float duration => baseDuration * ((BaseState)this).attackSpeedStat; public float invduration => baseDuration / ((BaseState)this).attackSpeedStat; public int stock { get { return ((BaseSkillState)this).activatorSkillSlot.stock; } set { ((BaseSkillState)this).activatorSkillSlot.stock = value; } } public bool FullyChanneled { get { if (((EntityState)this).fixedAge > duration && (((BaseSkillState)this).IsKeyDownAuthority() || ((BaseSkillState)this).IsKeyJustReleasedAuthority())) { return true; } return false; } } protected abstract float fireTime { get; } public bool Channeling { get { if (FullyChanneled) { return false; } if (((BaseSkillState)this).IsKeyDownAuthority()) { return true; } return false; } } public bool Charged { get { if (((BaseSkillState)this).IsKeyJustReleasedAuthority() && ((EntityState)this).fixedAge > fireDelay) { return true; } if (FullyChanneled) { return true; } return false; } } public override void OnEnter() { ((BaseState)this).OnEnter(); TsurugiMain = (TsurugiCharacterMain)(object)EntityStateMachine.FindByCustomName(((EntityState)this).gameObject, "Body").state; } } public class BaseTsurugiState : BaseSkillState { } public class TsurugiCharacterMain : GenericCharacterMain { public int confirmedPrimaryKills; public int confirmedSecondaryKills; public int primaryStock; public int secondaryStock; public bool primaryCritRack; public bool secondaryCritRack; public bool primaryMysterious; public bool secondaryMysterious; public bool resetStocks; public float HealBy; private ItemDef Magazine; public override void OnEnter() { ((GenericCharacterMain)this).OnEnter(); Magazine = LegacyResourcesAPI.Load<ItemDef>("RoR2/Base/SecondarySkillMagazine/SecondarySkillMagazine"); } public override void FixedUpdate() { //IL_00d4: 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) ((GenericCharacterMain)this).FixedUpdate(); if (((EntityState)this).isAuthority) { if (resetStocks) { ((EntityState)this).skillLocator.utility.stock = ((EntityState)this).skillLocator.utility.maxStock; ((EntityState)this).skillLocator.special.stock = ((EntityState)this).skillLocator.special.maxStock; resetStocks = false; } int num = ((EntityState)this).characterBody.inventory.GetItemCountEffective(Magazine) + 5; if (((EntityState)this).skillLocator.primary.maxStock != num) { ((EntityState)this).skillLocator.primary.OverrideMaxStock(num); } if (HealBy > 0f) { ((EntityState)this).healthComponent.Heal(HealBy, default(ProcChainMask), true); HealBy = 0f; } } } public override void OnExit() { ((GenericCharacterMain)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)8; } } } namespace BAMod.Tsurugi.Content { public static class TsurugiAI { 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.nextHighPriorityOverride = null; AISkillDriver val3 = val.AddComponent<AISkillDriver>(); val3.customName = "Use Secondary Shoot"; val3.skillSlot = (SkillSlot)1; val3.requireSkillReady = true; val3.minDistance = 0f; val3.maxDistance = 25f; val3.selectionRequiresTargetLoS = false; val3.selectionRequiresOnGround = false; val3.selectionRequiresAimTarget = false; val3.maxTimesSelected = -1; val3.moveTargetType = (TargetType)0; val3.activationRequiresTargetLoS = false; val3.activationRequiresAimTargetLoS = false; val3.activationRequiresAimConfirmation = true; val3.movementType = (MovementType)1; val3.moveInputScale = 1f; val3.aimType = (AimType)1; val3.buttonPressType = (ButtonPressType)0; AISkillDriver val4 = val.AddComponent<AISkillDriver>(); val4.customName = "Use Utility Roll"; val4.skillSlot = (SkillSlot)2; val4.requireSkillReady = true; val4.minDistance = 8f; val4.maxDistance = 20f; val4.selectionRequiresTargetLoS = true; val4.selectionRequiresOnGround = false; val4.selectionRequiresAimTarget = false; val4.maxTimesSelected = -1; val4.moveTargetType = (TargetType)0; val4.activationRequiresTargetLoS = false; val4.activationRequiresAimTargetLoS = false; val4.activationRequiresAimConfirmation = false; val4.movementType = (MovementType)2; val4.moveInputScale = 1f; val4.aimType = (AimType)1; val4.buttonPressType = (ButtonPressType)0; AISkillDriver val5 = val.AddComponent<AISkillDriver>(); val5.customName = "Use Special bomb"; val5.skillSlot = (SkillSlot)3; val5.requireSkillReady = true; val5.minDistance = 0f; val5.maxDistance = 20f; val5.selectionRequiresTargetLoS = false; val5.selectionRequiresOnGround = false; val5.selectionRequiresAimTarget = false; val5.maxTimesSelected = -1; val5.moveTargetType = (TargetType)0; val5.activationRequiresTargetLoS = false; val5.activationRequiresAimTargetLoS = false; val5.activationRequiresAimConfirmation = false; val5.movementType = (MovementType)1; val5.moveInputScale = 1f; val5.aimType = (AimType)1; val5.buttonPressType = (ButtonPressType)0; AISkillDriver val6 = val.AddComponent<AISkillDriver>(); val6.customName = "Chase"; val6.skillSlot = (SkillSlot)(-1); val6.requireSkillReady = false; val6.minDistance = 0f; val6.maxDistance = float.PositiveInfinity; val6.moveTargetType = (TargetType)0; val6.activationRequiresTargetLoS = false; val6.activationRequiresAimTargetLoS = false; val6.activationRequiresAimConfirmation = false; val6.movementType = (MovementType)1; val6.moveInputScale = 1f; val6.aimType = (AimType)1; val6.buttonPressType = (ButtonPressType)0; } } public static class TsurugiAssets { public static GameObject swordSwingEffect; public static GameObject swordHitImpactEffect; public static GameObject bombExplosionEffect; public static NetworkSoundEventDef swordHitSoundEvent; public static GameObject bombProjectilePrefab; public static Sprite SchoolgirlSoulConsume; private static AssetBundle _assetBundle; public static Sprite Malice; public static void Init(AssetBundle assetBundle) { _assetBundle = assetBundle; CreateEffects(); CreateProjectiles(); GrabBuffIcons(); } private static void CreateEffects() { } private static void GrabBuffIcons() { Malice = _assetBundle.LoadAsset<Sprite>("Textures/Malice"); } private static void CreateProjectiles() { } } public static class TsurugiBuffs { public static BuffDef TsurugiUltShield; public static BuffDef MaliceDef; public static DotIndex Malice; public static void Init() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: 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_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Expected O, but got Unknown //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) MaliceDef = BAMod.Modules.Content.CreateAndAddBuff("Malice", TsurugiAssets.Malice, Color.white, canStack: true, isDebuff: true); TsurugiUltShield = BAMod.Modules.Content.CreateAndAddBuff("Ult Shield", LegacyResourcesAPI.Load<BuffDef>("BuffDefs/HiddenInvincibility").iconSprite, Color.white, canStack: false, isDebuff: false); Malice = DotAPI.RegisterDotDef(new DotDef { associatedBuff = MaliceDef, damageCoefficient = 0f, interval = 0.5f, resetTimerOnAdd = true, terminalTimedBuffDuration = 2f, damageColorIndex = (DamageColorIndex)2 }, (CustomDotBehaviour)null, (CustomDotVisual)null); } } public static class TsurugiConfig { public static ConfigEntry<bool> someConfigBool; public static ConfigEntry<float> someConfigFloat; public static ConfigEntry<float> someConfigFloatWithCustomRange; public static void Init() { string section = "Henry"; someConfigBool = Config.BindAndOptions(section, "someConfigBool", defaultValue: true, "this creates a bool config, and a checkbox option in risk of options"); someConfigFloat = Config.BindAndOptions(section, "someConfigfloat", 5f); someConfigFloatWithCustomRange = Config.BindAndOptions(section, "someConfigfloat2", 5f, 0f, 50f, "if a custom range is not passed in, a float will default to a slider with range 0-20. risk of options only has sliders"); } } internal class TsurugiCustomDamageTypes { public static ModdedDamageType BloodBleed = DamageAPI.ReserveDamageType(); public static ModdedDamageType GunpowderHeal = DamageAPI.ReserveDamageType(); } internal static class TsurugiHooks { [CompilerGenerated] private static class <>O { public static hook_OnCharacterDeath <0>__GlobalEventManager_OnCharacterDeath; public static Action<DamageReport> <1>__GlobalEventManager_onServerDamageDealt; public static StatHookEventHandler <2>__RecalculateStatsAPI_GetStatCoefficients; } private static BuffDef BleedDebuff; public static void Init() { //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_002b: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown BleedDebuff = LegacyResourcesAPI.Load<BuffDef>("RoR2/Base/Common/bdBleeding"); object obj = <>O.<0>__GlobalEventManager_OnCharacterDeath; if (obj == null) { hook_OnCharacterDeath val = GlobalEventManager_OnCharacterDeath; <>O.<0>__GlobalEventManager_OnCharacterDeath = val; obj = (object)val; } GlobalEventManager.OnCharacterDeath += (hook_OnCharacterDeath)obj; GlobalEventManager.onServerDamageDealt += GlobalEventManager_onServerDamageDealt; object obj2 = <>O.<2>__RecalculateStatsAPI_GetStatCoefficients; if (obj2 == null) { StatHookEventHandler val2 = RecalculateStatsAPI_GetStatCoefficients; <>O.<2>__RecalculateStatsAPI_GetStatCoefficients = val2; obj2 = (object)val2; } RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj2; } private static void GlobalEventManager_onServerDamageDealt(DamageReport obj) { //IL_007d: 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_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) EntityStateMachine val = default(EntityStateMachine); if (Object.op_Implicit((Object)(object)obj.victim) && Object.op_Implicit((Object)(object)obj.attacker) && Object.op_Implicit((Object)(object)obj.attackerBody) && EntityStateMachine.TryFindByCustomName(((Component)obj.attackerBody).gameObject, "Body", ref val) && ((object)val.state).GetType() == typeof(TsurugiCharacterMain)) { TsurugiCharacterMain tsurugiCharacterMain = (TsurugiCharacterMain)(object)val.state; if (DamageAPI.HasModdedDamageType(ref obj.damageInfo.damageType, TsurugiCustomDamageTypes.BloodBleed)) { InflictDotInfo val2 = default(InflictDotInfo); val2.dotIndex = TsurugiBuffs.Malice; val2.duration = 5f; val2.maxStacksFromAttacker = 40u; val2.damageMultiplier = 1f; val2.totalDamage = obj.victim.combinedHealth / 0.5f; val2.victimObject = ((Component)obj.victimBody).gameObject; val2.attackerObject = ((Component)obj.attackerBody).gameObject; val2.hitHurtBox = obj.victimBody.mainHurtBox; InflictDotInfo val3 = val2; DotController.InflictDot(ref val3); } if (DamageAPI.HasModdedDamageType(ref obj.damageInfo.damageType, TsurugiCustomDamageTypes.GunpowderHeal)) { tsurugiCharacterMain.HealBy += obj.damageDealt * 0.1f; } } } private static void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if ((Object)(object)sender != (Object)null && args != null) { EntityStateMachine val = default(EntityStateMachine); if (EntityStateMachine.TryFindByCustomName(((Component)sender).gameObject, "Body", ref val) && ((object)val.state).GetType() == typeof(TsurugiCharacterMain)) { args.primarySkill.bonusStockAdd += sender.skillLocator.secondary.maxStock - 5; } if (sender.HasBuff(TsurugiBuffs.TsurugiUltShield)) { args.baseShieldAdd += sender.healthComponent.fullCombinedHealth * 0.25f; } } } private static void GlobalEventManager_OnCharacterDeath(orig_OnCharacterDeath orig, GlobalEventManager self, DamageReport damageReport) { //IL_0079: 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) EntityStateMachine val = default(EntityStateMachine); if (Object.op_Implicit((Object)(object)damageReport.victim) && Object.op_Implicit((Object)(object)damageReport.attacker) && EntityStateMachine.TryFindByCustomName(((Component)damageReport.attackerBody).gameObject, "Body", ref val) && (Object)(object)self != (Object)null && ((object)val.state).GetType() == typeof(TsurugiCharacterMain)) { TsurugiCharacterMain tsurugiCharacterMain = (TsurugiCharacterMain)(object)val.state; if (DamageAPI.HasModdedDamageType(ref damageReport.damageInfo.damageType, TsurugiCustomDamageTypes.BloodBleed)) { tsurugiCharacterMain.confirmedPrimaryKills++; } if (DamageAPI.HasModdedDamageType(ref damageReport.damageInfo.damageType, TsurugiCustomDamageTypes.GunpowderHeal)) { tsurugiCharacterMain.confirmedSecondaryKills++; } BAMod.Tsurugi.Components.CrazyWomanPassiveDictator crazyWomanPassiveDictator = default(BAMod.Tsurugi.Components.CrazyWomanPassiveDictator); if (damageReport.attacker.gameObject.TryGetComponent<BAMod.Tsurugi.Components.CrazyWomanPassiveDictator>(ref crazyWomanPassiveDictator)) { switch (crazyWomanPassiveDictator.GetPassiveType()) { case BAMod.Tsurugi.Components.CrazyWomanPassiveDictator.TsurugiPassive.BloodLust: tsurugiCharacterMain.primaryCritRack = true; tsurugiCharacterMain.secondaryCritRack = true; break; case BAMod.Tsurugi.Components.CrazyWomanPassiveDictator.TsurugiPassive.BloodSewing: tsurugiCharacterMain.resetStocks = true; break; } } } orig.Invoke(self, damageReport); } } public class TsurugiItemDisplays : ItemDisplaysBase { protected override void SetItemDisplayRules(List<KeyAssetRuleGroup> itemDisplayRules) { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_004b: 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_0069: 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_00af: 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_00d7: 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_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: 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_013b: Unknown result type (might be due to invalid IL or missing references) //IL_014f: 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_015e: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_023f: 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_0249: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: 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_0307: Unknown result type (might be due to invalid IL or missing references) //IL_031b: Unknown result type (might be due to invalid IL or missing references) //IL_032f: Unknown result type (might be due to invalid IL or missing references) //IL_0334: Unknown result type (might be due to invalid IL or missing references) //IL_0339: Unknown result type (might be due to invalid IL or missing references) //IL_033e: Unknown result type (might be due to invalid IL or missing references) //IL_037f: Unknown result type (might be due to invalid IL or missing references) //IL_0393: Unknown result type (might be due to invalid IL or missing references) //IL_03a7: Unknown result type (might be due to invalid IL or missing references) //IL_03ac: Unknown result type (might be due to invalid IL or missing references) //IL_03b1: Unknown result type (might be due to invalid IL or missing references) //IL_03b6: Unknown result type (might be due to invalid IL or missing references) //IL_03f7: Unknown result type (might be due to invalid IL or missing references) //IL_040b: Unknown result type (might be due to invalid IL or missing references) //IL_041f: Unknown result type (might be due to invalid IL or missing references) //IL_0424: Unknown result type (might be due to invalid IL or missing references) //IL_0429: Unknown result type (might be due to invalid IL or missing references) //IL_042e: Unknown result type (might be due to invalid IL or missing references) //IL_046f: Unknown result type (might be due to invalid IL or missing references) //IL_0483: Unknown result type (might be due to invalid IL or missing references) //IL_0497: Unknown result type (might be due to invalid IL or missing references) //IL_049c: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Unknown result type (might be due to invalid IL or missing references) //IL_04a6: Unknown result type (might be due to invalid IL or missing references) //IL_04e7: Unknown result type (might be due to invalid IL or missing references) //IL_04fb: Unknown result type (might be due to invalid IL or missing references) //IL_050f: Unknown result type (might be due to invalid IL or missing references) //IL_0514: Unknown result type (might be due to invalid IL or missing references) //IL_0519: Unknown result type (might be due to invalid IL or missing references) //IL_051e: Unknown result type (might be due to invalid IL or missing references) //IL_055f: Unknown result type (might be due to invalid IL or missing references) //IL_0573: Unknown result type (might be due to invalid IL or missing references) //IL_0587: Unknown result type (might be due to invalid IL or missing references) //IL_058c: Unknown result type (might be due to invalid IL or missing references) //IL_0591: Unknown result type (might be due to invalid IL or missing references) //IL_0596: Unknown result type (might be due to invalid IL or missing references) //IL_05d7: Unknown result type (might be due to invalid IL or missing references) //IL_05eb: Unknown result type (might be due to invalid IL or missing references) //IL_05ff: Unknown result type (might be due to invalid IL or missing references) //IL_0604: Unknown result type (might be due to invalid IL or missing references) //IL_0609: Unknown result type (might be due to invalid IL or missing references) //IL_060e: Unknown result type (might be due to invalid IL or missing references) //IL_064f: Unknown result type (might be due to invalid IL or missing references) //IL_0663: Unknown result type (might be due to invalid IL or missing references) //IL_0677: Unknown result type (might be due to invalid IL or missing references) //IL_067c: Unknown result type (might be due to invalid IL or missing references) //IL_0681: Unknown result type (might be due to invalid IL or missing references) //IL_0686: Unknown result type (might be due to invalid IL or missing references) //IL_06c7: Unknown result type (might be due to invalid IL or missing references) //IL_06db: Unknown result type (might be due to invalid IL or missing references) //IL_06ef: Unknown result type (might be due to invalid IL or missing references) //IL_06f4: Unknown result type (might be due to invalid IL or missing references) //IL_06f9: Unknown result type (might be due to invalid IL or missing references) //IL_06fe: Unknown result type (might be due to invalid IL or missing references) //IL_073f: Unknown result type (might be due to invalid IL or missing references) //IL_0753: Unknown result type (might be due to invalid IL or missing references) //IL_0767: Unknown result type (might be due to invalid IL or missing references) //IL_076c: Unknown result type (might be due to invalid IL or missing references) //IL_0771: Unknown result type (might be due to invalid IL or missing references) //IL_0776: Unknown result type (might be due to invalid IL or missing references) //IL_07b7: Unknown result type (might be due to invalid IL or missing references) //IL_07cb: Unknown result type (might be due to invalid IL or missing references) //IL_07df: Unknown result type (might be due to invalid IL or missing references) //IL_07e4: Unknown result type (might be due to invalid IL or missing references) //IL_07e9: Unknown result type (might be due to invalid IL or missing references) //IL_07ee: Unknown result type (might be due to invalid IL or missing references) //IL_082f: Unknown result type (might be due to invalid IL or missing references) //IL_0843: Unknown result type (might be due to invalid IL or missing references) //IL_0857: Unknown result type (might be due to invalid IL or missing references) //IL_085c: Unknown result type (might be due to invalid IL or missing references) //IL_0861: Unknown result type (might be due to invalid IL or missing references) //IL_0866: Unknown result type (might be due to invalid IL or missing references) //IL_08a7: Unknown result type (might be due to invalid IL or missing references) //IL_08bb: Unknown result type (might be due to invalid IL or missing references) //IL_08cf: Unknown result type (might be due to invalid IL or missing references) //IL_08d4: Unknown result type (might be due to invalid IL or missing references) //IL_08d9: Unknown result type (might be due to invalid IL or missing references) //IL_08de: Unknown result type (might be due to invalid IL or missing references) //IL_091f: Unknown result type (might be due to invalid IL or missing references) //IL_0933: Unknown result type (might be due to invalid IL or missing references) //IL_0947: Unknown result type (might be due to invalid IL or missing references) //IL_094c: Unknown result type (might be due to invalid IL or missing references) //IL_0951: Unknown result type (might be due to invalid IL or missing references) //IL_0956: Unknown result type (might be due to invalid IL or missing references) //IL_0997: Unknown result type (might be due to invalid IL or missing references) //IL_09ab: Unknown result type (might be due to invalid IL or missing references) //IL_09bf: Unknown result type (might be due to invalid IL or missing references) //IL_09c4: Unknown result type (might be due to invalid IL or missing references) //IL_09c9: Unknown result type (might be due to invalid IL or missing references) //IL_09ce: Unknown result type (might be due to invalid IL or missing references) //IL_0a0f: Unknown result type (might be due to invalid IL or missing references) //IL_0a23: Unknown result type (might be due to invalid IL or missing references) //IL_0a37: Unknown result type (might be due to invalid IL or missing references) //IL_0a3c: Unknown result type (might be due to invalid IL or missing references) //IL_0a41: Unknown result type (might be due to invalid IL or missing references) //IL_0a46: Unknown result type (might be due to invalid IL or missing references) //IL_0a87: Unknown result type (might be due to invalid IL or missing references) //IL_0a9b: Unknown result type (might be due to invalid IL or missing references) //IL_0aaf: Unknown result type (might be due to invalid IL or missing references) //IL_0ab4: Unknown result type (might be due to invalid IL or missing references) //IL_0ab9: Unknown result type (might be due to invalid IL or missing references) //IL_0abe: Unknown result type (might be due to invalid IL or missing references) //IL_0aff: Unknown result type (might be due to invalid IL or missing references) //IL_0b13: Unknown result type (might be due to invalid IL or missing references) //IL_0b27: Unknown result type (might be due to invalid IL or missing references) //IL_0b2c: Unknown result type (might be due to invalid IL or missing references) //IL_0b31: Unknown result type (might be due to invalid IL or missing references) //IL_0b36: Unknown result type (might be due to invalid IL or missing references) //IL_0b77: Unknown result type (might be due to invalid IL or missing references) //IL_0b8b: Unknown result type (might be due to invalid IL or missing references) //IL_0b9f: Unknown result type (might be due to invalid IL or missing references) //IL_0ba4: Unknown result type (might be due to invalid IL or missing references) //IL_0ba9: Unknown result type (might be due to invalid IL or missing references) //IL_0bae: Unknown result type (might be due to invalid IL or missing references) //IL_0bef: Unknown result type (might be due to invalid IL or missing references) //IL_0c03: Unknown result type (might be due to invalid IL or missing references) //IL_0c17: Unknown result type (might be due to invalid IL or missing references) //IL_0c1c: Unknown result type (might be due to invalid IL or missing references) //IL_0c21: Unknown result type (might be due to invalid IL or missing references) //IL_0c26: Unknown result type (might be due to invalid IL or missing references) //IL_0c67: Unknown result type (might be due to invalid IL or missing references) //IL_0c7b: Unknown result type (might be due to invalid IL or missing references) //IL_0c8f: Unknown result type (might be due to invalid IL or missing references) //IL_0c94: Unknown result type (might be due to invalid IL or missing references) //IL_0c99: Unknown result type (might be due to invalid IL or missing references) //IL_0c9e: Unknown result type (might be due to invalid IL or missing references) //IL_0cdf: Unknown result type (might be due to invalid IL or missing references) //IL_0cf3: Unknown result type (might be due to invalid IL or missing references) //IL_0d07: Unknown result type (might be due to invalid IL or missing references) //IL_0d0c: Unknown result type (might be due to invalid IL or missing references) //IL_0d11: Unknown result type (might be due to invalid IL or missing references) //IL_0d16: Unknown result type (might be due to invalid IL or missing references) //IL_0d57: Unknown result type (might be due to invalid IL or missing references) //IL_0d6b: Unknown result type (might be due to invalid IL or missing references) //IL_0d7f: Unknown result type (might be due to invalid IL or missing references) //IL_0d84: Unknown result type (might be due to invalid IL or missing references) //IL_0d89: Unknown result type (might be due to invalid IL or missing references) //IL_0d8e: Unknown result type (might be due to invalid IL or missing references) //IL_0dcf: Unknown result type (might be due to invalid IL or missing references) //IL_0de3: Unknown result type (might be due to invalid IL or missing references) //IL_0df7: Unknown result type (might be due to invalid IL or missing references) //IL_0dfc: Unknown result type (might be due to invalid IL or missing references) //IL_0e01: Unknown result type (might be due to invalid IL or missing references) //IL_0e06: Unknown result type (might be due to invalid IL or missing references) //IL_0e47: Unknown result type (might be due to invalid IL or missing references) //IL_0e5b: Unknown result type (might be due to invalid IL or missing references) //IL_0e6f: Unknown result type (might be due to invalid IL or missing references) //IL_0e74: Unknown result type (might be due to invalid IL or missing references) //IL_0e79: Unknown result type (might be due to invalid IL or missing references) //IL_0e7e: Unknown result type (might be due to invalid IL or missing references) //IL_0ea2: Unknown result type (might be due to invalid IL or missing references) //IL_0ea7: Unknown result type (might be due to invalid IL or missing references) //IL_0ecc: Unknown result type (might be due to invalid IL or missing references) //IL_0ee0: Unknown result type (might be due to invalid IL or missing references) //IL_0ef4: Unknown result type (might be due to invalid IL or missing references) //IL_0ef9: Unknown result type (might be due to invalid IL or missing references) //IL_0efe: Unknown result type (might be due to invalid IL or missing references) //IL_0f23: Unknown result type (might be due to invalid IL or missing references) //IL_0f37: Unknown result type (might be due to invalid IL or missing references) //IL_0f4b: Unknown result type (might be due to invalid IL or missing references) //IL_0f50: Unknown result type (might be due to invalid IL or missing references) //IL_0f55: Unknown result type (might be due to invalid IL or missing references) //IL_0f5a: Unknown result type (might be due to invalid IL or missing references) //IL_0f9b: Unknown result type (might be due to invalid IL or missing references) //IL_0faf: Unknown result type (might be due to invalid IL or missing references) //IL_0fc3: Unknown result type (might be due to invalid IL or missing references) //IL_0fc8: Unknown result type (might be due to invalid IL or missing references) //IL_0fcd: Unknown result type (might be due to invalid IL or missing references) //IL_0fd2: Unknown result type (might be due to invalid IL or missing references) //IL_1013: Unknown result type (might be due to invalid IL or missing references) //IL_1027: Unknown result type (might be due to invalid IL or missing references) //IL_103b: Unknown result type (might be due to invalid IL or missing references) //IL_1040: Unknown result type (might be due to invalid IL or missing references) //IL_1045: Unknown result type (might be due to invalid IL or missing references) //IL_104a: Unknown result type (might be due to invalid IL or missing references) //IL_108b: Unknown result type (might be due to invalid IL or missing references) //IL_109f: Unknown result type (might be due to invalid IL or missing references) //IL_10b3: Unknown result type (might be due to invalid IL or missing references) //IL_10b8: Unknown result type (might be due to invalid IL or missing references) //IL_10bd: Unknown result type (might be due to invalid IL or missing references) //IL_10c2: Unknown result type (might be due to invalid IL or missing references) //IL_1103: Unknown result type (might be due to invalid IL or missing references) //IL_1117: Unknown result type (might be due to invalid IL or missing references) //IL_112b: Unknown result type (might be due to invalid IL or missing references) //IL_1130: Unknown result type (might be due to invalid IL or missing references) //IL_1135: Unknown result type (might be due to invalid IL or missing references) //IL_113a: Unknown result type (might be due to invalid IL or missing references) //IL_117b: Unknown result type (might be due to invalid IL or missing references) //IL_118f: Unknown result type (might be due to invalid IL or missing references) //IL_11a3: Unknown result type (might be due to invalid IL or missing references) //IL_11a8: Unknown result type (might be due to invalid IL or missing references) //IL_11ad: Unknown result type (might be due to invalid IL or missing references) //IL_11b2: Unknown result type (might be due to invalid IL or missing references) //IL_11f3: Unknown result type (might be due to invalid IL or missing references) //IL_1207: Unknown result type (might be due to invalid IL or missing references) //IL_121b: Unknown result type (might be due to invalid IL or missing references) //IL_1220: Unknown result type (might be due to invalid IL or missing references) //IL_1225: Unknown result type (might be due to invalid IL or missing references) //IL_122a: Unknown result type (might be due to invalid IL or missing references) //IL_126b: Unknown result type (might be due to invalid IL or missing references) //IL_127f: Unknown result type (might be due to invalid IL or missing references) //IL_1293: Unknown result type (might be due to invalid IL or missing references) //IL_1298: Unknown result type (might be due to invalid IL or missing references) //IL_129d: Unknown result type (might be due to invalid IL or missing references) //IL_12a2: Unknown result type (might be due to invalid IL or missing references) //IL_12e3: Unknown result type (might be due to invalid IL or missing references) //IL_12f7: Unknown result type (might be due to invalid IL or missing references) //IL_130b: Unknown result type (might be due to invalid IL or missing references) //IL_1310: Unknown result type (might be due to invalid IL or missing references) //IL_1315: Unknown result type (might be due to invalid IL or missing references) //IL_131a: Unknown result type (might be due to invalid IL or missing references) //IL_135b: Unknown result type (might be due to invalid IL or missing references) //IL_136f: Unknown result type (might be due to invalid IL or missing references) //IL_1383: Unknown result type (might be due to invalid IL or missing references) //IL_1388: Unknown result type (might be due to invalid IL or missing references) //IL_138d: Unknown result type (might be due to invalid IL or missing references) //IL_13b2: Unknown result type (might be due to invalid IL or missing references) //IL_13c6: Unknown result type (might be due to invalid IL or missing references) //IL_13da: Unknown result type (might be due to invalid IL or missing references) //IL_13df: Unknown result type (might be due to invalid IL or missing references) //IL_13e4: Unknown result type (might be due to invalid IL or missing references) //IL_13e9: Unknown result type (might be due to invalid IL or missing references) //IL_142a: Unknown result type (might be due to invalid IL or missing references) //IL_143e: Unknown result type (might be due to invalid IL or missing references) //IL_1452: Unknown result type (might be due to invalid IL or missing references) //IL_1457: Unknown result type (might be due to invalid IL or missing references) //IL_145c: Unknown result type (might be due to invalid IL or missing references) //IL_1461: Unknown result type (might be due to invalid IL or missing references) //IL_14a2: Unknown result type (might be due to invalid IL or missing references) //IL_14b6: Unknown result type (might be due to invalid IL or missing references) //IL_14ca: Unknown result type (might be due to invalid IL or missing references) //IL_14cf: Unknown result type (might be due to invalid IL or missing references) //IL_14d4: Unknown result type (might be due to invalid IL or missing references) //IL_14d9: Unknown result type (might be due to invalid IL or missing references) //IL_151a: Unknown result type (might be due to invalid IL or missing references) //IL_152e: Unknown result type (might be due to invalid IL or missing references) //IL_1542: Unknown result type (might be due to invalid IL or missing references) //IL_1547: Unknown result type (might be due to invalid IL or missing references) //IL_154c: Unknown result type (might be due to invalid IL or missing references) //IL_1551: Unknown result type (might be due to invalid IL or missing references) //IL_1592: Unknown result type (might be due to invalid IL or missing references) //IL_15a6: Unknown result type (might be due to invalid IL or missing references) //IL_15ba: Unknown result type (might be due to invalid IL or missing references) //IL_15bf: Unknown result type (might be due to invalid IL or missing references) //IL_15c4: Unknown result type (might be due to invalid IL or missing references) //IL_15c9: Unknown result type (might be due to invalid IL or missing references) //IL_160a: Unknown result type (might be due to invalid IL or missing references) //IL_161e: Unknown result type (might be due to invalid IL or missing references) //IL_1632: Unknown result type