using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using ModdingUtils.Utils;
using ModsPlus;
using RarityLib.Utils;
using UnboundLib.Cards;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyCompany("JohnathanAgainBecauseTheFirstOneSucked")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("JohnathanAgainBecauseTheFirstOneSucked")]
[assembly: AssemblyTitle("JohnathanAgainBecauseTheFirstOneSucked")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.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;
}
}
}
public class Basketball : CustomCard
{
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0012: Unknown result type (might be due to invalid IL or missing references)
gun.projectileSize = 5f;
gun.projectileColor = Color.red;
gun.damage = 20f;
gun.ammo = 100;
gun.reloadTime = 0.1f;
gun.attackSpeed /= 100f;
gun.projectileSpeed *= 100f;
}
protected override string GetTitle()
{
return "basketball";
}
protected override string GetDescription()
{
return "swag";
}
protected override GameObject GetCardArt()
{
return null;
}
protected override Rarity GetRarity()
{
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
return RarityUtils.GetRarity("Divine");
}
protected override CardInfoStat[] GetStats()
{
//IL_0009: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: Unknown result type (might be due to invalid IL or missing references)
//IL_002b: Unknown result type (might be due to invalid IL or missing references)
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_0033: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[1]
{
new CardInfoStat
{
positive = true,
stat = "",
amount = "",
simepleAmount = (SimpleAmount)0
}
};
}
protected override CardThemeColorType GetTheme()
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
return (CardThemeColorType)3;
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
Debug.Log("added!");
}
public override string GetModName()
{
return "JohnathanAgainBecauseTheFirstOneSucked";
}
}
public static class CardRegistry
{
private static Dictionary<Type, CardInfo> storedCardInfo = new Dictionary<Type, CardInfo>();
public static void RegisterCard<T>(bool hidden = false) where T : CustomCard
{
CustomCard.BuildCard<T>((Action<CardInfo>)delegate(CardInfo c)
{
StoreCard<T>(c);
if (hidden)
{
Cards.instance.AddHiddenCard(c);
}
});
}
private static void StoreCard<T>(CardInfo card) where T : CustomCard
{
storedCardInfo.Add(typeof(T), card);
}
public static CardInfo GetCard<T>() where T : CustomCard
{
CardInfo value;
return storedCardInfo.TryGetValue(typeof(T), out value) ? value : null;
}
public static CardInfo GetCard(Type T)
{
CardInfo value;
return storedCardInfo.TryGetValue(T, out value) ? value : null;
}
}
public class BIG : CustomCard
{
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
statModifiers.sizeMultiplier += 5f;
}
protected override string GetTitle()
{
return "BIG";
}
protected override string GetDescription()
{
return "big guy";
}
protected override GameObject GetCardArt()
{
return null;
}
protected override Rarity GetRarity()
{
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
return RarityUtils.GetRarity("Epic");
}
protected override CardInfoStat[] GetStats()
{
//IL_0009: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: Unknown result type (might be due to invalid IL or missing references)
//IL_002b: Unknown result type (might be due to invalid IL or missing references)
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_0033: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[1]
{
new CardInfoStat
{
positive = true,
stat = "",
amount = "",
simepleAmount = (SimpleAmount)0
}
};
}
protected override CardThemeColorType GetTheme()
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
return (CardThemeColorType)3;
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
Debug.Log("added!");
}
public override string GetModName()
{
return "JohnathanAgainBecauseTheFirstOneSucked";
}
}
public class BlockTeleport : CustomEffectCard<JumpscareEffect>
{
public override CardDetails<JumpscareEffect> Details => new CardDetails<JumpscareEffect>
{
Title = "jumpscare",
Description = "jumpscare your friends!",
ModName = "JohnathanAgainBecauseTheFirstOneSucked",
Art = null,
Rarity = RarityUtils.GetRarity("Epic"),
Theme = (CardThemeColorType)3
};
}
public class TeleportationEffect : CardEffect
{
public override void OnBulletHit(GameObject projectile, HitInfo hit)
{
//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)
Player ownPlayer = projectile.GetComponent<ProjectileHit>().ownPlayer;
((Component)ownPlayer).GetComponentInParent<PlayerCollision>().IgnoreWallForFrames(2);
((Component)ownPlayer).transform.position = Vector2.op_Implicit(hit.point);
}
}
public class JumpscareEffect : CardEffect
{
public override void OnBlock(BlockTriggerType blockTriggerType)
{
//IL_005a: Unknown result type (might be due to invalid IL or missing references)
Player[] array = PlayerManager.instance.players.ToArray();
bool flag = true;
Player[] array2 = array;
foreach (Player val in array2)
{
if ((Object)(object)val != (Object)(object)((CardEffect)this).player && flag)
{
((Component)((CardEffect)this).player).GetComponentInParent<PlayerCollision>().IgnoreWallForFrames(2);
((Component)((CardEffect)this).player).transform.position = ((Component)val).transform.position;
flag = false;
}
}
}
}
public class MoveEffect : CardEffect
{
private bool CanTeleport = false;
public override void OnBlock(BlockTriggerType blockTriggerType)
{
CanTeleport = !CanTeleport;
}
public override void OnBulletHit(GameObject projectile, HitInfo hit)
{
//IL_005e: Unknown result type (might be due to invalid IL or missing references)
//IL_0063: Unknown result type (might be due to invalid IL or missing references)
if (!CanTeleport)
{
return;
}
Player[] array = PlayerManager.instance.players.ToArray();
Player[] array2 = array;
foreach (Player val in array2)
{
if ((Object)(object)val != (Object)(object)((CardEffect)this).player && CanTeleport)
{
((Component)val).GetComponentInParent<PlayerCollision>().IgnoreWallForFrames(2);
((Component)val).transform.position = Vector2.op_Implicit(hit.point);
CanTeleport = false;
}
}
}
}
public class HideEffect : CardEffect
{
public override void OnBlock(BlockTriggerType blockTriggerType)
{
//IL_0028: Unknown result type (might be due to invalid IL or missing references)
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
((Component)((CardEffect)this).player).GetComponentInParent<PlayerCollision>().IgnoreWallForFrames(2);
((Component)((CardEffect)this).player).transform.position = MainCam.instance.cam.ScreenToWorldPoint(Input.mousePosition);
}
}
public class SwapEffect : CardEffect
{
public override void OnBlock(BlockTriggerType blockTriggerType)
{
//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_007d: Unknown result type (might be due to invalid IL or missing references)
//IL_008f: Unknown result type (might be due to invalid IL or missing references)
Player[] array = PlayerManager.instance.players.ToArray();
bool flag = true;
Player[] array2 = array;
foreach (Player val in array2)
{
if ((Object)(object)val != (Object)(object)((CardEffect)this).player && flag)
{
Vector3 position = ((Component)((CardEffect)this).player).transform.position;
((Component)((CardEffect)this).player).GetComponentInParent<PlayerCollision>().IgnoreWallForFrames(2);
((Component)val).GetComponentInParent<PlayerCollision>().IgnoreWallForFrames(2);
((Component)((CardEffect)this).player).transform.position = ((Component)val).transform.position;
((Component)val).transform.position = position;
flag = false;
}
}
}
}
public class BirdEffect : CardEffect
{
public override void OnBlock(BlockTriggerType blockTriggerType)
{
CharacterStatModifiers componentInParent = ((Component)((CardEffect)this).player).GetComponentInParent<CharacterStatModifiers>();
Gravity componentInParent2 = ((Component)((CardEffect)this).player).GetComponentInParent<Gravity>();
componentInParent2.gravityForce *= -1f;
componentInParent.jump *= -1f;
componentInParent.sizeMultiplier *= -1f;
componentInParent.numberOfJumps *= 10;
}
}
public class swap : CustomEffectCard<SwapEffect>
{
public override CardDetails<SwapEffect> Details
{
get
{
//IL_0038: Unknown result type (might be due to invalid IL or missing references)
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
//IL_0060: Unknown result type (might be due to invalid IL or missing references)
//IL_006b: Unknown result type (might be due to invalid IL or missing references)
//IL_0077: Expected O, but got Unknown
CardDetails<SwapEffect> val = new CardDetails<SwapEffect>();
val.Title = "swap";
val.Description = "swap";
val.ModName = "JohnathanAgainBecauseTheFirstOneSucked";
val.Art = null;
val.Rarity = RarityUtils.GetRarity("Epic");
val.Theme = (CardThemeColorType)3;
val.Stats = (CardInfoStat[])(object)new CardInfoStat[1]
{
new CardInfoStat
{
positive = true,
stat = "Swap",
amount = "Swap"
}
};
return val;
}
}
}
public class Perspective : CustomCard
{
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
}
protected override string GetTitle()
{
return "Perspective";
}
protected override string GetDescription()
{
return "Gain a whole new perspective.";
}
protected override GameObject GetCardArt()
{
return null;
}
protected override Rarity GetRarity()
{
return (Rarity)1;
}
protected override CardInfoStat[] GetStats()
{
//IL_0009: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: Unknown result type (might be due to invalid IL or missing references)
//IL_002c: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[1]
{
new CardInfoStat
{
positive = true,
stat = "Perspective",
amount = "+New "
}
};
}
protected override CardThemeColorType GetTheme()
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
return (CardThemeColorType)3;
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
gravity.gravityForce *= -1f;
characterStats.jump *= -1f;
characterStats.sizeMultiplier *= -1f;
characterStats.numberOfJumps *= 2;
}
public override string GetModName()
{
return "JohnathanAgainBecauseTheFirstOneSucked";
}
}
[BepInPlugin("com.johnathan.rounds.mod", "JohnathanAgainBecauseTheFirstOneSucked", "1.1.0")]
[BepInProcess("Rounds.exe")]
public class JohnathanAgainBecauseTheFirstOneSuckedPlugin : BaseUnityPlugin
{
private const string ModId = "com.johnathan.rounds.mod";
private const string ModName = "JohnathanAgainBecauseTheFirstOneSucked";
private const string ModVersion = "1.1.0";
private const string CompatabilityModName = "JohnathanAgainBecauseTheFirstOneSucked";
private void Awake()
{
CardRegistry.RegisterCard<BlockTeleportation>(hidden: false);
CardRegistry.RegisterCard<Johnathan>();
CardRegistry.RegisterCard<swap>(hidden: false);
CardRegistry.RegisterCard<hide>(hidden: false);
CardRegistry.RegisterCard<Basketball>();
CardRegistry.RegisterCard<Bird>(hidden: false);
CardRegistry.RegisterCard<no>();
CardRegistry.RegisterCard<bombs>();
CardRegistry.RegisterCard<teleportation>(hidden: false);
CardRegistry.RegisterCard<Perspective>();
CardRegistry.RegisterCard<BIG>();
CardRegistry.RegisterCard<BlockTeleport>(hidden: false);
}
private void Start()
{
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
new Harmony("com.johnathan.rounds.mod").PatchAll();
}
}
public class Johnathan : CustomCard
{
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
gun.reloadTime = 0f;
}
protected override string GetTitle()
{
return "50% of fps games";
}
protected override string GetDescription()
{
return "most fps games have this issue lmao";
}
protected override GameObject GetCardArt()
{
return null;
}
protected override Rarity GetRarity()
{
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
return RarityUtils.GetRarity("Divine");
}
protected override CardInfoStat[] GetStats()
{
//IL_0009: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: Unknown result type (might be due to invalid IL or missing references)
//IL_002b: Unknown result type (might be due to invalid IL or missing references)
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_0033: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[1]
{
new CardInfoStat
{
positive = true,
stat = "",
amount = "",
simepleAmount = (SimpleAmount)0
}
};
}
protected override CardThemeColorType GetTheme()
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
return (CardThemeColorType)3;
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
Debug.Log("added!");
}
public override string GetModName()
{
return "JohnathanAgainBecauseTheFirstOneSucked";
}
}
public class BlockTeleportation : CustomEffectCard<MoveEffect>
{
public override CardDetails<MoveEffect> Details => new CardDetails<MoveEffect>
{
Title = "m o v e",
Description = "unfunny description i know. block to toggle, shoot an area to teleport an enemy there. untoggles after teleportation. toggle stays between rounds. off by default.",
ModName = "JohnathanAgainBecauseTheFirstOneSucked",
Art = null,
Rarity = RarityUtils.GetRarity("Epic"),
Theme = (CardThemeColorType)3
};
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
block.cooldown = 8f;
}
}
public class hide : CustomEffectCard<HideEffect>
{
public override CardDetails<HideEffect> Details => new CardDetails<HideEffect>
{
Title = "hide",
Description = "attempts to teleport you to your mouse position",
ModName = "JohnathanAgainBecauseTheFirstOneSucked",
Art = null,
Rarity = RarityUtils.GetRarity("Rare"),
Theme = (CardThemeColorType)4
};
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
block.cooldown = 10f;
}
}
public class Bird : CustomEffectCard<BirdEffect>
{
public override CardDetails<BirdEffect> Details
{
get
{
//IL_0038: Unknown result type (might be due to invalid IL or missing references)
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
//IL_0060: Unknown result type (might be due to invalid IL or missing references)
//IL_006b: Unknown result type (might be due to invalid IL or missing references)
//IL_0077: Expected O, but got Unknown
CardDetails<BirdEffect> val = new CardDetails<BirdEffect>();
val.Title = "Bird";
val.Description = " Block to toggle bird ";
val.ModName = "JohnathanAgainBecauseTheFirstOneSucked";
val.Art = null;
val.Rarity = RarityUtils.GetRarity("Legendary");
val.Theme = (CardThemeColorType)3;
val.Stats = (CardInfoStat[])(object)new CardInfoStat[1]
{
new CardInfoStat
{
positive = true,
stat = "Bird",
amount = "+1"
}
};
return val;
}
}
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
block.cooldown = 0.5f;
}
}
public class bombs : CustomCard
{
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
//IL_0017: Unknown result type (might be due to invalid IL or missing references)
List<ObjectsToSpawn> list = gun.objectsToSpawn.ToList();
ObjectsToSpawn item = ((GameObject)Resources.Load("0 cards/Timed Detonation")).GetComponent<Gun>().objectsToSpawn[0];
list.Add(item);
gun.objectsToSpawn = list.ToArray();
gun.numberOfProjectiles = 6;
gun.spread += 1f;
}
protected override string GetTitle()
{
return "b o m b";
}
protected override string GetDescription()
{
return "b o m b s";
}
protected override GameObject GetCardArt()
{
return null;
}
protected override Rarity GetRarity()
{
return (Rarity)2;
}
protected override CardInfoStat[] GetStats()
{
//IL_0009: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: Unknown result type (might be due to invalid IL or missing references)
//IL_002b: Unknown result type (might be due to invalid IL or missing references)
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_0033: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[1]
{
new CardInfoStat
{
positive = true,
stat = "B O M B S",
amount = "+BOMBS",
simepleAmount = (SimpleAmount)0
}
};
}
protected override CardThemeColorType GetTheme()
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
return (CardThemeColorType)3;
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
Debug.Log("added!");
}
public override string GetModName()
{
return "JohnathanAgainBecauseTheFirstOneSucked";
}
}
public class no : CustomCard
{
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
block.cdMultiplier -= 0.99f;
block.cooldown = 0f;
}
protected override string GetTitle()
{
return "no.";
}
protected override string GetDescription()
{
return "simply just say no!";
}
protected override GameObject GetCardArt()
{
return null;
}
protected override Rarity GetRarity()
{
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
return RarityUtils.GetRarity("Legendary");
}
protected override CardInfoStat[] GetStats()
{
//IL_0009: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: Unknown result type (might be due to invalid IL or missing references)
//IL_002b: Unknown result type (might be due to invalid IL or missing references)
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_0033: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[1]
{
new CardInfoStat
{
positive = true,
stat = "",
amount = "",
simepleAmount = (SimpleAmount)0
}
};
}
protected override CardThemeColorType GetTheme()
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
return (CardThemeColorType)3;
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
Debug.Log("added!");
}
public override string GetModName()
{
return "JohnathanAgainBecauseTheFirstOneSucked";
}
}
public class teleportation : CustomEffectCard<TeleportationEffect>
{
public override CardDetails<TeleportationEffect> Details => new CardDetails<TeleportationEffect>
{
Title = "teleportation",
Description = "be very, very careful with this one.",
ModName = "JohnathanAgainBecauseTheFirstOneSucked",
Art = null,
Rarity = RarityUtils.GetRarity("Epic"),
Theme = (CardThemeColorType)3
};
}