using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using DopeBoys.Cards;
using DopeBoys.Extensions;
using DopeBoys.RoundsEffects;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using ModdingUtils.Extensions;
using ModdingUtils.MonoBehaviours;
using ModdingUtils.RoundsEffects;
using UnboundLib;
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("DopeBoys")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+74cf7bd76defa73e1e31550899c0ffc96b303fd5")]
[assembly: AssemblyProduct("DopeBoys")]
[assembly: AssemblyTitle("DopeBoys")]
[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 DopeBoys
{
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("com.phalex.rounds.DopeBoys", "DopeBoys", "0.1.0")]
[BepInProcess("Rounds.exe")]
public class DopeBoys : BaseUnityPlugin
{
private const string ModId = "com.phalex.rounds.DopeBoys";
private const string ModName = "DopeBoys";
public const string Version = "0.1.0";
public const string ModInitials = "DB";
public static DopeBoys instance { get; private set; }
private void Awake()
{
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
new Harmony("com.phalex.rounds.DopeBoys").PatchAll();
}
private void Start()
{
instance = this;
CustomCard.BuildCard<StinkMaster>();
CustomCard.BuildCard<WiggleWiggle>();
CustomCard.BuildCard<SamTurret>();
CustomCard.BuildCard<Smoot>();
CustomCard.BuildCard<HeadHunter>();
}
}
}
namespace DopeBoys.RoundsEffects
{
internal class HeadHunterEffect : HitEffect
{
public int CardAmount { get; set; }
public int Heads { get; set; }
public Player Owner { get; set; }
public override void DealtDamage(Vector2 damage, bool selfDamage, Player damagedPlayer)
{
Player damagedPlayer2 = damagedPlayer;
if ((Object)(object)this == (Object)null)
{
return;
}
ExtensionMethods.ExecuteAfterFrames((MonoBehaviour)(object)DopeBoys.instance, 2, (Action)delegate
{
if (damagedPlayer2.data.dead)
{
HeadHunterReversibleEffect orAddComponent = ExtensionMethods.GetOrAddComponent<HeadHunterReversibleEffect>(((Component)Owner).gameObject, false);
orAddComponent.heads++;
Debug.Log((object)string.Format("[{0}] head acquired by {1} num heads {2}", "DB", Owner.playerID, orAddComponent.heads++));
}
});
}
}
internal class HeadHunterReversibleEffect : ReversibleEffect
{
private readonly float value = 65f;
private readonly float valueStepAmount = 10f;
private readonly float gunDmgMultiplier = 0.5f;
private readonly float saturation = 100f;
private readonly float hue = 356f;
private Color color;
public int heads;
public ReversibleColorEffect colorEffect;
private ColorFlash colorFlash;
private readonly float colorFlashDur = 0.1f;
private readonly int colorFlashNumFlashes = 1;
public override void OnAwake()
{
//IL_001d: Unknown result type (might be due to invalid IL or missing references)
colorEffect = ((Component)base.player).gameObject.AddComponent<ReversibleColorEffect>();
((ColorEffect)colorEffect).SetColor(color);
}
public override void OnUpdate()
{
//IL_005d: Unknown result type (might be due to invalid IL or missing references)
//IL_0062: Unknown result type (might be due to invalid IL or missing references)
//IL_006e: 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_00d7: Unknown result type (might be due to invalid IL or missing references)
GunStatModifier gunStatModifier = base.gunStatModifier;
gunStatModifier.bulletDamageMultiplier_mult += gunDmgMultiplier * (float)heads * base.player.data.stats.GetAdditionalData().headhunter;
color = Color.HSVToRGB(hue, saturation, value - valueStepAmount * (float)heads);
((ColorEffect)colorEffect).SetColor(color);
colorFlash = ExtensionMethods.GetOrAddComponent<ColorFlash>(((Component)base.player).gameObject, false);
colorFlash.SetColor(Color.white);
colorFlash.SetNumberOfFlashes(colorFlashNumFlashes);
colorFlash.SetDuration(colorFlashDur);
Debug.Log((object)string.Format("[{0}] updating headhunter {1} {2} num heads {3}", "DB", color, base.gunStatModifier.bulletDamageMultiplier_mult, heads));
}
public override void OnOnDestroy()
{
((ReversibleEffect)this).OnOnDestroy();
((ColorEffect)colorEffect).Destroy();
}
}
internal class SmootEffect : HitEffect
{
public int CardAmount { get; set; }
public override void DealtDamage(Vector2 damage, bool selfDamage, Player damagedPlayer)
{
//IL_0047: 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_0052: 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_0063: 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_0079: 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)
if (!((Object)(object)this == (Object)null) && CardAmount != 0)
{
Debug.Log((object)string.Format("[{0}] smooting player {1} x {2} times ", "DB", damagedPlayer.playerID, CardAmount));
damagedPlayer.data.movement.Move(-damage * 1.2f * (float)CardAmount + Vector2.up * 0.2f * (float)CardAmount);
}
}
}
internal class WiggleWiggleEffect : HitEffect
{
public override void DealtDamage(Vector2 damage, bool selfDamage, Player damagedPlayer)
{
//IL_0016: Unknown result type (might be due to invalid IL or missing references)
//IL_0017: Unknown result type (might be due to invalid IL or missing references)
if (!((Object)(object)this == (Object)null))
{
ExtensionMethods.GetOrAddComponent<WiggleWiggleReversibleEffect>(((Component)damagedPlayer).gameObject, false).damage = damage;
}
}
}
internal class WiggleWiggleReversibleEffect : ReversibleEffect
{
private readonly Color color = Color.magenta;
public float duration;
public Vector2 damage;
public ReversibleColorEffect colorEffect;
public override void OnAwake()
{
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
duration = base.stats.GetAdditionalData().wiggle * 1f;
colorEffect = ((Component)base.player).gameObject.AddComponent<ReversibleColorEffect>();
((ColorEffect)colorEffect).SetColor(color);
}
public override void OnUpdate()
{
//IL_0037: Unknown result type (might be due to invalid IL or missing references)
//IL_003c: 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_004b: 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_0065: 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_006f: 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)
duration -= TimeHandler.deltaTime;
if (duration <= 0f)
{
((ReversibleEffect)this).Destroy();
}
Player player = base.player;
player.data.movement.Move((damage + Vector2.up) * 1f);
player.data.movement.Move((-damage + Vector2.up) * 1f);
}
public override void OnOnDestroy()
{
((ReversibleEffect)this).OnOnDestroy();
((ColorEffect)colorEffect).Destroy();
}
}
}
namespace DopeBoys.Extensions
{
[Serializable]
public class CharacterDataAdditionalData
{
public OutOfBoundsHandler outOfBoundsHandler;
public CharacterDataAdditionalData()
{
outOfBoundsHandler = null;
}
}
public static class CharacterDataExtension
{
public static readonly ConditionalWeakTable<CharacterData, CharacterDataAdditionalData> data = new ConditionalWeakTable<CharacterData, CharacterDataAdditionalData>();
public static CharacterDataAdditionalData GetAdditionalData(this CharacterData characterData)
{
return data.GetOrCreateValue(characterData);
}
public static void AddData(this CharacterData characterData, CharacterDataAdditionalData value)
{
try
{
data.Add(characterData, value);
}
catch (Exception)
{
}
}
}
[HarmonyPatch(typeof(OutOfBoundsHandler), "Start")]
internal class OutOfBoundsHandlerPatchStart
{
private static void Postfix(OutOfBoundsHandler __instance)
{
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Expected O, but got Unknown
//IL_0052: 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_009c: Unknown result type (might be due to invalid IL or missing references)
//IL_00a6: Expected O, but got Unknown
if (!((Object)(object)CharacterDataExtension.GetAdditionalData((CharacterData)Traverse.Create((object)__instance).Field("data").GetValue()).outOfBoundsHandler == (Object)null))
{
return;
}
OutOfBoundsHandler[] array = Object.FindObjectsOfType<OutOfBoundsHandler>();
foreach (OutOfBoundsHandler val in array)
{
if (((CharacterData)Traverse.Create((object)val).Field("data").GetValue()).player.playerID == ((CharacterData)Traverse.Create((object)__instance).Field("data").GetValue()).player.playerID)
{
CharacterDataExtension.GetAdditionalData((CharacterData)Traverse.Create((object)__instance).Field("data").GetValue()).outOfBoundsHandler = val;
break;
}
}
}
}
[Serializable]
public class CharacterStatModifiersAdditionalData
{
public float wiggle;
public float headhunter;
public CharacterStatModifiersAdditionalData()
{
wiggle = 0f;
headhunter = 0f;
}
}
public static class CharacterStatModifiersExtension
{
public static readonly ConditionalWeakTable<CharacterStatModifiers, CharacterStatModifiersAdditionalData> data = new ConditionalWeakTable<CharacterStatModifiers, CharacterStatModifiersAdditionalData>();
public static CharacterStatModifiersAdditionalData GetAdditionalData(this CharacterStatModifiers characterstats)
{
return data.GetOrCreateValue(characterstats);
}
public static void AddData(this CharacterStatModifiers characterstats, CharacterStatModifiersAdditionalData value)
{
try
{
data.Add(characterstats, value);
}
catch (Exception)
{
}
}
}
[HarmonyPatch(typeof(CharacterStatModifiers), "ResetStats")]
internal class CharacterStatModifiersPatchResetStats
{
private static void Prefix(CharacterStatModifiers __instance)
{
__instance.GetAdditionalData().wiggle = 0f;
__instance.GetAdditionalData().headhunter = 0f;
}
}
public static class PlayerVelocityExtension
{
public static void AddForce(this PlayerVelocity pv, Vector2 force)
{
//IL_001e: Unknown result type (might be due to invalid IL or missing references)
typeof(PlayerVelocity).InvokeMember("AddForce", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, pv, new object[2]
{
force,
(object)(ForceMode2D)0
});
}
}
}
namespace DopeBoys.Cards
{
internal class EvasiveManeuvers : CustomCard
{
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
block.forceToAdd = -10f;
statModifiers.health = 1.2f;
block.cdAdd = 0.25f;
Debug.Log((object)("[DB][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)
{
Debug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "DB", ((CustomCard)this).GetTitle(), 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}.", "DB", ((CustomCard)this).GetTitle(), player.playerID));
}
protected override string GetTitle()
{
return "Evasive Maneuvers";
}
protected override string GetDescription()
{
return "CardDescription";
}
protected override GameObject GetCardArt()
{
return null;
}
protected override Rarity GetRarity()
{
return (Rarity)0;
}
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_002a: Unknown result type (might be due to invalid IL or missing references)
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Expected O, but got Unknown
//IL_0034: 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_0040: Unknown result type (might be due to invalid IL or missing references)
//IL_004b: 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_0058: Unknown result type (might be due to invalid IL or missing references)
//IL_005e: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[2]
{
new CardInfoStat
{
positive = true,
stat = "Health",
amount = "+20%",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = false,
stat = "Block Cooldown",
amount = "+0.25s",
simepleAmount = (SimpleAmount)0
}
};
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)7;
}
public override string GetModName()
{
return "DB";
}
}
internal class HeadHunter : 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)
{
((Component)player).gameObject.AddComponent<HeadHunterEffect>();
ExtensionMethods.GetOrAddComponent<HeadHunterReversibleEffect>(((Component)player).gameObject, false);
characterStats.GetAdditionalData().headhunter += 1f;
}
public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
characterStats.GetAdditionalData().headhunter -= 1f;
}
protected override string GetTitle()
{
return "Head Hunter";
}
protected override string GetDescription()
{
return "Are you Colm O'Driscoll?";
}
protected override GameObject GetCardArt()
{
return DeckSmithUtil.Instance.GetArtFromUrl("https://raw.githubusercontent.com/alexh/DopeBoysCards/main/Assets/Cards/HeadHunter.png");
}
protected override Rarity GetRarity()
{
return (Rarity)0;
}
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_002a: Unknown result type (might be due to invalid IL or missing references)
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Expected O, but got Unknown
//IL_0034: 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_0040: Unknown result type (might be due to invalid IL or missing references)
//IL_004b: 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_0058: Unknown result type (might be due to invalid IL or missing references)
//IL_005e: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[2]
{
new CardInfoStat
{
positive = true,
stat = "DMG per Kill",
amount = "+50%",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = true,
stat = "Resets every Round",
amount = "",
simepleAmount = (SimpleAmount)0
}
};
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)0;
}
public override string GetModName()
{
return "DB";
}
}
internal class SamTurret : CustomCard
{
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
statModifiers.movementSpeed = 0.01f;
gun.ammo = 15;
gun.attackSpeedMultiplier = 0.75f;
statModifiers.jump = 0.5f;
statModifiers.gravity = 1.5f;
Debug.Log((object)("[DB][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)
{
Debug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "DB", ((CustomCard)this).GetTitle(), 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}.", "DB", ((CustomCard)this).GetTitle(), player.playerID));
}
protected override string GetTitle()
{
return "SAM Turret";
}
protected override string GetDescription()
{
return "Iced out like SAM so they call me a Berg";
}
protected override GameObject GetCardArt()
{
return DeckSmithUtil.Instance.GetArtFromUrl("https://raw.githubusercontent.com/alexh/DopeBoysCards/main/Assets/Cards/SamTurret1.png");
}
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_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_002a: Unknown result type (might be due to invalid IL or missing references)
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Expected O, but got Unknown
//IL_0034: 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_0040: Unknown result type (might be due to invalid IL or missing references)
//IL_004b: 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_0058: Unknown result type (might be due to invalid IL or missing references)
//IL_005e: Expected O, but got Unknown
//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_006c: Unknown result type (might be due to invalid IL or missing references)
//IL_0077: Unknown result type (might be due to invalid IL or missing references)
//IL_0082: 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_008a: Expected O, but got Unknown
//IL_008c: 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)
//IL_0098: Unknown result type (might be due to invalid IL or missing references)
//IL_00a3: 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_00b0: Unknown result type (might be due to invalid IL or missing references)
//IL_00b6: Expected O, but got Unknown
//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
//IL_00bd: 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_00cf: 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_00dc: Unknown result type (might be due to invalid IL or missing references)
//IL_00e2: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[5]
{
new CardInfoStat
{
positive = true,
stat = "Ammo",
amount = "+15",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = true,
stat = "ATK Speed",
amount = "-25%",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = false,
stat = "Move Speed",
amount = "-99%",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = false,
stat = "Gravity",
amount = "+50%",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = false,
stat = "Jump Height",
amount = "-50%",
simepleAmount = (SimpleAmount)0
}
};
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)0;
}
public override string GetModName()
{
return "DB";
}
}
internal class Smoot : CustomCard
{
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
statModifiers.attackSpeedMultiplier = 1.25f;
Debug.Log((object)("[DB][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)
{
//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)
((Component)player).gameObject.AddComponent<SmootEffect>().CardAmount++;
gun.projectileColor = Color.magenta;
Debug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "DB", ((CustomCard)this).GetTitle(), player.playerID));
}
public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
((Component)player).gameObject.GetComponentInChildren<SmootEffect>().CardAmount--;
Debug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "DB", ((CustomCard)this).GetTitle(), player.playerID));
}
protected override string GetTitle()
{
return "Smoot Bullets";
}
protected override string GetDescription()
{
return "Targets are attracted to you when hit";
}
protected override GameObject GetCardArt()
{
return DeckSmithUtil.Instance.GetArtFromUrl("https://raw.githubusercontent.com/alexh/DopeBoysCards/main/Assets/Cards/Smoot.png");
}
protected override Rarity GetRarity()
{
return (Rarity)1;
}
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_002a: Unknown result type (might be due to invalid IL or missing references)
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[1]
{
new CardInfoStat
{
positive = false,
stat = "ATK Speed",
amount = "-25%",
simepleAmount = (SimpleAmount)0
}
};
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)8;
}
public override string GetModName()
{
return "DB";
}
}
internal class StinkMaster : CustomCard
{
public static GameObject toxicObj;
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
block.forceToAdd = -8f;
statModifiers.health = 1.2f;
block.cdAdd = 0.25f;
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
//IL_000a: Unknown result type (might be due to invalid IL or missing references)
toxicObj = ((GameObject)Resources.Load("0 cards/Toxic cloud")).GetComponent<Gun>().objectsToSpawn[0].effect;
List<GameObject> objectsToSpawn = new List<GameObject> { toxicObj, toxicObj, toxicObj };
block.objectsToSpawn = objectsToSpawn;
}
public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
if (block.objectsToSpawn.Contains(toxicObj))
{
block.objectsToSpawn.Remove(toxicObj);
}
else
{
Debug.LogWarning((object)"No Toxic Objects Found even though Stink Master was removed");
}
}
protected override string GetTitle()
{
return "Stink Master";
}
protected override string GetDescription()
{
return "Hello I'm stinkmaster!\nAdds a noxious cloud to your block";
}
protected override GameObject GetCardArt()
{
return DeckSmithUtil.Instance.GetArtFromUrl("https://raw.githubusercontent.com/alexh/DopeBoysCards/main/Assets/Cards/StinkMaster2.png");
}
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_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_002a: Unknown result type (might be due to invalid IL or missing references)
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Expected O, but got Unknown
//IL_0034: 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_0040: Unknown result type (might be due to invalid IL or missing references)
//IL_004b: 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_0058: Unknown result type (might be due to invalid IL or missing references)
//IL_005e: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[2]
{
new CardInfoStat
{
positive = true,
stat = "Block Cooldown",
amount = "+0.25s",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = true,
stat = "Health",
amount = "+20%",
simepleAmount = (SimpleAmount)0
}
};
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)5;
}
public override string GetModName()
{
return "DB";
}
}
internal class Template : CustomCard
{
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
Debug.Log((object)("[DB][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)
{
Debug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "DB", ((CustomCard)this).GetTitle(), 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}.", "DB", ((CustomCard)this).GetTitle(), player.playerID));
}
protected override string GetTitle()
{
return "CardName";
}
protected override string GetDescription()
{
return "CardDescription";
}
protected override GameObject GetCardArt()
{
return null;
}
protected override Rarity GetRarity()
{
return (Rarity)0;
}
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_002a: Unknown result type (might be due to invalid IL or missing references)
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[1]
{
new CardInfoStat
{
positive = true,
stat = "Effect",
amount = "No",
simepleAmount = (SimpleAmount)0
}
};
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)7;
}
public override string GetModName()
{
return "DB";
}
}
internal class WiggleWiggle : CustomCard
{
public const float CD_TIME_SEC = 4f;
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
gun.attackSpeedMultiplier = 1.25f;
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
((Component)player).gameObject.AddComponent<WiggleWiggleEffect>();
characterStats.GetAdditionalData().wiggle += 1f;
}
public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
characterStats.GetAdditionalData().wiggle -= 1f;
}
protected override string GetTitle()
{
return "Wiggle Wiggle";
}
protected override string GetDescription()
{
return "<color=#FC0FC0>WWPL</color>\n Make your opponent <color=#FC0FC0>wiggle</color> when you hit them";
}
protected override GameObject GetCardArt()
{
return DeckSmithUtil.Instance.GetArtFromUrl("https://raw.githubusercontent.com/alexh/DopeBoysCards/main/Assets/Cards/WiggleWiggle.png");
}
protected override Rarity GetRarity()
{
return (Rarity)1;
}
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_002a: Unknown result type (might be due to invalid IL or missing references)
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[1]
{
new CardInfoStat
{
positive = false,
stat = "ATK SPD",
amount = "-25%",
simepleAmount = (SimpleAmount)0
}
};
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)8;
}
public override string GetModName()
{
return "DB";
}
}
}