using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using CardChoiceSpawnUniqueCardPatch.CustomCategories;
using ClassesManagerReborn;
using HarmonyLib;
using InControl;
using Jotunn.Utils;
using ModdingUtils.Utils;
using Photon.Pun;
using RSClasses.Extensions;
using RSClasses.MonoBehaviours;
using SimulationChamber;
using Sonigon;
using Sonigon.Internal;
using UnboundLib;
using UnboundLib.Cards;
using UnboundLib.GameModes;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(/*Could not decode attribute arguments.*/)]
[assembly: TargetFramework(".NETFramework,Version=v4.7.1", FrameworkDisplayName = ".NET Framework 4.7.1")]
[assembly: AssemblyVersion("0.0.0.0")]
namespace RSClasses
{
public class CardHolder : MonoBehaviour
{
public List<GameObject> Cards;
public List<GameObject> HiddenCards;
public static Dictionary<string, CardInfo> cards = new Dictionary<string, CardInfo>();
internal void RegisterCards()
{
//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_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)
Enumerator<GameObject> enumerator = Cards.GetEnumerator();
try
{
while (enumerator.MoveNext())
{
GameObject current = enumerator.Current;
CustomCard.RegisterUnityCard(current, "RSC", current.GetComponent<CardInfo>().cardName, true, (Action<CardInfo>)null);
CustomCardCategories.instance.UpdateAndPullCategoriesFromCard(current.GetComponent<CardInfo>());
cards.Add(current.GetComponent<CardInfo>().cardName, current.GetComponent<CardInfo>());
}
}
finally
{
((IDisposable)enumerator).Dispose();
}
Enumerator<GameObject> enumerator2 = HiddenCards.GetEnumerator();
try
{
while (enumerator2.MoveNext())
{
GameObject current2 = enumerator2.Current;
CustomCard.RegisterUnityCard(current2, "RSC", current2.GetComponent<CardInfo>().cardName, false, (Action<CardInfo>)null);
CustomCardCategories.instance.UpdateAndPullCategoriesFromCard(current2.GetComponent<CardInfo>());
Cards.instance.AddHiddenCard(current2.GetComponent<CardInfo>());
cards.Add(current2.GetComponent<CardInfo>().cardName, current2.GetComponent<CardInfo>());
}
}
finally
{
((IDisposable)enumerator2).Dispose();
}
}
}
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("com.rsmind.rounds.RSClasses", "RSClasses", "2.1.0")]
[BepInProcess("Rounds.exe")]
public class RSClasses : BaseUnityPlugin
{
private const string ModId = "com.rsmind.rounds.RSClasses";
private const string ModName = "RSClasses";
public const string Version = "2.1.0";
public const string ModInitials = "RSC";
public bool pickPhase = false;
public static bool Debug = true;
internal static AssetBundle assets;
[field: CompilerGenerated]
[field: DebuggerBrowsable(/*Could not decode attribute arguments.*/)]
public static RSClasses instance
{
[CompilerGenerated]
get;
[CompilerGenerated]
private set;
}
private void Awake()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000c: Expected O, but got Unknown
Harmony val = new Harmony("com.rsmind.rounds.RSClasses");
val.PatchAll();
assets = AssetUtils.LoadAssetBundleFromResources("rsclassart", typeof(RSClasses).Assembly);
if ((Object)(object)assets == (Object)null)
{
Debug.Log((object)"Failed to load RSClasses asset bundle");
}
assets.LoadAsset<GameObject>("CardHolder").GetComponent<CardHolder>().RegisterCards();
}
private void Start()
{
instance = this;
}
}
public class RSPlayerStats : MonoBehaviour
{
public int scythes = 0;
public float scytheDamage = 1f;
public float scytheSpeed = 1f;
public int barriers = 0;
public float barrierSpeed = 1f;
public float orbitalRadius = 1f;
public float fractureDuration = 0f;
public float fractureSize = 1f;
public float reflectionCooldown = 1f;
public void Apply(Player player)
{
player.data.GetAdditionalData().scytheCount += scythes;
player.data.GetAdditionalData().barrierCount += barriers;
player.data.GetAdditionalData().scytheDamage *= scytheDamage;
player.data.GetAdditionalData().orbitalRadius *= orbitalRadius;
player.data.GetAdditionalData().barrierSpeed *= barrierSpeed;
player.data.GetAdditionalData().scytheSpeed *= scytheSpeed;
player.data.GetAdditionalData().fractureDuration += fractureDuration;
player.data.GetAdditionalData().fractureSize *= fractureSize;
player.data.GetAdditionalData().reflectionCooldown *= reflectionCooldown;
}
}
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
public class ApplyPlayerStatsPatch : Object
{
private static void Postfix(ApplyCardStats __instance, Player ___playerToUpgrade)
{
((Component)__instance).GetComponent<RSPlayerStats>()?.Apply(___playerToUpgrade);
}
}
}
namespace RSClasses.Extensions
{
[Serializable]
public class PlayerAdditionalData : Object
{
public bool invert;
public int posMult;
public int scytheCount;
public int barrierCount;
public float scytheDamage;
public float orbitalRadius;
public float barrierSpeed;
public float scytheSpeed;
public float fractureDuration;
public float fractureSize;
public float reflectionCooldown;
public PlayerAdditionalData()
{
invert = false;
posMult = 1;
scytheCount = 0;
barrierCount = 0;
scytheDamage = 20f;
orbitalRadius = 1f;
scytheSpeed = 250f;
barrierSpeed = 100f;
fractureDuration = 1f;
fractureSize = 0.0225f;
reflectionCooldown = 3f;
}
}
public static class PlayerExtension : Object
{
public static readonly ConditionalWeakTable<CharacterData, PlayerAdditionalData> data = new ConditionalWeakTable<CharacterData, PlayerAdditionalData>();
public static PlayerAdditionalData GetAdditionalData(this CharacterData chara)
{
return data.GetOrCreateValue(chara);
}
public static void AddData(this CharacterData chara, PlayerAdditionalData value)
{
try
{
data.Add(chara, value);
}
catch (Exception)
{
}
}
}
[Serializable]
public class PlayerActionsAdditionalData : Object
{
public PlayerAction selfHarm;
public PlayerActionsAdditionalData()
{
selfHarm = null;
}
}
public static class PlayerActionsExtension : Object
{
public static readonly ConditionalWeakTable<PlayerActions, PlayerActionsAdditionalData> data = new ConditionalWeakTable<PlayerActions, PlayerActionsAdditionalData>();
public static PlayerActionsAdditionalData GetAdditionalData(this PlayerActions playerActions)
{
return data.GetOrCreateValue(playerActions);
}
public static void AddData(this PlayerActions playerActions, PlayerActionsAdditionalData value)
{
try
{
data.Add(playerActions, value);
}
catch (Exception)
{
}
}
}
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
internal class PlayerActionsPatchPlayerActions : Object
{
private static void Postfix(PlayerActions __instance)
{
//IL_0030: Unknown result type (might be due to invalid IL or missing references)
//IL_003a: Expected O, but got Unknown
__instance.GetAdditionalData().selfHarm = (PlayerAction)typeof(PlayerActions).InvokeMember("CreatePlayerAction", (BindingFlags)292, (Binder)null, (object)__instance, (object[])(object)new Object[1] { (Object)"Voidseer Hotkey" });
}
}
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
internal class PlayerActionsPatchCreateWithControllerBindings : Object
{
private static void Postfix(ref PlayerActions __result)
{
__result.GetAdditionalData().selfHarm.AddDefaultBinding((InputControlType)11);
}
}
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
internal class PlayerActionsPatchCreateWithKeyboardBindings : Object
{
private static void Postfix(ref PlayerActions __result)
{
__result.GetAdditionalData().selfHarm.AddDefaultBinding((Key[])(object)new Key[1] { (Key)40 });
}
}
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
internal class GeneralInputPatchUpdate : Object
{
private static void Postfix(GeneralInput __instance)
{
try
{
if (((OneAxisInputControl)((Component)__instance).GetComponent<CharacterData>().playerActions.GetAdditionalData().selfHarm).WasPressed)
{
Debug.Log((object)"selfHarm");
if (Object.op_Implicit((Object)(object)((Component)__instance).GetComponentInChildren<Voidseer_Mono>()))
{
Debug.Log((object)"Attempted call");
((Component)__instance).GetComponentInChildren<Voidseer_Mono>().Trigger();
}
}
}
catch (Object)
{
}
}
}
}
namespace RSClasses.MonoBehaviours
{
internal class Astro_Mono : MonoBehaviour
{
private Player player;
private Scythe_Mono scythes;
private Barrier_Mono barriers;
private void Start()
{
player = ((Component)this).GetComponentInParent<Player>();
scythes = ExtensionMethods.GetOrAddComponent<Scythe_Mono>(((Component)player).gameObject, false);
barriers = ExtensionMethods.GetOrAddComponent<Barrier_Mono>(((Component)player).gameObject, false);
}
private void OnDestroy()
{
Object.Destroy((Object)(object)scythes);
Object.Destroy((Object)(object)barriers);
}
}
internal class Barrier : MonoBehaviour
{
private Transform origin;
private Animator anim;
private Player player;
private PolygonCollider2D collider;
private BarrierCollider barrierCollider;
public GameObject barrier;
private void OnDestroy()
{
Object.Destroy((Object)(object)barrier);
Object.Destroy((Object)(object)barrierCollider);
}
private void Start()
{
player = ((Component)this).GetComponentInParent<Player>();
barrier = Object.Instantiate<GameObject>(RSClasses.assets.LoadAsset<GameObject>("Barrier"), ((Component)player).transform);
barrier.SetActive(true);
barrierCollider = ExtensionMethods.GetOrAddComponent<BarrierCollider>(((Component)barrier.transform.GetChild(0)).gameObject, false);
collider = ((Component)barrierCollider).GetComponent<PolygonCollider2D>();
anim = barrier.GetComponent<Animator>();
origin = Enumerable.Last<Transform>((IEnumerable<Transform>)(object)barrier.GetComponentsInChildren<Transform>());
}
public void UpdatePos(double angle, float radius)
{
//IL_0039: 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_0064: Unknown result type (might be due to invalid IL or missing references)
//IL_0076: Unknown result type (might be due to invalid IL or missing references)
//IL_0093: Unknown result type (might be due to invalid IL or missing references)
//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
//IL_00d5: 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_00ea: Unknown result type (might be due to invalid IL or missing references)
double num = angle * Math.PI / 180.0;
Vector3 localPosition = default(Vector3);
((Vector3)(ref localPosition))..ctor((float)((double)radius * Math.Sin(num)), (float)((double)radius * Math.Cos(num)), 0f);
Quaternion rotation = default(Quaternion);
((Quaternion)(ref rotation)).eulerAngles = new Vector3(0f, 0f, 0f - (float)angle);
barrier.transform.localPosition = localPosition;
barrier.transform.rotation = rotation;
((Component)barrierCollider).transform.position = barrier.transform.position;
((Component)barrierCollider).transform.rotation = barrier.transform.rotation;
((Component)barrierCollider).transform.localScale = Vector3.Scale(barrier.transform.localScale, ((Component)player).transform.localScale);
}
public void DoHit()
{
//IL_001d: 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_00b2: Unknown result type (might be due to invalid IL or missing references)
//IL_00b9: Expected O, but got Unknown
//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)
//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
//IL_0100: 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_010a: 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_0118: 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_016d: Unknown result type (might be due to invalid IL or missing references)
//IL_0172: Unknown result type (might be due to invalid IL or missing references)
//IL_0182: 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_0191: Unknown result type (might be due to invalid IL or missing references)
//IL_0195: 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)
//IL_01c6: 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)
anim.SetTrigger("OnBlock");
float num = barrier.transform.localScale.y * 10f;
Collider2D[] array = Physics2D.OverlapCircleAll(Vector2.op_Implicit(((Component)origin).transform.position), num);
if (!player.data.view.IsMine)
{
return;
}
Collider2D[] array2 = array;
foreach (Collider2D val in array2)
{
Damagable component = ((Component)val).gameObject.GetComponent<Damagable>();
HealthHandler component2 = ((Component)val).gameObject.GetComponent<HealthHandler>();
Vector2 val3;
if (Object.op_Implicit((Object)(object)component2))
{
Player val2 = (Player)ExtensionMethods.GetFieldValue((object)component2, "player");
SoundManager.Instance.PlayAtPosition(component2.soundBounce, ((Component)origin).transform, ((Component)component).transform);
val3 = Vector2.op_Implicit(((Component)val2).transform.position) - Vector2.op_Implicit(((Component)player).transform.position);
component2.CallTakeForce(((Vector2)(ref val3)).normalized * 5000f, (ForceMode2D)1, true, false, 0f);
if (((Component)(Player)ExtensionMethods.GetFieldValue((object)component2, "player")).GetComponent<Block>().blockedThisFrame)
{
continue;
}
}
if (Object.op_Implicit((Object)(object)component))
{
val3 = Vector2.op_Implicit(((Component)component).transform.position) - Vector2.op_Implicit(((Component)origin).transform.position);
component.CallTakeDamage(((Vector2)(ref val3)).normalized * (0.1f * player.data.maxHealth + 10f), Vector2.op_Implicit(((Component)origin).transform.position), barrier.gameObject, player, true);
}
}
}
private void Update()
{
((Component)barrierCollider).gameObject.SetActive(!player.data.dead);
}
public void SetColor(Color color)
{
//IL_000c: 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)
barrier.GetComponent<SpriteRenderer>().color = color;
Enumerable.Last<SpriteRenderer>((IEnumerable<SpriteRenderer>)(object)barrier.GetComponentsInChildren<SpriteRenderer>()).color = color;
}
public void SetScale(float scale)
{
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
barrier.transform.localScale = new Vector3(scale, scale, scale);
}
}
internal class BarrierCollider : MonoBehaviour
{
private Player player;
private void Start()
{
((Component)this).gameObject.layer = LayerMask.NameToLayer("Projectile");
player = ((Component)this).GetComponentInParent<Player>();
((Component)this).gameObject.transform.SetParent((Transform)null, true);
}
public void Update()
{
((Component)this).gameObject.SetActive(!player.data.dead);
}
}
public class Barrier_Mono : MonoBehaviour
{
[CompilerGenerated]
private sealed class <>c__DisplayClass4_0 : Object
{
public Barrier shield;
public Barrier_Mono <>4__this;
internal void <UpdateStats>b__0()
{
//IL_0011: Unknown result type (might be due to invalid IL or missing references)
((Component)shield).GetComponent<Barrier>().SetColor(<>4__this.color);
}
internal void <UpdateStats>b__1()
{
shield.SetScale(<>4__this.player.data.GetAdditionalData().orbitalRadius * (19f / 160f));
}
}
private Block block;
private double angle = 0.0;
private Color color = new Color(1f, 1f, 63f / 85f);
private List<Barrier> barriers = new List<Barrier>();
private Player player;
private void OnDestroy()
{
GameModeManager.RemoveHook("PickEnd", (Func<IGameModeHandler, IEnumerator>)PickEnd);
Block val = block;
val.BlockAction = (Action<BlockTriggerType>)(object)Delegate.Remove((Delegate)(object)val.BlockAction, (Delegate)(object)new Action<BlockTriggerType>(OnBlock));
while (Enumerable.Count<Barrier>((IEnumerable<Barrier>)(object)barriers) > 0)
{
Object.Destroy((Object)(object)barriers[0]);
barriers.Remove(barriers[0]);
}
}
private void Start()
{
player = ((Component)this).GetComponentInParent<Player>();
block = ((Component)this).GetComponentInParent<CharacterData>().block;
block.BlockAction = (Action<BlockTriggerType>)(object)Delegate.Combine((Delegate)(object)block.BlockAction, (Delegate)(object)new Action<BlockTriggerType>(OnBlock));
GameModeManager.AddHook("PickEnd", (Func<IGameModeHandler, IEnumerator>)PickEnd);
}
private void Update()
{
//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)
angle = (angle - (double)(player.data.GetAdditionalData().barrierSpeed * TimeHandler.deltaTime)) % 360.0;
int num = 0;
Enumerator<Barrier> enumerator = barriers.GetEnumerator();
try
{
while (enumerator.MoveNext())
{
Barrier current = enumerator.Current;
double num2 = (angle + (double)(float)(num % 2 * 180 + 45 * (num / 2))) % 360.0;
current.UpdatePos(num2, player.data.GetAdditionalData().orbitalRadius * 0.0125f);
num++;
}
}
finally
{
((IDisposable)enumerator).Dispose();
}
}
private void OnBlock(BlockTriggerType blockTrigger)
{
//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)
if (!player.data.currentCards.Contains(CardHolder.cards["Shield Spikes"]))
{
return;
}
Enumerator<Barrier> enumerator = barriers.GetEnumerator();
try
{
while (enumerator.MoveNext())
{
Barrier current = enumerator.Current;
current.DoHit();
}
}
finally
{
((IDisposable)enumerator).Dispose();
}
}
public void UpdateStats()
{
//IL_001c: Unknown result type (might be due to invalid IL or missing references)
//IL_0022: Expected O, but got Unknown
//IL_004f: Unknown result type (might be due to invalid IL or missing references)
//IL_0128: Unknown result type (might be due to invalid IL or missing references)
//IL_012d: Unknown result type (might be due to invalid IL or missing references)
//IL_017f: Unknown result type (might be due to invalid IL or missing references)
//IL_0184: 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_0173: Unknown result type (might be due to invalid IL or missing references)
//IL_01b8: Unknown result type (might be due to invalid IL or missing references)
//IL_01c2: Expected O, but got Unknown
//IL_01d5: Unknown result type (might be due to invalid IL or missing references)
//IL_01df: Expected O, but got Unknown
while (Enumerable.Count<Barrier>((IEnumerable<Barrier>)(object)barriers) < player.data.GetAdditionalData().barrierCount)
{
GameObject val = new GameObject("Shield", (Type[])(object)new Type[1] { typeof(Barrier) });
val.transform.SetParent(((Component)player).transform);
((Component)player).transform.position = ((Component)player).transform.position;
barriers.Add(val.GetComponent<Barrier>());
}
while (Enumerable.Count<Barrier>((IEnumerable<Barrier>)(object)barriers) > Math.Max(player.data.GetAdditionalData().barrierCount, 0))
{
Object.Destroy((Object)(object)barriers[0]);
barriers.Remove(barriers[0]);
}
if (player.data.currentCards.Contains(CardHolder.cards["Guardian"]))
{
color = new Color(0.4f, 1f, 1f);
}
else if (player.data.currentCards.Contains(CardHolder.cards["Harvester"]))
{
color = new Color(0.69803923f, 0f, 1f);
}
Enumerator<Barrier> enumerator = barriers.GetEnumerator();
try
{
while (enumerator.MoveNext())
{
<>c__DisplayClass4_0 CS$<>8__locals0 = new <>c__DisplayClass4_0();
CS$<>8__locals0.<>4__this = this;
CS$<>8__locals0.shield = enumerator.Current;
ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)RSClasses.instance, 1f, (Action)delegate
{
//IL_0011: Unknown result type (might be due to invalid IL or missing references)
((Component)CS$<>8__locals0.shield).GetComponent<Barrier>().SetColor(CS$<>8__locals0.<>4__this.color);
});
ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)RSClasses.instance, 1f, (Action)delegate
{
CS$<>8__locals0.shield.SetScale(CS$<>8__locals0.<>4__this.player.data.GetAdditionalData().orbitalRadius * (19f / 160f));
});
}
}
finally
{
((IDisposable)enumerator).Dispose();
}
}
[IteratorStateMachine(/*Could not decode attribute arguments.*/)]
private IEnumerator PickEnd(IGameModeHandler gm)
{
angle = 0.0;
UpdateStats();
yield break;
}
[IteratorStateMachine(/*Could not decode attribute arguments.*/)]
private IEnumerator GameEnd(IGameModeHandler gm)
{
Object.Destroy((Object)(object)this);
yield break;
}
}
public class ForcedReflection_Mono : MonoBehaviour
{
private Player player;
private void Start()
{
player = ((Component)this).GetComponentInParent<Player>();
Gun gun = player.data.weaponHandler.gun;
gun.ShootPojectileAction = (Action<GameObject>)(object)Delegate.Combine((Delegate)(object)gun.ShootPojectileAction, (Delegate)(object)new Action<GameObject>(OnShootProjectileAction));
}
private void OnShootProjectileAction(GameObject obj)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0007: Expected O, but got Unknown
GameObject val = new GameObject();
val.AddComponent<ForcedReflectionEffect>();
val.transform.SetParent(obj.transform);
}
}
public class ForcedReflectionEffect : RayHitEffect
{
private Random rand;
private SoundParameterIntensity soundParameterIntensity;
private SoundEvent reflectSound;
private void Start()
{
AudioClip val = RSClasses.assets.LoadAsset<AudioClip>("reflect.ogg");
SoundContainer val2 = ScriptableObject.CreateInstance<SoundContainer>();
val2.setting.volumeIntensityEnable = true;
val2.audioClip[0] = val;
reflectSound = ScriptableObject.CreateInstance<SoundEvent>();
reflectSound.soundContainerArray[0] = val2;
}
public override HasToReturn DoHitEffect(HitInfo hit)
{
//IL_0015: 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_0138: 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_00d2: 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_00f3: Unknown result type (might be due to invalid IL or missing references)
//IL_00fd: 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_0123: 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)
if (!Object.op_Implicit((Object)(object)hit.transform))
{
return (HasToReturn)1;
}
Player componentInParent = ((Component)hit.transform).GetComponentInParent<Player>();
if (!Object.op_Implicit((Object)(object)componentInParent))
{
return (HasToReturn)1;
}
if (componentInParent.data.view.IsMine && rand.Next() % 2 == 0)
{
soundParameterIntensity.intensity = Optionshandler.vol_Sfx / 1f * Optionshandler.vol_Master;
SoundManager.Instance.PlayAtPosition(reflectSound, hit.transform, hit.transform, (SoundParameterBase[])(object)new SoundParameterBase[1] { (SoundParameterBase)soundParameterIntensity });
((Component)componentInParent).GetComponentInParent<PlayerCollision>().IgnoreWallForFrames(2);
((Component)componentInParent).transform.SetPositionAndRotation(new Vector3(0f - ((Component)componentInParent).transform.position.x, ((Component)componentInParent).transform.position.y, ((Component)componentInParent).transform.position.z), ((Component)componentInParent).transform.rotation);
componentInParent.data.block.RPCA_DoBlock(false, false, (BlockTriggerType)0, default(Vector3), false);
}
return (HasToReturn)1;
}
public ForcedReflectionEffect()
{
//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_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_0018: Expected O, but got Unknown
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_0029: Expected O, but got Unknown
DateTime now = DateTime.Now;
rand = new Random(((DateTime)(ref now)).Millisecond);
soundParameterIntensity = new SoundParameterIntensity(0f, (UpdateMode)0);
((RayHitEffect)this)..ctor();
}
}
public class ForcedRefraction_Mono : MonoBehaviour
{
private Player player;
private void Start()
{
player = ((Component)this).GetComponentInParent<Player>();
Gun gun = player.data.weaponHandler.gun;
gun.ShootPojectileAction = (Action<GameObject>)(object)Delegate.Combine((Delegate)(object)gun.ShootPojectileAction, (Delegate)(object)new Action<GameObject>(OnShootProjectileAction));
}
private void OnShootProjectileAction(GameObject obj)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0007: Expected O, but got Unknown
GameObject val = new GameObject();
val.AddComponent<ForcedRefractionEffect>();
val.transform.SetParent(obj.transform);
}
}
public class ForcedRefractionEffect : RayHitEffect
{
private Random rand;
private SoundParameterIntensity soundParameterIntensity;
private SoundEvent reflectSound;
private void Start()
{
AudioClip val = RSClasses.assets.LoadAsset<AudioClip>("reflect.ogg");
SoundContainer val2 = ScriptableObject.CreateInstance<SoundContainer>();
val2.setting.volumeIntensityEnable = true;
val2.audioClip[0] = val;
reflectSound = ScriptableObject.CreateInstance<SoundEvent>();
reflectSound.soundContainerArray[0] = val2;
}
public override HasToReturn DoHitEffect(HitInfo hit)
{
//IL_0015: 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_0144: Unknown result type (might be due to invalid IL or missing references)
//IL_0141: Unknown result type (might be due to invalid IL or missing references)
//IL_00de: Unknown result type (might be due to invalid IL or missing references)
//IL_00ee: 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_0114: 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_0135: Unknown result type (might be due to invalid IL or missing references)
if (!Object.op_Implicit((Object)(object)hit.transform))
{
return (HasToReturn)1;
}
Player componentInParent = ((Component)hit.transform).GetComponentInParent<Player>();
if (!Object.op_Implicit((Object)(object)componentInParent))
{
return (HasToReturn)1;
}
if (componentInParent.data.view.IsMine)
{
rand.Next();
if (rand.Next() % 2 == 0)
{
soundParameterIntensity.intensity = Optionshandler.vol_Sfx / 1f * Optionshandler.vol_Master;
SoundManager.Instance.PlayAtPosition(reflectSound, hit.transform, hit.transform, (SoundParameterBase[])(object)new SoundParameterBase[1] { (SoundParameterBase)soundParameterIntensity });
((Component)componentInParent).GetComponentInParent<PlayerCollision>().IgnoreWallForFrames(2);
((Component)componentInParent).transform.SetPositionAndRotation(new Vector3(((Component)componentInParent).transform.position.x, 0f - ((Component)componentInParent).transform.position.y, ((Component)componentInParent).transform.position.z), ((Component)componentInParent).transform.rotation);
componentInParent.data.block.RPCA_DoBlock(false, false, (BlockTriggerType)0, default(Vector3), false);
}
}
return (HasToReturn)1;
}
public ForcedRefractionEffect()
{
//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_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_0018: Expected O, but got Unknown
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_0029: Expected O, but got Unknown
DateTime now = DateTime.Now;
rand = new Random(((DateTime)(ref now)).Millisecond);
soundParameterIntensity = new SoundParameterIntensity(0f, (UpdateMode)0);
((RayHitEffect)this)..ctor();
}
}
public class KaleidoParty_Mono : MonoBehaviour
{
private Player player;
private Gun gun;
public void Start()
{
player = ((Component)this).GetComponentInParent<Player>();
gun = player.data.weaponHandler.gun;
Gun obj = gun;
obj.ShootPojectileAction = (Action<GameObject>)(object)Delegate.Combine((Delegate)(object)obj.ShootPojectileAction, (Delegate)(object)new Action<GameObject>(OnShootProjectileAction));
}
public void OnShootProjectileAction(GameObject obj)
{
//IL_0025: Unknown result type (might be due to invalid IL or missing references)
//IL_002b: Expected O, but got Unknown
//IL_0036: Unknown result type (might be due to invalid IL or missing references)
//IL_003c: Expected I4, but got Unknown
if (Object.op_Implicit((Object)(object)obj))
{
RayHitReflect orAddComponent = ExtensionMethods.GetOrAddComponent<RayHitReflect>(obj, false);
try
{
GunAmmo val = (GunAmmo)ExtensionMethods.GetFieldValue((object)gun, "gunAmmo");
int num = (int)(Int32)ExtensionMethods.GetFieldValue((object)val, "currentAmmo");
orAddComponent.reflects += num - 1;
}
catch (Object)
{
}
}
}
public void OnDestroy()
{
Gun obj = gun;
obj.ShootPojectileAction = (Action<GameObject>)(object)Delegate.Remove((Delegate)(object)obj.ShootPojectileAction, (Delegate)(object)new Action<GameObject>(OnShootProjectileAction));
}
}
public class Mirror_Mono : MonoBehaviour
{
private Player player;
private Gun gun;
public SimulatedGun[] savedGuns = (SimulatedGun[])(object)new SimulatedGun[4];
public static GameObject _stopRecursionObj;
public static GameObject _PoisonObj;
public static GameObject _DazzleObj;
public static GameObject _ColdObj;
public static GameObject StopRecursionObj
{
get
{
//IL_0029: Unknown result type (might be due to invalid IL or missing references)
//IL_0033: Expected O, but got Unknown
if ((Object)(object)_stopRecursionObj == (Object)null)
{
_stopRecursionObj = new GameObject("A_StopRecursion", (Type[])(object)new Type[1] { typeof(StopRecursion) });
Object.DontDestroyOnLoad((Object)(object)_stopRecursionObj);
}
return _stopRecursionObj;
}
}
public static ObjectsToSpawn[] StopRecursionSpawn => (ObjectsToSpawn[])(object)new ObjectsToSpawn[1]
{
new ObjectsToSpawn
{
AddToProjectile = StopRecursionObj
}
};
public static GameObject PoisonObj
{
get
{
//IL_0029: Unknown result type (might be due to invalid IL or missing references)
//IL_0033: Expected O, but got Unknown
if ((Object)(object)_PoisonObj == (Object)null)
{
_PoisonObj = new GameObject("A_Poison", (Type[])(object)new Type[1] { typeof(RayHitPoison) });
Object.DontDestroyOnLoad((Object)(object)_PoisonObj);
}
return _PoisonObj;
}
}
public static ObjectsToSpawn[] PoisonSpawn => (ObjectsToSpawn[])(object)new ObjectsToSpawn[1]
{
new ObjectsToSpawn
{
AddToProjectile = PoisonObj
}
};
public static GameObject DazzleObj
{
get
{
//IL_0029: Unknown result type (might be due to invalid IL or missing references)
//IL_0033: Expected O, but got Unknown
if ((Object)(object)_DazzleObj == (Object)null)
{
_DazzleObj = new GameObject("A_Dazzle", (Type[])(object)new Type[1] { typeof(RayHitBash) });
Object.DontDestroyOnLoad((Object)(object)_DazzleObj);
}
return _DazzleObj;
}
}
public static ObjectsToSpawn[] DazzleSpawn => (ObjectsToSpawn[])(object)new ObjectsToSpawn[1]
{
new ObjectsToSpawn
{
AddToProjectile = DazzleObj
}
};
public static GameObject ColdObj
{
get
{
//IL_0029: Unknown result type (might be due to invalid IL or missing references)
//IL_0033: Expected O, but got Unknown
if ((Object)(object)_ColdObj == (Object)null)
{
_ColdObj = new GameObject("A_Cold", (Type[])(object)new Type[1] { typeof(ChillingTouch) });
Object.DontDestroyOnLoad((Object)(object)_ColdObj);
}
return _ColdObj;
}
}
public static ObjectsToSpawn[] ColdSpawn => (ObjectsToSpawn[])(object)new ObjectsToSpawn[1]
{
new ObjectsToSpawn
{
AddToProjectile = ColdObj
}
};
public void Start()
{
//IL_006e: 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_00c4: Unknown result type (might be due to invalid IL or missing references)
//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
player = ((Component)this).GetComponentInParent<Player>();
gun = player.data.weaponHandler.gun;
Gun obj = gun;
obj.ShootPojectileAction = (Action<GameObject>)(object)Delegate.Combine((Delegate)(object)obj.ShootPojectileAction, (Delegate)(object)new Action<GameObject>(OnShootProjectileAction));
if ((Object)(object)savedGuns[0] == (Object)null)
{
savedGuns[0] = new GameObject("Mirror Gun").AddComponent<SimulatedGun>();
}
if ((Object)(object)savedGuns[1] == (Object)null)
{
savedGuns[1] = new GameObject("Sapphire Gun").AddComponent<SimulatedGun>();
}
if ((Object)(object)savedGuns[2] == (Object)null)
{
savedGuns[2] = new GameObject("Ruby Gun").AddComponent<SimulatedGun>();
}
if ((Object)(object)savedGuns[3] == (Object)null)
{
savedGuns[3] = new GameObject("Emerald Gun").AddComponent<SimulatedGun>();
}
}
public void OnShootProjectileAction(GameObject obj)
{
//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
//IL_00f3: 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_028b: Unknown result type (might be due to invalid IL or missing references)
//IL_0369: Unknown result type (might be due to invalid IL or missing references)
//IL_036e: Unknown result type (might be due to invalid IL or missing references)
//IL_03b4: Unknown result type (might be due to invalid IL or missing references)
//IL_03ca: Unknown result type (might be due to invalid IL or missing references)
//IL_03d9: Unknown result type (might be due to invalid IL or missing references)
//IL_03e4: Unknown result type (might be due to invalid IL or missing references)
//IL_03f4: Unknown result type (might be due to invalid IL or missing references)
//IL_03f9: Unknown result type (might be due to invalid IL or missing references)
//IL_0404: Unknown result type (might be due to invalid IL or missing references)
//IL_0409: Unknown result type (might be due to invalid IL or missing references)
//IL_040e: Unknown result type (might be due to invalid IL or missing references)
//IL_05d3: Unknown result type (might be due to invalid IL or missing references)
//IL_05e3: Unknown result type (might be due to invalid IL or missing references)
//IL_05f8: Unknown result type (might be due to invalid IL or missing references)
//IL_0603: Unknown result type (might be due to invalid IL or missing references)
//IL_0613: Unknown result type (might be due to invalid IL or missing references)
//IL_0618: Unknown result type (might be due to invalid IL or missing references)
//IL_0623: Unknown result type (might be due to invalid IL or missing references)
//IL_0628: Unknown result type (might be due to invalid IL or missing references)
//IL_062d: 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_0653: Unknown result type (might be due to invalid IL or missing references)
//IL_0658: Unknown result type (might be due to invalid IL or missing references)
//IL_065d: Unknown result type (might be due to invalid IL or missing references)
//IL_0671: Unknown result type (might be due to invalid IL or missing references)
//IL_0681: Unknown result type (might be due to invalid IL or missing references)
//IL_0690: Unknown result type (might be due to invalid IL or missing references)
//IL_069b: Unknown result type (might be due to invalid IL or missing references)
//IL_06ab: 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_06b8: Unknown result type (might be due to invalid IL or missing references)
//IL_06ba: Unknown result type (might be due to invalid IL or missing references)
//IL_06bf: Unknown result type (might be due to invalid IL or missing references)
//IL_06db: Unknown result type (might be due to invalid IL or missing references)
//IL_06e0: Unknown result type (might be due to invalid IL or missing references)
//IL_06e5: Unknown result type (might be due to invalid IL or missing references)
//IL_06ea: Unknown result type (might be due to invalid IL or missing references)
//IL_06ef: Unknown result type (might be due to invalid IL or missing references)
//IL_0703: Unknown result type (might be due to invalid IL or missing references)
//IL_0719: Unknown result type (might be due to invalid IL or missing references)
//IL_072e: Unknown result type (might be due to invalid IL or missing references)
//IL_0739: Unknown result type (might be due to invalid IL or missing references)
//IL_0749: Unknown result type (might be due to invalid IL or missing references)
//IL_074e: Unknown result type (might be due to invalid IL or missing references)
//IL_0756: Unknown result type (might be due to invalid IL or missing references)
//IL_0758: Unknown result type (might be due to invalid IL or missing references)
//IL_075d: Unknown result type (might be due to invalid IL or missing references)
//IL_0786: Unknown result type (might be due to invalid IL or missing references)
//IL_079c: Unknown result type (might be due to invalid IL or missing references)
//IL_07ab: Unknown result type (might be due to invalid IL or missing references)
//IL_07b5: Unknown result type (might be due to invalid IL or missing references)
//IL_07ba: Unknown result type (might be due to invalid IL or missing references)
//IL_07c5: Unknown result type (might be due to invalid IL or missing references)
//IL_07ca: Unknown result type (might be due to invalid IL or missing references)
//IL_07f3: Unknown result type (might be due to invalid IL or missing references)
//IL_0803: Unknown result type (might be due to invalid IL or missing references)
//IL_0818: Unknown result type (might be due to invalid IL or missing references)
//IL_0822: Unknown result type (might be due to invalid IL or missing references)
//IL_0827: Unknown result type (might be due to invalid IL or missing references)
//IL_0832: Unknown result type (might be due to invalid IL or missing references)
//IL_0837: Unknown result type (might be due to invalid IL or missing references)
//IL_051a: Unknown result type (might be due to invalid IL or missing references)
//IL_0530: Unknown result type (might be due to invalid IL or missing references)
//IL_0545: Unknown result type (might be due to invalid IL or missing references)
//IL_0550: Unknown result type (might be due to invalid IL or missing references)
//IL_0566: Unknown result type (might be due to invalid IL or missing references)
//IL_057b: Unknown result type (might be due to invalid IL or missing references)
//IL_0496: Unknown result type (might be due to invalid IL or missing references)
//IL_04a6: Unknown result type (might be due to invalid IL or missing references)
//IL_04bb: Unknown result type (might be due to invalid IL or missing references)
//IL_04c6: Unknown result type (might be due to invalid IL or missing references)
//IL_04d6: Unknown result type (might be due to invalid IL or missing references)
//IL_04db: Unknown result type (might be due to invalid IL or missing references)
//IL_04e6: Unknown result type (might be due to invalid IL or missing references)
//IL_04eb: Unknown result type (might be due to invalid IL or missing references)
//IL_04f0: Unknown result type (might be due to invalid IL or missing references)
if (obj.GetComponentsInChildren<StopRecursion>().Length != 0)
{
return;
}
SimulatedGun val = savedGuns[0];
val.CopyGunStatsExceptActions(gun);
val.CopyAttackAction(gun);
val.CopyShootProjectileAction(gun);
((Gun)val).ShootPojectileAction = (Action<GameObject>)(object)Delegate.Remove((Delegate)(object)((Gun)val).ShootPojectileAction, (Delegate)(object)new Action<GameObject>(OnShootProjectileAction));
((Gun)val).numberOfProjectiles = 1;
((Gun)val).bursts = 0;
((Gun)val).spread = 0f;
((Gun)val).evenSpread = 0f;
((Gun)val).objectsToSpawn = Enumerable.ToArray<ObjectsToSpawn>(Enumerable.Concat<ObjectsToSpawn>((IEnumerable<ObjectsToSpawn>)(object)((Gun)val).objectsToSpawn, (IEnumerable<ObjectsToSpawn>)(object)StopRecursionSpawn));
if (player.data.currentCards.Contains(CardHolder.cards["Sapphire Shards"]))
{
((Gun)val).slow = 0.7f;
((Gun)val).projectileColor = new Color(0f, 172f, 191f);
}
SimulatedGun val2 = savedGuns[1];
val2.CopyGunStatsExceptActions(gun);
val2.CopyAttackAction(gun);
val2.CopyShootProjectileAction(gun);
((Gun)val2).ShootPojectileAction = (Action<GameObject>)(object)Delegate.Remove((Delegate)(object)((Gun)val2).ShootPojectileAction, (Delegate)(object)new Action<GameObject>(OnShootProjectileAction));
((Gun)val2).numberOfProjectiles = 1;
((Gun)val2).bursts = 0;
((Gun)val2).spread = 0f;
((Gun)val2).evenSpread = 0f;
((Gun)val2).gravity = ((Gun)val2).gravity * -1f;
((Gun)val2).objectsToSpawn = Enumerable.ToArray<ObjectsToSpawn>(Enumerable.Concat<ObjectsToSpawn>((IEnumerable<ObjectsToSpawn>)(object)((Gun)val2).objectsToSpawn, (IEnumerable<ObjectsToSpawn>)(object)StopRecursionSpawn));
SimulatedGun val3 = savedGuns[2];
val3.CopyGunStatsExceptActions(gun);
val3.CopyAttackAction(gun);
val3.CopyShootProjectileAction(gun);
((Gun)val3).ShootPojectileAction = (Action<GameObject>)(object)Delegate.Remove((Delegate)(object)((Gun)val3).ShootPojectileAction, (Delegate)(object)new Action<GameObject>(OnShootProjectileAction));
((Gun)val3).numberOfProjectiles = 1;
((Gun)val3).bursts = 0;
((Gun)val3).spread = 0f;
((Gun)val3).evenSpread = 0f;
((Gun)val3).objectsToSpawn = Enumerable.ToArray<ObjectsToSpawn>(Enumerable.Concat<ObjectsToSpawn>((IEnumerable<ObjectsToSpawn>)(object)((Gun)val3).objectsToSpawn, (IEnumerable<ObjectsToSpawn>)(object)StopRecursionSpawn));
if (player.data.currentCards.Contains(CardHolder.cards["Emerald Glitter"]))
{
((Gun)val3).damage = ((Gun)val3).damage * 1.25f;
((Gun)val3).objectsToSpawn = Enumerable.ToArray<ObjectsToSpawn>(Enumerable.Concat<ObjectsToSpawn>((IEnumerable<ObjectsToSpawn>)(object)((Gun)val3).objectsToSpawn, (IEnumerable<ObjectsToSpawn>)(object)PoisonSpawn));
((Gun)val3).projectileColor = Color.green;
}
SimulatedGun val4 = savedGuns[3];
val4.CopyGunStatsExceptActions(gun);
val4.CopyAttackAction(gun);
val4.CopyShootProjectileAction(gun);
((Gun)val4).ShootPojectileAction = (Action<GameObject>)(object)Delegate.Remove((Delegate)(object)((Gun)val4).ShootPojectileAction, (Delegate)(object)new Action<GameObject>(OnShootProjectileAction));
((Gun)val4).numberOfProjectiles = 1;
((Gun)val4).bursts = 0;
((Gun)val4).spread = 0f;
((Gun)val4).evenSpread = 0f;
((Gun)val4).objectsToSpawn = Enumerable.ToArray<ObjectsToSpawn>(Enumerable.Concat<ObjectsToSpawn>((IEnumerable<ObjectsToSpawn>)(object)((Gun)val4).objectsToSpawn, (IEnumerable<ObjectsToSpawn>)(object)StopRecursionSpawn));
if (player.data.currentCards.Contains(CardHolder.cards["Ruby Dust"]))
{
((Gun)val4).objectsToSpawn = Enumerable.ToArray<ObjectsToSpawn>(Enumerable.Concat<ObjectsToSpawn>((IEnumerable<ObjectsToSpawn>)(object)((Gun)val4).objectsToSpawn, (IEnumerable<ObjectsToSpawn>)(object)DazzleSpawn));
((Gun)val4).projectileColor = Color.magenta;
}
if (!player.data.view.IsMine && !PhotonNetwork.OfflineMode)
{
return;
}
val.SimulatedAttack(player.playerID, new Vector3(obj.transform.position.x * -1f, obj.transform.position.y, 0f), obj.transform.forward - 2f * Vector3.Dot(obj.transform.forward, Vector3.left) * Vector3.left, 1f, 1f, (Transform)null, false);
if (player.data.currentCards.Contains(CardHolder.cards["Prism"]))
{
if (!player.data.currentCards.Contains(CardHolder.cards["Kaleido Witch"]))
{
val2.SimulatedAttack(player.playerID, new Vector3(obj.transform.position.x, obj.transform.position.y * -1f, 0f), obj.transform.forward - 2f * Vector3.Dot(obj.transform.forward, Vector3.up) * Vector3.up, 1f, 1f, (Transform)null, false);
}
val2.SimulatedAttack(player.playerID, new Vector3(obj.transform.position.x * -1f, obj.transform.position.y * -1f, 0f), new Vector3(obj.transform.forward.x * -1f, obj.transform.forward.y * -1f, 0f), 1f, 1f, (Transform)null, false);
}
if (player.data.currentCards.Contains(CardHolder.cards["Kaleido Witch"]))
{
val.SimulatedAttack(player.playerID, new Vector3(obj.transform.position.x, obj.transform.position.y * -1f, 0f), obj.transform.forward - 2f * Vector3.Dot(obj.transform.forward, Vector3.up) * Vector3.up, 1f, 1f, (Transform)null, false);
Vector3 val5 = Quaternion.AngleAxis(45f, Vector3.forward) * Vector3.up;
val3.SimulatedAttack(player.playerID, new Vector3(obj.transform.position.y, obj.transform.position.x, 0f), obj.transform.forward - 2f * Vector3.Dot(obj.transform.forward, val5) * val5, 1f, 1f, (Transform)null, false);
val5 = Quaternion.AngleAxis(45f, Vector3.forward) * Vector3.left;
val3.SimulatedAttack(player.playerID, new Vector3(obj.transform.position.y * -1f, obj.transform.position.x * -1f, 0f), obj.transform.forward - 2f * Vector3.Dot(obj.transform.forward, val5) * val5, 1f, 1f, (Transform)null, false);
val4.SimulatedAttack(player.playerID, new Vector3(obj.transform.position.y * -1f, obj.transform.position.x, 0f), Quaternion.AngleAxis(90f, Vector3.forward) * obj.transform.forward, 1f, 1f, (Transform)null, false);
val4.SimulatedAttack(player.playerID, new Vector3(obj.transform.position.y, obj.transform.position.x * -1f, 0f), Quaternion.AngleAxis(270f, Vector3.forward) * obj.transform.forward, 1f, 1f, (Transform)null, false);
}
}
public void OnDestroy()
{
Gun obj = gun;
obj.ShootPojectileAction = (Action<GameObject>)(object)Delegate.Remove((Delegate)(object)obj.ShootPojectileAction, (Delegate)(object)new Action<GameObject>(OnShootProjectileAction));
Object.Destroy((Object)(object)savedGuns[0]);
Object.Destroy((Object)(object)savedGuns[1]);
Object.Destroy((Object)(object)savedGuns[2]);
Object.Destroy((Object)(object)savedGuns[3]);
Object.Destroy((Object)(object)savedGuns[4]);
Object.Destroy((Object)(object)savedGuns[5]);
Object.Destroy((Object)(object)savedGuns[6]);
}
}
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
internal class GeneralInputPatchUpdate : Object
{
private static GameObject mirror;
private static GameObject prism;
private static GameObject kaleido1;
private static GameObject kaleido2;
private static void Postfix(GeneralInput __instance)
{
//IL_000c: Unknown result type (might be due to invalid IL or missing references)
//IL_007c: Unknown result type (might be due to invalid IL or missing references)
//IL_0086: Expected O, but got Unknown
//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
//IL_0147: Unknown result type (might be due to invalid IL or missing references)
//IL_0151: Expected O, but got Unknown
//IL_01a8: Unknown result type (might be due to invalid IL or missing references)
//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
//IL_01c3: Unknown result type (might be due to invalid IL or missing references)
//IL_01c8: Unknown result type (might be due to invalid IL or missing references)
//IL_0213: Unknown result type (might be due to invalid IL or missing references)
//IL_021d: Expected O, but got Unknown
//IL_0274: Unknown result type (might be due to invalid IL or missing references)
//IL_0279: Unknown result type (might be due to invalid IL or missing references)
//IL_028f: Unknown result type (might be due to invalid IL or missing references)
//IL_0294: Unknown result type (might be due to invalid IL or missing references)
//IL_037a: Unknown result type (might be due to invalid IL or missing references)
//IL_02b5: Unknown result type (might be due to invalid IL or missing references)
//IL_02bf: Expected O, but got Unknown
//IL_0316: Unknown result type (might be due to invalid IL or missing references)
//IL_031b: Unknown result type (might be due to invalid IL or missing references)
//IL_0331: Unknown result type (might be due to invalid IL or missing references)
//IL_0336: Unknown result type (might be due to invalid IL or missing references)
//IL_03c3: Unknown result type (might be due to invalid IL or missing references)
//IL_0424: Unknown result type (might be due to invalid IL or missing references)
//IL_0434: Unknown result type (might be due to invalid IL or missing references)
//IL_043e: Unknown result type (might be due to invalid IL or missing references)
//IL_0463: 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_0482: Unknown result type (might be due to invalid IL or missing references)
//IL_04cc: Unknown result type (might be due to invalid IL or missing references)
//IL_04d1: Unknown result type (might be due to invalid IL or missing references)
Player player = ((CharacterData)ExtensionMethods.GetFieldValue((object)__instance, "data")).player;
if ((!player.data.view.IsMine && !PhotonNetwork.OfflineMode) || !player.data.currentCards.Contains(CardHolder.cards["Mirror Mage"]))
{
return;
}
if ((Object)(object)mirror == (Object)null)
{
mirror = new GameObject();
LineRenderer orAddComponent = ExtensionMethods.GetOrAddComponent<LineRenderer>(mirror, false);
orAddComponent.startWidth = 0.25f;
orAddComponent.endWidth = 0.25f;
((Renderer)orAddComponent).material = RSClasses.assets.LoadAsset<Material>("Mirror");
orAddComponent.SetPositions((Vector3[])(object)new Vector3[2]
{
new Vector3(0f, -1000f, 0f),
new Vector3(0f, 1000f, 0f)
});
}
if (player.data.currentCards.Contains(CardHolder.cards["Prism"]) && (Object)(object)prism == (Object)null)
{
prism = new GameObject();
LineRenderer orAddComponent2 = ExtensionMethods.GetOrAddComponent<LineRenderer>(prism, false);
orAddComponent2.startWidth = 0.25f;
orAddComponent2.endWidth = 0.25f;
((Renderer)orAddComponent2).material = RSClasses.assets.LoadAsset<Material>("Prism");
orAddComponent2.SetPositions((Vector3[])(object)new Vector3[2]
{
new Vector3(-1000f, 0f, 0f),
new Vector3(1000f, 0f, 0f)
});
}
if (player.data.currentCards.Contains(CardHolder.cards["Kaleido Witch"]))
{
if ((Object)(object)kaleido1 == (Object)null)
{
kaleido1 = new GameObject();
LineRenderer orAddComponent3 = ExtensionMethods.GetOrAddComponent<LineRenderer>(kaleido1, false);
orAddComponent3.startWidth = 0.25f;
orAddComponent3.endWidth = 0.25f;
((Renderer)orAddComponent3).material = RSClasses.assets.LoadAsset<Material>("Kaleido");
orAddComponent3.SetPositions((Vector3[])(object)new Vector3[2]
{
new Vector3(-1000f, -1000f, 0f),
new Vector3(1000f, 1000f, 0f)
});
}
if ((Object)(object)kaleido2 == (Object)null)
{
kaleido2 = new GameObject();
LineRenderer orAddComponent4 = ExtensionMethods.GetOrAddComponent<LineRenderer>(kaleido2, false);
orAddComponent4.startWidth = 0.25f;
orAddComponent4.endWidth = 0.25f;
((Renderer)orAddComponent4).material = RSClasses.assets.LoadAsset<Material>("Kaleido");
orAddComponent4.SetPositions((Vector3[])(object)new Vector3[2]
{
new Vector3(1000f, -1000f, 0f),
new Vector3(-1000f, 1000f, 0f)
});
}
}
if (player.data.currentCards.Contains(CardHolder.cards["Mirror Mind"]))
{
if (((Component)player).transform.position.x * (float)player.data.GetAdditionalData().posMult > 5f)
{
player.data.GetAdditionalData().posMult *= -1;
}
if (((Component)player).transform.position.x * (float)player.data.GetAdditionalData().posMult > 0f)
{
player.data.GetAdditionalData().invert = !player.data.GetAdditionalData().invert;
((Component)player).transform.position = new Vector3(0f, ((Component)player).transform.position.y, ((Component)player).transform.position.z);
ExtensionMethods.SetFieldValue((object)player.data.playerVel, "velocity", (object)Vector2.Scale(new Vector2(-1f, 1f), (Vector2)ExtensionMethods.GetFieldValue((object)player.data.playerVel, "velocity")));
}
if (player.data.GetAdditionalData().invert)
{
__instance.direction = new Vector3(0f - __instance.direction.x, __instance.direction.y, __instance.direction.z);
}
}
}
}
internal class PolishedMirror_Mono : MonoBehaviour
{
private Dictionary<int, List<GameObject>> reflections = new Dictionary<int, List<GameObject>>();
private Player player;
public void Awake()
{
player = ((Component)this).GetComponentInParent<Player>();
}
public void Update()
{
//IL_0198: Unknown result type (might be due to invalid IL or missing references)
//IL_01a9: Unknown result type (might be due to invalid IL or missing references)
//IL_01b9: Unknown result type (might be due to invalid IL or missing references)
//IL_01c3: Unknown result type (might be due to invalid IL or missing references)
//IL_01ce: Unknown result type (might be due to invalid IL or missing references)
//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
//IL_0229: 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_024a: Unknown result type (might be due to invalid IL or missing references)
//IL_0254: Unknown result type (might be due to invalid IL or missing references)
//IL_025f: Unknown result type (might be due to invalid IL or missing references)
//IL_028c: 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_02ae: Unknown result type (might be due to invalid IL or missing references)
//IL_02b8: 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_031f: Unknown result type (might be due to invalid IL or missing references)
//IL_032f: Unknown result type (might be due to invalid IL or missing references)
//IL_033f: Unknown result type (might be due to invalid IL or missing references)
//IL_0349: Unknown result type (might be due to invalid IL or missing references)
//IL_0354: 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_0392: Unknown result type (might be due to invalid IL or missing references)
//IL_03a2: Unknown result type (might be due to invalid IL or missing references)
//IL_03ac: Unknown result type (might be due to invalid IL or missing references)
//IL_03b7: Unknown result type (might be due to invalid IL or missing references)
//IL_03e4: Unknown result type (might be due to invalid IL or missing references)
//IL_03f4: 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_040f: Unknown result type (might be due to invalid IL or missing references)
//IL_041a: Unknown result type (might be due to invalid IL or missing references)
//IL_0447: Unknown result type (might be due to invalid IL or missing references)
//IL_0458: Unknown result type (might be due to invalid IL or missing references)
//IL_0469: Unknown result type (might be due to invalid IL or missing references)
//IL_0473: Unknown result type (might be due to invalid IL or missing references)
//IL_047e: Unknown result type (might be due to invalid IL or missing references)
if (!player.data.view.IsMine)
{
return;
}
IEnumerator<Player> enumerator = Enumerable.Where<Player>((IEnumerable<Player>)(object)PlayerManager.instance.players, (Func<Player, bool>)([CompilerGenerated] (Player p) => p.playerID != player.playerID)).GetEnumerator();
try
{
while (((IEnumerator)enumerator).MoveNext())
{
Player current = enumerator.Current;
if (!reflections.ContainsKey(current.playerID))
{
List<GameObject> val = new List<GameObject>();
GameObject val2 = Object.Instantiate<GameObject>(RSClasses.assets.LoadAsset<GameObject>("Reflection"), ((Component)current).transform);
val2.transform.SetPositionAndRotation(new Vector3(1000f, 1000f, 1000f), ((Component)current).transform.rotation);
val2.SetActive(true);
val2.GetComponent<SpriteRenderer>().color = current.GetTeamColors().color;
val.Add(val2);
val.Add(Object.Instantiate<GameObject>(val2, ((Component)current).transform));
val.Add(Object.Instantiate<GameObject>(val2, ((Component)current).transform));
val.Add(Object.Instantiate<GameObject>(val2, ((Component)current).transform));
val.Add(Object.Instantiate<GameObject>(val2, ((Component)current).transform));
val.Add(Object.Instantiate<GameObject>(val2, ((Component)current).transform));
val.Add(Object.Instantiate<GameObject>(val2, ((Component)current).transform));
reflections[current.playerID] = val;
}
reflections[current.playerID][0].transform.SetPositionAndRotation(new Vector3(0f - ((Component)current).transform.position.x, ((Component)current).transform.position.y, ((Component)current).transform.position.z), ((Component)current).transform.rotation);
if (player.data.currentCards.Contains(CardHolder.cards["Prism"]))
{
reflections[current.playerID][1].transform.SetPositionAndRotation(new Vector3(((Component)current).transform.position.x, 0f - ((Component)current).transform.position.y, ((Component)current).transform.position.z), ((Component)current).transform.rotation);
reflections[current.playerID][2].transform.SetPositionAndRotation(new Vector3(0f - ((Component)current).transform.position.x, 0f - ((Component)current).transform.position.y, ((Component)current).transform.position.z), ((Component)current).transform.rotation);
}
if (player.data.currentCards.Contains(CardHolder.cards["Kaleido Witch"]))
{
reflections[current.playerID][3].transform.SetPositionAndRotation(new Vector3(((Component)current).transform.position.y, ((Component)current).transform.position.x, ((Component)current).transform.position.z), ((Component)current).transform.rotation);
reflections[current.playerID][4].transform.SetPositionAndRotation(new Vector3(0f - ((Component)current).transform.position.y, ((Component)current).transform.position.x, ((Component)current).transform.position.z), ((Component)current).transform.rotation);
reflections[current.playerID][5].transform.SetPositionAndRotation(new Vector3(((Component)current).transform.position.y, 0f - ((Component)current).transform.position.x, ((Component)current).transform.position.z), ((Component)current).transform.rotation);
reflections[current.playerID][6].transform.SetPositionAndRotation(new Vector3(0f - ((Component)current).transform.position.y, 0f - ((Component)current).transform.position.x, ((Component)current).transform.position.z), ((Component)current).transform.rotation);
}
}
}
finally
{
if (enumerator != null)
{
((IDisposable)enumerator).Dispose();
}
}
}
private void OnDestroy()
{
//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_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_0020: Unknown result type (might be due to invalid IL or missing references)
//IL_0025: Unknown result type (might be due to invalid IL or missing references)
Enumerator<int, List<GameObject>> enumerator = reflections.GetEnumerator();
try
{
while (enumerator.MoveNext())
{
Enumerator<GameObject> enumerator2 = enumerator.Current.Value.GetEnumerator();
try
{
while (enumerator2.MoveNext())
{
GameObject current = enumerator2.Current;
Object.Destroy((Object)(object)current);
}
}
finally
{
((IDisposable)enumerator2).Dispose();
}
}
}
finally
{
((IDisposable)enumerator).Dispose();
}
}
}
internal class Scythe : MonoBehaviour
{
public bool active = true;
public bool hitBullets = true;
public bool ableToHit = true;
private Player player;
private GameObject scythe;
private void OnDestroy()
{
Object.Destroy((Object)(object)scythe);
}
private void Start()
{
player = ((Component)this).GetComponentInParent<Player>();
scythe = Object.Instantiate<GameObject>(RSClasses.assets.LoadAsset<GameObject>("Scythe"), ((Component)player).transform);
scythe.SetActive(true);
}
public void DoHit()
{
//IL_0007: 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_0022: 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_009d: Expected O, but got Unknown
//IL_00c5: 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_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_00e4: Unknown result type (might be due to invalid IL or missing references)
//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
//IL_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_011d: Unknown result type (might be due to invalid IL or missing references)
//IL_01a3: Unknown result type (might be due to invalid IL or missing references)
//IL_01a8: Unknown result type (might be due to invalid IL or missing references)
//IL_01b3: Unknown result type (might be due to invalid IL or missing references)
//IL_01b8: 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)
//IL_01c2: 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_01e3: Unknown result type (might be due to invalid IL or missing references)
//IL_01ee: Unknown result type (might be due to invalid IL or missing references)
//IL_01f3: Unknown result type (might be due to invalid IL or missing references)
float y = ((Component)this).transform.localScale.y;
Collider2D[] array = Physics2D.OverlapCircleAll(Vector2.op_Implicit(scythe.transform.position), y);
if (!player.data.view.IsMine)
{
return;
}
Collider2D[] array2 = array;
foreach (Collider2D val in array2)
{
Damagable component = ((Component)val).gameObject.GetComponent<Damagable>();
HealthHandler component2 = ((Component)val).gameObject.GetComponent<HealthHandler>();
Vector2 val3;
if (Object.op_Implicit((Object)(object)component2))
{
Player val2 = (Player)ExtensionMethods.GetFieldValue((object)component2, "player");
SoundManager.Instance.PlayAtPosition(component2.soundBounce, ((Component)this).transform, ((Component)component).transform);
val3 = Vector2.op_Implicit(((Component)val2).transform.position) - Vector2.op_Implicit(scythe.transform.position);
component2.CallTakeForce(((Vector2)(ref val3)).normalized * 2500f, (ForceMode2D)1, true, false, 0f);
ableToHit = false;
if (((Component)(Player)ExtensionMethods.GetFieldValue((object)component2, "player")).GetComponent<Block>().blockedThisFrame)
{
continue;
}
}
if (Object.op_Implicit((Object)(object)component))
{
float num = 0f;
if (player.data.currentCards.Contains(CardHolder.cards["Dark Harvest"]))
{
num = player.data.stats.lifeSteal * 50f;
}
val3 = Vector2.op_Implicit(((Component)component).transform.position) - Vector2.op_Implicit(((Component)this).transform.position);
component.CallTakeDamage(((Vector2)(ref val3)).normalized * (player.data.GetAdditionalData().scytheDamage + num), Vector2.op_Implicit(((Component)this).transform.position), ((Component)this).gameObject, player, true);
}
}
}
public void UpdatePos(double angle, float rotation, float radius)
{
//IL_0039: 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_0062: Unknown result type (might be due to invalid IL or missing references)
//IL_0074: Unknown result type (might be due to invalid IL or missing references)
double num = angle * Math.PI / 180.0;
Vector3 localPosition = default(Vector3);
((Vector3)(ref localPosition))..ctor((float)((double)radius * Math.Sin(num)), (float)((double)radius * Math.Cos(num)), 0f);
Quaternion rotation2 = default(Quaternion);
((Quaternion)(ref rotation2)).eulerAngles = new Vector3(0f, 0f, rotation);
scythe.transform.localPosition = localPosition;
scythe.transform.rotation = rotation2;
}
public void SetColor(Color color)
{
//IL_000c: Unknown result type (might be due to invalid IL or missing references)
scythe.GetComponent<SpriteRenderer>().color = color;
}
public void SetScale(float scale)
{
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
scythe.transform.localScale = new Vector3(scale, scale, scale);
}
}
public class Scythe_Mono : MonoBehaviour
{
[CompilerGenerated]
private sealed class <>c__DisplayClass4_0 : Object
{
public Scythe scythe;
public Scythe_Mono <>4__this;
internal void <UpdateStats>b__0()
{
//IL_0011: Unknown result type (might be due to invalid IL or missing references)
((Component)scythe).GetComponent<Scythe>().SetColor(<>4__this.color);
}
internal void <UpdateStats>b__1()
{
scythe.SetScale(<>4__this.player.data.GetAdditionalData().orbitalRadius * (5f / 32f));
}
}
private double angle = 0.0;
private float rotation = 0f;
private bool active = false;
private Color color = new Color(1f, 1f, 63f / 85f);
private List<Scythe> scythes = new List<Scythe>();
private Player player;
private void OnDestroy()
{
GameModeManager.RemoveHook("PickEnd", (Func<IGameModeHandler, IEnumerator>)PickEnd);
GameModeManager.RemoveHook("BattleStart", (Func<IGameModeHandler, IEnumerator>)BattleStart);
GameModeManager.RemoveHook("PointEnd", (Func<IGameModeHandler, IEnumerator>)PointEnd);
while (Enumerable.Count<Scythe>((IEnumerable<Scythe>)(object)scythes) > 0)
{
Object.Destroy((Object)(object)scythes[0]);
scythes.Remove(scythes[0]);
}
}
private void Start()
{
player = ((Component)this).GetComponentInParent<Player>();
GameModeManager.AddHook("PickEnd", (Func<IGameModeHandler, IEnumerator>)PickEnd);
GameModeManager.AddHook("BattleStart", (Func<IGameModeHandler, IEnumerator>)BattleStart);
GameModeManager.AddHook("PointEnd", (Func<IGameModeHandler, IEnumerator>)PointEnd);
}
private void Update()
{
//IL_00b8: 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_0047: 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_014d: 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_0162: Unknown result type (might be due to invalid IL or missing references)
//IL_012b: Unknown result type (might be due to invalid IL or missing references)
//IL_0130: Unknown result type (might be due to invalid IL or missing references)
//IL_0140: Unknown result type (might be due to invalid IL or missing references)
angle += player.data.GetAdditionalData().scytheSpeed * TimeHandler.deltaTime;
if (angle > 360.0)
{
Enumerator<Scythe> enumerator = scythes.GetEnumerator();
try
{
while (enumerator.MoveNext())
{
Scythe current = enumerator.Current;
current.ableToHit = true;
}
}
finally
{
((IDisposable)enumerator).Dispose();
}
angle -= 360.0;
}
rotation = (rotation - 1200f * TimeHandler.deltaTime) % 360f;
int num = 0;
Enumerator<Scythe> enumerator2 = scythes.GetEnumerator();
try
{
while (enumerator2.MoveNext())
{
Scythe current2 = enumerator2.Current;
double num2 = angle + (double)(360f / (float)Enumerable.Count<Scythe>((IEnumerable<Scythe>)(object)scythes) * (float)num);
current2.UpdatePos(num2, rotation, player.data.GetAdditionalData().orbitalRadius * 2.5f);
num++;
if (current2.ableToHit)
{
Color val = color;
val.a = 1f;
current2.SetColor(val);
}
else
{
Color val2 = color;
val2.a = 0.5f;
current2.SetColor(val2);
}
}
}
finally
{
((IDisposable)enumerator2).Dispose();
}
}
private void FixedUpdate()
{
//IL_0013: Unknown result type (might be due to invalid IL or missing references)
//IL_0018: Unknown result type (might be due to invalid IL or missing references)
if (!active)
{
return;
}
Enumerator<Scythe> enumerator = scythes.GetEnumerator();
try
{
while (enumerator.MoveNext())
{
Scythe current = enumerator.Current;
if (current.ableToHit)
{
current.DoHit();
}
}
}
finally
{
((IDisposable)enumerator).Dispose();
}
}
public void UpdateStats()
{
//IL_001c: Unknown result type (might be due to invalid IL or missing references)
//IL_0022: Expected O, but got Unknown
//IL_0104: 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_015b: Unknown result type (might be due to invalid IL or missing references)
//IL_0160: 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_0194: Unknown result type (might be due to invalid IL or missing references)
//IL_019e: Expected O, but got Unknown
//IL_01b1: Unknown result type (might be due to invalid IL or missing references)
//IL_01bb: Expected O, but got Unknown
while (Enumerable.Count<Scythe>((IEnumerable<Scythe>)(object)scythes) < player.data.GetAdditionalData().scytheCount)
{
GameObject val = new GameObject("Scythe", (Type[])(object)new Type[1] { typeof(Scythe) });
val.transform.SetParent(((Component)player).transform);
scythes.Add(val.GetComponent<Scythe>());
}
while (Enumerable.Count<Scythe>((IEnumerable<Scythe>)(object)scythes) > Math.Max(player.data.GetAdditionalData().scytheCount, 0))
{
Object.Destroy((Object)(object)scythes[0]);
scythes.Remove(scythes[0]);
}
if (player.data.currentCards.Contains(CardHolder.cards["Harvester"]))
{
color = new Color(0.69803923f, 0f, 1f);
}
else if (player.data.currentCards.Contains(CardHolder.cards["Guardian"]))
{
color = new Color(0.4f, 1f, 1f);
}
Enumerator<Scythe> enumerator = scythes.GetEnumerator();
try
{
while (enumerator.MoveNext())
{
<>c__DisplayClass4_0 CS$<>8__locals0 = new <>c__DisplayClass4_0();
CS$<>8__locals0.<>4__this = this;
CS$<>8__locals0.scythe = enumerator.Current;
ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)RSClasses.instance, 1f, (Action)delegate
{
//IL_0011: Unknown result type (might be due to invalid IL or missing references)
((Component)CS$<>8__locals0.scythe).GetComponent<Scythe>().SetColor(CS$<>8__locals0.<>4__this.color);
});
ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)RSClasses.instance, 1f, (Action)delegate
{
CS$<>8__locals0.scythe.SetScale(CS$<>8__locals0.<>4__this.player.data.GetAdditionalData().orbitalRadius * (5f / 32f));
});
}
}
finally
{
((IDisposable)enumerator).Dispose();
}
}
[IteratorStateMachine(/*Could not decode attribute arguments.*/)]
private IEnumerator BattleStart(IGameModeHandler gm)
{
active = true;
rotation = 0f;
angle = 0.0;
yield break;
}
[IteratorStateMachine(/*Could not decode attribute arguments.*/)]
private IEnumerator PickEnd(IGameModeHandler gm)
{
UpdateStats();
yield break;
}
[IteratorStateMachine(/*Could not decode attribute arguments.*/)]
private IEnumerator PointEnd(IGameModeHandler gm)
{
active = false;
yield break;
}
[IteratorStateMachine(/*Could not decode attribute arguments.*/)]
private IEnumerator GameEnd(IGameModeHandler gm)
{
Object.Destroy((Object)(object)this);
yield break;
}
}
internal class ShatterEffect : MonoBehaviour
{
[CompilerGenerated]
private sealed class <>c__DisplayClass4_0 : Object
{
public GameObject shatter;
public ShatterEffect <>4__this;
internal void <TriggerFracture>b__0()
{
<>4__this.DestroyShatter(shatter);
}
}
private GameObject reflection;
private Random rand;
private List<GameObject> shatters;
private SoundEvent reflectSound;
private SoundEvent shatterSound;
private float cooldownTimer;
private Player player;
private SoundParameterIntensity soundParameterIntensity;
private void Awake()
{
player = ((Component)this).gameObject.GetComponentInParent<Player>();
}
private void Start()
{
//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
AudioClip val = RSClasses.assets.LoadAsset<AudioClip>("shatter.ogg");
SoundContainer val2 = ScriptableObject.CreateInstance<SoundContainer>();
val2.setting.volumeIntensityEnable = true;
val2.audioClip[0] = val;
shatterSound = ScriptableObject.CreateInstance<SoundEvent>();
shatterSound.soundContainerArray[0] = val2;
AudioClip val3 = RSClasses.assets.LoadAsset<AudioClip>("reflect.ogg");
SoundContainer val4 = ScriptableObject.CreateInstance<SoundContainer>();
val4.setting.volumeIntensityEnable = true;
val4.audioClip[0] = val3;
reflectSound = ScriptableObject.CreateInstance<SoundEvent>();
reflectSound.soundContainerArray[0] = val4;
if (player.data.view.IsMine)
{
reflection = Object.Instantiate<GameObject>(RSClasses.assets.LoadAsset<GameObject>("Reflection"), ((Component)player).transform);
reflection.SetActive(true);
reflection.GetComponent<SpriteRenderer>().color = player.GetTeamColors().color;
}
}
public void Update()
{
//IL_0060: Unknown result type (might be due to invalid IL or missing references)
//IL_0076: Unknown result type (might be due to invalid IL or missing references)
//IL_008b: Unknown result type (might be due to invalid IL or missing references)
//IL_0095: Unknown result type (might be due to invalid IL or missing references)
//IL_00a5: 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_00d2: 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_0153: Unknown result type (might be due to invalid IL or missing references)
//IL_015a: Expected O, but got Unknown
//IL_0180: Unknown result type (might be due to invalid IL or missing references)
//IL_0185: Unknown result type (might be due to invalid IL or missing references)
//IL_0190: Unknown result type (might be due to invalid IL or missing references)
//IL_0195: Unknown result type (might be due to invalid IL or missing references)
//IL_019a: Unknown result type (might be due to invalid IL or missing references)
//IL_019f: Unknown result type (might be due to invalid IL or missing references)
//IL_01a3: Unknown result type (might be due to invalid IL or missing references)
//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
//IL_01cc: Unknown result type (might be due to invalid IL or missing references)
//IL_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)
cooldownTimer = ((cooldownTimer - TimeHandler.deltaTime < 0f) ? 0f : (cooldownTimer - TimeHandler.deltaTime));
if (!player.data.view.IsMine)
{
return;
}
reflection.transform.SetPositionAndRotation(new Vector3(0f - ((Component)player).transform.position.x, ((Component)player).transform.position.y, ((Component)player).transform.position.z), ((Component)player).transform.rotation);
if (shatters.Count <= 0)
{
return;
}
Enumerator<GameObject> enumerator = shatters.GetEnumerator();
try
{
while (enumerator.MoveNext())
{
GameObject current = enumerator.Current;
Collider2D[] array = Physics2D.OverlapCircleAll(Vector2.op_Implicit(current.transform.position), 166.66f * player.data.GetAdditionalData().fractureSize);
Collider2D[] array2 = array;
foreach (Collider2D val in array2)
{
HealthHandler component = ((Component)val).gameObject.GetComponent<HealthHandler>();
if (Object.op_Implicit((Object)(object)component))
{
Player val2 = (Player)ExtensionMethods.GetFieldValue((object)component, "player");
if (val2.playerID != player.playerID)
{
Vector2 val3 = Vector2.op_Implicit(((Component)val2).transform.position) - Vector2.op_Implicit(current.transform.position);
((Damagable)component).CallTakeDamage(((Vector2)(ref val3)).normalized * Time.deltaTime * player.data.weaponHandler.gun.damage, Vector2.op_Implicit(((Component)this).transform.position), ((Component)this).gameObject, player, true);
}
}
}
}
}
finally
{
((IDisposable)enumerator).Dispose();
}
}
public void TriggerReflect()
{
//IL_0091: 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_00bc: 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_00d6: Unknown result type (might be due to invalid IL or missing references)
//IL_0100: Unknown result type (might be due to invalid IL or missing references)
//IL_011f: Unknown result type (might be due to invalid IL or missing references)
//IL_0124: Unknown result type (might be due to invalid IL or missing references)
//IL_0163: Unknown result type (might be due to invalid IL or missing references)
//IL_0169: Unknown result type (might be due to invalid IL or missing references)
if (cooldownTimer == 0f)
{
soundParameterIntensity.intensity = Optionshandler.vol_Sfx / 1.15f * Optionshandler.vol_Master;
SoundManager.Instance.PlayAtPosition(reflectSound, ((Component)player).transform, ((Component)player).transform, (SoundParameterBase[])(object)new SoundParameterBase[1] { (SoundParameterBase)soundParameterIntensity });
((Component)player).GetComponent<PlayerCollision>().IgnoreWallForFrames(2);
((Component)player).transform.SetPositionAndRotation(new Vector3(0f - ((Component)player).transform.position.x, ((Component)player).transform.position.y, ((Component)player).transform.position.z), ((Component)player).transform.rotation);
ExtensionMethods.SetFieldValue((object)player.data.playerVel, "velocity", (object)Vector2.Scale(new Vector2(-1f, 1f), (Vector2)ExtensionMethods.GetFieldValue((object)player.data.playerVel, "velocity")));
if (player.data.view.IsMine)
{
player.data.block.RPCA_DoBlock(true, false, (BlockTriggerType)0, default(Vector3), false);
}
cooldownTimer = player.data.GetAdditionalData().reflectionCooldown;
player.data.GetAdditionalData().invert = !player.data.GetAdditionalData().invert;
}
}
public void TriggerFracture()
{
//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
//IL_00b6: 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_013f: Unknown result type (might be due to invalid IL or missing references)
//IL_0181: Unknown result type (might be due to invalid IL or missing references)
//IL_018b: Expected O, but got Unknown
if (cooldownTimer == 0f)
{
<>c__DisplayClass4_0 CS$<>8__locals0 = new <>c__DisplayClass4_0();
CS$<>8__locals0.<>4__this = this;
soundParameterIntensity.intensity = Optionshandler.vol_Sfx / 1f * Optionshandler.vol_Master;
SoundManager.Instance.PlayAtPosition(shatterSound, ((Component)player).transform, ((Component)player).transform, (SoundParameterBase[])(object)new SoundParameterBase[1] { (SoundParameterBase)soundParameterIntensity });
CS$<>8__locals0.shatter = Object.Instantiate<GameObject>(RSClasses.assets.LoadAsset<GameObject>("Shatter"));
CS$<>8__locals0.shatter.transform.SetPositionAndRotation(((Component)player).transform.position, ((Component)player).transform.rotation);
CS$<>8__locals0.shatter.transform.localScale = new Vector3(player.data.GetAdditionalData().fractureSize, player.data.GetAdditionalData().fractureSize, 1f);
CS$<>8__locals0.shatter.transform.rotation = new Quaternion(0f, 0f, (float)(rand.Next() % 360), (float)(rand.Next() % 360));
CS$<>8__locals0.shatter.GetComponent<Canvas>().sortingLayerName = "MostFront";
ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)RSClasses.instance, player.data.GetAdditionalData().fractureDuration, (Action)delegate
{
CS$<>8__locals0.<>4__this.DestroyShatter(CS$<>8__locals0.shatter);
});
shatters.Add(CS$<>8__locals0.shatter);
}
}
public void DestroyShatter(GameObject shatter)
{
Object.Destroy((Object)(object)shatter);
shatters.Remove(shatter);
}
private void OnDestroy()
{
while (shatters.Count > 0)
{
Object.Destroy((Object)(object)shatters[0]);
shatters.Remove(shatters[0]);
}
}
public ShatterEffect()
{
//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_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_0018: Expected O, but got Unknown
//IL_0035: Unknown result type (might be due to invalid IL or missing references)
//IL_003f: Expected O, but got Unknown
DateTime now = DateTime.Now;
rand = new Random(((DateTime)(ref now)).Millisecond);
shatters = new List<GameObject>();
cooldownTimer = 0f;
soundParameterIntensity = new SoundParameterIntensity(0f, (UpdateMode)0);
((MonoBehaviour)this)..ctor();
}
}
internal class Shatter_Mono : WasDealtDamageTrigger
{
public ShatterEffect mono;
private Player player;
private void Start()
{
player = ((Component)this).gameObject.GetComponentInParent<Player>();
mono = ExtensionMethods.GetOrAddComponent<ShatterEffect>(((Component)player).gameObject, false);
}
public override void WasDealtDamage(Vector2 damage, bool selfDamage)
{
if (player.data.currentCards.Contains(CardHolder.cards["Fracture"]))
{
mono.TriggerFracture();
}
mono.TriggerReflect();
}
private void OnDestroy()
{
Object.Destroy((Object)(object)mono);
}
}
public class Voidseer_Mono : MonoBehaviour
{
private Player player;
public void Start()
{
player = ((Component)this).GetComponentInParent<Player>();
}
public void Trigger()
{
//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_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)
((Component)player).GetComponent<Damagable>().CallTakeDamage(Vector2.up * 1f, Vector2.op_Implicit(((Component)player).transform.position), (GameObject)null, player, true);
}
}
}
namespace RSClasses.Cards.MirrorMage
{
internal class MirrorMageClass : ClassHandler
{
[IteratorStateMachine(/*Could not decode attribute arguments.*/)]
public override IEnumerator Init()
{
ClassesRegistry.Register(CardHolder.cards["Mirror Mage"], (CardType)1, 0);
ClassesRegistry.Register(CardHolder.cards["Polished Mirror"], (CardType)16, CardHolder.cards["Mirror Mage"], 0);
ClassesRegistry.Register(CardHolder.cards["Prism"], (CardType)8, CardHolder.cards["Mirror Mage"], 0);
ClassesRegistry.Register(CardHolder.cards["Reflection Replacement"], (CardType)8, CardHolder.cards["Mirror Mage"], 0);
ClassesRegistry.Register(CardHolder.cards["Mirror Mind"], (CardType)16, CardHolder.cards["Reflection Replacement"], 0);
ClassesRegistry.Register(CardHolder.cards["Fracture"], (CardType)8, CardHolder.cards["Reflection Replacement"], 0);
ClassesRegistry.Register(CardHolder.cards["Voidseer"], (CardType)2, CardHolder.cards["Fracture"], 0);
ClassesRegistry.Register(CardHolder.cards["Shatter"], (CardType)16, CardHolder.cards["Voidseer"], 0);
ClassesRegistry.Register(CardHolder.cards["Weakened Mirror"], (CardType)16, CardHolder.cards["Voidseer"], 0);
ClassesRegistry.Register(CardHolder.cards["Forced Reflection"], (CardType)16, CardHolder.cards["Voidseer"], 0);
ClassesRegistry.Register(CardHolder.cards["Forced Refraction"], (CardType)16, (CardInfo[])(object)new CardInfo[2]
{
CardHolder.cards["Voidseer"],
CardHolder.cards["Prism"]
}, 0);
ClassesRegistry.Register(CardHolder.cards["Kaleido Witch"], (CardType)2, CardHolder.cards["Prism"], 0);
ClassesRegistry.Register(CardHolder.cards["Emerald Glitter"], (CardType)16, CardHolder.cards["Kaleido Witch"], 0);
ClassesRegistry.Register(CardHolder.cards["Ruby Dust"], (CardType)16, CardHolder.cards["Kaleido Witch"], 0);
ClassesRegistry.Register(CardHolder.cards["Sapphire Shards"], (CardType)16, CardHolder.cards["Kaleido Witch"], 0);
ClassesRegistry.Register(CardHolder.cards["Kaleido Party"], (CardType)16, CardHolder.cards["Kaleido Witch"], 0);
yield return null;
}
}
}
namespace RSClasses.Cards.Astronomer
{
internal class AstronomerClass : ClassHandler
{
[IteratorStateMachine(/*Could not decode attribute arguments.*/)]
public override IEnumerator Init()
{
ClassesRegistry.Register(CardHolder.cards["Astronomer"], (CardType)1, 0);
ClassesRegistry.Register(CardHolder.cards["Domain Extension"], (CardType)16, CardHolder.cards["Astronomer"], 0);
ClassesRegistry.Register(CardHolder.cards["Faster Barriers"], (CardType)16, CardHolder.cards["Astronomer"], 0);
ClassesRegistry.Register(CardHolder.cards["Gravity Well"], (CardType)16, CardHolder.cards["Astronomer"], 0);
ClassesRegistry.Register(CardHolder.cards["Sharper Scythes"], (CardType)16, CardHolder.cards["Astronomer"], 0);
ClassesRegistry.Register(CardHolder.cards["Double Barriers"], (CardType)8, CardHolder.cards["Astronomer"], 0);
ClassesRegistry.Register(CardHolder.cards["Twin Scythes"], (CardType)8, CardHolder.cards["Astronomer"], 0);
ClassesRegistry.Register(CardHolder.cards["Guardian"], (CardType)2, (CardInfo[])(object)new CardInfo[2]
{
CardHolder.cards["Double Barriers"],
CardHolder.cards["Twin Scythes"]
}, 0);
ClassesRegistry.Register(CardHolder.cards["Perfect Guard"], (CardType)16, CardHolder.cards["Guardian"], 0);
ClassesRegistry.Register(CardHolder.cards["Shield Spikes"], (CardType)16, CardHolder.cards["Guardian"], 0);
ClassesRegistry.Register(CardHolder.cards["Harvester"], (CardType)2, (CardInfo[])(object)new CardInfo[2]
{
CardHolder.cards["Double Barriers"],
CardHolder.cards["Twin Scythes"]
}, 0);
ClassesRegistry.Register(CardHolder.cards["Harvest Sickle"], (CardType)8, CardHolder.cards["Harvester"], 0);
ClassesRegistry.Register(CardHolder.cards["Dark Harvest"], (CardType)16, CardHolder.cards["Harvest Sickle"], 0);
yield return null;
}
}
}