using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
using ModdingUtils.Utils;
using ModsPlus;
using RarityLib.Utils;
using UnboundLib.Cards;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("KingsRunner")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("KingsRunner")]
[assembly: AssemblyTitle("KingsRunner")]
[assembly: AssemblyVersion("1.0.0.0")]
public class AngryShotgun : SimpleCard
{
public override CardDetails Details
{
get
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
//IL_0006: Expected O, but got Unknown
//IL_002d: 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_0061: Unknown result type (might be due to invalid IL or missing references)
//IL_0068: 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_007e: 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_0086: Expected O, but got Unknown
//IL_0088: 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)
//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_00aa: 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_00b2: Expected O, but got Unknown
//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
//IL_00b9: 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)
//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
//IL_00d6: 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_00de: Expected O, but got Unknown
//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_00ec: Unknown result type (might be due to invalid IL or missing references)
//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
//IL_0102: 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_010a: Expected O, but got Unknown
CardDetails val = new CardDetails();
val.Title = "Angry Shotgun";
val.Description = "Is that a burst fire shotgun?";
val.ModName = "KingsRunner";
val.Rarity = RarityUtils.GetRarity("Legendary");
val.Theme = (CardThemeColorType)8;
val.Art = DeckSmithUtil.Instance.GetArtFromUrl("https://i.pinimg.com/564x/e5/c9/ee/e5c9eefb25868d0a56328a5a8e56015f.jpg");
val.Stats = (CardInfoStat[])(object)new CardInfoStat[4]
{
new CardInfoStat
{
positive = true,
stat = "Attack Speed",
amount = "+900%",
simepleAmount = (SimpleAmount)1
},
new CardInfoStat
{
positive = true,
stat = "Bursts",
amount = "+12",
simepleAmount = (SimpleAmount)3
},
new CardInfoStat
{
positive = true,
stat = "Projectiles",
amount = "+2",
simepleAmount = (SimpleAmount)2
},
new CardInfoStat
{
positive = true,
stat = "Ammunition",
amount = "+30",
simepleAmount = (SimpleAmount)0
}
};
return val;
}
}
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
Dictionary<string, Action<float>> dictionary = new Dictionary<string, Action<float>>();
dictionary.Add("damage", delegate(float val)
{
gun.damage = val;
});
dictionary.Add("health", delegate(float val)
{
statModifiers.health = val;
});
dictionary.Add("reload", delegate(float val)
{
gun.reloadTime = val;
});
dictionary.Add("ammo", delegate(float val)
{
gun.ammo = (int)val;
});
dictionary.Add("projectiles", delegate(float val)
{
gun.numberOfProjectiles = Mathf.Max(1, (int)val);
});
dictionary.Add("bursts", delegate(float val)
{
gun.bursts = (int)val;
});
dictionary.Add("timeBetweenBullets", delegate(float val)
{
gun.timeBetweenBullets = val;
});
dictionary.Add("attackSpeed", delegate(float val)
{
gun.attackSpeed = val;
});
dictionary.Add("bounces", delegate(float val)
{
gun.reflects = (int)val;
});
dictionary.Add("bulletSpeed", delegate(float val)
{
gun.projectileSpeed = val;
});
dictionary["attackSpeed"](10f);
dictionary["bursts"](12f);
dictionary["projectiles"](2f);
dictionary["ammo"](30f);
}
}
public class AtomicLobby : SimpleCard
{
public override CardDetails Details
{
get
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
//IL_0006: Expected O, but got Unknown
//IL_002d: 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_0061: Unknown result type (might be due to invalid IL or missing references)
//IL_0068: 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_007e: 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_0086: Expected O, but got Unknown
//IL_0088: 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)
//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_00aa: 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_00b2: Expected O, but got Unknown
//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
//IL_00b9: 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)
//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
//IL_00d6: 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_00de: Expected O, but got Unknown
CardDetails val = new CardDetails();
val.Title = "Atomic Lobby";
val.Description = "Warning: This will likely end the game";
val.ModName = "KingsRunner";
val.Rarity = RarityUtils.GetRarity("Divine");
val.Theme = (CardThemeColorType)0;
val.Art = DeckSmithUtil.Instance.GetArtFromUrl("https://media1.giphy.com/media/v1.Y2lkPTc5MGI3NjExcTl1dmI1YWUzeGoxb3psc2FxZjZyeGw2dnBtbG02YzlhaTBzb3MyNSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/oe33xf3B50fsc/giphy.gif");
val.Stats = (CardInfoStat[])(object)new CardInfoStat[3]
{
new CardInfoStat
{
positive = true,
stat = "Damage",
amount = "+9900%",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = true,
stat = "Ammunition",
amount = "-100",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = true,
stat = "Projectiles",
amount = "+100",
simepleAmount = (SimpleAmount)0
}
};
return val;
}
}
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
Dictionary<string, Action<float>> dictionary = new Dictionary<string, Action<float>>();
dictionary.Add("damage", delegate(float val)
{
gun.damage = val;
});
dictionary.Add("health", delegate(float val)
{
statModifiers.health = val;
});
dictionary.Add("reload", delegate(float val)
{
gun.reloadTime = val;
});
dictionary.Add("ammo", delegate(float val)
{
gun.ammo = (int)val;
});
dictionary.Add("projectiles", delegate(float val)
{
gun.numberOfProjectiles = Mathf.Max(1, (int)val);
});
dictionary.Add("bursts", delegate(float val)
{
gun.bursts = (int)val;
});
dictionary.Add("timeBetweenBullets", delegate(float val)
{
gun.timeBetweenBullets = val;
});
dictionary.Add("attackSpeed", delegate(float val)
{
gun.attackSpeed = val;
});
dictionary.Add("bounces", delegate(float val)
{
gun.reflects = (int)val;
});
dictionary.Add("bulletSpeed", delegate(float val)
{
gun.projectileSpeed = val;
});
dictionary["damage"](100f);
dictionary["ammo"](-100f);
dictionary["projectiles"](100f);
}
}
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
{
if (storedCardInfo.TryGetValue(typeof(T), out var value))
{
return value;
}
return null;
}
public static CardInfo GetCard(Type T)
{
if (storedCardInfo.TryGetValue(T, out var value))
{
return value;
}
return null;
}
}
public class Ignitethesun : SimpleCard
{
public override CardDetails Details
{
get
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
//IL_0006: Expected O, but got Unknown
//IL_002d: 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_0061: Unknown result type (might be due to invalid IL or missing references)
//IL_0068: 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_007e: 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_0086: Expected O, but got Unknown
//IL_0088: 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)
//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_00aa: 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_00b2: Expected O, but got Unknown
//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
//IL_00b9: 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)
//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
//IL_00d6: 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_00de: Expected O, but got Unknown
//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_00ec: Unknown result type (might be due to invalid IL or missing references)
//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
//IL_0102: 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_010a: Expected O, but got Unknown
//IL_010c: Unknown result type (might be due to invalid IL or missing references)
//IL_0111: Unknown result type (might be due to invalid IL or missing references)
//IL_0118: Unknown result type (might be due to invalid IL or missing references)
//IL_0123: Unknown result type (might be due to invalid IL or missing references)
//IL_012e: Unknown result type (might be due to invalid IL or missing references)
//IL_0130: Unknown result type (might be due to invalid IL or missing references)
//IL_0136: Expected O, but got Unknown
//IL_0138: Unknown result type (might be due to invalid IL or missing references)
//IL_013d: Unknown result type (might be due to invalid IL or missing references)
//IL_0144: Unknown result type (might be due to invalid IL or missing references)
//IL_014f: Unknown result type (might be due to invalid IL or missing references)
//IL_015a: Unknown result type (might be due to invalid IL or missing references)
//IL_015c: Unknown result type (might be due to invalid IL or missing references)
//IL_0162: Expected O, but got Unknown
//IL_0164: Unknown result type (might be due to invalid IL or missing references)
//IL_0169: Unknown result type (might be due to invalid IL or missing references)
//IL_0170: Unknown result type (might be due to invalid IL or missing references)
//IL_017b: Unknown result type (might be due to invalid IL or missing references)
//IL_0186: Unknown result type (might be due to invalid IL or missing references)
//IL_0188: Unknown result type (might be due to invalid IL or missing references)
//IL_018e: Expected O, but got Unknown
//IL_0190: Unknown result type (might be due to invalid IL or missing references)
//IL_0195: Unknown result type (might be due to invalid IL or missing references)
//IL_019c: Unknown result type (might be due to invalid IL or missing references)
//IL_01a7: Unknown result type (might be due to invalid IL or missing references)
//IL_01b2: Unknown result type (might be due to invalid IL or missing references)
//IL_01b4: Unknown result type (might be due to invalid IL or missing references)
//IL_01ba: Expected O, but got Unknown
CardDetails val = new CardDetails();
val.Title = "Ignite the sun";
val.Description = "And he said let there be light";
val.ModName = "KingsRunner";
val.Rarity = RarityUtils.GetRarity("Mythical");
val.Theme = (CardThemeColorType)8;
val.Art = DeckSmithUtil.Instance.GetArtFromUrl("https://cdna.artstation.com/p/assets/images/images/029/516/478/original/james-min-uploding.gif?1597799339");
val.Stats = (CardInfoStat[])(object)new CardInfoStat[8]
{
new CardInfoStat
{
positive = false,
stat = "Damage",
amount = "-111%",
simepleAmount = (SimpleAmount)7
},
new CardInfoStat
{
positive = true,
stat = "Bounces",
amount = "+1",
simepleAmount = (SimpleAmount)1
},
new CardInfoStat
{
positive = true,
stat = "Ammunition",
amount = "+100",
simepleAmount = (SimpleAmount)4
},
new CardInfoStat
{
positive = true,
stat = "Bursts",
amount = "+100",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = true,
stat = "Time Between Bullets",
amount = "+0 seconds",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = true,
stat = "Attack Speed",
amount = "+9900%",
simepleAmount = (SimpleAmount)4
},
new CardInfoStat
{
positive = true,
stat = "Reload Time",
amount = "-10100%",
simepleAmount = (SimpleAmount)3
},
new CardInfoStat
{
positive = false,
stat = "Health",
amount = "+0%",
simepleAmount = (SimpleAmount)0
}
};
return val;
}
}
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
Dictionary<string, Action<float>> dictionary = new Dictionary<string, Action<float>>();
dictionary.Add("damage", delegate(float val)
{
gun.damage = val;
});
dictionary.Add("health", delegate(float val)
{
statModifiers.health = val;
});
dictionary.Add("reload", delegate(float val)
{
gun.reloadTime = val;
});
dictionary.Add("ammo", delegate(float val)
{
gun.ammo = (int)val;
});
dictionary.Add("projectiles", delegate(float val)
{
gun.numberOfProjectiles = Mathf.Max(1, (int)val);
});
dictionary.Add("bursts", delegate(float val)
{
gun.bursts = (int)val;
});
dictionary.Add("timeBetweenBullets", delegate(float val)
{
gun.timeBetweenBullets = val;
});
dictionary.Add("attackSpeed", delegate(float val)
{
gun.attackSpeed = val;
});
dictionary.Add("bounces", delegate(float val)
{
gun.reflects = (int)val;
});
dictionary.Add("bulletSpeed", delegate(float val)
{
gun.projectileSpeed = val;
});
dictionary["damage"](-0.1f);
dictionary["bounces"](1f);
dictionary["ammo"](100f);
dictionary["bursts"](100f);
dictionary["timeBetweenBullets"](0f);
dictionary["attackSpeed"](100f);
dictionary["reload"](-100f);
dictionary["health"](1f);
}
}
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("com.example.rounds.mod", "KingsRunner", "0.0.2")]
[BepInProcess("Rounds.exe")]
public class KingsRunnerPlugin : BaseUnityPlugin
{
private const string ModId = "com.example.rounds.mod";
private const string ModName = "KingsRunner";
private const string ModVersion = "0.0.2";
private const string CompatabilityModName = "KingsRunner";
private void Awake()
{
CardRegistry.RegisterCard<AngryShotgun>(hidden: false);
CardRegistry.RegisterCard<Ignitethesun>(hidden: false);
CardRegistry.RegisterCard<AtomicLobby>(hidden: false);
}
private void Start()
{
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
new Harmony("com.example.rounds.mod").PatchAll();
}
}