Decompiled source of ChaosPoppycarsCardsCrafter v1.0.0
ChaosPoppycarsCardsCrafter.dll
Decompiled a month ago
The result has been truncated due to the large size, download it to view full contents!
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 System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using CPCComplex.MonoBehaviours; using CPCCore; using CPCCore.Extensions; using CPCCore.Utilities; using CPCCrafter.Cards; using CPCCrafter.MonoBehaviours; using CardChoiceSpawnUniqueCardPatch.CustomCategories; using CardThemeLib; using ClassesManagerReborn; using ClassesManagerReborn.Util; using HarmonyLib; using Jotunn.Utils; using Microsoft.CodeAnalysis; using ModdingUtils.Extensions; using ModdingUtils.MonoBehaviours; using ModdingUtils.Utils; using Photon.Pun; using RarityLib.Utils; using Sirenix.OdinInspector; using Sonigon; using TMPro; using UnboundLib; using UnboundLib.Cards; using UnboundLib.GameModes; using UnboundLib.Utils; using UnboundLib.Utils.UI; using UnityEngine; using UnityEngine.Events; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETFramework,Version=v4.7.1", FrameworkDisplayName = ".NET Framework 4.7.1")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } public class CreeperExplosion : MonoBehaviour { [Header("Sounds")] public SoundEvent soundDamage; [Header("Settings")] public float slow; public float silence; public bool fastSlow; public float stun; public float force = 2000f; public float objectForceMultiplier = 1f; public bool forceIgnoreMass; public float damage = 25f; public float selfDamage = 0f; public bool lethal = true; public Color dmgColor = Color.black; public float range = 2f; public float flyingFor; public bool auto = true; public bool ignoreTeam; public bool ignoreWalls; public bool staticRangeMultiplier; [FoldoutGroup("Scaling", 0)] public bool scaleSlow = true; [FoldoutGroup("Scaling", 0)] public bool scaleSilence = true; [FoldoutGroup("Scaling", 0)] public bool scaleDmg = true; [FoldoutGroup("Scaling", 0)] public bool scaleSelfDmg = true; [FoldoutGroup("Scaling", 0)] public bool scaleRadius = true; [FoldoutGroup("Scaling", 0)] public bool scaleStun = true; [FoldoutGroup("Scaling", 0)] public bool scaleForce = true; [FoldoutGroup("Immunity", 0)] public float immunity; private SpawnedAttack spawned; public bool locallySimulated; public Action<Damagable> DealDamageAction; public Action<Damagable> DealHealAction; public Action<Damagable, float> HitTargetAction; private PhotonView view; public Action<CharacterData, float> hitPlayerAction; private void Start() { spawned = ((Component)this).GetComponent<SpawnedAttack>(); view = ((Component)this).GetComponent<PhotonView>(); if (auto) { Explode(); } } private void DoExplosionEffects(Collider2D hitCol, float rangeMultiplier, float distance) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0056: 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_0096: 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_06dc: Unknown result type (might be due to invalid IL or missing references) //IL_06e1: Unknown result type (might be due to invalid IL or missing references) //IL_06eb: Unknown result type (might be due to invalid IL or missing references) //IL_06f0: Unknown result type (might be due to invalid IL or missing references) //IL_06f5: Unknown result type (might be due to invalid IL or missing references) //IL_0700: Unknown result type (might be due to invalid IL or missing references) //IL_0705: Unknown result type (might be due to invalid IL or missing references) //IL_070a: Unknown result type (might be due to invalid IL or missing references) //IL_070f: Unknown result type (might be due to invalid IL or missing references) //IL_0713: Unknown result type (might be due to invalid IL or missing references) //IL_0719: Unknown result type (might be due to invalid IL or missing references) //IL_0724: Unknown result type (might be due to invalid IL or missing references) //IL_072a: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_05a4: Unknown result type (might be due to invalid IL or missing references) //IL_05a9: Unknown result type (might be due to invalid IL or missing references) //IL_05b3: Unknown result type (might be due to invalid IL or missing references) //IL_05b8: Unknown result type (might be due to invalid IL or missing references) //IL_05bd: Unknown result type (might be due to invalid IL or missing references) //IL_05c8: Unknown result type (might be due to invalid IL or missing references) //IL_05cd: Unknown result type (might be due to invalid IL or missing references) //IL_05d2: Unknown result type (might be due to invalid IL or missing references) //IL_05d7: Unknown result type (might be due to invalid IL or missing references) //IL_05db: Unknown result type (might be due to invalid IL or missing references) //IL_05e1: Unknown result type (might be due to invalid IL or missing references) //IL_05ec: Unknown result type (might be due to invalid IL or missing references) //IL_05f2: Unknown result type (might be due to invalid IL or missing references) //IL_062a: Unknown result type (might be due to invalid IL or missing references) //IL_062f: Unknown result type (might be due to invalid IL or missing references) //IL_0639: Unknown result type (might be due to invalid IL or missing references) //IL_063e: Unknown result type (might be due to invalid IL or missing references) //IL_0643: Unknown result type (might be due to invalid IL or missing references) //IL_064e: Unknown result type (might be due to invalid IL or missing references) //IL_0653: Unknown result type (might be due to invalid IL or missing references) //IL_0658: Unknown result type (might be due to invalid IL or missing references) //IL_065d: Unknown result type (might be due to invalid IL or missing references) //IL_0661: Unknown result type (might be due to invalid IL or missing references) //IL_0667: Unknown result type (might be due to invalid IL or missing references) //IL_0672: Unknown result type (might be due to invalid IL or missing references) //IL_0678: Unknown result type (might be due to invalid IL or missing references) //IL_03c3: Unknown result type (might be due to invalid IL or missing references) //IL_03c8: Unknown result type (might be due to invalid IL or missing references) //IL_03d2: Unknown result type (might be due to invalid IL or missing references) //IL_03d7: Unknown result type (might be due to invalid IL or missing references) //IL_03dc: Unknown result type (might be due to invalid IL or missing references) //IL_03e7: Unknown result type (might be due to invalid IL or missing references) //IL_03ec: Unknown result type (might be due to invalid IL or missing references) //IL_03f1: Unknown result type (might be due to invalid IL or missing references) //IL_03f6: Unknown result type (might be due to invalid IL or missing references) //IL_03fa: Unknown result type (might be due to invalid IL or missing references) //IL_03ff: Unknown result type (might be due to invalid IL or missing references) //IL_0401: Unknown result type (might be due to invalid IL or missing references) //IL_0403: Unknown result type (might be due to invalid IL or missing references) //IL_0414: Unknown result type (might be due to invalid IL or missing references) //IL_0419: Unknown result type (might be due to invalid IL or missing references) //IL_043a: Unknown result type (might be due to invalid IL or missing references) //IL_043c: Unknown result type (might be due to invalid IL or missing references) //IL_0447: Unknown result type (might be due to invalid IL or missing references) //IL_044c: Unknown result type (might be due to invalid IL or missing references) float num = (scaleDmg ? ((Component)this).transform.localScale.x : 1f); float num2 = (scaleSelfDmg ? ((Component)this).transform.localScale.x : 1f); float num3 = (scaleForce ? ((Component)this).transform.localScale.x : 1f); float num4 = (scaleSlow ? ((Component)this).transform.localScale.x : 1f); float num5 = (scaleSilence ? ((Component)this).transform.localScale.x : 1f); float num6 = (scaleStun ? ((1f + ((Component)this).transform.localScale.x) * 0.5f) : 1f); Damagable componentInParent = ((Component)hitCol).gameObject.GetComponentInParent<Damagable>(); CharacterData val = null; Bounds bounds; Vector2 val2; if (Object.op_Implicit((Object)(object)componentInParent)) { val = ((Component)hitCol).gameObject.GetComponentInParent<CharacterData>(); if ((immunity > 0f && Object.op_Implicit((Object)(object)val) && ((Component)val).GetComponent<PlayerImmunity>().IsImune(immunity, num * damage * rangeMultiplier, ((Object)((Component)this).gameObject).name)) || (!ignoreWalls && Object.op_Implicit((Object)(object)val) && !PlayerManager.instance.CanSeePlayer(Vector2.op_Implicit(((Component)this).transform.position), val.player).canSee)) { return; } if (slow != 0f && Object.op_Implicit((Object)(object)((Component)componentInParent).GetComponent<CharacterStatModifiers>())) { if (locallySimulated) { if (spawned.IsMine() && !val.block.IsBlocking()) { val.stats.RPCA_AddSlow(slow * rangeMultiplier * num4, fastSlow); } } else if (spawned.IsMine() && !val.block.IsBlocking()) { val.view.RPC("RPCA_AddSlow", (RpcTarget)0, new object[2] { slow * rangeMultiplier * num4, fastSlow }); } } if (silence != 0f && Object.op_Implicit((Object)(object)((Component)componentInParent).GetComponent<SilenceHandler>()) && spawned.IsMine() && !val.block.IsBlocking()) { val.view.RPC("RPCA_AddSilence", (RpcTarget)0, new object[1] { silence * rangeMultiplier * num5 }); } if (Object.op_Implicit((Object)(object)spawned)) { Player spawner = spawned.spawner; } hitPlayerAction?.Invoke(val, rangeMultiplier); if (damage < 0f) { if (Object.op_Implicit((Object)(object)val)) { val.healthHandler.Heal(0f - damage); } if (DealHealAction != null) { DealHealAction(componentInParent); } } else if (damage > 0f) { if ((Object)(object)soundDamage != (Object)null && (Object)(object)val != (Object)null) { SoundManager.Instance.Play(soundDamage, ((Component)val).transform); } bounds = hitCol.bounds; val2 = Vector2.op_Implicit(((Bounds)(ref bounds)).ClosestPoint(((Component)this).transform.position)) - Vector2.op_Implicit(((Component)this).transform.position); Vector2 val3 = ((Vector2)(ref val2)).normalized; if (val3 == Vector2.zero) { val3 = Vector2.up; } if (spawned.IsMine()) { componentInParent.CallTakeDamage(num * damage * rangeMultiplier * val3, Vector2.op_Implicit(((Component)this).transform.position), (GameObject)null, spawned.spawner, lethal); } if (DealDamageAction != null) { DealDamageAction(componentInParent); } } if (selfDamage > 0f && (Object)(object)spawned.spawner != (Object)null && spawned.spawner.data.view.IsMine) { ExtensionMethods.GetOrAddComponent<RPCExplodeMono>(((Component)spawned.spawner).gameObject, false); spawned.spawner.data.view.RPC("RPCAExplodeTest", (RpcTarget)0, new object[3] { spawned.spawner.playerID, num2 * selfDamage, lethal }); } } if (Object.op_Implicit((Object)(object)val)) { if (HitTargetAction != null) { HitTargetAction(componentInParent, distance); } if (force != 0f) { if (locallySimulated) { HealthHandler healthHandler = val.healthHandler; bounds = hitCol.bounds; val2 = Vector2.op_Implicit(((Bounds)(ref bounds)).ClosestPoint(((Component)this).transform.position)) - Vector2.op_Implicit(((Component)this).transform.position); healthHandler.TakeForce(((Vector2)(ref val2)).normalized * rangeMultiplier * force * num3, (ForceMode2D)1, forceIgnoreMass, false, 0f); } else if (spawned.IsMine()) { HealthHandler healthHandler2 = val.healthHandler; bounds = hitCol.bounds; val2 = Vector2.op_Implicit(((Bounds)(ref bounds)).ClosestPoint(((Component)this).transform.position)) - Vector2.op_Implicit(((Component)this).transform.position); healthHandler2.CallTakeForce(((Vector2)(ref val2)).normalized * rangeMultiplier * force * num3, (ForceMode2D)1, forceIgnoreMass, false, flyingFor * rangeMultiplier); } } if (stun > 0f) { val.stunHandler.AddStun(stun * num6); } } else if (Object.op_Implicit((Object)(object)hitCol.attachedRigidbody)) { Rigidbody2D attachedRigidbody = hitCol.attachedRigidbody; bounds = hitCol.bounds; val2 = Vector2.op_Implicit(((Bounds)(ref bounds)).ClosestPoint(((Component)this).transform.position)) - Vector2.op_Implicit(((Component)this).transform.position); attachedRigidbody.AddForce(((Vector2)(ref val2)).normalized * rangeMultiplier * force * num3, (ForceMode2D)1); } } public void Explode() { //IL_0016: 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_0078: 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_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) float num = (scaleRadius ? ((Component)this).transform.localScale.x : 1f); Collider2D[] array = Physics2D.OverlapCircleAll(Vector2.op_Implicit(((Component)this).transform.position), range * num); for (int i = 0; i < array.Length; i++) { if (((Component)array[i]).gameObject.layer != 19) { Damagable componentInParent = ((Component)array[i]).gameObject.GetComponentInParent<Damagable>(); Vector2 val = Vector2.op_Implicit(((Component)this).transform.position); Bounds bounds = array[i].bounds; float num2 = Vector2.Distance(val, Vector2.op_Implicit(((Bounds)(ref bounds)).ClosestPoint(((Component)this).transform.position))); float num3 = 1f - num2 / (range * num); if (staticRangeMultiplier) { num3 = 1f; } num3 = Mathf.Clamp(num3, 0f, 1f); NetworkPhysicsObject component = ((Component)array[i]).GetComponent<NetworkPhysicsObject>(); if (Object.op_Implicit((Object)(object)component) && component.photonView.IsMine) { float num4 = (scaleForce ? ((Component)this).transform.localScale.x : 1f); Vector3 val2 = ((Component)component).transform.position - ((Component)this).transform.position; component.BulletPush(Vector2.op_Implicit(((Vector3)(ref val2)).normalized) * objectForceMultiplier * 1f * num3 * force * num4, Vector2.zero, (CharacterData)null); } if ((Object.op_Implicit((Object)(object)componentInParent) || Object.op_Implicit((Object)(object)array[i].attachedRigidbody)) && (!ignoreTeam || !Object.op_Implicit((Object)(object)spawned) || !((Object)(object)((Component)spawned.spawner).gameObject == (Object)(object)((Component)((Component)array[i]).transform).gameObject))) { DoExplosionEffects(array[i], num3, num2); } } } } } public class EndermenTeleport : MonoBehaviour { [CompilerGenerated] private sealed class <DelayMove>d__15 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Vector3 beforePos; public Vector3 bulletDir; public EndermenTeleport <>4__this; private Vector3 <position>5__1; private Vector3 <position2>5__2; private int <num>5__3; private float <num2>5__4; private int <i>5__5; private int <j>5__6; private int <k>5__7; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <DelayMove>d__15(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //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_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: 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_00a9: 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_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) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) if (<>1__state != 0) { return false; } <>1__state = -1; <position>5__1 = ((Component)<>4__this).transform.position; <position2>5__2 = ((Component)<>4__this).transform.position; <num>5__3 = 10; <num2>5__4 = <>4__this.distance * (float)<>4__this.level.attackLevel / (float)<num>5__3; <i>5__5 = 0; while (<i>5__5 < <num>5__3) { <position>5__1 += <num2>5__4 * ((Vector3)(ref bulletDir)).normalized; if (!Object.op_Implicit((Object)(object)Physics2D.OverlapCircle(Vector2.op_Implicit(<position>5__1), 0.5f))) { <position2>5__2 = <position>5__1; } <i>5__5++; } <j>5__6 = 0; while (<j>5__6 < <>4__this.remainParts.Length) { ((Component)<>4__this.remainParts[<j>5__6]).transform.position = ((Component)<>4__this).transform.root.position; <>4__this.remainParts[<j>5__6].Play(); <j>5__6++; } ((Component)<>4__this).GetComponentInParent<PlayerCollision>().IgnoreWallForFrames(2); ((Component)<>4__this).transform.root.position = <position2>5__2; <k>5__7 = 0; while (<k>5__7 < <>4__this.parts.Length) { ((Component)<>4__this.parts[<k>5__7]).transform.position = <position2>5__2; <>4__this.parts[<k>5__7].Play(); <k>5__7++; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public float damageNeeded = 25f; public float cd = 0.2f; public bool allowSelfDamage; public float time; private float damageDealt; public ParticleSystem[] parts; public ParticleSystem[] remainParts; public float distance = 10f; public LayerMask mask; private CharacterData data; private AttackLevel level; public UnityEvent triggerEvent; private void Start() { parts = ((Component)this).GetComponentsInChildren<ParticleSystem>(); data = ((Component)this).GetComponentInParent<CharacterData>(); level = ((Component)this).GetComponentInParent<AttackLevel>(); } public bool CanTrigger(float damage, bool selfDamage) { if ((!selfDamage || allowSelfDamage) && damage > damageNeeded && Time.time > time + cd) { return true; } return false; } public bool Trigger(float damage, bool selfDamage, Vector3 bulletDir) { //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) if (!selfDamage || allowSelfDamage) { damageDealt += damage; if (damageDealt > damageNeeded && Time.time > time + cd) { time = Time.time; damageDealt = 0f; triggerEvent.Invoke(); ((MonoBehaviour)this).StartCoroutine(DelayMove(((Component)this).transform.position, bulletDir)); return true; } } return false; } [IteratorStateMachine(typeof(<DelayMove>d__15))] private IEnumerator DelayMove(Vector3 beforePos, Vector3 bulletDir) { //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) //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <DelayMove>d__15(0) { <>4__this = this, beforePos = beforePos, bulletDir = bulletDir }; } } namespace CPCComplex.MonoBehaviours { public class RPCEndermanMono : MonoBehaviour { [PunRPC] public void RPCAEndermanTP(int playerID, float damage, bool selfDmg, int bulId) { //IL_0045: 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) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) GameObject gameObject = ((Component)PhotonNetwork.GetPhotonView(bulId)).gameObject; Player playerWithID = PlayerManager.instance.GetPlayerWithID(playerID); ((MonoBehaviour)this).StartCoroutine(gameObject.GetComponent<ProjectileHit>().HoldPlayer(playerWithID.data.healthHandler)); ((Component)playerWithID).GetComponentInChildren<EndermenTeleport>().Trigger(damage, selfDmg, gameObject.GetComponent<MoveTransform>().velocity); MoveTransform component = gameObject.GetComponent<MoveTransform>(); component.velocity *= -1f; } } public class RPCExplodeMono : MonoBehaviour { [PunRPC] public void RPCAExplodeTest(int playerID, float damage, bool lethal) { //IL_0025: 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_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) Player playerWithID = PlayerManager.instance.GetPlayerWithID(playerID); if (damage > 0f) { ((Damagable)playerWithID.data.healthHandler).TakeDamage(damage * Vector2.up, Vector2.op_Implicit(((Component)this).transform.position), (GameObject)null, playerWithID, lethal, true); } else if (damage < 0f && !lethal) { float num = 0f - damage; CharacterData data = playerWithID.data; data.health += num; playerWithID.data.health = Mathf.Clamp(playerWithID.data.health, float.NegativeInfinity, playerWithID.data.maxHealth); } else if (damage < 0f && lethal) { float num2 = 0f - damage; playerWithID.data.healthHandler.Heal(num2); } } } } namespace CPCCrafter { [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.*/)] [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.Poppycars.CPCCrafter.Id", "ChaosPoppycarsCardsCrafter", "1.0.0")] [BepInProcess("Rounds.exe")] public class ChaosPoppycarsCardsCrafter : BaseUnityPlugin { public static class CPCCardCategories { public static CardCategory PotionCategory = CustomCardCategories.instance.CardCategory("UltimatePotion"); } [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static UnityAction <>9__12_1; public static UnityAction<bool> <>9__15_0; internal void <Start>b__12_1() { } internal void <NewGUI>b__15_0(bool value) { MC_Particles.Value = value; } } [CompilerGenerated] private sealed class <GameStart>d__17 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public ChaosPoppycarsCardsCrafter <>4__this; private List<Player>.Enumerator <>s__1; private Player <player>5__2; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <GameStart>d__17(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <player>5__2 = null; <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; <>s__1 = PlayerManager.instance.players.GetEnumerator(); try { while (<>s__1.MoveNext()) { <player>5__2 = <>s__1.Current; CharacterStatModifiersExtension.GetAdditionalData(<player>5__2.data.stats).blacklistedCategories.Remove(CPCCardCategories.PotionCategory); <player>5__2 = null; } } finally { ((IDisposable)<>s__1).Dispose(); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <UpgradeAction>d__16 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public IGameModeHandler gm; public ChaosPoppycarsCardsCrafter <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <UpgradeAction>d__16(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = AutoCrafter.UpgradeSword(gm); <>1__state = 1; return true; case 1: <>1__state = -1; <>2__current = AutoCrafter.UpgradeHoe(gm); <>1__state = 2; return true; case 2: <>1__state = -1; <>2__current = AutoCrafter.UpgradeAxe(gm); <>1__state = 3; return true; case 3: <>1__state = -1; <>2__current = AutoCrafter.UpgradeArmor(gm); <>1__state = 4; return true; case 4: <>1__state = -1; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private const string ModId = "com.Poppycars.CPCCrafter.Id"; private const string ModName = "ChaosPoppycarsCardsCrafter"; public const string Version = "1.0.0"; public const string ModInitials = "CPCCrafter"; internal static List<BaseUnityPlugin> plugins; public static ConfigEntry<bool> MC_Particles; public static AssetBundle Bundle; public static ChaosPoppycarsCardsCrafter Instance { get; private set; } private void Awake() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown Bundle = AssetUtils.LoadAssetBundleFromResources("cpccrafter", typeof(ChaosPoppycarsCardsCrafter).Assembly); Harmony val = new Harmony("com.Poppycars.CPCCrafter.Id"); val.PatchAll(); GameObject val2 = Bundle.LoadAsset<GameObject>("ModCards"); CardHolder component = val2.GetComponent<CardHolder>(); component.RegisterCards(); MC_Particles = ((BaseUnityPlugin)this).Config.Bind<bool>("com.Poppycars.CPCCrafter.Id", "Minecraft_Particles", true, "Enable Minecraft Particles"); } private void Start() { //IL_0078: 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_0083: Expected O, but got Unknown plugins = (List<BaseUnityPlugin>)typeof(Chainloader).GetField("_plugins", BindingFlags.Static | BindingFlags.NonPublic).GetValue(null); Instance = this; ChaosPoppycarsCardsCore.RegisterCards(typeof(ChaosPoppycarsCardsCrafter).Assembly, Bundle); Cards.instance.AddCardValidationFunction((Func<Player, CardInfo, bool>)((Player player, CardInfo cardinfo) => toolFunc(player, cardinfo))); object obj = <>c.<>9__12_1; if (obj == null) { UnityAction val = delegate { }; <>c.<>9__12_1 = val; obj = (object)val; } Unbound.RegisterMenu("ChaosPoppycarsCardsCrafter", (UnityAction)obj, (Action<GameObject>)NewGUI, (GameObject)null, false); GameModeManager.AddHook("GameStart", (Func<IGameModeHandler, IEnumerator>)GameStart); GameModeManager.AddHook("RoundEnd", (Func<IGameModeHandler, IEnumerator>)UpgradeAction); ExtensionMethods.ExecuteAfterFrames((MonoBehaviour)(object)this, 60, (Action)delegate { CardManager.cards.Values.ToList().ForEach(delegate(Card card) { AddMod(card); }); }); } private bool toolFunc(Player player, CardInfo cardInfo) { Dictionary<CardInfo, CardInfo> dictionary = new Dictionary<CardInfo, CardInfo> { { LetherArmor.Card, NetheriteArmor.Card }, { WoodenAxe.Card, NetheriteAxe.Card }, { WoodenHoe.Card, NetheriteHoe.Card }, { WoodenSword.Card, NetheriteSword.Card } }; if (dictionary.Keys.Contains(cardInfo)) { foreach (CardInfo key in dictionary.Keys) { if (player.data.currentCards.Contains(key) && !player.data.currentCards.Contains(dictionary[key])) { return false; } } } return true; } private void AddMod(Card card) { string text = "__Rarity-" + ((object)(Rarity)(ref card.cardInfo.rarity)).ToString(); CardCategory val = CustomCardCategories.instance.CardCategory(text); CardCategory[] categories = CollectionExtensions.AddToArray<CardCategory>(card.cardInfo.categories, val); card.cardInfo.categories = categories; } private void NewGUI(GameObject menu) { TextMeshProUGUI val = default(TextMeshProUGUI); MenuHandler.CreateText("ChaosPoppycarsCardsCrafter", menu, ref val, 60, false, (Color?)null, (TMP_FontAsset)null, (Material)null, (TextAlignmentOptions?)null); MenuHandler.CreateToggle(MC_Particles.Value, "Enable Minecraft Particles (only effects potions right now)", menu, (UnityAction<bool>)delegate(bool value) { MC_Particles.Value = value; }, 60, true, (Color?)null, (TMP_FontAsset)null, (Material)null, (TextAlignmentOptions?)null); MenuHandler.CreateText("", menu, ref val, 60, true, (Color?)null, (TMP_FontAsset)null, (Material)null, (TextAlignmentOptions?)null); } [IteratorStateMachine(typeof(<UpgradeAction>d__16))] private IEnumerator UpgradeAction(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <UpgradeAction>d__16(0) { <>4__this = this, gm = gm }; } [IteratorStateMachine(typeof(<GameStart>d__17))] private IEnumerator GameStart(IGameModeHandler gm) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <GameStart>d__17(0) { <>4__this = this, gm = gm }; } } } namespace CPCCrafter.Patches { [Serializable] [HarmonyPatch(typeof(Block), "TryBlock")] internal class BlockPatch { private static void Prefix(Block __instance) { CharacterData data = __instance.data; if (CharacterStatModifiersExtension.GetAdditionalData(data.stats).hasTrident && 1 == 0) { } } } [Serializable] [HarmonyPatch(typeof(HealthHandler), "DoDamage")] internal class HealtHandlerPatchDoDamage { private static void Prefix(HealthHandler __instance, ref Vector2 damage, Vector2 position, Color blinkColor, GameObject damagingWeapon, Player damagingPlayer, bool healthRemoval, ref bool lethal, bool ignoreBlock) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown CharacterData val = (CharacterData)Traverse.Create((object)__instance).Field("data").GetValue(); Player player = val.player; if (val.isPlaying && !val.dead && !__instance.isRespawning && lethal && val.health < ((Vector2)(ref damage)).magnitude && CharacterStatModifiersExtension.GetAdditionalData(val.stats).remainingTotems > 0 && (Object)(object)((Component)player).GetComponent<TotemEffect>() != (Object)null && ((Component)player).GetComponent<TotemEffect>().cd <= 0f) { ((Component)player).GetComponent<TotemEffect>().UseMulligan(); lethal = false; } } } [Serializable] [HarmonyPatch(typeof(ProjectileHit), "Hit")] internal class ProjHitPatch { private static bool Prefix(ProjectileHit __instance, ref HitInfo hit, ref Player ___ownPlayer, ref float ___damage, bool forceCall = false) { if ((Object)(object)((Component)hit.collider).GetComponent<HealthHandler>() != (Object)null && Object.op_Implicit((Object)(object)((Component)((Component)hit.collider).GetComponent<Player>()).GetComponentInChildren<EndermenTeleport>()) && (__instance.view.IsMine || PhotonNetwork.OfflineMode)) { Player component = ((Component)hit.collider).GetComponent<Player>(); EndermenTeleport componentInChildren = ((Component)component).GetComponentInChildren<EndermenTeleport>(); if (componentInChildren.CanTrigger(___damage, component.playerID == ___ownPlayer.playerID)) { ExtensionMethods.GetOrAddComponent<RPCEndermanMono>(((Component)component).gameObject, false); component.data.view.RPC("RPCAEndermanTP", (RpcTarget)0, new object[4] { component.playerID, ___damage, component.playerID == ___ownPlayer.playerID, __instance.view.ViewID }); return false; } } return true; } } } namespace CPCCrafter.MonoBehaviours { internal class InvisEffect : ReversibleEffect { private float duration = 0f; private bool IgnoreWallStorage = false; public override void OnOnDestroy() { Block block = base.data.block; block.BlockAction = (Action<BlockTriggerType>)Delegate.Remove(block.BlockAction, new Action<BlockTriggerType>(OnBlock)); } private void OnBlock(BlockTriggerType trigger) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0022: 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_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) if (CharacterStatModifiersExtension.GetAdditionalData(base.stats).Glowstone <= 0) { base.gunStatModifier.projectileColor = Color.clear; } else { base.gunStatModifier.projectileColor = base.gun.projectileColor; } if (CharacterStatModifiersExtension.GetAdditionalData(base.stats).Glowstone >= 1 && duration <= 0f) { IgnoreWallStorage = base.gun.ignoreWalls; base.gun.ignoreWalls = true; } if (!base.player.data.view.IsMine && CharacterStatModifiersExtension.GetAdditionalData(base.stats).Glowstone >= 1) { base.gunStatModifier.projectileColor = Color.clear; } if (duration <= 0f) { ((ReversibleEffect)this).ApplyModifiers(); } duration = 3f + (float)CharacterStatModifiersExtension.GetAdditionalData(base.stats).Redstone * 1.5f; ColorEffect val = ((Component)base.player).gameObject.AddComponent<ColorEffect>(); val.SetColor(Color.clear); } public override void OnStart() { if (base.player.data.view.IsMine && ChaosPoppycarsCardsCrafter.MC_Particles.Value) { base.characterStatModifiersModifier.objectsToAddToPlayer.Add(ChaosPoppycarsCardsCrafter.Bundle.LoadAsset<GameObject>("PotionMCParticle_Invisibility")); } Block block = base.data.block; block.BlockAction = (Action<BlockTriggerType>)Delegate.Combine(block.BlockAction, new Action<BlockTriggerType>(OnBlock)); ((ReversibleEffect)this).SetLivesToEffect(int.MaxValue); } public override void OnUpdate() { if (!(duration <= 0f)) { duration -= TimeHandler.deltaTime; return; } if (CharacterStatModifiersExtension.GetAdditionalData(base.stats).Glowstone >= 1) { base.gun.ignoreWalls = IgnoreWallStorage; } ((ReversibleEffect)this).ClearModifiers(true); Object.Destroy((Object)(object)ExtensionMethods.GetOrAddComponent<ColorEffect>(((Component)this).gameObject, false)); } public override void OnOnDisable() { duration = 0f; Object.Destroy((Object)(object)ExtensionMethods.GetOrAddComponent<ColorEffect>(((Component)this).gameObject, false)); ((ReversibleEffect)this).ClearModifiers(true); } } internal class JumpEffect : ReversibleEffect { private float duration = 0f; public override void OnOnDestroy() { Block block = base.data.block; block.BlockAction = (Action<BlockTriggerType>)Delegate.Remove(block.BlockAction, new Action<BlockTriggerType>(OnBlock)); } private void OnBlock(BlockTriggerType trigger) { //IL_0070: Unknown result type (might be due to invalid IL or missing references) if (duration <= 0f) { base.characterDataModifier.numberOfJumps_add = 3 + CharacterStatModifiersExtension.GetAdditionalData(base.stats).Glowstone; ((ReversibleEffect)this).ApplyModifiers(); } duration = 3f + (float)CharacterStatModifiersExtension.GetAdditionalData(base.stats).Redstone * 1.5f; ColorEffect val = ((Component)base.player).gameObject.AddComponent<ColorEffect>(); val.SetColor(Color.green); } public override void OnStart() { base.characterStatModifiersModifier.jump_add = 0.5f; base.gravityModifier.gravityForce_mult = 0.5f; if (!CharacterStatModifiersExtension.GetAdditionalData(base.stats).InvisPot) { if (ChaosPoppycarsCardsCrafter.MC_Particles.Value) { base.characterStatModifiersModifier.objectsToAddToPlayer.Add(ChaosPoppycarsCardsCrafter.Bundle.LoadAsset<GameObject>("PotionMCParticle_Jump")); } } else if (CharacterStatModifiersExtension.GetAdditionalData(base.stats).InvisPot && base.data.view.IsMine && ChaosPoppycarsCardsCrafter.MC_Particles.Value) { base.characterStatModifiersModifier.objectsToAddToPlayer.Add(ChaosPoppycarsCardsCrafter.Bundle.LoadAsset<GameObject>("PotionMCParticle_Jump")); } Block block = base.data.block; block.BlockAction = (Action<BlockTriggerType>)Delegate.Combine(block.BlockAction, new Action<BlockTriggerType>(OnBlock)); ((ReversibleEffect)this).SetLivesToEffect(int.MaxValue); } public override void OnUpdate() { if (!(duration <= 0f)) { duration -= TimeHandler.deltaTime; return; } ((ReversibleEffect)this).ClearModifiers(true); Object.Destroy((Object)(object)ExtensionMethods.GetOrAddComponent<ColorEffect>(((Component)this).gameObject, false)); } public override void OnOnDisable() { duration = 0f; Object.Destroy((Object)(object)ExtensionMethods.GetOrAddComponent<ColorEffect>(((Component)this).gameObject, false)); ((ReversibleEffect)this).ClearModifiers(true); } } internal class RegenEffect : ReversibleEffect { private float duration = 0f; public override void OnOnDestroy() { Block block = base.data.block; block.BlockAction = (Action<BlockTriggerType>)Delegate.Remove(block.BlockAction, new Action<BlockTriggerType>(OnBlock)); } private void OnBlock(BlockTriggerType trigger) { //IL_0092: Unknown result type (might be due to invalid IL or missing references) if (duration <= 0f) { base.healthHandlerModifier.regen_add = (0.2f + (float)CharacterStatModifiersExtension.GetAdditionalData(base.stats).Glowstone / 15f) * base.player.data.maxHealth / 3f; ((ReversibleEffect)this).ApplyModifiers(); } duration = 3f + (float)CharacterStatModifiersExtension.GetAdditionalData(base.stats).Redstone * 1.5f; ColorEffect val = ((Component)base.player).gameObject.AddComponent<ColorEffect>(); val.SetColor(Color.magenta); } public override void OnStart() { if (!CharacterStatModifiersExtension.GetAdditionalData(base.stats).InvisPot) { if (ChaosPoppycarsCardsCrafter.MC_Particles.Value) { base.characterStatModifiersModifier.objectsToAddToPlayer.Add(ChaosPoppycarsCardsCrafter.Bundle.LoadAsset<GameObject>("PotionMCParticle_Regen")); } } else if (CharacterStatModifiersExtension.GetAdditionalData(base.stats).InvisPot && base.data.view.IsMine && ChaosPoppycarsCardsCrafter.MC_Particles.Value) { base.characterStatModifiersModifier.objectsToAddToPlayer.Add(ChaosPoppycarsCardsCrafter.Bundle.LoadAsset<GameObject>("PotionMCParticle_Regen")); } Block block = base.data.block; block.BlockAction = (Action<BlockTriggerType>)Delegate.Combine(block.BlockAction, new Action<BlockTriggerType>(OnBlock)); ((ReversibleEffect)this).SetLivesToEffect(int.MaxValue); } public override void OnUpdate() { if (!(duration <= 0f)) { duration -= TimeHandler.deltaTime; return; } ((ReversibleEffect)this).ClearModifiers(true); Object.Destroy((Object)(object)ExtensionMethods.GetOrAddComponent<ColorEffect>(((Component)this).gameObject, false)); } public override void OnOnDisable() { duration = 0f; Object.Destroy((Object)(object)ExtensionMethods.GetOrAddComponent<ColorEffect>(((Component)this).gameObject, false)); ((ReversibleEffect)this).ClearModifiers(true); } } internal class SpeedEffect : ReversibleEffect { private float duration = 0f; public override void OnOnDestroy() { Block block = base.data.block; block.BlockAction = (Action<BlockTriggerType>)Delegate.Remove(block.BlockAction, new Action<BlockTriggerType>(OnBlock)); } private void OnBlock(BlockTriggerType trigger) { //IL_00ce: Unknown result type (might be due to invalid IL or missing references) if (duration <= 0f) { base.characterStatModifiersModifier.movementSpeed_mult = 1.5f + (float)CharacterStatModifiersExtension.GetAdditionalData(base.stats).Glowstone / 4f; base.gunStatModifier.attackSpeed_mult = 0.75f - (float)CharacterStatModifiersExtension.GetAdditionalData(base.stats).Glowstone / 16f; base.gunAmmoStatModifier.reloadTimeMultiplier_mult = 0.75f - (float)CharacterStatModifiersExtension.GetAdditionalData(base.stats).Glowstone / 16f; ((ReversibleEffect)this).ApplyModifiers(); } duration = 3f + (float)CharacterStatModifiersExtension.GetAdditionalData(base.stats).Redstone * 1.5f; ColorEffect val = ((Component)base.player).gameObject.AddComponent<ColorEffect>(); val.SetColor(Color.cyan); } public override void OnStart() { if (!CharacterStatModifiersExtension.GetAdditionalData(base.stats).InvisPot) { if (ChaosPoppycarsCardsCrafter.MC_Particles.Value) { base.characterStatModifiersModifier.objectsToAddToPlayer.Add(ChaosPoppycarsCardsCrafter.Bundle.LoadAsset<GameObject>("PotionMCParticle_Speed")); } } else if (CharacterStatModifiersExtension.GetAdditionalData(base.stats).InvisPot && base.data.view.IsMine && ChaosPoppycarsCardsCrafter.MC_Particles.Value) { base.characterStatModifiersModifier.objectsToAddToPlayer.Add(ChaosPoppycarsCardsCrafter.Bundle.LoadAsset<GameObject>("PotionMCParticle_Speed")); } Block block = base.data.block; block.BlockAction = (Action<BlockTriggerType>)Delegate.Combine(block.BlockAction, new Action<BlockTriggerType>(OnBlock)); ((ReversibleEffect)this).SetLivesToEffect(int.MaxValue); } public override void OnUpdate() { if (!(duration <= 0f)) { duration -= TimeHandler.deltaTime; return; } ((ReversibleEffect)this).ClearModifiers(true); Object.Destroy((Object)(object)ExtensionMethods.GetOrAddComponent<ColorEffect>(((Component)this).gameObject, false)); } public override void OnOnDisable() { duration = 0f; Object.Destroy((Object)(object)ExtensionMethods.GetOrAddComponent<ColorEffect>(((Component)this).gameObject, false)); ((ReversibleEffect)this).ClearModifiers(true); } } internal class StrengthEffect : ReversibleEffect { private float duration = 0f; public override void OnOnDestroy() { Block block = base.data.block; block.BlockAction = (Action<BlockTriggerType>)Delegate.Remove(block.BlockAction, new Action<BlockTriggerType>(OnBlock)); } private void OnBlock(BlockTriggerType trigger) { //IL_007b: Unknown result type (might be due to invalid IL or missing references) if (duration <= 0f) { base.gunStatModifier.damage_mult = 1.5f + (float)CharacterStatModifiersExtension.GetAdditionalData(base.stats).Glowstone * 0.25f; ((ReversibleEffect)this).ApplyModifiers(); } duration = 3f + (float)CharacterStatModifiersExtension.GetAdditionalData(base.stats).Redstone * 1.5f; ColorEffect val = ((Component)base.player).gameObject.AddComponent<ColorEffect>(); val.SetColor(Color.red); } public override void OnStart() { if (!CharacterStatModifiersExtension.GetAdditionalData(base.stats).InvisPot) { if (ChaosPoppycarsCardsCrafter.MC_Particles.Value) { base.characterStatModifiersModifier.objectsToAddToPlayer.Add(ChaosPoppycarsCardsCrafter.Bundle.LoadAsset<GameObject>("PotionMCParticle_Strength")); } } else if (CharacterStatModifiersExtension.GetAdditionalData(base.stats).InvisPot && base.data.view.IsMine && ChaosPoppycarsCardsCrafter.MC_Particles.Value) { base.characterStatModifiersModifier.objectsToAddToPlayer.Add(ChaosPoppycarsCardsCrafter.Bundle.LoadAsset<GameObject>("PotionMCParticle_Strength")); } Block block = base.data.block; block.BlockAction = (Action<BlockTriggerType>)Delegate.Combine(block.BlockAction, new Action<BlockTriggerType>(OnBlock)); ((ReversibleEffect)this).SetLivesToEffect(int.MaxValue); } public override void OnUpdate() { if (!(duration <= 0f)) { duration -= TimeHandler.deltaTime; return; } ((ReversibleEffect)this).ClearModifiers(true); Object.Destroy((Object)(object)ExtensionMethods.GetOrAddComponent<ColorEffect>(((Component)this).gameObject, false)); } public override void OnOnDisable() { duration = 0f; Object.Destroy((Object)(object)ExtensionMethods.GetOrAddComponent<ColorEffect>(((Component)this).gameObject, false)); ((ReversibleEffect)this).ClearModifiers(true); } } public class TotemEffect : ReversibleEffect { private ColorFlash colorFlash = null; private HealthHandler healthHandler; public float cd = 0f; public override void OnStart() { ((ReversibleEffect)this).SetLivesToEffect(int.MaxValue); healthHandler = base.player.data.healthHandler; } public void Update() { if (cd >= 0f) { cd -= Time.deltaTime; } } public void UseMulligan() { //IL_0039: 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_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: 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) if (CharacterStatModifiersExtension.GetAdditionalData(base.stats).remainingTotems > 0 && !(cd > 0f)) { base.block.CallDoBlock(false, false, (BlockTriggerType)0, default(Vector3), false); cd += 0.1f; ExtensionMethods.ExecuteAfterFrames((MonoBehaviour)(object)ChaosPoppycarsCardsCrafter.Instance, 5, (Action)delegate { ExtensionMethods.GetOrAddComponent<TotemRegenEffect>(((Component)base.player).gameObject, false); }); ((MonoBehaviour)(DamageOverTime)Traverse.Create((object)base.health).Field("dot").GetValue()).StopAllCoroutines(); colorFlash = ExtensionMethods.GetOrAddComponent<ColorFlash>(((Component)base.player).gameObject, false); colorFlash.SetNumberOfFlashes(1); colorFlash.SetDuration(0.25f); colorFlash.SetDelayBetweenFlashes(0.25f); colorFlash.SetColorMax(Color.white); colorFlash.SetColorMin(Color.white); CharacterStatModifiersAdditionalData additionalData = CharacterStatModifiersExtension.GetAdditionalData(base.stats); additionalData.remainingTotems--; } } public override void OnOnDestroy() { } } internal class TotemRegenEffect : ReversibleEffect { private float duration = 0f; private float HealAmt = 0f; public override void OnStart() { //IL_006e: Unknown result type (might be due to invalid IL or missing references) HealAmt = base.player.data.maxHealth * 0.4f; base.healthHandlerModifier.regen_add = HealAmt / 3f; if (duration <= 0f) { ((ReversibleEffect)this).ApplyModifiers(); } duration = 3f; ColorEffect val = ((Component)base.player).gameObject.AddComponent<ColorEffect>(); val.SetColor(Color.magenta); ((ReversibleEffect)this).SetLivesToEffect(int.MaxValue); } public override void OnUpdate() { if (!(duration <= 0f)) { duration -= TimeHandler.deltaTime; return; } ((ReversibleEffect)this).ClearModifiers(true); Object.Destroy((Object)(object)ExtensionMethods.GetOrAddComponent<ColorEffect>(((Component)this).gameObject, false)); Object.Destroy((Object)(object)this); } public override void OnOnDisable() { duration = 0f; Object.Destroy((Object)(object)ExtensionMethods.GetOrAddComponent<ColorEffect>(((Component)this).gameObject, false)); ((ReversibleEffect)this).ClearModifiers(true); } } } namespace CPCCrafter.Cards { internal class CraftingOutcomePC : CustomCard { public override bool GetEnabled() { return false; } public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { cardInfo.categories = (CardCategory[])(object)new CardCategory[1] { CPCCoreCardCategories.PoppysChaosCategory }; CPCDebug.Log((object)("[CPCCore][Card] " + ((CustomCard)this).GetTitle() + " has been setup.")); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { ExtensionMethods.ExecuteAfterFrames((MonoBehaviour)(object)ChaosPoppycarsCardsCrafter.Instance, 10, (Action)delegate { Cards.instance.AddCardToPlayer(player, CraftingTable.Card, false, "", 0f, 0f, true); CardBarUtils.instance.ShowAtEndOfPhase(player, CraftingTable.Card); Cards.instance.AddCardToPlayer(player, WoodenAxe.Card, false, "", 0f, 0f, true); CardBarUtils.instance.ShowAtEndOfPhase(player, WoodenAxe.Card); Cards.instance.AddCardToPlayer(player, WoodenSword.Card, false, "", 0f, 0f, true); CardBarUtils.instance.ShowAtEndOfPhase(player, WoodenSword.Card); Cards.instance.AddCardToPlayer(player, WoodenHoe.Card, false, "", 0f, 0f, true); CardBarUtils.instance.ShowAtEndOfPhase(player, WoodenHoe.Card); Cards.instance.AddCardToPlayer(player, LetherArmor.Card, false, "", 0f, 0f, true); CardBarUtils.instance.ShowAtEndOfPhase(player, LetherArmor.Card); }); CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "CPCCore", ((CustomCard)this).GetTitle(), player.playerID)); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { } protected override string GetTitle() { return "Crafting"; } protected override string GetDescription() { return "You must mine and craft"; } protected override GameObject GetCardArt() { return null; } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)2; } protected override CardInfoStat[] GetStats() { return (CardInfoStat[])(object)new CardInfoStat[0]; } protected override CardThemeColorType GetTheme() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (CardThemeColorType)7; } public override string GetModName() { return "CPC"; } } internal class ChainArmor : CustomCard { internal static CardInfo Card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { statModifiers.health = 1.2f; statModifiers.jump = 0.75f; cardInfo.allowMultiple = false; CPCDebug.Log((object)("[CPCCrafter][Card] " + ((CustomCard)this).GetTitle() + " has been setup.")); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "CPCCrafter", ((CustomCard)this).GetTitle(), player.playerID)); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "CPCCrafter", ((CustomCard)this).GetTitle(), player.playerID)); } public override void Callback() { ExtensionMethods.GetOrAddComponent<ClassNameMono>(((Component)this).gameObject, false).className = MinecrafterClass.name; } protected override string GetTitle() { return "Chainmail Armor"; } protected override string GetDescription() { return "Put on Chainmail Armor to survive longer"; } protected override GameObject GetCardArt() { return ChaosPoppycarsCardsCrafter.Bundle.LoadAsset<GameObject>("C_ChainmailArmor"); } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: 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_0020: 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_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Health", amount = "+20%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Jump Height", amount = "-25%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: 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) return CardThemeLib.instance.CreateOrGetType("Minecraft Soil", (CardThemeColor)null); } public override string GetModName() { return "CPC"; } } internal class DiamondArmor : CustomCard { internal static CardInfo Card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { statModifiers.jump = 0.75f; statModifiers.health = 1.6f; cardInfo.allowMultiple = false; CPCDebug.Log((object)("[CPCCrafter][Card] " + ((CustomCard)this).GetTitle() + " has been setup.")); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "CPCCrafter", ((CustomCard)this).GetTitle(), player.playerID)); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "CPCCrafter", ((CustomCard)this).GetTitle(), player.playerID)); } public override void Callback() { ExtensionMethods.GetOrAddComponent<ClassNameMono>(((Component)this).gameObject, false).className = MinecrafterClass.name; } protected override string GetTitle() { return "Diamond Armor"; } protected override string GetDescription() { return "Put on diamond armor to survive longer"; } protected override GameObject GetCardArt() { return ChaosPoppycarsCardsCrafter.Bundle.LoadAsset<GameObject>("C_DiamondArmor"); } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)2; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: 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_0020: 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_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Health", amount = "+60%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Jump Height", amount = "-25%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: 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) return CardThemeLib.instance.CreateOrGetType("Minecraft Soil", (CardThemeColor)null); } public override string GetModName() { return "CPC"; } } internal class GoldArmor : CustomCard { internal static CardInfo Card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { statModifiers.movementSpeed = 1.5f; cardInfo.allowMultiple = false; CPCDebug.Log((object)("[CPCCrafter][Card] " + ((CustomCard)this).GetTitle() + " has been setup.")); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "CPCCrafter", ((CustomCard)this).GetTitle(), player.playerID)); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "CPCCrafter", ((CustomCard)this).GetTitle(), player.playerID)); } public override void Callback() { ExtensionMethods.GetOrAddComponent<ClassNameMono>(((Component)this).gameObject, false).className = MinecrafterClass.name; } protected override string GetTitle() { return "Gold Armor"; } protected override string GetDescription() { return "Put on gold armor to move faster"; } protected override GameObject GetCardArt() { return ChaosPoppycarsCardsCrafter.Bundle.LoadAsset<GameObject>("C_GoldArmor"); } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: 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_0020: 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_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Move Speed", amount = "+50%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: 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) return CardThemeLib.instance.CreateOrGetType("Minecraft Soil", (CardThemeColor)null); } public override string GetModName() { return "CPC"; } } internal class IronArmor : CustomCard { internal static CardInfo Card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { statModifiers.health = 1.4f; statModifiers.jump = 0.75f; cardInfo.allowMultiple = false; CPCDebug.Log((object)("[CPCCrafter][Card] " + ((CustomCard)this).GetTitle() + " has been setup.")); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "CPCCrafter", ((CustomCard)this).GetTitle(), player.playerID)); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "CPCCrafter", ((CustomCard)this).GetTitle(), player.playerID)); } public override void Callback() { ExtensionMethods.GetOrAddComponent<ClassNameMono>(((Component)this).gameObject, false).className = MinecrafterClass.name; } protected override string GetTitle() { return "Iron Armor"; } protected override string GetDescription() { return "Put on iron armor to survive longer"; } protected override GameObject GetCardArt() { return ChaosPoppycarsCardsCrafter.Bundle.LoadAsset<GameObject>("C_IronArmor"); } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: 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_0020: 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_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Health", amount = "+40%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Jump Height", amount = "-25%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: 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) return CardThemeLib.instance.CreateOrGetType("Minecraft Soil", (CardThemeColor)null); } public override string GetModName() { return "CPC"; } } internal class LetherArmor : CustomCard { internal static CardInfo Card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { statModifiers.health = 1.1f; cardInfo.allowMultiple = false; CPCDebug.Log((object)("[CPCCrafter][Card] " + ((CustomCard)this).GetTitle() + " has been setup.")); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CharacterStatModifiersExtension.GetAdditionalData(characterStats).everyOther = false; CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "CPCCrafter", ((CustomCard)this).GetTitle(), player.playerID)); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "CPCCrafter", ((CustomCard)this).GetTitle(), player.playerID)); } public override void Callback() { ExtensionMethods.GetOrAddComponent<ClassNameMono>(((Component)this).gameObject, false).className = MinecrafterClass.name; } protected override string GetTitle() { return "Leather Armor"; } protected override string GetDescription() { return "Put on leather armor to survive longer"; } protected override GameObject GetCardArt() { return ChaosPoppycarsCardsCrafter.Bundle.LoadAsset<GameObject>("C_LeatherArmor"); } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: 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_0020: 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_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = true, stat = "Health", amount = "+10%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: 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) return CardThemeLib.instance.CreateOrGetType("Minecraft Soil", (CardThemeColor)null); } public override string GetModName() { return "CPC"; } } internal class NetheriteArmor : CustomCard { internal static CardInfo Card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { statModifiers.health = 2f; statModifiers.movementSpeed = 1.25f; statModifiers.jump = 0.5f; cardInfo.allowMultiple = false; CPCDebug.Log((object)("[CPCCrafter][Card] " + ((CustomCard)this).GetTitle() + " has been setup.")); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "CPCCrafter", ((CustomCard)this).GetTitle(), player.playerID)); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "CPCCrafter", ((CustomCard)this).GetTitle(), player.playerID)); } public override void Callback() { ExtensionMethods.GetOrAddComponent<ClassNameMono>(((Component)this).gameObject, false).className = MinecrafterClass.name; } protected override string GetTitle() { return "Netherite Armor"; } protected override string GetDescription() { return "Put on netherite armor to survive longer"; } protected override GameObject GetCardArt() { return ChaosPoppycarsCardsCrafter.Bundle.LoadAsset<GameObject>("C_NetheriteArmor"); } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)2; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: 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_0020: 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_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[3] { new CardInfoStat { positive = true, stat = "Health", amount = "+100%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Move Speed", amount = "+25%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Jump Height", amount = "-50%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: 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) return CardThemeLib.instance.CreateOrGetType("Minecraft Soil", (CardThemeColor)null); } public override string GetModName() { return "CPC"; } } internal class Arrow : CustomCard { internal static CardInfo Card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { gun.spread = -0.05f; gun.damage = 1.05f; CPCDebug.Log((object)("[CPCCrafter][Card] " + ((CustomCard)this).GetTitle() + " has been setup.")); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "CPCCrafter", ((CustomCard)this).GetTitle(), player.playerID)); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "CPCCrafter", ((CustomCard)this).GetTitle(), player.playerID)); } public override void Callback() { ExtensionMethods.GetOrAddComponent<ClassNameMono>(((Component)this).gameObject, false).className = MinecrafterClass.name; } protected override string GetTitle() { return "Arrow"; } protected override string GetDescription() { return "You do a bit more damage and reduce your spread"; } protected override GameObject GetCardArt() { return ChaosPoppycarsCardsCrafter.Bundle.LoadAsset<GameObject>("C_Arrow"); } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)0; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: 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_0020: 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_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Spread", amount = "-5%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Damage", amount = "+5%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: 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) return CardThemeLib.instance.CreateOrGetType("Minecraft Soil", (CardThemeColor)null); } public override string GetModName() { return "CPC"; } } internal class BouncyArrows : CustomCard { internal static CardInfo Card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { gun.reflects = 3; gun.speedMOnBounce = 0.75f; CPCDebug.Log((object)("[CPCCrafter][Card] " + ((CustomCard)this).GetTitle() + " has been setup.")); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "CPCCrafter", ((CustomCard)this).GetTitle(), player.playerID)); ObjectsToSpawn item = ((GameObject)Resources.Load("0 cards/Mayhem")).GetComponent<Gun>().objectsToSpawn[0]; List<ObjectsToSpawn> list = gun.objectsToSpawn.ToList(); list.Add(item); gun.objectsToSpawn = list.ToArray(); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "CPCCrafter", ((CustomCard)this).GetTitle(), player.playerID)); } public override void Callback() { ExtensionMethods.GetOrAddComponent<ClassNameMono>(((Component)this).gameObject, false).className = MinecrafterClass.name; } protected override string GetTitle() { return "Slimy Arrows"; } protected override string GetDescription() { return "You covered your arrows in slime, now they will bounce and loose some speed after every bounce"; } protected override GameObject GetCardArt() { return ChaosPoppycarsCardsCrafter.Bundle.LoadAsset<GameObject>("C_BouncyArrow"); } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: 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_0020: 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_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Bounces", amount = "+3", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = true, stat = "Projectile Speed on bounce", amount = "-25%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: 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) return CardThemeLib.instance.CreateOrGetType("Minecraft Soil", (CardThemeColor)null); } public override string GetModName() { return "CPC"; } } internal class DamageArrows : CustomCard { internal static CardInfo Card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { gun.percentageDamage = 0.05f; gun.attackSpeed = 1.25f; CPCDebug.Log((object)("[CPCCrafter][Card] " + ((CustomCard)this).GetTitle() + " has been setup.")); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "CPCCrafter", ((CustomCard)this).GetTitle(), player.playerID)); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "CPCCrafter", ((CustomCard)this).GetTitle(), player.playerID)); } public override void Callback() { ExtensionMethods.GetOrAddComponent<ClassNameMono>(((Component)this).gameObject, false).className = MinecrafterClass.name; } protected override string GetTitle() { return "Instant Damage Arrows"; } protected override string GetDescription() { return "You tipped your arrows in instant damage, making them deal percentage damage (you can only get 3 of this card)"; } protected override GameObject GetCardArt() { return ChaosPoppycarsCardsCrafter.Bundle.LoadAsset<GameObject>("C_DeathArrow"); } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: 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_0020: 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_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Percentage Damage", amount = "+5%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Attack Speed", amount = "-25%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: 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) return CardThemeLib.instance.CreateOrGetType("Minecraft Soil", (CardThemeColor)null); } public override string GetModName() { return "CPC"; } } internal class ExplosiveArrows : CustomCard { internal static CardInfo Card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { gun.damage = 0.85f; CPCDebug.Log((object)("[CPCCrafter][Card] " + ((CustomCard)this).GetTitle() + " has been setup.")); cardInfo.allowMultiple = true; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "CPCCrafter", ((CustomCard)this).GetTitle(), player.playerID)); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "CPCCrafter", ((CustomCard)this).GetTitle(), player.playerID)); } public override void Callback() { ExtensionMethods.GetOrAddComponent<ClassNameMono>(((Component)this).gameObject, false).className = MinecrafterClass.name; } protected override string GetTitle() { return "TNT Arrows"; } protected override string GetDescription() { return "You attached TNT to your arrows, now they will explode shortly after landing"; } protected override GameObject GetCardArt() { return ChaosPoppycarsCardsCrafter.Bundle.LoadAsset<GameObject>("C_ExplosiveArrow"); } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: 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_0020: 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_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[1] { new CardInfoStat { positive = false, stat = "Damage", amount = "-15%", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: 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) return CardThemeLib.instance.CreateOrGetType("Minecraft Soil", (CardThemeColor)null); } public override string GetModName() { return "CPC"; } } internal class PoisonArrows : CustomCard { internal static CardInfo Card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { gun.damage = 1.7f; gun.ammo = -1; CPCDebug.Log((object)("[CPCCrafter][Card] " + ((CustomCard)this).GetTitle() + " has been setup.")); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "CPCCrafter", ((CustomCard)this).GetTitle(), player.playerID)); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "CPCCrafter", ((CustomCard)this).GetTitle(), player.playerID)); } public override void Callback() { ExtensionMethods.GetOrAddComponent<ClassNameMono>(((Component)this).gameObject, false).className = MinecrafterClass.name; } protected override string GetTitle() { return "Poison Tipped Arrows"; } protected override string GetDescription() { return "You tipped your arrows in poison, now they will infect your enemys"; } protected override GameObject GetCardArt() { return ChaosPoppycarsCardsCrafter.Bundle.LoadAsset<GameObject>("C_PoisonArrow"); } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)1; } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: 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_0020: 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_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown return (CardInfoStat[])(object)new CardInfoStat[2] { new CardInfoStat { positive = true, stat = "Damage", amount = "+50%", simepleAmount = (SimpleAmount)0 }, new CardInfoStat { positive = false, stat = "Ammo", amount = "-1", simepleAmount = (SimpleAmount)0 } }; } protected override CardThemeColorType GetTheme() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: 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) return CardThemeLib.instance.CreateOrGetType("Minecraft Soil", (CardThemeColor)null); } public override string GetModName() { return "CPC"; } } internal class PunchII : CustomCard { internal static CardInfo Card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { CPCDebug.Log((object)("[CPCCrafter][Card] " + ((CustomCard)this).GetTitle() + " has been setup.")); cardInfo.allowMultiple = true; } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "CPCCrafter", ((CustomCard)this).GetTitle(), player.playerID)); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "CPCCrafter", ((CustomCard)this).GetTitle(), player.playerID)); } public override void Callback() { ExtensionMethods.GetOrAddComponent<ClassNameMono>(((Component)this).gameObject, false).className = MinecrafterClass.name; } protected override string GetTitle() { return "Punch II"; } protected override string GetDescription() { return "You enchanted your bow with Punch II, now your arrows push opponents away"; } protected override GameObject GetCardArt() { return ChaosPoppycarsCardsCrafter.Bundle.LoadAsset<GameObject>("C_PunchII"); } protected override Rarity GetRarity() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (Rarity)2; } protected override CardInfoStat[] GetStats() { return (CardInfoStat[])(object)new CardInfoStat[0]; } protected override CardThemeColorType GetTheme() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: 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) return CardThemeLib.instance.CreateOrGetType("Minecraft Soil", (CardThemeColor)null); } public override string GetModName() { return "CPC"; } } internal class ToxicArrows : CustomCard { internal static CardInfo Card; public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block) { gun.damage = 0.85f; CPCDebug.Log((object)("[CPCCrafter][Card] " + ((CustomCard)this).GetTitle() + " has been setup.")); } public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been added to player {2}.", "CPCCrafter", ((CustomCard)this).GetTitle(), player.playerID)); } public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats) { CPCDebug.Log((object)string.Format("[{0}][Card] {1} has been removed from player {2}.", "CPCCrafter", ((CustomCard)this).GetTitle(), player.playerID)); } public override void Callback() { ExtensionMethods.GetOrAddComponent<ClassNameMono>(((Component)this).gameObject, false).className = MinecrafterClass.name; } protected override string GetTitle() { return "Toxic Bomb Arrows"; } protected override string GetDescription() { return "You attached a toxic bomb to your arrows, now they release a gas cloud on exploding"; } protected override GameObject GetCardArt() { return ChaosPoppycarsCardsCrafter.Bundle.LoadAsset<GameObject>("C_ToxicArrow"); } protected override Rarity GetRarity() { //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_000e: Unknown result type (might be due to invalid IL or missing references) return RarityUtils.GetRarity("Legendary"); } protected override CardInfoStat[] GetStats() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: U