using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using Microsoft.CodeAnalysis;
using UnboundLib;
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: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("MadgeiosDemonicCardsPack")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("MadgeiosDemonicCardsPack")]
[assembly: AssemblyTitle("MadgeiosDemonicCardsPack")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
internal sealed class NullableAttribute : Attribute
{
public readonly byte[] NullableFlags;
public NullableAttribute(byte P_0)
{
NullableFlags = new byte[1] { P_0 };
}
public NullableAttribute(byte[] P_0)
{
NullableFlags = P_0;
}
}
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
internal sealed class NullableContextAttribute : Attribute
{
public readonly byte Flag;
public NullableContextAttribute(byte P_0)
{
Flag = P_0;
}
}
}
namespace MadgeiosDemonicCardsPack
{
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("com.madgeios.demoniccards", "Madgeios Demonic Cards", "1.1.7")]
[BepInProcess("Rounds.exe")]
public class MyMod : BaseUnityPlugin
{
private const string ModId = "com.madgeios.demoniccards";
private const string ModName = "Madgeios Demonic Cards";
private const string Version = "1.1.7";
private void Awake()
{
}
private void Start()
{
CustomCard.BuildCard<VerminCard>();
CustomCard.BuildCard<HeavyLeadCard>();
CustomCard.BuildCard<BloodRitualCard>();
}
}
public class VerminCard : CustomCard
{
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers)
{
gun.attackSpeed *= 1.25f;
gun.reloadTime *= 1.25f;
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
VerminBulletModifier orAddComponent = ExtensionMethods.GetOrAddComponent<VerminBulletModifier>(((Component)gun).gameObject, false);
orAddComponent.gun = gun;
}
public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
VerminBulletModifier component = ((Component)gun).gameObject.GetComponent<VerminBulletModifier>();
if ((Object)(object)component != (Object)null)
{
Object.Destroy((Object)(object)component);
}
}
protected override string GetTitle()
{
return "Vermin";
}
protected override string GetDescription()
{
return "Bullets twist and crawl like parasites.";
}
protected override Rarity GetRarity()
{
return (Rarity)1;
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)0;
}
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
//IL_0035: 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_0041: 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_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_005f: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[2]
{
new CardInfoStat
{
positive = false,
stat = "Attack Speed",
amount = "-25%",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = false,
stat = "Reload Time",
amount = "+25%",
simepleAmount = (SimpleAmount)0
}
};
}
public override void Callback()
{
}
protected override GameObject GetCardArt()
{
return null;
}
}
public class VerminBulletModifier : MonoBehaviour
{
public Gun gun;
private void Start()
{
if ((Object)(object)gun != (Object)null)
{
Gun obj = gun;
obj.ShootPojectileAction = (Action<GameObject>)Delegate.Combine(obj.ShootPojectileAction, new Action<GameObject>(ApplyVerminEffects));
}
}
private void ApplyVerminEffects(GameObject projectile)
{
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
//IL_006a: Unknown result type (might be due to invalid IL or missing references)
//IL_009d: Unknown result type (might be due to invalid IL or missing references)
//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)projectile == (Object)null)
{
return;
}
SpriteRenderer[] componentsInChildren = projectile.GetComponentsInChildren<SpriteRenderer>();
foreach (SpriteRenderer val in componentsInChildren)
{
val.color = Color.red;
}
Renderer[] componentsInChildren2 = projectile.GetComponentsInChildren<Renderer>();
foreach (Renderer val2 in componentsInChildren2)
{
if ((Object)(object)val2.material != (Object)null)
{
val2.material.color = Color.red;
}
}
TrailRenderer[] componentsInChildren3 = projectile.GetComponentsInChildren<TrailRenderer>();
foreach (TrailRenderer val3 in componentsInChildren3)
{
val3.startColor = Color.red;
val3.endColor = Color.red;
}
projectile.AddComponent<ReverseSneakyBehaviour>();
}
private void OnDestroy()
{
if ((Object)(object)gun != (Object)null)
{
Gun obj = gun;
obj.ShootPojectileAction = (Action<GameObject>)Delegate.Remove(obj.ShootPojectileAction, new Action<GameObject>(ApplyVerminEffects));
}
}
}
public class ReverseSneakyBehaviour : MonoBehaviour
{
private MoveTransform moveTransform;
private void Start()
{
moveTransform = ((Component)this).GetComponent<MoveTransform>();
}
private void Update()
{
//IL_001b: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: Unknown result type (might be due to invalid IL or missing references)
//IL_0025: Unknown result type (might be due to invalid IL or missing references)
//IL_003e: Unknown result type (might be due to invalid IL or missing references)
//IL_0043: Unknown result type (might be due to invalid IL or missing references)
//IL_005b: 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_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_006b: 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_0079: Unknown result type (might be due to invalid IL or missing references)
//IL_0085: Unknown result type (might be due to invalid IL or missing references)
//IL_008a: 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)
if (!((Object)(object)moveTransform == (Object)null))
{
Vector2 val = Vector2.op_Implicit(moveTransform.velocity);
if (!(((Vector2)(ref val)).magnitude < 0.01f))
{
Vector2 normalized = ((Vector2)(ref val)).normalized;
float num = 120f * Time.deltaTime;
Vector2 val2 = Vector2.op_Implicit(Quaternion.Euler(0f, 0f, num) * Vector2.op_Implicit(normalized));
moveTransform.velocity = Vector2.op_Implicit(((Vector2)(ref val2)).normalized * ((Vector2)(ref val)).magnitude);
}
}
}
}
public class HeavyLeadCard : CustomCard
{
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
gun.ammo += 2;
block.cdMultiplier *= 1.25f;
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
HeavyLeadBlockModifier orAddComponent = ExtensionMethods.GetOrAddComponent<HeavyLeadBlockModifier>(((Component)player).gameObject, false);
orAddComponent.player = player;
orAddComponent.block = block;
}
public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
HeavyLeadBlockModifier component = ((Component)player).gameObject.GetComponent<HeavyLeadBlockModifier>();
if ((Object)(object)component != (Object)null)
{
Object.Destroy((Object)(object)component);
}
}
protected override string GetTitle()
{
return "Heavy Lead";
}
protected override string GetDescription()
{
return "Blocking forces ALL active bullets to fall straight downward.";
}
protected override Rarity GetRarity()
{
return (Rarity)2;
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)3;
}
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
//IL_0035: 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_0041: 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_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_005f: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[2]
{
new CardInfoStat
{
positive = true,
stat = "Ammo",
amount = "+2",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = false,
stat = "Block Cooldown",
amount = "+25%",
simepleAmount = (SimpleAmount)0
}
};
}
public override void Callback()
{
}
protected override GameObject GetCardArt()
{
return null;
}
}
public class HeavyLeadBlockModifier : MonoBehaviour
{
public Player player;
public Block block;
private void Start()
{
if ((Object)(object)block != (Object)null)
{
Block obj = block;
obj.BlockAction = (Action<BlockTriggerType>)Delegate.Combine(obj.BlockAction, new Action<BlockTriggerType>(OnBlock));
}
}
private void OnBlock(BlockTriggerType trigger)
{
//IL_0052: 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_00d8: Unknown result type (might be due to invalid IL or missing references)
//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
//IL_0101: Unknown result type (might be due to invalid IL or missing references)
//IL_0112: Unknown result type (might be due to invalid IL or missing references)
//IL_0117: 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)
GameObject[] array = GameObject.FindGameObjectsWithTag("Bullet");
GameObject[] array2 = array;
foreach (GameObject val in array2)
{
MoveTransform component = val.GetComponent<MoveTransform>();
if ((Object)(object)component == (Object)null)
{
continue;
}
SpriteRenderer[] componentsInChildren = val.GetComponentsInChildren<SpriteRenderer>();
SpriteRenderer[] array3 = componentsInChildren;
foreach (SpriteRenderer val2 in array3)
{
val2.color = Color.red;
}
Renderer[] componentsInChildren2 = val.GetComponentsInChildren<Renderer>();
Renderer[] array4 = componentsInChildren2;
foreach (Renderer val3 in array4)
{
if ((Object)(object)val3.material != (Object)null)
{
val3.material.color = Color.red;
}
}
TrailRenderer[] componentsInChildren3 = val.GetComponentsInChildren<TrailRenderer>();
TrailRenderer[] array5 = componentsInChildren3;
foreach (TrailRenderer val4 in array5)
{
val4.startColor = Color.red;
val4.endColor = Color.red;
}
component.velocity = Vector2.op_Implicit(Vector2.down * ((Vector3)(ref component.velocity)).magnitude);
}
}
private void OnDestroy()
{
if ((Object)(object)block != (Object)null)
{
Block obj = block;
obj.BlockAction = (Action<BlockTriggerType>)Delegate.Remove(obj.BlockAction, new Action<BlockTriggerType>(OnBlock));
}
}
}
public class BloodRitualCard : CustomCard
{
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers)
{
statModifiers.health *= 0.8f;
statModifiers.movementSpeed *= 1.2f;
statModifiers.numberOfJumps++;
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
}
public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
}
protected override string GetTitle()
{
return "Blood Ritual";
}
protected override string GetDescription()
{
return "Your flesh grows lighter and unnaturally swift.";
}
protected override Rarity GetRarity()
{
return (Rarity)1;
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)0;
}
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
//IL_0035: 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_0041: 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_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_005f: Expected O, but got Unknown
//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_006d: Unknown result type (might be due to invalid IL or missing references)
//IL_0078: 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_0085: Unknown result type (might be due to invalid IL or missing references)
//IL_008b: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[3]
{
new CardInfoStat
{
positive = false,
stat = "Max HP",
amount = "-20%",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = true,
stat = "Movement Speed",
amount = "+20%",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = true,
stat = "Jumps",
amount = "+1",
simepleAmount = (SimpleAmount)0
}
};
}
public override void Callback()
{
}
protected override GameObject GetCardArt()
{
return null;
}
}
}