using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using CardThemeLib;
using FSMemesPlugin.Cards;
using FSMemesPlugin.Utils;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using ModsPlus;
using Sonigon;
using UnboundLib;
using UnboundLib.Cards;
using UnboundLib.GameModes;
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("FSMemes")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+78c28610fc37453b4992022b7da00acdb12ec15c")]
[assembly: AssemblyProduct("FSMemes")]
[assembly: AssemblyTitle("FSMemes")]
[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 FSMemesPlugin
{
internal class Assets
{
private static AssetBundle Bundle;
public static GameObject PewCardArt;
public static GameObject MorePewCardArt;
public static GameObject UltimatePewCardArt;
public static GameObject InfinitePewCardArt;
public static SoundEvent DangerAlarmSound;
public static SoundEvent ZzzSound;
public static SoundEvent PussySound;
public static SoundEvent OhnonononoSound;
public static SoundEvent PewSound;
public static SoundEvent DoItKillMeNowSound;
public static SoundEvent NeeeSound;
public static SoundEvent SadTromboneSound;
public static SoundEvent DohSound;
public static SoundEvent SucksToBeYouSound;
public static event Action OnFinishedLoadingAssets;
public static IEnumerator LoadAssets()
{
string text = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "fsmassets");
FSMemes.LOGGER.LogInfo((object)("Started loading AssetsBundle from '" + text + "'"));
Bundle = AssetBundle.LoadFromFile(text);
if ((Object)(object)Bundle == (Object)null)
{
FSMemes.LOGGER.LogError((object)("AssetBundle '" + text + "' not found in assembly manifest"));
yield break;
}
PewCardArt = Bundle.LoadAsset<GameObject>("C_Pew");
MorePewCardArt = Bundle.LoadAsset<GameObject>("C_MorePew");
UltimatePewCardArt = Bundle.LoadAsset<GameObject>("C_UltimatePew");
InfinitePewCardArt = Bundle.LoadAsset<GameObject>("C_InfinitePew");
DangerAlarmSound = Bundle.LoadAsset<SoundEvent>("DangerAlarm_SE");
ZzzSound = Bundle.LoadAsset<SoundEvent>("Zzz_SE");
PussySound = Bundle.LoadAsset<SoundEvent>("Pussy_SE");
OhnonononoSound = Bundle.LoadAsset<SoundEvent>("Ohnononono_SE");
PewSound = Bundle.LoadAsset<SoundEvent>("Pew_SE");
DoItKillMeNowSound = Bundle.LoadAsset<SoundEvent>("DoItKillMeNow_SE");
NeeeSound = Bundle.LoadAsset<SoundEvent>("Neee_SE");
SadTromboneSound = Bundle.LoadAsset<SoundEvent>("SadTrombone_SE");
DohSound = Bundle.LoadAsset<SoundEvent>("Doh_SE");
SucksToBeYouSound = Bundle.LoadAsset<SoundEvent>("SucksToBeYou_SE");
FSMemes.LOGGER.LogInfo((object)("Finished loading AssetsBundle from '" + text + "'"));
Assets.OnFinishedLoadingAssets?.Invoke();
}
}
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("com.forseakynstudios.rounds.memes", "ForseakynStudiosMemes", "0.1.2")]
[BepInProcess("Rounds.exe")]
public class FSMemes : BaseUnityPlugin
{
private const string ModId = "com.forseakynstudios.rounds.memes";
private const string ModName = "ForseakynStudiosMemes";
public const string ModInitials = "FSM";
internal static CardThemeColorType CardThemeColor;
internal static List<string> MustPickCards = new List<string> { "No Effect", "Zero Point", "Table Flip" };
public static ManualLogSource LOGGER => ((BaseUnityPlugin)Instance).Logger;
private static FSMemes Instance { get; set; }
private void Awake()
{
//IL_0031: 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_0046: 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_0050: 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_006f: Expected O, but got Unknown
//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)
Instance = this;
Assets.OnFinishedLoadingAssets += OnAssetsLoaded;
((MonoBehaviour)Unbound.Instance).StartCoroutine(Assets.LoadAssets());
CardThemeColor = CardThemeLib.instance.CreateOrGetType("WackyYellow", new CardThemeColor
{
bgColor = new Color(0.95f, 0.82f, 0.4f),
targetColor = new Color(0.85f, 0.72f, 0.3f)
});
GameModeManager.AddHook("GameStart", (Func<IGameModeHandler, IEnumerator>)((IGameModeHandler gm) => PlayerAddMemesHandler()));
GameModeManager.AddHook("GameEnd", (Func<IGameModeHandler, IEnumerator>)((IGameModeHandler gm) => PlayerRemoveMemesHandler()));
}
private void Start()
{
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
new Harmony("com.forseakynstudios.rounds.memes").PatchAll();
}
private void OnAssetsLoaded()
{
LOGGER.LogInfo((object)"Assets done loading, register cards");
RegisterPrefabs();
RegisterCards();
}
private void RegisterPrefabs()
{
}
private void RegisterCards()
{
CardsRegistry.RegisterCard<PewCard>();
CardsRegistry.RegisterCard<MorePewCard>();
CardsRegistry.RegisterCard<UltimatePewCard>();
CardsRegistry.RegisterCard<InfinitePewCard>();
}
public IEnumerator PlayerAddMemesHandler()
{
foreach (Player player in PlayerManager.instance.players)
{
ExtensionMethods.GetOrAddComponent<MemesHandler>(((Component)player).gameObject, false);
}
yield break;
}
public IEnumerator PlayerRemoveMemesHandler()
{
foreach (Player player in PlayerManager.instance.players)
{
MemesHandler component = ((Component)player).gameObject.GetComponent<MemesHandler>();
if ((Object)(object)component != (Object)null)
{
Object.Destroy((Object)(object)component);
}
}
yield break;
}
}
}
namespace FSMemesPlugin.Utils
{
public static class CardsRegistry
{
private static Dictionary<Type, CardInfo> storedCardInfo = new Dictionary<Type, CardInfo>();
public static void RegisterCard<T>() where T : CustomCard
{
CustomCard.BuildCard<T>((Action<CardInfo>)StoreCard<T>);
}
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 CardInfo value))
{
return value;
}
return null;
}
}
internal class MemesHandler : MonoBehaviour
{
private Player Player;
private float startTimePlayerPick = Time.time;
private bool hasSoundPlayed;
private float playerPickDuration = 15f;
private bool hasAutoPickedCard;
private float autoPlayerPickDuration = 30f;
private bool wasAlmostDead;
private void Start()
{
FSMemes.LOGGER.LogInfo((object)"Adding hooks");
GameModeManager.AddHook("PlayerPickStart", (Func<IGameModeHandler, IEnumerator>)((IGameModeHandler gm) => PlayerPickStart()));
GameModeManager.AddHook("PointStart", (Func<IGameModeHandler, IEnumerator>)((IGameModeHandler gm) => PointStart()));
Player = ((Component)this).GetComponent<Player>();
CharacterStatModifiers stats = Player.data.stats;
stats.WasDealtDamageAction = (Action<Vector2, bool>)Delegate.Combine(stats.WasDealtDamageAction, new Action<Vector2, bool>(OnTakeDamage));
}
private void Destroy()
{
FSMemes.LOGGER.LogInfo((object)"Removing hooks");
GameModeManager.RemoveHook("PlayerPickStart", (Func<IGameModeHandler, IEnumerator>)((IGameModeHandler gm) => PlayerPickStart()));
GameModeManager.RemoveHook("PointStart", (Func<IGameModeHandler, IEnumerator>)((IGameModeHandler gm) => PointStart()));
CharacterStatModifiers stats = Player.data.stats;
stats.WasDealtDamageAction = (Action<Vector2, bool>)Delegate.Remove(stats.WasDealtDamageAction, new Action<Vector2, bool>(OnTakeDamage));
}
private void FixedUpdate()
{
if (CardChoice.instance.pickrID == -1 || CardChoice.instance.pickrID != Player.playerID)
{
return;
}
if (!hasSoundPlayed && Time.time >= startTimePlayerPick + playerPickDuration)
{
FSMemes.LOGGER.LogInfo((object)"Play Sound");
hasSoundPlayed = true;
switch (Random.Range(1, 3))
{
case 1:
SoundManager.Instance.Play(Assets.DangerAlarmSound, SoundManager.Instance.GetTransform());
break;
case 2:
SoundManager.Instance.Play(Assets.ZzzSound, SoundManager.Instance.GetTransform());
break;
}
}
if (!Player.data.view.IsMine || hasAutoPickedCard || !(Time.time >= startTimePlayerPick + autoPlayerPickDuration))
{
return;
}
hasAutoPickedCard = true;
int cardIndex = 0;
((List<GameObject>)ExtensionMethods.GetFieldValue((object)CardChoice.instance, "spawnedCards")).ForEach(delegate(GameObject card)
{
string cardName = card.gameObject.GetComponentInChildren<CardInfo>().cardName;
if (FSMemes.MustPickCards.Contains(cardName))
{
ExtensionMethods.SetFieldValue((object)CardChoice.instance, "currentlySelectedCard", (object)cardIndex);
ExtensionMethods.InvokeMethod((object)CardChoiceVisuals.instance, "SetCurrentSelected", new object[1] { cardIndex });
}
cardIndex++;
});
int index = (int)ExtensionMethods.GetFieldValue((object)CardChoice.instance, "currentlySelectedCard");
GameObject val = ((List<GameObject>)ExtensionMethods.GetFieldValue((object)CardChoice.instance, "spawnedCards"))[index];
FSMemes.LOGGER.LogInfo((object)("Autopicked card '" + val.gameObject.GetComponentInChildren<CardInfo>().cardName + "'"));
CardChoice.instance.Pick(val, false);
}
public IEnumerator PlayerPickStart()
{
startTimePlayerPick = Time.time;
hasAutoPickedCard = false;
hasSoundPlayed = false;
yield break;
}
public IEnumerator PointStart()
{
hasSoundPlayed = false;
hasAutoPickedCard = false;
wasAlmostDead = false;
yield break;
}
private void OnTakeDamage(Vector2 dmg, bool selfDamage)
{
//IL_003d: Unknown result type (might be due to invalid IL or missing references)
FSMemes.LOGGER.LogInfo((object)$"Player: {Player.playerID} with {Player.data.health} took damage {dmg} was done by self {selfDamage}");
if (Player.data.health > 0f && !wasAlmostDead && !selfDamage && Player.data.HealthPercentage <= 0.1f && Player.data.HealthPercentage > 0f)
{
wasAlmostDead = true;
SoundManager.Instance.Play(Assets.DoItKillMeNowSound, SoundManager.Instance.GetTransform());
}
if ((Player.data.dead || Player.data.health < 0f) && selfDamage)
{
SoundManager.Instance.Play(Assets.SadTromboneSound, SoundManager.Instance.GetTransform());
}
if (Player.data.health > 0f && selfDamage)
{
SoundManager.Instance.Play(Assets.DohSound, SoundManager.Instance.GetTransform());
}
}
}
}
namespace FSMemesPlugin.Patches
{
[HarmonyPatch(typeof(ApplyCardStats), "Pick")]
internal class ApplyCardStats_PickPatch
{
private static void Postfix(ApplyCardStats __instance, int pickerID, bool forcePick, PickerType pickerType)
{
//IL_003c: 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_008e: Unknown result type (might be due to invalid IL or missing references)
if (FSMemes.MustPickCards.Contains(((Component)__instance).GetComponent<CardInfo>().cardName))
{
SoundManager.Instance.Play(Assets.SucksToBeYouSound, SoundManager.Instance.GetTransform());
}
else if (((CharacterStatModifiers)ExtensionMethods.GetFieldValue((object)__instance, "myPlayerStats")).regen > 0f || ((CharacterStatModifiers)ExtensionMethods.GetFieldValue((object)__instance, "myPlayerStats")).lifeSteal > 0f)
{
SoundManager.Instance.Play(Assets.PussySound, SoundManager.Instance.GetTransform());
}
else if (((Gun)ExtensionMethods.GetFieldValue((object)__instance, "myGunStats")).damage > 2f)
{
SoundManager.Instance.Play(Assets.OhnonononoSound, SoundManager.Instance.GetTransform());
}
}
}
[HarmonyPatch(typeof(CardChoice), "Pick")]
internal class CardChoice_PickPatch
{
private static bool Prefix(CardChoice __instance, GameObject pickedCard, bool clear)
{
CardChoice __instance2 = __instance;
if ((Object)(object)pickedCard == (Object)null)
{
return true;
}
string cardName = pickedCard.gameObject.GetComponentInChildren<CardInfo>().cardName;
if (FSMemes.MustPickCards.Contains(cardName))
{
return true;
}
int pickrID = (int)ExtensionMethods.GetFieldValue((object)__instance2, "pickrID");
bool hasMustPickCards = false;
((List<GameObject>)ExtensionMethods.GetFieldValue((object)__instance2, "spawnedCards")).ForEach(delegate(GameObject card)
{
string cardName2 = card.gameObject.GetComponentInChildren<CardInfo>().cardName;
if (FSMemes.MustPickCards.Contains(cardName2))
{
SoundManager.Instance.Play(Assets.NeeeSound, SoundManager.Instance.GetTransform());
((MonoBehaviour)Unbound.Instance).StartCoroutine(ResetPickrID(__instance2, pickrID));
hasMustPickCards = true;
}
});
return !hasMustPickCards;
}
private static IEnumerator ResetPickrID(CardChoice __instance, int pickrID)
{
if (pickrID != -1)
{
yield return (object)new WaitForSeconds(0.5f);
__instance.pickrID = pickrID;
}
}
}
}
namespace FSMemesPlugin.Cards
{
internal class InfinitePewCard : 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_0049: Unknown result type (might be due to invalid IL or missing references)
//IL_004e: Unknown result type (might be due to invalid IL or missing references)
//IL_0055: 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_006d: Unknown result type (might be due to invalid IL or missing references)
//IL_0073: Expected O, but got Unknown
//IL_0075: Unknown result type (might be due to invalid IL or missing references)
//IL_007a: Unknown result type (might be due to invalid IL or missing references)
//IL_0081: Unknown result type (might be due to invalid IL or missing references)
//IL_008c: Unknown result type (might be due to invalid IL or missing references)
//IL_0097: Unknown result type (might be due to invalid IL or missing references)
//IL_0099: Unknown result type (might be due to invalid IL or missing references)
//IL_009f: Expected O, but got Unknown
CardDetails val = new CardDetails();
val.Title = "Infinite Pew";
val.Description = "Why stop firing when you can keep going... forever?";
val.ModName = "FSM";
val.Art = Assets.InfinitePewCardArt;
val.Rarity = (Rarity)2;
val.Theme = (CardThemeColorType)1;
val.Stats = (CardInfoStat[])(object)new CardInfoStat[2]
{
new CardInfoStat
{
positive = true,
stat = "Ammo",
amount = "Infinite",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = false,
stat = "Damage",
amount = "-95%",
simepleAmount = (SimpleAmount)0
}
};
return val;
}
}
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
gun.attackSpeed = 0.06f;
gun.damage = 0.05f;
gun.reloadTime = 0f;
}
protected override void Added(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
gun.ShootPojectileAction = (Action<GameObject>)Delegate.Combine(gun.ShootPojectileAction, new Action<GameObject>(OnShoot));
}
protected override void Removed(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
gun.ShootPojectileAction = (Action<GameObject>)Delegate.Remove(gun.ShootPojectileAction, new Action<GameObject>(OnShoot));
}
private void OnShoot(GameObject projectile)
{
SoundManager.Instance.Play(Assets.PewSound, projectile.transform);
}
}
internal class MorePewCard : 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_0049: Unknown result type (might be due to invalid IL or missing references)
//IL_004e: Unknown result type (might be due to invalid IL or missing references)
//IL_0055: 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_006d: Unknown result type (might be due to invalid IL or missing references)
//IL_0073: Expected O, but got Unknown
//IL_0075: Unknown result type (might be due to invalid IL or missing references)
//IL_007a: Unknown result type (might be due to invalid IL or missing references)
//IL_0081: Unknown result type (might be due to invalid IL or missing references)
//IL_008c: Unknown result type (might be due to invalid IL or missing references)
//IL_0097: Unknown result type (might be due to invalid IL or missing references)
//IL_0099: Unknown result type (might be due to invalid IL or missing references)
//IL_009f: Expected O, but got Unknown
//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
//IL_00b8: 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_00c5: Unknown result type (might be due to invalid IL or missing references)
//IL_00cb: Expected O, but got Unknown
//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
//IL_00d9: 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
CardDetails val = new CardDetails();
val.Title = "More Pew";
val.Description = "Double the pew, double the fun.";
val.ModName = "FSM";
val.Art = Assets.MorePewCardArt;
val.Rarity = (Rarity)1;
val.Theme = (CardThemeColorType)1;
val.Stats = (CardInfoStat[])(object)new CardInfoStat[5]
{
new CardInfoStat
{
positive = true,
stat = "Attackspeed",
amount = "+100%",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = true,
stat = "Ammo",
amount = "+10",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = true,
stat = "Burst",
amount = "+2",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = false,
stat = "Damage",
amount = "-30%",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = false,
stat = "Reload",
amount = "+25%",
simepleAmount = (SimpleAmount)0
}
};
return val;
}
}
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
gun.attackSpeedMultiplier = 0.5f;
gun.ammo = 10;
gun.numberOfProjectiles = 2;
gun.damage = 0.7f;
gun.reloadTime = 1.25f;
}
protected override void Added(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
gun.ShootPojectileAction = (Action<GameObject>)Delegate.Combine(gun.ShootPojectileAction, new Action<GameObject>(OnShoot));
}
protected override void Removed(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
gun.ShootPojectileAction = (Action<GameObject>)Delegate.Remove(gun.ShootPojectileAction, new Action<GameObject>(OnShoot));
}
private void OnShoot(GameObject projectile)
{
SoundManager.Instance.Play(Assets.PewSound, projectile.transform);
}
}
internal class PewCard : 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_0049: Unknown result type (might be due to invalid IL or missing references)
//IL_004e: Unknown result type (might be due to invalid IL or missing references)
//IL_0055: 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_006d: Unknown result type (might be due to invalid IL or missing references)
//IL_0073: Expected O, but got Unknown
//IL_0075: Unknown result type (might be due to invalid IL or missing references)
//IL_007a: Unknown result type (might be due to invalid IL or missing references)
//IL_0081: Unknown result type (might be due to invalid IL or missing references)
//IL_008c: Unknown result type (might be due to invalid IL or missing references)
//IL_0097: Unknown result type (might be due to invalid IL or missing references)
//IL_0099: Unknown result type (might be due to invalid IL or missing references)
//IL_009f: Expected O, but got Unknown
//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
//IL_00b8: 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_00c5: Unknown result type (might be due to invalid IL or missing references)
//IL_00cb: Expected O, but got Unknown
//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
//IL_00d9: 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
CardDetails val = new CardDetails();
val.Title = "Pew";
val.Description = "Not flashy, not fancy—just pure pew.";
val.ModName = "FSM";
val.Art = Assets.PewCardArt;
val.Rarity = (Rarity)1;
val.Theme = (CardThemeColorType)1;
val.Stats = (CardInfoStat[])(object)new CardInfoStat[4]
{
new CardInfoStat
{
positive = true,
stat = "Attackspeed",
amount = "+10%",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = true,
stat = "Ammo",
amount = "+3",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = false,
stat = "Damage",
amount = "-10%",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = false,
stat = "Reload",
amount = "+10%",
simepleAmount = (SimpleAmount)0
}
};
return val;
}
}
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
gun.attackSpeedMultiplier = 0.9f;
gun.ammo = 3;
gun.damage = 0.9f;
gun.reloadTime = 1.1f;
}
protected override void Added(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
gun.ShootPojectileAction = (Action<GameObject>)Delegate.Combine(gun.ShootPojectileAction, new Action<GameObject>(OnShoot));
}
protected override void Removed(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
gun.ShootPojectileAction = (Action<GameObject>)Delegate.Remove(gun.ShootPojectileAction, new Action<GameObject>(OnShoot));
}
private void OnShoot(GameObject projectile)
{
SoundManager.Instance.Play(Assets.PewSound, projectile.transform);
}
}
internal class UltimatePewCard : 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_0049: Unknown result type (might be due to invalid IL or missing references)
//IL_004e: Unknown result type (might be due to invalid IL or missing references)
//IL_0055: 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_006d: Unknown result type (might be due to invalid IL or missing references)
//IL_0073: Expected O, but got Unknown
//IL_0075: Unknown result type (might be due to invalid IL or missing references)
//IL_007a: Unknown result type (might be due to invalid IL or missing references)
//IL_0081: Unknown result type (might be due to invalid IL or missing references)
//IL_008c: Unknown result type (might be due to invalid IL or missing references)
//IL_0097: Unknown result type (might be due to invalid IL or missing references)
//IL_0099: Unknown result type (might be due to invalid IL or missing references)
//IL_009f: Expected O, but got Unknown
//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
//IL_00b8: 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_00c5: Unknown result type (might be due to invalid IL or missing references)
//IL_00cb: Expected O, but got Unknown
//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
//IL_00d9: 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
CardDetails val = new CardDetails();
val.Title = "Ultimate Pew";
val.Description = "Loud, flashy, and ridiculously powerful—because sometimes, you just need to PEW PEW PEW PEW PEW!";
val.ModName = "FSM";
val.Art = Assets.UltimatePewCardArt;
val.Rarity = (Rarity)2;
val.Theme = (CardThemeColorType)1;
val.Stats = (CardInfoStat[])(object)new CardInfoStat[5]
{
new CardInfoStat
{
positive = true,
stat = "Attackspeed",
amount = "+1000%",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = true,
stat = "Ammo",
amount = "+100",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = false,
stat = "Damage",
amount = "-80%",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = false,
stat = "Reload",
amount = "+3s",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = false,
stat = "Spread",
amount = "+15%",
simepleAmount = (SimpleAmount)0
}
};
return val;
}
}
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
gun.attackSpeed = 0.3f;
gun.ammo = 100;
gun.damage = 0.2f;
gun.reloadTimeAdd = 3f;
gun.spread = 0.15f;
}
protected override void Added(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
gun.ShootPojectileAction = (Action<GameObject>)Delegate.Combine(gun.ShootPojectileAction, new Action<GameObject>(OnShoot));
}
protected override void Removed(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
gun.ShootPojectileAction = (Action<GameObject>)Delegate.Remove(gun.ShootPojectileAction, new Action<GameObject>(OnShoot));
}
private void OnShoot(GameObject projectile)
{
SoundManager.Instance.Play(Assets.PewSound, projectile.transform);
}
}
}