using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using BepInEx;
using GiraffeCards.Cards;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using Photon.Pun;
using UnboundLib;
using UnboundLib.Cards;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[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(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace GiraffeCards
{
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("com.giraffeware.rounds.giraffecards", "Giraffe Cards", "1.0.0")]
[BepInProcess("Rounds.exe")]
public class GiraffeCardsPlugin : BaseUnityPlugin
{
public const string ModId = "com.giraffeware.rounds.giraffecards";
public const string ModName = "Giraffe Cards";
public const string Version = "1.0.0";
public const string ModInitials = "GRF";
private void Awake()
{
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
new Harmony("com.giraffeware.rounds.giraffecards").PatchAll();
}
private void Start()
{
CustomCard.BuildCard<MaximilianAlexanderBoehm>();
CustomCard.BuildCard<Niecklas>();
CustomCard.BuildCard<Koni>();
CustomCard.BuildCard<Schneke>();
CustomCard.BuildCard<Paul>();
CustomCard.BuildCard<Timm>();
CustomCard.BuildCard<Maxim>();
CustomCard.BuildCard<Keskin>();
CustomCard.BuildCard<Marius>();
CustomCard.BuildCard<KingVon>();
CustomCard.BuildCard<FriedrichMaerz>();
CustomCard.BuildCard<CharlieKirk>();
CustomCard.BuildCard<BigXThaPlug>();
CustomCard.BuildCard<PalmBeachPete>();
CustomCard.BuildCard<CaptainMorgan>();
CustomCard.BuildCard<NiclasVape>();
Unbound.RegisterCredits("Giraffe Cards", new string[1] { "Giraffeware" }, new string[0], new string[0]);
}
}
}
namespace GiraffeCards.Cards
{
public class BigXThaPlug : GiraffeCard
{
protected override string GetTitle()
{
return "BigXThaPlug";
}
protected override string GetDescription()
{
return "How do you say Texas in German?";
}
protected override Rarity GetRarity()
{
return (Rarity)2;
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)6;
}
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
cardInfo.allowMultiple = true;
statModifiers.sizeMultiplier = 3f;
statModifiers.movementSpeed = 0.5f;
statModifiers.gravity = 2f;
gun.projectileSize = 2f;
gun.knockback = 2f;
}
protected override CardInfoStat[] GetStats()
{
return (CardInfoStat[])(object)new CardInfoStat[5]
{
GiraffeCard.Stat("Size", "+200%", positive: false),
GiraffeCard.Stat("Movement speed", "-50%", positive: false),
GiraffeCard.Stat("Gravity", "+100%", positive: false),
GiraffeCard.Stat("Bullet size", "+200%", positive: true),
GiraffeCard.Stat("Knockback", "+100%", positive: true)
};
}
}
public class CaptainMorgan : GiraffeCard
{
protected override string GetTitle()
{
return "Captain Morgan";
}
protected override string GetDescription()
{
return "Jäger anstatt Cola eignet sich gut zum Mischen";
}
protected override Rarity GetRarity()
{
return (Rarity)1;
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)1;
}
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
cardInfo.allowMultiple = true;
statModifiers.health = 0.8f;
gun.projectileSpeed = 1.1f;
gun.attackSpeed = 0.91f;
}
protected override CardInfoStat[] GetStats()
{
return (CardInfoStat[])(object)new CardInfoStat[3]
{
GiraffeCard.Stat("Health", "-20%", positive: false),
GiraffeCard.Stat("Bullet speed", "+10%", positive: true),
GiraffeCard.Stat("Attack speed", "+10%", positive: true)
};
}
}
public class CharlieKirk : GiraffeCard
{
protected override string GetTitle()
{
return "Charlie Kirk";
}
protected override string GetDescription()
{
return "We are Charlie Kirk!";
}
protected override Rarity GetRarity()
{
return (Rarity)1;
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)2;
}
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
cardInfo.allowMultiple = true;
statModifiers.health = 0.5f;
gun.projectileSpeed = 3f;
gun.damage = 1.15f;
}
protected override CardInfoStat[] GetStats()
{
return (CardInfoStat[])(object)new CardInfoStat[3]
{
GiraffeCard.Stat("Health", "-50%", positive: false),
GiraffeCard.Stat("Bullet speed", "+200%", positive: true),
GiraffeCard.Stat("Damage", "+15%", positive: true)
};
}
}
public class FriedrichMaerz : GiraffeCard
{
protected override string GetTitle()
{
return "Friedrich März";
}
protected override string GetDescription()
{
return "Scheiß Tankrabatt";
}
protected override Rarity GetRarity()
{
return (Rarity)2;
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)4;
}
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
cardInfo.allowMultiple = true;
statModifiers.lifeSteal = 0.5f;
statModifiers.movementSpeed = 0.7f;
}
protected override CardInfoStat[] GetStats()
{
return (CardInfoStat[])(object)new CardInfoStat[2]
{
GiraffeCard.Stat("Life steal", "+50%", positive: true),
GiraffeCard.Stat("Movement speed", "-30%", positive: false)
};
}
}
public abstract class GiraffeCard : CustomCard
{
public override string GetModName()
{
return "GRF";
}
protected override GameObject GetCardArt()
{
return null;
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
}
public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
}
protected static CardInfoStat Stat(string name, string amount, bool positive)
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
//IL_000c: Unknown result type (might be due to invalid IL or missing references)
//IL_0013: Unknown result type (might be due to invalid IL or missing references)
//IL_001a: Unknown result type (might be due to invalid IL or missing references)
//IL_001c: Unknown result type (might be due to invalid IL or missing references)
//IL_0022: Expected O, but got Unknown
return new CardInfoStat
{
stat = name,
amount = amount,
positive = positive,
simepleAmount = (SimpleAmount)0
};
}
}
public class Keskin : GiraffeCard
{
public const float AuraDuration = 5f;
public const float AuraRadius = 4f;
public const float DamagePerSecond = 0.05f;
public const float TickInterval = 0.25f;
protected override string GetTitle()
{
return "Keskin";
}
protected override string GetDescription()
{
return "Törke";
}
protected override Rarity GetRarity()
{
return (Rarity)1;
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)0;
}
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
cardInfo.allowMultiple = false;
block.cdMultiplier = 2f;
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
if ((Object)(object)((Component)player).GetComponent<KeskinAura>() == (Object)null)
{
((Component)player).gameObject.AddComponent<KeskinAura>();
}
}
public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
KeskinAura component = ((Component)player).GetComponent<KeskinAura>();
if ((Object)(object)component != (Object)null)
{
Object.Destroy((Object)(object)component);
}
}
protected override CardInfoStat[] GetStats()
{
return (CardInfoStat[])(object)new CardInfoStat[2]
{
GiraffeCard.Stat("Block cooldown", "+100%", positive: false),
GiraffeCard.Stat("Aura after block", "5% max HP/s for 5s", positive: true)
};
}
}
public class KeskinAura : MonoBehaviour
{
private static Sprite auraSprite;
private Player player;
private Block block;
private GameObject visual;
private float remaining;
private float tickTimer;
private void Start()
{
//IL_0045: Unknown result type (might be due to invalid IL or missing references)
//IL_004f: Expected O, but got Unknown
player = ((Component)this).GetComponent<Player>();
block = ((Component)this).GetComponent<Block>();
Block obj = block;
obj.BlockAction = (Action<BlockTriggerType>)Delegate.Combine(obj.BlockAction, new Action<BlockTriggerType>(OnBlock));
visual = new GameObject("GiraffeCards_KeskinAura");
SpriteRenderer obj2 = visual.AddComponent<SpriteRenderer>();
obj2.sprite = GetSprite();
((Renderer)obj2).sortingOrder = -1;
visual.SetActive(false);
}
private void OnDestroy()
{
if ((Object)(object)block != (Object)null)
{
Block obj = block;
obj.BlockAction = (Action<BlockTriggerType>)Delegate.Remove(obj.BlockAction, new Action<BlockTriggerType>(OnBlock));
}
if ((Object)(object)visual != (Object)null)
{
Object.Destroy((Object)(object)visual);
}
}
private void OnBlock(BlockTriggerType triggerType)
{
remaining = 5f;
tickTimer = 0f;
}
private void Update()
{
//IL_0087: Unknown result type (might be due to invalid IL or missing references)
//IL_009b: Unknown result type (might be due to invalid IL or missing references)
//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
//IL_0182: Unknown result type (might be due to invalid IL or missing references)
//IL_0192: Unknown result type (might be due to invalid IL or missing references)
//IL_0197: 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_01a1: Unknown result type (might be due to invalid IL or missing references)
//IL_01e0: Unknown result type (might be due to invalid IL or missing references)
//IL_01d7: Unknown result type (might be due to invalid IL or missing references)
//IL_01e5: Unknown result type (might be due to invalid IL or missing references)
//IL_01f2: Unknown result type (might be due to invalid IL or missing references)
//IL_01f6: Unknown result type (might be due to invalid IL or missing references)
//IL_0201: Unknown result type (might be due to invalid IL or missing references)
//IL_0206: Unknown result type (might be due to invalid IL or missing references)
bool flag = remaining > 0f && player.data.isPlaying && !player.data.dead;
if (visual.activeSelf != flag)
{
visual.SetActive(flag);
}
if (!flag)
{
remaining = 0f;
return;
}
remaining -= TimeHandler.deltaTime;
visual.transform.position = ((Component)player).transform.position + new Vector3(0f, 0f, 0.5f);
if (!PhotonNetwork.OfflineMode && !player.data.view.IsMine)
{
return;
}
tickTimer += TimeHandler.deltaTime;
if (tickTimer < 0.25f)
{
return;
}
tickTimer -= 0.25f;
foreach (Player player in PlayerManager.instance.players)
{
if (!((Object)(object)player == (Object)null) && !((Object)(object)player == (Object)(object)this.player) && player.teamID != this.player.teamID && !((Object)(object)player.data == (Object)null) && !player.data.dead && player.data.isPlaying)
{
Vector2 val = Vector2.op_Implicit(((Component)player).transform.position - ((Component)this.player).transform.position);
if (!(((Vector2)(ref val)).magnitude > 4f))
{
float num = 0.05f * player.data.maxHealth * 0.25f;
Vector2 val2 = ((((Vector2)(ref val)).sqrMagnitude > 0.001f) ? ((Vector2)(ref val)).normalized : Vector2.up);
((Damagable)player.data.healthHandler).CallTakeDamage(val2 * num, Vector2.op_Implicit(((Component)player).transform.position), (GameObject)null, this.player, true);
}
}
}
}
private static Sprite GetSprite()
{
//IL_0017: Unknown result type (might be due to invalid IL or missing references)
//IL_001d: Expected O, but got Unknown
//IL_0084: Unknown result type (might be due to invalid IL or missing references)
//IL_0093: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)auraSprite != (Object)null)
{
return auraSprite;
}
Texture2D val = new Texture2D(2, 2, (TextureFormat)4, false);
using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("GiraffeCards.Resources.keskin_aura.png"))
{
using MemoryStream memoryStream = new MemoryStream();
stream.CopyTo(memoryStream);
ImageConversion.LoadImage(val, memoryStream.ToArray());
}
float num = (float)((Texture)val).width / 8f;
auraSprite = Sprite.Create(val, new Rect(0f, 0f, (float)((Texture)val).width, (float)((Texture)val).height), new Vector2(0.5f, 0.5f), num);
return auraSprite;
}
}
public class KingVon : GiraffeCard
{
protected override string GetTitle()
{
return "King Von";
}
protected override string GetDescription()
{
return "Gone too early...";
}
protected override Rarity GetRarity()
{
return (Rarity)2;
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)1;
}
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
cardInfo.allowMultiple = true;
statModifiers.movementSpeed = 2f;
gun.ammo = 10;
gun.attackSpeed = 0.5f;
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
if ((Object)(object)((Component)player).GetComponent<KingVonNoRespawns>() == (Object)null)
{
((Component)player).gameObject.AddComponent<KingVonNoRespawns>();
}
}
public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
KingVonNoRespawns component = ((Component)player).GetComponent<KingVonNoRespawns>();
if ((Object)(object)component != (Object)null)
{
Object.Destroy((Object)(object)component);
}
}
protected override CardInfoStat[] GetStats()
{
return (CardInfoStat[])(object)new CardInfoStat[4]
{
GiraffeCard.Stat("Movement speed", "+100%", positive: true),
GiraffeCard.Stat("Ammo", "+10", positive: true),
GiraffeCard.Stat("Attack speed", "+100%", positive: true),
GiraffeCard.Stat("Extra lives", "none", positive: false)
};
}
}
public class KingVonNoRespawns : MonoBehaviour
{
private CharacterStatModifiers stats;
private void Awake()
{
stats = ((Component)this).GetComponent<CharacterStatModifiers>();
}
private void LateUpdate()
{
if (!((Object)(object)stats == (Object)null))
{
if (stats.respawns != 0)
{
stats.respawns = 0;
}
if (stats.remainingRespawns != 0)
{
stats.remainingRespawns = 0;
}
}
}
}
public class Koni : GiraffeCard
{
protected override string GetTitle()
{
return "Koni";
}
protected override string GetDescription()
{
return "So dick bin ich garnicht...";
}
protected override Rarity GetRarity()
{
return (Rarity)1;
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)0;
}
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
cardInfo.allowMultiple = true;
statModifiers.sizeMultiplier = 2f;
statModifiers.movementSpeed = 0.8f;
statModifiers.gravity = 1.3f;
statModifiers.health = 2f;
gun.damage = 2.5f;
gun.projectileSize = 1f;
}
protected override CardInfoStat[] GetStats()
{
return (CardInfoStat[])(object)new CardInfoStat[6]
{
GiraffeCard.Stat("Size", "+100%", positive: false),
GiraffeCard.Stat("Movement speed", "-20%", positive: false),
GiraffeCard.Stat("Gravity", "+30%", positive: false),
GiraffeCard.Stat("Health", "+100%", positive: true),
GiraffeCard.Stat("Damage", "+150%", positive: true),
GiraffeCard.Stat("Bullet size", "+100%", positive: true)
};
}
}
public class Marius : GiraffeCard
{
protected override string GetTitle()
{
return "Marius";
}
protected override string GetDescription()
{
return "Der Schaden und die Leben kommen noch beim Pumpen";
}
protected override Rarity GetRarity()
{
return (Rarity)1;
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)8;
}
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
cardInfo.allowMultiple = true;
statModifiers.sizeMultiplier = 2f;
statModifiers.movementSpeed = 1.5f;
gun.damage = 0.85f;
statModifiers.health = 0.85f;
}
protected override CardInfoStat[] GetStats()
{
return (CardInfoStat[])(object)new CardInfoStat[4]
{
GiraffeCard.Stat("Size", "+100%", positive: false),
GiraffeCard.Stat("Movement speed", "+50%", positive: true),
GiraffeCard.Stat("Damage", "-15%", positive: false),
GiraffeCard.Stat("Health", "-15%", positive: false)
};
}
}
public class Maxim : GiraffeCard
{
protected override string GetTitle()
{
return "Maxim";
}
protected override string GetDescription()
{
return "Touch Grass";
}
protected override Rarity GetRarity()
{
return (Rarity)1;
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)6;
}
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
cardInfo.allowMultiple = true;
statModifiers.health = 3f;
statModifiers.movementSpeed = 0.5f;
}
protected override CardInfoStat[] GetStats()
{
return (CardInfoStat[])(object)new CardInfoStat[2]
{
GiraffeCard.Stat("Health", "+200%", positive: true),
GiraffeCard.Stat("Movement speed", "-50%", positive: false)
};
}
}
public class MaximilianAlexanderBoehm : GiraffeCard
{
protected override string GetTitle()
{
return "Maximilian Alexander Böhm";
}
protected override string GetDescription()
{
return "So heiße ich nicht...";
}
protected override Rarity GetRarity()
{
return (Rarity)1;
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)4;
}
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
cardInfo.allowMultiple = true;
statModifiers.sizeMultiplier = 0.5f;
statModifiers.health = 0.8f;
}
protected override CardInfoStat[] GetStats()
{
return (CardInfoStat[])(object)new CardInfoStat[2]
{
GiraffeCard.Stat("Size", "-50%", positive: true),
GiraffeCard.Stat("Health", "-20%", positive: false)
};
}
}
public class NiclasVape : GiraffeCard
{
protected override string GetTitle()
{
return "Niclas Vape";
}
protected override string GetDescription()
{
return "Ey hast du meine Vape?";
}
protected override Rarity GetRarity()
{
return (Rarity)2;
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)7;
}
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
cardInfo.allowMultiple = true;
statModifiers.movementSpeed = 6f;
statModifiers.numberOfJumps = 5;
statModifiers.jump = 1.5f;
statModifiers.health = 0.2f;
}
protected override CardInfoStat[] GetStats()
{
return (CardInfoStat[])(object)new CardInfoStat[4]
{
GiraffeCard.Stat("Movement speed", "+500%", positive: true),
GiraffeCard.Stat("Jumps", "+5", positive: true),
GiraffeCard.Stat("Jump height", "+50%", positive: true),
GiraffeCard.Stat("Health", "-80%", positive: false)
};
}
}
public class Niecklas : GiraffeCard
{
public const float SlowFactor = 0.8f;
public const float SlowDuration = 2f;
private static GameObject slowEffectPrefab;
protected override string GetTitle()
{
return "Niecklas";
}
protected override string GetDescription()
{
return "Mein Reddit ist doch garnicht so schlimm";
}
protected override Rarity GetRarity()
{
return (Rarity)1;
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)3;
}
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_0019: Unknown result type (might be due to invalid IL or missing references)
//IL_0043: Unknown result type (might be due to invalid IL or missing references)
//IL_004d: Expected O, but got Unknown
//IL_0070: Unknown result type (might be due to invalid IL or missing references)
//IL_0075: Unknown result type (might be due to invalid IL or missing references)
//IL_0081: Expected O, but got Unknown
cardInfo.allowMultiple = true;
statModifiers.movementSpeed = 0.7f;
gun.projectileColor = Color.white;
if ((Object)(object)slowEffectPrefab == (Object)null)
{
slowEffectPrefab = new GameObject("GiraffeCards_NiecklasSlowEffect", new Type[1] { typeof(NiecklasSlowEffect) });
Object.DontDestroyOnLoad((Object)(object)slowEffectPrefab);
}
gun.objectsToSpawn = ((IEnumerable<ObjectsToSpawn>)(((object)gun.objectsToSpawn) ?? ((object)new ObjectsToSpawn[0]))).Concat((IEnumerable<ObjectsToSpawn>)(object)new ObjectsToSpawn[1]
{
new ObjectsToSpawn
{
AddToProjectile = slowEffectPrefab
}
}).ToArray();
}
protected override CardInfoStat[] GetStats()
{
return (CardInfoStat[])(object)new CardInfoStat[2]
{
GiraffeCard.Stat("Movement speed", "-30%", positive: false),
GiraffeCard.Stat("Enemy speed on hit", "-20% for 2s", positive: true)
};
}
}
public class NiecklasSlowEffect : RayHitEffect
{
public override HasToReturn DoHitEffect(HitInfo hit)
{
if (!((Object)(object)hit.transform == (Object)null))
{
CharacterStatModifiers component = ((Component)hit.transform).GetComponent<CharacterStatModifiers>();
if (!((Object)(object)component == (Object)null))
{
(((Component)component).GetComponent<NiecklasSlowStatus>() ?? ((Component)component).gameObject.AddComponent<NiecklasSlowStatus>()).Apply(0.8f, 2f);
return (HasToReturn)1;
}
return (HasToReturn)1;
}
return (HasToReturn)1;
}
}
public class NiecklasSlowStatus : MonoBehaviour
{
private CharacterStatModifiers stats;
private float appliedFactor = 1f;
private float expiresAt;
private void Awake()
{
stats = ((Component)this).GetComponent<CharacterStatModifiers>();
}
public void Apply(float factor, float duration)
{
if (appliedFactor == 1f)
{
appliedFactor = factor;
CharacterStatModifiers obj = stats;
obj.movementSpeed *= factor;
}
expiresAt = Time.time + duration;
}
private void Update()
{
if (appliedFactor != 1f && Time.time >= expiresAt)
{
Restore();
}
}
private void Restore()
{
if (appliedFactor != 1f)
{
CharacterStatModifiers obj = stats;
obj.movementSpeed /= appliedFactor;
appliedFactor = 1f;
}
}
public void Forget()
{
appliedFactor = 1f;
}
private void OnDestroy()
{
Restore();
}
}
[HarmonyPatch(typeof(CharacterStatModifiers), "ResetStats")]
internal static class NiecklasResetStatsPatch
{
private static void Prefix(CharacterStatModifiers __instance)
{
NiecklasSlowStatus component = ((Component)__instance).GetComponent<NiecklasSlowStatus>();
if ((Object)(object)component != (Object)null)
{
component.Forget();
}
}
}
public class PalmBeachPete : GiraffeCard
{
protected override string GetTitle()
{
return "Palm Beach Pete";
}
protected override string GetDescription()
{
return "Er lebt noch";
}
protected override Rarity GetRarity()
{
return (Rarity)2;
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)8;
}
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
cardInfo.allowMultiple = true;
statModifiers.respawns = 1;
}
protected override CardInfoStat[] GetStats()
{
return (CardInfoStat[])(object)new CardInfoStat[1] { GiraffeCard.Stat("Respawns", "+1", positive: true) };
}
}
public class Paul : GiraffeCard
{
protected override string GetTitle()
{
return "Paul";
}
protected override string GetDescription()
{
return "Bounced von Freundin zu Freundin";
}
protected override Rarity GetRarity()
{
return (Rarity)1;
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)1;
}
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
cardInfo.allowMultiple = true;
gun.dontAllowAutoFire = true;
gun.reflects = 5;
}
protected override CardInfoStat[] GetStats()
{
return (CardInfoStat[])(object)new CardInfoStat[2]
{
GiraffeCard.Stat("Bounces", "+5", positive: true),
GiraffeCard.Stat("Rapid fire", "disabled", positive: false)
};
}
}
public class Schneke : GiraffeCard
{
protected override string GetTitle()
{
return "Schneke";
}
protected override string GetDescription()
{
return "Körperklaus aber nach einmal Kotzen kann weitergesoffen werden";
}
protected override Rarity GetRarity()
{
return (Rarity)2;
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)4;
}
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
cardInfo.allowMultiple = true;
statModifiers.respawns = 1;
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
if ((Object)(object)((Component)player).GetComponent<SchnekeNoRegen>() == (Object)null)
{
((Component)player).gameObject.AddComponent<SchnekeNoRegen>();
}
}
public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
SchnekeNoRegen component = ((Component)player).GetComponent<SchnekeNoRegen>();
if ((Object)(object)component != (Object)null)
{
Object.Destroy((Object)(object)component);
}
}
protected override CardInfoStat[] GetStats()
{
return (CardInfoStat[])(object)new CardInfoStat[2]
{
GiraffeCard.Stat("Respawns", "+1", positive: true),
GiraffeCard.Stat("Regeneration", "none", positive: false)
};
}
}
public class SchnekeNoRegen : MonoBehaviour
{
private CharacterStatModifiers stats;
private void Awake()
{
stats = ((Component)this).GetComponent<CharacterStatModifiers>();
}
private void LateUpdate()
{
if ((Object)(object)stats != (Object)null && stats.regen != 0f)
{
stats.regen = 0f;
}
}
}
public class Timm : GiraffeCard
{
protected override string GetTitle()
{
return "Timm";
}
protected override string GetDescription()
{
return "Das Ei trägt bleibende Schäden";
}
protected override Rarity GetRarity()
{
return (Rarity)1;
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)7;
}
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
cardInfo.allowMultiple = true;
statModifiers.health = 0.95f;
statModifiers.jump = 0.8f;
block.cdMultiplier = 0.5f;
gun.attackSpeed = 0.87f;
}
protected override CardInfoStat[] GetStats()
{
return (CardInfoStat[])(object)new CardInfoStat[4]
{
GiraffeCard.Stat("Health", "-5%", positive: false),
GiraffeCard.Stat("Jump height", "-20%", positive: false),
GiraffeCard.Stat("Block cooldown", "-50%", positive: true),
GiraffeCard.Stat("Attack speed", "+15%", positive: true)
};
}
}
}