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;
using HarmonyLib;
using Jotunn.Utils;
using Microsoft.CodeAnalysis;
using ModdingUtils.Utils;
using Nullmanager;
using PickPhaseImprovements;
using RarityLib.Utils;
using RootCore;
using UnboundLib;
using UnboundLib.GameModes;
using UnboundLib.Networking;
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("1.2.3.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 RootNulledCards
{
public class DeNuller : OnAddEffect
{
[CompilerGenerated]
private sealed class <>c__DisplayClass0_0 : Object
{
public CharacterData data;
public DeNuller <>4__this;
public Player player;
internal void <OnAdd>b__0()
{
List<CardInfo> currentCards = data.currentCards;
List<int> val = new List<int>();
List<CardInfo> val2 = new List<CardInfo>();
for (int i = 0; i < currentCards.Count; i++)
{
CardInfo obj = currentCards[i];
NullCardInfo val3 = (NullCardInfo)(object)((obj is NullCardInfo) ? obj : null);
if (val3 != null)
{
val.Add(i);
val2.Add(val3.NulledSorce);
}
}
((MonoBehaviour)Unbound.Instance).StartCoroutine(<>4__this.ReplaceCards(player, val.ToArray(), val2.ToArray()));
}
}
[CompilerGenerated]
private sealed class <ReplaceCards>d__1 : Object, IEnumerator<object>, IEnumerator, IDisposable
{
private int <>1__state;
private object <>2__current;
public Player player;
public int[] indeces;
public CardInfo[] newCards;
public string[] twoLetterCodes;
public bool editCardBar;
public DeNuller <>4__this;
private List<bool> <reassign>5__1;
private List<CardInfo> <list>5__2;
private List<CardInfo> <newCardsToAssign>5__3;
private List<string> <twoLetterCodesToAssign>5__4;
private int <num>5__5;
private int <i>5__6;
private Enumerator<CardInfo> <>s__7;
private CardInfo <currentCard>5__8;
private int <j>5__9;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <ReplaceCards>d__1(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<reassign>5__1 = null;
<list>5__2 = null;
<newCardsToAssign>5__3 = null;
<twoLetterCodesToAssign>5__4 = null;
<currentCard>5__8 = null;
<>1__state = -2;
}
private bool MoveNext()
{
//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
//IL_0291: Unknown result type (might be due to invalid IL or missing references)
//IL_029b: Expected O, but got Unknown
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
if (twoLetterCodes == null)
{
twoLetterCodes = (string[])(object)new String[indeces.Length];
<i>5__6 = 0;
while (<i>5__6 < twoLetterCodes.Length)
{
twoLetterCodes[<i>5__6] = "";
<i>5__6++;
}
}
<reassign>5__1 = new List<bool>();
<list>5__2 = new List<CardInfo>();
<>s__7 = player.data.currentCards.GetEnumerator();
try
{
while (<>s__7.MoveNext())
{
<currentCard>5__8 = <>s__7.Current;
<list>5__2.Add(<currentCard>5__8);
<currentCard>5__8 = null;
}
}
finally
{
((IDisposable)<>s__7).Dispose();
}
<newCardsToAssign>5__3 = new List<CardInfo>();
<twoLetterCodesToAssign>5__4 = new List<string>();
<num>5__5 = 0;
<j>5__9 = 0;
while (<j>5__9 < <list>5__2.Count)
{
if (!Enumerable.Contains<int>((IEnumerable<int>)(object)indeces, <j>5__9))
{
<newCardsToAssign>5__3.Add(<list>5__2[<j>5__9]);
<twoLetterCodesToAssign>5__4.Add("");
<reassign>5__1.Add(true);
}
else if ((Object)(object)newCards[<num>5__5] == (Object)null)
{
<newCardsToAssign>5__3.Add(<list>5__2[<j>5__9]);
<twoLetterCodesToAssign>5__4.Add("");
<num>5__5++;
<reassign>5__1.Add(true);
}
else
{
<newCardsToAssign>5__3.Add(newCards[<num>5__5]);
<twoLetterCodesToAssign>5__4.Add(twoLetterCodes[<num>5__5]);
<num>5__5++;
<reassign>5__1.Add(false);
}
<j>5__9++;
}
Cards.instance.RemoveAllCardsFromPlayer(player, editCardBar);
<>2__current = (object)new WaitForSecondsRealtime(0.1f);
<>1__state = 1;
return true;
case 1:
<>1__state = -1;
if (editCardBar)
{
CardBarUtils.instance.ClearCardBar(player);
}
Cards.instance.AddCardsToPlayer(player, <newCardsToAssign>5__3.ToArray(), <reassign>5__1.ToArray(), <twoLetterCodesToAssign>5__4.ToArray(), (float[])null, (float[])null, editCardBar);
return false;
}
}
[DebuggerHidden]
void IEnumerator.Reset()
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
throw new NotSupportedException();
}
}
public override void OnAdd(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
//IL_002a: Unknown result type (might be due to invalid IL or missing references)
//IL_0034: Expected O, but got Unknown
<>c__DisplayClass0_0 CS$<>8__locals0 = new <>c__DisplayClass0_0();
CS$<>8__locals0.data = data;
CS$<>8__locals0.<>4__this = this;
CS$<>8__locals0.player = player;
ExtensionMethods.ExecuteAfterFrames((MonoBehaviour)(object)Core.instance, 2, (Action)delegate
{
List<CardInfo> currentCards = CS$<>8__locals0.data.currentCards;
List<int> val = new List<int>();
List<CardInfo> val2 = new List<CardInfo>();
for (int i = 0; i < currentCards.Count; i++)
{
CardInfo obj = currentCards[i];
NullCardInfo val3 = (NullCardInfo)(object)((obj is NullCardInfo) ? obj : null);
if (val3 != null)
{
val.Add(i);
val2.Add(val3.NulledSorce);
}
}
((MonoBehaviour)Unbound.Instance).StartCoroutine(CS$<>8__locals0.<>4__this.ReplaceCards(CS$<>8__locals0.player, val.ToArray(), val2.ToArray()));
});
}
[IteratorStateMachine(/*Could not decode attribute arguments.*/)]
public IEnumerator ReplaceCards(Player player, int[] indeces, CardInfo[] newCards, string[] twoLetterCodes = null, bool editCardBar = true)
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return (IEnumerator)(object)new <ReplaceCards>d__1(0)
{
<>4__this = this,
player = player,
indeces = indeces,
newCards = newCards,
twoLetterCodes = twoLetterCodes,
editCardBar = editCardBar
};
}
}
public class DistillAcquisition : MonoBehaviour
{
}
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("Systems.R00t.Nulls", "Nulled Cards", "1.2.3")]
[BepInProcess("Rounds.exe")]
public class Main : BaseUnityPlugin
{
[CompilerGenerated]
private sealed class <PointEnd>d__5 : Object, IEnumerator<object>, IEnumerator, IDisposable
{
private int <>1__state;
private object <>2__current;
public IGameModeHandler gm;
public Main <>4__this;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <PointEnd>d__5(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<>1__state = -2;
}
private bool MoveNext()
{
if (<>1__state != 0)
{
return false;
}
<>1__state = -1;
Enumerable.ToList<Player>((IEnumerable<Player>)(object)PlayerManager.instance.players).ForEach((Action<Player>)delegate(Player player)
{
CharacterStatModifiersExtension.AjustNulls(player.data.stats, CharacterStatModifiersExtension.GetRootData(player).nullsPerPoint);
});
return false;
}
[DebuggerHidden]
void IEnumerator.Reset()
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
throw new NotSupportedException();
}
}
private const string ModId = "Systems.R00t.Nulls";
private const string ModName = "Nulled Cards";
public const string Version = "1.2.3";
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("Systems.R00t.Nulls");
val.PatchAll();
Core.RegesterCards(AssetUtils.LoadAssetBundleFromResources("nullcardassets", typeof(Main).Assembly).LoadAsset<GameObject>("Nulled").GetComponent<CardList>(), false);
}
private void Start()
{
NullManager.instance.RegesterOnAddCallback((Action<NullCardInfo, Player>)OnNullAdd);
GameModeManager.AddHook("PointEnd", (Func<IGameModeHandler, IEnumerator>)PointEnd);
Cards.instance.AddCardValidationFunction((Func<Player, CardInfo, bool>)((Player p, CardInfo c) => !((Object)(object)c == (Object)(object)CardList.GetCardInfo("Integraty")) || Enumerable.Any<CardInfo>((IEnumerable<CardInfo>)(object)p.data.currentCards, (Func<CardInfo, bool>)((CardInfo c2) => c2 is NullCardInfo))));
}
[IteratorStateMachine(/*Could not decode attribute arguments.*/)]
internal IEnumerator PointEnd(IGameModeHandler gm)
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return (IEnumerator)(object)new <PointEnd>d__5(0)
{
<>4__this = this,
gm = gm
};
}
internal void OnNullAdd(NullCardInfo card, Player player)
{
//IL_0115: Unknown result type (might be due to invalid IL or missing references)
Gun component = ((Component)((Component)player).GetComponent<Holding>().holdable).GetComponent<Gun>();
GunAmmo componentInChildren = ((Component)component).GetComponentInChildren<GunAmmo>();
CharacterData component2 = ((Component)player).GetComponent<CharacterData>();
HealthHandler component3 = ((Component)player).GetComponent<HealthHandler>();
Gravity component4 = ((Component)player).GetComponent<Gravity>();
Block component5 = ((Component)player).GetComponent<Block>();
CharacterStatModifiers component6 = ((Component)player).GetComponent<CharacterStatModifiers>();
component2.maxHealth *= CharacterStatModifiersExtension.GetRootData(component6).nullData.Health_multiplier;
component6.movementSpeed *= CharacterStatModifiersExtension.GetRootData(component6).nullData.MovmentSpeed_multiplier;
component6.lifeSteal += CharacterStatModifiersExtension.GetRootData(component6).nullData.Lifesteal;
component5.cdMultiplier *= CharacterStatModifiersExtension.GetRootData(component6).nullData.block_cdMultiplier;
component.damage *= CharacterStatModifiersExtension.GetRootData(component6).nullData.Damage_multiplier;
component.reflects += CharacterStatModifiersExtension.GetRootData(component6).nullData.gun_Reflects;
componentInChildren.maxAmmo += CharacterStatModifiersExtension.GetRootData(component6).nullData.gun_Ammo;
if (RarityUtils.GetRarityData(((CardInfo)card).rarity).relativeRarity <= RarityUtils.GetRarityData((Rarity)2).relativeRarity)
{
component6.respawns += CharacterStatModifiersExtension.GetRootData(component6).nullData.Revives;
}
}
}
public class PowerDistillation : OnAddEffect
{
[CompilerGenerated]
private sealed class <>c__DisplayClass1_0 : Object
{
public Player player;
}
[CompilerGenerated]
private sealed class <>c__DisplayClass1_1 : Object
{
public float time;
public int cardCount;
public CardInfo randomCard;
public <>c__DisplayClass1_0 CS$<>8__locals1;
internal bool <addRandomCards>b__0()
{
time += Time.deltaTime;
return CS$<>8__locals1.player.data.currentCards.Count > cardCount || (Object)(object)CS$<>8__locals1.player.data.currentCards[CS$<>8__locals1.player.data.currentCards.Count - 1] == (Object)(object)randomCard || time > 5f;
}
}
[CompilerGenerated]
private sealed class <addRandomCards>d__1 : Object, IEnumerator<object>, IEnumerator, IDisposable
{
private int <>1__state;
private object <>2__current;
public Player player;
public Gun gun;
public GunAmmo gunAmmo;
public CharacterData data;
public HealthHandler health;
public Gravity gravity;
public Block block;
public CharacterStatModifiers characterStats;
public PowerDistillation <>4__this;
private <>c__DisplayClass1_0 <>8__1;
private int <i>5__2;
private <>c__DisplayClass1_1 <>8__3;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <addRandomCards>d__1(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<>8__1 = null;
<>8__3 = null;
<>1__state = -2;
}
private bool MoveNext()
{
//IL_0183: Unknown result type (might be due to invalid IL or missing references)
//IL_018d: Expected O, but got Unknown
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
<>8__1 = new <>c__DisplayClass1_0();
<>8__1.player = player;
<>2__current = null;
<>1__state = 1;
return true;
case 1:
<>1__state = -1;
<i>5__2 = 0;
break;
case 2:
<>1__state = -1;
<>8__3 = null;
<i>5__2++;
break;
}
if (<i>5__2 < 2)
{
<>8__3 = new <>c__DisplayClass1_1();
<>8__3.CS$<>8__locals1 = <>8__1;
<>8__3.randomCard = Cards.instance.NORARITY_GetRandomCardWithCondition(<>8__3.CS$<>8__locals1.player, gun, gunAmmo, data, health, gravity, block, characterStats, (Func<CardInfo, Player, Gun, GunAmmo, CharacterData, HealthHandler, Gravity, Block, CharacterStatModifiers, bool>)<>4__this.condition, 1000);
if ((Object)(object)<>8__3.randomCard == (Object)null)
{
<>8__3.randomCard = CardChoiceSpawnUniqueCardPatch.NullCard;
}
<>8__3.cardCount = Enumerable.Count<CardInfo>((IEnumerable<CardInfo>)(object)<>8__3.CS$<>8__locals1.player.data.currentCards);
UtilityExtenions.GiveCard(<>8__3.CS$<>8__locals1.player, <>8__3.randomCard);
<>8__3.time = 0f;
<>2__current = (object)new WaitUntil((Func<bool>)delegate
{
<>8__3.time += Time.deltaTime;
return <>8__3.CS$<>8__locals1.player.data.currentCards.Count > <>8__3.cardCount || (Object)(object)<>8__3.CS$<>8__locals1.player.data.currentCards[<>8__3.CS$<>8__locals1.player.data.currentCards.Count - 1] == (Object)(object)<>8__3.randomCard || <>8__3.time > 5f;
});
<>1__state = 2;
return true;
}
return false;
}
[DebuggerHidden]
void IEnumerator.Reset()
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
throw new NotSupportedException();
}
}
public override void OnAdd(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
((MonoBehaviour)Core.instance).StartCoroutine(addRandomCards(player, gun, gunAmmo, data, health, gravity, block, characterStats));
}
[IteratorStateMachine(/*Could not decode attribute arguments.*/)]
public IEnumerator addRandomCards(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return (IEnumerator)(object)new <addRandomCards>d__1(0)
{
<>4__this = this,
player = player,
gun = gun,
gunAmmo = gunAmmo,
data = data,
health = health,
gravity = gravity,
block = block,
characterStats = characterStats
};
}
public bool condition(CardInfo card, Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Invalid comparison between Unknown and I4
return (int)card.rarity == 2 && !Enumerable.Any<CardCategory>(Enumerable.Intersect<CardCategory>((IEnumerable<CardCategory>)(object)card.categories, (IEnumerable<CardCategory>)(object)Core.NoLotteryCategories)) && (Object)(object)card != (Object)(object)CardList.GetCardInfo("Integraty");
}
}
}
namespace RootNulledCards.Patches
{
[Serializable]
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
internal class CardChoicePatchIDoEndPick : Object
{
[CompilerGenerated]
private sealed class <>c__DisplayClass0_0 : Object
{
public CardChoice __instance;
internal bool <Prefix>b__0(Player p)
{
return p.playerID == __instance.pickrID;
}
}
[CompilerGenerated]
private sealed class <>c__DisplayClass1_0 : Object
{
public CardChoice __instance;
internal bool <GrabCard>b__0(Player p)
{
return p.playerID == __instance.pickrID;
}
}
[CompilerGenerated]
private sealed class <>c__DisplayClass2_0 : Object
{
public int playerID;
internal bool <GiveNulls>b__0(Player p)
{
return p.playerID == playerID;
}
}
[CompilerGenerated]
private sealed class <GrabCard>d__1 : Object, IEnumerator<object>, IEnumerator, IDisposable
{
private int <>1__state;
private object <>2__current;
public GameObject card;
public float speed;
public CardChoice __instance;
private <>c__DisplayClass1_0 <>8__1;
private Vector3 <startPos>5__2;
private Vector3 <endPos>5__3;
private float <c2>5__4;
private Vector3 <position>5__5;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <GrabCard>d__1(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<>8__1 = null;
<>1__state = -2;
}
private bool MoveNext()
{
//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
//IL_00ca: 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_00ed: 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_0113: Unknown result type (might be due to invalid IL or missing references)
//IL_0118: Unknown result type (might be due to invalid IL or missing references)
//IL_0129: Unknown result type (might be due to invalid IL or missing references)
//IL_017a: Unknown result type (might be due to invalid IL or missing references)
//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_018a: Unknown result type (might be due to invalid IL or missing references)
//IL_018d: Unknown result type (might be due to invalid IL or missing references)
//IL_0197: Unknown result type (might be due to invalid IL or missing references)
//IL_019c: Unknown result type (might be due to invalid IL or missing references)
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
<>8__1 = new <>c__DisplayClass1_0();
<>8__1.__instance = __instance;
if (PlayerManager.instance.players.Find((Predicate<Player>)((Player p) => p.playerID == <>8__1.__instance.pickrID)).data.view.IsMine)
{
card.GetComponentInChildren<ApplyCardStats>().Pick(<>8__1.__instance.pickrID, false, <>8__1.__instance.pickerType);
}
<startPos>5__2 = card.transform.position;
<endPos>5__3 = ((Component)CardChoiceVisuals.instance).transform.position;
<c2>5__4 = 0f;
break;
case 1:
<>1__state = -1;
break;
}
if (<c2>5__4 < 1f)
{
CardChoiceVisuals.instance.framesToSnap = 1;
<position>5__5 = Vector3.LerpUnclamped(<startPos>5__2, <endPos>5__3, <>8__1.__instance.curve.Evaluate(<c2>5__4));
card.transform.position = <position>5__5;
<c2>5__4 += Time.deltaTime * speed;
<>2__current = null;
<>1__state = 1;
return true;
}
Vector3 val = <startPos>5__2 - <endPos>5__3;
GamefeelManager.GameFeel(Vector2.op_Implicit(((Vector3)(ref val)).normalized * 2f));
card.GetComponentInChildren<CardVisuals>().Leave();
card.GetComponentInChildren<CardVisuals>().Pick();
return false;
}
[DebuggerHidden]
void IEnumerator.Reset()
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
throw new NotSupportedException();
}
}
public static void Prefix(CardChoice __instance, ref List<GameObject> ___spawnedCards, ref GameObject pickedCard, ref float ___speed)
{
<>c__DisplayClass0_0 CS$<>8__locals0 = new <>c__DisplayClass0_0();
CS$<>8__locals0.__instance = __instance;
if ((Object)(object)pickedCard == (Object)null || !((Object)(object)pickedCard.GetComponent<DistillAcquisition>() != (Object)null))
{
return;
}
for (int i = 0; i < ___spawnedCards.Count; i++)
{
if (Object.op_Implicit((Object)(object)___spawnedCards[i]) && (Object)(object)___spawnedCards[i].gameObject != (Object)(object)pickedCard)
{
((MonoBehaviour)CS$<>8__locals0.__instance).StartCoroutine(GrabCard(___spawnedCards[i], ___speed, CS$<>8__locals0.__instance));
}
}
if (PlayerManager.instance.players.Find((Predicate<Player>)((Player p) => p.playerID == CS$<>8__locals0.__instance.pickrID)).data.view.IsMine)
{
NetworkingManager.RPC(typeof(CardChoicePatchIDoEndPick), "GiveNulls", (object[])(object)new Object[2]
{
(object)CS$<>8__locals0.__instance.pickrID,
(object)(___spawnedCards.Count - 1)
});
}
___spawnedCards.Clear();
___spawnedCards.Add(pickedCard);
}
[IteratorStateMachine(/*Could not decode attribute arguments.*/)]
private static IEnumerator GrabCard(GameObject card, float speed, CardChoice __instance)
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return (IEnumerator)(object)new <GrabCard>d__1(0)
{
card = card,
speed = speed,
__instance = __instance
};
}
[UnboundRPC]
public static void GiveNulls(int playerID, int amount)
{
<>c__DisplayClass2_0 CS$<>8__locals0 = new <>c__DisplayClass2_0();
CS$<>8__locals0.playerID = playerID;
CharacterStatModifiersExtension.AjustNulls(PlayerManager.instance.players.Find((Predicate<Player>)((Player p) => p.playerID == CS$<>8__locals0.playerID)).data.stats, (int)((float)amount * 3.5f));
}
}
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
[HarmonyAfter(new string[] { "Systems.R00t.CoreModual" })]
internal class ApplyCardStatsPatch : Object
{
private static void Prefix(ApplyCardStats __instance, Player ___playerToUpgrade)
{
//IL_006e: Unknown result type (might be due to invalid IL or missing references)
if (CharacterStatModifiersExtension.GetRootData(___playerToUpgrade).knowledge > 0)
{
if (((Component)__instance).GetComponent<CardInfo>().sourceCard is NullCardInfo || ((Component)__instance).GetComponent<CardInfo>() is NullCardInfo)
{
CharacterStatModifiersRootData rootData = CharacterStatModifiersExtension.GetRootData(___playerToUpgrade);
rootData.knowledge--;
}
else
{
CharacterStatModifiersExtension.AjustNulls(___playerToUpgrade.data.stats, (int)Mathf.Ceil(0.5f + (float)NullManager.instance.GetNullValue(((Component)__instance).GetComponent<CardInfo>().rarity) * 1.5f));
}
}
}
private static void Postfix(ApplyCardStats __instance, Player ___playerToUpgrade)
{
if (CharacterStatModifiersExtension.GetRootData(___playerToUpgrade).knowledge > 0)
{
PickManager.QueueShuffleForPicker(___playerToUpgrade, 0, false, (Func<CardInfo, bool>)((CardInfo card) => CardInfoExtension.IsNullable(card) && !CardInfoExtension.IsAntiCard(card) && (Object)(object)card != (Object)(object)CardList.GetCardInfo("Null_Knowledge")));
}
}
}
}