using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using HarmonyLib;
using Jotunn.Utils;
using Microsoft.CodeAnalysis;
using UnboundLib.Cards;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(/*Could not decode attribute arguments.*/)]
[assembly: TargetFramework(".NETFramework,Version=v4.7.1", FrameworkDisplayName = ".NET Framework 4.7.1")]
[assembly: 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(/*Could not decode attribute arguments.*/)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace NEG.UltraCards
{
public sealed class ParticleAcceleratorCard : CustomCard
{
private const int BOUNCES = 12;
private const float DAMAGEMULTIPLIERPERBOUNCE = 1.15f;
private const float SPEEDMULTIPLIERPERBOUNCE = 1.05f;
private const float RELOADTIMEADDITIVE = 2.5f;
private const float ATTACKSPEEDMULTIPLIER = 0.85f;
private const float MOVEMENTSPEEDMULTIPLIER = 0.85f;
private const float VISUALDAMAGEPERCENT = 15f;
private const float VISUALSPEEDPERCENT = 4.9999924f;
public override void SetupCard(CardInfo _cardInfo, Gun _gun, ApplyCardStats _cardStats, CharacterStatModifiers _statModifiers, Block _block)
{
_gun.reflects = 12;
_gun.dmgMOnBounce = 1.15f;
_gun.speedMOnBounce = 1.05f;
_gun.reloadTimeAdd = 2.5f;
_statModifiers.attackSpeedMultiplier = 0.85f;
_statModifiers.movementSpeed = 0.85f;
Debug.Log((object)String.Concat("[UC][Card] ", ((CustomCard)this).GetTitle(), " has been setup."));
}
public override void OnAddCard(Player _player, Gun _gun, GunAmmo _gunAmmo, CharacterData _data, HealthHandler _health, Gravity _gravity, Block _block, CharacterStatModifiers _characterStats)
{
if (UltraCardsEntry.AcceleratorForceOneMaxAmmo.Value)
{
_gunAmmo.maxAmmo = 1;
}
Debug.Log((object)String.Format("[{0}][Card] {1} has been added to player {2}.", (object)"UC", (object)((CustomCard)this).GetTitle(), (object)_player.playerID));
}
public override void OnRemoveCard(Player _player, Gun _gun, GunAmmo _gunAmmo, CharacterData _data, HealthHandler _health, Gravity _gravity, Block _block, CharacterStatModifiers _characterStats)
{
Debug.Log((object)String.Format("[{0}][Card] {1} has been removed from player {2}.", (object)"UC", (object)((CustomCard)this).GetTitle(), (object)_player.playerID));
}
protected override GameObject GetCardArt()
{
return null;
}
protected override string GetDescription()
{
return "Your bullets now increase in damage and speed per bounce.";
}
protected override Rarity GetRarity()
{
return (Rarity)2;
}
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_002b: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: 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_003e: Expected O, but got Unknown
//IL_0040: Unknown result type (might be due to invalid IL or missing references)
//IL_0045: 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_0066: 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_0073: Unknown result type (might be due to invalid IL or missing references)
//IL_0079: Expected O, but got Unknown
//IL_007b: Unknown result type (might be due to invalid IL or missing references)
//IL_0080: 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_00a1: Unknown result type (might be due to invalid IL or missing references)
//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
//IL_00b4: Expected O, but got Unknown
//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
//IL_00dc: 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_00e9: Unknown result type (might be due to invalid IL or missing references)
//IL_00ef: Expected O, but got Unknown
//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
//IL_00fd: 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_0122: Unknown result type (might be due to invalid IL or missing references)
//IL_0124: Unknown result type (might be due to invalid IL or missing references)
//IL_012a: Expected O, but got Unknown
//IL_012c: Unknown result type (might be due to invalid IL or missing references)
//IL_0131: Unknown result type (might be due to invalid IL or missing references)
//IL_0138: Unknown result type (might be due to invalid IL or missing references)
//IL_0152: Unknown result type (might be due to invalid IL or missing references)
//IL_015d: Unknown result type (might be due to invalid IL or missing references)
//IL_015f: Unknown result type (might be due to invalid IL or missing references)
//IL_0165: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[6]
{
new CardInfoStat
{
positive = true,
amount = String.Format("+{0} Bounces", (object)12),
stat = "Bounces",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = true,
amount = String.Format("+{0:n0}%/Bounce", (object)15f),
stat = "Damage",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = true,
amount = String.Format("+{0:n0}%/Bounce", (object)4.9999924f),
stat = "Bullet Speed",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = false,
amount = String.Format("+{0:n2} Seconds", (object)2.5f),
stat = "Reload Time",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = false,
amount = String.Format("-{0:n0}%", (object)85f),
stat = "Attack Speed",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = false,
amount = String.Format("-{0:n0}%", (object)85f),
stat = "Move Speed",
simepleAmount = (SimpleAmount)0
}
};
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)1;
}
protected override string GetTitle()
{
return "Particle Accelerator";
}
public override string GetModName()
{
return "UC";
}
}
public sealed class RailGunCard : CustomCard
{
private const int DAMAGEMULTIPLIER = 10;
private const float PROJECTILESPEEDMULTIPLIER = 50f;
private const float RECOILMULTIPLIER = 1.8f;
private const float RELOADTIMEADDITIVE = 2.5f;
private static readonly GameObject railObjectAsset = UltraCardsEntry.UltraCardsAssets.LoadAsset<GameObject>("A_RailDrillAmmo");
private static readonly RayHitDrill railObjectDrill = railObjectAsset.GetComponent<RayHitDrill>();
public override void SetupCard(CardInfo _cardInfo, Gun _gun, ApplyCardStats _cardStats, CharacterStatModifiers _statModifiers, Block _block)
{
//IL_00db: Unknown result type (might be due to invalid IL or missing references)
//IL_00e0: 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_00ea: 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_00fc: Unknown result type (might be due to invalid IL or missing references)
//IL_0108: Expected O, but got Unknown
Debug.Log((object)String.Concat("Rail Object Asset: ", ((Object)railObjectAsset).name));
_gun.useCharge = true;
_gun.chargeSpeedTo = 1.2f;
_gun.chargeRecoilTo = 1.5f;
_gun.chargeDamageMultiplier = 1.5f;
_gun.damageAfterDistanceMultiplier = 0.9f;
_gun.damage = 10f;
_gun.recoil = 1.8f;
_gun.bodyRecoil = 2f;
_gun.recoilMuiltiplier = 1.05f;
_gun.shake = 1.2f;
_gun.reflects = 0;
_gun.projectileSpeed = 50f;
_gun.gravity = 1.005f;
_gun.drag = 1.01f;
_gun.knockback = 1.75f;
_gun.lockGunToDefault = true;
_gun.reloadTimeAdd = 2.5f;
_gun.unblockable = true;
_gun.bulletDamageMultiplier = 1.25f;
_gun.projectileColor = Color.red;
ObjectsToSpawn val = new ObjectsToSpawn
{
numberOfSpawns = 1,
AddToProjectile = railObjectAsset,
scaleStackM = 0.8f
};
_gun.objectsToSpawn = (ObjectsToSpawn[])(object)new ObjectsToSpawn[1] { val };
Debug.Log((object)String.Concat("[UC][Card] ", ((CustomCard)this).GetTitle(), " has been setup."));
}
public override void OnAddCard(Player _player, Gun _gun, GunAmmo _gunAmmo, CharacterData _data, HealthHandler _health, Gravity _gravity, Block _block, CharacterStatModifiers _characterStats)
{
_gunAmmo.maxAmmo = 1;
Debug.Log((object)String.Format("[{0}][Card] {1} has been added to player {2}.", (object)"UC", (object)((CustomCard)this).GetTitle(), (object)_player.playerID));
}
public override void OnRemoveCard(Player _player, Gun _gun, GunAmmo _gunAmmo, CharacterData _data, HealthHandler _health, Gravity _gravity, Block _block, CharacterStatModifiers _characterStats)
{
Debug.Log((object)String.Format("[{0}][Card] {1} has been removed from player {2}.", (object)"UC", (object)((CustomCard)this).GetTitle(), (object)_player.playerID));
}
protected override GameObject GetCardArt()
{
return null;
}
protected override string GetDescription()
{
return "A single, powerful bullet which penertrates surfaces and obliterate anything in its path.\r\nCharge to increase damage and penertration.";
}
protected override Rarity GetRarity()
{
return (Rarity)2;
}
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_002e: 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_003b: Unknown result type (might be due to invalid IL or missing references)
//IL_0041: Expected O, but got Unknown
//IL_0043: Unknown result type (might be due to invalid IL or missing references)
//IL_0048: Unknown result type (might be due to invalid IL or missing references)
//IL_004f: 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_0074: Unknown result type (might be due to invalid IL or missing references)
//IL_0076: Unknown result type (might be due to invalid IL or missing references)
//IL_007c: Expected O, but got Unknown
//IL_007e: 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_008a: 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_00b4: Unknown result type (might be due to invalid IL or missing references)
//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
//IL_00bc: Expected O, but got Unknown
//IL_00be: Unknown result type (might be due to invalid IL or missing references)
//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
//IL_00ef: 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_00f7: Expected O, but got Unknown
//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
//IL_0105: Unknown result type (might be due to invalid IL or missing references)
//IL_0110: Unknown result type (might be due to invalid IL or missing references)
//IL_011b: Unknown result type (might be due to invalid IL or missing references)
//IL_011d: Unknown result type (might be due to invalid IL or missing references)
//IL_0123: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[5]
{
new CardInfoStat
{
positive = true,
amount = String.Format("+{0}%", (object)1000),
stat = "Damage",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = true,
amount = String.Format("+{0}%", (object)5000f),
stat = "Bullet Speed",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = true,
amount = String.Format("+{0} Meters", (object)railObjectDrill.metersOfDrilling),
stat = "Penertration",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = false,
amount = String.Format("+{0:n0} Seconds", (object)2.5f),
stat = "Reload Time",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = false,
amount = "1 Bullet",
stat = "Ammo",
simepleAmount = (SimpleAmount)0
}
};
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)1;
}
protected override string GetTitle()
{
return "RailGun";
}
public override string GetModName()
{
return "UC";
}
}
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("com.NEG.UltraCards", "UltraCards", "1.0.0")]
[BepInProcess("Rounds.exe")]
public sealed class UltraCardsEntry : BaseUnityPlugin
{
private const string MODID = "com.NEG.UltraCards";
private const string MODNAME = "UltraCards";
private const string MODVERSION = "1.0.0";
public const string MODINITIALS = "UC";
private static readonly string path = typeof(UltraCardsEntry).Assembly.Location;
private static readonly string ultraCardsLocation = String.Concat(((FileSystemInfo)Directory.GetParent(path)).FullName.Substring(Paths.PluginPath.Length + 1), "\\neg_ultracards");
[field: CompilerGenerated]
public static AssetBundle UltraCardsAssets
{
[CompilerGenerated]
get;
} = AssetUtils.LoadAssetBundle(ultraCardsLocation);
[field: CompilerGenerated]
public static ConfigEntry<bool> AcceleratorForceOneMaxAmmo
{
[CompilerGenerated]
get;
[CompilerGenerated]
private set;
}
private void Awake()
{
//IL_0021: Unknown result type (might be due to invalid IL or missing references)
AcceleratorForceOneMaxAmmo = ((BaseUnityPlugin)this).Config.Bind<bool>("Cards.Particle Accelerator", "Force One Bullet Maximum Ammo", true, (ConfigDescription)null);
new Harmony("com.NEG.UltraCards").PatchAll();
Debug.Log((object)String.Concat("Target Path Minus DLL: ", path));
Debug.Log((object)String.Concat("Base Path: ", ((FileSystemInfo)Directory.GetParent(path)).FullName));
Debug.Log((object)String.Concat("Relative Target Path: ", ultraCardsLocation));
Debug.Log((object)String.Concat("Full Path: ", Paths.PluginPath, ultraCardsLocation));
}
private void Start()
{
CustomCard.BuildCard<RailGunCard>();
CustomCard.BuildCard<ParticleAcceleratorCard>();
}
}
}