using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using HarmonyLib;
using JJKCardsMod.Cards;
using Microsoft.CodeAnalysis;
using UnboundLib;
using UnboundLib.Cards;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(/*Could not decode attribute arguments.*/)]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = "")]
[assembly: SecurityPermission(8, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
[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;
}
}
}
namespace JJKCardsMod
{
[BepInPlugin("com.lennox.rounds.jjkcards", "JJK Cursed Techniques", "1.1.0")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class JJKCardsPlugin : BaseUnityPlugin
{
[CompilerGenerated]
private static class <>O : Object
{
public static PhotonEvent <0>__OnBoogieWoogieSwapEvent;
public static PhotonEvent <1>__OnInfiniteVoidEvent;
}
private const string ModId = "com.lennox.rounds.jjkcards";
private const string ModName = "JJK Cursed Techniques";
private const string Version = "1.1.0";
private void Awake()
{
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
new Harmony("com.lennox.rounds.jjkcards").PatchAll();
}
private void Start()
{
//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_003a: Unknown result type (might be due to invalid IL or missing references)
//IL_003f: Unknown result type (might be due to invalid IL or missing references)
//IL_0045: Expected O, but got Unknown
object obj = <>O.<0>__OnBoogieWoogieSwapEvent;
if (obj == null)
{
PhotonEvent val = BoogieWoogieBehaviour.OnBoogieWoogieSwapEvent;
<>O.<0>__OnBoogieWoogieSwapEvent = val;
obj = (object)val;
}
NetworkingManager.RegisterEvent("JJKCardsMod_BoogieWoogie_Swap", (PhotonEvent)obj);
object obj2 = <>O.<1>__OnInfiniteVoidEvent;
if (obj2 == null)
{
PhotonEvent val2 = InfiniteVoidBehaviour.OnInfiniteVoidEvent;
<>O.<1>__OnInfiniteVoidEvent = val2;
obj2 = (object)val2;
}
NetworkingManager.RegisterEvent("JJKCardsMod_InfiniteVoid_Activate", (PhotonEvent)obj2);
CustomCard.BuildCard<MahoragaCard>();
CustomCard.BuildCard<InfinityCard>();
CustomCard.BuildCard<BoogieWoogieCard>();
CustomCard.BuildCard<DismantleCard>();
CustomCard.BuildCard<RatioCard>();
CustomCard.BuildCard<PiercingBloodCard>();
CustomCard.BuildCard<BlueCard>();
CustomCard.BuildCard<RedCard>();
CustomCard.BuildCard<HollowPurpleCard>();
CustomCard.BuildCard<InfiniteVoidCard>();
}
}
public static class JJKCardHelper : Object
{
public static void SetUniqueCategory(CardInfo cardInfo)
{
//IL_00ae: Expected O, but got Unknown
try
{
Type type = Type.GetType("CardChoiceSpawnUniqueCardPatch.CustomCategories.CustomCardCategories, CardChoiceSpawnUniqueCardPatch");
if (!(type != (Type)null))
{
return;
}
FieldInfo field = type.GetField("instance", (BindingFlags)24);
object obj = ((field != null) ? field.GetValue((object)null) : null);
if (obj == null)
{
return;
}
MethodInfo method = type.GetMethod("CardCategory", (Type[])(object)new Type[1] { typeof(String) });
object obj2 = ((method != null) ? ((MethodBase)method).Invoke(obj, (object[])(object)new Object[1] { (Object)"JJKCursedTechnique" }) : null);
if (obj2 != null)
{
Array val = Array.CreateInstance(obj2.GetType(), 1);
val.SetValue(obj2, 0);
FieldInfo field2 = typeof(CardInfo).GetField("blacklistedCategories", (BindingFlags)20);
if (field2 != null)
{
field2.SetValue((object)cardInfo, (object)val);
}
}
}
catch (Exception val2)
{
Exception val3 = val2;
Debug.LogWarning((object)String.Concat("[JJKCards] Failed to set custom card categories: ", val3.Message));
}
}
}
}
namespace JJKCardsMod.Cards
{
public class BlueCard : CustomCard
{
protected override string GetTitle()
{
return "Lapse: Blue";
}
protected override string GetDescription()
{
return "Your bullets pull enemies towards them. Fired bullets create a gravity well that attracts nearby opponents.";
}
protected override Rarity GetRarity()
{
return (Rarity)1;
}
protected override CardInfoStat[] GetStats()
{
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_002a: Unknown result type (might be due to invalid IL or missing references)
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[1]
{
new CardInfoStat
{
positive = true,
stat = "Bullet Pull",
amount = "Yes",
simepleAmount = (SimpleAmount)0
}
};
}
public override string GetModName()
{
return "JJK Cursed Techniques";
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)7;
}
protected override GameObject GetCardArt()
{
return null;
}
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
gun.projectileColor = Color.cyan;
JJKCardHelper.SetUniqueCategory(cardInfo);
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
BlueBehaviour blueBehaviour = ((Component)player).gameObject.GetComponent<BlueBehaviour>();
if ((Object)(object)blueBehaviour == (Object)null)
{
blueBehaviour = ((Component)player).gameObject.AddComponent<BlueBehaviour>();
}
blueBehaviour.gun = gun;
blueBehaviour.player = player;
}
public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
BlueBehaviour component = ((Component)player).gameObject.GetComponent<BlueBehaviour>();
if ((Object)(object)component != (Object)null)
{
Object.Destroy((Object)(object)component);
}
}
}
public class BlueBehaviour : MonoBehaviour
{
public Gun gun;
public Player player;
private void Start()
{
if ((Object)(object)gun != (Object)null)
{
Gun obj = gun;
obj.ShootPojectileAction = (Action<GameObject>)(object)Delegate.Combine((Delegate)(object)obj.ShootPojectileAction, (Delegate)(object)new Action<GameObject>(OnShoot));
}
}
private void OnShoot(GameObject bullet)
{
if ((Object)(object)bullet != (Object)null)
{
bullet.AddComponent<BluePullEffect>().ownPlayer = player;
}
}
private void OnDestroy()
{
if ((Object)(object)gun != (Object)null)
{
Gun obj = gun;
obj.ShootPojectileAction = (Action<GameObject>)(object)Delegate.Remove((Delegate)(object)obj.ShootPojectileAction, (Delegate)(object)new Action<GameObject>(OnShoot));
}
}
}
public class BluePullEffect : MonoBehaviour
{
public Player ownPlayer;
private const float Range = 8f;
private const float ForceStrength = 25f;
private void Update()
{
//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_004a: 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_005a: Unknown result type (might be due to invalid IL or missing references)
//IL_005f: Unknown result type (might be due to invalid IL or missing references)
//IL_0095: Unknown result type (might be due to invalid IL or missing references)
//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
Enumerator<Player> enumerator = PlayerManager.instance.players.GetEnumerator();
try
{
while (enumerator.MoveNext())
{
Player current = enumerator.Current;
if (!((Object)(object)current != (Object)null) || !((Object)(object)current != (Object)(object)ownPlayer) || current.data.dead)
{
continue;
}
Vector3 val = ((Component)this).transform.position - ((Component)current).transform.position;
float magnitude = ((Vector3)(ref val)).magnitude;
if (magnitude <= 8f)
{
Rigidbody2D component = ((Component)current).GetComponent<Rigidbody2D>();
if ((Object)(object)component != (Object)null)
{
float num = (8f - magnitude) / 8f;
component.AddForce(Vector2.op_Implicit(((Vector3)(ref val)).normalized * (25f * num)), (ForceMode2D)0);
}
}
}
}
finally
{
((IDisposable)enumerator).Dispose();
}
}
}
public class BoogieWoogieCard : CustomCard
{
protected override string GetTitle()
{
return "Boogie Woogie";
}
protected override string GetDescription()
{
return "Press [F] to instantly swap positions and velocities with the nearest opponent. (3s Cooldown)";
}
protected override Rarity GetRarity()
{
return (Rarity)1;
}
protected override CardInfoStat[] GetStats()
{
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_002a: Unknown result type (might be due to invalid IL or missing references)
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[1]
{
new CardInfoStat
{
positive = true,
stat = "Clap Teleport [F]",
amount = "Yes",
simepleAmount = (SimpleAmount)0
}
};
}
public override string GetModName()
{
return "JJK Cursed Techniques";
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)0;
}
protected override GameObject GetCardArt()
{
return null;
}
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
JJKCardHelper.SetUniqueCategory(cardInfo);
}
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).gameObject.GetComponent<BoogieWoogieBehaviour>() == (Object)null)
{
((Component)player).gameObject.AddComponent<BoogieWoogieBehaviour>();
}
}
public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
BoogieWoogieBehaviour component = ((Component)player).gameObject.GetComponent<BoogieWoogieBehaviour>();
if ((Object)(object)component != (Object)null)
{
Object.Destroy((Object)(object)component);
}
}
}
public class BoogieWoogieBehaviour : MonoBehaviour
{
private Player player;
private float cooldownTimer;
private const float Cooldown = 3f;
private void Awake()
{
player = ((Component)this).GetComponent<Player>();
}
private void Update()
{
if (cooldownTimer > 0f)
{
cooldownTimer -= Time.deltaTime;
}
if ((Object)(object)player != (Object)null && player.data.view.IsMine && !player.data.dead && Input.GetKeyDown((KeyCode)102))
{
if (cooldownTimer <= 0f)
{
TriggerBoogieWoogie();
}
else
{
Unbound.BuildInfoPopup(String.Format("Boogie Woogie Cooldown: {0}s", (object)Mathf.CeilToInt(cooldownTimer)));
}
}
}
private void TriggerBoogieWoogie()
{
//IL_0012: Unknown result type (might be due to invalid IL or missing references)
//IL_0017: Unknown result type (might be due to invalid IL or missing references)
//IL_004c: Unknown result type (might be due to invalid IL or missing references)
//IL_0057: Unknown result type (might be due to invalid IL or missing references)
Player val = null;
float num = 3.4028235E+38f;
Enumerator<Player> enumerator = PlayerManager.instance.players.GetEnumerator();
try
{
while (enumerator.MoveNext())
{
Player current = enumerator.Current;
if ((Object)(object)current != (Object)(object)player && (Object)(object)current != (Object)null && !current.data.dead)
{
float num2 = Vector3.Distance(((Component)this).transform.position, ((Component)current).transform.position);
if (num2 < num)
{
num = num2;
val = current;
}
}
}
}
finally
{
((IDisposable)enumerator).Dispose();
}
if ((Object)(object)val != (Object)null)
{
cooldownTimer = 3f;
NetworkingManager.RaiseEvent("JJKCardsMod_BoogieWoogie_Swap", (object[])(object)new Object[2]
{
(object)player.playerID,
(object)val.playerID
});
}
else
{
Unbound.BuildInfoPopup("No target to swap with!");
}
}
public static void OnBoogieWoogieSwapEvent(object[] data)
{
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0013: Expected I4, but got Unknown
//IL_0016: Unknown result type (might be due to invalid IL or missing references)
//IL_001c: Expected I4, but got Unknown
//IL_002a: Unknown result type (might be due to invalid IL or missing references)
//IL_002f: 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_009c: Unknown result type (might be due to invalid IL or missing references)
//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
//IL_0100: Unknown result type (might be due to invalid IL or missing references)
//IL_0112: Unknown result type (might be due to invalid IL or missing references)
//IL_012b: Unknown result type (might be due to invalid IL or missing references)
//IL_0132: Unknown result type (might be due to invalid IL or missing references)
//IL_0124: Unknown result type (might be due to invalid IL or missing references)
if (data == null || data.Length < 2)
{
return;
}
int num = (int)(Int32)data[0];
int num2 = (int)(Int32)data[1];
Player val = null;
Player val2 = null;
Enumerator<Player> enumerator = PlayerManager.instance.players.GetEnumerator();
try
{
while (enumerator.MoveNext())
{
Player current = enumerator.Current;
if ((Object)(object)current != (Object)null)
{
if (current.playerID == num)
{
val = current;
}
if (current.playerID == num2)
{
val2 = current;
}
}
}
}
finally
{
((IDisposable)enumerator).Dispose();
}
if ((Object)(object)val != (Object)null && (Object)(object)val2 != (Object)null)
{
Vector3 position = ((Component)val).transform.position;
Vector3 position2 = ((Component)val2).transform.position;
Rigidbody2D component = ((Component)val).GetComponent<Rigidbody2D>();
Rigidbody2D component2 = ((Component)val2).GetComponent<Rigidbody2D>();
Vector2 velocity = (Object.op_Implicit((Object)(object)component) ? component.velocity : Vector2.zero);
Vector2 velocity2 = (Object.op_Implicit((Object)(object)component2) ? component2.velocity : Vector2.zero);
((Component)val).transform.position = position2;
((Component)val2).transform.position = position;
if (Object.op_Implicit((Object)(object)component))
{
component.velocity = velocity2;
}
if (Object.op_Implicit((Object)(object)component2))
{
component2.velocity = velocity;
}
SpawnBlueFlame(position);
SpawnBlueFlame(position2);
Unbound.BuildInfoPopup("CLAP! Boogie Woogie!");
}
}
private static void SpawnBlueFlame(Vector3 pos)
{
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Expected O, but got Unknown
//IL_0011: 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)
//IL_0036: Expected O, but got Unknown
//IL_0067: Unknown result type (might be due to invalid IL or missing references)
//IL_0135: Unknown result type (might be due to invalid IL or missing references)
//IL_0144: Unknown result type (might be due to invalid IL or missing references)
//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
//IL_00da: Unknown result type (might be due to invalid IL or missing references)
//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
GameObject val = new GameObject("BlueFlameEffect");
val.transform.position = pos;
SpriteRenderer val2 = val.AddComponent<SpriteRenderer>();
((Renderer)val2).sortingOrder = 998;
int num = 64;
Texture2D val3 = new Texture2D(num, num, (TextureFormat)4, false);
((Texture)val3).filterMode = (FilterMode)0;
Color val4 = default(Color);
((Color)(ref val4))..ctor(0f, 0f, 0f, 0f);
for (int i = 0; i < num; i++)
{
for (int j = 0; j < num; j++)
{
val3.SetPixel(j, i, val4);
}
}
for (int k = 0; k < num; k++)
{
float num2 = (float)num / 2.2f * (1f - (float)k / (float)num);
for (int l = (int)((float)num / 2f - num2); l <= (int)((float)num / 2f + num2); l++)
{
float num3 = Mathf.Abs((float)l - (float)num / 2f) / num2;
Color val5 = Color.Lerp(Color.cyan, Color.blue, num3);
val5.a = 1f - (float)k / (float)num;
val3.SetPixel(l, k, val5);
}
}
val3.Apply();
val2.sprite = Sprite.Create(val3, new Rect(0f, 0f, (float)num, (float)num), new Vector2(0.5f, 0f), 30f);
val.AddComponent<BlueFlameLifecycle>().sr = val2;
}
}
public class BlueFlameLifecycle : MonoBehaviour
{
public SpriteRenderer sr;
private float life = 0.5f;
private void Update()
{
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
//IL_0037: 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)
//IL_004c: 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_0080: Unknown result type (might be due to invalid IL or missing references)
//IL_0090: 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)
life -= Time.deltaTime;
if (life <= 0f)
{
Object.Destroy((Object)(object)((Component)this).gameObject);
return;
}
Transform transform = ((Component)this).transform;
transform.position += Vector3.up * (2.5f * Time.deltaTime);
if ((Object)(object)sr != (Object)null)
{
sr.color = new Color(sr.color.r, sr.color.g, sr.color.b, life / 0.5f);
}
}
}
public class DismantleCard : CustomCard
{
protected override string GetTitle()
{
return "Cleave & Dismantle";
}
protected override string GetDescription()
{
return "Your bullets fly 2.5x faster with no gravity, but deal -20% impact damage. Striking a player applies a heavy bleeding effect.";
}
protected override Rarity GetRarity()
{
return (Rarity)0;
}
protected override CardInfoStat[] GetStats()
{
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_002a: Unknown result type (might be due to invalid IL or missing references)
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Expected O, but got Unknown
//IL_0034: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_0040: Unknown result type (might be due to invalid IL or missing references)
//IL_004b: Unknown result type (might be due to invalid IL or missing references)
//IL_0056: Unknown result type (might be due to invalid IL or missing references)
//IL_0058: Unknown result type (might be due to invalid IL or missing references)
//IL_005e: Expected O, but got Unknown
//IL_0060: Unknown result type (might be due to invalid IL or missing references)
//IL_0065: Unknown result type (might be due to invalid IL or missing references)
//IL_006c: Unknown result type (might be due to invalid IL or missing references)
//IL_0077: Unknown result type (might be due to invalid IL or missing references)
//IL_0082: Unknown result type (might be due to invalid IL or missing references)
//IL_0084: Unknown result type (might be due to invalid IL or missing references)
//IL_008a: Expected O, but got Unknown
//IL_008c: Unknown result type (might be due to invalid IL or missing references)
//IL_0091: Unknown result type (might be due to invalid IL or missing references)
//IL_0098: Unknown result type (might be due to invalid IL or missing references)
//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
//IL_00b6: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[4]
{
new CardInfoStat
{
positive = true,
stat = "Bullet Speed",
amount = "+150%",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = true,
stat = "Gravity",
amount = "None",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = false,
stat = "Impact Damage",
amount = "-20%",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = true,
stat = "Heavy Bleed Damage",
amount = "Yes",
simepleAmount = (SimpleAmount)0
}
};
}
public override string GetModName()
{
return "JJK Cursed Techniques";
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)4;
}
protected override GameObject GetCardArt()
{
return null;
}
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
gun.projectileSpeed *= 2.5f;
gun.gravity = 0f;
gun.damage *= 0.8f;
JJKCardHelper.SetUniqueCategory(cardInfo);
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
DismantleBehaviour dismantleBehaviour = ((Component)player).gameObject.GetComponent<DismantleBehaviour>();
if ((Object)(object)dismantleBehaviour == (Object)null)
{
dismantleBehaviour = ((Component)player).gameObject.AddComponent<DismantleBehaviour>();
}
dismantleBehaviour.gun = gun;
}
public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
DismantleBehaviour component = ((Component)player).gameObject.GetComponent<DismantleBehaviour>();
if ((Object)(object)component != (Object)null)
{
Object.Destroy((Object)(object)component);
}
}
}
public class DismantleBehaviour : MonoBehaviour
{
public Gun gun;
private void Start()
{
if ((Object)(object)gun != (Object)null)
{
Gun obj = gun;
obj.ShootPojectileAction = (Action<GameObject>)(object)Delegate.Combine((Delegate)(object)obj.ShootPojectileAction, (Delegate)(object)new Action<GameObject>(OnShoot));
}
}
private void OnShoot(GameObject bullet)
{
if ((Object)(object)bullet != (Object)null)
{
bullet.AddComponent<DismantleSlashTrail>();
}
}
private void OnDestroy()
{
if ((Object)(object)gun != (Object)null)
{
Gun obj = gun;
obj.ShootPojectileAction = (Action<GameObject>)(object)Delegate.Remove((Delegate)(object)obj.ShootPojectileAction, (Delegate)(object)new Action<GameObject>(OnShoot));
}
}
}
public class DismantleSlashTrail : MonoBehaviour
{
private LineRenderer lr;
private Vector3 lastPos;
private float fadeTimer = 0.3f;
private void Start()
{
//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)
//IL_0052: Unknown result type (might be due to invalid IL or missing references)
//IL_005c: Expected O, but got Unknown
//IL_0062: 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_00a4: Unknown result type (might be due to invalid IL or missing references)
//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
lastPos = ((Component)this).transform.position;
lr = ((Component)this).gameObject.AddComponent<LineRenderer>();
lr.startWidth = 0.25f;
lr.endWidth = 0f;
((Renderer)lr).material = new Material(Shader.Find("Sprites/Default"));
lr.startColor = Color.white;
lr.endColor = new Color(0.3f, 0f, 0.4f, 0f);
lr.positionCount = 2;
lr.SetPosition(0, lastPos);
lr.SetPosition(1, lastPos);
}
private void Update()
{
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_0069: Unknown result type (might be due to invalid IL or missing references)
lr.SetPosition(0, ((Component)this).transform.position);
lr.SetPosition(1, lastPos);
fadeTimer -= Time.deltaTime;
if (fadeTimer <= 0f)
{
lr.startColor = new Color(1f, 1f, 1f, fadeTimer / 0.3f);
}
}
}
public class BleedEffect : MonoBehaviour
{
public Player attacker;
public float damagePerTick = 8f;
private Player player;
private int ticksRemaining;
private float tickTimer = 0.5f;
private void Awake()
{
player = ((Component)this).GetComponent<Player>();
}
public void AddBleedTicks(int count)
{
ticksRemaining += count;
}
private void Update()
{
//IL_0072: Unknown result type (might be due to invalid IL or missing references)
//IL_007d: 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_0092: Unknown result type (might be due to invalid IL or missing references)
if (ticksRemaining <= 0)
{
return;
}
tickTimer -= Time.deltaTime;
if (tickTimer <= 0f)
{
tickTimer = 0.5f;
ticksRemaining--;
if ((Object)(object)player != (Object)null && !player.data.dead)
{
((Damagable)player.data.healthHandler).TakeDamage(Vector2.up * damagePerTick, Vector2.op_Implicit(((Component)player).transform.position), (GameObject)null, attacker, false, true);
}
}
}
}
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
internal class Patch_ProjectileHit_Hit : Object
{
private static void Prefix(ProjectileHit __instance, HitInfo hit, bool forceCall)
{
if (!((Object)(object)__instance.ownPlayer != (Object)null) || !((Object)(object)hit.collider != (Object)null) || !((Object)(object)((Component)__instance.ownPlayer).GetComponent<DismantleBehaviour>() != (Object)null))
{
return;
}
Player componentInParent = ((Component)hit.collider).GetComponentInParent<Player>();
if ((Object)(object)componentInParent != (Object)null && (Object)(object)componentInParent != (Object)(object)__instance.ownPlayer)
{
BleedEffect bleedEffect = ((Component)componentInParent).gameObject.GetComponent<BleedEffect>();
if ((Object)(object)bleedEffect == (Object)null)
{
bleedEffect = ((Component)componentInParent).gameObject.AddComponent<BleedEffect>();
}
bleedEffect.attacker = __instance.ownPlayer;
bleedEffect.AddBleedTicks(5);
}
}
}
public class HollowPurpleCard : CustomCard
{
protected override string GetTitle()
{
return "Hollow Purple";
}
protected override string GetDescription()
{
return "Fires a slow but massive sphere of imaginary mass. Deals 500% damage, passes through walls, and penetrates all obstacles.";
}
protected override Rarity GetRarity()
{
return (Rarity)2;
}
protected override CardInfoStat[] GetStats()
{
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_002a: Unknown result type (might be due to invalid IL or missing references)
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Expected O, but got Unknown
//IL_0034: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_0040: Unknown result type (might be due to invalid IL or missing references)
//IL_004b: Unknown result type (might be due to invalid IL or missing references)
//IL_0056: Unknown result type (might be due to invalid IL or missing references)
//IL_0058: Unknown result type (might be due to invalid IL or missing references)
//IL_005e: Expected O, but got Unknown
//IL_0060: Unknown result type (might be due to invalid IL or missing references)
//IL_0065: Unknown result type (might be due to invalid IL or missing references)
//IL_006c: Unknown result type (might be due to invalid IL or missing references)
//IL_0077: Unknown result type (might be due to invalid IL or missing references)
//IL_0082: Unknown result type (might be due to invalid IL or missing references)
//IL_0084: Unknown result type (might be due to invalid IL or missing references)
//IL_008a: Expected O, but got Unknown
//IL_008c: Unknown result type (might be due to invalid IL or missing references)
//IL_0091: Unknown result type (might be due to invalid IL or missing references)
//IL_0098: Unknown result type (might be due to invalid IL or missing references)
//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
//IL_00b6: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[4]
{
new CardInfoStat
{
positive = true,
stat = "Damage",
amount = "+400%",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = true,
stat = "Projectile Size",
amount = "5x",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = true,
stat = "Pierce Obstacles",
amount = "Yes",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = false,
stat = "Projectile Speed",
amount = "-60%",
simepleAmount = (SimpleAmount)0
}
};
}
public override string GetModName()
{
return "JJK Cursed Techniques";
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)4;
}
protected override GameObject GetCardArt()
{
return null;
}
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
//IL_003b: Unknown result type (might be due to invalid IL or missing references)
//IL_0040: Unknown result type (might be due to invalid IL or missing references)
gun.projectileSpeed *= 0.4f;
gun.damage *= 5f;
gun.ignoreWalls = true;
gun.projectileColor = new Color(0.6f, 0f, 0.8f);
JJKCardHelper.SetUniqueCategory(cardInfo);
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
HollowPurpleBehaviour hollowPurpleBehaviour = ((Component)player).gameObject.GetComponent<HollowPurpleBehaviour>();
if ((Object)(object)hollowPurpleBehaviour == (Object)null)
{
hollowPurpleBehaviour = ((Component)player).gameObject.AddComponent<HollowPurpleBehaviour>();
}
hollowPurpleBehaviour.gun = gun;
}
public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
HollowPurpleBehaviour component = ((Component)player).gameObject.GetComponent<HollowPurpleBehaviour>();
if ((Object)(object)component != (Object)null)
{
Object.Destroy((Object)(object)component);
}
}
}
public class HollowPurpleBehaviour : MonoBehaviour
{
public Gun gun;
private void Start()
{
if ((Object)(object)gun != (Object)null)
{
Gun obj = gun;
obj.ShootPojectileAction = (Action<GameObject>)(object)Delegate.Combine((Delegate)(object)obj.ShootPojectileAction, (Delegate)(object)new Action<GameObject>(OnShoot));
}
}
private void OnShoot(GameObject bullet)
{
//IL_0010: 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)
if ((Object)(object)bullet != (Object)null)
{
Transform transform = bullet.transform;
transform.localScale *= 5f;
bullet.AddComponent<HollowPurpleHelper>().caster = ((Component)gun).GetComponentInParent<Player>();
Unbound.BuildInfoPopup("HOLLOW PURPLE!");
}
}
private void OnDestroy()
{
if ((Object)(object)gun != (Object)null)
{
Gun obj = gun;
obj.ShootPojectileAction = (Action<GameObject>)(object)Delegate.Remove((Delegate)(object)obj.ShootPojectileAction, (Delegate)(object)new Action<GameObject>(OnShoot));
}
}
}
public class HollowPurpleHelper : MonoBehaviour
{
public Player caster;
private float tickTimer = 0.1f;
private SpriteRenderer sr;
private Color basePurple = new Color(0.6f, 0f, 0.8f);
private void Start()
{
//IL_0021: Unknown result type (might be due to invalid IL or missing references)
sr = ((Component)this).GetComponentInChildren<SpriteRenderer>();
if ((Object)(object)sr != (Object)null)
{
sr.color = basePurple;
}
}
private void Update()
{
//IL_002a: Unknown result type (might be due to invalid IL or missing references)
//IL_0034: Unknown result type (might be due to invalid IL or missing references)
//IL_0076: Unknown result type (might be due to invalid IL or missing references)
//IL_0092: 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_00be: Unknown result type (might be due to invalid IL or missing references)
//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
float num = 1f + Mathf.Sin(Time.time * 25f) * 0.15f;
((Component)this).transform.localScale = new Vector3(num, num, 1f) * 5f;
tickTimer -= Time.deltaTime;
if (!(tickTimer <= 0f))
{
return;
}
tickTimer = 0.15f;
float num2 = 4.5f * ((Component)this).transform.localScale.x / 5f;
Enumerator<Player> enumerator = PlayerManager.instance.players.GetEnumerator();
try
{
while (enumerator.MoveNext())
{
Player current = enumerator.Current;
if ((Object)(object)current != (Object)null && !current.data.dead && Vector3.Distance(((Component)this).transform.position, ((Component)current).transform.position) <= num2)
{
((Damagable)current.data.healthHandler).TakeDamage(Vector2.up * 12f, Vector2.op_Implicit(((Component)current).transform.position), (GameObject)null, caster, false, true);
}
}
}
finally
{
((IDisposable)enumerator).Dispose();
}
}
}
public class InfiniteVoidCard : CustomCard
{
protected override string GetTitle()
{
return "Domain Expansion: Infinite Void";
}
protected override string GetDescription()
{
return "Press [V] to trap all nearby enemies in an infinite space of information, stunning them completely for 3 seconds and dealing 30 damage. (15s Cooldown)";
}
protected override Rarity GetRarity()
{
return (Rarity)2;
}
protected override CardInfoStat[] GetStats()
{
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_002a: Unknown result type (might be due to invalid IL or missing references)
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Expected O, but got Unknown
//IL_0034: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_0040: Unknown result type (might be due to invalid IL or missing references)
//IL_004b: Unknown result type (might be due to invalid IL or missing references)
//IL_0056: Unknown result type (might be due to invalid IL or missing references)
//IL_0058: Unknown result type (might be due to invalid IL or missing references)
//IL_005e: Expected O, but got Unknown
//IL_0060: Unknown result type (might be due to invalid IL or missing references)
//IL_0065: Unknown result type (might be due to invalid IL or missing references)
//IL_006c: Unknown result type (might be due to invalid IL or missing references)
//IL_0077: Unknown result type (might be due to invalid IL or missing references)
//IL_0082: Unknown result type (might be due to invalid IL or missing references)
//IL_0084: Unknown result type (might be due to invalid IL or missing references)
//IL_008a: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[3]
{
new CardInfoStat
{
positive = true,
stat = "Domain Expansion [V]",
amount = "Yes",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = true,
stat = "Stun Duration",
amount = "3s",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = false,
stat = "Cooldown",
amount = "15s",
simepleAmount = (SimpleAmount)0
}
};
}
public override string GetModName()
{
return "JJK Cursed Techniques";
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)3;
}
protected override GameObject GetCardArt()
{
return null;
}
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
JJKCardHelper.SetUniqueCategory(cardInfo);
}
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).gameObject.GetComponent<InfiniteVoidBehaviour>() == (Object)null)
{
((Component)player).gameObject.AddComponent<InfiniteVoidBehaviour>();
}
}
public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
InfiniteVoidBehaviour component = ((Component)player).gameObject.GetComponent<InfiniteVoidBehaviour>();
if ((Object)(object)component != (Object)null)
{
Object.Destroy((Object)(object)component);
}
}
}
public class InfiniteVoidBehaviour : MonoBehaviour
{
private Player player;
private float cooldownTimer;
private const float Cooldown = 15f;
private const float Range = 15f;
private void Awake()
{
player = ((Component)this).GetComponent<Player>();
}
private void Update()
{
if (cooldownTimer > 0f)
{
cooldownTimer -= Time.deltaTime;
}
if ((Object)(object)player != (Object)null && player.data.view.IsMine && !player.data.dead && Input.GetKeyDown((KeyCode)118))
{
if (cooldownTimer <= 0f)
{
TriggerInfiniteVoid();
}
else
{
Unbound.BuildInfoPopup(String.Format("Infinite Void Cooldown: {0}s", (object)Mathf.CeilToInt(cooldownTimer)));
}
}
}
private void TriggerInfiniteVoid()
{
cooldownTimer = 15f;
NetworkingManager.RaiseEvent("JJKCardsMod_InfiniteVoid_Activate", (object[])(object)new Object[1] { (object)player.playerID });
}
public static void OnInfiniteVoidEvent(object[] data)
{
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0013: Expected I4, but got Unknown
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_0024: 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_007f: 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)
//IL_0090: Unknown result type (might be due to invalid IL or missing references)
//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
//IL_012e: Unknown result type (might be due to invalid IL or missing references)
//IL_0138: Unknown result type (might be due to invalid IL or missing references)
//IL_0144: Unknown result type (might be due to invalid IL or missing references)
//IL_0149: Unknown result type (might be due to invalid IL or missing references)
if (data == null || data.Length < 1)
{
return;
}
int num = (int)(Int32)data[0];
Player val = null;
Enumerator<Player> enumerator = PlayerManager.instance.players.GetEnumerator();
try
{
while (enumerator.MoveNext())
{
Player current = enumerator.Current;
if ((Object)(object)current != (Object)null && current.playerID == num)
{
val = current;
break;
}
}
}
finally
{
((IDisposable)enumerator).Dispose();
}
if (!((Object)(object)val != (Object)null))
{
return;
}
Unbound.BuildInfoPopup("DOMAIN EXPANSION: INFINITE VOID!");
Vector3 position = ((Component)val).transform.position;
enumerator = PlayerManager.instance.players.GetEnumerator();
try
{
while (enumerator.MoveNext())
{
Player current2 = enumerator.Current;
if ((Object)(object)current2 != (Object)null && (Object)(object)current2 != (Object)(object)val && !current2.data.dead && Vector3.Distance(position, ((Component)current2).transform.position) <= 15f)
{
if ((Object)(object)current2.data.stunHandler != (Object)null)
{
current2.data.stunHandler.AddStun(3f);
}
if ((Object)(object)current2.data.healthHandler != (Object)null)
{
((Damagable)current2.data.healthHandler).TakeDamage(Vector2.up * 30f, Vector2.op_Implicit(((Component)current2).transform.position), (GameObject)null, val, false, true);
}
}
}
}
finally
{
((IDisposable)enumerator).Dispose();
}
}
}
public class InfinityCard : CustomCard
{
protected override string GetTitle()
{
return "Limitless: Infinity";
}
protected override string GetDescription()
{
return "Slows down incoming projectiles as they approach you (up to 95% slow). When you block, nearby projectiles are stopped completely.";
}
protected override Rarity GetRarity()
{
return (Rarity)2;
}
protected override CardInfoStat[] GetStats()
{
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_002a: Unknown result type (might be due to invalid IL or missing references)
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Expected O, but got Unknown
//IL_0034: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_0040: Unknown result type (might be due to invalid IL or missing references)
//IL_004b: Unknown result type (might be due to invalid IL or missing references)
//IL_0056: Unknown result type (might be due to invalid IL or missing references)
//IL_0058: Unknown result type (might be due to invalid IL or missing references)
//IL_005e: Expected O, but got Unknown
//IL_0060: Unknown result type (might be due to invalid IL or missing references)
//IL_0065: Unknown result type (might be due to invalid IL or missing references)
//IL_006c: Unknown result type (might be due to invalid IL or missing references)
//IL_0077: Unknown result type (might be due to invalid IL or missing references)
//IL_0082: Unknown result type (might be due to invalid IL or missing references)
//IL_0084: Unknown result type (might be due to invalid IL or missing references)
//IL_008a: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[3]
{
new CardInfoStat
{
positive = true,
stat = "Projectile Slowdown",
amount = "Up to 95%",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = true,
stat = "Slow Range",
amount = "8m",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = true,
stat = "Block Stopping",
amount = "Yes",
simepleAmount = (SimpleAmount)0
}
};
}
public override string GetModName()
{
return "JJK Cursed Techniques";
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)3;
}
protected override GameObject GetCardArt()
{
return null;
}
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
JJKCardHelper.SetUniqueCategory(cardInfo);
}
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).gameObject.GetComponent<InfinityBehaviour>() == (Object)null)
{
((Component)player).gameObject.AddComponent<InfinityBehaviour>();
}
}
public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
InfinityBehaviour component = ((Component)player).gameObject.GetComponent<InfinityBehaviour>();
if ((Object)(object)component != (Object)null)
{
Object.Destroy((Object)(object)component);
}
}
}
public class InfinityBehaviour : MonoBehaviour
{
private Player player;
private Block block;
private const float Range = 8f;
private void Awake()
{
player = ((Component)this).GetComponent<Player>();
block = ((Component)this).GetComponent<Block>();
}
private void Start()
{
if ((Object)(object)block != (Object)null)
{
Block obj = block;
obj.BlockAction = (Action<BlockTriggerType>)(object)Delegate.Combine((Delegate)(object)obj.BlockAction, (Delegate)(object)new Action<BlockTriggerType>(OnBlock));
}
}
private void OnBlock(BlockTriggerType triggerType)
{
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
//IL_0072: Unknown result type (might be due to invalid IL or missing references)
MoveTransform[] array = Object.FindObjectsOfType<MoveTransform>();
foreach (MoveTransform val in array)
{
if (!(Vector3.Distance(((Component)this).transform.position, ((Component)val).transform.position) <= 8f))
{
continue;
}
ProjectileHit component = ((Component)val).GetComponent<ProjectileHit>();
if ((Object)(object)component != (Object)null && (Object)(object)component.ownPlayer != (Object)(object)player)
{
val.velocity = Vector3.zero;
Rigidbody2D component2 = ((Component)val).GetComponent<Rigidbody2D>();
if ((Object)(object)component2 != (Object)null)
{
component2.velocity = Vector2.zero;
}
}
}
}
private void Update()
{
//IL_0017: Unknown result type (might be due to invalid IL or missing references)
//IL_0022: Unknown result type (might be due to invalid IL or missing references)
//IL_0080: Unknown result type (might be due to invalid IL or missing references)
//IL_0093: Unknown result type (might be due to invalid IL or missing references)
//IL_0098: Unknown result type (might be due to invalid IL or missing references)
//IL_00b3: 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_00bc: 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_00c8: Unknown result type (might be due to invalid IL or missing references)
//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
MoveTransform[] array = Object.FindObjectsOfType<MoveTransform>();
foreach (MoveTransform val in array)
{
float num = Vector3.Distance(((Component)this).transform.position, ((Component)val).transform.position);
if (!(num <= 8f))
{
continue;
}
ProjectileHit component = ((Component)val).GetComponent<ProjectileHit>();
if ((Object)(object)component != (Object)null && (Object)(object)component.ownPlayer != (Object)(object)player)
{
float num2 = Mathf.Clamp(num / 8f, 0.05f, 1f);
val.velocity = ((Vector3)(ref val.velocity)).normalized * (((Vector3)(ref val.velocity)).magnitude * num2);
Rigidbody2D component2 = ((Component)val).GetComponent<Rigidbody2D>();
if ((Object)(object)component2 != (Object)null)
{
Vector2 velocity = component2.velocity;
Vector2 normalized = ((Vector2)(ref velocity)).normalized;
velocity = component2.velocity;
component2.velocity = normalized * (((Vector2)(ref velocity)).magnitude * num2);
}
}
}
}
private void OnDestroy()
{
if ((Object)(object)block != (Object)null)
{
Block obj = block;
obj.BlockAction = (Action<BlockTriggerType>)(object)Delegate.Remove((Delegate)(object)obj.BlockAction, (Delegate)(object)new Action<BlockTriggerType>(OnBlock));
}
}
}
public class MahoragaCard : CustomCard
{
protected override string GetTitle()
{
return "Divine General Mahoraga";
}
protected override string GetDescription()
{
return "Adapt to any and all phenomena. Start taking +10% damage, but adapt to damage sources, DOT, slow effects, and enemy blocks over time. Displays the Dharma Wheel above you!";
}
protected override Rarity GetRarity()
{
return (Rarity)2;
}
protected override CardInfoStat[] GetStats()
{
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_002a: Unknown result type (might be due to invalid IL or missing references)
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Expected O, but got Unknown
//IL_0034: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_0040: Unknown result type (might be due to invalid IL or missing references)
//IL_004b: Unknown result type (might be due to invalid IL or missing references)
//IL_0056: Unknown result type (might be due to invalid IL or missing references)
//IL_0058: Unknown result type (might be due to invalid IL or missing references)
//IL_005e: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[2]
{
new CardInfoStat
{
positive = true,
stat = "Adaptability",
amount = "+20% / Hit",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = false,
stat = "Initial Damage Taken",
amount = "+10%",
simepleAmount = (SimpleAmount)0
}
};
}
public override string GetModName()
{
return "JJK Cursed Techniques";
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)7;
}
protected override GameObject GetCardArt()
{
return null;
}
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
JJKCardHelper.SetUniqueCategory(cardInfo);
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
MahoragaBehaviour mahoragaBehaviour = ((Component)player).gameObject.GetComponent<MahoragaBehaviour>();
if ((Object)(object)mahoragaBehaviour == (Object)null)
{
mahoragaBehaviour = ((Component)player).gameObject.AddComponent<MahoragaBehaviour>();
}
mahoragaBehaviour.SpawnWheel();
}
public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
MahoragaBehaviour component = ((Component)player).gameObject.GetComponent<MahoragaBehaviour>();
if ((Object)(object)component != (Object)null)
{
component.DestroyWheel();
Object.Destroy((Object)(object)component);
}
}
}
public class MahoragaBehaviour : MonoBehaviour
{
private Player player;
public Dictionary<int, float> playerResistances = new Dictionary<int, float>();
public float dotResistance;
public float slowResistance;
public Dictionary<int, float> blockBypassChance = new Dictionary<int, float>();
private MahoragaWheel wheel;
private int hitCount;
private void Awake()
{
player = ((Component)this).GetComponent<Player>();
}
public void SpawnWheel()
{
//IL_0013: Unknown result type (might be due to invalid IL or missing references)
//IL_0019: Expected O, but got Unknown
if ((Object)(object)wheel == (Object)null)
{
GameObject val = new GameObject("MahoragaWheel");
wheel = val.AddComponent<MahoragaWheel>();
wheel.Init(player);
}
}
public void DestroyWheel()
{
if ((Object)(object)wheel != (Object)null)
{
Object.Destroy((Object)(object)((Component)wheel).gameObject);
wheel = null;
}
}
public Vector2 FilterDamage(Vector2 damage, bool isDmgOverTime, Player damagingPlayer)
{
//IL_0112: Unknown result type (might be due to invalid IL or missing references)
//IL_0114: Unknown result type (might be due to invalid IL or missing references)
float num = 1.2f;
if (isDmgOverTime)
{
dotResistance = Mathf.Clamp01(dotResistance + 0.2f);
num -= dotResistance;
string message = String.Format("D.O.T. Adapted: {0}%", (object)Mathf.RoundToInt(dotResistance * 100f));
SpawnAdaptationEffect(message);
}
else if ((Object)(object)damagingPlayer != (Object)null)
{
int playerID = damagingPlayer.playerID;
if (!playerResistances.ContainsKey(playerID))
{
playerResistances[playerID] = 0f;
}
hitCount++;
float num2 = 1f - Mathf.Exp(-0.25f * (float)hitCount);
playerResistances[playerID] = num2;
num = 1.2f * (1f - num2);
string message2 = String.Format("Adapted to Player {0}: {1}% (Multi: {2}%)", (object)playerID, (object)Mathf.RoundToInt(num2 * 100f), (object)Mathf.RoundToInt(num * 100f));
SpawnAdaptationEffect(message2);
}
num = Mathf.Max(0f, num);
return damage * num;
}
public void RegisterEnemyBlocked(Player enemy)
{
int playerID = enemy.playerID;
if (!blockBypassChance.ContainsKey(playerID))
{
blockBypassChance[playerID] = 0f;
}
blockBypassChance[playerID] = Mathf.Clamp01(blockBypassChance[playerID] + 0.2f);
SpawnAdaptationEffect(String.Format("Bypassing Enemy {0} Block: {1}%", (object)playerID, (object)Mathf.RoundToInt(blockBypassChance[playerID] * 100f)));
}
private void SpawnAdaptationEffect(string message)
{
Unbound.BuildInfoPopup(message);
if ((Object)(object)wheel != (Object)null)
{
wheel.TriggerAdaptationEffect();
}
}
private void OnDestroy()
{
playerResistances.Clear();
blockBypassChance.Clear();
DestroyWheel();
}
}
public class MahoragaWheel : MonoBehaviour
{
private SpriteRenderer sr;
private float spinSpeed = 30f;
private float targetSpinSpeed = 30f;
private float flashTimer;
private Player player;
public void Init(Player p)
{
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
//IL_0051: 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_008c: Expected O, but got Unknown
//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
//IL_00de: Unknown result type (might be due to invalid IL or missing references)
//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
//IL_0109: Unknown result type (might be due to invalid IL or missing references)
//IL_0119: Unknown result type (might be due to invalid IL or missing references)
//IL_0127: Unknown result type (might be due to invalid IL or missing references)
//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
//IL_0177: Unknown result type (might be due to invalid IL or missing references)
//IL_01d3: Unknown result type (might be due to invalid IL or missing references)
//IL_01ff: Unknown result type (might be due to invalid IL or missing references)
//IL_020e: Unknown result type (might be due to invalid IL or missing references)
player = p;
((Component)this).transform.SetParent(((Component)player).transform);
((Component)this).transform.localPosition = new Vector3(0f, 2.2f, -0.5f);
((Component)this).transform.localScale = new Vector3(2.5f, 2.5f, 1f);
sr = ((Component)this).gameObject.AddComponent<SpriteRenderer>();
((Renderer)sr).sortingOrder = 999;
int num = 128;
Texture2D val = new Texture2D(num, num, (TextureFormat)4, false);
((Texture)val).filterMode = (FilterMode)0;
Color val2 = default(Color);
((Color)(ref val2))..ctor(0f, 0f, 0f, 0f);
for (int i = 0; i < num; i++)
{
for (int j = 0; j < num; j++)
{
val.SetPixel(j, i, val2);
}
}
Color cyan = Color.cyan;
int num2 = num / 2;
int num3 = num / 2;
int num4 = 40;
int r = 10;
DrawCircle(val, num2, num3, num4, cyan);
DrawCircle(val, num2, num3, num4 - 1, cyan);
DrawCircle(val, num2, num3, num4 - 2, cyan);
DrawFilledCircle(val, num2, num3, r, cyan);
for (int k = 0; k < 8; k++)
{
float num5 = (float)k * 45f * ((float)Math.PI / 180f);
int x = num2 + Mathf.RoundToInt(Mathf.Cos(num5) * (float)num4);
int y = num3 + Mathf.RoundToInt(Mathf.Sin(num5) * (float)num4);
DrawLine(val, num2, num3, x, y, cyan);
}
for (int l = 0; l < 8; l++)
{
float num6 = (float)l * 45f * ((float)Math.PI / 180f);
int cx = num2 + Mathf.RoundToInt(Mathf.Cos(num6) * (float)(num4 + 4));
int cy = num3 + Mathf.RoundToInt(Mathf.Sin(num6) * (float)(num4 + 4));
DrawFilledCircle(val, cx, cy, 4, cyan);
}
val.Apply();
sr.sprite = Sprite.Create(val, new Rect(0f, 0f, (float)num, (float)num), new Vector2(0.5f, 0.5f), 100f);
}
private void Update()
{
//IL_0049: Unknown result type (might be due to invalid IL or missing references)
//IL_0095: Unknown result type (might be due to invalid IL or missing references)
//IL_0084: Unknown result type (might be due to invalid IL or missing references)
spinSpeed = Mathf.Lerp(spinSpeed, targetSpinSpeed, Time.deltaTime * 5f);
targetSpinSpeed = Mathf.Lerp(targetSpinSpeed, 30f, Time.deltaTime * 2f);
((Component)this).transform.Rotate(Vector3.forward, spinSpeed * Time.deltaTime);
if (flashTimer > 0f)
{
flashTimer -= Time.deltaTime;
sr.color = Color.white;
}
else
{
sr.color = Color.cyan;
}
}
public void TriggerAdaptationEffect()
{
spinSpeed = 1200f;
targetSpinSpeed = 1200f;
flashTimer = 0.5f;
}
private void DrawCircle(Texture2D tex, int cx, int cy, int r, Color col)
{
//IL_0013: Unknown result type (might be due to invalid IL or missing references)
//IL_0021: Unknown result type (might be due to invalid IL or missing references)
//IL_002f: Unknown result type (might be due to invalid IL or missing references)
//IL_003d: 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_0059: Unknown result type (might be due to invalid IL or missing references)
//IL_0067: 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)
int num = r;
int num2 = 0;
int num3 = 0;
while (num >= num2)
{
tex.SetPixel(cx + num, cy + num2, col);
tex.SetPixel(cx + num2, cy + num, col);
tex.SetPixel(cx - num2, cy + num, col);
tex.SetPixel(cx - num, cy + num2, col);
tex.SetPixel(cx - num, cy - num2, col);
tex.SetPixel(cx - num2, cy - num, col);
tex.SetPixel(cx + num2, cy - num, col);
tex.SetPixel(cx + num, cy - num2, col);
num2++;
if (num3 <= 0)
{
num3 += 2 * num2 + 1;
continue;
}
num--;
num3 -= 2 * num + 1;
}
}
private void DrawFilledCircle(Texture2D tex, int cx, int cy, int r, Color col)
{
//IL_0021: Unknown result type (might be due to invalid IL or missing references)
for (int i = -r; i <= r; i++)
{
for (int j = -r; j <= r; j++)
{
if (j * j + i * i <= r * r)
{
tex.SetPixel(cx + j, cy + i, col);
}
}
}
}
private void DrawLine(Texture2D tex, int x0, int y0, int x1, int y1, Color col)
{
//IL_0030: Unknown result type (might be due to invalid IL or missing references)
int num = Mathf.Abs(x1 - x0);
int num2 = Mathf.Abs(y1 - y0);
int num3 = ((x0 < x1) ? 1 : (-1));
int num4 = ((y0 < y1) ? 1 : (-1));
int num5 = num - num2;
while (true)
{
tex.SetPixel(x0, y0, col);
if (x0 != x1 || y0 != y1)
{
int num6 = 2 * num5;
if (num6 > -num2)
{
num5 -= num2;
x0 += num3;
}
if (num6 < num)
{
num5 += num;
y0 += num4;
}
continue;
}
break;
}
}
}
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
internal class Patch_HealthHandler_TakeDamage : Object
{
private static void Prefix(HealthHandler __instance, ref Vector2 damage, Vector2 position, GameObject damagingWeapon, Player damagingPlayer, bool lethal, bool ignoreBlock)
{
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_0034: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
Player componentInParent = ((Component)__instance).GetComponentInParent<Player>();
if (!((Object)(object)componentInParent == (Object)null))
{
MahoragaBehaviour component = ((Component)componentInParent).GetComponent<MahoragaBehaviour>();
if ((Object)(object)component != (Object)null)
{
bool isDmgOverTime = (Object)(object)damagingWeapon == (Object)null;
damage = component.FilterDamage(damage, isDmgOverTime, damagingPlayer);
}
}
}
}
public class PiercingBloodCard : CustomCard
{
protected override string GetTitle()
{
return "Piercing Blood";
}
protected override string GetDescription()
{
return "Fires a high-speed blood beam (+50% Damage) that pierces through walls and enemies. Reload time and fire rate are increased.";
}
protected override Rarity GetRarity()
{
return (Rarity)2;
}
protected override CardInfoStat[] GetStats()
{
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_002a: Unknown result type (might be due to invalid IL or missing references)
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Expected O, but got Unknown
//IL_0034: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_0040: Unknown result type (might be due to invalid IL or missing references)
//IL_004b: Unknown result type (might be due to invalid IL or missing references)
//IL_0056: Unknown result type (might be due to invalid IL or missing references)
//IL_0058: Unknown result type (might be due to invalid IL or missing references)
//IL_005e: Expected O, but got Unknown
//IL_0060: Unknown result type (might be due to invalid IL or missing references)
//IL_0065: Unknown result type (might be due to invalid IL or missing references)
//IL_006c: Unknown result type (might be due to invalid IL or missing references)
//IL_0077: Unknown result type (might be due to invalid IL or missing references)
//IL_0082: Unknown result type (might be due to invalid IL or missing references)
//IL_0084: Unknown result type (might be due to invalid IL or missing references)
//IL_008a: Expected O, but got Unknown
//IL_008c: Unknown result type (might be due to invalid IL or missing references)
//IL_0091: Unknown result type (might be due to invalid IL or missing references)
//IL_0098: Unknown result type (might be due to invalid IL or missing references)
//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
//IL_00b6: Expected O, but got Unknown
//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
//IL_00da: Unknown result type (might be due to invalid IL or missing references)
//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
//IL_00e2: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[5]
{
new CardInfoStat
{
positive = true,
stat = "Bullet Speed",
amount = "+300%",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = true,
stat = "Damage",
amount = "+50%",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = true,
stat = "Pierce Walls & Enemies",
amount = "Yes",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = false,
stat = "Reload Time",
amount = "+50%",
simepleAmount = (SimpleAmount)0
},
new CardInfoStat
{
positive = false,
stat = "Fire Rate",
amount = "-50%",
simepleAmount = (SimpleAmount)0
}
};
}
public override string GetModName()
{
return "JJK Cursed Techniques";
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)0;
}
protected override GameObject GetCardArt()
{
return null;
}
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_0031: Unknown result type (might be due to invalid IL or missing references)
gun.projectileSpeed *= 4f;
gun.damage *= 1.5f;
gun.ignoreWalls = true;
gun.projectileColor = Color.red;
gun.reloadTime *= 1.5f;
gun.attackSpeed *= 2f;
JJKCardHelper.SetUniqueCategory(cardInfo);
}
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)
{
}
}
public class RatioCard : CustomCard
{
protected override string GetTitle()
{
return "Ratio Technique: 7:3";
}
protected override string GetDescription()
{
return "Every 7th shot hits a perfect weak point, dealing 700% damage and massive knockback.";
}
protected override Rarity GetRarity()
{
return (Rarity)1;
}
protected override CardInfoStat[] GetStats()
{
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_002a: Unknown result type (might be due to invalid IL or missing references)
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[1]
{
new CardInfoStat
{
positive = true,
stat = "Critical Hit (Every 7th)",
amount = "7x Damage",
simepleAmount = (SimpleAmount)0
}
};
}
public override string GetModName()
{
return "JJK Cursed Techniques";
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)1;
}
protected override GameObject GetCardArt()
{
return null;
}
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
JJKCardHelper.SetUniqueCategory(cardInfo);
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
RatioBehaviour ratioBehaviour = ((Component)player).gameObject.GetComponent<RatioBehaviour>();
if ((Object)(object)ratioBehaviour == (Object)null)
{
ratioBehaviour = ((Component)player).gameObject.AddComponent<RatioBehaviour>();
}
ratioBehaviour.gun = gun;
}
public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
RatioBehaviour component = ((Component)player).gameObject.GetComponent<RatioBehaviour>();
if ((Object)(object)component != (Object)null)
{
Object.Destroy((Object)(object)component);
}
}
}
public class RatioBehaviour : MonoBehaviour
{
public Gun gun;
private int shotCounter;
private void Start()
{
if ((Object)(object)gun != (Object)null)
{
Gun obj = gun;
obj.ShootPojectileAction = (Action<GameObject>)(object)Delegate.Combine((Delegate)(object)obj.ShootPojectileAction, (Delegate)(object)new Action<GameObject>(OnShoot));
}
}
private void OnShoot(GameObject bullet)
{
//IL_0041: Unknown result type (might be due to invalid IL or missing references)
//IL_004b: Unknown result type (might be due to invalid IL or missing references)
shotCounter++;
if (shotCounter % 7 == 0)
{
ProjectileHit component = bullet.GetComponent<ProjectileHit>();
if ((Object)(object)component != (Object)null)
{
component.damage *= 7f;
Transform transform = bullet.transform;
transform.localScale *= 2f;
Unbound.BuildInfoPopup("7:3 CRITICAL HIT!");
}
}
}
private void OnDestroy()
{
if ((Object)(object)gun != (Object)null)
{
Gun obj = gun;
obj.ShootPojectileAction = (Action<GameObject>)(object)Delegate.Remove((Delegate)(object)obj.ShootPojectileAction, (Delegate)(object)new Action<GameObject>(OnShoot));
}
}
}
public class RedCard : CustomCard
{
protected override string GetTitle()
{
return "Reversal: Red";
}
protected override string GetDescription()
{
return "Your bullets push enemies away with extreme force. Direct hits cause a massive shockwave that repels nearby opponents.";
}
protected override Rarity GetRarity()
{
return (Rarity)1;
}
protected override CardInfoStat[] GetStats()
{
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_002a: Unknown result type (might be due to invalid IL or missing references)
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[1]
{
new CardInfoStat
{
positive = true,
stat = "Bullet Push",
amount = "Extreme",
simepleAmount = (SimpleAmount)0
}
};
}
public override string GetModName()
{
return "JJK Cursed Techniques";
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)0;
}
protected override GameObject GetCardArt()
{
return null;
}
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
gun.projectileColor = Color.red;
JJKCardHelper.SetUniqueCategory(cardInfo);
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
RedBehaviour redBehaviour = ((Component)player).gameObject.GetComponent<RedBehaviour>();
if ((Object)(object)redBehaviour == (Object)null)
{
redBehaviour = ((Component)player).gameObject.AddComponent<RedBehaviour>();
}
redBehaviour.player = player;
}
public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
RedBehaviour component = ((Component)player).gameObject.GetComponent<RedBehaviour>();
if ((Object)(object)component != (Object)null)
{
Object.Destroy((Object)(object)component);
}
}
}
public class RedBehaviour : MonoBehaviour
{
public Player player;
public void Explode(Vector2 point)
{
//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_004a: Unknown result type (might be due to invalid IL or missing references)
//IL_004f: 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_0055: Unknown result type (might be due to invalid IL or missing references)
//IL_005a: Unknown result type (might be due to invalid IL or missing references)
//IL_0090: Unknown result type (might be due to invalid IL or missing references)
//IL_009d: Unknown result type (might be due to invalid IL or missing references)
//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
Enumerator<Player> enumerator = PlayerManager.instance.players.GetEnumerator();
try
{
while (enumerator.MoveNext())
{
Player current = enumerator.Current;
if (!((Object)(object)current != (Object)null) || !((Object)(object)current != (Object)(object)player) || current.data.dead)
{
continue;
}
Vector3 val = ((Component)current).transform.position - Vector2.op_Implicit(point);
float magnitude = ((Vector3)(ref val)).magnitude;
if (magnitude <= 8f)
{
Rigidbody2D component = ((Component)current).GetComponent<Rigidbody2D>();
if ((Object)(object)component != (Object)null)
{
float num = (8f - magnitude) / 8f;
component.AddForce(Vector2.op_Implicit(((Vector3)(ref val)).normalized * (85f * num)), (ForceMode2D)1);
}
}
}
}
finally
{
((IDisposable)enumerator).Dispose();
}
Unbound.BuildInfoPopup("RED!");
}
}
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
internal class Patch_ProjectileHit_RedHit : Object
{
private static void Prefix(ProjectileHit __instance, HitInfo hit, bool forceCall)
{
//IL_0033: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)__instance.ownPlayer != (Object)null && (Object)(object)hit.collider != (Object)null)
{
RedBehaviour component = ((Component)__instance.ownPlayer).GetComponent<RedBehaviour>();
if ((Object)(object)component != (Object)null)
{
component.Explode(hit.point);
}
}
}
}
}