using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using Blunderbuss.MyEntityStates;
using DimensionSlash.MyEntityStates;
using EntityStates;
using EntityStates.Bandit2.Weapon;
using EntityStates.Commando.CommandoWeapon;
using EntityStates.Merc;
using Jackpot.MyEntityStates;
using JetBrains.Annotations;
using KinematicCharacterController;
using LunarSeverance.MyEntityStates;
using Marshall.MyEntityStates;
using Microsoft.CodeAnalysis;
using Molotov.MyEntityStates;
using R2API;
using RoR2;
using RoR2.Projectile;
using RoR2.Skills;
using RoR2.UI;
using Slayer.MyEntityStates;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;
[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("Jakaka_Skills")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("Jakaka_Skills")]
[assembly: AssemblyTitle("Jakaka_Skills")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace Slayer.MyEntityStates
{
public class Slayer : BaseSkillState
{
public float baseDuration = 1f / 3f;
public float duration;
private Animator animator;
private int bodySideWeaponLayerIndex;
private OverrideRequest crosshairOverrideRequest;
public GameObject banditRevolverMuzzleflashPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Bandit2/MuzzleflashBandit2Pistol.prefab").WaitForCompletion();
public GameObject MuzzleFlash = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Bandit2/VFX/MuzzleflashBandit2.prefab").WaitForCompletion();
public GameObject crosshairOverridePrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Bandit2/Bandit2CrosshairPrepRevolverFire.prefab").WaitForCompletion();
public GameObject hitEffectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Bandit2/HitsparkBandit2Pistol.prefab").WaitForCompletion();
public GameObject tracerEffectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Bandit2/TracerBanditPistol.prefab").WaitForCompletion();
public GameObject baseSidearmState = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Bandit2/EntityStates.Bandit2.Weapon.BaseSidearmState.asset").WaitForCompletion();
[SerializeField]
public GameObject effectPrefab;
public virtual string exitAnimationStateName => "BufferEmpty";
public override void OnEnter()
{
//IL_001c: Unknown result type (might be due to invalid IL or missing references)
//IL_0021: Unknown result type (might be due to invalid IL or missing references)
//IL_002f: 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_0121: Unknown result type (might be due to invalid IL or missing references)
//IL_012d: Unknown result type (might be due to invalid IL or missing references)
//IL_0139: 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_0141: Unknown result type (might be due to invalid IL or missing references)
//IL_0146: Unknown result type (might be due to invalid IL or missing references)
//IL_0149: Unknown result type (might be due to invalid IL or missing references)
//IL_0154: Unknown result type (might be due to invalid IL or missing references)
//IL_015f: Unknown result type (might be due to invalid IL or missing references)
//IL_0170: 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_0182: Unknown result type (might be due to invalid IL or missing references)
//IL_0199: Unknown result type (might be due to invalid IL or missing references)
//IL_01a4: Unknown result type (might be due to invalid IL or missing references)
//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
//IL_01b7: Unknown result type (might be due to invalid IL or missing references)
//IL_01c2: Unknown result type (might be due to invalid IL or missing references)
//IL_01ce: Unknown result type (might be due to invalid IL or missing references)
//IL_01da: Unknown result type (might be due to invalid IL or missing references)
//IL_01e1: Unknown result type (might be due to invalid IL or missing references)
//IL_01e2: Unknown result type (might be due to invalid IL or missing references)
//IL_01e7: Unknown result type (might be due to invalid IL or missing references)
//IL_01ec: Unknown result type (might be due to invalid IL or missing references)
//IL_01f3: Unknown result type (might be due to invalid IL or missing references)
((BaseState)this).OnEnter();
duration = baseDuration / ((BaseState)this).attackSpeedStat;
Ray aimRay = ((BaseState)this).GetAimRay();
animator = ((EntityState)this).GetModelAnimator();
((BaseState)this).StartAimMode(aimRay, 2f, false);
bodySideWeaponLayerIndex = animator.GetLayerIndex("Body, SideWeapon");
animator.SetLayerWeight(bodySideWeaponLayerIndex, 10f);
((EntityState)this).PlayAnimation("Gesture, Additive", "FireSideWeapon", "FireSideWeapon.playbackRate", duration * 2.2f, 0f);
Util.PlaySound("Play_bandit2_R_fire", ((EntityState)this).gameObject);
((BaseState)this).AddRecoil(-2f, -6f, -2f, 2f);
if (Object.op_Implicit((Object)(object)crosshairOverridePrefab))
{
crosshairOverrideRequest = CrosshairUtils.RequestOverrideForBody(((EntityState)this).characterBody, crosshairOverridePrefab, (OverridePriority)1);
}
if (Object.op_Implicit((Object)(object)effectPrefab))
{
EffectManager.SimpleMuzzleFlash(effectPrefab, ((EntityState)this).gameObject, "MuzzlePistol", false);
}
if (((EntityState)this).isAuthority)
{
new BulletAttack
{
owner = ((EntityState)this).gameObject,
weapon = ((EntityState)this).gameObject,
origin = ((Ray)(ref aimRay)).origin,
aimVector = ((Ray)(ref aimRay)).direction,
minSpread = 0f,
maxSpread = ((EntityState)this).characterBody.spreadBloomAngle,
bulletCount = 1u,
procCoefficient = 1f,
damage = ((EntityState)this).characterBody.damage * 4.5f,
force = 4f,
falloffModel = (FalloffModel)1,
tracerEffectPrefab = tracerEffectPrefab,
muzzleName = "MuzzlePistol",
hitEffectPrefab = hitEffectPrefab,
isCrit = ((BaseState)this).RollCrit(),
HitEffectNormal = false,
stopperMask = CommonMasks.bullet,
smartCollision = true,
maxDistance = 1500f
}.Fire();
}
}
public override void OnExit()
{
if (Object.op_Implicit((Object)(object)animator))
{
animator.SetLayerWeight(bodySideWeaponLayerIndex, 0f);
}
Transform val = ((BaseState)this).FindModelChild("SpinningPistolFX");
if (Object.op_Implicit((Object)(object)val))
{
((Component)val).gameObject.SetActive(false);
}
((EntityState)this).OnExit();
}
public override void FixedUpdate()
{
((EntityState)this).FixedUpdate();
((EntityState)this).characterBody.isSprinting = false;
if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
{
((EntityState)this).outer.SetNextState((EntityState)(object)new SlayerExit());
}
else if (((EntityState)this).isAuthority && ((BaseSkillState)this).activatorSkillSlot.stock <= 0)
{
((EntityState)this).outer.SetNextState((EntityState)(object)new SlayerReload());
}
}
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)1;
}
}
public class SlayerExit : BaseSidearmState
{
public override void OnEnter()
{
((BaseSidearmState)this).OnEnter();
}
public override void FixedUpdate()
{
((BaseSidearmState)this).FixedUpdate();
if (((EntityState)this).isAuthority && ((EntityState)this).characterBody.inputBank.interact.down)
{
((EntityState)this).outer.SetNextStateToMain();
((EntityState)this).outer.SetNextState((EntityState)(object)new SlayerReload());
}
else if (((EntityState)this).isAuthority && ((EntityState)this).characterBody.isSprinting)
{
((EntityState)this).outer.SetNextStateToMain();
((EntityState)this).outer.SetNextState((EntityState)(object)new SlayerSprint());
}
}
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)0;
}
}
public class SlayerReload : BasePrepSidearmRevolverState
{
public float reloadBaseDuration = 1f;
private float reloadDuration;
public virtual string exitAnimationStateName => "BufferEmpty";
public override void OnEnter()
{
((BasePrepSidearmRevolverState)this).OnEnter();
reloadDuration = reloadBaseDuration / ((BaseState)this).attackSpeedStat;
((EntityState)this).PlayAnimation("Gesture, Additive", "MainToSide", "MainToSide.playbackRate", reloadDuration * 1.55f, 0f);
Util.PlaySound("Play_bandit2_R_load", ((EntityState)this).gameObject);
}
public override void FixedUpdate()
{
((BasePrepSidearmRevolverState)this).FixedUpdate();
if (((EntityState)this).fixedAge >= reloadDuration && ((EntityState)this).isAuthority)
{
((EntityState)this).outer.SetNextStateToMain();
((EntityState)this).outer.SetNextState((EntityState)(object)new SlayerExit());
}
else if (((EntityState)this).isAuthority && ((EntityState)this).characterBody.isSprinting)
{
((EntityState)this).PlayAnimation("Gesture, Additive", exitAnimationStateName);
}
}
public override void OnExit()
{
Transform val = ((BaseState)this).FindModelChild("SpinningPistolFX");
if (Object.op_Implicit((Object)(object)val))
{
((Component)val).gameObject.SetActive(false);
}
if ((Object)(object)((EntityState)this).skillLocator?.primary != (Object)null)
{
((EntityState)this).skillLocator.primary.stock = ((EntityState)this).skillLocator.primary.maxStock;
}
((EntityState)this).outer.SetNextState((EntityState)(object)new SlayerExit());
((BasePrepSidearmRevolverState)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)1;
}
public override EntityState GetNextState()
{
((EntityState)this).outer.SetNextState((EntityState)(object)new SlayerExit());
return null;
}
}
public class SlayerSprint : BaseSkillState
{
public override void OnEnter()
{
((BaseState)this).OnEnter();
}
public override void FixedUpdate()
{
((EntityState)this).FixedUpdate();
if (((EntityState)this).isAuthority && ((EntityState)this).characterBody.inputBank.interact.down)
{
((EntityState)this).outer.SetNextState((EntityState)(object)new SlayerReload());
}
else if (((EntityState)this).isAuthority && ((EntityState)this).characterBody.inputBank.skill1.down)
{
((EntityState)this).outer.SetNextStateToMain();
((EntityState)this).characterBody.isSprinting = false;
}
}
public override void OnExit()
{
if ((!((EntityState)this).isAuthority || !((EntityState)this).characterBody.inputBank.skill1.down) && (!((EntityState)this).isAuthority || !((EntityState)this).characterBody.inputBank.skill2.down) && (!((EntityState)this).isAuthority || !((EntityState)this).characterBody.inputBank.skill3.down) && (!((EntityState)this).isAuthority || !((EntityState)this).characterBody.inputBank.skill4.down))
{
((EntityState)this).outer.SetNextStateToMain();
((EntityState)this).outer.SetNextState((EntityState)(object)new SlayerExit());
}
}
public override InterruptPriority GetMinimumInterruptPriority()
{
//IL_002b: Unknown result type (might be due to invalid IL or missing references)
//IL_0027: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Unknown result type (might be due to invalid IL or missing references)
if (((EntityState)this).isAuthority && ((EntityState)this).characterBody.inputBank.skill1.down)
{
return (InterruptPriority)1;
}
return (InterruptPriority)0;
}
}
}
namespace JakakaSkills
{
[BepInPlugin("com.Jakaka.Jakaka_Skills", "Jakaka Skills", "1.5.0")]
public class Skills : BaseUnityPlugin
{
private CharacterBody body;
private InputBankTest inputBank;
public const string DEVELOPER_PREFIX = "JAKAKA";
private const string bundleName = "jakakaassets";
private static AssetBundle jakakaassets;
public void Awake()
{
//IL_0082: Unknown result type (might be due to invalid IL or missing references)
LoadAssetBundle();
AddSlayerSkill();
AddMarshalSkill();
AddBlunderbussSkill();
AddMolotovSkill();
AddDimensionSlash();
AddJackpot();
AddLunarSeveranceSkill();
Assembly assembly = typeof(Skills).Assembly;
Type[] types = assembly.GetTypes();
bool flag = default(bool);
foreach (Type type in types)
{
if (type.IsSubclassOf(typeof(EntityState)) && !type.IsAbstract)
{
ContentAddition.AddEntityState(type, ref flag);
}
}
body = ((Component)this).GetComponent<CharacterBody>();
inputBank = ((Component)this).GetComponent<InputBankTest>();
}
private void LoadAssetBundle()
{
string text = Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location), "jakakaassets");
if (File.Exists(text))
{
jakakaassets = AssetBundle.LoadFromFile(text);
if ((Object)(object)jakakaassets == (Object)null)
{
((BaseUnityPlugin)this).Logger.LogError((object)"Failed to load asset bundle!");
}
}
else
{
((BaseUnityPlugin)this).Logger.LogError((object)("Asset bundle not found at path: " + text));
}
}
public void AddSlayerSkill()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_0046: 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_00a0: Unknown result type (might be due to invalid IL or missing references)
//IL_0140: Unknown result type (might be due to invalid IL or missing references)
//IL_0164: Unknown result type (might be due to invalid IL or missing references)
//IL_016e: Expected O, but got Unknown
//IL_016f: Unknown result type (might be due to invalid IL or missing references)
//IL_0171: Unknown result type (might be due to invalid IL or missing references)
GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Bandit2/Bandit2Body.prefab").WaitForCompletion();
LanguageAPI.Add("REVOLVER_NAME", "Slayer");
LanguageAPI.Add("REVOLVER_DESCRIPTION", "Fire a revolver round for <style=cIsDamage>450% damage</style>. Must be manually reloaded with <style=cIsUtility>Interact</style>");
SkillDef val2 = ScriptableObject.CreateInstance<SkillDef>();
val2.activationState = new SerializableEntityStateType(typeof(Slayer.MyEntityStates.Slayer));
val2.activationStateMachineName = "Weapon";
val2.baseMaxStock = 6;
val2.rechargeStock = 0;
val2.baseRechargeInterval = 0f;
val2.dontAllowPastMaxStocks = true;
val2.beginSkillCooldownOnSkillEnd = false;
val2.resetCooldownTimerOnUse = true;
val2.canceledFromSprinting = false;
val2.cancelSprintingOnActivation = true;
val2.fullRestockOnAssign = true;
val2.interruptPriority = (InterruptPriority)0;
val2.isCombatSkill = true;
val2.mustKeyPress = true;
val2.requiredStock = 1;
val2.stockToConsume = 1;
val2.autoHandleLuminousShot = true;
val2.icon = jakakaassets.LoadAsset<Sprite>("Slayer.png");
val2.skillDescriptionToken = "REVOLVER_DESCRIPTION";
val2.skillName = "Slayer";
val2.skillNameToken = "REVOLVER_NAME";
ContentAddition.AddSkillDef(val2);
SkillLocator component = val.GetComponent<SkillLocator>();
SkillFamily skillFamily = component.primary.skillFamily;
Array.Resize(ref skillFamily.variants, skillFamily.variants.Length + 1);
Variant[] variants = skillFamily.variants;
int num = skillFamily.variants.Length - 1;
Variant val3 = new Variant
{
skillDef = val2,
unlockableName = ""
};
((Variant)(ref val3)).viewableNode = new Node(val2.skillNameToken, true, (Node)null);
variants[num] = val3;
}
private void AddBlunderbussSkill()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_0046: 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_00a7: Unknown result type (might be due to invalid IL or missing references)
//IL_014c: Unknown result type (might be due to invalid IL or missing references)
//IL_0170: Unknown result type (might be due to invalid IL or missing references)
//IL_017a: Expected O, but got Unknown
//IL_017b: Unknown result type (might be due to invalid IL or missing references)
//IL_017d: Unknown result type (might be due to invalid IL or missing references)
GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Bandit2/Bandit2Body.prefab").WaitForCompletion();
LanguageAPI.Add("SHOTGUN_NAME", "Blunderbuss");
LanguageAPI.Add("SHOTGUN_DESCRIPTION", "Fire a powerful blunderbuss that gets more projectiles per stock for <style=cIsDamage>3-7-14-24x80% damage</style>.");
SkillDef val2 = ScriptableObject.CreateInstance<SkillDef>();
val2.activationState = new SerializableEntityStateType(typeof(Blunderbuss.MyEntityStates.Blunderbuss));
val2.activationStateMachineName = "Weapon";
val2.baseMaxStock = 4;
val2.rechargeStock = 1;
val2.baseRechargeInterval = 0.5f;
val2.dontAllowPastMaxStocks = true;
val2.beginSkillCooldownOnSkillEnd = true;
val2.resetCooldownTimerOnUse = true;
val2.canceledFromSprinting = false;
val2.cancelSprintingOnActivation = true;
val2.hideStockCount = true;
val2.fullRestockOnAssign = true;
val2.interruptPriority = (InterruptPriority)0;
val2.isCombatSkill = true;
val2.mustKeyPress = true;
val2.autoHandleLuminousShot = true;
val2.requiredStock = 1;
val2.stockToConsume = val2.baseMaxStock;
val2.icon = jakakaassets.LoadAsset<Sprite>("Blunder.png");
val2.skillDescriptionToken = "SHOTGUN_DESCRIPTION";
val2.skillName = "Blunderbuss";
val2.skillNameToken = "SHOTGUN_NAME";
ContentAddition.AddSkillDef(val2);
SkillLocator component = val.GetComponent<SkillLocator>();
SkillFamily skillFamily = component.primary.skillFamily;
Array.Resize(ref skillFamily.variants, skillFamily.variants.Length + 1);
Variant[] variants = skillFamily.variants;
int num = skillFamily.variants.Length - 1;
Variant val3 = new Variant
{
skillDef = val2,
unlockableName = ""
};
((Variant)(ref val3)).viewableNode = new Node(val2.skillNameToken, true, (Node)null);
variants[num] = val3;
}
private void AddMarshalSkill()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_0046: 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_00a4: Unknown result type (might be due to invalid IL or missing references)
//IL_0144: Unknown result type (might be due to invalid IL or missing references)
//IL_0168: Unknown result type (might be due to invalid IL or missing references)
//IL_0172: Expected O, but got Unknown
//IL_0173: Unknown result type (might be due to invalid IL or missing references)
//IL_0175: Unknown result type (might be due to invalid IL or missing references)
GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Commando/CommandoBody.prefab").WaitForCompletion();
LanguageAPI.Add("MARSHALL_NAME", "Marshall's");
LanguageAPI.Add("MARSHALL_DESCRIPTION", "Fire two high power shotgun pistols for <style=cIsDamage>16x25% damage</style>.");
SkillDef val2 = ScriptableObject.CreateInstance<SkillDef>();
val2.activationState = new SerializableEntityStateType(typeof(Marshall.MyEntityStates.Marshall));
val2.activationStateMachineName = "Weapon";
val2.baseMaxStock = 2;
val2.rechargeStock = 1024;
val2.baseRechargeInterval = 1f;
val2.beginSkillCooldownOnSkillEnd = false;
val2.resetCooldownTimerOnUse = true;
val2.canceledFromSprinting = false;
val2.dontAllowPastMaxStocks = true;
val2.cancelSprintingOnActivation = true;
val2.hideStockCount = true;
val2.interruptPriority = (InterruptPriority)0;
val2.isCombatSkill = true;
val2.mustKeyPress = true;
val2.requiredStock = 1;
val2.stockToConsume = 1;
val2.autoHandleLuminousShot = true;
val2.icon = jakakaassets.LoadAsset<Sprite>("Marshall.png");
val2.skillDescriptionToken = "MARSHALL_DESCRIPTION";
val2.skillName = "Marshall's";
val2.skillNameToken = "MARSHALL_NAME";
ContentAddition.AddSkillDef(val2);
SkillLocator component = val.GetComponent<SkillLocator>();
SkillFamily skillFamily = component.primary.skillFamily;
Array.Resize(ref skillFamily.variants, skillFamily.variants.Length + 1);
Variant[] variants = skillFamily.variants;
int num = skillFamily.variants.Length - 1;
Variant val3 = new Variant
{
skillDef = val2,
unlockableName = ""
};
((Variant)(ref val3)).viewableNode = new Node(val2.skillNameToken, true, (Node)null);
variants[num] = val3;
}
private void AddMolotovSkill()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_0046: 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_00a0: Unknown result type (might be due to invalid IL or missing references)
//IL_0140: Unknown result type (might be due to invalid IL or missing references)
//IL_0164: Unknown result type (might be due to invalid IL or missing references)
//IL_016e: Expected O, but got Unknown
//IL_016f: Unknown result type (might be due to invalid IL or missing references)
//IL_0171: Unknown result type (might be due to invalid IL or missing references)
GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Bandit2/Bandit2Body.prefab").WaitForCompletion();
LanguageAPI.Add("MOLOTOV_NAME", "Molotov");
LanguageAPI.Add("MOLOTOV_DESCRIPTION", "Throw a bundle of 6 Molotov's for <style=cIsDamage>200% damage</style> that leave flame pools for <style=cIsDamage>160% damage per seconds</style>");
SkillDef val2 = ScriptableObject.CreateInstance<SkillDef>();
val2.activationState = new SerializableEntityStateType(typeof(Molotov.MyEntityStates.Molotov));
val2.activationStateMachineName = "Weapon";
val2.baseMaxStock = 1;
val2.rechargeStock = 1;
val2.baseRechargeInterval = 6.5f;
val2.beginSkillCooldownOnSkillEnd = true;
val2.resetCooldownTimerOnUse = true;
val2.canceledFromSprinting = false;
val2.cancelSprintingOnActivation = false;
val2.hideStockCount = false;
val2.fullRestockOnAssign = false;
val2.interruptPriority = (InterruptPriority)0;
val2.isCombatSkill = true;
val2.mustKeyPress = true;
val2.autoHandleLuminousShot = true;
val2.requiredStock = 1;
val2.stockToConsume = 1;
val2.icon = jakakaassets.LoadAsset<Sprite>("Molotov.png");
val2.skillDescriptionToken = "MOLOTOV_DESCRIPTION";
val2.skillName = "Molotov";
val2.skillNameToken = "MOLOTOV_NAME";
ContentAddition.AddSkillDef(val2);
SkillLocator component = val.GetComponent<SkillLocator>();
SkillFamily skillFamily = component.secondary.skillFamily;
Array.Resize(ref skillFamily.variants, skillFamily.variants.Length + 1);
Variant[] variants = skillFamily.variants;
int num = skillFamily.variants.Length - 1;
Variant val3 = new Variant
{
skillDef = val2,
unlockableName = ""
};
((Variant)(ref val3)).viewableNode = new Node(val2.skillNameToken, true, (Node)null);
variants[num] = val3;
}
private void AddDimensionSlash()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_0046: 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_00a0: Unknown result type (might be due to invalid IL or missing references)
//IL_0140: Unknown result type (might be due to invalid IL or missing references)
//IL_0164: Unknown result type (might be due to invalid IL or missing references)
//IL_016e: Expected O, but got Unknown
//IL_016f: Unknown result type (might be due to invalid IL or missing references)
//IL_0171: Unknown result type (might be due to invalid IL or missing references)
GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Merc/MercBody.prefab").WaitForCompletion();
LanguageAPI.Add("DIMENSION_SLASH_NAME", "Dimension Slash");
LanguageAPI.Add("DIMENSION_SLASH_DESCRIPTION", "Rapidly teleport around slashing madly in all directions <style=cIsDamage>100x100% damage</style>");
SkillDef val2 = ScriptableObject.CreateInstance<SkillDef>();
val2.activationState = new SerializableEntityStateType(typeof(DimensionSlash.MyEntityStates.DimensionSlash));
val2.activationStateMachineName = "Weapon";
val2.baseMaxStock = 1;
val2.rechargeStock = 1;
val2.baseRechargeInterval = 15f;
val2.beginSkillCooldownOnSkillEnd = true;
val2.resetCooldownTimerOnUse = true;
val2.canceledFromSprinting = false;
val2.cancelSprintingOnActivation = true;
val2.hideStockCount = false;
val2.fullRestockOnAssign = false;
val2.interruptPriority = (InterruptPriority)0;
val2.isCombatSkill = true;
val2.mustKeyPress = true;
val2.autoHandleLuminousShot = true;
val2.requiredStock = 1;
val2.stockToConsume = 1;
val2.icon = jakakaassets.LoadAsset<Sprite>("DimensionSlash.png");
val2.skillDescriptionToken = "DIMENSION_SLASH_DESCRIPTION";
val2.skillName = "Dimension Slash";
val2.skillNameToken = "DIMENSION_SLASH_NAME";
ContentAddition.AddSkillDef(val2);
SkillLocator component = val.GetComponent<SkillLocator>();
SkillFamily skillFamily = component.special.skillFamily;
Array.Resize(ref skillFamily.variants, skillFamily.variants.Length + 1);
Variant[] variants = skillFamily.variants;
int num = skillFamily.variants.Length - 1;
Variant val3 = new Variant
{
skillDef = val2,
unlockableName = ""
};
((Variant)(ref val3)).viewableNode = new Node(val2.skillNameToken, true, (Node)null);
variants[num] = val3;
}
private void AddJackpot()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_0046: 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_00a7: Unknown result type (might be due to invalid IL or missing references)
//IL_0147: Unknown result type (might be due to invalid IL or missing references)
//IL_016b: Unknown result type (might be due to invalid IL or missing references)
//IL_0175: Expected O, but got Unknown
//IL_0176: Unknown result type (might be due to invalid IL or missing references)
//IL_0178: Unknown result type (might be due to invalid IL or missing references)
GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Merc/MercBody.prefab").WaitForCompletion();
LanguageAPI.Add("JACKPOT_NAME", "Jackpot");
LanguageAPI.Add("JACKPOT_DESCRIPTION", "Dash foward and leave a trail of slashes that do <style=cIsDamage>50% damage</style>. The amount of slashes scales with attack speed");
SkillDef val2 = ScriptableObject.CreateInstance<SkillDef>();
val2.activationState = new SerializableEntityStateType(typeof(Jackpot.MyEntityStates.Jackpot));
val2.activationStateMachineName = "Weapon";
val2.baseMaxStock = 1;
val2.rechargeStock = 1;
val2.baseRechargeInterval = 7f;
val2.beginSkillCooldownOnSkillEnd = true;
val2.resetCooldownTimerOnUse = true;
val2.canceledFromSprinting = false;
val2.cancelSprintingOnActivation = false;
val2.hideStockCount = false;
val2.forceSprintDuringState = true;
val2.fullRestockOnAssign = false;
val2.interruptPriority = (InterruptPriority)0;
val2.isCombatSkill = true;
val2.mustKeyPress = true;
val2.autoHandleLuminousShot = true;
val2.requiredStock = 1;
val2.stockToConsume = 1;
val2.icon = jakakaassets.LoadAsset<Sprite>("Jackpot.png");
val2.skillDescriptionToken = "JACKPOT_DESCRIPTION";
val2.skillName = "Jackpot";
val2.skillNameToken = "JACKPOT_NAME";
ContentAddition.AddSkillDef(val2);
SkillLocator component = val.GetComponent<SkillLocator>();
SkillFamily skillFamily = component.utility.skillFamily;
Array.Resize(ref skillFamily.variants, skillFamily.variants.Length + 1);
Variant[] variants = skillFamily.variants;
int num = skillFamily.variants.Length - 1;
Variant val3 = new Variant
{
skillDef = val2,
unlockableName = ""
};
((Variant)(ref val3)).viewableNode = new Node(val2.skillNameToken, true, (Node)null);
variants[num] = val3;
}
private void AddLunarSeveranceSkill()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_0046: 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_00a0: Unknown result type (might be due to invalid IL or missing references)
//IL_0140: Unknown result type (might be due to invalid IL or missing references)
//IL_0164: Unknown result type (might be due to invalid IL or missing references)
//IL_016e: Expected O, but got Unknown
//IL_016f: Unknown result type (might be due to invalid IL or missing references)
//IL_0171: Unknown result type (might be due to invalid IL or missing references)
GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Merc/MercBody.prefab").WaitForCompletion();
LanguageAPI.Add("MERC_DETONATE_NAME", "Lunar Severance");
LanguageAPI.Add("MERC_DETONATE_DESCRIPTION", "Spawn Lunar Pillars on <style=cIsUtility>Exposed</style> enemies for <style=cIsDamage>6x350% damage</style> each");
SkillDef val2 = (SkillDef)(object)ScriptableObject.CreateInstance<LunarSeveranceIsReady>();
val2.activationState = new SerializableEntityStateType(typeof(LunarSeverance.MyEntityStates.LunarSeverance));
val2.activationStateMachineName = "Weapon";
val2.baseMaxStock = 1;
val2.rechargeStock = 1;
val2.baseRechargeInterval = 18f;
val2.beginSkillCooldownOnSkillEnd = true;
val2.resetCooldownTimerOnUse = true;
val2.canceledFromSprinting = false;
val2.cancelSprintingOnActivation = false;
val2.hideStockCount = false;
val2.fullRestockOnAssign = false;
val2.interruptPriority = (InterruptPriority)0;
val2.isCombatSkill = true;
val2.mustKeyPress = true;
val2.autoHandleLuminousShot = true;
val2.requiredStock = 1;
val2.stockToConsume = 1;
val2.icon = jakakaassets.LoadAsset<Sprite>("LunarSeverance.png");
val2.skillDescriptionToken = "MERC_DETONATE_DESCRIPTION";
val2.skillName = "Lunar Severance";
val2.skillNameToken = "MERC_DETONATE_NAME";
ContentAddition.AddSkillDef(val2);
SkillLocator component = val.GetComponent<SkillLocator>();
SkillFamily skillFamily = component.special.skillFamily;
Array.Resize(ref skillFamily.variants, skillFamily.variants.Length + 1);
Variant[] variants = skillFamily.variants;
int num = skillFamily.variants.Length - 1;
Variant val3 = new Variant
{
skillDef = val2,
unlockableName = ""
};
((Variant)(ref val3)).viewableNode = new Node(val2.skillNameToken, true, (Node)null);
variants[num] = val3;
}
}
}
namespace Molotov.MyEntityStates
{
public class Molotov : BaseSkillState
{
public float baseDuration = 0.5f;
private float duration;
private GameObject gameObject = LegacyResourcesAPI.Load<GameObject>("Prefabs/Projectiles/MolotovClusterProjectile");
public override void OnEnter()
{
//IL_001c: Unknown result type (might be due to invalid IL or missing references)
//IL_0021: Unknown result type (might be due to invalid IL or missing references)
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
//IL_007a: Unknown result type (might be due to invalid IL or missing references)
//IL_0081: Unknown result type (might be due to invalid IL or missing references)
//IL_0086: Unknown result type (might be due to invalid IL or missing references)
((BaseState)this).OnEnter();
duration = baseDuration / ((BaseState)this).attackSpeedStat;
Ray aimRay = ((BaseState)this).GetAimRay();
((BaseState)this).StartAimMode(aimRay, 2f, false);
((EntityState)this).PlayAnimation("Gesture, Additive", "SlashBlade", "SlashBlade.playbackRate", duration, 0f);
Util.PlaySound("bandit_shift_land_01", ((EntityState)this).gameObject);
if (((EntityState)this).isAuthority)
{
ProjectileManager.instance.FireProjectile(gameObject, ((Ray)(ref aimRay)).origin, Quaternion.LookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, ((EntityState)this).characterBody.damage * 0.8f, 0f, Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f);
}
}
public override void OnExit()
{
((EntityState)this).OnExit();
}
public override void FixedUpdate()
{
((EntityState)this).FixedUpdate();
if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
{
((EntityState)this).outer.SetNextStateToMain();
}
}
public override InterruptPriority GetMinimumInterruptPriority()
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
return (InterruptPriority)1;
}
}
}
namespace Marshall.MyEntityStates
{
public class Marshall : BaseSkillState
{
public float baseDuration = 0.25f;
private float duration;
private Ray aimRay;
public static GameObject effectPrefab;
public static GameObject hitEffectPrefab;
public static GameObject tracerEffectPrefab;
public override void OnEnter()
{
//IL_001d: Unknown result type (might be due to invalid IL or missing references)
//IL_0022: Unknown result type (might be due to invalid IL or missing references)
//IL_0029: Unknown result type (might be due to invalid IL or missing references)
((BaseState)this).OnEnter();
duration = baseDuration / ((BaseState)this).attackSpeedStat;
aimRay = ((BaseState)this).GetAimRay();
((BaseState)this).StartAimMode(aimRay, 2f, true);
((EntityState)this).PlayAnimation("Gesture Additive, Left", FirePistol2.FirePistolLeftStateHash);
FireBullet("MuzzleLeft");
((EntityState)this).PlayAnimation("Gesture Additive, Right", FirePistol2.FirePistolRightStateHash);
FireBullet("MuzzleRight");
}
private void FireBullet(string targetMuzzle)
{
//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_006f: 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_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_0093: 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_00a9: Unknown result type (might be due to invalid IL or missing references)
//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
//IL_00d3: 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_00f5: Unknown result type (might be due to invalid IL or missing references)
//IL_00f7: 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_010e: Unknown result type (might be due to invalid IL or missing references)
//IL_0119: Unknown result type (might be due to invalid IL or missing references)
//IL_0125: Unknown result type (might be due to invalid IL or missing references)
//IL_012c: Unknown result type (might be due to invalid IL or missing references)
//IL_0137: Unknown result type (might be due to invalid IL or missing references)
//IL_0138: Unknown result type (might be due to invalid IL or missing references)
//IL_013d: Unknown result type (might be due to invalid IL or missing references)
//IL_0142: Unknown result type (might be due to invalid IL or missing references)
//IL_0149: Unknown result type (might be due to invalid IL or missing references)
Util.PlaySound(FirePistol2.firePistolSoundString, ((EntityState)this).gameObject);
if (Object.op_Implicit((Object)(object)FirePistol2.muzzleEffectPrefab))
{
EffectManager.SimpleMuzzleFlash(FirePistol2.muzzleEffectPrefab, ((EntityState)this).gameObject, targetMuzzle, false);
}
((BaseState)this).AddRecoil(-7f, -12f, -7f, 7f);
if (((EntityState)this).isAuthority)
{
new BulletAttack
{
owner = ((EntityState)this).gameObject,
weapon = ((EntityState)this).gameObject,
origin = ((Ray)(ref aimRay)).origin,
aimVector = ((Ray)(ref aimRay)).direction,
minSpread = 1f,
maxSpread = ((EntityState)this).characterBody.spreadBloomAngle + 2f,
bulletCount = 16u,
procCoefficient = 0.2f,
damage = ((EntityState)this).characterBody.damage * 0.25f,
force = 4f,
falloffModel = (FalloffModel)1,
tracerEffectPrefab = FirePistol2.tracerEffectPrefab,
muzzleName = targetMuzzle,
hitEffectPrefab = FirePistol2.hitEffectPrefab,
isCrit = ((BaseState)this).RollCrit(),
HitEffectNormal = false,
radius = 0.1f,
stopperMask = CommonMasks.bullet,
smartCollision = true,
maxDistance = 1500f
}.Fire();
}
}
public override void FixedUpdate()
{
((EntityState)this).FixedUpdate();
if (!(((EntityState)this).fixedAge < duration) && ((EntityState)this).isAuthority)
{
if (((BaseSkillState)this).activatorSkillSlot.stock <= 0)
{
((EntityState)this).outer.SetNextState((EntityState)(object)new ReloadPistols());
}
else
{
((EntityState)this).outer.SetNextStateToMain();
}
}
}
public override InterruptPriority GetMinimumInterruptPriority()
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
return (InterruptPriority)1;
}
}
public class ReloadPistols : GenericReload
{
private static int ReloadPistolsStateHash = Animator.StringToHash("ReloadPistols");
private static int ReloadPistolsParamHash = Animator.StringToHash("ReloadPistols.playbackRate");
private static int ReloadPistolsExitStateHash = Animator.StringToHash("ReloadPistolsExit");
public override void OnEnter()
{
((GenericReload)this).OnEnter();
Util.PlaySound("Play_bandit2_R_load", ((EntityState)this).gameObject);
((EntityState)this).PlayAnimation("Gesture, Override", ReloadPistolsStateHash, ReloadPistolsParamHash, base.duration);
((EntityState)this).PlayAnimation("Gesture, Additive", ReloadPistolsStateHash, ReloadPistolsParamHash, base.duration);
Transform val = ((BaseState)this).FindModelChild("GunMeshL");
if ((Object)(object)val != (Object)null)
{
((Component)val).gameObject.SetActive(false);
}
Transform val2 = ((BaseState)this).FindModelChild("GunMeshR");
if (!((Object)(object)val2 == (Object)null))
{
((Component)val2).gameObject.SetActive(false);
}
}
public override void OnExit()
{
Transform val = ((BaseState)this).FindModelChild("ReloadFXL");
if ((Object)(object)val != (Object)null)
{
((Component)val).gameObject.SetActive(false);
}
Transform val2 = ((BaseState)this).FindModelChild("ReloadFXR");
if ((Object)(object)val2 != (Object)null)
{
((Component)val2).gameObject.SetActive(false);
}
Transform val3 = ((BaseState)this).FindModelChild("GunMeshL");
if ((Object)(object)val3 != (Object)null)
{
((Component)val3).gameObject.SetActive(true);
}
Transform val4 = ((BaseState)this).FindModelChild("GunMeshR");
if ((Object)(object)val4 != (Object)null)
{
((Component)val4).gameObject.SetActive(true);
}
((EntityState)this).PlayAnimation("Gesture, Override", ReloadPistolsExitStateHash);
((EntityState)this).PlayAnimation("Gesture, Additive", ReloadPistolsExitStateHash);
((GenericReload)this).OnExit();
}
}
}
namespace LunarSeverance.MyEntityStates
{
public class LunarSeverance : BaseState
{
public static float baseDuration = 0.67f;
public static float procCoefficient = 0.5f;
public static float detonationInterval;
public static GameObject detonationEffectPrefab;
public static GameObject orbEffectPrefab;
public static GameObject enterEffectPrefab;
public static string enterSoundString;
[SerializeField]
public string animationLayerName;
[SerializeField]
public string animationStateName;
[SerializeField]
public string playbackRateParam;
private float duration;
public override void OnEnter()
{
//IL_0025: Unknown result type (might be due to invalid IL or missing references)
//IL_002a: Unknown result type (might be due to invalid IL or missing references)
((BaseState)this).OnEnter();
duration = baseDuration / base.attackSpeedStat;
EffectManager.SimpleImpactEffect(enterEffectPrefab, ((EntityState)this).characterBody.corePosition, Vector3.up, false);
Util.PlaySound(enterSoundString, ((EntityState)this).gameObject);
SpawnProjectilesOnExposedEnemies();
}
public override void FixedUpdate()
{
((EntityState)this).FixedUpdate();
if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration)
{
((EntityState)this).outer.SetNextStateToMain();
}
}
private void SpawnProjectilesOnExposedEnemies()
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_002a: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: Unknown result type (might be due to invalid IL or missing references)
//IL_0042: Unknown result type (might be due to invalid IL or missing references)
//IL_0044: 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_004b: Unknown result type (might be due to invalid IL or missing references)
//IL_0050: Unknown result type (might be due to invalid IL or missing references)
//IL_0055: Unknown result type (might be due to invalid IL or missing references)
//IL_005a: Unknown result type (might be due to invalid IL or missing references)
//IL_0061: Unknown result type (might be due to invalid IL or missing references)
//IL_0066: Unknown result type (might be due to invalid IL or missing references)
//IL_006c: Expected O, but got Unknown
//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)
BullseyeSearch val = new BullseyeSearch
{
filterByDistinctEntity = true,
filterByLoS = false,
maxDistanceFilter = float.PositiveInfinity,
minDistanceFilter = 0f,
minAngleFilter = 0f,
maxAngleFilter = 180f,
sortMode = (SortMode)1,
teamMaskFilter = TeamMask.GetUnprotectedTeams(((BaseState)this).GetTeam()),
searchOrigin = ((EntityState)this).characterBody.corePosition
};
val.RefreshCandidates();
val.FilterOutGameObject(((EntityState)this).gameObject);
HurtBox[] array = val.GetResults().ToArray();
GameObject val2 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Brother/BrotherUltLineProjectileRotateLeft.prefab").WaitForCompletion();
if (!Object.op_Implicit((Object)(object)val2))
{
return;
}
HurtBox[] array2 = array;
foreach (HurtBox val3 in array2)
{
if (Object.op_Implicit((Object)(object)val3.healthComponent?.body) && val3.healthComponent.body.GetBuffCount(Buffs.MercExpose) > 0)
{
val3.healthComponent.body.RemoveBuff(Buffs.MercExpose);
FireProjectilesInCircle(val3.healthComponent.body, val2);
}
}
}
private void FireProjectilesInCircle(CharacterBody target, GameObject projectilePrefab)
{
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_003e: 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_004b: Unknown result type (might be due to invalid IL or missing references)
//IL_004c: Unknown result type (might be due to invalid IL or missing references)
if (Object.op_Implicit((Object)(object)target))
{
int num = 6;
float num2 = 360f / (float)num;
Vector3 corePosition = target.corePosition;
for (int i = 0; i < num; i++)
{
float num3 = (float)i * num2;
Quaternion val = Quaternion.Euler(0f, num3, 0f);
ProjectileManager.instance.FireProjectile(projectilePrefab, corePosition, val, ((EntityState)this).gameObject, ((EntityState)this).characterBody.damage * 3.5f, 0f, Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f);
}
}
}
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)1;
}
}
public class LunarSeveranceIsReady : SkillDef
{
protected class InstanceData : BaseSkillInstanceData
{
public CharacterBody characterBody;
}
public float searchRadius = float.PositiveInfinity;
public override BaseSkillInstanceData OnAssigned([NotNull] GenericSkill skillSlot)
{
return (BaseSkillInstanceData)(object)new InstanceData
{
characterBody = ((Component)skillSlot).GetComponent<CharacterBody>()
};
}
private static bool HasExposedTarget([NotNull] GenericSkill skillSlot)
{
//IL_0029: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Unknown result type (might be due to invalid IL or missing references)
//IL_004f: Unknown result type (might be due to invalid IL or missing references)
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
CharacterBody characterBody = ((InstanceData)(object)skillSlot.skillInstanceData).characterBody;
if (!Object.op_Implicit((Object)(object)characterBody))
{
return false;
}
TeamIndex teamIndex = characterBody.teamComponent.teamIndex;
foreach (CharacterBody readOnlyInstances in CharacterBody.readOnlyInstancesList)
{
if (readOnlyInstances.teamComponent.teamIndex != teamIndex && readOnlyInstances.HasBuff(Buffs.MercExpose))
{
return true;
}
}
return false;
}
public override bool CanExecute([NotNull] GenericSkill skillSlot)
{
return HasExposedTarget(skillSlot) && ((SkillDef)this).CanExecute(skillSlot);
}
public override bool IsReady([NotNull] GenericSkill skillSlot)
{
return ((SkillDef)this).IsReady(skillSlot) && HasExposedTarget(skillSlot);
}
}
}
namespace Jackpot.MyEntityStates
{
public class Jackpot : BaseState
{
private static GameObject DistortionObject;
private static GameObject DashObject;
private float duration = 1.2f;
private float dashSpeedMultiplier = 5.5f;
private float airControlMult = 5f;
private float jumpHeightMultiplier = 1.75f;
public float nextSlashTime;
private float hitRadius = 7f;
private AimRequest aimRequest;
private CharacterModel characterModel;
private Transform modelTransform;
private Animator animator;
public override void OnEnter()
{
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0012: Unknown result type (might be due to invalid IL or missing references)
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_0029: Unknown result type (might be due to invalid IL or missing references)
((BaseState)this).OnEnter();
DistortionObject = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Junk/Merc/ImpactMercSwing.prefab").WaitForCompletion();
DashObject = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Merc/OmniImpactVFXSlashMercEvis.prefab").WaitForCompletion();
modelTransform = ((EntityState)this).GetModelTransform();
if (Object.op_Implicit((Object)(object)modelTransform))
{
animator = ((Component)modelTransform).GetComponent<Animator>();
characterModel = ((Component)modelTransform).GetComponent<CharacterModel>();
}
if (Object.op_Implicit((Object)(object)characterModel))
{
CharacterModel obj = characterModel;
obj.invisibilityCount++;
}
if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams))
{
aimRequest = ((EntityState)this).cameraTargetParams.RequestAimType((AimType)2);
}
if (NetworkServer.active)
{
((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility);
}
CharacterBody characterBody = ((EntityState)this).characterBody;
characterBody.baseJumpPower *= jumpHeightMultiplier;
CharacterBody characterBody2 = ((EntityState)this).characterBody;
characterBody2.baseMoveSpeed *= dashSpeedMultiplier;
CharacterMotor characterMotor = ((EntityState)this).characterMotor;
characterMotor.airControl *= airControlMult;
((EntityState)this).gameObject.layer = LayerIndex.fakeActor.intVal;
((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers();
}
public override void FixedUpdate()
{
((EntityState)this).FixedUpdate();
if (((EntityState)this).fixedAge >= nextSlashTime)
{
SpawnDistortionEffect();
nextSlashTime = ((EntityState)this).fixedAge + 1f / 15f / (base.moveSpeedStat / 10.15f);
}
if (((EntityState)this).fixedAge >= duration)
{
((EntityState)this).outer.SetNextStateToMain();
}
}
public override void OnExit()
{
if (Object.op_Implicit((Object)(object)characterModel))
{
CharacterModel obj = characterModel;
obj.invisibilityCount--;
}
if (aimRequest != null)
{
aimRequest.Dispose();
}
if (NetworkServer.active)
{
((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility);
}
CharacterBody characterBody = ((EntityState)this).characterBody;
characterBody.baseJumpPower /= jumpHeightMultiplier;
CharacterBody characterBody2 = ((EntityState)this).characterBody;
characterBody2.baseMoveSpeed /= dashSpeedMultiplier;
CharacterMotor characterMotor = ((EntityState)this).characterMotor;
characterMotor.airControl /= airControlMult;
((EntityState)this).gameObject.layer = LayerIndex.defaultLayer.intVal;
((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers();
((EntityState)this).OnExit();
}
private void SpawnDistortionEffect()
{
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_0019: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: Unknown result type (might be due to invalid IL or missing references)
//IL_002b: Unknown result type (might be due to invalid IL or missing references)
//IL_0045: Unknown result type (might be due to invalid IL or missing references)
//IL_004a: Unknown result type (might be due to invalid IL or missing references)
//IL_0050: Expected O, but got Unknown
if (Object.op_Implicit((Object)(object)DistortionObject))
{
EffectData val = new EffectData
{
origin = ((EntityState)this).characterBody.corePosition,
rotation = Quaternion.Euler(0f, Random.Range(0f, 360f), 0f)
};
Util.PlaySound(WhirlwindBase.attackSoundString, ((EntityState)this).gameObject);
EffectManager.SpawnEffect(DistortionObject, val, true);
EffectManager.SpawnEffect(DashObject, val, true);
Damage();
}
}
private void Damage()
{
//IL_0013: Unknown result type (might be due to invalid IL or missing references)
//IL_0018: Unknown result type (might be due to invalid IL or missing references)
//IL_0024: 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_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_003c: 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_0048: Unknown result type (might be due to invalid IL or missing references)
//IL_004d: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
//IL_0070: 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_0084: Unknown result type (might be due to invalid IL or missing references)
//IL_0089: Unknown result type (might be due to invalid IL or missing references)
//IL_008e: Unknown result type (might be due to invalid IL or missing references)
if (((EntityState)this).isAuthority)
{
new BlastAttack
{
attacker = ((EntityState)this).gameObject,
inflictor = ((EntityState)this).gameObject,
teamIndex = ((BaseState)this).GetTeam(),
position = ((EntityState)this).characterBody.corePosition,
radius = hitRadius,
baseDamage = ((EntityState)this).characterBody.damage * 0.5f,
procCoefficient = 2f / 3f,
falloffModel = (FalloffModel)0,
damageType = DamageTypeCombo.op_Implicit((DamageType)0)
}.Fire();
}
}
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)1;
}
}
}
namespace DimensionSlash.MyEntityStates
{
public class DimensionSlash : BaseState
{
private static GameObject DistortionObject;
private static GameObject SlashEffect;
private static GameObject SlashEffect2;
private float duration = 2.5f;
private int totalSlashes = 50;
private int slashesSpawned = 0;
private float slashInterval = 0.05f;
private float nextSlashTime = 0f;
private AimRequest aimRequest;
private CharacterModel characterModel;
private Transform modelTransform;
private Animator animator;
public override void OnEnter()
{
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0012: Unknown result type (might be due to invalid IL or missing references)
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_0029: Unknown result type (might be due to invalid IL or missing references)
//IL_003b: Unknown result type (might be due to invalid IL or missing references)
//IL_0040: Unknown result type (might be due to invalid IL or missing references)
((BaseState)this).OnEnter();
DistortionObject = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Junk/Merc/ImpactMercSwing.prefab").WaitForCompletion();
SlashEffect = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Merc/MercSwordFinisherSlash.prefab").WaitForCompletion();
SlashEffect2 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Merc/OmniImpactVFXSlashMercEvis.prefab").WaitForCompletion();
nextSlashTime = ((EntityState)this).fixedAge + slashInterval;
modelTransform = ((EntityState)this).GetModelTransform();
if (Object.op_Implicit((Object)(object)modelTransform))
{
animator = ((Component)modelTransform).GetComponent<Animator>();
characterModel = ((Component)modelTransform).GetComponent<CharacterModel>();
}
if (Object.op_Implicit((Object)(object)characterModel))
{
CharacterModel obj = characterModel;
obj.invisibilityCount++;
}
if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams))
{
aimRequest = ((EntityState)this).cameraTargetParams.RequestAimType((AimType)2);
}
if (NetworkServer.active)
{
((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility);
CharacterBody characterBody = ((EntityState)this).characterBody;
characterBody.moveSpeed *= 0f;
((EntityState)this).gameObject.layer = LayerIndex.fakeActor.intVal;
((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers();
}
}
public override void FixedUpdate()
{
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_0013: Unknown result type (might be due to invalid IL or missing references)
((EntityState)this).FixedUpdate();
((EntityState)this).characterMotor.velocity = Vector3.zero;
if (slashesSpawned < totalSlashes && ((EntityState)this).fixedAge >= nextSlashTime)
{
SpawnRandomSlash();
nextSlashTime = ((EntityState)this).fixedAge + slashInterval;
slashesSpawned++;
}
if (((EntityState)this).fixedAge >= duration)
{
((EntityState)this).outer.SetNextStateToMain();
}
}
public override void OnExit()
{
modelTransform = ((EntityState)this).GetModelTransform();
if (Object.op_Implicit((Object)(object)modelTransform))
{
TemporaryOverlayInstance val = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject);
val.duration = 0.6f;
val.animateShaderAlpha = true;
val.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f);
val.destroyComponentOnEnd = true;
val.originalMaterial = LegacyResourcesAPI.Load<Material>("Materials/matMercEvisTarget");
val.AddToCharacterModel(((Component)modelTransform).GetComponent<CharacterModel>());
TemporaryOverlayInstance val2 = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject);
val2.duration = 0.7f;
val2.animateShaderAlpha = true;
val2.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f);
val2.destroyComponentOnEnd = true;
val2.originalMaterial = LegacyResourcesAPI.Load<Material>("Materials/matHuntressFlashExpanded");
val2.AddToCharacterModel(((Component)modelTransform).GetComponent<CharacterModel>());
}
if (Object.op_Implicit((Object)(object)characterModel))
{
CharacterModel obj = characterModel;
obj.invisibilityCount--;
}
AimRequest val3 = aimRequest;
if (val3 != null)
{
val3.Dispose();
}
if (NetworkServer.active)
{
((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility);
((EntityState)this).characterBody.AddTimedBuff(Buffs.HiddenInvincibility, Evis.lingeringInvincibilityDuration);
CharacterBody characterBody = ((EntityState)this).characterBody;
characterBody.moveSpeed *= 1f;
((EntityState)this).gameObject.layer = LayerIndex.defaultLayer.intVal;
((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers();
}
((EntityState)this).OnExit();
}
private void SpawnRandomSlash()
{
//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
//IL_00f4: 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_00fa: Unknown result type (might be due to invalid IL or missing references)
//IL_0102: Unknown result type (might be due to invalid IL or missing references)
//IL_0107: Unknown result type (might be due to invalid IL or missing references)
//IL_0108: Unknown result type (might be due to invalid IL or missing references)
//IL_010d: Unknown result type (might be due to invalid IL or missing references)
//IL_0115: Unknown result type (might be due to invalid IL or missing references)
//IL_011a: Unknown result type (might be due to invalid IL or missing references)
//IL_011b: Unknown result type (might be due to invalid IL or missing references)
//IL_0120: Unknown result type (might be due to invalid IL or missing references)
//IL_0128: Unknown result type (might be due to invalid IL or missing references)
//IL_012d: Unknown result type (might be due to invalid IL or missing references)
//IL_012e: Unknown result type (might be due to invalid IL or missing references)
//IL_0133: Unknown result type (might be due to invalid IL or missing references)
//IL_0135: Unknown result type (might be due to invalid IL or missing references)
//IL_013a: 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_0143: Unknown result type (might be due to invalid IL or missing references)
//IL_015d: Unknown result type (might be due to invalid IL or missing references)
//IL_0162: Unknown result type (might be due to invalid IL or missing references)
//IL_0169: Expected O, but got Unknown
//IL_0169: Unknown result type (might be due to invalid IL or missing references)
//IL_016e: Unknown result type (might be due to invalid IL or missing references)
//IL_016f: 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_0191: Unknown result type (might be due to invalid IL or missing references)
//IL_0196: Unknown result type (might be due to invalid IL or missing references)
//IL_019d: Expected O, but got Unknown
//IL_019d: Unknown result type (might be due to invalid IL or missing references)
//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
//IL_01a3: Unknown result type (might be due to invalid IL or missing references)
//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
//IL_01c5: Unknown result type (might be due to invalid IL or missing references)
//IL_01ca: Unknown result type (might be due to invalid IL or missing references)
//IL_01d1: Expected O, but got Unknown
//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_01d7: 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_01f9: Unknown result type (might be due to invalid IL or missing references)
//IL_01fe: Unknown result type (might be due to invalid IL or missing references)
//IL_0205: Expected O, but got Unknown
//IL_024f: Unknown result type (might be due to invalid IL or missing references)
//IL_0258: Unknown result type (might be due to invalid IL or missing references)
if (Object.op_Implicit((Object)(object)SlashEffect))
{
Vector3 val = default(Vector3);
((Vector3)(ref val))..ctor(Random.Range(-13.5f, 13.5f), Random.Range(-13.5f, 13.5f), Random.Range(-13.5f, 13.5f));
Vector3 val2 = default(Vector3);
((Vector3)(ref val2))..ctor(Random.Range(-11f, 11f), Random.Range(-11f, 11f), Random.Range(-11f, 11f));
Vector3 val3 = default(Vector3);
((Vector3)(ref val3))..ctor(Random.Range(-9.5f, 9.5f), Random.Range(-9.5f, 9.5f), Random.Range(-9.5f, 9.5f));
Vector3 val4 = default(Vector3);
((Vector3)(ref val4))..ctor(Random.Range(-12.5f, 12.5f), Random.Range(-12.5f, 12.5f), Random.Range(-12.5f, 12.5f));
Vector3 val5 = ((EntityState)this).characterBody.corePosition + val;
Vector3 val6 = ((EntityState)this).characterBody.corePosition + val2;
Vector3 origin = ((EntityState)this).characterBody.corePosition + val3;
Vector3 origin2 = ((EntityState)this).characterBody.corePosition + val4;
EffectData val7 = new EffectData
{
origin = val5,
rotation = Quaternion.Euler(0f, Random.Range(0f, 360f), 0f)
};
EffectData val8 = new EffectData
{
origin = val6,
rotation = Quaternion.Euler(0f, Random.Range(0f, 360f), 0f)
};
EffectData val9 = new EffectData
{
origin = origin,
rotation = Quaternion.Euler(0f, Random.Range(0f, 360f), 0f)
};
EffectData val10 = new EffectData
{
origin = origin2,
rotation = Quaternion.Euler(0f, Random.Range(0f, 360f), 0f)
};
EffectManager.SpawnEffect(SlashEffect, val7, true);
EffectManager.SpawnEffect(SlashEffect2, val8, true);
EffectManager.SpawnEffect(DistortionObject, val9, true);
EffectManager.SpawnEffect(DistortionObject, val10, true);
Util.PlaySound(WhirlwindBase.attackSoundString, ((EntityState)this).gameObject);
DealDamage(val5);
DealDamage(val6);
}
}
private void DealDamage(Vector3 position)
{
//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_0021: Unknown result type (might be due to invalid IL or missing references)
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_002f: Unknown result type (might be due to invalid IL or missing references)
//IL_0034: 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_003a: Unknown result type (might be due to invalid IL or missing references)
//IL_003b: Unknown result type (might be due to invalid IL or missing references)
//IL_0040: Unknown result type (might be due to invalid IL or missing references)
//IL_0057: 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_006d: Unknown result type (might be due to invalid IL or missing references)
//IL_006f: Unknown result type (might be due to invalid IL or missing references)
//IL_0074: 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_007b: Unknown result type (might be due to invalid IL or missing references)
//IL_0080: Unknown result type (might be due to invalid IL or missing references)
if (((EntityState)this).isAuthority)
{
new BlastAttack
{
attacker = ((EntityState)this).gameObject,
inflictor = ((EntityState)this).gameObject,
teamIndex = ((BaseState)this).GetTeam(),
position = position,
baseDamage = ((EntityState)this).characterBody.damage * 1f,
radius = 7.5f,
procCoefficient = 0.25f,
falloffModel = (FalloffModel)0,
damageType = DamageTypeCombo.op_Implicit((DamageType)0)
}.Fire();
}
}
public override InterruptPriority GetMinimumInterruptPriority()
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
return (InterruptPriority)2;
}
}
}
namespace Blunderbuss.MyEntityStates
{
public class Blunderbuss : BaseSkillState
{
public float baseDuration = 0.25f;
private float duration;
private float spreadMult;
private float recoilMult;
private float distanceMult;
private uint bulletAmount;
public GameObject crosshairOverridePrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Bandit2/Bandit2Crosshair.prefab").WaitForCompletion();
private Animator animator;
private int bodyMainWeaponLayerIndex;
public GameObject hitEffectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Bandit2/HitsparkBandit.prefab").WaitForCompletion();
public GameObject tracerEffectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Bandit2/TracerBandit2Shotgun.prefab").WaitForCompletion();
public GameObject baseSidearmState = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Bandit2/EntityStates.Bandit2.Weapon.Bandit2FireRifle.asset").WaitForCompletion();
public override void OnEnter()
{
//IL_0065: Unknown result type (might be due to invalid IL or missing references)
//IL_006a: Unknown result type (might be due to invalid IL or missing references)
//IL_007d: Unknown result type (might be due to invalid IL or missing references)
//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
//IL_0107: Unknown result type (might be due to invalid IL or missing references)
//IL_0113: Unknown result type (might be due to invalid IL or missing references)
//IL_0116: Unknown result type (might be due to invalid IL or missing references)
//IL_011b: Unknown result type (might be due to invalid IL or missing references)
//IL_0120: Unknown result type (might be due to invalid IL or missing references)
//IL_0123: Unknown result type (might be due to invalid IL or missing references)
//IL_012e: Unknown result type (might be due to invalid IL or missing references)
//IL_0139: Unknown result type (might be due to invalid IL or missing references)
//IL_0157: Unknown result type (might be due to invalid IL or missing references)
//IL_0163: Unknown result type (might be due to invalid IL or missing references)
//IL_016e: Unknown result type (might be due to invalid IL or missing references)
//IL_0185: Unknown result type (might be due to invalid IL or missing references)
//IL_0190: Unknown result type (might be due to invalid IL or missing references)
//IL_0192: Unknown result type (might be due to invalid IL or missing references)
//IL_0197: Unknown result type (might be due to invalid IL or missing references)
//IL_01a3: Unknown result type (might be due to invalid IL or missing references)
//IL_01ae: Unknown result type (might be due to invalid IL or missing references)
//IL_01ba: Unknown result type (might be due to invalid IL or missing references)
//IL_01c6: Unknown result type (might be due to invalid IL or missing references)
//IL_01cd: Unknown result type (might be due to invalid IL or missing references)
//IL_01ce: Unknown result type (might be due to invalid IL or missing references)
//IL_01d3: 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_01db: Unknown result type (might be due to invalid IL or missing references)
//IL_01e0: Unknown result type (might be due to invalid IL or missing references)
//IL_01e7: Unknown result type (might be due to invalid IL or missing references)
((BaseState)this).OnEnter();
GetStock();
duration = baseDuration / ((BaseState)this).attackSpeedStat;
animator = ((EntityState)this).GetModelAnimator();
bodyMainWeaponLayerIndex = animator.GetLayerIndex("Body, MainWeapon");
((EntityState)this).PlayAnimation("Gesture, Additive", "FireMainWeapon", "FireMainWeapon.playbackRate", 0.5f, 0f);
Ray aimRay = ((BaseState)this).GetAimRay();
Util.PlaySound("Play_bandit2_m1_rifle", ((EntityState)this).gameObject);
((BaseState)this).StartAimMode(aimRay, 2f, false);
((BaseState)this).AddRecoil(-24f * recoilMult, -32f * recoilMult, -12f * recoilMult, 12f * recoilMult);
if (Object.op_Implicit((Object)(object)FireBarrage.effectPrefab))
{
EffectManager.SimpleMuzzleFlash(FireBarrage.effectPrefab, ((EntityState)this).gameObject, "MuzzleRight", false);
}
if (((EntityState)this).isAuthority)
{
BulletAttack val = new BulletAttack
{
owner = ((EntityState)this).gameObject,
weapon = ((EntityState)this).gameObject,
origin = ((Ray)(ref aimRay)).origin,
aimVector = ((Ray)(ref aimRay)).direction,
minSpread = 1f,
maxSpread = (((EntityState)this).characterBody.spreadBloomAngle + 3f) * spreadMult,
bulletCount = bulletAmount,
procCoefficient = 0.25f,
damage = ((EntityState)this).characterBody.damage * 0.8f,
force = 32f,
falloffModel = (FalloffModel)1,
tracerEffectPrefab = tracerEffectPrefab,
muzzleName = "MuzzleShotgun",
hitEffectPrefab = hitEffectPrefab,
isCrit = ((BaseState)this).RollCrit(),
HitEffectNormal = false
};
LayerIndex world = LayerIndex.world;
val.stopperMask = ((LayerIndex)(ref world)).mask;
val.smartCollision = true;
val.maxDistance = 800f * distanceMult;
val.Fire();
}
}
private void GetStock()
{
int num = ((BaseSkillState)this).activatorSkillSlot.stock - 1;
switch (num)
{
case -4:
spreadMult = 0.2f;
recoilMult = 0.33f;
distanceMult = 0.33f;
bulletAmount = 3u;
break;
case -3:
spreadMult = 0.45f;
recoilMult = 0.5f;
distanceMult = 0.5f;
bulletAmount = 7u;
break;
case -2:
spreadMult = 0.8f;
recoilMult = 0.8f;
distanceMult = 0.67f;
bulletAmount = 14u;
break;
default:
spreadMult = 1f;
recoilMult = 1f;
distanceMult = 1f;
bulletAmount = 24u;
break;
}
Console.WriteLine($"Effective stock: {num}, bulletAmount: {bulletAmount}");
}
public override void OnExit()
{
((EntityState)this).OnExit();
}
public override void FixedUpdate()
{
((EntityState)this).FixedUpdate();
if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
{
((EntityState)this).outer.SetNextStateToMain();
}
else if (((BaseSkillState)this).activatorSkillSlot.stock <= 0)
{
((BaseSkillState)this).activatorSkillSlot.stock = 0;
}
}
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)1;
}
}
}