using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using CustomCardPack.Cards;
using CustomCardPack.Components;
using CustomCardPack.Utils;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using ModdingUtils.Utils;
using Photon.Pun;
using RarityLib.Utils;
using UnboundLib.Cards;
using UnboundLib.GameModes;
using UnityEngine;
using UnityEngine.UI;
using WillsWackyManagers.Utils;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyVersion("0.0.0.0")]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Embedded]
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace CustomCardPack
{
[BepInPlugin("com.korosaki.CustomCardPack", "CustomCardPack", "1.2.1")]
[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.*/)]
[BepInProcess("Rounds.exe")]
public class Plugin : BaseUnityPlugin
{
public const string ModId = "com.korosaki.CustomCardPack";
public const string ModName = "CustomCardPack";
public const string ModVersion = "1.2.1";
public const string ModInitials = "CustomCardPack";
private void Awake()
{
//IL_001a: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Unknown result type (might be due to invalid IL or missing references)
//IL_003e: Unknown result type (might be due to invalid IL or missing references)
RarityUtils.AddRarity("Epic", 0.05f, new Color(1f, 0.55f, 0f), new Color(0.55f, 0.3f, 0f));
new Harmony("com.korosaki.CustomCardPack").PatchAll();
}
private void Start()
{
CustomCard.BuildCard<EdenCard>();
CustomCard.BuildCard<TrainingMontageCard>();
CustomCard.BuildCard<LeoArmadaCard>();
CustomCard.BuildCard<DanielsCookingCard>();
CustomCard.BuildCard<AlessioCard>();
CustomCard.BuildCard<AlladarCard>();
CustomCard.BuildCard<HexCard>();
CustomCard.BuildCard<QueerEstateCard>();
CustomCard.BuildCard<CursedGiftCard>();
CustomCard.BuildCard<TaumanCard>();
CustomCard.BuildCard<KachowCard>();
CustomCard.BuildCard<FurryTransformationCard>();
CustomCard.BuildCard<HappyBirthdayDanielCard>((Action<CardInfo>)delegate(CardInfo cardInfo)
{
CurseManager.instance.RegisterCurse(cardInfo);
});
CustomCard.BuildCard<CatAllergyCard>((Action<CardInfo>)delegate(CardInfo cardInfo)
{
CurseManager.instance.RegisterCurse(cardInfo);
});
CustomCard.BuildCard<CheddaCard>();
CustomCard.BuildCard<DenverCard>();
CatUtils.RegisterPickCondition();
GameModeManager.AddHook("GameStart", (Func<IGameModeHandler, IEnumerator>)((IGameModeHandler gm) => ResetCats()), 100);
}
private static IEnumerator ResetCats()
{
CatUtils.ResetUnlocks();
yield break;
}
}
}
namespace CustomCardPack.Utils
{
internal static class CardArtUtils
{
private static readonly string ArtRoot = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Art");
private static readonly Dictionary<string, Sprite> SpriteCache = new Dictionary<string, Sprite>();
public static Sprite LoadSprite(string relativePath)
{
//IL_004b: Unknown result type (might be due to invalid IL or missing references)
//IL_005a: Unknown result type (might be due to invalid IL or missing references)
if (SpriteCache.TryGetValue(relativePath, out var value))
{
return value;
}
Texture2D val = LoadTexture(relativePath);
if ((Object)(object)val == (Object)null)
{
return null;
}
Sprite val2 = Sprite.Create(val, new Rect(0f, 0f, (float)((Texture)val).width, (float)((Texture)val).height), new Vector2(0.5f, 0.5f));
SpriteCache[relativePath] = val2;
return val2;
}
public static GameObject LoadCoverArt(Transform cardRoot, string relativePath, string objectName)
{
//IL_0052: Unknown result type (might be due to invalid IL or missing references)
//IL_0057: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: 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)
Texture2D val = LoadTexture(relativePath);
if ((Object)(object)val == (Object)null)
{
return null;
}
float targetAspect = FindArtAspect(cardRoot) ?? ((float)((Texture)val).width / (float)((Texture)val).height);
Rect val2 = CenteredCropRect(((Texture)val).width, ((Texture)val).height, targetAspect);
Sprite sprite = Sprite.Create(val, val2, new Vector2(0.5f, 0.5f));
return BuildArtObject(sprite, objectName, stretchToFill: true);
}
public static GameObject LoadStretchedArt(string relativePath, string objectName)
{
//IL_0031: Unknown result type (might be due to invalid IL or missing references)
//IL_0040: Unknown result type (might be due to invalid IL or missing references)
Texture2D val = LoadTexture(relativePath);
if ((Object)(object)val == (Object)null)
{
return null;
}
Sprite sprite = Sprite.Create(val, new Rect(0f, 0f, (float)((Texture)val).width, (float)((Texture)val).height), new Vector2(0.5f, 0.5f));
return BuildArtObject(sprite, objectName, stretchToFill: false);
}
private static Texture2D LoadTexture(string relativePath)
{
//IL_0029: Unknown result type (might be due to invalid IL or missing references)
//IL_002f: Expected O, but got Unknown
string path = Path.Combine(ArtRoot, relativePath);
if (!File.Exists(path))
{
return null;
}
byte[] array = File.ReadAllBytes(path);
Texture2D val = new Texture2D(2, 2);
return ImageConversion.LoadImage(val, array) ? val : null;
}
private static float? FindArtAspect(Transform cardRoot)
{
//IL_0060: Unknown result type (might be due to invalid IL or missing references)
//IL_0065: Unknown result type (might be due to invalid IL or missing references)
//IL_0090: 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_009f: Unknown result type (might be due to invalid IL or missing references)
//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)cardRoot == (Object)null)
{
return null;
}
CardVisuals componentInChildren = ((Component)cardRoot).GetComponentInChildren<CardVisuals>(true);
if ((Object)(object)componentInChildren == (Object)null)
{
return null;
}
Transform obj = ((Component)componentInChildren).transform.Find("Canvas/Front/Background/Art");
RectTransform val = (RectTransform)(object)((obj is RectTransform) ? obj : null);
if (!((Object)(object)val == (Object)null))
{
Rect rect = val.rect;
if (!(((Rect)(ref rect)).height <= 0f))
{
rect = val.rect;
float width = ((Rect)(ref rect)).width;
rect = val.rect;
return width / ((Rect)(ref rect)).height;
}
}
return null;
}
private static Rect CenteredCropRect(int width, int height, float targetAspect)
{
//IL_0051: Unknown result type (might be due to invalid IL or missing references)
//IL_0056: Unknown result type (might be due to invalid IL or missing references)
//IL_0029: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Unknown result type (might be due to invalid IL or missing references)
//IL_005a: Unknown result type (might be due to invalid IL or missing references)
float num = (float)width / (float)height;
if (num > targetAspect)
{
float num2 = (float)height * targetAspect;
float num3 = ((float)width - num2) / 2f;
return new Rect(num3, 0f, num2, (float)height);
}
float num4 = (float)width / targetAspect;
float num5 = ((float)height - num4) / 2f;
return new Rect(0f, num5, (float)width, num4);
}
private static GameObject BuildArtObject(Sprite sprite, string objectName, bool stretchToFill)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Expected O, but got Unknown
//IL_0010: Unknown result type (might be due to invalid IL or missing references)
//IL_001c: Unknown result type (might be due to invalid IL or missing references)
//IL_0028: Unknown result type (might be due to invalid IL or missing references)
//IL_0034: Unknown result type (might be due to invalid IL or missing references)
GameObject val = new GameObject(objectName);
RectTransform val2 = val.AddComponent<RectTransform>();
val2.anchorMin = Vector2.zero;
val2.anchorMax = Vector2.one;
val2.offsetMin = Vector2.zero;
val2.offsetMax = Vector2.zero;
Image val3 = val.AddComponent<Image>();
val3.sprite = sprite;
val3.preserveAspect = !stretchToFill;
Object.DontDestroyOnLoad((Object)(object)val);
return val;
}
}
internal static class CustomCategories
{
public static CardCategory Curse => CurseManager.instance.curseCategory;
public static CardCategory CurseSpawner => CurseManager.instance.curseSpawnerCategory;
}
internal static class CatUtils
{
private static readonly HashSet<string> CatCardTitles = new HashSet<string> { "Chedda", "Denver", "Furry transformation" };
private static readonly HashSet<string> LockedCatCardTitles = new HashSet<string> { "Chedda", "Denver" };
private static readonly HashSet<int> PlayersWithCatsUnlocked = new HashSet<int>();
public static bool IsCatCard(CardInfo card)
{
return (Object)(object)card != (Object)null && CatCardTitles.Contains(card.cardName);
}
public static int CountCats(CharacterData data)
{
if ((Object)(object)data == (Object)null || data.currentCards == null)
{
return 0;
}
int num = 0;
for (int i = 0; i < data.currentCards.Count; i++)
{
if (IsCatCard(data.currentCards[i]))
{
num++;
}
}
return num;
}
public static void RegisterPickCondition()
{
Cards.instance.AddCardValidationFunction((Func<Player, CardInfo, bool>)((Player player, CardInfo card) => !LockedCatCardTitles.Contains(card.cardName) || HasUnlockedCats(player)));
}
public static bool HasUnlockedCats(Player player)
{
return (Object)(object)player != (Object)null && PlayersWithCatsUnlocked.Contains(player.playerID);
}
public static void UnlockCatsFor(Player player)
{
if ((Object)(object)player != (Object)null)
{
PlayersWithCatsUnlocked.Add(player.playerID);
}
}
public static void LockCatsFor(Player player)
{
if ((Object)(object)player != (Object)null)
{
PlayersWithCatsUnlocked.Remove(player.playerID);
}
}
public static void ResetUnlocks()
{
PlayersWithCatsUnlocked.Clear();
}
}
internal static class CharacterStatUtils
{
public static void ConfigureMassAndSize(CharacterStatModifiers stats)
{
Traverse.Create((object)stats).Method("ConfigureMassAndSize", Array.Empty<object>()).GetValue();
}
}
}
namespace CustomCardPack.Patches
{
[HarmonyPatch(typeof(HealthHandler), "DoDamage")]
internal static class TaumanDamagePatch
{
private const float BonusMultiplier = 1.5f;
private static void Prefix(ref Vector2 damage, Player damagingPlayer, Player ___player)
{
//IL_0044: Unknown result type (might be due to invalid IL or missing references)
//IL_0049: Unknown result type (might be due to invalid IL or missing references)
//IL_005a: Unknown result type (might be due to invalid IL or missing references)
//IL_005f: Unknown result type (might be due to invalid IL or missing references)
//IL_0079: Unknown result type (might be due to invalid IL or missing references)
//IL_0083: Unknown result type (might be due to invalid IL or missing references)
//IL_0088: Unknown result type (might be due to invalid IL or missing references)
if (!((Object)(object)damagingPlayer == (Object)null) && !((Object)(object)___player == (Object)null) && !((Object)(object)damagingPlayer == (Object)(object)___player) && HasTauman(damagingPlayer))
{
Color color = PlayerManager.instance.GetColorFromPlayer(damagingPlayer.playerID).color;
Color color2 = PlayerManager.instance.GetColorFromPlayer(___player.playerID).color;
if (((Color)(ref color2)).grayscale < ((Color)(ref color)).grayscale)
{
damage *= 1.5f;
}
}
}
private static bool HasTauman(Player player)
{
return (Object)(object)player.data != (Object)null && player.data.currentCards != null && player.data.currentCards.Any((CardInfo c) => c.cardName == "Tauman");
}
}
}
namespace CustomCardPack.Components
{
internal sealed class AlladarShockwaveController : MonoBehaviour
{
private const float ShockwaveRadius = 8f;
private const float StunSecondsPerStack = 1f;
private const float DamagePercentOfCurrentHealth = 0.15f;
private const float VisualLifetime = 0.45f;
private const float ChordVolume = 0.45f;
private Player ownerPlayer;
private Block ownerBlock;
public int StackCount;
public void Init(Player player, Block block)
{
ownerPlayer = player;
ownerBlock = block;
block.BlockAction = (Action<BlockTriggerType>)Delegate.Combine(block.BlockAction, new Action<BlockTriggerType>(OnBlock));
}
private void OnDestroy()
{
if ((Object)(object)ownerBlock != (Object)null)
{
Block obj = ownerBlock;
obj.BlockAction = (Action<BlockTriggerType>)Delegate.Remove(obj.BlockAction, new Action<BlockTriggerType>(OnBlock));
}
}
private void OnBlock(BlockTriggerType triggerType)
{
//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_0037: Unknown result type (might be due to invalid IL or missing references)
//IL_003f: Unknown result type (might be due to invalid IL or missing references)
//IL_00c1: 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_0114: Unknown result type (might be due to invalid IL or missing references)
//IL_0119: Unknown result type (might be due to invalid IL or missing references)
//IL_011a: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)ownerPlayer == (Object)null)
{
return;
}
Vector3 position = ((Component)ownerPlayer).transform.position;
float num = 1f * (float)StackCount;
SpawnShockwaveVisual(position);
PlayShockwaveSound(position);
List<Player> players = PlayerManager.instance.players;
for (int i = 0; i < players.Count; i++)
{
Player val = players[i];
if (!((Object)(object)val == (Object)(object)ownerPlayer) && !((Object)(object)val.data == (Object)null) && !val.data.dead && val.teamID != ownerPlayer.teamID && !(Vector3.Distance(((Component)val).transform.position, position) > 8f))
{
CharacterData data = val.data;
HealthHandler component = ((Component)val).GetComponent<HealthHandler>();
data.stunHandler.AddStun(num);
float num2 = data.health * 0.15f;
((Damagable)component).TakeDamage(new Vector2(num2, 0f), Vector2.op_Implicit(position), (GameObject)null, (Player)null, true, true);
}
}
}
private void SpawnShockwaveVisual(Vector3 origin)
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000c: Expected O, but got Unknown
//IL_0012: Unknown result type (might be due to invalid IL or missing references)
GameObject val = new GameObject("AlladarShockwave");
val.transform.position = origin;
ShockwaveRing shockwaveRing = val.AddComponent<ShockwaveRing>();
shockwaveRing.Initialize(8f, 0.45f);
}
private void PlayShockwaveSound(Vector3 origin)
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000c: Expected O, but got Unknown
//IL_0012: Unknown result type (might be due to invalid IL or missing references)
GameObject val = new GameObject("AlladarShockwaveSound");
val.transform.position = origin;
AudioSource val2 = val.AddComponent<AudioSource>();
val2.spatialBlend = 0f;
val2.volume = 0.45f;
val2.clip = GuitarChord.Create();
val2.Play();
Object.Destroy((Object)(object)val, val2.clip.length);
}
}
internal sealed class ShockwaveRing : MonoBehaviour
{
private LineRenderer line;
private float radius;
private float lifetime;
private float elapsed;
public void Initialize(float targetRadius, float duration)
{
//IL_0084: Unknown result type (might be due to invalid IL or missing references)
//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
//IL_00ce: Expected O, but got Unknown
radius = targetRadius;
lifetime = duration;
line = ((Component)this).gameObject.AddComponent<LineRenderer>();
line.loop = true;
line.useWorldSpace = false;
line.positionCount = 48;
line.startWidth = 0.16f;
line.endWidth = 0.16f;
line.startColor = new Color(1f, 0.25f, 0.1f, 0.9f);
line.endColor = new Color(1f, 0.75f, 0.2f, 0.1f);
((Renderer)line).material = new Material(Shader.Find("Sprites/Default"));
}
private void Update()
{
//IL_0078: Unknown result type (might be due to invalid IL or missing references)
//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
//IL_00db: Unknown result type (might be due to invalid IL or missing references)
//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
elapsed += Time.deltaTime;
float num = Mathf.Clamp01(elapsed / lifetime);
float num2 = Mathf.Lerp(0.25f, radius, num);
for (int i = 0; i < line.positionCount; i++)
{
float num3 = (float)i * MathF.PI * 2f / (float)line.positionCount;
line.SetPosition(i, new Vector3(Mathf.Cos(num3) * num2, Mathf.Sin(num3) * num2, 0f));
}
Color val = Color.Lerp(new Color(1f, 0.25f, 0.1f, 0.9f), new Color(1f, 0.25f, 0.1f, 0f), num);
line.startColor = val;
line.endColor = val;
if (num >= 1f)
{
Object.Destroy((Object)(object)((Renderer)line).material);
Object.Destroy((Object)(object)((Component)this).gameObject);
}
}
}
internal static class GuitarChord
{
private const int SampleRate = 44100;
private const float Duration = 0.8f;
public static AudioClip Create()
{
int num = Mathf.CeilToInt(35280f);
AudioClip val = AudioClip.Create("AlladarGuitarChord", num, 1, 44100, false);
float[] array = new float[num];
float[] array2 = new float[4] { 164.81f, 246.94f, 329.63f, 415.3f };
for (int i = 0; i < num; i++)
{
float num2 = (float)i / 44100f;
float num3 = Mathf.Exp(-4.8f * num2) * Mathf.Clamp01(num2 * 220f);
float num4 = 0f;
foreach (float num5 in array2)
{
float num6 = num2 * num5 * MathF.PI * 2f;
num4 += Mathf.Sin(num6) + 0.35f * Mathf.Sin(num6 * 2f) + 0.15f * Mathf.Sin(num6 * 3f);
}
array[i] = num4 / (float)array2.Length * num3;
}
val.SetData(array, 0);
return val;
}
}
internal class CatAllergyWatcher : MonoBehaviour
{
private const float Range = 5f;
private const float DamagePerCatPerSecond = 3f;
private Player ownerPlayer;
private CharacterData ownerData;
public void Init(Player owner)
{
ownerPlayer = owner;
ownerData = owner.data;
}
private void Update()
{
//IL_0081: Unknown result type (might be due to invalid IL or missing references)
//IL_0091: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)ownerPlayer == (Object)null || (Object)(object)ownerData == (Object)null || ownerData.dead)
{
return;
}
int num = 0;
List<Player> players = PlayerManager.instance.players;
for (int i = 0; i < players.Count; i++)
{
Player val = players[i];
if (!((Object)(object)val == (Object)(object)ownerPlayer) && !((Object)(object)val.data == (Object)null) && !(Vector3.Distance(((Component)val).transform.position, ((Component)ownerPlayer).transform.position) > 5f))
{
num += CatUtils.CountCats(val.data);
}
}
if (num > 0)
{
float num2 = (float)num * 3f * TimeHandler.deltaTime;
ownerData.health = Mathf.Max(1f, ownerData.health - num2);
}
}
}
internal class HexSilenceWatcher : MonoBehaviour
{
private const float HpMultiplier = 2f;
private CharacterData data;
private ToggleStats toggleStats;
private bool wasSilenced;
private void Start()
{
data = ((Component)this).GetComponent<CharacterData>();
toggleStats = ((Component)this).gameObject.AddComponent<ToggleStats>();
toggleStats.hpMultiplier = 2f;
toggleStats.movementSpeedMultiplier = 1f;
}
private void Update()
{
if (!((Object)(object)data == (Object)null))
{
if (data.isSilenced && !wasSilenced)
{
wasSilenced = true;
toggleStats.TurnOn();
}
else if (!data.isSilenced && wasSilenced)
{
wasSilenced = false;
toggleStats.TurnOff();
}
}
}
private void OnDestroy()
{
if (wasSilenced && (Object)(object)toggleStats != (Object)null)
{
toggleStats.TurnOff();
}
if ((Object)(object)toggleStats != (Object)null)
{
Object.Destroy((Object)(object)toggleStats);
}
}
}
internal sealed class KachowCarController : MonoBehaviour
{
private const float ArrivalThreshold = 0.05f;
private const float CrashRingLifetime = 0.3f;
private Player ownerPlayer;
private Vector2 direction;
private float speed;
private float hitRadius;
private float knockbackForce;
private float flyingDuration;
private float maxLifetime;
private Vector3 targetPosition;
private float elapsed;
private readonly HashSet<Player> hitPlayers = new HashSet<Player>();
public void Initialize(Player owner, Vector3 origin, Vector3 target, float carSpeed, float carHitRadius, float carKnockbackForce, float carFlyingDuration, float carMaxLifetime, ParticleSystem visualPrefab)
{
//IL_0009: Unknown result type (might be due to invalid IL or missing references)
//IL_000a: Unknown result type (might be due to invalid IL or missing references)
//IL_0038: 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_003f: Unknown result type (might be due to invalid IL or missing references)
//IL_0044: Unknown result type (might be due to invalid IL or missing references)
//IL_0049: Unknown result type (might be due to invalid IL or missing references)
//IL_004c: Unknown result type (might be due to invalid IL or missing references)
//IL_0051: Unknown result type (might be due to invalid IL or missing references)
//IL_0057: Unknown result type (might be due to invalid IL or missing references)
//IL_005c: Unknown result type (might be due to invalid IL or missing references)
//IL_007d: 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_0090: Unknown result type (might be due to invalid IL or missing references)
//IL_006c: Unknown result type (might be due to invalid IL or missing references)
//IL_0071: Unknown result type (might be due to invalid IL or missing references)
//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
//IL_00da: 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)
ownerPlayer = owner;
targetPosition = target;
speed = carSpeed;
hitRadius = carHitRadius;
knockbackForce = carKnockbackForce;
flyingDuration = carFlyingDuration;
maxLifetime = carMaxLifetime;
Vector2 val = Vector2.op_Implicit(target) - Vector2.op_Implicit(origin);
direction = ((Vector2)(ref val)).normalized;
if (direction == Vector2.zero)
{
direction = Vector2.up;
}
((Component)this).transform.position = origin;
((Component)this).transform.right = Vector2.op_Implicit(direction);
if ((Object)(object)visualPrefab != (Object)null)
{
ParticleSystem val2 = Object.Instantiate<ParticleSystem>(visualPrefab);
((Component)val2).transform.SetParent(((Component)this).transform, false);
((Component)val2).transform.localPosition = Vector3.zero;
((Component)val2).transform.localScale = Vector3.one * (hitRadius * 2f);
val2.Play();
}
}
private void Update()
{
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_0019: Unknown result type (might be due to invalid IL or missing references)
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Unknown result type (might be due to invalid IL or missing references)
//IL_0033: Unknown result type (might be due to invalid IL or missing references)
//IL_003a: Unknown result type (might be due to invalid IL or missing references)
//IL_0040: Unknown result type (might be due to invalid IL or missing references)
//IL_006f: Unknown result type (might be due to invalid IL or missing references)
//IL_0061: Unknown result type (might be due to invalid IL or missing references)
//IL_0066: Unknown result type (might be due to invalid IL or missing references)
//IL_0067: Unknown result type (might be due to invalid IL or missing references)
//IL_0087: Unknown result type (might be due to invalid IL or missing references)
//IL_008d: Unknown result type (might be due to invalid IL or missing references)
elapsed += Time.deltaTime;
Vector3 val = Vector2.op_Implicit(direction) * speed * Time.deltaTime;
float num = Vector3.Distance(((Component)this).transform.position, targetPosition);
((Component)this).transform.position = ((((Vector3)(ref val)).magnitude >= num) ? targetPosition : (((Component)this).transform.position + val));
CheckForHits();
if (Vector3.Distance(((Component)this).transform.position, targetPosition) <= 0.05f || elapsed >= maxLifetime)
{
Crash();
}
}
private void CheckForHits()
{
//IL_008f: Unknown result type (might be due to invalid IL or missing references)
//IL_009a: Unknown result type (might be due to invalid IL or missing references)
//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
//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_00e7: 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_00f0: Unknown result type (might be due to invalid IL or missing references)
//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
//IL_0115: Unknown result type (might be due to invalid IL or missing references)
//IL_011c: Unknown result type (might be due to invalid IL or missing references)
//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)
List<Player> players = PlayerManager.instance.players;
for (int i = 0; i < players.Count; i++)
{
Player val = players[i];
if (!((Object)(object)val == (Object)(object)ownerPlayer) && !((Object)(object)val.data == (Object)null) && !val.data.dead && val.teamID != ownerPlayer.teamID && !hitPlayers.Contains(val) && !(Vector3.Distance(((Component)val).transform.position, ((Component)this).transform.position) > hitRadius))
{
hitPlayers.Add(val);
Vector2 val2 = Vector2.op_Implicit(((Component)val).transform.position) - Vector2.op_Implicit(((Component)this).transform.position);
Vector2 normalized = ((Vector2)(ref val2)).normalized;
if (normalized == Vector2.zero)
{
normalized = direction;
}
HealthHandler component = ((Component)val).GetComponent<HealthHandler>();
component.CallTakeForce(normalized * knockbackForce, (ForceMode2D)1, false, true, flyingDuration);
}
}
}
private void Crash()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000c: Expected O, but got Unknown
//IL_0018: Unknown result type (might be due to invalid IL or missing references)
GameObject val = new GameObject("KachowCarCrash");
val.transform.position = ((Component)this).transform.position;
val.AddComponent<ShockwaveRing>().Initialize(hitRadius * 2f, 0.3f);
Object.Destroy((Object)(object)((Component)this).gameObject);
}
}
internal class LeoArmadaScreenOverlay : MonoBehaviour
{
private const int CanvasSortingOrder = 50;
private const float ReferenceWidth = 1920f;
private const float ReferenceHeight = 1080f;
private static readonly Vector2 Femboy1Corner = new Vector2(1f, 0f);
private const float Femboy1HeightPx = 1512f;
private const float Femboy1XOffset = -439.68f;
private const float Femboy1YOffset = -630.72f;
private static readonly Vector2 Femboy2Corner = new Vector2(0f, 0f);
private const float Femboy2HeightPx = 972f;
private const float Femboy2XOffset = -134.4f;
private const float Femboy2YOffset = -97.200005f;
private GameObject canvasObj;
private PhotonView ownerView;
public void Init(PhotonView view)
{
ownerView = view;
}
private void Start()
{
//IL_0030: Unknown result type (might be due to invalid IL or missing references)
//IL_003a: Expected O, but got Unknown
//IL_0082: Unknown result type (might be due to invalid IL or missing references)
//IL_009f: Unknown result type (might be due to invalid IL or missing references)
//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
if (!((Object)(object)ownerView != (Object)null) || ownerView.IsMine)
{
canvasObj = new GameObject("LeoArmadaOverlayCanvas");
Object.DontDestroyOnLoad((Object)(object)canvasObj);
Canvas val = canvasObj.AddComponent<Canvas>();
val.renderMode = (RenderMode)0;
val.sortingOrder = 50;
CanvasScaler val2 = canvasObj.AddComponent<CanvasScaler>();
val2.uiScaleMode = (ScaleMode)1;
val2.referenceResolution = new Vector2(1920f, 1080f);
val2.matchWidthOrHeight = 0.5f;
AddImage("femboy2.png", Femboy2Corner, -134.4f, -97.200005f, 972f, flipHorizontal: true);
AddImage("femboy1.png", Femboy1Corner, -439.68f, -630.72f, 1512f, flipHorizontal: false);
}
}
private void OnDestroy()
{
if ((Object)(object)canvasObj != (Object)null)
{
Object.Destroy((Object)(object)canvasObj);
}
}
private void AddImage(string fileName, Vector2 corner, float xOffset, float yOffset, float heightPx, bool flipHorizontal)
{
//IL_0030: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: Expected O, but got Unknown
//IL_0056: Unknown result type (might be due to invalid IL or missing references)
//IL_005e: Unknown result type (might be due to invalid IL or missing references)
//IL_0066: Unknown result type (might be due to invalid IL or missing references)
//IL_0070: Unknown result type (might be due to invalid IL or missing references)
//IL_0075: Unknown result type (might be due to invalid IL or missing references)
//IL_007f: Unknown result type (might be due to invalid IL or missing references)
//IL_0084: Unknown result type (might be due to invalid IL or missing references)
//IL_0094: Unknown result type (might be due to invalid IL or missing references)
//IL_009f: Unknown result type (might be due to invalid IL or missing references)
//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
//IL_00cf: Expected O, but got Unknown
//IL_00ee: 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_0108: Unknown result type (might be due to invalid IL or missing references)
//IL_0115: Unknown result type (might be due to invalid IL or missing references)
//IL_013a: Unknown result type (might be due to invalid IL or missing references)
Sprite val = CardArtUtils.LoadSprite("LeoArmada\\" + fileName);
if (!((Object)(object)val == (Object)null))
{
GameObject val2 = new GameObject("LeoArmadaOverlay_" + fileName);
val2.transform.SetParent(canvasObj.transform, false);
RectTransform val3 = val2.AddComponent<RectTransform>();
val3.anchorMin = corner;
val3.anchorMax = corner;
val3.pivot = corner;
Rect rect = val.rect;
float width = ((Rect)(ref rect)).width;
rect = val.rect;
float num = heightPx * (width / ((Rect)(ref rect)).height);
val3.sizeDelta = new Vector2(num, heightPx);
float num2 = ((corner.x >= 1f) ? (0f - xOffset) : xOffset);
val3.anchoredPosition = new Vector2(num2, yOffset);
GameObject val4 = new GameObject("Visual");
val4.transform.SetParent(val2.transform, false);
RectTransform val5 = val4.AddComponent<RectTransform>();
val5.anchorMin = Vector2.zero;
val5.anchorMax = Vector2.one;
val5.offsetMin = Vector2.zero;
val5.offsetMax = Vector2.zero;
if (flipHorizontal)
{
((Transform)val5).localScale = new Vector3(-1f, 1f, 1f);
}
Image val6 = val4.AddComponent<Image>();
val6.sprite = val;
val6.preserveAspect = true;
}
}
}
}
namespace CustomCardPack.Cards
{
internal class AlessioCard : CustomCard
{
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
statModifiers.gravity = 0.65f;
statModifiers.numberOfJumps = 5;
statModifiers.movementSpeed = 0.8f;
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
}
protected override string GetTitle()
{
return "Alessio";
}
protected override string GetDescription()
{
return "BRAWL SUCKS";
}
protected override CardInfoStat[] GetStats()
{
//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_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_002b: Expected O, but got Unknown
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_0044: Unknown result type (might be due to invalid IL or missing references)
//IL_0050: Expected O, but got Unknown
//IL_0052: Unknown result type (might be due to invalid IL or missing references)
//IL_0057: Unknown result type (might be due to invalid IL or missing references)
//IL_005e: Unknown result type (might be due to invalid IL or missing references)
//IL_0069: Unknown result type (might be due to invalid IL or missing references)
//IL_0075: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[3]
{
new CardInfoStat
{
positive = true,
stat = "Gravity",
amount = "Less"
},
new CardInfoStat
{
positive = true,
stat = "Jumps",
amount = "A lot more"
},
new CardInfoStat
{
positive = false,
stat = "Movement Speed",
amount = "Less"
}
};
}
protected override Rarity GetRarity()
{
return (Rarity)1;
}
protected override GameObject GetCardArt()
{
return CardArtUtils.LoadCoverArt(((Component)this).transform, "Alessio\\alessio_card.jpg", "AlessioCardArt");
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)7;
}
public override string GetModName()
{
return "CustomCardPack";
}
}
internal class AlladarCard : CustomCard
{
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
AlladarShockwaveController alladarShockwaveController = ((Component)block).gameObject.GetComponent<AlladarShockwaveController>();
if ((Object)(object)alladarShockwaveController == (Object)null)
{
alladarShockwaveController = ((Component)block).gameObject.AddComponent<AlladarShockwaveController>();
alladarShockwaveController.Init(player, block);
}
alladarShockwaveController.StackCount++;
}
public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
AlladarShockwaveController component = ((Component)block).gameObject.GetComponent<AlladarShockwaveController>();
if (!((Object)(object)component == (Object)null))
{
component.StackCount--;
if (component.StackCount <= 0)
{
Object.Destroy((Object)(object)component);
}
}
}
protected override string GetTitle()
{
return "Alladar";
}
protected override string GetDescription()
{
return "Stop singing my ears hurt";
}
protected override CardInfoStat[] GetStats()
{
//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_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_002b: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[1]
{
new CardInfoStat
{
positive = true,
stat = "On Block",
amount = "1s stun/stack"
}
};
}
protected override Rarity GetRarity()
{
return (Rarity)2;
}
protected override GameObject GetCardArt()
{
return CardArtUtils.LoadCoverArt(((Component)this).transform, "Alladar\\alladar_card.jpg", "AlladarCardArt");
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)0;
}
public override string GetModName()
{
return "CustomCardPack";
}
}
internal class CatAllergyCard : CustomCard
{
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { CustomCategories.Curse };
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
CatAllergyWatcher catAllergyWatcher = ((Component)player).gameObject.AddComponent<CatAllergyWatcher>();
catAllergyWatcher.Init(player);
}
public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
CatAllergyWatcher component = ((Component)player).gameObject.GetComponent<CatAllergyWatcher>();
if ((Object)(object)component != (Object)null)
{
Object.Destroy((Object)(object)component);
}
}
protected override string GetTitle()
{
return "Cat allergy";
}
protected override string GetDescription()
{
return "Achoo";
}
protected override CardInfoStat[] GetStats()
{
//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_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_002b: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[1]
{
new CardInfoStat
{
positive = false,
stat = "Poison Near Cats",
amount = "10 dmg/s"
}
};
}
protected override Rarity GetRarity()
{
return (Rarity)1;
}
protected override GameObject GetCardArt()
{
return CardArtUtils.LoadCoverArt(((Component)this).transform, "CatAllergy\\cat_allergy_card.jpg", "CatAllergyCardArt");
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)4;
}
public override string GetModName()
{
return "CustomCardPack";
}
}
internal class CheddaCard : CustomCard
{
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
statModifiers.health = 0.8f;
statModifiers.movementSpeed = 1.3f;
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
}
protected override string GetTitle()
{
return "Chedda";
}
protected override string GetDescription()
{
return "Meow";
}
protected override CardInfoStat[] GetStats()
{
//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_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_002b: Expected O, but got Unknown
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_0044: Unknown result type (might be due to invalid IL or missing references)
//IL_0050: Expected O, but got Unknown
//IL_0052: Unknown result type (might be due to invalid IL or missing references)
//IL_0057: Unknown result type (might be due to invalid IL or missing references)
//IL_005e: Unknown result type (might be due to invalid IL or missing references)
//IL_0069: Unknown result type (might be due to invalid IL or missing references)
//IL_0075: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[3]
{
new CardInfoStat
{
positive = true,
stat = "Cat",
amount = "+1"
},
new CardInfoStat
{
positive = false,
stat = "Health",
amount = "A bit less"
},
new CardInfoStat
{
positive = true,
stat = "Movement Speed",
amount = "Cat-like"
}
};
}
protected override Rarity GetRarity()
{
return (Rarity)2;
}
protected override GameObject GetCardArt()
{
return CardArtUtils.LoadCoverArt(((Component)this).transform, "Chedda\\chedda_card.jpg", "CheddaCardArt");
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)6;
}
public override string GetModName()
{
return "CustomCardPack";
}
}
internal class CursedGiftCard : CustomCard
{
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { CustomCategories.CurseSpawner };
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
CurseManager.instance.CursePlayer(player);
}
protected override string GetTitle()
{
return "Gamble gift";
}
protected override string GetDescription()
{
return "Open it";
}
protected override CardInfoStat[] GetStats()
{
//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_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_002b: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[1]
{
new CardInfoStat
{
positive = false,
stat = "Gift",
amount = "Random"
}
};
}
protected override Rarity GetRarity()
{
return (Rarity)2;
}
protected override GameObject GetCardArt()
{
return CardArtUtils.LoadCoverArt(((Component)this).transform, "CursedGift\\cursed_gift_card.jpg", "CursedGiftCardArt");
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)4;
}
public override string GetModName()
{
return "CustomCardPack";
}
}
internal class DanielsCookingCard : CustomCard
{
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
statModifiers.regen = 5f;
statModifiers.health = 1.1f;
statModifiers.movementSpeed = 0.9f;
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
}
protected override string GetTitle()
{
return "Daniel's Cooking";
}
protected override string GetDescription()
{
return "Delicious, but salty";
}
protected override CardInfoStat[] GetStats()
{
//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_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_002b: Expected O, but got Unknown
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_0044: Unknown result type (might be due to invalid IL or missing references)
//IL_0050: Expected O, but got Unknown
//IL_0052: Unknown result type (might be due to invalid IL or missing references)
//IL_0057: Unknown result type (might be due to invalid IL or missing references)
//IL_005e: Unknown result type (might be due to invalid IL or missing references)
//IL_0069: Unknown result type (might be due to invalid IL or missing references)
//IL_0075: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[3]
{
new CardInfoStat
{
positive = true,
stat = "HP Regen",
amount = "+5/s"
},
new CardInfoStat
{
positive = true,
stat = "Health",
amount = "+10%"
},
new CardInfoStat
{
positive = false,
stat = "Movement Speed",
amount = "-10%"
}
};
}
protected override Rarity GetRarity()
{
return (Rarity)1;
}
protected override GameObject GetCardArt()
{
return null;
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)6;
}
public override string GetModName()
{
return "CustomCardPack";
}
}
internal class DenverCard : CustomCard
{
private const float FlatHealthBonus = 250f;
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
statModifiers.movementSpeed = 0.25f;
gun.damage = 1.75f;
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
data.maxHealth += 250f;
data.health += 250f;
CharacterStatUtils.ConfigureMassAndSize(characterStats);
}
protected override string GetTitle()
{
return "Denver";
}
protected override string GetDescription()
{
return "Fat fuck";
}
protected override CardInfoStat[] GetStats()
{
//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_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_002b: Expected O, but got Unknown
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_0044: Unknown result type (might be due to invalid IL or missing references)
//IL_0050: Expected O, but got Unknown
//IL_0052: Unknown result type (might be due to invalid IL or missing references)
//IL_0057: Unknown result type (might be due to invalid IL or missing references)
//IL_005e: Unknown result type (might be due to invalid IL or missing references)
//IL_0069: Unknown result type (might be due to invalid IL or missing references)
//IL_0075: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[3]
{
new CardInfoStat
{
positive = true,
stat = "Health",
amount = "FAT"
},
new CardInfoStat
{
positive = false,
stat = "Movement Speed",
amount = "SLOW ASF"
},
new CardInfoStat
{
positive = true,
stat = "Damage",
amount = "MEATY"
}
};
}
protected override Rarity GetRarity()
{
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
return RarityUtils.GetRarity("Epic");
}
protected override GameObject GetCardArt()
{
return CardArtUtils.LoadCoverArt(((Component)this).transform, "Denver\\denver_card.jpg", "DenverCardArt");
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)6;
}
public override string GetModName()
{
return "CustomCardPack";
}
}
internal class EdenCard : CustomCard
{
private const float ImmobileSpeed = 0f;
private const float SpeedWithQueerEstate = 0.15f;
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
gun.ammo = 20;
block.cdMultiplier = 0.7f;
gun.attackSpeed = 0.4f;
gun.reloadTime = 0f;
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
bool flag = data.currentCards.Any((CardInfo c) => c.cardName == "The queer estate");
characterStats.movementSpeed = (flag ? 0.15f : 0f);
}
protected override string GetTitle()
{
return "Eden";
}
protected override string GetDescription()
{
return "I love staying home";
}
protected override CardInfoStat[] GetStats()
{
//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_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_002b: Expected O, but got Unknown
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_0044: Unknown result type (might be due to invalid IL or missing references)
//IL_0050: Expected O, but got Unknown
//IL_0052: Unknown result type (might be due to invalid IL or missing references)
//IL_0057: Unknown result type (might be due to invalid IL or missing references)
//IL_005e: Unknown result type (might be due to invalid IL or missing references)
//IL_0069: Unknown result type (might be due to invalid IL or missing references)
//IL_0075: Expected O, but got Unknown
//IL_0077: 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_0083: Unknown result type (might be due to invalid IL or missing references)
//IL_008e: Unknown result type (might be due to invalid IL or missing references)
//IL_009a: Expected O, but got Unknown
//IL_009c: Unknown result type (might be due to invalid IL or missing references)
//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
//IL_00a8: 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_00bf: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[5]
{
new CardInfoStat
{
positive = false,
stat = "Movement Speed",
amount = "NO"
},
new CardInfoStat
{
positive = true,
stat = "Bullets",
amount = "+20"
},
new CardInfoStat
{
positive = true,
stat = "Block Cooldown",
amount = "-30%"
},
new CardInfoStat
{
positive = true,
stat = "Attack Speed",
amount = "+60%"
},
new CardInfoStat
{
positive = true,
stat = "Reload Time",
amount = "NO"
}
};
}
protected override Rarity GetRarity()
{
return (Rarity)2;
}
protected override GameObject GetCardArt()
{
return CardArtUtils.LoadCoverArt(((Component)this).transform, "Eden\\eden_card.jpg", "EdenCardArt");
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)2;
}
public override string GetModName()
{
return "CustomCardPack";
}
}
internal class FurryTransformationCard : CustomCard
{
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
statModifiers.movementSpeed = 1.6f;
statModifiers.jump = 1.2f;
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
}
protected override string GetTitle()
{
return "Furry transformation";
}
protected override string GetDescription()
{
return "Ximena would be proud";
}
protected override CardInfoStat[] GetStats()
{
//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_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_002b: Expected O, but got Unknown
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_0044: Unknown result type (might be due to invalid IL or missing references)
//IL_0050: Expected O, but got Unknown
//IL_0052: Unknown result type (might be due to invalid IL or missing references)
//IL_0057: Unknown result type (might be due to invalid IL or missing references)
//IL_005e: Unknown result type (might be due to invalid IL or missing references)
//IL_0069: Unknown result type (might be due to invalid IL or missing references)
//IL_0075: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[3]
{
new CardInfoStat
{
positive = true,
stat = "Cats",
amount = "+1"
},
new CardInfoStat
{
positive = true,
stat = "Movement Speed",
amount = "FURRY"
},
new CardInfoStat
{
positive = true,
stat = "Jump Height",
amount = "+20%"
}
};
}
protected override Rarity GetRarity()
{
return (Rarity)2;
}
protected override GameObject GetCardArt()
{
return null;
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)6;
}
public override string GetModName()
{
return "CustomCardPack";
}
}
internal class HappyBirthdayDanielCard : CustomCard
{
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { CustomCategories.Curse };
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
data.health = Mathf.Max(1f, data.health - 50f);
}
protected override string GetTitle()
{
return "Happy birthday Daniel!";
}
protected override string GetDescription()
{
return "You're getting Unc";
}
protected override CardInfoStat[] GetStats()
{
//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_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_002b: Expected O, but got Unknown
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_0044: Unknown result type (might be due to invalid IL or missing references)
//IL_0050: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[2]
{
new CardInfoStat
{
positive = true,
stat = "Birthday",
amount = "+1"
},
new CardInfoStat
{
positive = false,
stat = "Health",
amount = "-50"
}
};
}
protected override Rarity GetRarity()
{
return (Rarity)0;
}
protected override GameObject GetCardArt()
{
return CardArtUtils.LoadCoverArt(((Component)this).transform, "HappyBirthdayDaniel\\happy_birthday_daniel_card.jpg", "HappyBirthdayDanielCardArt");
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)4;
}
public override string GetModName()
{
return "CustomCardPack";
}
}
internal class HexCard : CustomCard
{
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
gun.damage = 1.6f;
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
((Component)player).gameObject.AddComponent<HexSilenceWatcher>();
}
public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
HexSilenceWatcher component = ((Component)player).gameObject.GetComponent<HexSilenceWatcher>();
if ((Object)(object)component != (Object)null)
{
Object.Destroy((Object)(object)component);
}
}
protected override string GetTitle()
{
return "Hex";
}
protected override string GetDescription()
{
return "When silenced, you gain 100% more hp";
}
protected override CardInfoStat[] GetStats()
{
//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_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_002b: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[1]
{
new CardInfoStat
{
positive = true,
stat = "Damage",
amount = "+60%"
}
};
}
protected override Rarity GetRarity()
{
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
return RarityUtils.GetRarity("Epic");
}
protected override GameObject GetCardArt()
{
return null;
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)4;
}
public override string GetModName()
{
return "CustomCardPack";
}
}
internal class KachowCard : CustomCard
{
private const float SearchRadius = 12f;
private const float CarSpeed = 22f;
private const float CarHitRadius = 1.3f;
private const float KnockbackForce = 60f;
private const float FlyingDuration = 1f;
private const float CarMaxLifetime = 2f;
private Player ownerPlayer;
private Block ownerBlock;
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
ownerPlayer = player;
ownerBlock = block;
block.BlockAction = (Action<BlockTriggerType>)Delegate.Combine(block.BlockAction, new Action<BlockTriggerType>(OnBlock));
}
public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
block.BlockAction = (Action<BlockTriggerType>)Delegate.Remove(block.BlockAction, new Action<BlockTriggerType>(OnBlock));
}
private void OnBlock(BlockTriggerType triggerType)
{
//IL_0021: Unknown result type (might be due to invalid IL or missing references)
//IL_0026: Unknown result type (might be due to invalid IL or missing references)
//IL_0028: Unknown result type (might be due to invalid IL or missing references)
//IL_0044: Unknown result type (might be due to invalid IL or missing references)
//IL_004a: Expected O, but got Unknown
//IL_0058: Unknown result type (might be due to invalid IL or missing references)
//IL_005f: Unknown result type (might be due to invalid IL or missing references)
if (!((Object)(object)ownerPlayer == (Object)null))
{
Vector3 position = ((Component)ownerPlayer).transform.position;
Player val = FindNearestEnemy(position);
if (!((Object)(object)val == (Object)null))
{
GameObject val2 = new GameObject("KachowCar");
KachowCarController kachowCarController = val2.AddComponent<KachowCarController>();
kachowCarController.Initialize(ownerPlayer, position, ((Component)val).transform.position, 22f, 1.3f, 60f, 1f, 2f, GetVisualPrefab());
}
}
}
private Player FindNearestEnemy(Vector3 originPos)
{
//IL_007f: Unknown result type (might be due to invalid IL or missing references)
//IL_0084: Unknown result type (might be due to invalid IL or missing references)
Player result = null;
float num = 12f;
List<Player> players = PlayerManager.instance.players;
for (int i = 0; i < players.Count; i++)
{
Player val = players[i];
if (!((Object)(object)val == (Object)(object)ownerPlayer) && !((Object)(object)val.data == (Object)null) && !val.data.dead && val.teamID != ownerPlayer.teamID)
{
float num2 = Vector3.Distance(((Component)val).transform.position, originPos);
if (!(num2 > num))
{
result = val;
num = num2;
}
}
}
return result;
}
private ParticleSystem GetVisualPrefab()
{
return ownerBlock?.blockedPart;
}
protected override string GetTitle()
{
return "Kachow";
}
protected override string GetDescription()
{
return "Block summons a car that speeds at the nearest enemy and knocks them back a lot";
}
protected override CardInfoStat[] GetStats()
{
//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_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_002b: Expected O, but got Unknown
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_0044: Unknown result type (might be due to invalid IL or missing references)
//IL_0050: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[2]
{
new CardInfoStat
{
positive = true,
stat = "Block Knockback",
amount = "Massive"
},
new CardInfoStat
{
positive = true,
stat = "Block Knockback: Range",
amount = "Large"
}
};
}
protected override Rarity GetRarity()
{
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
return RarityUtils.GetRarity("Epic");
}
protected override GameObject GetCardArt()
{
return null;
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)1;
}
public override string GetModName()
{
return "CustomCardPack";
}
}
internal class LeoArmadaCard : CustomCard
{
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
gun.damage = 2f;
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
LeoArmadaScreenOverlay leoArmadaScreenOverlay = ((Component)player).gameObject.AddComponent<LeoArmadaScreenOverlay>();
leoArmadaScreenOverlay.Init(data.view);
}
public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
LeoArmadaScreenOverlay component = ((Component)player).gameObject.GetComponent<LeoArmadaScreenOverlay>();
if ((Object)(object)component != (Object)null)
{
Object.Destroy((Object)(object)component);
}
}
public override void Callback()
{
AddSideImage("femboy1.png", -220f);
AddSideImage("femboy2.png", 220f);
}
private void AddSideImage(string fileName, float xOffset)
{
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_0033: Expected O, but got Unknown
//IL_0058: 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)
Sprite val = CardArtUtils.LoadSprite("LeoArmada\\" + fileName);
if (!((Object)(object)val == (Object)null))
{
GameObject val2 = new GameObject("LeoArmada_" + fileName);
val2.transform.SetParent(((Component)this).transform, false);
RectTransform val3 = val2.AddComponent<RectTransform>();
val3.sizeDelta = new Vector2(80f, 80f);
val3.anchoredPosition = new Vector2(xOffset, 0f);
Image val4 = val2.AddComponent<Image>();
val4.sprite = val;
val4.preserveAspect = true;
}
}
protected override string GetTitle()
{
return "Leo Armada";
}
protected override string GetDescription()
{
return "Streamer mode";
}
protected override CardInfoStat[] GetStats()
{
//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_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_002b: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[1]
{
new CardInfoStat
{
positive = true,
stat = "Damage",
amount = "+100%"
}
};
}
protected override Rarity GetRarity()
{
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
return RarityUtils.GetRarity("Epic");
}
protected override GameObject GetCardArt()
{
return CardArtUtils.LoadCoverArt(((Component)this).transform, "LeoArmada\\leo_card.jpg", "LeoArmadaCardArt");
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)8;
}
public override string GetModName()
{
return "CustomCardPack";
}
}
internal class QueerEstateCard : CustomCard
{
private const float SpeedWithEden = 0.15f;
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
cardInfo.allowMultiple = false;
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
CatUtils.UnlockCatsFor(player);
if (data.currentCards.Any((CardInfo c) => c.cardName == "Eden"))
{
characterStats.movementSpeed = 0.15f;
}
}
public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
CatUtils.LockCatsFor(player);
}
protected override string GetTitle()
{
return "The queer estate";
}
protected override string GetDescription()
{
return "RELEASE THE BABIES";
}
protected override CardInfoStat[] GetStats()
{
//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_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_002b: Expected O, but got Unknown
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_0044: Unknown result type (might be due to invalid IL or missing references)
//IL_0050: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[2]
{
new CardInfoStat
{
positive = true,
stat = "Cats",
amount = "Unlocked"
},
new CardInfoStat
{
positive = true,
stat = "Eden Synergy",
amount = "A bit of movement speed"
}
};
}
protected override Rarity GetRarity()
{
return (Rarity)2;
}
protected override GameObject GetCardArt()
{
return null;
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)8;
}
public override string GetModName()
{
return "CustomCardPack";
}
}
internal class TaumanCard : CustomCard
{
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
}
protected override string GetTitle()
{
return "Tauman";
}
protected override string GetDescription()
{
return "BUFFS RACISM";
}
protected override CardInfoStat[] GetStats()
{
//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_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_002b: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[1]
{
new CardInfoStat
{
positive = true,
stat = "Damage vs Darker-Colored Players",
amount = "+50%"
}
};
}
protected override Rarity GetRarity()
{
return (Rarity)2;
}
protected override GameObject GetCardArt()
{
return null;
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)2;
}
public override string GetModName()
{
return "CustomCardPack";
}
}
internal class TrainingMontageCard : CustomCard
{
private const float DamageIncreasePerCopy = 0.2f;
private const float HealthIncreasePerCopy = 0.1f;
private static readonly Dictionary<Player, int> CopiesByPlayer = new Dictionary<Player, int>();
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
int value;
int num = ((!CopiesByPlayer.TryGetValue(player, out value)) ? 1 : (value + 1));
CopiesByPlayer[player] = num;
gun.damage = 1f + 0.2f * (float)num;
characterStats.health = 1f + 0.1f * (float)num;
}
public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
if (CopiesByPlayer.TryGetValue(player, out var value))
{
value--;
if (value <= 0)
{
CopiesByPlayer.Remove(player);
return;
}
CopiesByPlayer[player] = value;
gun.damage = 1f + 0.2f * (float)value;
characterStats.health = 1f + 0.1f * (float)value;
}
}
protected override string GetTitle()
{
return "Training Montage";
}
protected override string GetDescription()
{
return "GET THOSE GAINS";
}
protected override CardInfoStat[] GetStats()
{
//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_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[1]
{
new CardInfoStat
{
positive = true,
stat = "GET STRONGER EVERY PICK"
}
};
}
protected override Rarity GetRarity()
{
return (Rarity)0;
}
protected override GameObject GetCardArt()
{
return null;
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)1;
}
public override string GetModName()
{
return "CustomCardPack";
}
}
}