using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using Chaos.AnimatorExtensions;
using LegendAPI;
using SillySkills.States;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("SillySkills")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SillySkills")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("d6a94779-cf08-4cfb-976b-ac9eb4f27402")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
internal static class Log
{
internal static ManualLogSource _logSource;
internal static void Init(ManualLogSource logSource)
{
_logSource = logSource;
}
internal static void Debug(object data)
{
_logSource.LogDebug(data);
}
internal static void Error(object data)
{
_logSource.LogError(data);
}
internal static void Fatal(object data)
{
_logSource.LogFatal(data);
}
internal static void Info(object data)
{
_logSource.LogInfo(data);
}
internal static void Message(object data)
{
_logSource.LogMessage(data);
}
internal static void Warning(object data)
{
_logSource.LogWarning(data);
}
}
internal class TestValueManager : MonoBehaviour
{
private float _tim;
private float _holdTime = 0.4f;
public static float value1 = 2f;
public static float value2 = 5f;
public static float value3 = 0.7f;
public static float value4 = 0.1f;
public static float value5 = 0.25f;
public static float value6 = 0.15f;
public static bool testingEnabled => false;
private void Update()
{
if (testingEnabled && Input.GetKey((KeyCode)308))
{
manageTestValue(ref value1, "funny", (KeyCode)263, (KeyCode)260, 0.01f);
manageTestValue(ref value2, "max dist knockback", (KeyCode)264, (KeyCode)261, 0.01f);
}
}
private void manageTestValue(ref float value, string valueName, KeyCode upKey, KeyCode downKey, float incrementAmount)
{
//IL_0001: 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_0036: 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_00a6: Unknown result type (might be due to invalid IL or missing references)
//IL_004f: Unknown result type (might be due to invalid IL or missing references)
//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
if (Input.GetKeyDown(upKey))
{
value = setTestValue(value + incrementAmount, valueName);
}
if (Input.GetKeyDown(downKey))
{
value = setTestValue(value - incrementAmount, valueName);
}
if (Input.GetKey(upKey) || Input.GetKey(downKey))
{
float num = incrementAmount * (float)(Input.GetKey(upKey) ? 1 : (-1));
_tim += Time.deltaTime;
if (_tim > _holdTime)
{
_tim = _holdTime - 0.02f;
value = setTestValue(value + num, valueName);
}
}
if (Input.GetKeyUp(upKey) || Input.GetKeyUp(downKey))
{
_tim = 0f;
}
}
private float setTestValue(float value, string print)
{
Log.Warning(print + ": " + value.ToString("0.000"));
return value;
}
}
namespace SillySkills
{
public class Assets
{
public static PluginInfo pluginInfo;
public static AssetBundle funnyBundle;
public static AssetBundle unfunnyBundle;
public static GameObject FloorSpikeSmall;
public static GameObject FloorSpikeLarge;
internal static string assemblyDir => Path.GetDirectoryName(pluginInfo.Location);
internal static void Init(PluginInfo info)
{
pluginInfo = info;
funnyBundle = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(pluginInfo.Location), Path.Combine("Assets", "skillsbundle")));
unfunnyBundle = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(pluginInfo.Location), Path.Combine("Assets", "skillsunfunny")));
}
internal static void LateInit()
{
FloorSpikeSmall = funnyBundle.LoadAsset<GameObject>("FloorSpikeSmall");
SetupFloorSpikeIn2023(FloorSpikeSmall, "Small");
FloorSpikeLarge = funnyBundle.LoadAsset<GameObject>("FloorSpikeLarge");
SetupFloorSpikeIn2023(FloorSpikeLarge, "Large");
}
private static void SetupFloorSpikeIn2023(GameObject spikeObject, string bigorsmall)
{
FloorSpike component = spikeObject.GetComponent<FloorSpike>();
component.spikeRendererRenderer = ((Component)spikeObject.transform.GetChild(0).GetChild(0)).gameObject.AddComponent<SpriteRenderer>();
((Renderer)component.spikeRendererRenderer).sortingLayerName = "Actor";
Material material = ChaosBundle.Get<Material>("Assets/materials/basic/Sprite-Diffuse.mat");
((Renderer)component.spikeRendererRenderer).material = material;
component.TopSprite = unfunnyBundle.LoadAsset<Sprite>("Floorspike" + bigorsmall + "Top");
component.SideSprite = unfunnyBundle.LoadAsset<Sprite>("Floorspike" + bigorsmall + "Side");
component.BottomSprite = unfunnyBundle.LoadAsset<Sprite>("Floorspike" + bigorsmall + "Bottom");
}
internal static string GetFilePathFromPlugin(string folderName, string fileName)
{
return Path.Combine(assemblyDir, Path.Combine(folderName, fileName));
}
public static T LoadJsonFromFile<T>(string json)
{
string filePathFromPlugin = GetFilePathFromPlugin("Assets", json);
string text;
using (StreamReader streamReader = new StreamReader(filePathFromPlugin))
{
text = streamReader.ReadToEnd();
}
return JsonUtility.FromJson<T>(text);
}
public static T LoadJsonFromEmbedded<T>(string json)
{
Assembly executingAssembly = Assembly.GetExecutingAssembly();
string name = "SkillsButEpic.Assets." + json;
string text;
using (Stream stream = executingAssembly.GetManifestResourceStream(name))
{
using StreamReader streamReader = new StreamReader(stream);
text = streamReader.ReadToEnd();
}
return JsonUtility.FromJson<T>(text);
}
public static Sprite LoadSprite(string path)
{
return unfunnyBundle.LoadAsset<Sprite>(path);
}
}
[BepInPlugin("TheTimeSweeper.SillySkills", "SillySkills", "1.2.0")]
public class SillySkillsPlugin : BaseUnityPlugin
{
private void Awake()
{
Log.Init(((BaseUnityPlugin)this).Logger);
Assets.Init(((BaseUnityPlugin)this).Info);
if (TestValueManager.testingEnabled)
{
((Component)this).gameObject.AddComponent<TestValueManager>();
}
InitSkills();
}
private void Start()
{
Assets.LateInit();
}
private static void InitSkills()
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0007: Expected O, but got Unknown
//IL_007a: Unknown result type (might be due to invalid IL or missing references)
//IL_0080: Expected O, but got Unknown
//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
//IL_00db: Expected O, but got Unknown
//IL_01b7: Unknown result type (might be due to invalid IL or missing references)
//IL_01bd: Expected O, but got Unknown
//IL_0211: Unknown result type (might be due to invalid IL or missing references)
//IL_0218: Expected O, but got Unknown
SkillInfo val = new SkillInfo();
val.ID = "AirChannelDashGood";
val.displayName = "Gust Burst";
val.description = "Dash forward with such force that enemies in the area are pulled into your wake!";
val.enhancedDescription = "Creates a secondary burst on landing!";
val.icon = Assets.LoadSprite("AirChannelDashGood");
val.tier = 1;
val.stateType = typeof(AirChannelDashGoodState);
val.skillStats = Assets.LoadJsonFromFile<SkillStats>("AirChannelDashGoodSkillStats.json");
val.priceMultiplier = 4;
SkillInfo val2 = val;
Skills.Register(val2);
val = new SkillInfo();
val.ID = GustBurstButBigState.staticID;
val.displayName = "Gale Burst";
val.description = "Create large pulling wind bursts at your position!";
val.enhancedDescription = "Create a third, larger wind burst!";
val.icon = Assets.LoadSprite("GustBurstButBig");
val.tier = 3;
val.stateType = typeof(GustBurstButBigState);
SkillInfo obj = val;
SkillStats val3 = new SkillStats();
val3.ID = new string[1] { GustBurstButBigState.staticID };
val3.elementType = new string[1] { "Air" };
val3.subElementType = new string[1] { "Air" };
val3.targetNames = new string[2] { "EnemyHurtBox", "DestructibleHurtBox" };
val3.damage = new int[1] { 17 };
val3.cooldown = new float[1] { 5f };
val3.knockbackMultiplier = new float[3] { -20f, -17f, -12f };
val3.hitStunDurationModifier = new float[1] { 1.2f };
val3.sameAttackImmunityTime = new float[1] { 0.25f };
obj.skillStats = val3;
val.priceMultiplier = 6;
SkillInfo val4 = val;
Skills.Register(val4);
val = new SkillInfo();
val.ID = GustBurstButEarthState.staticID;
val.displayName = "Stone Outburst";
val.description = "Create an impassible ring of stones, pushing enemies towards you!";
val.enhancedDescription = "Stones are larger and deal more damage!";
val.icon = Assets.LoadSprite("GustBurstButEarth");
val.tier = 3;
val.stateType = typeof(GustBurstButEarthState);
SkillInfo obj2 = val;
val3 = new SkillStats();
val3.ID = new string[1] { GustBurstButEarthState.staticID };
val3.elementType = new string[1] { "Earth" };
val3.subElementType = new string[1] { "Earth" };
val3.targetNames = new string[2] { "EnemyFloorContact", "DestructibleHurtBox" };
val3.damage = new int[3] { 40, 50, 0 };
val3.cooldown = new float[1] { 7f };
val3.knockbackMultiplier = new float[3] { 0f, 0f, 1f };
val3.knockbackOverwrite = new bool[1];
val3.hitStunDurationModifier = new float[3] { 3f, 3f, 1f };
val3.sameAttackImmunityTime = new float[1];
val3.sameTargetImmunityTime = new float[1] { 0.5f };
val3.showDamageNumber = new bool[3] { true, true, false };
obj2.skillStats = val3;
val.priceMultiplier = 6;
SkillInfo val5 = val;
Skills.Register(val5);
}
}
public class FloorSpike : MonoBehaviour
{
public Sprite TopSprite;
public Sprite SideSprite;
public Sprite BottomSprite;
public SpriteRenderer spikeRendererRenderer;
[SerializeField]
private Transform spriteAnchor;
[SerializeField]
private Attack attackBox;
[SerializeField]
private GameObject floorContact;
private Vector3 _summonerPosition;
private bool _invisible;
private AttackInfo _onHitInfo;
private int _attackStopwatchID;
private int _riseStopwatchID;
private int _riseStage;
private float[] _riseStageScales = new float[2] { 0.2f, 1f };
public Attack AttackBox => attackBox;
public void Init(Vector3 summonerPosition, FacingDirection direction, bool invisible)
{
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_003a: Unknown result type (might be due to invalid IL or missing references)
//IL_006a: Unknown result type (might be due to invalid IL or missing references)
//IL_0074: Expected O, but got Unknown
//IL_0074: Unknown result type (might be due to invalid IL or missing references)
//IL_007e: Expected O, but got Unknown
//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
//IL_00c4: 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_00c6: Unknown result type (might be due to invalid IL or missing references)
//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
//IL_00dd: Expected I4, but got Unknown
_attackStopwatchID = ChaosStopwatch.Begin(0.2f, true, 3f, 2, 0);
_riseStopwatchID = ChaosStopwatch.Begin(0f, true, 0.0417f, _riseStageScales.Length, 0);
_summonerPosition = summonerPosition;
_invisible = invisible;
_onHitInfo = attackBox.atkInfo;
Attack obj = attackBox;
obj.entityCollisionEventHandlers = (EntityCollisionEventHandler)Delegate.Combine((Delegate?)(object)obj.entityCollisionEventHandlers, (Delegate?)new EntityCollisionEventHandler(onAttackHit));
toggleAttack(status: true);
if (_invisible)
{
((Renderer)spikeRendererRenderer).enabled = false;
return;
}
spriteAnchor.localScale = new Vector3(1f, 0f, 1f);
switch ((int)direction)
{
case 0:
spikeRendererRenderer.sprite = BottomSprite;
break;
case 1:
spikeRendererRenderer.sprite = SideSprite;
break;
case 2:
spikeRendererRenderer.sprite = TopSprite;
break;
case 3:
spikeRendererRenderer.sprite = SideSprite;
spikeRendererRenderer.flipX = true;
break;
}
PlayPlaySpawnParticles();
}
private void PlayPlaySpawnParticles()
{
//IL_0012: 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_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_005f: 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)
PoolManager.GetPoolItem<RockMedDebrisEmitter>().EmitSingle((int?)3, (Vector3?)(((Component)this).transform.position + Vector3.up * 0.7f), (ParticleSystemOverride)null, (Vector3?)null, 0f, (float?)null);
PoolManager.GetPoolItem<RockDebrisEmitter>().EmitSingle((int?)2, (Vector3?)((Component)this).transform.position, (ParticleSystemOverride)null, (Vector3?)null, 0f, (float?)null);
((ParticleEffect)PoolManager.GetPoolItem<FloorCrackEmitter>()).Emit((int?)1, (Vector3?)((Component)this).transform.position, (ParticleSystemOverride)null, (Vector3?)null, 0f, (float?)null, (Transform)null);
}
private void OnDestroy()
{
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001e: Expected O, but got Unknown
//IL_001e: Unknown result type (might be due to invalid IL or missing references)
//IL_0028: Expected O, but got Unknown
Attack obj = attackBox;
obj.entityCollisionEventHandlers = (EntityCollisionEventHandler)Delegate.Remove((Delegate?)(object)obj.entityCollisionEventHandlers, (Delegate?)new EntityCollisionEventHandler(onAttackHit));
}
private void Update()
{
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_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_0010: Unknown result type (might be due to invalid IL or missing references)
//IL_0012: Unknown result type (might be due to invalid IL or missing references)
//IL_0024: Expected I4, but got Unknown
//IL_0042: Unknown result type (might be due to invalid IL or missing references)
//IL_0048: Invalid comparison between Unknown and I4
//IL_006c: Unknown result type (might be due to invalid IL or missing references)
StopwatchState val = ChaosStopwatch.CheckInterval(_attackStopwatchID, true);
StopwatchState val2 = val;
switch (val2 - -1)
{
case 2:
toggleAttack(status: false);
break;
case 0:
BreakSelf();
break;
}
if ((int)ChaosStopwatch.CheckInterval(_riseStopwatchID, true) == 1)
{
spriteAnchor.localScale = new Vector3(1f, _riseStageScales[_riseStage], 1f);
_riseStage++;
}
}
private void onAttackHit(Entity givenEnt)
{
//IL_0026: Unknown result type (might be due to invalid IL or missing references)
//IL_002b: Unknown result type (might be due to invalid IL or missing references)
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
//IL_0037: Unknown result type (might be due to invalid IL or missing references)
//IL_0038: Unknown result type (might be due to invalid IL or missing references)
//IL_0068: Unknown result type (might be due to invalid IL or missing references)
//IL_006e: Unknown result type (might be due to invalid IL or missing references)
//IL_0072: Unknown result type (might be due to invalid IL or missing references)
//IL_0078: Unknown result type (might be due to invalid IL or missing references)
//IL_007e: Unknown result type (might be due to invalid IL or missing references)
//IL_0084: Unknown result type (might be due to invalid IL or missing references)
//IL_0086: Unknown result type (might be due to invalid IL or missing references)
//IL_008b: Unknown result type (might be due to invalid IL or missing references)
if (!((Object)(object)givenEnt == (Object)null) && !((Object)(object)givenEnt.hurtBoxTransform == (Object)null))
{
Vector3 position = givenEnt.hurtBoxTransform.position;
float num = Vector2.Distance(Vector2.op_Implicit(_summonerPosition), Vector2.op_Implicit(position));
float num2 = Mathf.Lerp(-25f, 70f, num / 10f);
_onHitInfo.knockbackVector = attackBox.GetKnockbackVector(default(Vector2), default(Vector2), num2, true, default(Vector2));
givenEnt.ApplyKnockback(_onHitInfo);
}
}
private void toggleAttack(bool status)
{
((Component)AttackBox).gameObject.SetActive(status);
floorContact.SetActive(!status && !_invisible);
}
private void BreakSelf()
{
//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_0049: Unknown result type (might be due to invalid IL or missing references)
//IL_004e: Unknown result type (might be due to invalid IL or missing references)
//IL_0058: Unknown result type (might be due to invalid IL or missing references)
//IL_005d: Unknown result type (might be due to invalid IL or missing references)
//IL_0097: Unknown result type (might be due to invalid IL or missing references)
//IL_009c: Unknown result type (might be due to invalid IL or missing references)
//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
//IL_0137: Unknown result type (might be due to invalid IL or missing references)
//IL_013c: Unknown result type (might be due to invalid IL or missing references)
//IL_0146: Unknown result type (might be due to invalid IL or missing references)
//IL_014b: Unknown result type (might be due to invalid IL or missing references)
//IL_0187: Unknown result type (might be due to invalid IL or missing references)
//IL_018c: 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_01d7: 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_01e6: Unknown result type (might be due to invalid IL or missing references)
//IL_01eb: Unknown result type (might be due to invalid IL or missing references)
SoundManager.PlayAudioWithDistance("RockExplode", (Vector2?)Vector2.op_Implicit(((Component)this).transform.position), (Transform)null, 24f, -1f, SoundManager.StandardPitchRange, false);
DustEmitter poolItem = PoolManager.GetPoolItem<DustEmitter>();
int num = 40;
float num2 = 0.25f;
Vector3? val = ((Component)this).transform.position + Vector3.down * 0.25f;
poolItem.EmitCircle(num, num2, -1f, -1f, val, (Vector3?)null);
PoolManager.GetPoolItem<RockMedDebrisEmitter>().EmitSingle((RockDebrisType)0, (int?)3, (Vector3?)(((Component)this).transform.position + Vector3.up * 1.125f), (ParticleSystemOverride)null, (Vector3?)null, 0f, (float?)null);
PoolManager.GetPoolItem<RockMedDebrisEmitter>().EmitSingle((RockDebrisType)0, (int?)3, (Vector3?)(((Component)this).transform.position + Vector3.up * 1.75f), (ParticleSystemOverride)null, (Vector3?)null, 0f, (float?)null);
PoolManager.GetPoolItem<RockMedDebrisEmitter>().EmitSingle((RockDebrisType)0, (int?)1, (Vector3?)(((Component)this).transform.position + Vector3.up * 2.5f), (ParticleSystemOverride)null, (Vector3?)null, 0f, (float?)null);
PoolManager.GetPoolItem<RockMedDebrisEmitter>().EmitSingle((RockDebrisType)0, (int?)3, (Vector3?)(((Component)this).transform.position + Vector3.left * 0.33f), (ParticleSystemOverride)null, (Vector3?)null, 0f, (float?)null);
PoolManager.GetPoolItem<RockMedDebrisEmitter>().EmitSingle((RockDebrisType)0, (int?)3, (Vector3?)(((Component)this).transform.position + Vector3.right * 0.33f), (ParticleSystemOverride)null, (Vector3?)null, 0f, (float?)null);
if ((Object)(object)((Component)this).gameObject != (Object)null)
{
Object.Destroy((Object)(object)((Component)this).gameObject);
}
}
}
public static class Utils
{
public enum SkillEmpowerment
{
Normal,
Empowered,
Ultimate
}
private static int savedJsonCount;
public static void SaveJson<T>(T obj, string filename = "")
{
string contents = JsonUtility.ToJson((object)obj, true);
string text = Application.persistentDataPath + $"/ALLTHETHINGS2/{filename}{obj}.json";
savedJsonCount++;
File.WriteAllText(text, contents);
Log.Warning("printedjson to " + text);
}
public static SkillEmpowerment GetSkillEmpowerment(this SkillState state)
{
return GetSkillEmpowerment(state.IsEmpowered, state.isUltimate);
}
public static SkillEmpowerment GetSkillEmpowerment(bool isEmpowered, bool isUltimate)
{
return isUltimate ? SkillEmpowerment.Ultimate : (isEmpowered ? SkillEmpowerment.Empowered : SkillEmpowerment.Normal);
}
public static void PrintMyCodePlease()
{
SkillStats val = Assets.LoadJsonFromFile<SkillStats>("AirChannelDashGoodSkillStats.json");
string text = "printing " + ((object)val).GetType();
FieldInfo[] fields = ((object)val).GetType().GetFields();
int num = 0;
foreach (FieldInfo fieldInfo in fields)
{
if (fieldInfo.Name.Length > num)
{
num = fieldInfo.Name.Length;
}
}
foreach (FieldInfo fieldInfo2 in fields)
{
text = text + "\nskillStats." + fieldInfo2.Name + "[i] = attackInfo." + fieldInfo2.Name + ";";
}
Log.Message(text);
}
private static object GetCodeTypeString(object infoValue)
{
string text = infoValue.GetType().ToString();
text = text.Replace("System.String", "string");
text = text.Replace("System.Boolean", "bool");
text = text.Replace("System.Int32", "int");
return text.Replace("System.Single", "float");
}
public static void printAllFields<T>(T obj, bool saveJson = false)
{
string text = "printing " + obj.GetType();
FieldInfo[] fields = obj.GetType().GetFields();
int num = 0;
foreach (FieldInfo fieldInfo in fields)
{
if (fieldInfo.Name.Length > num)
{
num = fieldInfo.Name.Length;
}
}
foreach (FieldInfo fieldInfo2 in fields)
{
text += $"\n{fieldInfo2.Name.PadLeft(num, '-')}| {fieldInfo2.GetValue(obj)}";
}
Log.Message(text);
if (saveJson)
{
SaveJson(obj);
}
}
public static void PrintStatData(StatData self)
{
Log.Warning("Printing all stat data");
foreach (KeyValuePair<string, object> item in self.statDict)
{
Log.Warning(item.Key + ":");
if (item.Value is List<float>)
{
PrintList(item.Value as List<float>);
}
if (item.Value is List<int>)
{
PrintList(item.Value as List<int>);
}
if (item.Value is List<bool>)
{
PrintList(item.Value as List<bool>);
}
if (item.Value is List<string>)
{
PrintList(item.Value as List<string>);
}
}
}
public static void PrintList<T>(List<T> list)
{
Log.Warning("Printing list. Count: " + list.Count);
for (int i = 0; i < list.Count; i++)
{
Log.Warning(list[i]);
}
}
public static List<Vector3> DistributePointsEvenlyAroundCircle(int points, float radius, Vector3 origin)
{
//IL_0029: Unknown result type (might be due to invalid IL or missing references)
//IL_003b: Unknown result type (might be due to invalid IL or missing references)
//IL_0044: 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)
List<Vector3> list = new List<Vector3>();
double num = Math.PI * 2.0 / (double)points;
Vector3 item = default(Vector3);
for (int i = 0; i < points; i++)
{
double num2 = num * (double)i;
((Vector3)(ref item))..ctor((float)((double)radius * Math.Cos(num2) + (double)origin.x), (float)((double)radius * Math.Sin(num2) + (double)origin.y), origin.z);
list.Add(item);
}
return list;
}
}
}
namespace SillySkills.States
{
public class AirChannelDashGoodState : BaseDashState
{
public static string staticID = "AirChannelDashGood";
private WindBurst currentWB;
private AirChannel currentAC;
private Vector2 spawnPosition;
private float burstScale = 1.75f;
private ParticleSystemOverride implosionOverride = new ParticleSystemOverride
{
startSize = 5.5f,
startLifetime = 0.7f
};
private ParticleSystemOverride implosionOverrideLarge = new ParticleSystemOverride
{
startSize = 6.5f,
startLifetime = 0.6f
};
public AirChannelDashGoodState(FSM fsm, Player parentPlayer)
: base(staticID, fsm, parentPlayer)
{
//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_0021: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: Expected O, but got Unknown
//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_004c: Unknown result type (might be due to invalid IL or missing references)
//IL_0061: Expected O, but got Unknown
((SkillState)this).applyStopElementStatus = true;
((SkillState)this).InitChargeSkillSettings(2, 0f, ((SkillState)this).skillData, (SkillState)(object)this);
}
public override void SetEmpowered(bool givenStatus, BoolVarStatMod givenMod)
{
((SkillState)this).SetEmpowered(givenStatus, givenMod);
burstScale = ((!((SkillState)this).IsEmpowered) ? 1.75f : 2f);
}
public override void OnEnter()
{
//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_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_0048: Unknown result type (might be due to invalid IL or missing references)
//IL_004d: Unknown result type (might be due to invalid IL or missing references)
//IL_0079: Unknown result type (might be due to invalid IL or missing references)
//IL_007f: Unknown result type (might be due to invalid IL or missing references)
//IL_0085: Unknown result type (might be due to invalid IL or missing references)
//IL_008f: Unknown result type (might be due to invalid IL or missing references)
//IL_0094: Unknown result type (might be due to invalid IL or missing references)
//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
//IL_00dc: 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_00eb: Unknown result type (might be due to invalid IL or missing references)
((BaseDashState)this).OnEnter();
if (base.cooldownReady)
{
spawnPosition = Vector2.op_Implicit(((State<Player>)this).parent.attackOriginTrans.position);
CreateImplosion();
SoundManager.PlayAudioWithDistance("StandardHeavySwing", (Vector2?)Vector2.op_Implicit(((Component)((State<Player>)this).parent).transform.position), (Transform)null, 24f, -1f, 1.4f, false);
PoolManager.GetPoolItem<SectionedTrailEmitter>("WindTrail").Emit(spawnPosition, spawnPosition + ((SkillState)this).inputVector * 5f, -1, false, -1f, true, 0.3f, 0.15f, (Color32?)null, true, (Vector3?)null, (string)null);
PoolManager.GetPoolItem<SectionedTrailEmitter>("WindTrail").Emit(spawnPosition, spawnPosition + ((SkillState)this).inputVector * 5f, -1, false, -1f, true, 0.4f, 0.15f, (Color32?)null, true, (Vector3?)null, (string)null);
}
}
public override void OnExit()
{
//IL_005e: Unknown result type (might be due to invalid IL or missing references)
//IL_0063: Unknown result type (might be due to invalid IL or missing references)
//IL_0068: Unknown result type (might be due to invalid IL or missing references)
if (base.cooldownReady && !((State<Player>)this).fsm.nextStateName.Contains("Hurt") && !((State<Player>)this).fsm.nextStateName.Contains("Dead"))
{
CreateAirChannel();
if (((SkillState)this).IsEmpowered)
{
spawnPosition = Vector2.op_Implicit(((State<Player>)this).parent.attackOriginTrans.position);
CreateImplosion();
}
}
((BaseDashState)this).OnExit();
}
private void CreateImplosion()
{
//IL_0003: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_004c: 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_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_00bb: Unknown result type (might be due to invalid IL or missing references)
//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
//IL_011a: Unknown result type (might be due to invalid IL or missing references)
//IL_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_0179: 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_01af: Unknown result type (might be due to invalid IL or missing references)
//IL_01d8: Unknown result type (might be due to invalid IL or missing references)
//IL_020d: Unknown result type (might be due to invalid IL or missing references)
//IL_0212: Unknown result type (might be due to invalid IL or missing references)
currentWB = WindBurst.CreateBurst(Vector2.op_Implicit(spawnPosition), ((Entity)((State<Player>)this).parent).skillCategory, ((SkillState)this).skillID, 1, burstScale);
currentWB.emitParticles = false;
PoolManager.GetPoolItem<ParticleEffect>("WindBurstEffect").Emit((int?)3, (Vector3?)Vector2.op_Implicit(spawnPosition), (ParticleSystemOverride)null, (Vector3?)null, 0f, (float?)null, (Transform)null);
PoolManager.GetPoolItem<ParticleEffect>("AirVortex").Emit((int?)1, (Vector3?)Vector2.op_Implicit(spawnPosition), implosionOverride, (Vector3?)new Vector3(0f, 0f, Random.Range(0f, 33f)), 0f, (float?)null, (Transform)null);
PoolManager.GetPoolItem<ParticleEffect>("AirVortex").Emit((int?)1, (Vector3?)Vector2.op_Implicit(spawnPosition), implosionOverride, (Vector3?)new Vector3(0f, 0f, Random.Range(180f, 213f)), 0f, (float?)null, (Transform)null);
PoolManager.GetPoolItem<ParticleEffect>("AirVortex").Emit((int?)1, (Vector3?)Vector2.op_Implicit(spawnPosition), implosionOverride, (Vector3?)new Vector3(0f, 0f, Random.Range(0f, 360f)), 0f, (float?)null, (Transform)null);
PoolManager.GetPoolItem<ParticleEffect>("AirVortex").Emit((int?)1, (Vector3?)Vector2.op_Implicit(spawnPosition), implosionOverrideLarge, (Vector3?)new Vector3(0f, 0f, Random.Range(0f, 360f)), 0f, (float?)null, (Transform)null);
DustEmitter poolItem = PoolManager.GetPoolItem<DustEmitter>();
int num = 150;
float num2 = 2f;
Vector3? val = Vector2.op_Implicit(spawnPosition);
poolItem.EmitCircle(num, num2, -8f, -1f, val, (Vector3?)null);
}
private void CreateAirChannel()
{
//IL_0009: 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_0019: Unknown result type (might be due to invalid IL or missing references)
//IL_005e: Unknown result type (might be due to invalid IL or missing references)
//IL_0063: Unknown result type (might be due to invalid IL or missing references)
//IL_006f: Unknown result type (might be due to invalid IL or missing references)
//IL_0074: Unknown result type (might be due to invalid IL or missing references)
currentAC = ((SkillState)this).ChaosInst<AirChannel>(AirChannel.Prefab, (Vector2?)spawnPosition, (Quaternion?)Globals.GetRotationQuaternion(((SkillState)this).inputVector), (Transform)null);
currentAC.attack.SetAttackInfo(((Entity)((State<Player>)this).parent).skillCategory, ((SkillState)this).skillID, 2, false);
currentAC.attack.knockbackOverwriteVector = ((SkillState)this).inputVector;
currentAC.targetVector = ((SkillState)this).inputVector;
}
}
public class GustBurstButBigState : SkillState
{
public static string staticID = "GustBurstButBig";
private WindBurst currentWB;
private float burstScale = 5f;
private int stopwatchID;
private bool switchDirection;
private ParticleSystemOverride implosionOverrideNormal = new ParticleSystemOverride
{
startSize = 6f * scaleNormal,
startLifetime = 0.7f
};
private ParticleSystemOverride implosionOverrideNormalLarge = new ParticleSystemOverride
{
startSize = 12f * scaleNormal,
startLifetime = 0.6f
};
private ParticleSystemOverride implosionOverrideEmpowered = new ParticleSystemOverride
{
startSize = 6f * scaleEmpowered,
startLifetime = 0.7f
};
private ParticleSystemOverride implosionOverrideEmpoweredLarge = new ParticleSystemOverride
{
startSize = 13f * scaleEmpowered,
startLifetime = 0.6f
};
private ParticleSystemOverride implosionOverrideUltimate = new ParticleSystemOverride
{
startSize = 6f * scaleUltimate,
startLifetime = 0.7f
};
private ParticleSystemOverride implosionOverrideUltimateLarge = new ParticleSystemOverride
{
startSize = 13f * scaleUltimate,
startLifetime = 0.6f
};
private static float scaleNormal = 0.85f;
private static float scaleEmpowered = 1.1f;
private static float scaleUltimate = 1.7f;
private ParticleSystemOverride implosionOverride;
private ParticleSystemOverride implosionOverrideLarge;
private float scaleMultiplier;
private float stopwatchIntervalTime;
private int stopwatchTotalIntervals;
private int skillLevel;
private void SetValues()
{
switch (((SkillState)(object)this).GetSkillEmpowerment())
{
default:
implosionOverride = implosionOverrideNormal;
implosionOverrideLarge = implosionOverrideNormalLarge;
scaleMultiplier = scaleNormal;
stopwatchIntervalTime = 0.25f;
stopwatchTotalIntervals = 2;
skillLevel = 1;
break;
case Utils.SkillEmpowerment.Empowered:
implosionOverride = implosionOverrideEmpowered;
implosionOverrideLarge = implosionOverrideEmpoweredLarge;
scaleMultiplier = scaleEmpowered;
stopwatchIntervalTime = 0.15f;
stopwatchTotalIntervals = 3;
skillLevel = 2;
break;
case Utils.SkillEmpowerment.Ultimate:
implosionOverride = implosionOverrideUltimate;
implosionOverrideLarge = implosionOverrideUltimateLarge;
scaleMultiplier = scaleUltimate;
stopwatchIntervalTime = 0.12f;
stopwatchTotalIntervals = 8;
skillLevel = 3;
break;
}
}
public GustBurstButBigState(FSM newFSM, Player newEnt)
: base(staticID, newFSM, newEnt)
{
//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_0027: Unknown result type (might be due to invalid IL or missing references)
//IL_003c: Expected O, but got Unknown
//IL_003d: Unknown result type (might be due to invalid IL or missing references)
//IL_0042: Unknown result type (might be due to invalid IL or missing references)
//IL_0058: Unknown result type (might be due to invalid IL or missing references)
//IL_006d: Expected O, but got Unknown
//IL_006e: Unknown result type (might be due to invalid IL or missing references)
//IL_0073: Unknown result type (might be due to invalid IL or missing references)
//IL_0089: Unknown result type (might be due to invalid IL or missing references)
//IL_009e: Expected O, but got Unknown
//IL_009f: Unknown result type (might be due to invalid IL or missing references)
//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
//IL_00cf: Expected O, but got Unknown
//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
//IL_0100: Expected O, but got Unknown
//IL_0101: Unknown result type (might be due to invalid IL or missing references)
//IL_0106: Unknown result type (might be due to invalid IL or missing references)
//IL_011c: Unknown result type (might be due to invalid IL or missing references)
//IL_0131: Expected O, but got Unknown
base.applyStopElementStatus = true;
base.hasSignatureVariant = true;
((SkillState)this).SetAnimTimes(0.15f, 0.2f, 0.1f, 0.5f, 0.6f, 0.7f);
}
public override void OnEnter()
{
((SkillState)this).OnEnter();
SetValues();
stopwatchID = ChaosStopwatch.Begin(0.1f, true, stopwatchIntervalTime, stopwatchTotalIntervals, 0);
((State<Player>)this).parent.ToggleEnemyFloorCollisions(false);
}
public override void ExecuteSkill()
{
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_001a: Unknown result type (might be due to invalid IL or missing references)
//IL_001b: 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_001d: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_0031: Expected I4, but got Unknown
if (!((SkillState)this).CancelToDash(false))
{
StopwatchState val = ChaosStopwatch.CheckInterval(stopwatchID, true);
StopwatchState val2 = val;
switch (val2 - -1)
{
case 0:
((SkillState)this).ExecuteSkill();
break;
case 1:
break;
case 2:
PlayAnim(base.animExecTime);
AirChannelDash_CreateImplosion();
break;
}
}
}
private void AirChannelDash_CreateImplosion()
{
//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_0013: 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_0083: Unknown result type (might be due to invalid IL or missing references)
//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
//IL_0108: Unknown result type (might be due to invalid IL or missing references)
//IL_012d: Unknown result type (might be due to invalid IL or missing references)
//IL_0161: 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)
Vector3 position = ((State<Player>)this).parent.attackOriginTrans.position;
currentWB = WindBurst.CreateBurst(position, ((Entity)((State<Player>)this).parent).skillCategory, base.skillID, skillLevel, burstScale * scaleMultiplier);
currentWB.emitParticles = false;
PoolManager.GetPoolItem<ParticleEffect>("AirVortex").Emit((int?)1, (Vector3?)position, implosionOverride, (Vector3?)new Vector3(0f, 0f, Random.Range(0f, 33f)), 0f, (float?)null, (Transform)null);
PoolManager.GetPoolItem<ParticleEffect>("AirVortex").Emit((int?)1, (Vector3?)position, implosionOverride, (Vector3?)new Vector3(0f, 0f, Random.Range(180f, 213f)), 0f, (float?)null, (Transform)null);
PoolManager.GetPoolItem<ParticleEffect>("AirVortex").Emit((int?)1, (Vector3?)position, implosionOverrideLarge, (Vector3?)new Vector3(0f, 0f, Random.Range(0f, 360f)), 0f, (float?)null, (Transform)null);
DustEmitter poolItem = PoolManager.GetPoolItem<DustEmitter>();
int num = 150;
float num2 = 2f;
Vector3? val = position;
poolItem.EmitCircle(num, num2, -8f, -1f, val, (Vector3?)null);
SoundManager.PlayAudioWithDistance("StandardHeavySwing", (Vector2?)Vector2.op_Implicit(((Component)((State<Player>)this).parent).transform.position), (Transform)null, 24f, -1f, 0.9f, false);
}
private void PlayAnim(float givenTime)
{
//IL_0012: 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_001f: 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_0032: Unknown result type (might be due to invalid IL or missing references)
((Entity)((State<Player>)this).parent).FaceTarget(((Component)((State<Player>)this).parent).transform.position + ((!switchDirection) ? Vector3.left : Vector3.right), 4, false);
AnimationExtension.PlayDirectional(((Entity)((State<Player>)this).parent).anim, ((State<Player>)this).parent.GSlamAnimStr, -1, givenTime);
switchDirection = !switchDirection;
}
public override void OnExit()
{
((SkillState)this).OnExit();
((State<Player>)this).parent.ToggleEnemyFloorCollisions(true);
}
}
public class GustBurstButEarthState : SkillState
{
public static string staticID = "GustBurstButEarth";
private AudioSource holdAudioSource;
private CastingCircle castCircle;
public override string OnEnterAnimStr => ((State<Player>)this).parent.GSlamAnimStr;
public GustBurstButEarthState(FSM newFSM, Player newEnt)
: base(staticID, newFSM, newEnt)
{
base.disableStartCooldown = true;
base.isHoldSkill = true;
((SkillState)this).SetAnimTimes(0.15f, 0.2f, 0.3f, 0.8f, 0.9f, 1f);
}
public override void OnEnter()
{
//IL_0041: 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)
((SkillState)this).OnEnter();
((SkillState)this).SetSkillLevel((!((SkillState)this).IsEmpowered) ? 1 : 2);
float num = (((SkillState)this).IsEmpowered ? 6f : 4.7f);
castCircle = CastingCirclePool.Spawn("Draw", ((Component)((State<Player>)this).parent).transform.position, false, (GameObject)null, true, false, 0f, num, num, (Color?)CastingCircle.defaultColor, 0.2f);
ModifyCircle(fuckery: true);
}
public void ModifyCircle(bool fuckery)
{
for (int i = 2; i <= 4; i++)
{
((Component)castCircle.castingCircleImages[i]).gameObject.SetActive(!fuckery);
}
}
public override void HandleHoldButton()
{
AnimationExtension.PlayDirectional(((Entity)((State<Player>)this).parent).anim, ((State<Player>)this).parent.GSlamAnimStr, -1, base.animHoldTime);
base.holdReleased = !((State<Player>)this).parent.inputDevice.GetButton("Skill" + base.skillSlot);
holdAudioSource = SoundManager.PlayIfNotPlaying("EarthLoop", holdAudioSource, ((Component)((State<Player>)this).parent).transform, false, -1f, -1f);
}
public override void OnExit()
{
if (!base.skillExecuted)
{
((SkillState)this).StartCooldownTimer(-1f, true);
}
((SkillState)this).OnExit();
StopCastingCircle();
StopAudio();
}
private void StopAudio()
{
if ((Object)(object)holdAudioSource != (Object)null)
{
holdAudioSource.Stop();
holdAudioSource = null;
}
}
public override void ExecuteSkill()
{
//IL_0056: Unknown result type (might be due to invalid IL or missing references)
//IL_005b: Unknown result type (might be due to invalid IL or missing references)
//IL_0098: Unknown result type (might be due to invalid IL or missing references)
//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
//IL_00ba: 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_00d9: Unknown result type (might be due to invalid IL or missing references)
//IL_0105: Unknown result type (might be due to invalid IL or missing references)
//IL_0139: Unknown result type (might be due to invalid IL or missing references)
//IL_0143: Expected O, but got Unknown
//IL_0143: Unknown result type (might be due to invalid IL or missing references)
//IL_014d: Expected O, but got Unknown
((SkillState)this).ExecuteSkill();
((SkillState)this).StartCooldownTimer(-1f, true);
StopCastingCircle();
AnimationExtension.PlayDirectional(((Entity)((State<Player>)this).parent).anim, ((State<Player>)this).parent.GSlamAnimStr, -1, base.animExecTime);
StopAudio();
SoundManager.PlayAudioWithDistance("EarthExplosion", (Vector2?)Vector2.op_Implicit(((Component)((State<Player>)this).parent).transform.position), (Transform)null, 24f, -1f, 0.9f, false);
int num = (((SkillState)this).IsEmpowered ? 5 : 4);
List<Vector3> list = Utils.DistributePointsEvenlyAroundCircle(16, num, ((Component)((State<Player>)this).parent).transform.position);
for (int i = 0; i < list.Count; i++)
{
bool invisible = CheckCircleExceptSpikes(list[i], 0.1f, LayerMask.op_Implicit(ChaosCollisions.layerAllWallAndObst));
CreateFloorSpike(list[i], ((Component)((State<Player>)this).parent).transform.position, invisible);
}
EarthBurst val = EarthBurst.CreateBurst(((Component)((State<Player>)this).parent).transform.position, ((Entity)((State<Player>)this).parent).skillCategory, staticID, 3, 2f);
Attack attack = ((ElementalBurst)val).attack;
attack.entityCollisionEventHandlers = (EntityCollisionEventHandler)Delegate.Combine((Delegate?)(object)attack.entityCollisionEventHandlers, (Delegate?)new EntityCollisionEventHandler(nip));
}
private void nip(Entity entity)
{
}
private void StopCastingCircle()
{
if ((Object)(object)castCircle != (Object)null)
{
ModifyCircle(fuckery: false);
castCircle.Reset(false);
castCircle = null;
}
}
private bool CheckCircleExceptSpikes(Vector3 location, float radius, LayerMask layerMask)
{
//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_0008: Unknown result type (might be due to invalid IL or missing references)
Collider2D[] array = Physics2D.OverlapCircleAll(Vector2.op_Implicit(location), radius, LayerMask.op_Implicit(layerMask));
for (int i = 0; i < array.Length; i++)
{
if (!Object.op_Implicit((Object)(object)((Component)array[i]).gameObject.GetComponentInParent<FloorSpike>()))
{
return true;
}
}
return false;
}
private void CreateFloorSpike(Vector3 point, Vector3 playerPosition, bool invisible)
{
//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_0004: Unknown result type (might be due to invalid IL or missing references)
//IL_0009: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: Unknown result type (might be due to invalid IL or missing references)
//IL_0075: Unknown result type (might be due to invalid IL or missing references)
//IL_007a: Unknown result type (might be due to invalid IL or missing references)
//IL_007b: Unknown result type (might be due to invalid IL or missing references)
//IL_0080: Unknown result type (might be due to invalid IL or missing references)
//IL_0085: Unknown result type (might be due to invalid IL or missing references)
//IL_008b: Unknown result type (might be due to invalid IL or missing references)
//IL_008c: Unknown result type (might be due to invalid IL or missing references)
FacingDirection differenceDirection = GetDifferenceDirection(point, playerPosition);
FloorSpike floorSpike = ((SkillState)this).ChaosInst<FloorSpike>(((SkillState)this).IsEmpowered ? Assets.FloorSpikeLarge : Assets.FloorSpikeSmall, (Vector2?)Vector2.op_Implicit(point), (Quaternion?)null, (Transform)null);
floorSpike.AttackBox.SetAttackInfo(((Entity)((State<Player>)this).parent).skillCategory, base.skillID, (!((SkillState)this).IsEmpowered) ? 1 : 2, false);
floorSpike.AttackBox.knockbackOverwriteVector = Vector2.op_Implicit(((Component)((State<Player>)this).parent).transform.position - point);
floorSpike.Init(playerPosition, differenceDirection, invisible);
}
private FacingDirection GetDifferenceDirection(Vector3 point, Vector3 position)
{
//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_0003: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_0009: 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_0023: Unknown result type (might be due to invalid IL or missing references)
//IL_004a: Unknown result type (might be due to invalid IL or missing references)
//IL_0035: 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_0046: Unknown result type (might be due to invalid IL or missing references)
Vector3 val = point - position;
float num = Vector3.Angle(val, Vector3.up);
if (num < 45f)
{
return (FacingDirection)2;
}
if (num < 135f)
{
return (FacingDirection)((!(val.x > 0f)) ? 1 : 3);
}
return (FacingDirection)0;
}
}
}