using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using AncientScepter;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using DanteMod.Content.Components;
using DanteMod.Content.Survivors;
using DanteMod.Modules;
using EntityStates;
using EntityStates.AI;
using EntityStates.AI.Walker;
using EntityStates.AcidLarva;
using EntityStates.BeetleGuardMonster;
using EntityStates.BeetleMonster;
using EntityStates.Bison;
using EntityStates.BrotherMonster;
using EntityStates.ClayBruiser.Weapon;
using EntityStates.ClayGrenadier;
using EntityStates.Commando.CommandoWeapon;
using EntityStates.Croco;
using EntityStates.Drone.DroneWeapon;
using EntityStates.ExtractorUnit;
using EntityStates.FalseSonBoss;
using EntityStates.GlobalSkills.LunarDetonator;
using EntityStates.GlobalSkills.LunarNeedle;
using EntityStates.GolemMonster;
using EntityStates.Halcyonite;
using EntityStates.JellyfishMonster;
using EntityStates.LemurianBruiserMonster;
using EntityStates.Mage.Weapon;
using EntityStates.MiniMushroom;
using EntityStates.Missions.BrotherEncounter;
using EntityStates.ParentMonster;
using EntityStates.SolusMine;
using EntityStates.SurvivorPod;
using EntityStates.VoidInfestor;
using EntityStates.WorkerUnit;
using HG;
using HG.BlendableTypes;
using HG.Reflection;
using HunkMod;
using HunkMod.Modules;
using HunkMod.Modules.Achievements;
using HunkMod.Modules.AchievementsRedux;
using HunkMod.Modules.Artifacts;
using HunkMod.Modules.Components;
using HunkMod.Modules.Components.UI;
using HunkMod.Modules.Enemies;
using HunkMod.Modules.Misc;
using HunkMod.Modules.Objectives;
using HunkMod.Modules.Survivors;
using HunkMod.Modules.Weapons;
using HunkMod.Modules.Weapons.Grenade;
using HunkMod.SkillStates;
using HunkMod.SkillStates.BaseStates;
using HunkMod.SkillStates.C4;
using HunkMod.SkillStates.Emote;
using HunkMod.SkillStates.Helicopter;
using HunkMod.SkillStates.Hunk;
using HunkMod.SkillStates.Hunk.Cling;
using HunkMod.SkillStates.Hunk.Counter;
using HunkMod.SkillStates.Hunk.Grenade;
using HunkMod.SkillStates.Hunk.Parry;
using HunkMod.SkillStates.Hunk.Pod;
using HunkMod.SkillStates.Hunk.Weapon.ATM;
using HunkMod.SkillStates.Hunk.Weapon.ATM2;
using HunkMod.SkillStates.Hunk.Weapon.AssaultRifle;
using HunkMod.SkillStates.Hunk.Weapon.Base;
using HunkMod.SkillStates.Hunk.Weapon.BlueRose;
using HunkMod.SkillStates.Hunk.Weapon.BroomHC;
using HunkMod.SkillStates.Hunk.Weapon.Colt;
using HunkMod.SkillStates.Hunk.Weapon.Flamethrower;
using HunkMod.SkillStates.Hunk.Weapon.GoldenGun;
using HunkMod.SkillStates.Hunk.Weapon.GrappleGun;
using HunkMod.SkillStates.Hunk.Weapon.GrenadeLauncher;
using HunkMod.SkillStates.Hunk.Weapon.M19;
using HunkMod.SkillStates.Hunk.Weapon.M3;
using HunkMod.SkillStates.Hunk.Weapon.MGL;
using HunkMod.SkillStates.Hunk.Weapon.MUP;
using HunkMod.SkillStates.Hunk.Weapon.Magnum;
using HunkMod.SkillStates.Hunk.Weapon.Minigun;
using HunkMod.SkillStates.Hunk.Weapon.PRL;
using HunkMod.SkillStates.Hunk.Weapon.RPG;
using HunkMod.SkillStates.Hunk.Weapon.Railgun;
using HunkMod.SkillStates.Hunk.Weapon.Revolver;
using HunkMod.SkillStates.Hunk.Weapon.RocketLauncher;
using HunkMod.SkillStates.Hunk.Weapon.SG09;
using HunkMod.SkillStates.Hunk.Weapon.SMG;
using HunkMod.SkillStates.Hunk.Weapon.SSG;
using HunkMod.SkillStates.Hunk.Weapon.ScanGun;
using HunkMod.SkillStates.Hunk.Weapon.Shotgun;
using HunkMod.SkillStates.Hunk.Weapon.Slugger;
using HunkMod.SkillStates.Hunk.Weapon.Sparkshot;
using HunkMod.SkillStates.Hunk.Weapon.StreetSweeper;
using HunkMod.SkillStates.Nemesis;
using HunkMod.SkillStates.Nemesis.Biomass;
using HunkMod.SkillStates.Nemesis.Charge;
using HunkMod.SkillStates.Nemesis.Execution;
using HunkMod.SkillStates.Nemesis.Leap;
using HunkMod.SkillStates.Nemesis.Melee;
using HunkMod.SkillStates.Nemesis.Tentacle;
using HunkMod.SkillStates.Parasite;
using HunkMod.SkillStates.Virus;
using HunkMusic;
using JetBrains.Annotations;
using KinematicCharacterController;
using MaterialHud;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using On.EntityStates;
using On.EntityStates.AI;
using On.EntityStates.AcidLarva;
using On.EntityStates.BeetleGuardMonster;
using On.EntityStates.BeetleMonster;
using On.EntityStates.Bison;
using On.EntityStates.BrotherMonster;
using On.EntityStates.ClayBruiser.Weapon;
using On.EntityStates.ClayGrenadier;
using On.EntityStates.ExtractorUnit;
using On.EntityStates.GlobalSkills.LunarDetonator;
using On.EntityStates.GlobalSkills.LunarNeedle;
using On.EntityStates.GolemMonster;
using On.EntityStates.Halcyonite;
using On.EntityStates.JellyfishMonster;
using On.EntityStates.LemurianBruiserMonster;
using On.EntityStates.MiniMushroom;
using On.EntityStates.Missions.BrotherEncounter;
using On.EntityStates.ParentMonster;
using On.EntityStates.SolusMine;
using On.EntityStates.WorkerUnit;
using On.RoR2;
using On.RoR2.CameraModes;
using On.RoR2.Projectile;
using On.RoR2.UI;
using On.RoR2.UI.LogBook;
using On.RoR2.UI.MainMenu;
using R2API;
using R2API.Networking;
using R2API.Networking.Interfaces;
using R2API.Utils;
using Rewired;
using Rewired.ComponentControls.Effects;
using Rewired.Utils;
using RiskOfOptions;
using RiskOfOptions.OptionConfigs;
using RiskOfOptions.Options;
using RoR2;
using RoR2.Achievements;
using RoR2.Audio;
using RoR2.CameraModes;
using RoR2.CharacterAI;
using RoR2.ContentManagement;
using RoR2.ExpansionManagement;
using RoR2.HudOverlay;
using RoR2.Items;
using RoR2.Navigation;
using RoR2.Networking;
using RoR2.Orbs;
using RoR2.Projectile;
using RoR2.Skills;
using RoR2.UI;
using RoR2.UI.LogBook;
using RoR2.UI.MainMenu;
using RobItems.Content;
using TMPro;
using ThreeEyedGames;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.EventSystems;
using UnityEngine.Events;
using UnityEngine.Networking;
using UnityEngine.Rendering;
using UnityEngine.Rendering.PostProcessing;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: OptIn]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("HunkMod")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+de73c50e55692bb4cd4e153e7c0a4f79f5bcb1f3")]
[assembly: AssemblyProduct("HunkMod")]
[assembly: AssemblyTitle("HunkMod")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: UnverifiableCode]
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 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);
}
}
internal enum HunkCameraParams
{
DEFAULT,
AIM,
AIM_SNIPER,
AIM_NEMI,
MELEE,
EMOTE,
FAR
}
public class HunkDeflectTracker : MonoBehaviour
{
}
public class StupidFuckingBullshit : MonoBehaviour
{
public ParticleSystem faggot;
private void Awake()
{
faggot = ((Component)this).GetComponentInChildren<ParticleSystem>();
((Component)faggot).transform.SetParent((Transform)null);
}
private void FixedUpdate()
{
//IL_0012: Unknown result type (might be due to invalid IL or missing references)
//IL_001d: Unknown result type (might be due to invalid IL or missing references)
((Component)faggot).transform.SetPositionAndRotation(((Component)this).transform.position, ((Component)this).transform.rotation);
}
private void OnDisable()
{
if (Object.op_Implicit((Object)(object)faggot))
{
((Component)faggot).gameObject.SetActive(false);
}
}
private void OnEnable()
{
if (Object.op_Implicit((Object)(object)faggot))
{
((Component)faggot).gameObject.SetActive(true);
}
}
}
[CreateAssetMenu(fileName = "wpn", menuName = "ScriptableObjects/WeaponDef", order = 1)]
public class HunkWeaponDef : ScriptableObject
{
public enum AnimationSet
{
Pistol,
SMG,
Rocket,
Unarmed,
Throwable,
PistolAlt,
Railgun,
Jacket
}
[Header("General")]
public string nameToken = "";
public string descriptionToken = "";
public Sprite icon = null;
public GameObject crosshairPrefab = null;
public int magSize = 8;
public float magPickupMultiplier = 1f;
public int startingMags = 1;
public float reloadDuration = 2.4f;
public string ammoName = "";
public bool allowAutoReload = true;
public bool exposeWeakPoints = true;
public bool roundReload = false;
public bool canPickUpAmmo = true;
public bool isInfinite = false;
public bool hasCrosshair = true;
[Header("Skills")]
public SkillDef primarySkillDef;
[Header("Visuals")]
public GameObject modelPrefab;
public AnimationSet animationSet = AnimationSet.SMG;
public bool storedOnBack = true;
public bool storedOnHolster = false;
public string aimSoundString = "sfx_hunk_smg_aim";
public string equipSoundString = "sfx_hunk_equip_smg";
[Header("UI")]
public float damageFillValue;
public float rangefillValue;
public float fireRateFillValue;
public float reloadFillValue;
public float accuracyFillValue;
[HideInInspector]
public ushort index;
[HideInInspector]
public ItemDef itemDef;
public static HunkWeaponDef CreateWeaponDefFromInfo(HunkWeaponDefInfo weaponDefInfo)
{
HunkWeaponDef hunkWeaponDef = (HunkWeaponDef)(object)ScriptableObject.CreateInstance(typeof(HunkWeaponDef));
((Object)hunkWeaponDef).name = weaponDefInfo.nameToken;
hunkWeaponDef.nameToken = weaponDefInfo.nameToken;
hunkWeaponDef.descriptionToken = weaponDefInfo.descriptionToken;
hunkWeaponDef.icon = weaponDefInfo.icon;
hunkWeaponDef.crosshairPrefab = weaponDefInfo.crosshairPrefab;
hunkWeaponDef.magSize = weaponDefInfo.magSize;
hunkWeaponDef.magPickupMultiplier = weaponDefInfo.magPickupMultiplier;
hunkWeaponDef.startingMags = weaponDefInfo.startingMags;
hunkWeaponDef.reloadDuration = weaponDefInfo.reloadDuration;
hunkWeaponDef.ammoName = weaponDefInfo.ammoName;
hunkWeaponDef.primarySkillDef = weaponDefInfo.primarySkillDef;
hunkWeaponDef.modelPrefab = weaponDefInfo.modelPrefab;
hunkWeaponDef.animationSet = weaponDefInfo.animationSet;
hunkWeaponDef.storedOnBack = weaponDefInfo.storedOnBack;
hunkWeaponDef.storedOnHolster = weaponDefInfo.storedOnHolster;
hunkWeaponDef.damageFillValue = weaponDefInfo.damageFillValue;
hunkWeaponDef.rangefillValue = weaponDefInfo.rangefillValue;
hunkWeaponDef.fireRateFillValue = weaponDefInfo.fireRateFillValue;
hunkWeaponDef.reloadFillValue = weaponDefInfo.reloadFillValue;
hunkWeaponDef.accuracyFillValue = weaponDefInfo.accuracyFillValue;
hunkWeaponDef.aimSoundString = weaponDefInfo.aimSoundString;
hunkWeaponDef.equipSoundString = weaponDefInfo.equipSoundString;
return hunkWeaponDef;
}
public HunkWeaponDef CloneWeapon(bool addToCatalog = true)
{
HunkWeaponDef hunkWeaponDef = Object.Instantiate<HunkWeaponDef>(this);
HunkWeaponCatalog.AddWeapon(hunkWeaponDef, addItem: false);
ContentAddition.AddItemDef(hunkWeaponDef.itemDef);
return hunkWeaponDef;
}
}
[Serializable]
public struct HunkWeaponDefInfo
{
public string nameToken;
public string descriptionToken;
public Sprite icon;
public GameObject crosshairPrefab;
public int magSize;
public float magPickupMultiplier;
public int startingMags;
public float reloadDuration;
public string ammoName;
public SkillDef primarySkillDef;
public GameObject modelPrefab;
public HunkWeaponDef.AnimationSet animationSet;
public bool storedOnBack;
public bool storedOnHolster;
public float damageFillValue;
public float rangefillValue;
public float fireRateFillValue;
public float reloadFillValue;
public float accuracyFillValue;
public string aimSoundString;
public string equipSoundString;
}
[CreateAssetMenu(fileName = "peanits", menuName = "ScriptableObjects/WeaponDef", order = 1)]
public class NemesisMutationDef : ScriptableObject
{
[Header("General")]
public string nameToken = "";
public string descriptionToken = "";
public Texture icon = null;
public int requiredLevel;
[HideInInspector]
public ushort index;
public static NemesisMutationDef CreateMutationDef(string nameString, string descString, int requiredLevel = 1, Texture icon = null)
{
NemesisMutationDef nemesisMutationDef = (NemesisMutationDef)(object)ScriptableObject.CreateInstance(typeof(NemesisMutationDef));
((Object)nemesisMutationDef).name = nameString;
nemesisMutationDef.nameToken = nameString;
nemesisMutationDef.descriptionToken = descString;
nemesisMutationDef.requiredLevel = requiredLevel;
nemesisMutationDef.icon = icon;
if ((Object)(object)nemesisMutationDef.icon == (Object)null)
{
nemesisMutationDef.icon = HunkAssets.mainAssetBundle.LoadAsset<Texture>("texNemesisPortrait");
}
NemesisMutationCatalog.AddMutation(nemesisMutationDef);
return nemesisMutationDef;
}
}
internal class BodyInfo
{
internal string bodyName = "";
internal string bodyNameToken = "";
internal string subtitleNameToken = "";
internal Color bodyColor = Color.white;
internal Texture characterPortrait = null;
internal GameObject crosshair = null;
internal GameObject podPrefab = null;
internal float maxHealth = 100f;
internal float healthGrowth = 2f;
internal float healthRegen = 0f;
internal float shield = 0f;
internal float shieldGrowth = 0f;
internal float moveSpeed = 7f;
internal float moveSpeedGrowth = 0f;
internal float acceleration = 80f;
internal float jumpPower = 15f;
internal float jumpPowerGrowth = 0f;
internal float damage = 12f;
internal float attackSpeed = 1f;
internal float attackSpeedGrowth = 0f;
internal float armor = 0f;
internal float armorGrowth = 0f;
internal float crit = 1f;
internal float critGrowth = 0f;
internal int jumpCount = 1;
}
internal class CustomRendererInfo
{
internal string childName;
internal Material material;
internal bool ignoreOverlays;
}
public class SkillDefInfo
{
public string skillName;
public string skillNameToken;
public string skillDescriptionToken;
public string[] keywordTokens = new string[0];
public Sprite skillIcon;
public SerializableEntityStateType activationState;
public InterruptPriority interruptPriority;
public string activationStateMachineName;
public float baseRechargeInterval;
public int baseMaxStock = 1;
public int rechargeStock = 1;
public int requiredStock = 1;
public int stockToConsume = 1;
public bool isCombatSkill = true;
public bool canceledFromSprinting;
public bool forceSprintDuringState;
public bool cancelSprintingOnActivation = true;
public bool beginSkillCooldownOnSkillEnd;
public bool fullRestockOnAssign = true;
public bool resetCooldownTimerOnUse;
public bool mustKeyPress;
public SkillDefInfo()
{
}
public SkillDefInfo(string skillName, string skillNameToken, string skillDescriptionToken, Sprite skillIcon, SerializableEntityStateType activationState, string activationStateMachineName, InterruptPriority interruptPriority, bool isCombatSkill, float baseRechargeInterval)
{
//IL_0063: Unknown result type (might be due to invalid IL or missing references)
//IL_0065: Unknown result type (might be due to invalid IL or missing references)
//IL_0073: Unknown result type (might be due to invalid IL or missing references)
//IL_0075: Unknown result type (might be due to invalid IL or missing references)
this.skillName = skillName;
this.skillNameToken = skillNameToken;
this.skillDescriptionToken = skillDescriptionToken;
this.skillIcon = skillIcon;
this.activationState = activationState;
this.activationStateMachineName = activationStateMachineName;
this.interruptPriority = interruptPriority;
this.isCombatSkill = isCombatSkill;
this.baseRechargeInterval = baseRechargeInterval;
}
public SkillDefInfo(string skillName, string skillNameToken, string skillDescriptionToken, Sprite skillIcon, SerializableEntityStateType activationState, string activationStateMachineName = "Weapon", bool agile = false)
{
//IL_0063: Unknown result type (might be due to invalid IL or missing references)
//IL_0065: Unknown result type (might be due to invalid IL or missing references)
//IL_0074: Unknown result type (might be due to invalid IL or missing references)
this.skillName = skillName;
this.skillNameToken = skillNameToken;
this.skillDescriptionToken = skillDescriptionToken;
this.skillIcon = skillIcon;
this.activationState = activationState;
this.activationStateMachineName = activationStateMachineName;
interruptPriority = (InterruptPriority)0;
isCombatSkill = true;
baseRechargeInterval = 0f;
requiredStock = 0;
stockToConsume = 0;
cancelSprintingOnActivation = !agile;
if (agile)
{
keywordTokens = new string[1] { "KEYWORD_AGILE" };
}
}
}
namespace HunkMod
{
[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.*/)]
[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.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
[BepInPlugin("com.rob.Hunk", "Hunk", "1.5.1")]
[R2APISubmoduleDependency(new string[] { "PrefabAPI", "LanguageAPI", "SoundAPI", "DirectorAPI", "LoadoutAPI", "UnlockableAPI", "NetworkingAPI", "RecalculateStatsAPI" })]
public class MainPlugin : BaseUnityPlugin
{
[CompilerGenerated]
private sealed class <BodyCatalog_Init>d__52 : IEnumerator<object>, IEnumerator, IDisposable
{
private int <>1__state;
private object <>2__current;
public orig_Init orig;
public MainPlugin <>4__this;
private IEnumerator<GameObject> <>s__1;
private GameObject <body>5__2;
private KinematicCharacterMotor <motor>5__3;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <BodyCatalog_Init>d__52(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<>s__1 = null;
<body>5__2 = null;
<motor>5__3 = null;
<>1__state = -2;
}
private bool MoveNext()
{
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
<>2__current = orig.Invoke();
<>1__state = 1;
return true;
case 1:
<>1__state = -1;
<>s__1 = BodyCatalog.allBodyPrefabs.GetEnumerator();
try
{
while (<>s__1.MoveNext())
{
<body>5__2 = <>s__1.Current;
if (Object.op_Implicit((Object)(object)<body>5__2))
{
<motor>5__3 = <body>5__2.GetComponent<KinematicCharacterMotor>();
if (Object.op_Implicit((Object)(object)<motor>5__3))
{
<motor>5__3.playerCharacter = true;
}
<motor>5__3 = null;
}
<body>5__2 = null;
}
}
finally
{
if (<>s__1 != null)
{
<>s__1.Dispose();
}
}
<>s__1 = null;
return false;
}
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
}
public const string MODUID = "com.rob.Hunk";
public const string MODNAME = "Hunk";
public const string MODVERSION = "1.5.1";
public const string developerPrefix = "ROB";
public static MainPlugin instance;
public static bool badaBingBadaBoom = false;
public static bool hasInitLate = false;
public static bool rocketTrigger = false;
public static bool spawnedNemesisCase = false;
public static bool spawnedCrystalSkull = false;
public static bool spawnedCorpse = false;
public static List<HurtBox> hurtboxesList = new List<HurtBox>();
public static List<HunkProjectileTracker> projectileList = new List<HunkProjectileTracker>();
public static bool scepterInstalled => Chainloader.PluginInfos.ContainsKey("com.DestroyedClone.AncientScepter");
public static bool rooInstalled => Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions");
public static bool hunkHudInstalled => Chainloader.PluginInfos.ContainsKey("com.public_ParticleSystem.HunkHud");
public static bool robItemsInstalled => Chainloader.PluginInfos.ContainsKey("com.rob.RobItems");
public static bool danteInstalled => Chainloader.PluginInfos.ContainsKey("com.rob.Dante");
public static bool extraMusicInstalled => Chainloader.PluginInfos.ContainsKey("com.rob.HunkMusic");
public static bool crappyAutoSprintInstalled => Chainloader.PluginInfos.ContainsKey("com.johnedwa.RTAutoSprintEx");
public static bool riskUIInstalled
{
get
{
if (Chainloader.PluginInfos.ContainsKey("bubbet.riskui") && RiskUIEnabled())
{
return true;
}
return false;
}
}
public static bool greenAlienHeadInstalled => Chainloader.PluginInfos.ContainsKey("com.Borbo.GreenAlienHead");
public static bool qolChestsInstalled => Chainloader.PluginInfos.ContainsKey("Faust.QoLChests");
public static bool emptyChestsInstalled => Chainloader.PluginInfos.ContainsKey("com.Elysium.ECBG");
public static bool dragonyckInstalled => Chainloader.PluginInfos.ContainsKey("com.Dragonyck.InteractablesBeGone");
public static bool unlockAllInstalled => Chainloader.PluginInfos.ContainsKey("com.xoxfaby.UnlockAll");
public static bool moreShrinesInstalled => Chainloader.PluginInfos.ContainsKey("com.evaisa.moreshrines");
public static bool cleanerHudInstalled => Chainloader.PluginInfos.ContainsKey("AAAHIFU.CleanerHud");
public static bool infernoInstalled => Chainloader.PluginInfos.ContainsKey("HIFU.Inferno");
public static bool scrollableLobbyInstalled => Chainloader.PluginInfos.ContainsKey("com.KingEnderBrine.ScrollableLobbyUI");
private void Awake()
{
instance = this;
Config.myConfig = ((BaseUnityPlugin)this).Config;
Log.Init(((BaseUnityPlugin)this).Logger);
Config.ReadConfig();
HunkAssets.PopulateAssets();
CameraParams.InitializeParams();
States.RegisterStates();
Projectiles.RegisterProjectiles();
Tokens.AddTokens();
ItemDisplays.PopulateDisplays();
CreateWeapons();
new Hunk().CreateCharacter();
new Parasite().CreateCharacter();
new Nemesis().CreateCharacter();
new Helicopter().CreateCharacter();
new Contamination();
new Pursuer();
if (Config.playableNemesis.Value)
{
new StrikeTeam();
}
NetworkingAPI.RegisterMessageType<SyncWeapon>();
NetworkingAPI.RegisterMessageType<SyncOverlay>();
NetworkingAPI.RegisterMessageType<SyncStoredWeapon>();
NetworkingAPI.RegisterMessageType<SyncDecapitation>();
NetworkingAPI.RegisterMessageType<SyncGrenade>();
NetworkingAPI.RegisterMessageType<SyncAmmoPickup>();
NetworkingAPI.RegisterMessageType<SyncGunDrop>();
NetworkingAPI.RegisterMessageType<SyncGunDrop2>();
NetworkingAPI.RegisterMessageType<SyncGunSwap>();
NetworkingAPI.RegisterMessageType<SyncVirus>();
NetworkingAPI.RegisterMessageType<SyncCombatStopwatch>();
NetworkingAPI.RegisterMessageType<SyncWeaponCaseOpen>();
NetworkingAPI.RegisterMessageType<SyncHeadshot>();
NetworkingAPI.RegisterMessageType<SyncCaseItem>();
NetworkingAPI.RegisterMessageType<SyncTemplarExplosion>();
NetworkingAPI.RegisterMessageType<SyncTVirus>();
NetworkingAPI.RegisterMessageType<SyncTVirusOverlay>();
NetworkingAPI.RegisterMessageType<SyncCVirus>();
NetworkingAPI.RegisterMessageType<SyncCVirusOverlay>();
NetworkingAPI.RegisterMessageType<SyncUroboros>();
NetworkingAPI.RegisterMessageType<SyncUrododge>();
NetworkingAPI.RegisterMessageType<SyncHunkTarget>();
NetworkingAPI.RegisterMessageType<SyncTerminalAnimation>();
NetworkingAPI.RegisterMessageType<SyncStarsBoxAnimation>();
NetworkingAPI.RegisterMessageType<SyncStarsBadgeStep>();
NetworkingAPI.RegisterMessageType<SyncGainBiomass>();
NetworkingAPI.RegisterMessageType<SyncGainGauge>();
NetworkingAPI.RegisterMessageType<SyncItemPickupNotification>();
Hook();
new ContentPacks().Initialize();
ContentManager.onContentPacksAssigned += LateSetup;
}
private void LateSetup(ReadOnlyArray<ReadOnlyContentPack> obj)
{
Hunk.SetItemDisplays();
}
private void CreateWeapons()
{
new SMG().Init();
new FakeSMG().Init();
new M19().Init();
new MUP().Init();
new SG09().Init();
new BroomHC().Init();
new Magnum().Init();
new Shotgun().Init();
new Slugger().Init();
new M3().Init();
new StreetSweeper().Init();
new RocketLauncher().Init();
new ATM().Init();
new ATM2().Init();
new RPG().Init();
new Revolver().Init();
new Flamethrower().Init();
new GrenadeLauncher().Init();
new MGL().Init();
new GoldenGun().Init();
new BlueRose().Init();
new AssaultRifle().Init();
new Railgun().Init();
new Minigun().Init();
new Colt().Init();
new Sparkshot().Init();
new SSG().Init();
new RiotShield().Init();
new ScanGun().Init();
new GrappleGun().Init();
new Frag().Init();
new Flashbang().Init();
new StickyBomb().Init();
new Behemoth().Init();
new SingleRocket().Init();
new NoWeapon().Init();
}
private static bool RiskUIEnabled()
{
return RiskUIPlugin.Enabled.Value;
}
private void Hook()
{
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_0012: Expected O, but got Unknown
//IL_001a: Unknown result type (might be due to invalid IL or missing references)
//IL_0024: Expected O, but got Unknown
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: Expected O, but got Unknown
//IL_003e: Unknown result type (might be due to invalid IL or missing references)
//IL_0048: Expected O, but got Unknown
//IL_0050: Unknown result type (might be due to invalid IL or missing references)
//IL_005a: Expected O, but got Unknown
CharacterBody.RecalculateStats += new hook_RecalculateStats(CharacterBody_RecalculateStats);
HurtBox.OnEnable += new hook_OnEnable(HurtBox_OnEnable);
HurtBox.OnDisable += new hook_OnDisable(HurtBox_OnDisable);
ProjectileGhostController.Awake += new hook_Awake(ProjectileGhostController_Awake);
BodyCatalog.Init += new hook_Init(BodyCatalog_Init);
}
[IteratorStateMachine(typeof(<BodyCatalog_Init>d__52))]
private IEnumerator BodyCatalog_Init(orig_Init orig)
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <BodyCatalog_Init>d__52(0)
{
<>4__this = this,
orig = orig
};
}
private void ProjectileGhostController_Awake(orig_Awake orig, ProjectileGhostController self)
{
if (Object.op_Implicit((Object)(object)self))
{
((Component)self).gameObject.AddComponent<HunkProjectileTracker>().ghost = self;
}
orig.Invoke(self);
}
private void HurtBox_OnEnable(orig_OnEnable orig, HurtBox self)
{
orig.Invoke(self);
hurtboxesList.Add(self);
}
private void HurtBox_OnDisable(orig_OnDisable orig, HurtBox self)
{
orig.Invoke(self);
hurtboxesList.Remove(self);
}
private void CharacterBody_RecalculateStats(orig_RecalculateStats orig, CharacterBody self)
{
orig.Invoke(self);
if (!Object.op_Implicit((Object)(object)self))
{
return;
}
if (self.HasBuff(Hunk.immobilizedBuff))
{
self.moveSpeed = 0f;
}
if (self.HasBuff(Hunk.bulletTimeBuff))
{
self.attackSpeed += 1f;
}
if (self.HasBuff(Hunk.hunkFreefallBuff))
{
self.moveSpeed += 6f;
}
if (self.HasBuff(Hunk.meleeArmorBuff))
{
int buffCount = self.GetBuffCount(Hunk.meleeArmorBuff);
self.armor += (float)buffCount * 5f;
}
if (!Object.op_Implicit((Object)(object)self.inventory))
{
return;
}
int itemCount = self.inventory.GetItemCount(Hunk.gVirus);
if (itemCount > 0)
{
self.armor += (float)(itemCount - 4) * 2.5f;
self.attackSpeed += (float)itemCount * 0.075f;
self.damage += (float)itemCount * 1.75f;
for (int i = 0; i < itemCount; i++)
{
self.moveSpeed /= 1.05f;
}
}
if (self.inventory.GetItemCount(Hunk.tVirus) > 0)
{
self.armor -= 10f;
}
int num = self.inventory.GetItemCount(Hunk.gVirusSample) + self.inventory.GetItemCount(Hunk.tVirusSample) + self.inventory.GetItemCount(Hunk.cVirusSample) + self.inventory.GetItemCount(Hunk.uroborosSample);
if (num > 0)
{
self.regen += (float)num * 4f;
self.armor += (float)num * 5f;
}
if (self.baseNameToken == Nemesis.bodyNameToken && self.isPlayerControlled)
{
NemesisController component = ((Component)self).GetComponent<NemesisController>();
if (Object.op_Implicit((Object)(object)component) && component.biomass >= 100)
{
self.damage *= 1.2f;
}
}
if (self.HasBuff(Hunk.superSprintBuff))
{
self.moveSpeed += 5f;
}
}
public static float GetICBMDamageMult(CharacterBody body)
{
float num = 1f;
if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.inventory))
{
int itemCount = body.inventory.GetItemCount(Items.MoreMissile);
int num2 = itemCount - 1;
if (num2 > 0)
{
num += (float)num2 * 0.5f;
}
}
return num;
}
}
public static class HunkWeaponCatalog
{
public static Dictionary<string, HunkWeaponDef> weaponDrops = new Dictionary<string, HunkWeaponDef>();
public static HunkWeaponDef[] weaponDefs = new HunkWeaponDef[0];
public static List<ItemDef> itemDefs = new List<ItemDef>(0);
public static void AddWeapon(HunkWeaponDef weaponDef, bool addItem = true)
{
Array.Resize(ref weaponDefs, weaponDefs.Length + 1);
int num = weaponDefs.Length - 1;
weaponDef.index = (ushort)num;
weaponDefs[num] = weaponDef;
weaponDef.index = (ushort)num;
if (addItem)
{
itemDefs.Add(weaponDef.itemDef);
}
Debug.Log((object)("Added " + weaponDef.nameToken + " to Hunk weapon catalog with index: " + weaponDef.index));
}
public static void AddWeaponDrop(string bodyName, HunkWeaponDef weaponDef, bool autoComplete = true)
{
if (autoComplete)
{
if (!bodyName.Contains("Body"))
{
bodyName += "Body";
}
if (!bodyName.Contains("(Clone)"))
{
bodyName += "(Clone)";
}
}
weaponDrops.Add(bodyName, weaponDef);
}
public static HunkWeaponDef GetWeaponFromIndex(int index)
{
return weaponDefs[index];
}
}
public static class NemesisMutationCatalog
{
public static NemesisMutationDef[] mutationDefs = new NemesisMutationDef[0];
public static void AddMutation(NemesisMutationDef mutationDef)
{
Array.Resize(ref mutationDefs, mutationDefs.Length + 1);
int num = mutationDefs.Length - 1;
mutationDefs[num] = mutationDef;
mutationDef.index = (ushort)num;
Debug.Log((object)("Added " + mutationDef.nameToken + " to Nemesis mutation catalog with index: " + mutationDef.index));
}
public static NemesisMutationDef GetMutation(int index)
{
return mutationDefs[index];
}
}
}
namespace HunkMod.SkillStates
{
public class FuckMyAss : GenericCharacterDeath
{
public override bool shouldAutoDestroy => false;
public override void OnEnter()
{
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0013: Expected O, but got Unknown
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
((GenericCharacterDeath)this).OnEnter();
GameObject val = new GameObject("FUCK OFFFFFFF");
val.transform.position = ((EntityState)this).transform.position;
Util.PlaySound("sfx_hunk_death", val);
Object.Destroy((Object)(object)val, 8f);
EntityState.Destroy((Object)(object)((Component)((EntityState)this).modelLocator.modelTransform).gameObject);
}
public override void PlayDeathAnimation(float crossfadeDuration = 0.1f)
{
}
public override void FixedUpdate()
{
((GenericCharacterDeath)this).FixedUpdate();
if (NetworkServer.active && ((EntityState)this).fixedAge > 4f)
{
EntityState.Destroy((Object)(object)((EntityState)this).gameObject);
}
}
public override InterruptPriority GetMinimumInterruptPriority()
{
//IL_0003: Unknown result type (might be due to invalid IL or missing references)
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
return (InterruptPriority)9;
}
}
public class FaceplantDeath : GenericCharacterDeath
{
public override bool shouldAutoDestroy => false;
public override void OnEnter()
{
((GenericCharacterDeath)this).OnEnter();
if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
{
((Behaviour)((EntityState)this).characterMotor).enabled = false;
}
}
public override void PlayDeathAnimation(float crossfadeDuration = 0.1f)
{
}
public override void FixedUpdate()
{
((GenericCharacterDeath)this).FixedUpdate();
if (NetworkServer.active && ((EntityState)this).fixedAge > 4f)
{
EntityState.Destroy((Object)(object)((EntityState)this).gameObject);
}
}
public override InterruptPriority GetMinimumInterruptPriority()
{
//IL_0003: Unknown result type (might be due to invalid IL or missing references)
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
return (InterruptPriority)9;
}
}
}
namespace HunkMod.SkillStates.Virus
{
public class Death : GenericCharacterDeath
{
private bool hasDied;
public override void FixedUpdate()
{
//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
//IL_00c3: Expected O, but got Unknown
//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
//IL_0015: Expected O, but got Unknown
//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_0063: 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_007e: Unknown result type (might be due to invalid IL or missing references)
//IL_0083: Unknown result type (might be due to invalid IL or missing references)
//IL_008f: 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_009f: Unknown result type (might be due to invalid IL or missing references)
//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
//IL_0123: 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_013f: 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)
if (((EntityState)this).isAuthority)
{
BlastAttack val = new BlastAttack();
val.radius = 8f;
val.procCoefficient = 0.01f;
val.position = ((EntityState)this).characterBody.corePosition;
val.attacker = ((EntityState)this).gameObject;
val.crit = false;
val.baseDamage = ((BaseState)this).damageStat * 2f;
val.falloffModel = (FalloffModel)2;
val.baseForce = 4000f;
val.bonusForce = Vector3.up * 600f;
val.teamIndex = TeamComponent.GetObjectTeam(val.attacker);
val.damageType = DamageTypeCombo.op_Implicit((DamageType)131072);
val.attackerFiltering = (AttackerFiltering)2;
val.Fire();
}
GameObject val2 = new GameObject("FUCK OFFFFFFF");
val2.transform.position = ((EntityState)this).transform.position;
Util.PlaySound("sfx_hunk_grenade_explosion", val2);
Object.Destroy((Object)(object)val2, 8f);
((GenericCharacterDeath)this).FixedUpdate();
if (NetworkServer.active && !hasDied)
{
hasDied = true;
EffectManager.SimpleImpactEffect(HunkAssets.bloodExplosionEffect, ((EntityState)this).characterBody.corePosition, Vector3.up, true);
EffectManager.SimpleImpactEffect(HunkAssets.cVirusExplosion, ((EntityState)this).characterBody.corePosition, Vector3.up, true);
((GenericCharacterDeath)this).DestroyBodyAsapServer();
EntityState.Destroy((Object)(object)((EntityState)this).gameObject);
}
}
public override void OnExit()
{
((GenericCharacterDeath)this).DestroyModel();
((GenericCharacterDeath)this).OnExit();
}
}
}
namespace HunkMod.SkillStates.Parasite
{
public class Death : GenericCharacterDeath
{
private bool hasDied;
public override void FixedUpdate()
{
//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)
//IL_0056: Unknown result type (might be due to invalid IL or missing references)
//IL_005b: Unknown result type (might be due to invalid IL or missing references)
//IL_0066: Unknown result type (might be due to invalid IL or missing references)
//IL_006b: Unknown result type (might be due to invalid IL or missing references)
//IL_0075: 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_007f: 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)
((GenericCharacterDeath)this).FixedUpdate();
if (((EntityState)this).fixedAge > Death.deathDelay && NetworkServer.active && !hasDied)
{
hasDied = true;
if (Object.op_Implicit((Object)(object)((Component)((EntityState)this).characterBody.master).GetComponent<KeycardHolder>()))
{
PickupDropletController.CreatePickupDroplet(PickupCatalog.FindPickupIndex(HunkMod.Modules.Survivors.Hunk.gVirusSample.itemIndex), ((EntityState)this).characterBody.corePosition + Vector3.up * 0.5f, Vector3.up * 20f);
}
EffectManager.SimpleImpactEffect(Death.deathEffectPrefab, ((EntityState)this).characterBody.corePosition, Vector3.up, true);
((GenericCharacterDeath)this).DestroyBodyAsapServer();
EntityState.Destroy((Object)(object)((EntityState)this).gameObject);
}
}
public override void OnExit()
{
((GenericCharacterDeath)this).DestroyModel();
((GenericCharacterDeath)this).OnExit();
}
}
public class Infest : BaseState
{
private Transform targetTransform;
private GameObject infestVfxInstance;
private OverlapAttack attack;
private List<HurtBox> victimsStruck = new List<HurtBox>();
public override void OnEnter()
{
//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_0073: 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_00e0: Unknown result type (might be due to invalid IL or missing references)
//IL_00ea: Expected O, but got Unknown
//IL_0113: Unknown result type (might be due to invalid IL or missing references)
//IL_0118: Unknown result type (might be due to invalid IL or missing references)
//IL_0165: Unknown result type (might be due to invalid IL or missing references)
//IL_016a: 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_017c: Unknown result type (might be due to invalid IL or missing references)
//IL_0182: Expected O, but got Unknown
//IL_018f: Unknown result type (might be due to invalid IL or missing references)
//IL_0194: Unknown result type (might be due to invalid IL or missing references)
//IL_01aa: 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_01d9: Unknown result type (might be due to invalid IL or missing references)
//IL_01de: Unknown result type (might be due to invalid IL or missing references)
//IL_01ea: Unknown result type (might be due to invalid IL or missing references)
//IL_01ef: Unknown result type (might be due to invalid IL or missing references)
//IL_0251: Unknown result type (might be due to invalid IL or missing references)
//IL_0256: 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_0267: Unknown result type (might be due to invalid IL or missing references)
//IL_026c: 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_0275: Unknown result type (might be due to invalid IL or missing references)
//IL_027c: Unknown result type (might be due to invalid IL or missing references)
//IL_0296: Unknown result type (might be due to invalid IL or missing references)
//IL_02a6: Unknown result type (might be due to invalid IL or missing references)
//IL_02b5: Unknown result type (might be due to invalid IL or missing references)
//IL_02cd: Unknown result type (might be due to invalid IL or missing references)
//IL_02cf: Unknown result type (might be due to invalid IL or missing references)
//IL_02fc: Unknown result type (might be due to invalid IL or missing references)
((BaseState)this).OnEnter();
((EntityState)this).PlayAnimation("Base", "Infest");
Util.PlaySound(Infest.enterSoundString, ((EntityState)this).gameObject);
if (Object.op_Implicit((Object)(object)Infest.enterEffectPrefab))
{
EffectManager.SimpleImpactEffect(Infest.enterEffectPrefab, ((EntityState)this).characterBody.corePosition, Vector3.up, false);
}
if (Object.op_Implicit((Object)(object)Infest.infestVfxPrefab))
{
infestVfxInstance = Object.Instantiate<GameObject>(Infest.infestVfxPrefab, ((EntityState)this).transform.position, Quaternion.identity);
infestVfxInstance.transform.parent = ((EntityState)this).transform;
}
HitBoxGroup hitBoxGroup = null;
Transform modelTransform = ((EntityState)this).GetModelTransform();
if (Object.op_Implicit((Object)(object)modelTransform))
{
hitBoxGroup = Array.Find(((Component)modelTransform).GetComponents<HitBoxGroup>(), (HitBoxGroup element) => element.groupName == "Infest");
}
attack = new OverlapAttack();
attack.attacker = ((EntityState)this).gameObject;
attack.inflictor = ((EntityState)this).gameObject;
attack.teamIndex = ((BaseState)this).GetTeam();
attack.damage = Infest.infestDamageCoefficient * base.damageStat;
attack.hitEffectPrefab = null;
attack.hitBoxGroup = hitBoxGroup;
attack.isCrit = ((BaseState)this).RollCrit();
attack.damageType = DamageTypeCombo.op_Implicit((DamageType)32);
attack.damageColorIndex = (DamageColorIndex)9;
BullseyeSearch val = new BullseyeSearch();
val.viewer = ((EntityState)this).characterBody;
val.teamMaskFilter = TeamMask.allButNeutral;
((TeamMask)(ref val.teamMaskFilter)).RemoveTeam(((EntityState)this).characterBody.teamComponent.teamIndex);
val.sortMode = (SortMode)1;
val.minDistanceFilter = 0f;
val.maxDistanceFilter = Infest.searchMaxDistance;
val.searchOrigin = ((EntityState)this).inputBank.aimOrigin;
val.searchDirection = ((EntityState)this).inputBank.aimDirection;
val.maxAngleFilter = Infest.searchMaxAngle;
val.filterByLoS = true;
val.RefreshCandidates();
HurtBox val2 = val.GetResults().FirstOrDefault();
if (Object.op_Implicit((Object)(object)val2))
{
targetTransform = ((Component)val2).transform;
if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
{
Vector3 position = targetTransform.position;
float velocityInitialSpeed = Infest.velocityInitialSpeed;
Vector3 val3 = position - ((EntityState)this).transform.position;
Vector2 val4 = default(Vector2);
((Vector2)(ref val4))..ctor(val3.x, val3.z);
float magnitude = ((Vector2)(ref val4)).magnitude;
float num = Trajectory.CalculateInitialYSpeed(magnitude / velocityInitialSpeed, val3.y);
Vector3 val5 = default(Vector3);
((Vector3)(ref val5))..ctor(val4.x / magnitude * velocityInitialSpeed, num, val4.y / magnitude * velocityInitialSpeed);
((EntityState)this).characterMotor.velocity = val5;
((EntityState)this).characterMotor.disableAirControlUntilCollision = true;
((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f);
((EntityState)this).characterDirection.forward = val5;
}
}
}
public override void FixedUpdate()
{
//IL_0031: Unknown result type (might be due to invalid IL or missing references)
//IL_003c: Unknown result type (might be due to invalid IL or missing references)
//IL_0041: Unknown result type (might be due to invalid IL or missing references)
//IL_0046: 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_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_0077: 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_01e6: Unknown result type (might be due to invalid IL or missing references)
//IL_01eb: Unknown result type (might be due to invalid IL or missing references)
//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
//IL_016a: 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)
((EntityState)this).FixedUpdate();
if (Object.op_Implicit((Object)(object)targetTransform) && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
{
Vector3 val = targetTransform.position - ((EntityState)this).transform.position;
Vector3 velocity = ((EntityState)this).characterMotor.velocity;
velocity = Vector3.RotateTowards(velocity, val, Infest.velocityTurnRate * Time.fixedDeltaTime * (MathF.PI / 180f), 0f);
((EntityState)this).characterMotor.velocity = velocity;
if (NetworkServer.active && attack.Fire(victimsStruck))
{
for (int i = 0; i < victimsStruck.Count; i++)
{
HealthComponent healthComponent = victimsStruck[i].healthComponent;
CharacterBody body = healthComponent.body;
CharacterMaster master = body.master;
if (healthComponent.alive && (Object)(object)master != (Object)null && !body.isPlayerControlled && !((Enum)body.bodyFlags).HasFlag((Enum)(object)(BodyFlags)2))
{
((Component)body).gameObject.AddComponent<VirusHandler>();
BaseAI component = ((Component)master).GetComponent<BaseAI>();
if (Object.op_Implicit((Object)(object)component))
{
component.enemyAttention = 0f;
component.ForceAcquireNearestEnemyIfNoCurrentEnemy();
}
Object.DestroyImmediate((Object)(object)((Component)((EntityState)this).characterBody.master).GetComponent<KeycardHolder>());
((EntityState)this).healthComponent.Suicide((GameObject)null, (GameObject)null, DamageTypeCombo.op_Implicit((DamageType)0));
if (Object.op_Implicit((Object)(object)Infest.successfulInfestEffectPrefab))
{
EffectManager.SimpleImpactEffect(Infest.successfulInfestEffectPrefab, ((EntityState)this).transform.position, Vector3.up, false);
}
break;
}
}
}
}
if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection))
{
((EntityState)this).characterDirection.moveVector = ((EntityState)this).characterMotor.velocity;
}
if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && ((EntityState)this).characterMotor.isGrounded && ((EntityState)this).fixedAge > 0.1f)
{
((EntityState)this).outer.SetNextStateToMain();
}
}
public override void OnExit()
{
if (Object.op_Implicit((Object)(object)infestVfxInstance))
{
EntityState.Destroy((Object)(object)infestVfxInstance);
}
((EntityState)this).OnExit();
}
}
}
namespace HunkMod.SkillStates.Nemesis
{
public class AirDash : MainState
{
public override void OnEnter()
{
bufferAirDash = true;
base.OnEnter();
}
}
public class AltChargedJumpState : BaseNemesisMain
{
public float charge;
private float minPower = 28f;
private float maxPower = 52f;
private float duration = 0.65f;
private bool hasJumped;
private Animator animator;
public override void OnEnter()
{
//IL_001b: 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_002a: Unknown result type (might be due to invalid IL or missing references)
base.OnEnter();
animator = ((EntityState)this).GetModelAnimator();
CharacterMotor characterMotor = ((EntityState)this).characterMotor;
characterMotor.velocity *= 0.25f;
PlayAnimation();
((Behaviour)((EntityState)this).modelLocator).enabled = false;
}
public override void OnExit()
{
((GenericCharacterMain)this).OnExit();
((Behaviour)((EntityState)this).modelLocator).enabled = true;
}
public override void UpdateAnimationParameters()
{
}
protected virtual void PlayAnimation()
{
if (Object.op_Implicit((Object)(object)animator))
{
((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty");
int layerIndex = animator.GetLayerIndex("Body");
if (layerIndex >= 0)
{
((EntityState)this).PlayAnimation("Body", "AltJump");
}
}
}
public override void FixedUpdate()
{
//IL_0062: 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)
((GenericCharacterMain)this).FixedUpdate();
if (((EntityState)this).fixedAge >= 0.75f * duration)
{
if (!hasJumped)
{
hasJumped = true;
Jump();
PlaySound();
}
}
else if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
{
CharacterMotor characterMotor = ((EntityState)this).characterMotor;
characterMotor.moveDirection *= 0.2f;
}
if (((EntityState)this).fixedAge >= duration)
{
((EntityState)this).outer.SetNextStateToMain();
}
else if (((BaseCharacterMain)this).hasModelAnimator && ((BaseCharacterMain)this).characterAnimParamAvailability.isGrounded)
{
((BaseCharacterMain)this).modelAnimator.SetBool(AnimationParameters.isGrounded, false);
}
}
public override void ProcessJump()
{
}
protected virtual void Jump()
{
//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_00c4: 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_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)
//IL_00f6: 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_0113: Unknown result type (might be due to invalid IL or missing references)
//IL_0118: Unknown result type (might be due to invalid IL or missing references)
//IL_0158: Unknown result type (might be due to invalid IL or missing references)
//IL_015a: Unknown result type (might be due to invalid IL or missing references)
//IL_00ed: 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_00f4: Unknown result type (might be due to invalid IL or missing references)
((Behaviour)((EntityState)this).modelLocator).enabled = true;
((EntityState)this).characterBody.isSprinting = true;
CharacterMotor characterMotor = ((EntityState)this).characterMotor;
characterMotor.jumpCount++;
if (((EntityState)this).inputBank.moveVector == Vector3.zero)
{
float num = Util.Remap(charge, 0.2f, 1f, minPower, maxPower);
((EntityState)this).characterMotor.velocity = new Vector3(0f, num * 1.5f, 0f);
((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f);
animator.SetFloat("jumpType", 0f);
}
else
{
Vector3 val = ((EntityState)this).characterMotor.moveDirection;
val.y = 0f;
float magnitude = ((Vector3)(ref val)).magnitude;
if (magnitude > 0f)
{
val /= magnitude;
}
Vector3 velocity = val * ((EntityState)this).characterBody.moveSpeed * (5.5f + charge);
float y = Util.Remap(charge, 0.2f, 1f, minPower * 0.75f, maxPower * 0.75f);
velocity.y = y;
((EntityState)this).characterMotor.velocity = velocity;
((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f);
animator.SetFloat("jumpType", (float)(1 + Random.Range(0, 2)));
}
SpawnEffect();
}
protected virtual void SpawnEffect()
{
//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_0012: Unknown result type (might be due to invalid IL or missing references)
//IL_001d: Unknown result type (might be due to invalid IL or missing references)
//IL_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_002e: Unknown result type (might be due to invalid IL or missing references)
//IL_0033: Unknown result type (might be due to invalid IL or missing references)
//IL_0044: Expected O, but got Unknown
EffectManager.SpawnEffect(HunkAssets.nemAirDashEffect, new EffectData
{
origin = ((EntityState)this).characterBody.footPosition,
rotation = Util.QuaternionSafeLookRotation(((EntityState)this).characterMotor.velocity),
scale = 1f
}, true);
}
protected virtual void PlaySound()
{
Util.PlaySound("sfx_nemesis_jump_big", ((EntityState)this).gameObject);
}
}
public class BaseMelee : BaseNemesisSkillState
{
public int swingIndex;
protected bool isCancelled;
protected string hitboxName = "Sword";
protected DamageType damageType = (DamageType)0;
protected List<ModdedDamageType> moddedDamageTypeHolder = new List<ModdedDamageType>();
protected float damageCoefficient = 3.5f;
protected float procCoefficient = 1f;
protected float pushForce = 300f;
protected Vector3 bonusForce = Vector3.zero;
protected float baseDuration = 1f;
protected float attackStartTime = 0.2f;
protected float attackEndTime = 0.4f;
protected float baseEarlyExitTime = 0.4f;
protected float hitStopDuration = 0.012f;
protected float attackRecoil = 0.75f;
protected float hitHopVelocity = 4f;
protected bool smoothHitstop = false;
protected string swingSoundString = "";
protected string hitSoundString = "";
protected string muzzleString = "SwingCenter";
protected GameObject swingEffectPrefab;
protected GameObject hitEffectPrefab;
protected NetworkSoundEventIndex impactSound;
private float earlyExitTime;
public float duration;
private bool hasFired;
private float hitPauseTimer;
protected OverlapAttack attack;
private bool inHitPause;
private bool hasHopped;
protected float stopwatch;
protected Animator animator;
private HitStopCachedState hitStopCachedState;
private Vector3 storedVelocity;
protected bool isCrit;
protected List<HurtBox> hitResults = new List<HurtBox>();
public override void OnEnter()
{
base.OnEnter();
duration = baseDuration / ((BaseState)this).attackSpeedStat;
earlyExitTime = baseEarlyExitTime;
hasFired = false;
animator = ((EntityState)this).GetModelAnimator();
((BaseState)this).StartAimMode(0.5f + duration, false);
((EntityState)this).characterBody.outOfCombatStopwatch = 0f;
isCrit = ((BaseState)this).RollCrit();
PlayAttackAnimation();
InitializeAttack();
}
protected virtual void InitializeAttack()
{
//IL_002f: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Expected O, but got Unknown
//IL_0040: Unknown result type (might be due to invalid IL or missing references)
//IL_0045: Unknown result type (might be due to invalid IL or missing references)
//IL_004a: Unknown result type (might be due to invalid IL or missing references)
//IL_0060: Unknown result type (might be due to invalid IL or missing references)
//IL_0065: 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_00c6: Unknown result type (might be due to invalid IL or missing references)
//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
//IL_0111: 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_0150: Unknown result type (might be due to invalid IL or missing references)
//IL_0155: Unknown result type (might be due to invalid IL or missing references)
HitBoxGroup hitBoxGroup = null;
Transform modelTransform = ((EntityState)this).GetModelTransform();
if (Object.op_Implicit((Object)(object)modelTransform))
{
hitBoxGroup = Array.Find(((Component)modelTransform).GetComponents<HitBoxGroup>(), (HitBoxGroup element) => element.groupName == hitboxName);
}
attack = new OverlapAttack();
attack.damageType = DamageTypeCombo.op_Implicit(damageType);
foreach (ModdedDamageType item in moddedDamageTypeHolder)
{
DamageAPI.AddModdedDamageType(attack, item);
}
moddedDamageTypeHolder.Clear();
attack.attacker = ((EntityState)this).gameObject;
attack.inflictor = ((EntityState)this).gameObject;
attack.teamIndex = ((BaseState)this).GetTeam();
attack.damage = damageCoefficient * ((BaseState)this).damageStat;
attack.procCoefficient = procCoefficient;
attack.hitEffectPrefab = hitEffectPrefab;
attack.forceVector = bonusForce;
attack.pushAwayForce = pushForce;
attack.hitBoxGroup = hitBoxGroup;
attack.isCrit = isCrit;
attack.impactSound = impactSound;
}
protected virtual void FireShuriken()
{
PrimarySkillShurikenBehavior component = ((EntityState)this).GetComponent<PrimarySkillShurikenBehavior>();
if (Object.op_Implicit((Object)(object)component))
{
component.OnSkillActivated(((EntityState)this).skillLocator.primary);
}
}
protected virtual void PlayAttackAnimation()
{
((EntityState)this).PlayCrossfade("Gesture, Override", "Slash" + (1 + swingIndex), "Fist.playbackRate", duration, 0.05f);
}
public override void OnExit()
{
if (!hasFired && !((EntityState)this).inputBank.skill2.down && !isCancelled)
{
FireAttack();
}
if (inHitPause)
{
ClearHitStop();
}
base.OnExit();
}
public void CancelAttack()
{
isCancelled = true;
}
protected virtual void PlaySwingEffect()
{
EffectManager.SimpleMuzzleFlash(swingEffectPrefab, ((EntityState)this).gameObject, muzzleString, false);
}
protected virtual void OnHitEnemyAuthority(int amount)
{
Util.PlaySound(hitSoundString, ((EntityState)this).gameObject);
if (!hasHopped)
{
if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((EntityState)this).characterMotor.isGrounded)
{
((BaseState)this).SmallHop(((EntityState)this).characterMotor, hitHopVelocity);
}
hasHopped = true;
}
if (!inHitPause)
{
TriggerHitStop();
}
}
protected virtual void TriggerHitStop()
{
//IL_0008: 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_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)
storedVelocity = ((EntityState)this).characterMotor.velocity;
hitStopCachedState = ((BaseState)this).CreateHitStopCachedState(((EntityState)this).characterMotor, animator, "Fist.playbackRate");
hitPauseTimer = hitStopDuration / ((BaseState)this).attackSpeedStat;
inHitPause = true;
}
protected virtual void FireAttack()
{
if (!hasFired)
{
hasFired = true;
Util.PlayAttackSpeedSound(swingSoundString, ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat);
PlaySwingEffect();
if (((EntityState)this).isAuthority)
{
base.AddRecoil2(-1f * attackRecoil, -2f * attackRecoil, -0.5f * attackRecoil, 0.5f * attackRecoil);
}
}
if (((EntityState)this).isAuthority)
{
hitResults.Clear();
if (attack.Fire(hitResults))
{
OnHitEnemyAuthority(hitResults.Count);
}
}
}
protected virtual void SetNextState()
{
int num = ((swingIndex == 0) ? 1 : 0);
((EntityState)this).outer.SetNextState((EntityState)(object)new BaseMelee
{
swingIndex = num
});
}
public override void FixedUpdate()
{
//IL_0085: Unknown result type (might be due to invalid IL or missing references)
//IL_008a: Unknown result type (might be due to invalid IL or missing references)
base.FixedUpdate();
if (isCancelled)
{
return;
}
hitPauseTimer -= Time.fixedDeltaTime;
if (hitPauseTimer <= 0f && inHitPause)
{
ClearHitStop();
}
if (!inHitPause)
{
stopwatch += Time.fixedDeltaTime;
}
else
{
if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
{
((EntityState)this).characterMotor.velocity = Vector3.zero;
}
if (Object.op_Implicit((Object)(object)animator))
{
animator.SetFloat("Fist.playbackRate", 0f);
}
}
if (stopwatch >= duration * attackStartTime && stopwatch <= duration * attackEndTime)
{
FireAttack();
}
if (stopwatch >= duration && ((EntityState)this).isAuthority)
{
((EntityState)this).outer.SetNextStateToMain();
}
else if (stopwatch >= duration * earlyExitTime && ((EntityState)this).isAuthority && ((EntityState)this).inputBank.skill1.down)
{
if (!hasFired)
{
FireAttack();
}
SetNextState();
}
}
protected virtual void ClearHitStop()
{
//IL_0003: Unknown result type (might be due to invalid IL or missing references)
//IL_0028: Unknown result type (might be due to invalid IL or missing references)
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
((BaseState)this).ConsumeHitStopCachedState(hitStopCachedState, ((EntityState)this).characterMotor, animator);
inHitPause = false;
((EntityState)this).characterMotor.velocity = storedVelocity;
}
public override InterruptPriority GetMinimumInterruptPriority()
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
return (InterruptPriority)3;
}
public override void OnSerialize(NetworkWriter writer)
{
((BaseSkillState)this).OnSerialize(writer);
writer.Write(swingIndex);
}
public override void OnDeserialize(NetworkReader reader)
{
((BaseSkillState)this).OnDeserialize(reader);
swingIndex = reader.ReadInt32();
}
}
public class BaseNemesisBodyState : MainState
{
public override void HandleMovements()
{
}
public override void ProcessJump()
{
}
public override bool CanExecuteSkill(GenericSkill skillSlot)
{
return false;
}
}
public class BaseNemesisMain : GenericCharacterMain
{
protected NemesisController nemesis;
public override void OnEnter()
{
//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
//IL_017e: Unknown result type (might be due to invalid IL or missing references)
//IL_0183: Unknown result type (might be due to invalid IL or missing references)
nemesis = ((EntityState)this).GetComponent<NemesisController>();
nemesis.jumpController.landingStopwatch = 0f;
if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody))
{
((BaseState)this).attackSpeedStat = ((EntityState)this).characterBody.attackSpeed;
((BaseState)this).damageStat = ((EntityState)this).characterBody.damage;
((BaseState)this).critStat = ((EntityState)this).characterBody.crit;
((BaseState)this).moveSpeedStat = ((EntityState)this).characterBody.moveSpeed;
}
((BaseCharacterMain)this).modelAnimator = ((EntityState)this).GetModelAnimator();
((BaseCharacterMain)this).rootMotionAccumulator = ((EntityState)this).GetModelRootMotionAccumulator();
if (Object.op_Implicit((Object)(object)((BaseCharacterMain)this).rootMotionAccumulator))
{
((BaseCharacterMain)this).rootMotionAccumulator.ExtractRootMotion();
}
((EntityState)this).GetBodyAnimatorSmoothingParameters(ref ((BaseCharacterMain)this).smoothingParameters);
((BaseCharacterMain)this).previousPosition = ((EntityState)this).transform.position;
((BaseCharacterMain)this).hasCharacterMotor = Object.op_Implicit((Object)(object)((EntityState)this).characterMotor);
((BaseCharacterMain)this).hasCharacterDirection = Object.op_Implicit((Object)(object)((EntityState)this).characterDirection);
((BaseCharacterMain)this).hasCharacterBody = Object.op_Implicit((Object)(object)((EntityState)this).characterBody);
((BaseCharacterMain)this).hasRailMotor = Object.op_Implicit((Object)(object)((EntityState)this).railMotor);
((BaseCharacterMain)this).hasCameraTargetParams = Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams);
((BaseCharacterMain)this).hasSkillLocator = Object.op_Implicit((Object)(object)((EntityState)this).skillLocator);
((BaseCharacterMain)this).hasModelAnimator = Object.op_Implicit((Object)(object)((BaseCharacterMain)this).modelAnimator);
((BaseCharacterMain)this).hasInputBank = Object.op_Implicit((Object)(object)((EntityState)this).inputBank);
((BaseCharacterMain)this).hasRootMotionAccumulator = Object.op_Implicit((Object)(object)((BaseCharacterMain)this).rootMotionAccumulator);
if (!Object.op_Implicit((Object)(object)((BaseCharacterMain)this).modelAnimator))
{
return;
}
((BaseCharacterMain)this).characterAnimParamAvailability = CharacterAnimParamAvailability.FromAnimator(((BaseCharacterMain)this).modelAnimator);
int layerIndex = ((BaseCharacterMain)this).modelAnimator.GetLayerIndex("Body");
if (((BaseCharacterMain)this).characterAnimParamAvailability.isGrounded)
{
((BaseCharacterMain)this).wasGrounded = ((BaseState)this).isGrounded;
}
Transform modelTransform = ((EntityState)this).GetModelTransform();
if (Object.op_Implicit((Object)(object)modelTransform))
{
base.aimAnimator = ((Component)modelTransform).GetComponent<AimAnimator>();
if (Object.op_Implicit((Object)(object)base.aimAnimator))
{
((Behaviour)base.aimAnimator).enabled = true;
}
}
base.hasAimAnimator = Object.op_Implicit((Object)(object)base.aimAnimator);
}
}
public class BaseNemesisSkillState : BaseSkillState
{
private Animator _animator;
private NemesisController _nemesis;
private Vector3 cachedForward;
protected virtual bool turningAllowed => true;
protected virtual bool normalizeModel => false;
protected NemesisController nemesis
{
get
{
if (!Object.op_Implicit((Object)(object)_nemesis))
{
_nemesis = ((EntityState)this).GetComponent<NemesisController>();
}
return _nemesis;
}
}
public virtual void AddRecoil2(float x1, float x2, float y1, float y2)
{
if (Config.enableRecoil.Value)
{
((BaseState)this).AddRecoil(x1, x2, y1, y2);
}
}
public override void OnEnter()
{
//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_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_0070: Unknown result type (might be due to invalid IL or missing references)
nemesis.jumpController.landingStopwatch = 0f;
_animator = ((EntityState)this).GetModelAnimator();
((BaseState)this).OnEnter();
if (!turningAllowed)
{
cachedForward = ((EntityState)this).characterDirection.forward;
((EntityState)this).characterDirection.turnSpeed = 0f;
((EntityState)this).characterDirection.moveVector = cachedForward;
((EntityState)this).characterDirection.forward = cachedForward;
((EntityState)this).characterBody.aimTimer = -0.1f;
}
if (normalizeModel)
{
((EntityState)this).modelLocator.normalizeToFloor = true;
}
}
public override void FixedUpdate()
{
//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_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_004f: Unknown result type (might be due to invalid IL or missing references)
((EntityState)this).FixedUpdate();
if (!turningAllowed)
{
cachedForward = ((EntityState)this).characterDirection.forward;
((EntityState)this).characterDirection.turnSpeed = 0f;
((EntityState)this).characterDirection.moveVector = cachedForward;
((EntityState)this).characterDirection.forward = cachedForward;
((EntityState)this).characterBody.aimTimer = -0.1f;
}
if (Object.op_Implicit((Object)(object)_animator))
{
if (((BaseState)this).isGrounded)
{
_animator.SetFloat("airBlend", 0f);
}
else
{
_animator.SetFloat("airBlend", 1f);
}
}
}
public override void OnExit()
{
((EntityState)this).OnExit();
if (!turningAllowed)
{
((EntityState)this).characterDirection.turnSpeed = nemesis.baseTurnSpeed;
}
if (normalizeModel)
{
((EntityState)this).modelLocator.normalizeToFloor = false;
}
}
}
public class ChargedJumpState : BaseNemesisMain
{
public float charge;
private float minPower = 24f;
private float maxPower = 40f;
private float duration = 0.2f;
private bool hasJumped;
private Animator animator;
public override void OnEnter()
{
//IL_002c: 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_003b: Unknown result type (might be due to invalid IL or missing references)
base.OnEnter();
animator = ((EntityState)this).GetModelAnimator();
animator.SetTrigger("forceCancel");
CharacterMotor characterMotor = ((EntityState)this).characterMotor;
characterMotor.velocity *= 0.25f;
PlayAnimation();
((Behaviour)((EntityState)this).modelLocator).enabled = false;
}
public override void OnExit()
{
((GenericCharacterMain)this).OnExit();
((Behaviour)((EntityState)this).modelLocator).enabled = true;
}
public override void UpdateAnimationParameters()
{
}
protected virtual void PlayAnimation()
{
if (Object.op_Implicit((Object)(object)animator))
{
((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty");
((EntityState)this).PlayAnimation("Body", "Jump");
animator.SetFloat("jumpType", ((Vector3)(ref ((EntityState)this).inputBank.moveVector)).magnitude);
}
}
public override void FixedUpdate()
{
//IL_0062: 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)
((GenericCharacterMain)this).FixedUpdate();
if (((EntityState)this).fixedAge >= 0.4f * duration)
{
if (!hasJumped)
{
hasJumped = true;
Jump();
PlaySound();
}
}
else if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
{
CharacterMotor characterMotor = ((EntityState)this).characterMotor;
characterMotor.moveDirection *= 0.2f;
}
if (((EntityState)this).fixedAge >= duration)
{
((EntityState)this).outer.SetNextStateToMain();
}
else if (((BaseCharacterMain)this).hasModelAnimator && ((BaseCharacterMain)this).characterAnimParamAvailability.isGrounded)
{
((BaseCharacterMain)this).modelAnimator.SetBool(AnimationParameters.isGrounded, false);
}
}
public override void ProcessJump()
{
}
protected virtual void Jump()
{
//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_0066: Unknown result type (might be due to invalid IL or missing references)
//IL_0072: Unknown result type (might be due to invalid IL or missing references)
//IL_0083: 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_00bf: 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_005d: 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)
((Behaviour)((EntityState)this).modelLocator).enabled = true;
((EntityState)this).characterBody.isSprinting = true;
CharacterMotor characterMotor = ((EntityState)this).characterMotor;
characterMotor.jumpCount++;
Vector3 val = ((EntityState)this).characterMotor.moveDirection;
val.y = 0f;
float magnitude = ((Vector3)(ref val)).magnitude;
if (magnitude > 0f)
{
val /= magnitude;
}
Vector3 velocity = val * ((EntityState)this).characterBody.moveSpeed * (3f + charge);
float num = Util.Remap(charge, 0.2f, 1f, minPower, maxPower);
velocity.y = num * 1.35f;
((EntityState)this).characterMotor.velocity = velocity;
((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f);
SpawnEffect();
}
protected virtual void SpawnEffect()
{
//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_0012: Unknown result type (might be due to invalid IL or missing references)
//IL_001d: Unknown result type (might be due to invalid IL or missing references)
//IL_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_002e: Unknown result type (might be due to invalid IL or missing references)
//IL_0033: Unknown result type (might be due to invalid IL or missing references)
//IL_0044: Expected O, but got Unknown
EffectManager.SpawnEffect(HunkAssets.nemAirDashEffect, new EffectData
{
origin = ((EntityState)this).characterBody.footPosition,
rotation = Util.QuaternionSafeLookRotation(((EntityState)this).characterMotor.velocity),
scale = 1f
}, true);
}
protected virtual void PlaySound()
{
Util.PlaySound("sfx_nemesis_jump_big", ((EntityState)this).gameObject);
}
}
public class ChargeFist : BaseNemesisSkillState
{
public float baseDuration = 0.8f;
private float duration;
public override void OnEnter()
{
base.OnEnter();
duration = baseDuration / ((BaseState)this).attackSpeedStat;
base.nemesis.forceNoSprint = true;
((EntityState)this).PlayCrossfade("Gesture, Override", "ChargeFist", "Fist.playbackRate", duration, 0.1f);
Util.PlaySound("sfx_nemesis_grunt", ((EntityState)this).gameObject);
}
public override void OnExit()
{
base.OnExit();
base.nemesis.forceNoSprint = false;
((EntityState)this).PlayAnimation("Gesture, Override", "BufferEmpty");
}
public override void FixedUpdate()
{
base.FixedUpdate();
((EntityState)this).characterBody.outOfCombatStopwatch = 0f;
((EntityState)this).characterBody.SetAimTimer(0.1f);
if (((EntityState)this).fixedAge >= duration)
{
if (((EntityState)this).isAuthority && !((EntityState)this).inputBank.skill1.down)
{
((EntityState)this).outer.SetNextState((EntityState)(object)new SlamFist());
}
else if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= 2f * duration)
{
((EntityState)this).outer.SetNextState((EntityState)(object)new SlamFist());
}
}
}
public override InterruptPriority GetMinimumInterruptPriority()
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
return (InterruptPriority)3;
}
}
public class Death : GenericCharacterDeath
{
private bool hasDied;
private bool poopoo;
public override void OnEnter()
{
((GenericCharacterDeath)this).OnEnter();
NemesisController component = ((EntityState)this).GetComponent<NemesisController>();
if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.grabbedEnemy))
{
component.grabbedEnemy.Release();
}
((EntityState)this).PlayAnimation("FullBody, Override", "DeathLeap");
Util.PlaySound("sfx_nemesis_roar_soft", ((EntityState)this).gameObject);
}
public override void FixedUpdate()
{
//IL_0045: Unknown result type (might be due to invalid IL or missing references)
//IL_004a: Unknown result type (might be due to invalid IL or missing references)
//IL_0051: 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_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_0067: Unknown result type (might be due to invalid IL or missing references)
//IL_006c: Unknown result type (might be due to invalid IL or missing references)
//IL_007d: Expected O, but got Unknown
((GenericCharacterDeath)this).FixedUpdate();
if (!poopoo && ((EntityState)this).fixedAge >= 0.5f)
{
poopoo = true;
Util.PlaySound("sfx_nemesis_jump_big", ((EntityState)this).gameObject);
EffectManager.SpawnEffect(HunkAssets.nemAirDashEffect, new EffectData
{
origin = ((EntityState)this).characterBody.footPosition,
rotation = Util.QuaternionSafeLookRotation(Vector3.up),
scale = 1f
}, false);
}
if (NetworkServer.active && !hasDied && ((EntityState)this).fixedAge >= 2f)
{
hasDied = true;
((GenericCharacterDeath)this).DestroyBodyAsapServer();
EntityState.Destroy((Object)(object)((EntityState)this).gameObject);
}
}
public override void OnExit()
{
((GenericCharacterDeath)this).DestroyModel();
((GenericCharacterDeath)this).OnExit();
}
}
public class Enrage : BaseNemesisSkillState
{
public float baseDuration = 4.5f;
private bool hasRoared = false;
private float duration;
private BlastAttack vacuum;
public override void OnEnter()
{
//IL_006c: Unknown result type (might be due to invalid IL or missing references)
//IL_0076: Expected O, but got Unknown
//IL_009f: Unknown result type (might be due to invalid IL or missing references)
//IL_00da: Unknown result type (might be due to invalid IL or missing references)
//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
//IL_0105: Unknown result type (might be due to invalid IL or missing references)
//IL_0111: Unknown result type (might be due to invalid IL or missing references)
//IL_011d: Unknown result type (might be due to invalid IL or missing references)
//IL_012a: Unknown result type (might be due to invalid IL or missing references)
//IL_012f: Unknown result type (might be due to invalid IL or missing references)
base.OnEnter();
duration = baseDuration;
((EntityState)this).PlayCrossfade("FullBody, Override", "Roar", "Roar.playbackRate", duration, 0.1f);
Util.PlaySound("sfx_nemesis_roar", ((EntityState)this).gameObject);
base.nemesis.enrageTimer = 25f + (float)(1 + base.nemesis.knockdownCount) * 2f;
vacuum = new BlastAttack();
vacuum.attacker = ((EntityState)this).gameObject;
vacuum.inflictor = ((EntityState)this).gameObject;
vacuum.teamIndex = (TeamIndex)0;
vacuum.procCoefficient = 0f;
vacuum.radius = 60f;
vacuum.baseForce = 8000f;
vacuum.bonusForce = Vector3.up * 200f;
vacuum.baseDamage = 0f;
vacuum.falloffModel = (FalloffModel)1;
vacuum.damageColorIndex = (DamageColorIndex)0;
vacuum.attackerFiltering = (AttackerFiltering)2;
vacuum.damageType = DamageTypeCombo.op_Implicit((DamageType)32);
}
public override void FixedUpdate()
{
//IL_005e: Unknown result type (might be due to invalid IL or missing references)
//IL_0080: Unknown result type (might be due to invalid IL or missing references)
//IL_0085: Unknown result type (might be due to invalid IL or missing references)
//IL_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_00a0: Unknown result type (might be due to invalid IL or missing references)
base.FixedUpdate();
if (!hasRoared && ((EntityState)this).fixedAge >= 0.23f * duration)
{
hasRoared = true;
GameObject val = Object.Instantiate<GameObject>(HunkAssets.nemRoarEffect);
val.transform.SetParent(((BaseState)this).FindModelChild("HeadCenter"));
val.transform.localPosition = Vector3.zero;
if (((EntityState)this).isAuthority)
{
vacuum.position = ((EntityState)this).transform.position;
vacuum.bonusForce = Vector3.zero;
vacuum.Fire();
}
}
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)3;
}
}
public class Knockdown : BaseNemesisSkillState
{
public float baseDuration = 30f;
private float duration;
private uint playID;
public override void OnEnter()
{
//IL_01f6: Unknown result type (might be due to invalid IL or missing references)
//IL_0200: Unknown result type (might be due to invalid IL or missing references)
//IL_0219: 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_0245: Unknown result type (might be due to invalid IL or missing references)
//IL_0246: Unknown result type (might be due to invalid IL or missing references)
base.OnEnter();
duration = baseDuration;
if (base.nemesis.knockdownCount > 0)
{
duration /= 1f + (float)base.nemesis.knockdownCount * 0.25f;
}
base.nemesis.knockdownCount++;
base.nemesis.currentKnockdownCount++;
((EntityState)this).PlayCrossfade("FullBody, Override", "Knockdown", 0.1f);
Util.PlaySound("sfx_nemesis_roar_soft", ((EntityState)this).gameObject);
base.nemesis.iFrames = 31f;
playID = Util.PlaySound("sfx_nemesis_heal_loop", ((EntityState)this).gameObject);
if (!((EntityState)this).characterBody.isPlayerControlled)
{
if (!base.nemesis.hasDroppedCase)
{
base.nemesis.hasDroppedCase = true;
base.nemesis.DropCase();
if (Object.op_Implicit((Object)(object)base.nemesis.target) && Object.op_Implicit((Object)(object)base.nemesis.target.inventory))
{
base.nemesis.target.inventory.GiveItem(HunkMod.Modules.Survivors.Hunk.nemesisMutationHiddenItem, 1);
}
}
CharacterBody characterBody = ((EntityState)this).characterBody;
characterBody.baseMaxHealth *= 2f;
CharacterBody characterBody2 = ((EntityState)this).characterBody;
characterBody2.baseMoveSpeed *= 1.05f;
CharacterBody characterBody3 = ((EntityState)this).characterBody;
characterBody3.baseDamage *= 1.1f;
CharacterBody characterBody4 = ((EntityState)this).characterBody;
characterBody4.baseArmor *= 1.5f;
if (((EntityState)this).characterBody.baseMoveSpeed >= 9f)
{
((EntityState)this).characterBody.baseMoveSpeed = 9f;
}
if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody.inventory) && ((EntityState)this).characterBody.inventory.currentEquipmentIndex == Equipment.EliteVoidEquipment.equipmentIndex)
{
((EntityState)this).characterBody.inventory.SetEquipment(EquipmentState.empty, (uint)((EntityState)this).characterBody.inventory.activeEquipmentSlot);
CharacterBody characterBody5 = ((EntityState)this).characterBody;
characterBody5.bodyFlags = (BodyFlags)(characterBody5.bodyFlags & -1025);
((EntityState)this).characterBody.teamComponent.teamIndex = (TeamIndex)2;
}
}
else
{
base.nemesis.iFrames = 8f;
duration = 5f;
Util.PlaySound("sfx_nemesis_revive", ((EntityState)this).gameObject);
ModelLocator modelLocator = ((EntityState)this).modelLocator;
if (Object.op_Implicit((Object)(object)modelLocator))
{
Transform modelTransform = modelLocator.modelTransform;
if (Object.op_Implicit((Object)(object)modelTransform))
{
TemporaryOverlayInstance val = TemporaryOverlayManager.AddOverlay(((Component)modelTransform).gameObject);
val.duration = 2f;
val.destroyComponentOnEnd = true;
val.originalMaterial = HunkAssets.ravagerMat;
val.inspectorCharacterModel = ((Component)modelTransform).GetComponent<CharacterModel>();
val.alphaCurve = AnimationCurve.EaseInOut(0f, 30f, 1f, 0f);
val.animateShaderAlpha = true;
}
}
}
base.nemesis.biomass = 0;
((EntityState)this).characterBody.RecalculateStats();
}
public override void FixedUpdate()
{
base.FixedUpdate();
((EntityState)this).healthComponent.health = ((EntityState)this).healthComponent.fullHealth;
if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
{
if (((EntityState)this).characterBody.HasBuff(Buffs.VoidFogStrong) || ((EntityState)this).characterBody.HasBuff(Buffs.VoidFogMild))
{
((EntityState)this).outer.SetNextState((EntityState)(object)new LeapToTarget());
}
else
{
((EntityState)this).outer.SetNextState((EntityState)(object)new KnockdownEnd());
}
}
}
public override void OnExit()
{
base.OnExit();
AkSoundEngine.StopPlayingID(playID);
}
public override InterruptPriority GetMinimumInterruptPriority()
{
//IL_0003: Unknown result type (might be due to invalid IL or missing references)
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
return (InterruptPriority)9;
}
}
public class KnockdownEnd : BaseNemesisSkillState
{
public float baseDuration = 1.5f;
private float duration;
public override void OnEnter()
{
base.OnEnter();
duration = baseDuration;
base.nemesis.iFrames = duration;
if (Object.op_Implicit((Object)(object)base.nemesis.target) && Object.op_Implicit((Object)(object)base.nemesis.target.inventory) && base.nemesis.target.inventory.GetItemCount(HunkMod.Modules.Survivors.Hunk.starsBadge) > 0)
{
((EntityState)this).outer.SetNextState((EntityState)(object)new Death());
return;
}
if (base.nemesis.currentKnockdownCount >= 2)
{
((EntityState)this).outer.SetNextState((EntityState)(object)new Death());
return;
}
((EntityState)this).PlayCrossfade("FullBody, Override", "KnockdownEnd", "Knockdown.playbackRate", duration, 0.05f);
Util.PlaySound("sfx_nemesis_heal", ((EntityState)this).gameObject);
}
public override void FixedUpdate()
{
base.FixedUpdate();
if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
{
if (((EntityState)this).characterBody.isPlayerControlled)
{
((EntityState)this).outer.SetNextStateToMain();
}
else
{
((EntityState)this).outer.SetNextState((EntityState)(object)new Enrage());
}
}
}
public override InterruptPriority GetMinimumInterruptPriority()
{
//IL_0003: Unknown result type (might be due to invalid IL or missing references)
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
return (InterruptPriority)9;
}
}
public class MainState : BaseNemesisMain
{
public bool bufferAirDash = false;
private float airDashStopwatch;
private Vector3 dashVector;
private Vector3 wallDir;
private Vector3 wallPos;
private GameObject lastObjectVaulted;
private bool isWallRunning;
private Transform modelBase;
private float superSprintTimer;
private OverlapAttack chargeAttack;
private HitBoxGroup hitboxGroup;
private float chargeCooldown;
private float _lastYSpeed;
private bool wasGrounded2;
private NemesisJumpController jumpController;
public override void OnEnter()
{
//IL_0078: Unknown result type (might be due to invalid IL or missing references)
//IL_0082: Expected O, but got Unknown
//IL_00ab: 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_00e7: 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_00fc: Unknown result type (might be due to invalid IL or missing references)
//IL_0101: Unknown result type (might be due to invalid IL or missing references)
//IL_013a: 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_014b: Unknown result type (might be due to invalid IL or missing references)
base.OnEnter();
jumpController = ((EntityState)this).GetComponent<NemesisJumpController>();
modelBase = ((EntityState)this).GetModelTransform();
if (!Object.op_Implicit((Object)(object)hitboxGroup))
{
Transform modelTransform = ((EntityState)this).GetModelTransform();
if (Object.op_Implicit((Object)(object)modelTransform))
{
hitboxGroup = Array.Find(((Component)modelTransform).GetComponents<HitBoxGroup>(), (HitBoxGroup element) => element.groupName == "Charge");
}
}
chargeAttack = new OverlapAttack();
chargeAttack.attacker = ((EntityState)this).gameObject;
chargeAttack.inflictor = ((EntityState)this).gameObject;
chargeAttack.teamIndex = (TeamIndex)(-1);
chargeAttack.damage = 1f * ((BaseState)this).damageStat;
chargeAttack.hitEffectPrefab = HunkAssets.kickImpactEffect;
chargeAttack.impactSound = HunkAssets.punchImpactSoundDef.index;
chargeAttack.forceVector = Vector3.up * 200f;
chargeAttack.isCrit = false;
chargeAttack.pushAwayForce = 4000f;
chargeAttack.hitBoxGroup = hitboxGroup;
chargeAttack.attackerFiltering = (AttackerFiltering)2;
chargeAttack.damageType = DamageTypeCombo.op_Implicit((DamageType)0);
}
public override void OnExit()
{
((GenericCharacterMain)this).OnExit();
((Behaviour)((EntityState)this).modelLocator).enabled = true;
if (nemesis.isCharging)
{
((EntityState)this).characterBody.sprintingSpeedMultiplier = 2.85f;
((EntityState)this).characterBody.RecalculateStats();
}
nemesis.isCharging = false;
}
public override void FixedUpdate()
{
//IL_0130: Unknown result type (might be due to invalid IL or missing references)
//IL_0136: 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_014b: Unknown result type (might be due to invalid IL or missing references)
//IL_0150: Unknown result type (might be due to invalid IL or missing references)
//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_0177: Unknown result type (might be due to invalid IL or missing references)
//IL_0188: Unknown result type (might be due to invalid IL or missing references)
//IL_018d: Unknown result type (might be due to invalid IL or missing references)
//IL_019d: Unknown result type (might be due to invalid IL or missing references)
//IL_01b9: 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_01e0: Unknown result type (might be due to invalid IL or missing references)
//IL_01f0: Unknown result type (might be due to invalid IL or missing references)
//IL_01f5: Unknown result type (might be due to invalid IL or missing references)
//IL_01fa: Unknown result type (might be due to invalid IL or missing references)
//IL_0317: Unknown result type (might be due to invalid IL or missing references)
//IL_0321: Expected O, but got Unknown
//IL_034a: Unknown result type (might be due to invalid IL or missing references)
//IL_034f: Unknown result type (might be due to invalid IL or missing references)
//IL_0386: Unknown result type (might be due to invalid IL or missing references)
//IL_038b: Unknown result type (might be due to invalid IL or missing references)
//IL_0396: Unknown result type (might be due to invalid IL or missing references)
//IL_03a0: Unknown result type (might be due to invalid IL or missing references)
//IL_03a5: Unknown result type (might be due to invalid IL or missing references)
//IL_03de: Unknown result type (might be due to invalid IL or missing references)
//IL_03ea: Unknown result type (might be due to invalid IL or missing references)
//IL_03ef: Unknown result type (might be due to invalid IL or missing references)
if (!Object.op_Implicit((Object)(object)((EntityState)this).characterBody) || !Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
{
return;
}
if (!((BaseState)this).isGrounded && ((EntityState)this).characterMotor.velocity.y <= -5f)
{
_lastYSpeed = ((EntityState)this).characterMotor.velocity.y;
}
if (((BaseState)this).isGrounded && !wasGrounded2)
{
Landing(_lastYSpeed);
}
wasGrounded2 = ((BaseState)this).isGrounded;
if (Object.op_Implicit((Object)(object)((BaseCharacterMain)this).modelAnimator))
{
if (Object.op_Implicit((Object)(object)nemesis) && Object.op_Implicit((Object)(object)nemesis.grabbedEnemy))
{
((BaseCharacterMain)this).modelAnimator.SetFloat("clingBlend", 1f);
}
else
{
((BaseCharacterMain)this).modelAnimator.SetFloat("clingBlend", 0f);
}
((BaseCharacterMain)this).modelAnimator.SetBool("wallCling", isWallRunning);
}
if (isWallRunning)
{
Vector3 val = wallPos + wallDir * jumpController.wallOffset;
((EntityState)this).characterBody.isSprinting = false;
((EntityState)this).characterDirection.moveVector = wallDir;
((EntityState)this).characterDirection.forward = wallDir;
((EntityState)this).characterMotor.velocity = Vector3.zero;
((BaseCharacterController)((EntityState)this).characterMotor).Motor.SetPosition(val, true);
((Behaviour)((EntityState)this).modelLocator).enabled = false;
((EntityState)this).transform.position = val;
((Component)modelBase).transform.position = val;
((Component)modelBase).transform.rotation = Util.QuaternionSafeLookRotation(wallPos - ((Component)modelBase).transform.position);
}
else
{
((Behaviour)((EntityState)this).modelLocator).enabled = true;
}
if (airDashStopwatch > 0f)
{
HandleAirDash();
}
if (((EntityState)this).characterBody.isPlayerControlled)
{
if (((EntityState)this).characterBody.isSprinting && ((BaseState)this).isGrounded)
{
superSprintTimer += Time.fixedDeltaTime;
if (Object.op_Implicit((Object)(object)nemesis.grabbedEnemy))
{
superSprintTimer = 0f;
}
if (superSprintTimer >= 3f)
{
if (!nemesis.isCharging)
{
((EntityState)this).characterBody.sprintingSpeedMultiplier = 4.75f;
((EntityState)this).characterBody.RecalculateStats();
}
nemesis.isCharging = true;
if (chargeCooldown <= 0f)
{
chargeCooldown = 0.15f;
chargeAttack = new OverlapAttack();
chargeAttack.attacker = ((EntityState)this).gameObject;
chargeAttack.inflictor = ((EntityState)this).gameObject;
chargeAttack.teamIndex = ((BaseState)this).GetTeam();
chargeAttack.damage = 4f * ((BaseState)this).damageStat;
chargeAttack.hitEffectPrefab = HunkAssets.kickImpactEffect;
chargeAttack.impactSound = HunkAssets.punchImpactSoundDef.index;
chargeAttack.forceVector = Vector3.up * 20f;
chargeAttack.isCrit = false;
chargeAttack.pushAwayForce = 4000f;
chargeAttack.hitBoxGroup = hitboxGroup;
chargeAttack.attackerFiltering = (AttackerFiltering)2;
chargeAttack.damageType = DamageTypeCombo.op_Implicit((DamageType)0);
chargeAttack.Fire((List<HurtBox>)null);
}
}
else
{
if (nemesis.isCharging)
{
((EntityState)this).characterBody.sprintingSpeedMultiplier = 2.85f;
((EntityState)this).characterBody.RecalculateStats();
}
nemesis.isCharging = false;
}
}
else
{
if (nemesis.isCharging)
{
((EntityState)this).characterBody.sprintingSpeedMultiplier = 2.85f;
((EntityState)this).characterBody.RecalculateStats();
}
superSprintTimer = 0f;
nemesis.isCharging = false;
}
((BaseCharacterMain)this).modelAnimator.SetBool("isSuperSprinting", nemesis.isCharging);
}
HandleExtraMovement();
HandleGravityBoost();
UpdateAnimationParameters2();
((GenericCharacterMain)this).FixedUpdate();
airDashStopwatch -= Time.fixedDeltaTime;
chargeCooldown -= Time.fixedDeltaTime;
if (Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && !((BaseState)this).isGrounded && bufferAirDash)
{
AirDash();
}
if (Object.op_Implicit((Object)(object)((BaseCharacterMain)this).modelAnimator))
{
((BaseCharacterMain)this).modelAnimator.SetFloat("jumpCharge", jumpController.jumpCharge);
}
if (((BaseState)this).isGrounded)
{
lastObjectVaulted =