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 System.Security;
using System.Security.Permissions;
using BepInEx;
using CardChoiceSpawnUniqueCardPatch.CustomCategories;
using ClassesManagerReborn;
using HarmonyLib;
using Jotunn.Utils;
using Microsoft.CodeAnalysis;
using ModdingUtils.MonoBehaviours;
using ModdingUtils.RoundsEffects;
using ModdingUtils.Utils;
using Photon.Pun;
using RootCore;
using RootCore.ArtStuffs;
using RootCore.CardConditions;
using UnboundLib;
using UnboundLib.Cards;
using UnboundLib.GameModes;
using UnboundLib.Utils;
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: SecurityPermission(8, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Embedded]
[AttributeUsage(/*Could not decode attribute arguments.*/)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace RootAdvancedCards
{
internal class AntiJump : ReversibleEffect
{
private bool pressed;
private bool fliped;
private float grounded = 0.25f;
private float lastY;
public override void OnStart()
{
((ReversibleEffect)this).OnStart();
((ReversibleEffect)this).SetLivesToEffect(2147483647);
base.gravityModifier.gravityForce_mult = -1f;
base.gunStatModifier.gravity_mult = -1f;
}
public override void OnUpdate()
{
//IL_001d: Unknown result type (might be due to invalid IL or missing references)
//IL_012e: Unknown result type (might be due to invalid IL or missing references)
if (Math.Round((double)lastY, 1) == Math.Round((double)((Component)base.player).gameObject.transform.position.y, 1))
{
grounded -= Time.deltaTime;
}
else
{
grounded = 0.5f;
}
if (grounded <= 0f)
{
Core.Debug((object)"auto flipping!");
if (fliped)
{
((ReversibleEffect)this).ClearModifiers(true);
}
else
{
((ReversibleEffect)this).ApplyModifiers();
}
grounded = 0.5f;
fliped = !fliped;
base.player.data.jump.Jump(true, 2f);
}
if (base.data.input.jumpIsPressed)
{
if (!pressed)
{
if (fliped)
{
((ReversibleEffect)this).ClearModifiers(true);
}
else
{
((ReversibleEffect)this).ApplyModifiers();
}
fliped = !fliped;
base.player.data.jump.Jump(true, 1f);
}
pressed = true;
}
else
{
pressed = false;
}
lastY = ((Component)base.player).gameObject.transform.position.y;
}
}
public class CakeRestrictions : ClassHandler
{
[IteratorStateMachine(/*Could not decode attribute arguments.*/)]
public override IEnumerator Init()
{
ClassesRegistry.Register((CardInfo)(object)CardList.GetCardInfo("Cake_Trinket"), (CardType)33, 0);
ClassesRegistry.Register((CardInfo)(object)CardList.GetCardInfo("Cake_Common"), (CardType)40, (CardInfo)(object)CardList.GetCardInfo("Cake_Trinket"), 0);
ClassesRegistry.Register((CardInfo)(object)CardList.GetCardInfo("Cake_Scarce"), (CardType)48, (CardInfo)(object)CardList.GetCardInfo("Cake_Common"), 0);
ClassesRegistry.Register((CardInfo)(object)CardList.GetCardInfo("Cake_Uncommon"), (CardType)48, (CardInfo)(object)CardList.GetCardInfo("Cake_Scarce"), 0);
ClassesRegistry.Register((CardInfo)(object)CardList.GetCardInfo("Cake_Exotic"), (CardType)48, (CardInfo)(object)CardList.GetCardInfo("Cake_Uncommon"), 0);
ClassesRegistry.Register((CardInfo)(object)CardList.GetCardInfo("Cake_Rare"), (CardType)48, (CardInfo)(object)CardList.GetCardInfo("Cake_Exotic"), 0);
ClassesRegistry.Register((CardInfo)(object)CardList.GetCardInfo("Cake_Epic"), (CardType)48, (CardInfo)(object)CardList.GetCardInfo("Cake_Rare"), 0);
ClassesRegistry.Register((CardInfo)(object)CardList.GetCardInfo("Cake_Legendary"), (CardType)48, (CardInfo)(object)CardList.GetCardInfo("Cake_Epic"), 0);
ClassesRegistry.Register((CardInfo)(object)CardList.GetCardInfo("Cake_Mythical"), (CardType)48, (CardInfo)(object)CardList.GetCardInfo("Cake_Legendary"), 0);
ClassesRegistry.Register((CardInfo)(object)CardList.GetCardInfo("Cake_Divine"), (CardType)48, (CardInfo)(object)CardList.GetCardInfo("Cake_Mythical"), 0);
yield break;
}
}
public class dewish : CustomCard
{
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
}
public override void OnReassignCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
CharacterStatModifiersRootData rootData = CharacterStatModifiersExtension.GetRootData(characterStats);
rootData.freeCards--;
}
protected override GameObject GetCardArt()
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
throw new NotImplementedException();
}
protected override string GetDescription()
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
throw new NotImplementedException();
}
protected override Rarity GetRarity()
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
throw new NotImplementedException();
}
protected override CardInfoStat[] GetStats()
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
throw new NotImplementedException();
}
protected override CardThemeColorType GetTheme()
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
throw new NotImplementedException();
}
protected override string GetTitle()
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
throw new NotImplementedException();
}
}
public class GiveGrizzly : MonoBehaviour
{
[Serializable]
[CompilerGenerated]
private sealed class <>c : Object
{
public static readonly <>c <>9 = new <>c();
public static Action <>9__0_0;
internal void <Start>b__0_0()
{
//IL_000f: 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_002a: Unknown result type (might be due to invalid IL or missing references)
Enumerator<Player> enumerator = Enumerable.ToList<Player>((IEnumerable<Player>)(object)PlayerManager.instance.players).GetEnumerator();
try
{
while (enumerator.MoveNext())
{
Player current = enumerator.Current;
if (GameModeManager.CurrentHandler.GetTeamScore(current.teamID).rounds == 0)
{
UtilityExtenions.GiveCard(current, "Grizzly");
}
}
}
finally
{
((IDisposable)enumerator).Dispose();
}
}
}
private void Start()
{
//IL_001a: 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_0025: Expected O, but got Unknown
Core instance = Core.instance;
object obj = <>c.<>9__0_0;
if (obj == null)
{
Action val = delegate
{
//IL_000f: 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_002a: Unknown result type (might be due to invalid IL or missing references)
Enumerator<Player> enumerator = Enumerable.ToList<Player>((IEnumerable<Player>)(object)PlayerManager.instance.players).GetEnumerator();
try
{
while (enumerator.MoveNext())
{
Player current = enumerator.Current;
if (GameModeManager.CurrentHandler.GetTeamScore(current.teamID).rounds == 0)
{
UtilityExtenions.GiveCard(current, "Grizzly");
}
}
}
finally
{
((IDisposable)enumerator).Dispose();
}
};
<>c.<>9__0_0 = val;
obj = (object)val;
}
ExtensionMethods.ExecuteAfterFrames((MonoBehaviour)(object)instance, 2, (Action)obj);
}
}
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("Systems.R00t.Advanced", "Root Advanced Cards", "1.0.0")]
[BepInProcess("Rounds.exe")]
public class Main : BaseUnityPlugin
{
private const string ModId = "Systems.R00t.Advanced";
private const string ModName = "Root Advanced Cards";
public const string Version = "1.0.0";
private void Awake()
{
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
new Harmony("Systems.R00t.Advanced").PatchAll();
AssetBundle obj = AssetUtils.LoadAssetBundleFromResources("advancedassets", typeof(Main).Assembly);
Core.RegesterCards(obj.LoadAsset<GameObject>("Advanced").GetComponent<CardList>(), false);
obj.LoadAsset<GameObject>("AdvancedPhotonPool").GetComponent<PhotonPool>().Regester();
}
private void Start()
{
Cards.instance.AddCardValidationFunction((Func<Player, CardInfo, bool>)((Player player, CardInfo cardinfo) => (!UtilityExtenions.HasCard(player, "Simulacrum") || (cardinfo.allowMultiple && !Enumerable.Any<CardCategory>(Enumerable.Intersect<CardCategory>((IEnumerable<CardCategory>)(object)cardinfo.categories, (IEnumerable<CardCategory>)(object)new CardCategory[2]
{
CustomCardCategories.instance.CardCategory("GearUp_Card-Shuffle"),
CustomCardCategories.instance.CardCategory("NoPreGamePick")
})))) ? true : false));
GameModeManager.AddHook("GameStart", (Func<IGameModeHandler, IEnumerator>)GameStart);
CardStatVarHandler.VarMap.Add("Ourobors", (Func<GameObject, string>)((GameObject go) => String.Format("{0}", (object)(Oroboros.oroboros * 10))));
}
[IteratorStateMachine(/*Could not decode attribute arguments.*/)]
internal IEnumerator GameStart(IGameModeHandler gm)
{
Oroboros.oroboros = 1;
yield break;
}
}
public class Oroboros : OnAddEffect
{
internal static int oroboros = 1;
public override void OnAdd(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
CharacterStatModifiersRootData rootData = CharacterStatModifiersExtension.GetRootData(characterStats);
rootData.flatProjectileDamage += (float)(10 * oroboros);
CharacterStatModifiersRootData rootData2 = CharacterStatModifiersExtension.GetRootData(characterStats);
rootData2.flatHPboost += (float)(10 * oroboros);
}
}
internal class WitchTime : ReversibleEffect
{
public float time_remaning;
private bool running;
public override void OnStart()
{
((ReversibleEffect)this).OnStart();
base.characterStatModifiersModifier.movementSpeed_mult = 2f;
base.gravityModifier.gravityForce_mult = 4f;
base.characterStatModifiersModifier.jump_mult = 1.6f;
base.gunStatModifier.projectielSimulatonSpeed_mult = 2f;
base.gunAmmoStatModifier.reloadTimeMultiplier_mult = 0.5f;
base.gunStatModifier.attackSpeed_mult = 2f;
base.blockModifier.cdMultiplier_mult = 2f;
base.blockModifier.cdAdd_mult = 2f;
time_remaning = CharacterStatModifiersExtension.GetRootData(base.player).witchTimeDuration;
TimeHandler instance = TimeHandler.instance;
instance.baseTimeScale /= 2f;
((ReversibleEffect)this).ApplyModifiers();
running = true;
}
public override void OnUpdate()
{
((ReversibleEffect)this).OnUpdate();
if (running)
{
Core.Debug((object)time_remaning);
if (time_remaning < 0f)
{
((ReversibleEffect)this).Destroy();
}
time_remaning -= Time.deltaTime;
}
}
public override void OnOnDisable()
{
((ReversibleEffect)this).OnOnDisable();
((ReversibleEffect)this).Destroy();
}
public override void OnOnDestroy()
{
((ReversibleEffect)this).OnOnDestroy();
TimeHandler.instance.baseTimeScale = Mathf.Clamp(TimeHandler.instance.baseTimeScale * 2f, 0f, 0.85f);
}
}
}
namespace RootAdvancedCards.Patches
{
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
public class ApplyCardStatsPatches : Object
{
[HarmonyPatch("RPCA_Pick")]
[HarmonyPrefix]
public static void RPCA_Pick(ref int[] actorIDs)
{
List<int> val = Enumerable.ToList<int>((IEnumerable<int>)(object)actorIDs);
for (int i = 0; i < actorIDs.Length; i++)
{
Player playerWithActorID = PlayerManager.instance.GetPlayerWithActorID(actorIDs[i]);
if ((Object)(object)playerWithActorID != (Object)null && UtilityExtenions.HasCard(playerWithActorID, "Simulacrum"))
{
val.Add(playerWithActorID.data.view.ControllerActorNr);
}
}
actorIDs = val.ToArray();
}
[HarmonyPatch("OFFLINE_Pick")]
[HarmonyPrefix]
public static void OFFLINE_Pick(ref Player[] players)
{
List<Player> val = Enumerable.ToList<Player>((IEnumerable<Player>)(object)players);
for (int i = 0; i < players.Length; i++)
{
Player val2 = players[i];
if ((Object)(object)val2 != (Object)null && UtilityExtenions.HasCard(val2, "Simulacrum"))
{
val.Add(val2);
}
}
players = val.ToArray();
}
}
[Serializable]
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
internal class BlockPatchblocked : Object
{
private static void Prefix(Block __instance, GameObject projectile, Vector3 forward, Vector3 hitPos)
{
//IL_001c: Unknown result type (might be due to invalid IL or missing references)
//IL_0026: Expected O, but got Unknown
//IL_0035: Unknown result type (might be due to invalid IL or missing references)
//IL_003b: Expected O, but got Unknown
ProjectileHit component = projectile.GetComponent<ProjectileHit>();
Player val = (Player)Traverse.Create((object)(HealthHandler)Traverse.Create((object)__instance).Field("health").GetValue()).Field("player").GetValue();
if (CharacterStatModifiersExtension.GetRootData(val).witchTimeDuration > 0f && component.ownPlayer.teamID != val.teamID)
{
ExtensionMethods.GetOrAddComponent<WitchTime>(((Component)val).gameObject, false).time_remaning = CharacterStatModifiersExtension.GetRootData(val).witchTimeDuration;
}
}
}
[Serializable]
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
internal class DamagePatch : Object
{
[HarmonyPatch("CallTakeDamage")]
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
[HarmonyPatch("DoDamage")]
[HarmonyPatch("TakeDamageOverTime")]
[HarmonyPriority(2147483647)]
private static void Prefix(ref Player damagingPlayer)
{
if ((Object)(object)damagingPlayer != (Object)null && UtilityExtenions.HasCard(damagingPlayer, "Anonymity"))
{
damagingPlayer = null;
}
}
}
[Serializable]
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
internal class HealthHandlerPatchDie : Object
{
[CompilerGenerated]
private sealed class <>c__DisplayClass0_0 : Object
{
public int count;
internal void <RPCA_Die>b__0(Player player)
{
int num = UtilityExtenions.CardCount(player, "Ouroboros") * count * 10;
CharacterStatModifiersRootData rootData = CharacterStatModifiersExtension.GetRootData(player);
rootData.flatProjectileDamage += (float)num;
CharacterStatModifiersRootData rootData2 = CharacterStatModifiersExtension.GetRootData(player);
rootData2.flatHPboost += (float)num;
if (GameManager.instance.battleOngoing)
{
CharacterStatModifiersRootData rootData3 = CharacterStatModifiersExtension.GetRootData(player);
rootData3.tempflatHPboost += (float)num;
CharacterData data = player.data;
data.maxHealth += (float)num;
}
}
}
[HarmonyPrefix]
[HarmonyPatch("RPCA_Die")]
[HarmonyPatch("RPCA_Die_Phoenix")]
private static void RPCA_Die(HealthHandler __instance, CharacterData ___data, Player ___player)
{
if (!((Object)(object)__instance != (Object)null) || __instance.isRespawning || ___data.dead || !UtilityExtenions.HasCard(___player, "Ouroboros"))
{
return;
}
<>c__DisplayClass0_0 CS$<>8__locals0 = new <>c__DisplayClass0_0();
CS$<>8__locals0.count = UtilityExtenions.CardCount(___player, "Ouroboros");
Oroboros.oroboros += CS$<>8__locals0.count;
PlayerManager.instance.players.ForEach((Action<Player>)delegate(Player player)
{
int num = UtilityExtenions.CardCount(player, "Ouroboros") * CS$<>8__locals0.count * 10;
CharacterStatModifiersRootData rootData = CharacterStatModifiersExtension.GetRootData(player);
rootData.flatProjectileDamage += (float)num;
CharacterStatModifiersRootData rootData2 = CharacterStatModifiersExtension.GetRootData(player);
rootData2.flatHPboost += (float)num;
if (GameManager.instance.battleOngoing)
{
CharacterStatModifiersRootData rootData3 = CharacterStatModifiersExtension.GetRootData(player);
rootData3.tempflatHPboost += (float)num;
CharacterData data = player.data;
data.maxHealth += (float)num;
}
});
}
}
public class LockPlayerSize : MonoBehaviour
{
private void FixedUpdate()
{
((Component)this).GetComponentInParent<Player>().data.health = 0f;
}
}
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
internal class PlayerSizePatch : Object
{
public static void Postfix(CharacterStatModifiers __instance)
{
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
if (((Component)__instance).GetComponentInChildren<LockPlayerSize>() != null)
{
((Component)__instance).transform.localScale = Vector3.one;
__instance.data.playerVel.mass = 25f;
}
}
}
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
public class AllowedCardPatch : Object
{
private static bool CakeCheck;
private static void Postfix(Player player, CardInfo card, ref bool __result, Cards __instance)
{
if (card == null || player == null || CakeCheck)
{
return;
}
RootCardInfo val = (RootCardInfo)(object)((card is RootCardInfo) ? card : null);
if (val == null)
{
return;
}
if (val.Key == "Cake_Toggle")
{
__result = false;
}
if (val.Key.StartsWith("Cake_"))
{
if (val.Restricted && !CardManager.IsCardActive((CardInfo)(object)CardList.GetCardInfo("Cake_Toggle")))
{
__result = false;
return;
}
CakeCheck = true;
__result = __result && __instance.PlayerIsAllowedCard(player, (CardInfo)(object)CardList.GetCardInfo("Cake_Toggle"));
CakeCheck = false;
}
}
}
}
namespace RootAdvancedCards.GunEffects
{
internal class Devourer : DealtDamageEffect
{
public Hunger hunger;
public override void DealtDamage(Vector2 damage, bool selfDamage, Player damagedPlayer = null)
{
//IL_0016: Unknown result type (might be due to invalid IL or missing references)
//IL_001b: Unknown result type (might be due to invalid IL or missing references)
Core.Debug((object)hunger);
((ReversibleEffect)hunger).gunStatModifier.projectileColor = Color.white;
hunger.hungerLevel = 1;
}
}
internal class Hunger : ReversibleEffect
{
internal int hungerLevel = 1;
internal int hungerGrowth;
internal int hungerMax = 30;
public void AttackAction()
{
hungerLevel += hungerGrowth;
}
public override void OnAwake()
{
Hunger componentInChildren = ((Component)((Component)this).transform.parent).GetComponentInChildren<Hunger>();
componentInChildren.hungerGrowth++;
if ((Object)(object)componentInChildren != (Object)(object)this)
{
Object.DestroyImmediate((Object)(object)((Component)this).gameObject);
}
}
public override void OnStart()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_0028: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Expected O, but got Unknown
base.gunStatModifier.projectileColor = Color.white;
((ReversibleEffect)this).SetLivesToEffect(2147483647);
base.gun.AddAttackAction(new Action(AttackAction));
}
public override void OnOnDestroy()
{
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0017: Expected O, but got Unknown
base.gun.RemoveAttackAction(new Action(AttackAction));
}
public override void OnUpdate()
{
//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)
if ((float)hungerLevel != base.gunStatModifier.damage_mult && PlayerStatus.PlayerAliveAndSimulated(base.player))
{
hungerLevel = Mathf.Clamp(hungerLevel, 1, hungerMax);
float num = 1f - Mathf.Clamp((float)hungerLevel / (float)hungerMax, 0f, 1f);
base.gunStatModifier.projectileColor = new Color(1f, num, num);
((ReversibleEffect)this).ClearModifiers(true);
base.gunStatModifier.damage_mult = hungerLevel;
((ReversibleEffect)this).ApplyModifiers();
}
}
public override void OnOnDisable()
{
hungerLevel = 1;
}
}
internal class LethalAttacks : HitEffect
{
public override void DealtDamage(Vector2 damage, bool selfDamage, Player damagedPlayer)
{
//IL_001b: 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_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)
damagedPlayer.data.health = -100000f;
damagedPlayer.data.healthHandler.DoDamage(damage, Vector2.op_Implicit(((Component)damagedPlayer).transform.position), Color.red, (GameObject)null, (Player)null, true, true, true);
}
}
public class ShotBustBullet : MonoBehaviour
{
public static int count;
private int id;
private void Awake()
{
//IL_0021: 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_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)
id = count++;
((Component)this).transform.rotation = getShootRotation(id, 6);
Transform transform = ((Component)this).transform;
transform.position += ((Component)this).transform.forward;
if (count == 6)
{
count = 0;
}
}
private void LateUpdate()
{
if (((Component)this).GetComponent<MoveTransform>().distanceTravelled > 9f)
{
PhotonNetwork.Destroy(((Component)this).gameObject);
}
}
private Quaternion getShootRotation(int bulletID, int numOfProj)
{
//IL_0006: 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_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_0032: Unknown result type (might be due to invalid IL or missing references)
//IL_0037: Unknown result type (might be due to invalid IL or missing references)
//IL_003c: Unknown result type (might be due to invalid IL or missing references)
Vector3 forward = ((Component)this).transform.forward;
float num = (float)numOfProj * 0.05f;
float num2 = (float)bulletID * (num * 2f / (float)(numOfProj - 1)) - num;
return Quaternion.LookRotation(forward + Vector3.Cross(forward, Vector3.forward) * num2);
}
}
public class StunHit : CustomProjectileHit
{
[PunRPC]
public override void RPCA_DoCusomeHit(Vector2 hitPoint, Vector2 hitNormal, Vector2 vel, int viewID = -1, int colliderID = -1, bool wasBlocked = false)
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
//IL_0006: Expected O, but got Unknown
//IL_0025: 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_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_0019: 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_001f: 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_00c2: 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_0122: 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_0239: Unknown result type (might be due to invalid IL or missing references)
//IL_023e: Unknown result type (might be due to invalid IL or missing references)
//IL_0244: Invalid comparison between Unknown and I4
HitInfo val = new HitInfo();
if (Object.op_Implicit((Object)(object)((ProjectileHit)this).move))
{
((ProjectileHit)this).move.velocity = Vector2.op_Implicit(vel);
}
val.point = hitPoint;
val.normal = hitNormal;
val.collider = null;
if (viewID != -1)
{
PhotonView photonView = PhotonNetwork.GetPhotonView(viewID);
val.collider = ((Component)photonView).GetComponentInChildren<Collider2D>();
val.transform = ((Component)photonView).transform;
}
else if (colliderID != -1)
{
val.collider = ((Component)MapManager.instance.currentMap.Map).GetComponentsInChildren<Collider2D>()[colliderID];
val.transform = ((Component)val.collider).transform;
}
HealthHandler val2 = null;
if (Object.op_Implicit((Object)(object)val.transform))
{
val2 = ((Component)val.transform).GetComponent<HealthHandler>();
}
if (((ProjectileHit)this).isAllowedToSpawnObjects)
{
((Component)this).transform.position = Vector2.op_Implicit(val.point);
}
if (Object.op_Implicit((Object)(object)val.collider))
{
ProjectileHitSurface component = ((Component)val.collider).GetComponent<ProjectileHitSurface>();
if (Object.op_Implicit((Object)(object)component) && (int)component.HitSurface(val, ((Component)this).gameObject) == 0)
{
return;
}
}
if (Object.op_Implicit((Object)(object)val2))
{
Block component2 = ((Component)val2).GetComponent<Block>();
if (wasBlocked)
{
component2.DoBlock(((Component)this).gameObject, ((Component)this).transform.forward, Vector2.op_Implicit(val.point));
if (((ProjectileHit)this).destroyOnBlock)
{
((ProjectileHit)this).DestroyMe();
}
((ProjectileHit)this).sinceReflect = 0f;
return;
}
CharacterStatModifiers component3 = ((Component)val2).GetComponent<CharacterStatModifiers>();
if (((ProjectileHit)this).movementSlow != 0f && !wasBlocked)
{
component3.RPCA_AddSlow(((ProjectileHit)this).movementSlow, false);
}
}
if (Object.op_Implicit((Object)(object)val.transform))
{
((Component)val.transform).GetComponentInParent<PlayerVelocity>();
}
if (Object.op_Implicit((Object)(object)val.collider))
{
StunHandler componentInParent = ((Component)val.collider).GetComponentInParent<StunHandler>();
if (Object.op_Implicit((Object)(object)componentInParent))
{
if (Object.op_Implicit((Object)(object)val2) && ((ProjectileHit)this).percentageDamage != 0f)
{
((ProjectileHit)this).damage = ((ProjectileHit)this).damage + ((Component)val2).GetComponent<CharacterData>().maxHealth * ((ProjectileHit)this).percentageDamage;
}
componentInParent.AddStun(((ProjectileHit)this).damage * ((ProjectileHit)this).dealDamageMultiplierr * 0.01f + ((Component)componentInParent).GetComponent<CharacterData>().stunTime);
}
}
bool flag = false;
if (((ProjectileHit)this).effects != null && ((ProjectileHit)this).effects.Count != 0)
{
for (int i = 0; i < ((ProjectileHit)this).effects.Count; i++)
{
HasToReturn val3 = ((ProjectileHit)this).effects[i].DoHitEffect(val);
if ((int)val3 == 0)
{
flag = true;
}
if ((int)val3 == 2)
{
return;
}
}
}
if (!flag)
{
((ProjectileHit)this).deathEvent.Invoke();
((ProjectileHit)this).DestroyMe();
}
}
}
}
namespace RootAdvancedCards.CardConditions
{
public class TooSoonCondition : CardCondition
{
public override bool IsPlayerAllowedCard(Player player)
{
//IL_004c: Unknown result type (might be due to invalid IL or missing references)
//IL_0052: Expected I4, but got Unknown
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
//IL_006a: 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)
List<int> obj = Enumerable.ToList<int>(Enumerable.Distinct<int>(Enumerable.Select<Player, int>((IEnumerable<Player>)(object)PlayerManager.instance.players, (Func<Player, int>)((Player x) => x.teamID))));
int num = (int)(Int32)GameModeManager.CurrentHandler.Settings["roundsToWinGame"];
bool flag = false;
Enumerator<int> enumerator = obj.GetEnumerator();
try
{
while (enumerator.MoveNext())
{
int current = enumerator.Current;
if (GameModeManager.CurrentHandler.GetTeamScore(current).rounds == num - 1)
{
if (flag)
{
return false;
}
flag = true;
}
else if (GameModeManager.CurrentHandler.GetTeamScore(current).rounds != 0)
{
return false;
}
}
return flag;
}
finally
{
((IDisposable)enumerator).Dispose();
}
}
}
}