using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using AALUND13Card;
using AALUND13Card.Armors;
using AALUND13Card.Extensions;
using AALUND13Card.Handler;
using AALUND13Card.MonoBehaviours;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using ClassesManagerReborn;
using HarmonyLib;
using JARL.Abstract;
using JARL.ArmorFramework;
using JARL.ArmorFramework.Abstract;
using JARL.ArmorFramework.Classes;
using JARL.ArmorFramework.Utlis;
using Jotunn.Utils;
using Microsoft.CodeAnalysis;
using ModdingUtils.Extensions;
using ModdingUtils.Utils;
using Photon.Pun;
using TMPro;
using TabInfo.Utils;
using UnboundLib;
using UnboundLib.Cards;
using UnboundLib.GameModes;
using UnboundLib.Utils.UI;
using UnityEngine;
using UnityEngine.Events;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(/*Could not decode attribute arguments.*/)]
[assembly: TargetFramework(".NETFramework,Version=v4.7.1", FrameworkDisplayName = ".NET Framework 4.7.1")]
[assembly: AssemblyVersion("0.0.0.0")]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Embedded]
[AttributeUsage(/*Could not decode attribute arguments.*/)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
[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.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("com.aalund13.rounds.aalund13_cards", "AALUND13 Cards", "1.0.0")]
[BepInProcess("Rounds.exe")]
public class AALUND13_Cards : BaseUnityPlugin
{
internal const string modInitials = "AAC";
internal const string ModId = "com.aalund13.rounds.aalund13_cards";
internal const string ModName = "AALUND13 Cards";
internal const string Version = "1.0.0";
internal static List<BaseUnityPlugin> plugins;
public static AssetBundle assets = AssetUtils.LoadAssetBundleFromResources("aalund13_asset", typeof(AALUND13_Cards).Assembly);
public static CardCategory SoulstreakClassCards;
[field: CompilerGenerated]
public static AALUND13_Cards Instance
{
[CompilerGenerated]
get;
[CompilerGenerated]
private set;
}
private void Awake()
{
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_003e: 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_0048: Unknown result type (might be due to invalid IL or missing references)
//IL_01c6: Unknown result type (might be due to invalid IL or missing references)
Instance = this;
ConfigHandler.RegesterMenu(((BaseUnityPlugin)this).Config);
assets.LoadAsset<GameObject>("ModCards").GetComponent<CardResgester>().RegisterCards();
Utils.LogInfo("---AALUND13 Cards---");
Enumerator<string, GameObject> enumerator = CardResgester.ModCards.GetEnumerator();
try
{
while (enumerator.MoveNext())
{
Utils.LogInfo(enumerator.Current.Value.GetComponent<CardInfo>().cardName ?? "");
}
}
finally
{
((IDisposable)enumerator).Dispose();
}
ClassesRegistry.Register(CardResgester.ModCards["Soulstreak"].GetComponent<CardInfo>(), (CardType)1, 0);
ClassesRegistry.Register(CardResgester.ModCards["Eternal Resilience"].GetComponent<CardInfo>(), (CardType)16, CardResgester.ModCards["Soulstreak"].GetComponent<CardInfo>(), 2);
ClassesRegistry.Register(CardResgester.ModCards["Soulstealer Embrace"].GetComponent<CardInfo>(), (CardType)16, CardResgester.ModCards["Soulstreak"].GetComponent<CardInfo>(), 0);
ClassesRegistry.Register(CardResgester.ModCards["Soul Barrier"].GetComponent<CardInfo>(), (CardType)2, CardResgester.ModCards["Soulstreak"].GetComponent<CardInfo>(), 0);
ClassesRegistry.Register(CardResgester.ModCards["Soul Barrier Enhancement"].GetComponent<CardInfo>(), (CardType)16, CardResgester.ModCards["Soul Barrier"].GetComponent<CardInfo>(), 2);
ClassesRegistry.Register(CardResgester.ModCards["Soul Drain"].GetComponent<CardInfo>(), (CardType)2, CardResgester.ModCards["Soulstreak"].GetComponent<CardInfo>(), 0);
ClassesRegistry.Register(CardResgester.ModCards["Soul Drain Enhancement"].GetComponent<CardInfo>(), (CardType)16, CardResgester.ModCards["Soul Drain"].GetComponent<CardInfo>(), 2);
new Harmony("com.aalund13.rounds.aalund13_cards").PatchAll();
}
private void Start()
{
plugins = (List<BaseUnityPlugin>)typeof(Chainloader).GetField("_plugins", (BindingFlags)40).GetValue((object)null);
GameModeManager.AddHook("PickStart", (Func<IGameModeHandler, IEnumerator>)([CompilerGenerated] (IGameModeHandler _) => PickingStart()));
GameModeManager.AddHook("PickEnd", (Func<IGameModeHandler, IEnumerator>)([CompilerGenerated] (IGameModeHandler _) => PickingEnd()));
GameModeManager.AddHook("PointStart", (Func<IGameModeHandler, IEnumerator>)([CompilerGenerated] (IGameModeHandler _) => PointStart()));
GameModeManager.AddHook("PointEnd", (Func<IGameModeHandler, IEnumerator>)([CompilerGenerated] (IGameModeHandler _) => PointEnd()));
ArmorFramework.RegisterArmorType((ArmorBase)(object)new SoulArmor());
if (plugins.Exists((Predicate<BaseUnityPlugin>)((BaseUnityPlugin plugin) => plugin.Info.Metadata.GUID == "com.willuwontu.rounds.tabinfo")))
{
TabinfoInterface.Setup();
}
}
[IteratorStateMachine(/*Could not decode attribute arguments.*/)]
public IEnumerator PointStart()
{
for (int i = 0; i < PlayerManager.instance.players.Count; i++)
{
SoulstreakMono componentInChildren = ((Component)PlayerManager.instance.players[i]).GetComponentInChildren<SoulstreakMono>();
if ((Object)(object)componentInChildren != (Object)null)
{
componentInChildren.canResetKills = true;
}
}
yield break;
}
[IteratorStateMachine(/*Could not decode attribute arguments.*/)]
public IEnumerator PointEnd()
{
for (int i = 0; i < PlayerManager.instance.players.Count; i++)
{
SoulstreakMono componentInChildren = ((Component)PlayerManager.instance.players[i]).GetComponentInChildren<SoulstreakMono>();
if ((Object)(object)componentInChildren != (Object)null)
{
componentInChildren.canResetKills = false;
}
}
yield break;
}
[IteratorStateMachine(/*Could not decode attribute arguments.*/)]
public IEnumerator PickingEnd()
{
for (int i = 0; i < PlayerManager.instance.players.Count; i++)
{
Player val = PlayerManager.instance.players[i];
SoulstreakMono componentInChildren = ((Component)val).GetComponentInChildren<SoulstreakMono>();
if ((Object)(object)componentInChildren != (Object)null)
{
componentInChildren.baseCharacterData.Copy(val.data);
componentInChildren.SetStats();
ArmorUtils.GetArmorByType(((Component)val).GetComponent<ArmorHandler>(), "Soul").maxArmorValue = 0f;
}
}
yield break;
}
[IteratorStateMachine(/*Could not decode attribute arguments.*/)]
public IEnumerator PickingStart()
{
for (int i = 0; i < PlayerManager.instance.players.Count; i++)
{
SoulstreakMono componentInChildren = ((Component)PlayerManager.instance.players[i]).GetComponentInChildren<SoulstreakMono>();
if ((Object)(object)componentInChildren != (Object)null)
{
componentInChildren.ResetToBase();
}
}
yield break;
}
}
public class RerollClassManager : MonoBehaviour
{
[CompilerGenerated]
private sealed class <>c__DisplayClass3_0 : Object
{
public Player player;
public Func<ClassObject, bool> <>9__0;
internal bool <RerollClassPlayerIEnumerator>b__0(ClassObject classObj)
{
if (Cards.instance.PlayerIsAllowedCard(player, classObj.card))
{
return Cards.active.Contains(classObj.card);
}
return false;
}
}
public static RerollClassManager instance;
public List<Player> rerollClassPlayers = new List<Player>();
public void Start()
{
Debug.Log((object)"RerollClassManager Spawned");
instance = this;
}
[IteratorStateMachine(/*Could not decode attribute arguments.*/)]
public IEnumerator RerollClassPlayerIEnumerator(Player player)
{
<>c__DisplayClass3_0 CS$<>8__locals0 = new <>c__DisplayClass3_0
{
player = player
};
Debug.Log((object)"Starting");
yield return null;
List<CardInfo> val = Enumerable.ToList<CardInfo>((IEnumerable<CardInfo>)(object)CS$<>8__locals0.player.data.currentCards);
Cards.instance.RemoveAllCardsFromPlayer(CS$<>8__locals0.player, true);
Enumerator<CardInfo> enumerator = val.GetEnumerator();
try
{
while (enumerator.MoveNext())
{
CardInfo current = enumerator.Current;
Debug.Log((object)current.cardName);
ClassObject val2 = ClassesRegistry.Get(current);
Debug.Log((object)"After");
if (val2 != null)
{
CardType type = val2.type;
if (!((Object)(CardType)(ref type)).Equals((object)(CardType)32))
{
if ((int)val2.type == 1)
{
CardInfo random = ExtensionMethods.GetRandom<CardInfo>((IList)(object)ClassesRegistry.GetClassInfos(val2.type, false));
if ((Object)(object)random != (Object)null)
{
Cards.instance.AddCardToPlayer(CS$<>8__locals0.player, random, false, "", 0f, 0f);
}
}
else if ((int)val2.type != 1)
{
List<ClassObject> val3 = Enumerable.ToList<ClassObject>(Enumerable.Where<ClassObject>((IEnumerable<ClassObject>)(object)ClassesRegistry.GetClassObjects((CardType)(-2), false), (Func<ClassObject, bool>)((ClassObject classObj) => Cards.instance.PlayerIsAllowedCard(CS$<>8__locals0.player, classObj.card) && Cards.active.Contains(classObj.card))));
if (val3.Count > 0)
{
ClassObject random2 = ExtensionMethods.GetRandom<ClassObject>((IList)(object)val3);
if (random2 != null)
{
Cards.instance.AddCardToPlayer(CS$<>8__locals0.player, random2.card, false, "", 0f, 0f);
}
}
}
goto IL_0240;
}
}
Debug.Log((object)String.Format("{0} -- {1}", (object)CS$<>8__locals0.player.playerID, (object)current.cardName));
Cards.instance.AddCardToPlayer(CS$<>8__locals0.player, current, false, "", 0f, 0f);
goto IL_0240;
IL_0240:
yield return new WaitForSeconds(0.5f);
}
}
finally
{
((IDisposable)enumerator).Dispose();
}
}
[IteratorStateMachine(/*Could not decode attribute arguments.*/)]
public IEnumerator RerollPlayer()
{
if (PhotonNetwork.OfflineMode || PhotonNetwork.IsMasterClient)
{
for (int i = rerollClassPlayers.Count - 1; i >= 0; i--)
{
Player player = rerollClassPlayers[i];
yield return RerollClassPlayerIEnumerator(player);
rerollClassPlayers.Remove(rerollClassPlayers[i]);
}
}
}
public void AddPlayerToRerollClassPlayer(Player player)
{
if (!rerollClassPlayers.Contains(player))
{
rerollClassPlayers.Add(player);
}
}
}
namespace AALUND13Card
{
internal class ConfigHandler : Object
{
[Serializable]
[CompilerGenerated]
private sealed class <>c : Object
{
public static readonly <>c <>9 = new <>c();
public static UnityAction <>9__2_0;
internal void <RegesterMenu>b__2_0()
{
}
}
public static ConfigEntry<bool> DetailsMode;
public static ConfigEntry<bool> DebugMode;
public static void RegesterMenu(ConfigFile config)
{
//IL_0019: Unknown result type (might be due to invalid IL or missing references)
//IL_001e: Unknown result type (might be due to invalid IL or missing references)
//IL_0024: Expected O, but got Unknown
object obj = <>c.<>9__2_0;
if (obj == null)
{
UnityAction val = delegate
{
};
<>c.<>9__2_0 = val;
obj = (object)val;
}
Unbound.RegisterMenu("AALUND13 Cards", (UnityAction)obj, (Action<GameObject>)NewGui, (GameObject)null, false);
DebugMode = config.Bind<bool>("AALUND13 Cards", "DebugMode", false, "Enabled or disabled Debug Mode");
}
public static void addBlank(GameObject menu)
{
//IL_000d: 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_0018: Unknown result type (might be due to invalid IL or missing references)
//IL_001e: Unknown result type (might be due to invalid IL or missing references)
TextMeshProUGUI val = default(TextMeshProUGUI);
MenuHandler.CreateText(" ", menu, ref val, 30, true, default(Nullable<Color>), (TMP_FontAsset)null, (Material)null, default(Nullable<TextAlignmentOptions>));
}
public static void NewGui(GameObject menu)
{
//IL_0021: Unknown result type (might be due to invalid IL or missing references)
//IL_0027: 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: Unknown result type (might be due to invalid IL or missing references)
MenuHandler.CreateToggle(DebugMode.Value, "<#c41010> Debug Mode", menu, (UnityAction<bool>)DebugModeChanged, 30, true, default(Nullable<Color>), (TMP_FontAsset)null, (Material)null, default(Nullable<TextAlignmentOptions>));
[CompilerGenerated]
static void DebugModeChanged(bool val)
{
DebugMode.Value = val;
}
}
}
public class CardResgester : MonoBehaviour
{
public List<GameObject> Cards;
public List<GameObject> HiddenCards;
public static Dictionary<string, GameObject> ModCards = new Dictionary<string, GameObject>();
internal void RegisterCards()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: 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_0068: Unknown result type (might be due to invalid IL or missing references)
Enumerator<GameObject> enumerator = Cards.GetEnumerator();
try
{
while (enumerator.MoveNext())
{
GameObject current = enumerator.Current;
CustomCard.RegisterUnityCard(current, "AAC", current.GetComponent<CardInfo>().cardName, true, (Action<CardInfo>)null);
ModCards.Add(current.GetComponent<CardInfo>().cardName, current);
}
}
finally
{
((IDisposable)enumerator).Dispose();
}
enumerator = HiddenCards.GetEnumerator();
try
{
while (enumerator.MoveNext())
{
GameObject current2 = enumerator.Current;
CustomCard.RegisterUnityCard(current2, "AAC", current2.GetComponent<CardInfo>().cardName, false, (Action<CardInfo>)null);
Cards.instance.AddHiddenCard(current2.GetComponent<CardInfo>());
ModCards.Add(current2.GetComponent<CardInfo>().cardName, current2);
}
}
finally
{
((IDisposable)enumerator).Dispose();
}
}
internal static List<GameObject> GetCardsFormString(List<string> cardsOfString)
{
//IL_0007: 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)
List<GameObject> val = new List<GameObject>();
Enumerator<string> enumerator = cardsOfString.GetEnumerator();
try
{
while (enumerator.MoveNext())
{
string current = enumerator.Current;
val.Add(ModCards[current]);
}
return val;
}
finally
{
((IDisposable)enumerator).Dispose();
}
}
}
public class Classes : Object
{
public class DamageDealSecond : Object
{
public float timeToDealDamage;
public Vector2 damage;
public Vector2 position;
public Color blinkColor;
public GameObject damagingWeapon;
public Player damagingPlayer;
public bool healthRemoval;
public bool lethal;
public bool ignoreBlock;
public DamageDealSecond(float timeToDealDamage, Vector2 damage, Vector2 position, Color blinkColor, GameObject damagingWeapon, Player damagingPlayer, bool healthRemoval, bool lethal, bool ignoreBlock)
{
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_0016: 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_001e: Unknown result type (might be due to invalid IL or missing references)
this.timeToDealDamage = timeToDealDamage;
this.damage = damage;
this.position = position;
this.blinkColor = blinkColor;
this.damagingWeapon = damagingWeapon;
this.damagingPlayer = damagingPlayer;
this.healthRemoval = healthRemoval;
this.lethal = lethal;
this.ignoreBlock = ignoreBlock;
}
}
public class PlayerStats : Object
{
public float damage;
public float attackSpeed;
public float movementSpeed;
public float cooldown;
public float maxHealth;
public float health;
public PlayerStats(CharacterData data)
{
Copy(data);
}
public void Copy(CharacterData data)
{
damage = data.weaponHandler.gun.damage;
attackSpeed = data.weaponHandler.gun.attackSpeed;
movementSpeed = data.stats.movementSpeed;
cooldown = data.block.cooldown;
maxHealth = data.maxHealth;
health = data.health;
}
}
}
public class TabinfoInterface : Object
{
public static void Setup()
{
StatCategory obj = TabInfoManager.RegisterCategory("Soulstreak Stats", 7);
TabInfoManager.RegisterStat(obj, "Health Multiply Per Kill", (Func<Player, bool>)((Player p) => (Object)(object)((Component)p).GetComponentInChildren<SoulstreakMono>() != (Object)null && ((Component)p).GetComponentInChildren<SoulstreakMono>().soulstreakStats.HealthMultiplyPerKill != 1f), (Func<Player, string>)((Player p) => String.Format("{0:0}%", (object)(((Component)p).GetComponentInChildren<SoulstreakMono>().soulstreakStats.HealthMultiplyPerKill * 100f))));
TabInfoManager.RegisterStat(obj, "Heal Percentage Per Kill", (Func<Player, bool>)((Player p) => (Object)(object)((Component)p).GetComponentInChildren<SoulstreakMono>() != (Object)null && ((Component)p).GetComponentInChildren<SoulstreakMono>().soulstreakStats.HealPercentagePerKill != 0f), (Func<Player, string>)((Player p) => String.Format("{0:0}%", (object)(((Component)p).GetComponentInChildren<SoulstreakMono>().soulstreakStats.HealPercentagePerKill * 100f))));
TabInfoManager.RegisterStat(obj, "Soul Armor Percentage", (Func<Player, bool>)((Player p) => (Object)(object)((Component)p).GetComponentInChildren<SoulstreakMono>() != (Object)null && ((Component)p).GetComponentInChildren<SoulstreakMono>().soulstreakStats.soulArmorPercentage != 0f), (Func<Player, string>)((Player p) => String.Format("{0:0}%", (object)(((Component)p).GetComponentInChildren<SoulstreakMono>().soulstreakStats.soulArmorPercentage * 100f))));
TabInfoManager.RegisterStat(obj, "Soul Armor Percentage Regen Rate", (Func<Player, bool>)((Player p) => (Object)(object)((Component)p).GetComponentInChildren<SoulstreakMono>() != (Object)null && ((Component)p).GetComponentInChildren<SoulstreakMono>().soulstreakStats.soulArmorPercentageRegenRate != 0f), (Func<Player, string>)((Player p) => String.Format("{0:0}%", (object)(((Component)p).GetComponentInChildren<SoulstreakMono>().soulstreakStats.soulArmorPercentageRegenRate * 100f))));
TabInfoManager.RegisterStat(obj, "Damage Multiply Per Kill", (Func<Player, bool>)((Player p) => (Object)(object)((Component)p).GetComponentInChildren<SoulstreakMono>() != (Object)null && ((Component)p).GetComponentInChildren<SoulstreakMono>().soulstreakStats.DamageMultiplyPerKill != 1f), (Func<Player, string>)((Player p) => String.Format("{0:0}%", (object)(((Component)p).GetComponentInChildren<SoulstreakMono>().soulstreakStats.DamageMultiplyPerKill * 100f))));
TabInfoManager.RegisterStat(obj, "ATK Speed Multiply Per Kill", (Func<Player, bool>)((Player p) => (Object)(object)((Component)p).GetComponentInChildren<SoulstreakMono>() != (Object)null && ((Component)p).GetComponentInChildren<SoulstreakMono>().soulstreakStats.ATKSpeedMultiplyPerKill != 1f), (Func<Player, string>)((Player p) => String.Format("{0:0}%", (object)(((Component)p).GetComponentInChildren<SoulstreakMono>().soulstreakStats.ATKSpeedMultiplyPerKill * 100f))));
TabInfoManager.RegisterStat(obj, "Movement Speed Multiply Per Kill", (Func<Player, bool>)((Player p) => (Object)(object)((Component)p).GetComponentInChildren<SoulstreakMono>() != (Object)null && ((Component)p).GetComponentInChildren<SoulstreakMono>().soulstreakStats.MovementSpeedMultiplyPerKill != 1f), (Func<Player, string>)((Player p) => String.Format("{0:0}%", (object)(((Component)p).GetComponentInChildren<SoulstreakMono>().soulstreakStats.MovementSpeedMultiplyPerKill * 100f))));
TabInfoManager.RegisterStat(obj, "Block Cooldown Multiply Per Kill", (Func<Player, bool>)((Player p) => (Object)(object)((Component)p).GetComponentInChildren<SoulstreakMono>() != (Object)null && ((Component)p).GetComponentInChildren<SoulstreakMono>().soulstreakStats.BlockCooldownMultiplyPerKill != 1f), (Func<Player, string>)((Player p) => String.Format("{0:0}%", (object)(((Component)p).GetComponentInChildren<SoulstreakMono>().soulstreakStats.BlockCooldownMultiplyPerKill * 100f))));
TabInfoManager.RegisterStat(obj, "Souls", (Func<Player, bool>)((Player p) => (Object)(object)((Component)p).GetComponentInChildren<SoulstreakMono>() != (Object)null && ((Component)p).GetComponentInChildren<SoulstreakMono>().killsStreak != 0), (Func<Player, string>)((Player p) => String.Format("{0}", (object)((Component)p).GetComponentInChildren<SoulstreakMono>().killsStreak)));
}
}
[Serializable]
public class AAStatsModifiers : MonoBehaviour
{
[Header("Soulstreak Values")]
public float DamageMultiplyPerKill;
public float MovementSpeedMultiplyPerKill;
public float ATKSpeedMultiplyPerKill;
public float BlockCooldownMultiplyPerKill;
public float HealthMultiplyPerKill;
public float MaxMultiplyPerKill;
public float HealPercentagePerKill;
[Header("Soulstreak Soul Shield")]
public float soulShieldPercentage;
public float soulShieldPercentageRegen;
}
public static class Utils : Object
{
public static bool logging = ConfigHandler.DebugMode.Value;
public static void LogInfo(string message)
{
if (logging)
{
Debug.Log((object)message);
}
}
public static void LogWarn(string message)
{
if (logging)
{
Debug.LogWarning((object)message);
}
}
public static void LogError(string message)
{
if (logging)
{
Debug.LogError((object)message);
}
}
public static int CountOfAliveEnemyPlayers(Player player)
{
return PlayerStatus.GetEnemyPlayers(player).FindAll((Predicate<Player>)((Player __player) => !__player.data.dead)).Count;
}
}
}
namespace AALUND13Card.Patchs
{
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
public class CharacterStatModifiersPatch : Object
{
[HarmonyPatch("ResetStats")]
[HarmonyPrefix]
public static void ResetStats(CharacterStatModifiers __instance)
{
//IL_0015: 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_0020: Expected O, but got Unknown
//IL_002a: Unknown result type (might be due to invalid IL or missing references)
//IL_0030: Expected O, but got Unknown
//IL_003f: Expected O, but got Unknown
CharacterData val = (CharacterData)Traverse.Create((object)__instance).Field("data").GetValue();
CharacterDataExtensions.GetAdditionalData(val).secondToDealDamage = 0f;
CharacterDataExtensions.GetAdditionalData(val).DamageDealSecond = new List<Classes.DamageDealSecond>();
CharacterDataExtensions.GetAdditionalData(val).dealDamage = true;
}
}
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
public class HealthHandlerPatch : Object
{
[HarmonyPatch("DoDamage")]
[HarmonyPrefix]
[HarmonyBefore(new string[] { "com.aalund13.rounds.jarl" })]
public static void DoDamage(HealthHandler __instance, ref Vector2 damage, Vector2 position, Color blinkColor, GameObject damagingWeapon, Player damagingPlayer, bool healthRemoval, bool lethal, bool ignoreBlock)
{
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_001b: 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)
//IL_0070: Unknown result type (might be due to invalid IL or missing references)
//IL_0086: Unknown result type (might be due to invalid IL or missing references)
//IL_008b: Unknown result type (might be due to invalid IL or missing references)
CharacterData val = (CharacterData)Traverse.Create((object)__instance).Field("data").GetValue();
ExtensionMethods.GetOrAddComponent<DeathHandler>(((Component)val).gameObject, false).PlayerTakeDamage(damagingPlayer);
if (val.GetAdditionalData().secondToDealDamage > 0f && !val.GetAdditionalData().dealDamage)
{
val.GetAdditionalData().DamageDealSecond.Add(new Classes.DamageDealSecond(Time.time + val.GetAdditionalData().secondToDealDamage, damage, position, blinkColor, damagingWeapon, damagingPlayer, healthRemoval, lethal, ignoreBlock));
damage = Vector2.zero;
}
else if (val.GetAdditionalData().dealDamage)
{
val.GetAdditionalData().dealDamage = false;
}
}
[HarmonyPatch("RPCA_Die")]
[HarmonyPrefix]
public static void RPCA_Die(Player ___player, Vector2 deathDirection)
{
if (!___player.data.dead)
{
ExtensionMethods.GetOrAddComponent<DeathHandler>(((Component)___player).gameObject, false).PlayerDied();
___player.data.GetAdditionalData().DamageDealSecond.Clear();
}
}
[HarmonyPatch("RPCA_Die_Phoenix")]
[HarmonyPrefix]
public static void RPCA_Die_Phoenix(HealthHandler __instance, Player ___player, Vector2 deathDirection)
{
if (!___player.data.dead && !__instance.isRespawning)
{
ExtensionMethods.GetOrAddComponent<DeathHandler>(((Component)___player).gameObject, false).PlayerDied();
___player.data.GetAdditionalData().DamageDealSecond.Clear();
}
}
[HarmonyPatch("Update")]
[HarmonyPrefix]
public static void Update(HealthHandler __instance)
{
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_001b: Expected O, but got Unknown
//IL_0087: 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_0093: Unknown result type (might be due to invalid IL or missing references)
CharacterData val = (CharacterData)Traverse.Create((object)__instance).Field("data").GetValue();
if (val.GetAdditionalData().DamageDealSecond.Count != 0 && Enumerable.First<Classes.DamageDealSecond>((IEnumerable<Classes.DamageDealSecond>)(object)val.GetAdditionalData().DamageDealSecond).timeToDealDamage < Time.time)
{
Classes.DamageDealSecond damageDealSecond = Enumerable.First<Classes.DamageDealSecond>((IEnumerable<Classes.DamageDealSecond>)(object)val.GetAdditionalData().DamageDealSecond);
val.GetAdditionalData().DamageDealSecond.RemoveAt(0);
if (val.isPlaying)
{
val.GetAdditionalData().dealDamage = true;
val.healthHandler.DoDamage(damageDealSecond.damage, damageDealSecond.position, damageDealSecond.blinkColor, damageDealSecond.damagingWeapon, damageDealSecond.damagingPlayer, damageDealSecond.healthRemoval, damageDealSecond.lethal, damageDealSecond.ignoreBlock);
}
}
}
[HarmonyPatch("Revive")]
[HarmonyPostfix]
public static void Revive(CharacterData ___data)
{
___data.GetAdditionalData().DamageDealSecond.Clear();
}
}
}
namespace AALUND13Card.Handler
{
[Serializable]
public class LastDamagingPlayer : Object
{
public int playerID;
public float timeSinceDamage;
public LastDamagingPlayer(int playerID, float timeSinceDamage)
{
this.playerID = playerID;
this.timeSinceDamage = timeSinceDamage;
}
public Vector2 ToVector2()
{
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
return new Vector2((float)playerID, timeSinceDamage);
}
public static LastDamagingPlayer FromVector2(Vector2 vector)
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
return new LastDamagingPlayer((int)vector.x, vector.y);
}
}
public static class Vector2Extensions : Object
{
public static LastDamagingPlayer ToLastDamagingPlayer(this Vector2 vector)
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
return LastDamagingPlayer.FromVector2(vector);
}
public static Vector2 ToVector2(this LastDamagingPlayer player)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
return player.ToVector2();
}
}
public class DeathHandler : MonoBehaviour
{
[CompilerGenerated]
private sealed class <>c__DisplayClass1_0 : Object
{
public Player damagingPlayer;
internal bool <PlayerTakeDamage>b__0(LastDamagingPlayer playerID)
{
return playerID.playerID == damagingPlayer.playerID;
}
}
[CompilerGenerated]
private sealed class <>c__DisplayClass2_0 : Object
{
public LastDamagingPlayer lastDamagingPlayer;
internal bool <RPCA_PlayerDied>b__0(Player player)
{
return player.playerID == lastDamagingPlayer.playerID;
}
}
public List<LastDamagingPlayer> damagingPlayerList = new List<LastDamagingPlayer>();
public void PlayerTakeDamage(Player damagingPlayer)
{
<>c__DisplayClass1_0 CS$<>8__locals0 = new <>c__DisplayClass1_0();
CS$<>8__locals0.damagingPlayer = damagingPlayer;
if (!((Object)(object)CS$<>8__locals0.damagingPlayer == (Object)null))
{
LastDamagingPlayer lastDamagingPlayer = Enumerable.FirstOrDefault<LastDamagingPlayer>((IEnumerable<LastDamagingPlayer>)(object)damagingPlayerList, (Func<LastDamagingPlayer, bool>)((LastDamagingPlayer playerID) => playerID.playerID == CS$<>8__locals0.damagingPlayer.playerID));
if (lastDamagingPlayer != null)
{
lastDamagingPlayer.timeSinceDamage = Time.time;
}
else
{
damagingPlayerList.Add(new LastDamagingPlayer(CS$<>8__locals0.damagingPlayer.playerID, Time.time));
}
}
}
[PunRPC]
public void RPCA_PlayerDied(Vector2[] vectorNewDamagingPlayerList)
{
//IL_000e: 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_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_002b: Unknown result type (might be due to invalid IL or missing references)
//IL_0030: Unknown result type (might be due to invalid IL or missing references)
List<LastDamagingPlayer> val = new List<LastDamagingPlayer>();
foreach (Vector2 vector in vectorNewDamagingPlayerList)
{
val.Add(vector.ToLastDamagingPlayer());
}
Enumerator<LastDamagingPlayer> enumerator = val.GetEnumerator();
try
{
while (enumerator.MoveNext())
{
<>c__DisplayClass2_0 CS$<>8__locals0 = new <>c__DisplayClass2_0();
CS$<>8__locals0.lastDamagingPlayer = enumerator.Current;
Player val2 = PlayerManager.instance.players.Find((Predicate<Player>)((Player player) => player.playerID == CS$<>8__locals0.lastDamagingPlayer.playerID));
if (CS$<>8__locals0.lastDamagingPlayer.timeSinceDamage <= 5f && (Object)(object)((Component)val2).GetComponentInChildren<SoulstreakMono>() != (Object)null && !val2.data.dead)
{
((Component)val2).GetComponentInChildren<SoulstreakMono>().AddKill();
if ((Object)(object)((Component)this).GetComponentInChildren<SoulstreakMono>() != (Object)null)
{
((Component)val2).GetComponentInChildren<SoulstreakMono>().AddKill((int)((float)((Component)this).GetComponentInChildren<SoulstreakMono>().killsStreak * 0.5f));
((Component)this).GetComponentInChildren<SoulstreakMono>().ResetKill();
}
}
}
}
finally
{
((IDisposable)enumerator).Dispose();
}
if ((Object)(object)((Component)this).GetComponentInChildren<SoulstreakMono>() != (Object)null)
{
((Component)this).GetComponentInChildren<SoulstreakMono>().ResetKill();
}
}
public void PlayerDied()
{
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
//IL_0028: Unknown result type (might be due to invalid IL or missing references)
//IL_0047: Unknown result type (might be due to invalid IL or missing references)
if (!PhotonNetwork.IsMasterClient && !PhotonNetwork.OfflineMode)
{
return;
}
List<Vector2> val = new List<Vector2>();
float time = Time.time;
Enumerator<LastDamagingPlayer> enumerator = damagingPlayerList.GetEnumerator();
try
{
while (enumerator.MoveNext())
{
LastDamagingPlayer current = enumerator.Current;
val.Add(new LastDamagingPlayer(current.playerID, time - current.timeSinceDamage).ToVector2());
}
}
finally
{
((IDisposable)enumerator).Dispose();
}
((Component)this).GetComponent<Player>().data.view.RPC("RPCA_PlayerDied", (RpcTarget)0, (object[])(object)new Object[1] { (Object)val.ToArray() });
}
}
}
namespace AALUND13Card.MonoBehaviours
{
public class SoulstreakDrain : MonoBehaviour
{
private SoulstreakMono soulstreak;
private SoulStreakStats soulstreakStats;
private DealDamageToPlayer dealDamageToPlayer;
private Player player;
public void Start()
{
soulstreak = ((Component)((Component)this).transform.parent).GetComponentInChildren<SoulstreakMono>();
if ((Object)(object)soulstreak != (Object)null)
{
soulstreakStats = soulstreak.soulstreakStats;
player = soulstreak.player;
}
dealDamageToPlayer = ((Component)this).GetComponent<DealDamageToPlayer>();
}
public void Update()
{
if (soulstreakStats != null)
{
dealDamageToPlayer.damage = player.data.weaponHandler.gun.damage * 55f * soulstreakStats.SoulDrainMultiply;
}
}
public void Heal()
{
player.data.healthHandler.Heal(player.data.weaponHandler.gun.damage * 55f * soulstreakStats.SoulDrainMultiply * 0.25f);
}
}
public enum AbilityType : Enum
{
none,
armor
}
[Serializable]
public class SoulStreakStats : Object
{
[Header("Health")]
public float HealthMultiplyPerKill = 1f;
public float HealPercentagePerKill;
[Header("Soul Armor")]
public float soulArmorPercentage;
public float soulArmorPercentageRegenRate;
[Header("Gun")]
public float DamageMultiplyPerKill = 1f;
public float ATKSpeedMultiplyPerKill = 1f;
[Header("Other")]
public float MovementSpeedMultiplyPerKill = 1f;
public float BlockCooldownMultiplyPerKill = 1f;
public AbilityType abilityType;
public float SoulDrainMultiply;
public void AddStats(SoulStreakStats soulStreakStats)
{
ATKSpeedMultiplyPerKill = Mathf.Max(ATKSpeedMultiplyPerKill + soulStreakStats.ATKSpeedMultiplyPerKill, 0.5f);
BlockCooldownMultiplyPerKill = Mathf.Max(BlockCooldownMultiplyPerKill + soulStreakStats.BlockCooldownMultiplyPerKill, 0.5f);
DamageMultiplyPerKill = Mathf.Max(DamageMultiplyPerKill + soulStreakStats.DamageMultiplyPerKill, 0.5f);
MovementSpeedMultiplyPerKill = Mathf.Max(MovementSpeedMultiplyPerKill + soulStreakStats.MovementSpeedMultiplyPerKill, 0.5f);
HealthMultiplyPerKill = Mathf.Max(HealthMultiplyPerKill + soulStreakStats.HealthMultiplyPerKill, 0.5f);
HealPercentagePerKill += soulStreakStats.HealPercentagePerKill;
soulArmorPercentage += soulStreakStats.soulArmorPercentage;
soulArmorPercentageRegenRate += soulStreakStats.soulArmorPercentageRegenRate;
SoulDrainMultiply += soulStreakStats.SoulDrainMultiply;
if (soulStreakStats.abilityType != 0)
{
abilityType = soulStreakStats.abilityType;
}
}
}
public class SoulstreakMono : MonoBehaviour
{
public SoulStreakStats soulstreakStats = new SoulStreakStats();
public float abilityCooldown;
public int killsStreak;
public Player player;
private bool alreadySetBaseStats = true;
public bool abilityActive;
public bool canResetKills = true;
public Classes.PlayerStats baseCharacterData;
public GameObject soulsCounter;
public GameObject soulsCounterGUI;
private void Start()
{
//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
player = ((Component)((Component)this).gameObject.transform.parent).GetComponent<Player>();
baseCharacterData = new Classes.PlayerStats(player.data);
soulsCounter = Object.Instantiate<GameObject>(soulsCounter);
if (player.data.view.IsMine && !((Behaviour)((Component)player).GetComponent<PlayerAPI>()).enabled)
{
soulsCounterGUI = Object.Instantiate<GameObject>(soulsCounterGUI);
soulsCounterGUI.transform.SetParent(((Component)player).transform.parent);
}
player.data.SetWobbleObjectChild(soulsCounter.transform);
soulsCounter.transform.localPosition = Vector2.op_Implicit(new Vector2(0f, 0.3f));
}
private void OnDestroy()
{
if (player.data.view.IsMine && !((Behaviour)((Component)player).GetComponent<PlayerAPI>()).enabled)
{
Object.Destroy((Object)(object)soulsCounterGUI);
}
Object.Destroy((Object)(object)soulsCounter);
}
private void Update()
{
if (player.data.isPlaying)
{
abilityCooldown = Mathf.Max(abilityCooldown - Time.deltaTime, 0f);
if (ArmorUtils.GetArmorByType(((Component)this).GetComponentInParent<ArmorHandler>(), "Soul").currentArmorValue <= 0f && ArmorUtils.GetArmorByType(((Component)this).GetComponentInParent<ArmorHandler>(), "Soul").maxArmorValue > 0f)
{
ArmorUtils.GetArmorByType(((Component)this).GetComponentInParent<ArmorHandler>(), "Soul").maxArmorValue = 0f;
abilityCooldown = 10f;
abilityActive = false;
}
}
((TMP_Text)soulsCounter.GetComponent<TextMeshPro>()).text = String.Concat("Soul : ", ((Int32)(ref killsStreak)).ToString());
if (player.data.view.IsMine && !((Behaviour)((Component)player).GetComponent<PlayerAPI>()).enabled)
{
((TMP_Text)soulsCounterGUI.GetComponentInChildren<TextMeshProUGUI>()).text = String.Concat("Soul : ", ((Int32)(ref killsStreak)).ToString());
}
}
public void BlockAbility()
{
if (soulstreakStats.abilityType == AbilityType.armor && !abilityActive && abilityCooldown == 0f)
{
ArmorBase armorByType = ArmorUtils.GetArmorByType(((Component)this).GetComponentInParent<ArmorHandler>(), "Soul");
armorByType.maxArmorValue = player.data.maxHealth * soulstreakStats.soulArmorPercentage * (float)(killsStreak + 1);
armorByType.armorRegenerationRate = armorByType.maxArmorValue * soulstreakStats.soulArmorPercentageRegenRate;
armorByType.currentArmorValue = armorByType.maxArmorValue;
abilityActive = true;
}
}
public void ResetToBase()
{
alreadySetBaseStats = true;
player.data.weaponHandler.gun.damage = baseCharacterData.damage;
player.data.weaponHandler.gun.attackSpeed = baseCharacterData.attackSpeed;
player.data.stats.movementSpeed = baseCharacterData.movementSpeed;
player.data.block.cooldown = baseCharacterData.cooldown;
player.data.maxHealth = baseCharacterData.maxHealth;
player.data.health = baseCharacterData.health;
((MethodBase)AccessTools.Method(typeof(CharacterStatModifiers), "ConfigureMassAndSize", (Type[])null, (Type[])null)).Invoke((object)player.data.stats, (object[])null);
}
public void SetToBaseStats()
{
if (killsStreak > 0 && !alreadySetBaseStats)
{
alreadySetBaseStats = true;
Gun gun = player.data.weaponHandler.gun;
gun.damage *= 1f / (1f + (soulstreakStats.DamageMultiplyPerKill - 1f) * (float)killsStreak);
Gun gun2 = player.data.weaponHandler.gun;
gun2.attackSpeed *= 1f / (1f + (soulstreakStats.ATKSpeedMultiplyPerKill - 1f) * (float)killsStreak);
CharacterStatModifiers stats = player.data.stats;
stats.movementSpeed *= 1f / (1f + (soulstreakStats.MovementSpeedMultiplyPerKill - 1f) * (float)killsStreak);
Block block = player.data.block;
block.cooldown *= 1f / (1f + (soulstreakStats.BlockCooldownMultiplyPerKill - 1f) * (float)killsStreak);
CharacterData data = player.data;
data.maxHealth *= 1f / (1f + (soulstreakStats.HealthMultiplyPerKill - 1f) * (float)killsStreak);
CharacterData data2 = player.data;
data2.health *= 1f / (1f + (soulstreakStats.HealthMultiplyPerKill - 1f) * (float)killsStreak);
((MethodBase)AccessTools.Method(typeof(CharacterStatModifiers), "ConfigureMassAndSize", (Type[])null, (Type[])null)).Invoke((object)player.data.stats, (object[])null);
}
}
public void SetStats()
{
if (killsStreak > 0 && alreadySetBaseStats)
{
alreadySetBaseStats = false;
Gun gun = player.data.weaponHandler.gun;
gun.damage *= 1f + (soulstreakStats.DamageMultiplyPerKill - 1f) * (float)killsStreak;
Gun gun2 = player.data.weaponHandler.gun;
gun2.attackSpeed *= 1f + (soulstreakStats.ATKSpeedMultiplyPerKill - 1f) * (float)killsStreak;
CharacterStatModifiers stats = player.data.stats;
stats.movementSpeed *= 1f + (soulstreakStats.MovementSpeedMultiplyPerKill - 1f) * (float)killsStreak;
Block block = player.data.block;
block.cooldown *= 1f + (soulstreakStats.BlockCooldownMultiplyPerKill - 1f) * (float)killsStreak;
CharacterData data = player.data;
data.maxHealth *= 1f + (soulstreakStats.HealthMultiplyPerKill - 1f) * (float)killsStreak;
CharacterData data2 = player.data;
data2.health *= 1f + (soulstreakStats.HealthMultiplyPerKill - 1f) * (float)killsStreak;
((MethodBase)AccessTools.Method(typeof(CharacterStatModifiers), "ConfigureMassAndSize", (Type[])null, (Type[])null)).Invoke((object)player.data.stats, (object[])null);
}
player.data.healthHandler.Heal(player.data.maxHealth * soulstreakStats.HealPercentagePerKill);
}
public void ResetKill()
{
if (canResetKills)
{
Utils.LogInfo(String.Format("Resetting kill streak of player with ID {0}", (object)player.playerID));
SetToBaseStats();
killsStreak = 0;
if (player.data.view.IsMine)
{
((TMP_Text)soulsCounterGUI.GetComponentInChildren<TextMeshProUGUI>()).text = "Soul: 0";
}
}
}
public void AddKill(int kills = 1)
{
if (canResetKills)
{
Utils.LogInfo(String.Format("Adding {0} kills for player with ID {1}", (object)kills, (object)player.playerID));
SetToBaseStats();
killsStreak += kills;
SetStats();
}
}
}
}
namespace AALUND13Card.Extensions
{
public class AALUND13CardCharacterDataAdditionalData : Object
{
public float secondToDealDamage;
public List<Classes.DamageDealSecond> DamageDealSecond;
public bool dealDamage;
public AALUND13CardCharacterDataAdditionalData()
{
secondToDealDamage = 0f;
DamageDealSecond = new List<Classes.DamageDealSecond>();
dealDamage = true;
}
}
public static class CharacterDataExtensions : Object
{
public static readonly ConditionalWeakTable<CharacterData, AALUND13CardCharacterDataAdditionalData> data = new ConditionalWeakTable<CharacterData, AALUND13CardCharacterDataAdditionalData>();
public static AALUND13CardCharacterDataAdditionalData GetAdditionalData(this CharacterData block)
{
return data.GetOrCreateValue(block);
}
public static void AddData(this CharacterData block, AALUND13CardCharacterDataAdditionalData value)
{
try
{
data.Add(block, value);
}
catch (Exception)
{
}
}
}
}
namespace AALUND13Card.CustomCards
{
public class CustomCardAACard : CustomCardUnity
{
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
CardInfoExtension.GetAdditionalData(cardInfo).canBeReassigned = false;
}
public override string GetModName()
{
return "AAC";
}
}
public class CustomCardNumb : CustomCardAACard
{
public float secondToDealDamage = 5f;
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
player.data.GetAdditionalData().dealDamage = false;
player.data.GetAdditionalData().secondToDealDamage += secondToDealDamage;
}
}
public class CustomCardRandomPicker : CustomCardAACard
{
public List<string> randomCardsToChoseFrom = new List<string>();
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
if (PhotonNetwork.OfflineMode || PhotonNetwork.IsMasterClient)
{
CardInfo component = ExtensionMethods.GetRandom<GameObject>((IList)(object)CardResgester.GetCardsFormString(randomCardsToChoseFrom)).GetComponent<CardInfo>();
Cards.instance.AddCardToPlayer(player, component, true, "", 2f, 2f, true);
CardBarUtils.instance.ShowAtEndOfPhase(player, component);
}
}
}
public class CustomCardSoulstreakStats : CustomCardAACard
{
[CompilerGenerated]
private sealed class <>c__DisplayClass10_0 : Object
{
public Player player;
public CustomCardSoulstreakStats <>4__this;
internal void <OnAddCard>b__0()
{
SoulstreakMono componentInChildren = ((Component)player).gameObject.GetComponentInChildren<SoulstreakMono>();
SoulStreakStats soulStreakStats = new SoulStreakStats
{
HealthMultiplyPerKill = <>4__this.HealthMultiplyPerKill,
HealPercentagePerKill = <>4__this.HealPercentagePerKill,
soulArmorPercentage = <>4__this.soulArmorPercentage,
soulArmorPercentageRegenRate = <>4__this.soulArmorPercentageRegenRate,
DamageMultiplyPerKill = <>4__this.DamageMultiplyPerKill,
ATKSpeedMultiplyPerKill = <>4__this.ATKSpeedMultiplyPerKill,
MovementSpeedMultiplyPerKill = <>4__this.MovementSpeedMultiplyPerKill,
BlockCooldownMultiplyPerKill = <>4__this.BlockCooldownMultiplyPerKill,
abilityType = <>4__this.abilityType,
SoulDrainMultiply = <>4__this.SoulDrainMultiply
};
componentInChildren.soulstreakStats.AddStats(soulStreakStats);
}
}
[Header("Health")]
public float HealthMultiplyPerKill;
public float HealPercentagePerKill;
[Header("Soul Armor")]
public float soulArmorPercentage;
public float soulArmorPercentageRegenRate;
[Header("Gun")]
public float DamageMultiplyPerKill;
public float ATKSpeedMultiplyPerKill;
[Header("Other")]
public float MovementSpeedMultiplyPerKill;
public float BlockCooldownMultiplyPerKill;
public AbilityType abilityType;
public float SoulDrainMultiply;
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
//IL_0021: Unknown result type (might be due to invalid IL or missing references)
//IL_002b: Expected O, but got Unknown
<>c__DisplayClass10_0 CS$<>8__locals0 = new <>c__DisplayClass10_0();
CS$<>8__locals0.player = player;
CS$<>8__locals0.<>4__this = this;
ExtensionMethods.ExecuteAfterFrames((MonoBehaviour)(object)AALUND13_Cards.Instance, 2, (Action)delegate
{
SoulstreakMono componentInChildren = ((Component)CS$<>8__locals0.player).gameObject.GetComponentInChildren<SoulstreakMono>();
SoulStreakStats soulStreakStats = new SoulStreakStats
{
HealthMultiplyPerKill = CS$<>8__locals0.<>4__this.HealthMultiplyPerKill,
HealPercentagePerKill = CS$<>8__locals0.<>4__this.HealPercentagePerKill,
soulArmorPercentage = CS$<>8__locals0.<>4__this.soulArmorPercentage,
soulArmorPercentageRegenRate = CS$<>8__locals0.<>4__this.soulArmorPercentageRegenRate,
DamageMultiplyPerKill = CS$<>8__locals0.<>4__this.DamageMultiplyPerKill,
ATKSpeedMultiplyPerKill = CS$<>8__locals0.<>4__this.ATKSpeedMultiplyPerKill,
MovementSpeedMultiplyPerKill = CS$<>8__locals0.<>4__this.MovementSpeedMultiplyPerKill,
BlockCooldownMultiplyPerKill = CS$<>8__locals0.<>4__this.BlockCooldownMultiplyPerKill,
abilityType = CS$<>8__locals0.<>4__this.abilityType,
SoulDrainMultiply = CS$<>8__locals0.<>4__this.SoulDrainMultiply
};
componentInChildren.soulstreakStats.AddStats(soulStreakStats);
});
}
}
}
namespace AALUND13Card.Armors
{
public class SoulArmor : ArmorBase
{
public override string GetArmorType()
{
return "Soul";
}
public override BarColor GetBarColor()
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
//IL_000a: Unknown result type (might be due to invalid IL or missing references)
//IL_000f: 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_001e: Unknown result type (might be due to invalid IL or missing references)
//IL_0024: Expected O, but got Unknown
return new BarColor(Color.magenta * 0.6f, Color.magenta * 0.45f);
}
public override void OnRespawn()
{
SoulstreakMono componentInChildren = ((Component)base.armorHandler).GetComponentInChildren<SoulstreakMono>();
if ((Object)(object)componentInChildren != (Object)null)
{
base.maxArmorValue = 0f;
base.currentArmorValue = 0f;
componentInChildren.abilityCooldown = 0f;
componentInChildren.abilityActive = false;
}
}
public override void SetupArmor()
{
base.armorRegenCooldownSeconds = 5f;
}
}
}