Decompiled source of HideAndSeekMonster v2.1.0

BepInEx/plugins/HideAndSeekMonster/HideAndSeekMonster.dll

Decompiled 4 days ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using System.Text;
using System.Text.RegularExpressions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using ExitGames.Client.Photon;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using Photon.Pun;
using Photon.Realtime;
using TMPro;
using UnityEngine;
using UnityEngine.AI;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Controls;
using UnityEngine.InputSystem.Utilities;
using UnityEngine.Rendering;
using UnityEngine.TextCore;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("Napguin")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyCopyright("Copyright © Napguin 2026")]
[assembly: AssemblyDescription("BepInEx plugin for R.E.P.O.: hide and seek game mode where one player becomes a monster. Source: https://github.com/Napguin/REPO-Monster-Hide-and-Seek")]
[assembly: AssemblyFileVersion("2.1.0.0")]
[assembly: AssemblyInformationalVersion("2.1.0+7cbe030f97df3af607f05fa33becdf42c9b5685d")]
[assembly: AssemblyProduct("Hide And Seek Monster")]
[assembly: AssemblyTitle("Hide And Seek Monster – R.E.P.O. mod (BepInEx plugin)")]
[assembly: AssemblyMetadata("RepositoryUrl", "https://github.com/Napguin/REPO-Monster-Hide-and-Seek")]
[assembly: NeutralResourcesLanguage("en")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("2.1.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace HideAndSeekMonster
{
	public class HideAndSeekManager : MonoBehaviour, IOnEventCallback
	{
		internal enum ItemRole
		{
			None,
			Both,
			Hiders,
			Hunter
		}

		private class Minion
		{
			public int Id;

			public bool Banger;

			public GameObject Go;

			public Animator Anim;

			public Vector3 Pos;

			public Vector3 NetPos;

			public float Yaw;

			public float NetYaw;

			public float DieAt;

			public float NextHit;

			public float FuseAt = -1f;

			public float RepathAt;

			public Vector3[] Path = (Vector3[])(object)new Vector3[0];

			public int Corner;

			public Vector3 Offset;

			public bool Exploded;
		}

		private enum MenuPage
		{
			Main,
			Showcase,
			HowToPlay
		}

		private class ShowcaseEntry
		{
			public string Key;

			public AbilityType Ability;

			public string OnlyMonster;
		}

		private class HostLaunchJob
		{
			public PlayerAvatar Victim;

			public Vector3 Dir;

			public float Start;

			public float Pushed;

			public float LogAt;

			public float RequestAt;

			public float Speed = 22f;
		}

		private const int MsgSpecial = 10;

		private const int MsgDamage = 11;

		private float _revealUntil;

		private readonly List<(Vector3 pos, string name)> _radarTargets = new List<(Vector3, string)>();

		private float _chargeUntil;

		private AbilityType _chargeType;

		private float _grabUntil;

		private AbilityType _grabType;

		private bool _grabStunShown;

		private bool _grabCaught;

		private float _dashStart;

		private float _dashEnd;

		private AbilityType _dashType;

		private Vector3 _dashDir;

		private readonly HashSet<int> _dashHit = new HashSet<int>();

		private float _chargeTickAt;

		private float _laserTickAt;

		private readonly HashSet<int> _leapHit = new HashSet<int>();

		private float _leapUntil;

		private float _stunUntil;

		private readonly List<Projectile> _projectiles = new List<Projectile>();

		private const float ScanRange = 15f;

		private readonly Dictionary<int, int> _hp = new Dictionary<int, int>();

		private readonly Dictionary<int, float> _lastMonsterHit = new Dictionary<int, float>();

		private float _hpSyncTick;

		private float _pukeUntil;

		private float _pukeTickAt;

		private float _pukeFxAt;

		private float _pullUntil;

		private float _pullFxAt;

		private float _levitateUntil;

		private float _chargeFxAt;

		private bool _pulled;

		private bool _levitating;

		private readonly List<(Vector3 pos, float until)> _clouds = new List<(Vector3, float)>();

		private float _cloudTickAt;

		private readonly List<(float at, Action act)> _later = new List<(float, Action)>();

		private bool _dashLocalDone;

		private bool _dashFromSet;

		private Vector3 _dashFrom;

		private float _dashDoneAt;

		private readonly List<GasCloud> _gas = new List<GasCloud>();

		private bool _tranqShown;

		private float _tranqUntil;

		private float _grabFxAt;

		private readonly HashSet<int> _zeroGCaught = new HashSet<int>();

		private float _zeroGRequestAt;

		private float _zeroGLogAt;

		private const int MsgReveal = 14;

		private const int MsgRegroup = 15;

		private const int MsgVoteStart = 16;

		private const int MsgVote = 17;

		private const int MsgVoteState = 18;

		private const int MsgVoteResult = 19;

		private const float RevealSeconds = 6f;

		private const float VoteSeconds = 15f;

		private int[] _revealIds = new int[0];

		private float _revealEndAt;

		private bool _voteOpen;

		private float _voteEndAt;

		private string[] _voteMaps = new string[0];

		private int[] _voteMapCounts = new int[0];

		private string[] _voteVolunteers = new string[0];

		private bool _myVolunteer;

		private int _myMapVote;

		private string _voteResultText;

		private float _voteResultUntil;

		private string[] _voteMapIds = new string[0];

		private readonly Dictionary<int, bool> _hostVolunteers = new Dictionary<int, bool>();

		private readonly Dictionary<int, int> _hostMapVotes = new Dictionary<int, int>();

		private Coroutine _afterRound;

		internal static string PendingLevel;

		private string _nextSeekerKey;

		private bool _animTunerOpen;

		private int _tuneRole;

		private int _tuneClip = -1;

		private float _tuneA;

		private float _tuneB = 1f;

		private float _tuneSpeed = 1f;

		private bool _tuneLoop;

		private string _tuneLoadedFor;

		private string _tuneMsg = "";

		private GUIStyle _fitBtnStyle;

		private GUIStyle _fitLabelStyle;

		private Vector2 _tuneScroll;

		private const int MsgBalloon = 23;

		private readonly List<Balloon> _balloons = new List<Balloon>();

		private int _balloonNextId;

		private float _balloonCheckAt;

		private readonly List<float> _balloonRecharge = new List<float>();

		private const int MsgOwner = 27;

		private bool _roundClassic;

		private static readonly Dictionary<int, int> _itemOwner = new Dictionary<int, int>();

		private const int MsgItemLock = 29;

		private static readonly HashSet<int> _lockedItems = new HashSet<int>();

		private readonly Dictionary<int, string> _hostItemKey = new Dictionary<int, string>();

		private Object _ownedScanLevel;

		private float _ownedScanAt;

		private readonly HashSet<int> _ownedMissing = new HashSet<int>();

		internal bool MapChanging;

		private const int MsgDebug = 25;

		private const int DbgHeal = 1;

		private const int DbgTeleport = 2;

		private const int DbgSkipHide = 3;

		private const int DbgResetCooldowns = 4;

		private bool _debugOpen;

		private int _debugEnemy;

		private Vector2 _debugScroll;

		private static readonly HashSet<EnemyParent> _debugSpawned = new HashSet<EnemyParent>();

		private List<(string name, PrefabRef prefab)> _dbgValuables;

		private List<(string name, PrefabRef prefab)> _dbgItems;

		private int _debugValuable;

		private int _debugItem;

		private float _dbgListAt;

		private GUIStyle _mCenterSmall;

		private const byte EventCode = 147;

		private const string Magic = "HNSM";

		private const int MsgStart = 1;

		private const int MsgKill = 2;

		private const int MsgEnd = 3;

		private const int MsgAttack = 4;

		private const int MsgRoar = 5;

		private const int MsgLaser = 6;

		private const int MsgAim = 7;

		private const int MsgChoose = 8;

		private const int MsgScore = 9;

		private const int MsgMonsterSet = 24;

		private const string RandomMonster = "<random>";

		private float _phaseEndTime;

		private float _roundHuntTime;

		private float _roundSpeed = 1f;

		private bool _roundInfStamina;

		private bool _roundBlind;

		private float _roundAttackRange = 2.8f;

		private MonsterVisual _monster;

		private string _monsterName;

		private readonly HashSet<int> _hiderViewIds = new HashSet<int>();

		private bool _thirdPerson = true;

		private float _attackReadyAt;

		private float _roarReadyAt;

		private float _lungeUntil;

		private InputAction _attackAction;

		private InputAction _roarAction;

		private InputAction _viewAction;

		private InputAction _specialAction;

		private float _specialReadyAt;

		private bool _roundSeekerChooses;

		private bool _choiceOpen;

		private float _roundScale = 1f;

		private Vector2 _choiceScroll;

		private float _hideDuration = 30f;

		private readonly Dictionary<Color, Texture2D> _texCache = new Dictionary<Color, Texture2D>();

		private GUIStyle _cardStyle;

		private GUIStyle _cardSelStyle;

		private GUIStyle _chTitle;

		private GUIStyle _chBody;

		private GUIStyle _chBtn;

		private GUIStyle _chBtnMain;

		private float _laserChargeUntil = -1f;

		private float _laserEndTime = -1f;

		private Vector3 _laserAim = Vector3.forward;

		private float _aimSendTimer;

		private const float LaserCharge = 0.6f;

		private bool _roundTest;

		private readonly List<TestDummy> _dummies = new List<TestDummy>();

		private int _dummyCounter;

		private bool _debugOverlay = true;

		private int _rawAttackPresses;

		private int _rawRoarPresses;

		private string _lastError = "none";

		private string _lastAttackInfo = "-";

		private int _attackCount;

		private int _killCount;

		private GUIStyle _debugStyle;

		private readonly Dictionary<int, float> _hiderOutTime = new Dictionary<int, float>();

		private readonly Dictionary<int, string> _roundNames = new Dictionary<int, string>();

		private readonly Dictionary<int, string> _roundKeys = new Dictionary<int, string>();

		private readonly HashSet<int> _seekerKilled = new HashSet<int>();

		private int _roundSeekerId = -1;

		private readonly Dictionary<string, int> _totals = new Dictionary<string, int>();

		private readonly Dictionary<string, string> _totalNames = new Dictionary<string, string>();

		private string[] _sbNames = new string[0];

		private int[] _sbRound = new int[0];

		private int[] _sbTotal = new int[0];

		private bool[] _sbSeeker = new bool[0];

		private float _resultsUntil;

		private GUIStyle _scoreStyle;

		private readonly Dictionary<int, float> _killCooldown = new Dictionary<int, float>();

		private float _enemyTick;

		private float _despawnPauseUntil;

		private bool _menuOpen;

		private int _selectedViewId = -1;

		private string _selectedMonster = "<random>";

		private string _bannerText;

		private Color _bannerColor = Color.white;

		private float _bannerUntil;

		private float _flashUntil;

		private Texture2D _white;

		private GUIStyle _bigStyle;

		private GUIStyle _hudStyle;

		private GUIStyle _smallStyle;

		private readonly Dictionary<InputAction, List<ButtonControl>> _actionControls = new Dictionary<InputAction, List<ButtonControl>>();

		private bool _actionsOffLogged;

		private float _stunnedMsgAt;

		private float _diagAt;

		private bool _hostEndSent;

		private readonly Dictionary<string, float> _errorLogged = new Dictionary<string, float>();

		private bool _roundBanWeapons;

		private float _banMsgAt;

		private readonly Dictionary<int, bool> _bannedCache = new Dictionary<int, bool>();

		private const int MsgFreeItem = 26;

		private bool _freePickOpen;

		private bool _freeItemTaken;

		private int _freePickSel;

		private Vector2 _freePickScroll;

		private List<string> _freeItemList;

		private readonly HashSet<int> _hostFreeItemGiven = new HashSet<int>();

		private readonly HashSet<int> _hostStartWeaponGiven = new HashSet<int>();

		private bool _roundFreeItem;

		private bool _startWeaponTaken;

		private List<string> _hunterExtraList;

		private List<string> _monsterItemList;

		private static bool _rolesLogged;

		private List<string> _startWeaponList;

		private float _iconScanAt;

		private readonly Dictionary<string, Sprite> _itemIcons = new Dictionary<string, Sprite>();

		private bool _iconLogged;

		private readonly Dictionary<string, float> _iconRetryAt = new Dictionary<string, float>();

		private static Dictionary<string, (Texture tex, Rect px)> _emoji;

		private static readonly HashSet<string> _emojiMissLogged = new HashSet<string>();

		private static readonly itemType[] CategoryOrder;

		private GUIStyle _cellLabel;

		private static readonly Dictionary<int, int> _pistolShots;

		internal const int PistolShots = 2;

		private const int MsgItem = 20;

		private const float ItemPickRange = 4f;

		private const float ItemThrowSpeed = 32f;

		private const float ItemFlyTime = 2.5f;

		private Rigidbody _heldItem;

		private readonly List<(Rigidbody rb, float until, HashSet<int> hit)> _flying = new List<(Rigidbody, float, HashSet<int>)>();

		private bool _holdingItem;

		private readonly List<(Collider a, Collider b)> _itemIgnored = new List<(Collider, Collider)>();

		private const int MsgLasso = 22;

		private const int LassoMiss = -1;

		private const int LassoDummy = -2;

		private Vector3 _lassoOrigin;

		private Vector3 _lassoDir;

		private float _lassoFlyStart;

		private float _lassoMaxDist;

		private float _lassoUntil;

		private float _lassoMissHideAt;

		private bool _lassoFlying;

		private PlayerAvatar _lassoVictim;

		private TestDummy _lassoDummy;

		private TestDummy _lassoPendingDummy;

		private LineRenderer _lassoLine;

		private Vector2 _menuScrollSeeker;

		private Vector2 _menuScrollMonster;

		private Vector2 _menuScrollRules;

		private GUIStyle _mHead;

		private GUIStyle _mSection;

		private GUIStyle _mSmall;

		private GUIStyle _pillOn;

		private GUIStyle _pillOff;

		private GUIStyle _mValue;

		private GUIStyle _mCredits;

		private readonly Dictionary<string, float> _menuErrorAt = new Dictionary<string, float>();

		private float _rulesW = 300f;

		private const int MsgMinionState = 12;

		private const int MsgMinionDie = 13;

		private const int MinionCount = 5;

		private const float MinionLife = 30f;

		private const int GnomeDamage = 10;

		private const int BangerDamage = 35;

		private const float BangerRadius = 3f;

		private readonly List<Minion> _minions = new List<Minion>();

		private int _minionSerial;

		private float _minionSendAt;

		private static readonly HashSet<EnemyParent> _summoned;

		private readonly List<Vector3> _summonedLastPos = new List<Vector3>();

		private const int MaxSwarmKeep = 8;

		private float _swarmAssistAt;

		private float _swarmLogAt;

		private readonly Dictionary<EnemyParent, float> _swarmHitAt = new Dictionary<EnemyParent, float>();

		private const float SwarmSight = 15f;

		private const float SwarmTouch = 1.5f;

		private const int SwarmGnomeDamage = 10;

		private const int SwarmBangerDamage = 35;

		private const int MsgInspect = 30;

		private const int VoteSkip = 2;

		private float _inspectEndAt;

		private int _inspectSkip;

		private int _inspectTotal;

		private bool _mySkip;

		private MonsterVisual _afterMonster;

		private readonly Dictionary<int, bool> _hostSkip = new Dictionary<int, bool>();

		private float _nextRoundAt;

		private Object _levelAtMapChange;

		private float _levelReadySince;

		private const int MsgPick = 31;

		private const int VotePickSkip = 3;

		private float _pickEndAt;

		private int _pickVotes;

		private int _pickTotal;

		private bool _myPickSkip;

		private readonly Dictionary<int, bool> _hostPickSkip = new Dictionary<int, bool>();

		private MenuPage _menuPage;

		private int _showcaseSel;

		private float _showcaseStart;

		private Vector2 _showcaseScroll;

		private Vector2 _showcaseInfoScroll;

		private static readonly ShowcaseEntry[] ShowcaseEntries;

		private GUIStyle _mCenter;

		private int _htpPage = 1;

		private int _htpPageCount = -1;

		private int _htpLoaded = -1;

		private Texture2D _htpTex;

		private readonly List<Tornado> _tornados = new List<Tornado>();

		private float _tornadoScanAt;

		private float _tornadoPushAt;

		private const int MsgBashStop = 28;

		private float _bashUntil;

		private float _bashFxAt;

		private float _bashSpeedMul = 1f;

		private float _bashBounceReadyAt;

		private Vector3 _bashDir;

		private readonly HashSet<int> _bashHit = new HashSet<int>();

		private const int MsgLaunch = 21;

		private float _launchAt;

		private float _impulseEnd;

		private float _impulseBlastUntil;

		private Vector3 _launchDir;

		private Vector3 _impulseCenter;

		private bool _impulseCaught;

		private float _launchStart;

		private float _launchApplyEnd;

		private float _launchRetryAt;

		private float _launchPushed;

		private float _launchLogAt;

		private readonly List<HostLaunchJob> _hostLaunches = new List<HostLaunchJob>();

		private bool Charging => Time.time < _chargeUntil;

		private bool Grabbing => Time.time < _grabUntil;

		private bool AttackBlocked
		{
			get
			{
				if (!Charging && !Grabbing && !(Time.time < _dashEnd))
				{
					return Bashing;
				}
				return true;
			}
		}

		private float AttackBlockedUntil => Mathf.Max(Mathf.Max(Charging ? _chargeUntil : 0f, Grabbing ? _grabUntil : 0f), Mathf.Max(_dashEnd, Bashing ? _bashUntil : 0f));

		private bool DashWindup => Time.time < _dashStart;

		private bool Dashing
		{
			get
			{
				if (Time.time >= _dashStart)
				{
					return Time.time < _dashEnd;
				}
				return false;
			}
		}

		private AbilityType CurrentAbility
		{
			get
			{
				if (!((Object)(object)_monster != (Object)null))
				{
					return AbilityType.None;
				}
				return _monster.Ability;
			}
		}

		private bool VoteVisible
		{
			get
			{
				if (_voteOpen)
				{
					return !RoundActive;
				}
				return false;
			}
		}

		internal int BalloonsLeft => 5 - _balloons.Count - _balloonRecharge.Count((float t) => Time.time < t);

		internal float NextBalloonIn => _balloonRecharge.Where((float t) => Time.time < t).DefaultIfEmpty(Time.time).Min() - Time.time;

		private bool BalloonsRecharging => _balloonRecharge.Any((float t) => Time.time < t);

		internal bool ClassicActive
		{
			get
			{
				if (RoundActive)
				{
					return _roundClassic;
				}
				return false;
			}
		}

		private int SeekerActor
		{
			get
			{
				if (!((Object)(object)Seeker != (Object)null))
				{
					return -999;
				}
				return ActorOf(Seeker);
			}
		}

		private bool CanPickStartWeapon
		{
			get
			{
				if (ClassicActive && Phase == Phase.Hiding && !_startWeaponTaken && (Object)(object)Seeker != (Object)null)
				{
					return GameRefs.IsLocal(Seeker);
				}
				return false;
			}
		}

		public static HideAndSeekManager Instance { get; private set; }

		internal Phase Phase { get; private set; }

		internal bool RoundActive => Phase != Phase.None;

		internal PlayerAvatar Seeker { get; private set; }

		internal bool SeekerInvincibleThisRound { get; private set; }

		private static bool IsHost
		{
			get
			{
				if (SemiFunc.IsMultiplayer())
				{
					return PhotonNetwork.IsMasterClient;
				}
				return true;
			}
		}

		private bool CursorWanted
		{
			get
			{
				if (!_menuOpen && !_debugOpen && !_animTunerOpen && !_freePickOpen && !VoteVisible)
				{
					if (_choiceOpen && RoundActive && Phase == Phase.Hiding && (Object)(object)Seeker != (Object)null)
					{
						return GameRefs.IsLocal(Seeker);
					}
					return false;
				}
				return true;
			}
		}

		private bool CanPickFreeItem
		{
			get
			{
				if (_roundFreeItem && RoundActive && Phase == Phase.Hiding && !_freeItemTaken)
				{
					if (!LocalHider(out var _))
					{
						if ((Object)(object)Seeker != (Object)null && GameRefs.IsLocal(Seeker))
						{
							if (_roundClassic)
							{
								if (ClassicActive)
								{
									return _startWeaponTaken;
								}
								return false;
							}
							return true;
						}
						return false;
					}
					return true;
				}
				return false;
			}
		}

		private bool PickerAvailable
		{
			get
			{
				if (!CanPickFreeItem)
				{
					return CanPickStartWeapon;
				}
				return true;
			}
		}

		private bool LocalSeekerHoldsItem => _holdingItem;

		private bool LassoHolding
		{
			get
			{
				if (Time.time < _lassoUntil)
				{
					if (!((Object)(object)_lassoVictim != (Object)null))
					{
						return (Object)(object)_lassoDummy != (Object)null;
					}
					return true;
				}
				return false;
			}
		}

		private bool MonsterIsBanger => (_monsterName ?? "").ToLowerInvariant().Contains("bang");

		private bool Inspecting
		{
			get
			{
				if (!RoundActive)
				{
					return Time.time < _inspectEndAt;
				}
				return false;
			}
		}

		internal bool Picking
		{
			get
			{
				if (RoundActive && Phase == Phase.Hiding)
				{
					return Time.time < _pickEndAt;
				}
				return false;
			}
		}

		private bool RoundHasPicking
		{
			get
			{
				if (Plugin.PickSeconds.Value > 0f)
				{
					if (!Plugin.FreeItem.Value)
					{
						return Plugin.Mode.Value == GameMode.Classic;
					}
					return true;
				}
				return false;
			}
		}

		private int HowToPlayPages
		{
			get
			{
				if (_htpPageCount >= 0)
				{
					return _htpPageCount;
				}
				_htpPageCount = 0;
				using (Stream stream = typeof(ShowcaseArt).Assembly.GetManifestResourceStream("howtoplay/index.txt"))
				{
					if (stream != null)
					{
						using StreamReader streamReader = new StreamReader(stream);
						int.TryParse(streamReader.ReadToEnd().Trim(), out _htpPageCount);
					}
				}
				return _htpPageCount;
			}
		}

		private bool Bashing => Time.time < _bashUntil;

		private void OnRoarScan(Vector3 roarPos)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: 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_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_0108: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0145: Unknown result type (might be due to invalid IL or missing references)
			bool num = (Object)(object)Seeker != (Object)null && GameRefs.IsLocal(Seeker);
			Effects.Shockwave(roarPos + Vector3.up * 0.1f, 30f, new Color(1f, 0.6f, 0.3f), 0.9f);
			if (num)
			{
				int num2 = AliveHiders().Count((PlayerAvatar h) => FlatDistance(PlayerPos(h), roarPos) <= 15f) + AliveDummies().Count((TestDummy d) => FlatDistance(((Component)d).transform.position, roarPos) <= 15f);
				Banner((num2 > 0) ? L.ScanFound(num2) : L.ScanNothing, new Color(1f, 0.6f, 0.3f), 2.5f);
				Plugin.Log.LogInfo((object)$"[Monster] scan: {num2} player(s) within {15f}m");
			}
			else
			{
				PlayerAvatar localAvatar = GameRefs.LocalAvatar;
				if ((Object)(object)localAvatar != (Object)null && IsAlive(localAvatar) && FlatDistance(PlayerPos(localAvatar), roarPos) <= 15f)
				{
					_flashUntil = Time.time + 0.6f;
					Banner(L.Scanned, new Color(1f, 0.5f, 0.3f), 2f);
				}
			}
		}

		private static int GameHealth(PlayerAvatar p)
		{
			if (!((Object)(object)p != (Object)null) || !((Object)(object)p.playerHealth != (Object)null))
			{
				return 100;
			}
			return Compat.Get(p.playerHealth, "health", 100);
		}

		private void HostDamage(PlayerAvatar h, int dmg, string how)
		{
			if (!((Object)(object)h == (Object)null) && IsAlive(h) && dmg > 0)
			{
				int viewID = h.photonView.ViewID;
				if (!_hp.TryGetValue(viewID, out var value))
				{
					value = GameHealth(h);
				}
				value = Mathf.Max(0, value - dmg);
				_hp[viewID] = value;
				_lastMonsterHit[viewID] = Time.time;
				Plugin.Log.LogInfo((object)$"[Damage] {NameOf(h)} -{dmg} by {how} -> {value} HP");
				Send(11, viewID, dmg, value);
				if (value <= 0)
				{
					HostKill(h);
				}
			}
		}

		private void HostDamageDummy(TestDummy d, int dmg, Vector3 from, string how)
		{
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			if (!((Object)(object)d == (Object)null) && !d.Dead)
			{
				d.Hp = Mathf.Max(0, d.Hp - dmg);
				_lastAttackInfo = L.Damage(d.DummyName, dmg, d.Hp) + "  (" + how + ")";
				if (d.Hp <= 0)
				{
					KillDummy(d, from, how);
				}
				else
				{
					Banner(L.Damage(d.DummyName, dmg, d.Hp), new Color(1f, 0.55f, 0.3f), 1.2f);
				}
			}
		}

		private void HostSyncHealth()
		{
			_hpSyncTick -= Time.deltaTime;
			if (_hpSyncTick > 0f)
			{
				return;
			}
			_hpSyncTick = 1f;
			foreach (PlayerAvatar item in AliveHiders())
			{
				int viewID = item.photonView.ViewID;
				if (!_lastMonsterHit.TryGetValue(viewID, out var value) || !(Time.time - value < 1.5f))
				{
					_hp[viewID] = GameHealth(item);
				}
			}
		}

		private bool RecentlyHitByMonster(int id)
		{
			if (_lastMonsterHit.TryGetValue(id, out var value))
			{
				return Time.time - value < 2.5f;
			}
			return false;
		}

		private void OnDamage(int victimId, int dmg, int hpLeft)
		{
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			PlayerAvatar val = FindByViewId(victimId);
			if ((Object)(object)val == (Object)null)
			{
				return;
			}
			if ((Object)(object)Seeker != (Object)null && GameRefs.IsLocal(Seeker))
			{
				Banner(L.Damage(NameOf(val), dmg, hpLeft), new Color(1f, 0.55f, 0.3f), 1.2f);
			}
			if (!val.isLocal || !IsAlive(val) || hpLeft <= 0)
			{
				return;
			}
			PlayerHealth playerHealth = val.playerHealth;
			if ((Object)(object)playerHealth == (Object)null)
			{
				return;
			}
			try
			{
				Compat.Set(playerHealth, "godMode", false);
				Compat.Set(playerHealth, "invincibleTimer", 0f);
				Compat.Call(playerHealth, "Hurt", dmg, false);
			}
			catch (Exception ex)
			{
				Plugin.Log.LogDebug((object)("Hurt failed: " + ex.Message));
			}
		}

		private void TriggerSpecial()
		{
			//IL_0010: 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_0183: Unknown result type (might be due to invalid IL or missing references)
			//IL_0162: Unknown result type (might be due to invalid IL or missing references)
			//IL_0167: Unknown result type (might be due to invalid IL or missing references)
			//IL_0171: Unknown result type (might be due to invalid IL or missing references)
			//IL_0176: Unknown result type (might be due to invalid IL or missing references)
			//IL_0142: Unknown result type (might be due to invalid IL or missing references)
			//IL_0128: 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_0196: Unknown result type (might be due to invalid IL or missing references)
			//IL_019b: Unknown result type (might be due to invalid IL or missing references)
			//IL_018f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0194: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b6: Unknown result type (might be due to invalid IL or missing references)
			AbilityType abilityType = CurrentAbility;
			if (abilityType == AbilityType.None)
			{
				Banner(L.NoSpecial, Color.white, 1.5f);
			}
			else if (Bashing)
			{
				Send(28);
			}
			else
			{
				if (Time.time < _specialReadyAt || StunnedBlocks())
				{
					return;
				}
				if (abilityType == AbilityType.BalloonMines && BalloonsLeft <= 0 && _balloons.Count == 0)
				{
					Banner(L.NoBalloons(NextBalloonIn), Abilities.UnityColor(abilityType), 1.5f);
					_specialReadyAt = Time.time + 0.5f;
					return;
				}
				_specialReadyAt = Time.time + Cd((abilityType == AbilityType.ItemThrow && !_holdingItem) ? 1f : Abilities.Cooldown(abilityType));
				Plugin.Log.LogInfo((object)$"[Monster] special pressed: {abilityType}");
				bool flag = false;
				if (abilityType == AbilityType.Gamble)
				{
					abilityType = Abilities.GambleTable[Random.Range(0, Abilities.GambleTable.Length)];
					flag = true;
					Plugin.Log.LogInfo((object)$"[Monster] gamble rolled: {abilityType}");
				}
				if (abilityType == AbilityType.Laser)
				{
					if (flag)
					{
						Banner(L.Gambled(Abilities.Name(abilityType)), Abilities.UnityColor(AbilityType.Gamble), 2f);
					}
					Send(6, LocalAimDirection());
					return;
				}
				Vector3 val = (((Object)(object)_monster != (Object)null) ? _monster.MuzzlePosition : (SeekerPosition() + Vector3.up * 1.5f));
				if (abilityType == AbilityType.BalloonMines)
				{
					val = SeekerPosition();
				}
				Vector3 val2 = LocalAimDirection();
				if (abilityType == AbilityType.BalloonMines)
				{
					val2 = ((BalloonsLeft > 0) ? Vector3.down : Vector3.up);
				}
				Send(10, (int)abilityType, val, val2, flag);
			}
		}

		private void OnSpecial(AbilityType ability, Vector3 origin, Vector3 dir, bool gambled = false)
		{
			//IL_000e: 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_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: 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_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_013e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0143: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0152: Unknown result type (might be due to invalid IL or missing references)
			//IL_0157: Unknown result type (might be due to invalid IL or missing references)
			//IL_0159: 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_0276: 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_0281: Unknown result type (might be due to invalid IL or missing references)
			//IL_028b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0290: Unknown result type (might be due to invalid IL or missing references)
			//IL_0296: 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_02d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02da: Unknown result type (might be due to invalid IL or missing references)
			//IL_02df: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0535: Unknown result type (might be due to invalid IL or missing references)
			//IL_062a: Unknown result type (might be due to invalid IL or missing references)
			//IL_062b: Unknown result type (might be due to invalid IL or missing references)
			//IL_05a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_05c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_059a: Unknown result type (might be due to invalid IL or missing references)
			//IL_059f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0580: Unknown result type (might be due to invalid IL or missing references)
			//IL_0585: Unknown result type (might be due to invalid IL or missing references)
			//IL_0577: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_0894: Unknown result type (might be due to invalid IL or missing references)
			//IL_0887: Unknown result type (might be due to invalid IL or missing references)
			//IL_039a: Unknown result type (might be due to invalid IL or missing references)
			//IL_038d: Unknown result type (might be due to invalid IL or missing references)
			//IL_080c: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_06bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_06b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0548: Unknown result type (might be due to invalid IL or missing references)
			//IL_05be: Unknown result type (might be due to invalid IL or missing references)
			//IL_0192: Unknown result type (might be due to invalid IL or missing references)
			//IL_0197: Unknown result type (might be due to invalid IL or missing references)
			//IL_025b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0899: Unknown result type (might be due to invalid IL or missing references)
			//IL_089b: Unknown result type (might be due to invalid IL or missing references)
			//IL_089d: Unknown result type (might be due to invalid IL or missing references)
			//IL_08a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_08ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_08b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_039f: 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_03aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_03bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0811: Unknown result type (might be due to invalid IL or missing references)
			//IL_06c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_06cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_06d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_06d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_06d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_06de: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_067a: Unknown result type (might be due to invalid IL or missing references)
			//IL_067f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0649: Unknown result type (might be due to invalid IL or missing references)
			//IL_064e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0202: Unknown result type (might be due to invalid IL or missing references)
			//IL_020c: Unknown result type (might be due to invalid IL or missing references)
			//IL_083d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0842: Unknown result type (might be due to invalid IL or missing references)
			//IL_0670: Unknown result type (might be due to invalid IL or missing references)
			//IL_0675: Unknown result type (might be due to invalid IL or missing references)
			//IL_0405: Unknown result type (might be due to invalid IL or missing references)
			//IL_040c: Unknown result type (might be due to invalid IL or missing references)
			//IL_071a: Unknown result type (might be due to invalid IL or missing references)
			//IL_070c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0711: Unknown result type (might be due to invalid IL or missing references)
			//IL_0713: Unknown result type (might be due to invalid IL or missing references)
			//IL_0901: Unknown result type (might be due to invalid IL or missing references)
			//IL_0906: Unknown result type (might be due to invalid IL or missing references)
			//IL_071f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0727: Unknown result type (might be due to invalid IL or missing references)
			//IL_0729: Unknown result type (might be due to invalid IL or missing references)
			//IL_0730: Unknown result type (might be due to invalid IL or missing references)
			//IL_0740: Unknown result type (might be due to invalid IL or missing references)
			//IL_092d: Unknown result type (might be due to invalid IL or missing references)
			//IL_093c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0940: Unknown result type (might be due to invalid IL or missing references)
			//IL_0945: Unknown result type (might be due to invalid IL or missing references)
			//IL_094f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0954: Unknown result type (might be due to invalid IL or missing references)
			//IL_095e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0963: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c8: Unknown result type (might be due to invalid IL or missing references)
			bool flag = (Object)(object)Seeker != (Object)null && GameRefs.IsLocal(Seeker);
			dir = ((((Vector3)(ref dir)).sqrMagnitude > 0.001f) ? ((Vector3)(ref dir)).normalized : Vector3.forward);
			if (gambled)
			{
				Banner(L.Gambled(Abilities.Name(ability)), Abilities.UnityColor(AbilityType.Gamble), 2f);
			}
			string text = L.AbilityUsedByMonster(ability);
			if (!flag && !gambled && !string.IsNullOrEmpty(text))
			{
				Banner(text, Abilities.UnityColor(ability), 2f);
			}
			if ((Object)(object)_monster != (Object)null)
			{
				_monster.PlaySpecial(gambled ? AbilityType.Gamble : ability, gambled ? 0f : Abilities.Duration(ability));
			}
			switch (ability)
			{
			case AbilityType.Shot:
			{
				float dist;
				Vector3 b = RayToWall(origin, dir, 60f, out dist);
				Effects.Tracer(origin, b, Abilities.UnityColor(ability), 0.07f, 0.35f);
				if ((Object)(object)_monster != (Object)null)
				{
					_monster.PlayAttack();
				}
				if (IsHost)
				{
					HostShotHits(origin, dir, dist);
				}
				break;
			}
			case AbilityType.Sprint:
			case AbilityType.FlyingCharge:
				_chargeUntil = Time.time + Abilities.Duration(ability);
				_chargeType = ability;
				_chargeTickAt = Time.time + 0.15f;
				if ((Object)(object)_monster != (Object)null)
				{
					_monster.PlayRoar();
				}
				if (flag && ability == AbilityType.FlyingCharge)
				{
					Compat.Call(PlayerController.instance, "ForceImpulse", Vector3.up * 5f);
				}
				break;
			case AbilityType.Leap:
				_leapUntil = Time.time + Abilities.Duration(ability);
				_leapHit.Clear();
				if ((Object)(object)_monster != (Object)null)
				{
					_monster.PlayAttack();
				}
				if (flag)
				{
					DoLeap(dir);
				}
				break;
			case AbilityType.Reveal:
				OnRadarPing(flag);
				break;
			case AbilityType.Throw:
				_projectiles.Add(new Projectile(origin, dir * 17f + Vector3.up * 3.5f, Abilities.UnityColor(ability)));
				if ((Object)(object)_monster != (Object)null)
				{
					_monster.PlayAttack();
				}
				break;
			case AbilityType.Bomb:
				_projectiles.Add(new Projectile(origin, dir * 13f + Vector3.up * 4.5f, Abilities.UnityColor(ability), AbilityType.Bomb, 0.7f));
				if ((Object)(object)_monster != (Object)null)
				{
					_monster.PlayAttack();
				}
				break;
			case AbilityType.Puke:
				_pukeUntil = Time.time + Abilities.Duration(ability);
				_pukeTickAt = Time.time + 0.2f;
				if ((Object)(object)_monster != (Object)null)
				{
					_monster.PlayRoar();
				}
				break;
			case AbilityType.Levitate:
			{
				Vector3 center = (((Object)(object)Seeker != (Object)null) ? PlayerPos(Seeker) : origin);
				Color color = Abilities.UnityColor(ability);
				Effects.Shockwave(center + Vector3.up * 0.1f, 20f, color, 0.8f);
				if ((Object)(object)_monster != (Object)null)
				{
					_monster.PlayRoar();
				}
				float num = Abilities.Duration(ability);
				if (LocalHider(out var me2) && Vector3.Distance(PlayerPos(me2), center) <= 10f)
				{
					_levitateUntil = Time.time + num;
				}
				if (!IsHost)
				{
					break;
				}
				List<PlayerAvatar> victims = (from h in AliveHiders()
					where Vector3.Distance(PlayerPos(h), center) <= 10f
					select h).ToList();
				List<TestDummy> dummies = (from d in AliveDummies()
					where Vector3.Distance(((Component)d).transform.position, center) <= 10f
					select d).ToList();
				foreach (TestDummy item in dummies)
				{
					Transform transform = ((Component)item).transform;
					transform.position += Vector3.up * 2f;
				}
				Later(num, delegate
				{
					//IL_0072: Unknown result type (might be due to invalid IL or missing references)
					//IL_0077: Unknown result type (might be due to invalid IL or missing references)
					//IL_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_00a9: Unknown result type (might be due to invalid IL or missing references)
					foreach (PlayerAvatar item2 in victims)
					{
						HostDamage(item2, 30, "levitate");
					}
					foreach (TestDummy item3 in dummies)
					{
						if (!((Object)(object)item3 == (Object)null))
						{
							Transform transform2 = ((Component)item3).transform;
							transform2.position -= Vector3.up * 2f;
							HostDamageDummy(item3, 30, center, "levitate");
						}
					}
				});
				break;
			}
			case AbilityType.Slam:
				if ((Object)(object)_monster != (Object)null)
				{
					_monster.PlayAttack();
				}
				Later(Abilities.Duration(ability), delegate
				{
					//IL_0026: Unknown result type (might be due to invalid IL or missing references)
					//IL_0014: Unknown result type (might be due to invalid IL or missing references)
					//IL_002b: Unknown result type (might be due to invalid IL or missing references)
					//IL_002c: Unknown result type (might be due to invalid IL or missing references)
					//IL_002d: Unknown result type (might be due to invalid IL or missing references)
					//IL_0037: Unknown result type (might be due to invalid IL or missing references)
					//IL_003c: Unknown result type (might be due to invalid IL or missing references)
					//IL_0048: Unknown result type (might be due to invalid IL or missing references)
					//IL_008a: Unknown result type (might be due to invalid IL or missing references)
					//IL_008f: Unknown result type (might be due to invalid IL or missing references)
					//IL_009d: Unknown result type (might be due to invalid IL or missing references)
					//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
					//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
					//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
					//IL_00c1: 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_00d0: 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_00df: Unknown result type (might be due to invalid IL or missing references)
					//IL_010f: Unknown result type (might be due to invalid IL or missing references)
					//IL_0114: Unknown result type (might be due to invalid IL or missing references)
					//IL_0122: Unknown result type (might be due to invalid IL or missing references)
					//IL_012c: Unknown result type (might be due to invalid IL or missing references)
					//IL_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_01ab: Unknown result type (might be due to invalid IL or missing references)
					Vector3 val7 = (((Object)(object)Seeker != (Object)null) ? PlayerPos(Seeker) : origin);
					Effects.Shockwave(val7 + Vector3.up * 0.2f, 11f, Abilities.UnityColor(AbilityType.Slam), 0.5f);
					if ((Object)(object)_monster != (Object)null)
					{
						_monster.PlayRoar();
					}
					if (LocalHider(out var me3) && FlatDistance(PlayerPos(me3), val7) <= 5f && Mathf.Abs(PlayerPos(me3).y - val7.y) < 2.5f)
					{
						LocalPush(Away(val7, PlayerPos(me3)) * 9f + Vector3.up * 5f);
					}
					if (IsHost)
					{
						foreach (PlayerAvatar item4 in AliveHiders())
						{
							if (FlatDistance(PlayerPos(item4), val7) <= 5f && Mathf.Abs(PlayerPos(item4).y - val7.y) < 2.5f)
							{
								HostDamage(item4, 50, "slam");
							}
						}
						foreach (TestDummy item5 in AliveDummies())
						{
							if (FlatDistance(((Component)item5).transform.position, val7) <= 5f)
							{
								HostDamageDummy(item5, 50, val7, "slam");
							}
						}
					}
				});
				break;
			case AbilityType.Swarm:
				OnSwarm(origin);
				break;
			case AbilityType.ItemThrow:
				if (IsHost)
				{
					HostItemThrow(dir);
				}
				if (_holdingItem && (Object)(object)_monster != (Object)null)
				{
					_monster.PlayAttack();
				}
				break;
			case AbilityType.TumbleBash:
				OnTumbleBash(dir);
				break;
			case AbilityType.BalloonMines:
				PlaceBalloon(origin, dir.y > 0.5f);
				break;
			case AbilityType.Lasso:
				OnLassoThrow(origin, dir);
				break;
			case AbilityType.Tornado:
				SpawnTornado(origin);
				break;
			case AbilityType.Launch:
				if (IsHost)
				{
					HostLaunch(dir);
				}
				break;
			case AbilityType.Impulse:
				OnImpulse(origin);
				break;
			case AbilityType.Charge:
			case AbilityType.Lunge:
			{
				_dashType = ability;
				_dashStart = Time.time + 0.5f;
				_dashEnd = _dashStart + Abilities.DashTime(_dashType);
				_dashHit.Clear();
				_dashLocalDone = (_dashFromSet = false);
				_dashDoneAt = 0f;
				Vector3 val2 = dir;
				if (flag)
				{
					Transform val3 = GameRefs.ViewTransform(Seeker);
					if ((Object)(object)val3 != (Object)null)
					{
						val2 = val3.forward;
					}
				}
				if (ability == AbilityType.Charge)
				{
					val2.y = 0f;
					if (((Vector3)(ref val2)).sqrMagnitude < 0.001f)
					{
						val2 = MonsterForward();
					}
				}
				_dashDir = ((Vector3)(ref val2)).normalized;
				if ((Object)(object)_monster != (Object)null)
				{
					_monster.PlayRoar();
				}
				break;
			}
			case AbilityType.NoxiousGas:
			{
				Vector3 pos = (((Object)(object)Seeker != (Object)null) ? PlayerPos(Seeker) : origin) + Vector3.up * 1.2f;
				Vector3 val5 = MonsterForward();
				Color color2 = Abilities.UnityColor(ability);
				for (int num2 = 0; num2 < 5; num2++)
				{
					Vector3 val6 = ((num2 == 0) ? Vector3.zero : (Quaternion.Euler(0f, (float)(num2 - 1) * 90f + 45f, 0f) * val5));
					_gas.Add(new GasCloud(pos, val6 * 4f, Time.time + 10f, color2));
				}
				if ((Object)(object)_monster != (Object)null)
				{
					_monster.PlayRoar();
				}
				break;
			}
			case AbilityType.FlyingGrab:
			case AbilityType.ZeroGGrab:
				_grabUntil = Time.time + Abilities.Duration(ability);
				_grabType = ability;
				_grabStunShown = false;
				_grabCaught = false;
				_grabFxAt = 0f;
				if ((Object)(object)_monster != (Object)null)
				{
					_monster.PlayAttack();
				}
				Plugin.Log.LogInfo((object)$"[Monster] {ability} active for {Abilities.Duration(ability)}s, radius {Abilities.GrabRadius(ability)}m");
				break;
			case AbilityType.Pull:
			{
				Vector3 val4 = (((Object)(object)Seeker != (Object)null) ? PlayerPos(Seeker) : origin);
				_pullUntil = Time.time + Abilities.Duration(ability);
				_pullFxAt = 0f;
				_pulled = LocalHider(out var me) && Vector3.Distance(PlayerPos(me), val4) <= 12f;
				if ((Object)(object)_monster != (Object)null)
				{
					_monster.PlayRoar();
				}
				break;
			}
			case AbilityType.Shockwave:
			{
				Vector3 val = (((Object)(object)Seeker != (Object)null) ? PlayerPos(Seeker) : origin);
				Effects.Shockwave(val + Vector3.up * 0.5f, 20f, Abilities.UnityColor(ability));
				if ((Object)(object)_monster != (Object)null)
				{
					_monster.PlayRoar();
				}
				PlayerAvatar localAvatar = GameRefs.LocalAvatar;
				if (!flag && (Object)(object)localAvatar != (Object)null && IsAlive(localAvatar) && FlatDistance(PlayerPos(localAvatar), val) < 10f)
				{
					_stunUntil = Time.time + Abilities.Duration(ability);
					Banner(L.Stunned, Abilities.UnityColor(ability), 2f);
					LocalPush(Away(val, PlayerPos(localAvatar)) * 7f + Vector3.up * 2.5f);
				}
				break;
			}
			case AbilityType.Gamble:
				break;
			}
		}

		private void DoLeap(Vector3 dir)
		{
			//IL_0002: 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_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
			Vector3 val = default(Vector3);
			((Vector3)(ref val))..ctor(dir.x, 0f, dir.z);
			val = ((((Vector3)(ref val)).sqrMagnitude > 0.001f) ? ((Vector3)(ref val)).normalized : Vector3.forward);
			PlayerController instance = PlayerController.instance;
			if (!Compat.Call(instance, "MoveForce", val, 22f, 0.45f))
			{
				_lungeUntil = Time.time + 0.8f;
			}
			Compat.Call(instance, "ForceImpulse", Vector3.up * 6f + val * 4f);
		}

		private void AbilityTick()
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0271: Unknown result type (might be due to invalid IL or missing references)
			//IL_0276: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_020c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0217: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0101: Unknown result type (might be due to invalid IL or missing references)
			//IL_0108: Unknown result type (might be due to invalid IL or missing references)
			//IL_010f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0114: Unknown result type (might be due to invalid IL or missing references)
			//IL_011e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0123: 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_02a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0169: Unknown result type (might be due to invalid IL or missing references)
			//IL_016e: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_018d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0192: Unknown result type (might be due to invalid IL or missing references)
			//IL_03eb: 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)
			//IL_032e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0337: Unknown result type (might be due to invalid IL or missing references)
			//IL_0439: Unknown result type (might be due to invalid IL or missing references)
			//IL_0442: Unknown result type (might be due to invalid IL or missing references)
			//IL_0367: Unknown result type (might be due to invalid IL or missing references)
			//IL_0453: Unknown result type (might be due to invalid IL or missing references)
			RaycastHit val = default(RaycastHit);
			RaycastHit val3 = default(RaycastHit);
			for (int num = _projectiles.Count - 1; num >= 0; num--)
			{
				Projectile projectile = _projectiles[num];
				Vector3 position = projectile.Position;
				projectile.Step(Time.deltaTime);
				bool flag = Physics.Linecast(position, projectile.Position, ref val, -1, (QueryTriggerInteraction)1) && !IsPlayerCollider(((RaycastHit)(ref val)).collider);
				if (projectile.Kind == AbilityType.Bomb)
				{
					Vector3 val2 = projectile.Position - position;
					if (!projectile.Resting && ((Vector3)(ref val2)).sqrMagnitude > 1E-06f && Physics.SphereCast(position, 0.3f, ((Vector3)(ref val2)).normalized, ref val3, ((Vector3)(ref val2)).magnitude, -1, (QueryTriggerInteraction)1) && !IsPlayerCollider(((RaycastHit)(ref val3)).collider))
					{
						projectile.Position = position + ((Vector3)(ref val2)).normalized * Mathf.Max(0f, ((RaycastHit)(ref val3)).distance - 0.02f) + ((RaycastHit)(ref val3)).normal * 0.02f;
						projectile.Velocity = Vector3.Reflect(projectile.Velocity, ((RaycastHit)(ref val3)).normal) * 0.55f;
						if (((RaycastHit)(ref val3)).normal.y > 0.6f)
						{
							projectile.Velocity = new Vector3(projectile.Velocity.x * 0.75f, projectile.Velocity.y, projectile.Velocity.z * 0.75f);
							if (((Vector3)(ref projectile.Velocity)).magnitude < 0.8f)
							{
								projectile.Resting = true;
								projectile.Velocity = Vector3.zero;
							}
						}
						projectile.SyncVisual();
					}
					projectile.Blink(4f);
					if (projectile.Age > 4f)
					{
						BombExplode(projectile.Position);
						projectile.Destroy();
						_projectiles.RemoveAt(num);
					}
				}
				else
				{
					if (IsHost && Phase == Phase.Hunting)
					{
						HostProjectileHits(projectile);
					}
					if (flag || projectile.Dead || projectile.Age > 5f)
					{
						if (flag)
						{
							Effects.Shockwave(((RaycastHit)(ref val)).point, 1.5f, projectile.Color, 0.25f);
						}
						projectile.Destroy();
						_projectiles.RemoveAt(num);
					}
				}
			}
			if (IsHost && Phase == Phase.Hunting && (Object)(object)Seeker != (Object)null)
			{
				HostSyncHealth();
				Vector3 val4 = SeekerPosition();
				if (Time.time < _leapUntil)
				{
					foreach (PlayerAvatar item in AliveHiders())
					{
						if (FlatDistance(val4, PlayerPos(item)) <= 2.4f && Mathf.Abs(PlayerPos(item).y - val4.y) < 2.5f && _leapHit.Add(item.photonView.ViewID))
						{
							HostDamage(item, 40, "leap");
						}
					}
					foreach (TestDummy item2 in AliveDummies())
					{
						if (FlatDistance(val4, ((Component)item2).transform.position) <= 2.4f && _leapHit.Add(-1000 - ((Object)item2).GetInstanceID()))
						{
							HostDamageDummy(item2, 40, val4, "leap");
						}
					}
				}
				if (Charging && Time.time >= _chargeTickAt)
				{
					_chargeTickAt = Time.time + 0.5f;
					int dmg = Abilities.ChargeDamage(_chargeType);
					string how = Abilities.Name(_chargeType);
					foreach (PlayerAvatar item3 in AliveHiders())
					{
						if (InChargeRadius(val4, PlayerPos(item3)))
						{
							HostDamage(item3, dmg, how);
						}
					}
					foreach (TestDummy item4 in AliveDummies())
					{
						if (InChargeRadius(val4, ((Component)item4).transform.position))
						{
							HostDamageDummy(item4, dmg, val4, how);
						}
					}
				}
			}
			if (Charging && _chargeType == AbilityType.FlyingCharge && (Object)(object)Seeker != (Object)null && GameRefs.IsLocal(Seeker))
			{
				Safe("fly", FlyTick);
			}
			if (Time.time < _stunUntil)
			{
				Compat.Call(PlayerController.instance, "OverrideSpeed", 0.25f, 0.2f);
			}
			RunLater();
			Safe("grab zone", GrabTick);
			Safe("gas", GasTick);
			Safe("minions", MinionTick);
			Safe("swarm assist", SwarmAssistTick);
			Safe("dash", DashTick);
			Safe("item", ItemTick);
			Safe("tornado", TornadoTick);
			Safe("lasso", LassoTick);
			Safe("balloons", BalloonTick);
			Safe("tumble-bash", TumbleBashTick);
			Safe("launch", LaunchTick);
			Safe("host launch", HostLaunchTick);
			Safe("impulse", ImpulseTick);
			if ((Object)(object)Seeker != (Object)null && GameRefs.IsLocal(Seeker) && Phase == Phase.Hunting && Abilities.FreeFlight(_monsterName) && (!Charging || _chargeType != AbilityType.FlyingCharge))
			{
				Safe("free flight", FlyTick);
			}
			Safe("clouds", CloudTick);
			Safe("puke", PukeTick);
			Safe("pull", PullTick);
			Safe("levitate", LevitateTick);
			Safe("charge fx", ChargeFxTick);
			if ((Object)(object)_monster != (Object)null)
			{
				_monster.SetAttackForm(Charging && _chargeType == AbilityType.FlyingCharge && CurrentAbility == AbilityType.FlyingCharge);
			}
			if ((Object)(object)_monster != (Object)null)
			{
				_monster.SetCharging(Charging || Time.time < _dashEnd);
				_monster.SetCarrying(_holdingItem);
			}
		}

		private void Later(float delay, Action act)
		{
			_later.Add((Time.time + delay, act));
		}

		private void RunLater()
		{
			for (int num = _later.Count - 1; num >= 0; num--)
			{
				if (!(Time.time < _later[num].at))
				{
					Action item = _later[num].act;
					_later.RemoveAt(num);
					Safe("later", item);
				}
			}
		}

		private bool LocalHider(out PlayerAvatar me)
		{
			me = GameRefs.LocalAvatar;
			if ((Object)(object)me != (Object)null && IsAlive(me) && (Object)(object)Seeker != (Object)null && !GameRefs.IsLocal(Seeker))
			{
				return _hiderViewIds.Contains(me.photonView.ViewID);
			}
			return false;
		}

		private static Vector3 Away(Vector3 from, Vector3 to)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			Vector3 val = to - from;
			val.y = 0f;
			if (!(((Vector3)(ref val)).sqrMagnitude > 0.001f))
			{
				return Vector3.forward;
			}
			return ((Vector3)(ref val)).normalized;
		}

		private static void LocalPush(Vector3 impulse)
		{
			//IL_001e: 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)
			PlayerController instance = PlayerController.instance;
			if (!((Object)(object)instance == (Object)null) && !Compat.Call(instance, "ForceImpulse", impulse))
			{
				Rigidbody val = Compat.Get<Rigidbody>(instance, "rb");
				if ((Object)(object)val != (Object)null)
				{
					val.AddForce(impulse, (ForceMode)2);
				}
			}
		}

		private Vector3 MonsterForward()
		{
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: 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)
			if ((Object)(object)Seeker != (Object)null && GameRefs.IsLocal(Seeker))
			{
				Transform val = GameRefs.ViewTransform(Seeker);
				if ((Object)(object)val != (Object)null)
				{
					Vector3 forward = val.forward;
					forward.y = 0f;
					if (((Vector3)(ref forward)).sqrMagnitude > 0.001f)
					{
						return ((Vector3)(ref forward)).normalized;
					}
				}
			}
			if ((Object)(object)_monster != (Object)null)
			{
				return ((Component)_monster).transform.forward;
			}
			if (!((Object)(object)Seeker != (Object)null))
			{
				return Vector3.forward;
			}
			return ((Component)Seeker).transform.forward;
		}

		private void BombExplode(Vector3 pos)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: 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_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0126: Unknown result type (might be due to invalid IL or missing references)
			//IL_012b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0135: Unknown result type (might be due to invalid IL or missing references)
			//IL_013a: Unknown result type (might be due to invalid IL or missing references)
			//IL_013f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0192: Unknown result type (might be due to invalid IL or missing references)
			//IL_0197: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bd: Unknown result type (might be due to invalid IL or missing references)
			Color val = Abilities.UnityColor(AbilityType.Bomb);
			Effects.Shockwave(pos, 8.8f, new Color(1f, 0.85f, 0.4f), 0.45f);
			Effects.Shockwave(pos, 6f, new Color(val.r, val.g, val.b, 0.5f), 5f);
			_clouds.Add((pos, Time.time + 5f));
			if ((Object)(object)_monster != (Object)null)
			{
				_monster.PlayRoar();
			}
			if (LocalHider(out var me) && Vector3.Distance(PlayerPos(me) + Vector3.up * 0.9f, pos) <= 4f)
			{
				LocalPush(Away(pos, PlayerPos(me)) * 8f + Vector3.up * 4f);
				_flashUntil = Time.time + 0.4f;
			}
			if (!IsHost || Phase != Phase.Hunting)
			{
				return;
			}
			foreach (PlayerAvatar item in AliveHiders())
			{
				if (Vector3.Distance(PlayerPos(item) + Vector3.up * 0.9f, pos) <= 4f)
				{
					HostDamage(item, 50, "bomb");
				}
			}
			foreach (TestDummy item2 in AliveDummies())
			{
				if (Vector3.Distance(((Component)item2).transform.position + Vector3.up * 0.9f, pos) <= 4f)
				{
					HostDamageDummy(item2, 50, pos, "bomb");
				}
			}
		}

		private void CloudTick()
		{
			//IL_011b: Unknown result type (might be due to invalid IL or missing references)
			_clouds.RemoveAll(((Vector3 pos, float until) c) => Time.time >= c.until);
			if (_clouds.Count == 0 || !IsHost || Phase != Phase.Hunting || Time.time < _cloudTickAt)
			{
				return;
			}
			_cloudTickAt = Time.time + 0.5f;
			foreach (PlayerAvatar h in AliveHiders())
			{
				if (_clouds.Any(((Vector3 pos, float until) c) => Vector3.Distance(PlayerPos(h) + Vector3.up * 0.9f, c.pos) <= 3f))
				{
					HostDamage(h, 10, "uranium cloud");
				}
			}
			foreach (TestDummy d in AliveDummies())
			{
				if (_clouds.Any(((Vector3 pos, float until) c) => Vector3.Distance(((Component)d).transform.position + Vector3.up * 0.9f, c.pos) <= 3f))
				{
					HostDamageDummy(d, 10, ((Component)d).transform.position, "uranium cloud");
				}
			}
		}

		private bool InPukeCone(Vector3 mouth, Vector3 fwd, Vector3 target)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			Vector3 val = target - mouth;
			Vector3 val2 = default(Vector3);
			((Vector3)(ref val2))..ctor(val.x, 0f, val.z);
			if (((Vector3)(ref val2)).magnitude > 7f || Mathf.Abs(val.y) > 3f)
			{
				return false;
			}
			if (!(((Vector3)(ref val2)).magnitude < 1f))
			{
				return Vector3.Angle(val2, fwd) < 35f;
			}
			return true;
		}

		private void PukeTick()
		{
			//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_0049: 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_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: 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_00aa: 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_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: 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_00f2: 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_010a: Unknown result type (might be due to invalid IL or missing references)
			//IL_010f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_0112: Unknown result type (might be due to invalid IL or missing references)
			//IL_0114: Unknown result type (might be due to invalid IL or missing references)
			//IL_012b: Unknown result type (might be due to invalid IL or missing references)
			//IL_012c: Unknown result type (might be due to invalid IL or missing references)
			//IL_012e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0133: Unknown result type (might be due to invalid IL or missing references)
			//IL_013d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0142: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_022b: Unknown result type (might be due to invalid IL or missing references)
			//IL_022c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0234: Unknown result type (might be due to invalid IL or missing references)
			//IL_0239: Unknown result type (might be due to invalid IL or missing references)
			//IL_0243: Unknown result type (might be due to invalid IL or missing references)
			//IL_0248: Unknown result type (might be due to invalid IL or missing references)
			//IL_0259: Unknown result type (might be due to invalid IL or missing references)
			if (Time.time >= _pukeUntil || (Object)(object)Seeker == (Object)null)
			{
				return;
			}
			Vector3 val = MonsterForward();
			Vector3 val2 = (((Object)(object)_monster != (Object)null) ? ((Component)_monster).transform.position : PlayerPos(Seeker)) + Vector3.up * Mathf.Clamp((((Object)(object)_monster != (Object)null) ? _monster.BodyHeight : 2f) * 0.6f, 0.8f, 3f) + val * 0.6f;
			Color color = Abilities.UnityColor(AbilityType.Puke);
			if (Time.time >= _pukeFxAt)
			{
				_pukeFxAt = Time.time + 0.04f;
				Vector3 val3 = val + Random.insideUnitSphere * 0.25f + Vector3.up * 0.15f;
				Vector3 vel = ((Vector3)(ref val3)).normalized * Random.Range(8f, 11f);
				Effects.Blob(val2, vel, color, 0.9f);
			}
			if (LocalHider(out var me) && InPukeCone(val2, val, PlayerPos(me) + Vector3.up * 0.9f))
			{
				Compat.Call(PlayerController.instance, "OverrideSpeed", 0.5f, 0.2f);
			}
			if (!IsHost || Phase != Phase.Hunting || Time.time < _pukeTickAt)
			{
				return;
			}
			_pukeTickAt = Time.time + 0.5f;
			foreach (PlayerAvatar item in AliveHiders())
			{
				if (InPukeCone(val2, val, PlayerPos(item) + Vector3.up * 0.9f))
				{
					HostDamage(item, 10, "puke");
				}
			}
			foreach (TestDummy item2 in AliveDummies())
			{
				if (InPukeCone(val2, val, ((Component)item2).transform.position + Vector3.up * 0.9f))
				{
					HostDamageDummy(item2, 10, val2, "puke");
				}
			}
		}

		private void PullTick()
		{
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: 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_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: 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)
			if (Time.time >= _pullUntil || (Object)(object)Seeker == (Object)null)
			{
				return;
			}
			Vector3 val = PlayerPos(Seeker);
			if (Time.time >= _pullFxAt)
			{
				_pullFxAt = Time.time + 0.5f;
				Effects.Implode(val + Vector3.up * 0.1f, 24f, Abilities.UnityColor(AbilityType.Pull), 0.5f);
			}
			if (!_pulled || !LocalHider(out var me))
			{
				return;
			}
			PlayerController instance = PlayerController.instance;
			Compat.Call(instance, "OverrideSpeed", 0.6f, 0.2f);
			Rigidbody val2 = Compat.Get<Rigidbody>(instance, "rb");
			if (!((Object)(object)val2 == (Object)null))
			{
				Vector3 val3 = val - PlayerPos(me);
				val3.y = 0f;
				if (!(((Vector3)(ref val3)).magnitude < 1.5f))
				{
					val2.velocity += ((Vector3)(ref val3)).normalized * 18f * Time.deltaTime;
				}
			}
		}

		private void LevitateTick()
		{
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			if (Time.time < _levitateUntil)
			{
				_levitating = true;
				PlayerController instance = PlayerController.instance;
				Compat.Call(instance, "AntiGravity", 0.25f);
				Rigidbody val = Compat.Get<Rigidbody>(instance, "rb");
				if ((Object)(object)val != (Object)null)
				{
					Vector3 velocity = val.velocity;
					velocity.y = Mathf.MoveTowards(velocity.y, 3.5f, 25f * Time.deltaTime);
					val.velocity = velocity;
				}
			}
			else if (_levitating)
			{
				_levitating = false;
				LocalPush(Vector3.down * 18f);
				_flashUntil = Time.time + 0.3f;
			}
		}

		private void ChargeFxTick()
		{
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Unknown result type (might be due to invalid IL or missing references)
			//IL_0108: Unknown result type (might be due to invalid IL or missing references)
			//IL_010d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0114: Unknown result type (might be due to invalid IL or missing references)
			//IL_0115: Unknown result type (might be due to invalid IL or missing references)
			//IL_0125: 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)
			//IL_0139: Unknown result type (might be due to invalid IL or missing references)
			//IL_013e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0143: Unknown result type (might be due to invalid IL or missing references)
			//IL_014a: Unknown result type (might be due to invalid IL or missing references)
			//IL_014f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0154: Unknown result type (might be due to invalid IL or missing references)
			//IL_0159: Unknown result type (might be due to invalid IL or missing references)
			if (!Charging || (Object)(object)Seeker == (Object)null || Time.time < _chargeFxAt)
			{
				return;
			}
			_chargeFxAt = Time.time + 0.25f;
			bool num = GameRefs.IsLocal(Seeker) && !ThirdPersonCamera.Working;
			Vector3 val = (((Object)(object)_monster != (Object)null) ? ((Component)_monster).transform.position : PlayerPos(Seeker));
			float num2 = (((Object)(object)_monster != (Object)null) ? _monster.BodyHeight : 2f);
			Color val2 = Abilities.UnityColor(_chargeType);
			Effects.Ring(maxSize: 2.2f * Mathf.Max(1f, _roundScale) * 2f, center: val + Vector3.up * 0.05f, color: new Color(val2.r, val2.g, val2.b, 0.3f), life: 0.4f);
			if (!num)
			{
				Vector3 val3 = -MonsterForward();
				for (int i = 0; i < 2; i++)
				{
					Effects.Blob(val + Vector3.up * Random.Range(0.2f, num2) + Random.insideUnitSphere * 0.5f, val3 * 4f + Vector3.up, val2, 0.4f, gravity: false);
				}
			}
		}

		private static bool GroundBelow(Vector3 feet, out Vector3 normal)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0079: 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)
			normal = Vector3.up;
			RaycastHit[] array = Physics.RaycastAll(feet + Vector3.up * 0.3f, Vector3.down, 0.75f, -1, (QueryTriggerInteraction)1);
			float num = float.MaxValue;
			bool result = false;
			RaycastHit[] array2 = array;
			for (int i = 0; i < array2.Length; i++)
			{
				RaycastHit val = array2[i];
				if (!((Object)(object)((RaycastHit)(ref val)).collider == (Object)null) && !IsPlayerCollider(((RaycastHit)(ref val)).collider) && !(((RaycastHit)(ref val)).distance >= num))
				{
					num = ((RaycastHit)(ref val)).distance;
					normal = ((RaycastHit)(ref val)).normal;
					result = true;
				}
			}
			return result;
		}

		private static bool StepAhead(Vector3 feet, Vector3 dir)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: 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)
			dir.y = 0f;
			if (((Vector3)(ref dir)).sqrMagnitude < 0.001f)
			{
				return false;
			}
			((Vector3)(ref dir)).Normalize();
			if (Blocked(0.12f))
			{
				return !Blocked(0.55f);
			}
			return false;
			bool Blocked(float h)
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0011: Unknown result type (might be due to invalid IL or missing references)
				//IL_0017: Unknown result type (might be due to invalid IL or missing references)
				//IL_002f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0034: Unknown result type (might be due to invalid IL or missing references)
				//IL_0054: Unknown result type (might be due to invalid IL or missing references)
				RaycastHit[] array = Physics.RaycastAll(feet + Vector3.up * h, dir, 0.9f, -1, (QueryTriggerInteraction)1);
				for (int i = 0; i < array.Length; i++)
				{
					RaycastHit val = array[i];
					if ((Object)(object)((RaycastHit)(ref val)).collider != (Object)null && !IsPlayerCollider(((RaycastHit)(ref val)).collider) && ((RaycastHit)(ref val)).normal.y < 0.5f)
					{
						return true;
					}
				}
				return false;
			}
		}

		private void DashTick()
		{
			//IL_03a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_03dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_03eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0400: Unknown result type (might be due to invalid IL or missing references)
			//IL_0405: Unknown result type (might be due to invalid IL or missing references)
			//IL_011b: Unknown result type (might be due to invalid IL or missing references)
			//IL_019b: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_0189: Unknown result type (might be due to invalid IL or missing references)
			//IL_018e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0131: Unknown result type (might be due to invalid IL or missing references)
			//IL_0478: Unknown result type (might be due to invalid IL or missing references)
			//IL_047d: Unknown result type (might be due to invalid IL or missing references)
			//IL_034e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0353: Unknown result type (might be due to invalid IL or missing references)
			//IL_0356: Unknown result type (might be due to invalid IL or missing references)
			//IL_0363: Unknown result type (might be due to invalid IL or missing references)
			//IL_0374: Unknown result type (might be due to invalid IL or missing references)
			//IL_0381: Unknown result type (might be due to invalid IL or missing references)
			//IL_0235: Unknown result type (might be due to invalid IL or missing references)
			//IL_023f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0244: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_0254: Unknown result type (might be due to invalid IL or missing references)
			//IL_0313: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0263: Unknown result type (might be due to invalid IL or missing references)
			//IL_0268: Unknown result type (might be due to invalid IL or missing references)
			//IL_026a: Unknown result type (might be due to invalid IL or missing references)
			//IL_026f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0273: Unknown result type (might be due to invalid IL or missing references)
			//IL_027d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0282: Unknown result type (might be due to invalid IL or missing references)
			//IL_0286: Unknown result type (might be due to invalid IL or missing references)
			//IL_029d: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b1: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)Seeker == (Object)null || Time.time >= _dashEnd + 0.6f)
			{
				return;
			}
			bool num = GameRefs.IsLocal(Seeker);
			PlayerController instance = PlayerController.instance;
			if (num && (Object)(object)instance != (Object)null)
			{
				Rigidbody val = Compat.Get<Rigidbody>(instance, "rb");
				bool flag = !_dashLocalDone && Time.time < _dashEnd + 0.4f;
				if (flag || Time.time < _dashDoneAt + 0.15f)
				{
					Compat.Call(InputManager.instance, "DisableMovement", 0.2f);
					Compat.Call(instance, "InputDisable", 0.1f);
				}
				if (DashWindup)
				{
					Compat.Call(instance, "OverrideSpeed", 0f, 0.2f);
					if ((Object)(object)val != (Object)null)
					{
						val.velocity = new Vector3(0f, (_dashType == AbilityType.Lunge) ? 0f : val.velocity.y, 0f);
					}
					if (_dashType == AbilityType.Lunge)
					{
						Compat.Call(instance, "AntiGravity", 0.2f);
					}
				}
				else if (flag && (Object)(object)val != (Object)null)
				{
					if (!_dashFromSet)
					{
						_dashFrom = val.position;
						_dashFromSet = true;
					}
					Vector3 val2 = val.position - _dashFrom;
					if (_dashType == AbilityType.Charge)
					{
						val2.y = 0f;
					}
					float num2 = 24f * Abilities.DashTime(_dashType);
					if (((Vector3)(ref val2)).magnitude >= num2)
					{
						_dashLocalDone = true;
						_dashDoneAt = Time.time;
						Plugin.Log.LogInfo((object)$"[Dash] {_dashType} done: {((Vector3)(ref val2)).magnitude:0.0} m in {Time.time - _dashStart:0.00}s");
					}
					else
					{
						Vector3 val3 = _dashDir * 24f;
						if (_dashType == AbilityType.Charge)
						{
							if (GroundBelow(val.position, out var normal))
							{
								Vector3 val4 = Vector3.ProjectOnPlane(_dashDir, normal);
								val3 = ((Vector3)(ref val4)).normalized * 24f;
								val3.y = Mathf.Min(val3.y, 3f);
								if (StepAhead(val.position, _dashDir))
								{
									val3.y = Mathf.Max(val3.y, 6f);
								}
							}
							else
							{
								val3.y = Mathf.Min(val.velocity.y, 0f) - 25f * Time.deltaTime;
							}
						}
						else
						{
							Compat.Call(instance, "AntiGravity", 0.2f);
						}
						val.velocity = val3;
					}
				}
				if ((Object)(object)val != (Object)null && !DashWindup && !flag && Time.time < Mathf.Max(_dashDoneAt, _dashEnd) + 0.15f)
				{
					Vector3 velocity = val.velocity;
					val.velocity = new Vector3(velocity.x * 0.2f, Mathf.Min(velocity.y, 2f), velocity.z * 0.2f);
				}
			}
			if (!IsHost || Phase != Phase.Hunting || !Dashing)
			{
				return;
			}
			Vector3 val5 = SeekerPosition();
			float num3 = 1.8f * Mathf.Max(1f, _roundScale);
			foreach (PlayerAvatar item in AliveHiders())
			{
				if (Vector3.Distance(PlayerPos(item) + Vector3.up * 0.8f, val5 + Vector3.up * 0.8f) <= num3 && _dashHit.Add(item.photonView.ViewID))
				{
					HostDamage(item, 50, Abilities.Name(_dashType));
				}
			}
			foreach (TestDummy item2 in AliveDummies())
			{
				if (Vector3.Distance(((Component)item2).transform.position, val5) <= num3 + 0.4f && _dashHit.Add(-1000 - ((Object)item2).GetInstanceID()))
				{
					HostDamageDummy(item2, 50, val5, Abilities.Name(_dashType));
				}
			}
		}

		private bool InChargeRadius(Vector3 seekerPos, Vector3 target)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			float num = Mathf.Abs(target.y - seekerPos.y);
			float num2 = 2.2f * Mathf.Max(1f, _roundScale);
			if (FlatDistance(seekerPos, target) <= num2)
			{
				return num < ((_chargeType == AbilityType.FlyingCharge) ? 3f : 2.5f);
			}
			return false;
		}

		private void GasTick()
		{
			//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
			for (int num = _gas.Count - 1; num >= 0; num--)
			{
				if (!_gas[num].Step(Time.deltaTime))
				{
					_gas[num].Destroy();
					_gas.RemoveAt(num);
				}
			}
			if (Time.time < _tranqUntil)
			{
				PlayerController instance = PlayerController.instance;
				Compat.Call(instance, "OverrideSpeed", 0.3f, 0.2f);
				Compat.Call(instance, "OverrideLookSpeed", 0.25f, 0.5f, 1f, 0.2f);
			}
			else
			{
				_tranqShown = false;
			}
			if (_gas.Count == 0)
			{
				return;
			}
			foreach (TestDummy d in AliveDummies())
			{
				if (_gas.Any((GasCloud g) => g.Contains(((Component)d).transform.position + Vector3.up * 0.9f)))
				{
					d.Stun(0.3f, zeroG: false);
				}
			}
			if (LocalHider(out var me) && _gas.Any((GasCloud g) => g.Contains(PlayerPos(me) + Vector3.up * 0.9f)))
			{
				if (Time.time >= _tranqUntil)
				{
					_tranqUntil = Time.time + 5f;
				}
				if (!_tranqShown)
				{
					_tranqShown = true;
					Banner(L.Tranquilized, Abilities.UnityColor(AbilityType.NoxiousGas), 2.5f);
				}
			}
		}

		private void DrawTranqOverlay(float sw, float sh)
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: 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_002d: 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_0053: Unknown result type (might be due to invalid IL or missing references)
			if (!(Time.time >= _tranqUntil))
			{
				Color val = Abilities.UnityColor(AbilityType.NoxiousGas);
				GUI.color = new Color(val.r, val.g, val.b, 0.16f);
				GUI.DrawTexture(new Rect(0f, 0f, sw, sh), (Texture)(object)_white);
				GUI.color = Color.white;
			}
		}

		private void HostZeroG(Vector3 c, float r)
		{
			//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_0139: Unknown result type (might be due to invalid IL or missing references)
			//IL_013e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0142: Unknown result type (might be due to invalid IL or missing references)
			//IL_014c: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0190: 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_01ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_0209: Unknown result type (might be due to invalid IL or missing references)
			//IL_0213: Unknown result type (might be due to invalid IL or missing references)
			foreach (PlayerAvatar item in AliveHiders())
			{
				int viewID = item.photonView.ViewID;
				if (!_zeroGCaught.Contains(viewID) && Vector3.Distance(PlayerPos(item), c) > r)
				{
					continue;
				}
				_zeroGCaught.Add(viewID);
				Component val = Compat.Get<Component>(item, "tumble");
				if ((Object)(object)val == (Object)null)
				{
					continue;
				}
				Rigidbody val2 = Compat.Get<Rigidbody>(val, "rb");
				bool flag = Compat.Get(item, "isTumbling", fallback: false) || Compat.Get(val, "isTumbling", fallback: false);
				Compat.Call(val, "TumbleOverrideTime", 0.4f);
				if (!flag || (Object)(object)val2 == (Object)null || val2.isKinematic)
				{
					if (Time.time >= _zeroGRequestAt)
					{
						_zeroGRequestAt = Time.time + 0.4f;
						Compat.Call(val, "TumbleSet", true, false);
					}
					continue;
				}
				Compat.Call(val, "DisableCustomGravity", 0.3f);
				Vector3 velocity = val2.velocity;
				float num = ((val2.position.y < c.y + 2.5f) ? 1.2f : 0f);
				val2.velocity = new Vector3(velocity.x * 0.97f, Mathf.MoveTowards(velocity.y, num, 25f * Time.deltaTime), velocity.z * 0.97f);
				val2.angularVelocity = Vector3.MoveTowards(val2.angularVelocity, new Vector3(0.5f, 0.8f, 0.3f), 2f * Time.deltaTime);
				if (Time.time >= _zeroGLogAt)
				{
					_zeroGLogAt = Time.time + 1f;
					Plugin.Log.LogInfo((object)$"[Zero-G] host floats {viewID}: height {val2.position.y - c.y:0.0} m");
				}
			}
		}

		private void GrabTick()
		{
			//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)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Unknown result type (might be due to invalid IL or missing references)
			//IL_0126: Unknown result type (might be due to invalid IL or missing references)
			//IL_0129: Unknown result type (might be due to invalid IL or missing references)
			//IL_012e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0138: Unknown result type (might be due to invalid IL or missing references)
			//IL_013d: Unknown result type (might be due to invalid IL or missing references)
			//IL_014e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0155: Unknown result type (might be due to invalid IL or missing references)
			//IL_015c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0168: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c3: 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_03b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0382: Unknown result type (might be due to invalid IL or missing references)
			//IL_0387: 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_03ae: Unknown result type (might be due to invalid IL or missing references)
			if (!Grabbing || (Object)(object)Seeker == (Object)null)
			{
				_zeroGCaught.Clear();
				return;
			}
			Vector3 c = PlayerPos(Seeker);
			float r = Abilities.GrabRadius(_grabType) * Mathf.Max(1f, _roundScale);
			bool flag = _grabType == AbilityType.ZeroGGrab;
			foreach (TestDummy item in AliveDummies())
			{
				if (Vector3.Distance(((Component)item).transform.position, c) <= r)
				{
					item.Stun(0.3f, flag);
				}
			}
			if (IsHost && flag)
			{
				Safe("zero-g host", delegate
				{
					//IL_0007: Unknown result type (might be due to invalid IL or missing references)
					HostZeroG(c, r);
				});
			}
			if (GameRefs.IsLocal(Seeker))
			{
				if (Time.time >= _grabFxAt)
				{
					_grabFxAt = Time.time + 0.5f;
					Color val = Abilities.UnityColor(_grabType);
					Effects.Ring(c + Vector3.up * 0.05f, r * 2f, new Color(val.r, val.g, val.b, 0.25f), 0.5f);
					int n = AliveHiders().Count((PlayerAvatar h) => Vector3.Distance(PlayerPos(h), c) <= r) + AliveDummies().Count((TestDummy d) => Vector3.Distance(((Component)d).transform.position, c) <= r);
					Banner(L.GrabCaught(Abilities.Name(_grabType), n), val, 0.6f);
				}
			}
			else
			{
				if (!LocalHider(out var me) || (!_grabCaught && Vector3.Distance(PlayerPos(me), c) > r))
				{
					return;
				}
				PlayerController instance = PlayerController.instance;
				_stunUntil = Mathf.Max(_stunUntil, Time.time + 0.3f);
				Compat.Call(instance, "OverrideSpeed", 0.1f, 0.2f);
				Component val2 = Compat.Get<Component>(me, "tumble");
				if ((Object)(object)val2 != (Object)null)
				{
					if (!_grabCaught)
					{
						Compat.Call(val2, "TumbleRequest", true, false);
						Plugin.Log.LogInfo((object)$"[Monster] caught by {_grabType}: tumbling");
						if (_grabType == AbilityType.ZeroGGrab)
						{
							Compat.Call(val2, "TumbleForce", Vector3.up * 4f);
						}
					}
					Compat.Call(val2, "T