Decompiled source of RPGworld v1.1.2
plugins/RPGworldMod.dll
Decompiled 3 weeks 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.Collections.ObjectModel; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Security; using System.Security.Permissions; using Alexandria.BreakableAPI; using Alexandria.CharacterAPI; using Alexandria.ItemAPI; using Alexandria.Misc; using Alexandria.cAPI; using BepInEx; using Dungeonator; using Gungeon; using HarmonyLib; using InControl; using Microsoft.CodeAnalysis; using Mono.Cecil.Cil; using MonoMod.Cil; using SGUI; using UnityEngine; using UnityEngine.Rendering; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("Mod")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Mod")] [assembly: AssemblyCopyright("Copyright © 2020")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("d6d7a494-722e-4763-959b-c2d6b6a42b01")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.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; } } } namespace RPGworldMod { public class Alt_ankh_shield : GunBehaviour { public class Shield : ProjectileSlashingBehaviour { } public static int ID; public static Gun gun_fr; private bool startedFiring = false; private DamageTypeModifier poisonImmunity = new DamageTypeModifier { damageType = (CoreDamageTypes)16, damageMultiplier = 0f }; private DamageTypeModifier fireImmunity = new DamageTypeModifier { damageType = (CoreDamageTypes)4, damageMultiplier = 0f }; private DamageTypeModifier electricImmunity = new DamageTypeModifier { damageType = (CoreDamageTypes)64, damageMultiplier = 0f }; public static int Damage; public static PlayerController Wielder; private bool HasReloaded; public static bool playEmptyAnim; public static void Add() { //IL_012e: 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_0182: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_031a: Unknown result type (might be due to invalid IL or missing references) //IL_0348: Unknown result type (might be due to invalid IL or missing references) //IL_0376: Unknown result type (might be due to invalid IL or missing references) //IL_03a4: 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_0401: Unknown result type (might be due to invalid IL or missing references) Gun val = Databases.Items.NewGun("Alt Ankh shield", "alt_ankh_shield"); Game.Items.Rename("outdated_gun_mods:alt_ankh_shield", "rpgworld:alt_ankh_shield"); ((Component)val).gameObject.AddComponent<Alt_ankh_shield>(); GunExt.SetName((PickupObject)(object)val, "Ankh Shield"); GunExt.SetShortDescription((PickupObject)(object)val, "Behind The Wall"); GunExt.SetLongDescription((PickupObject)(object)val, "Durable defensive tool. Stops bullets and grants immunity to contact damage, fire, poison and electricity while in use. More effective if you move away from the danger or don't move at all. Stopping bullets wastes durability. Has more durability the more master rounds wielder has.\n\nSuper strong ancient artifact. And even though it looks like an ordinary obsidian board, it is one of the most durable objects in the Gungeon. The shield was endowed with divine strength and protective properties by the Ankh amulet, located in its very center. There is probably nothing more reliable than holding in hands this piece of equipment under the protection of the ancient gods."); GunExt.SetName((PickupObject)(object)val, (GungeonSupportedLanguages)9, "Щит Анх"); GunExt.SetShortDescription((PickupObject)(object)val, (GungeonSupportedLanguages)9, "За стеной"); GunExt.SetLongDescription((PickupObject)(object)val, (GungeonSupportedLanguages)9, "Прочный защитный инструмент. Останавливает пули и дает иммунитет к контактному урону, огню, яду и электричеству во время использования. Наиболее эффективен если отступать или стоять на месте. Блокирование пуль тратит прочность. Имеет тем больше прочности, чем больше у патронов мастера у владельца.\n\nСверхпрочный древний артефакт. И пусть с виду он выглядит как обычная обсидиановая доска, - он один из самых прочных предметов Оружелья. Божественной прочностью и свойствами оберега щит наделил амулет Анх, расположенный в самом его центре. Наверное, нет ничего более надёжного, чем держать этот элемент снаряжения под защитой древних богов."); GunExt.SetupSprite(val, (tk2dSpriteCollectionData)null, "alt_ankh_shield_idle_001", 8); GunExt.SetAnimationFPS(val, val.idleAnimation, 10); GunExt.SetAnimationFPS(val, val.shootAnimation, 240); GunExt.SetAnimationFPS(val, val.reloadAnimation, 11); GunExt.SetAnimationFPS(val, val.outOfAmmoAnimation, 10); GunExt.SetAnimationFPS(val, val.emptyAnimation, 10); GunExt.SetAnimationFPS(val, val.emptyReloadAnimation, 11); ref string gunSwitchGroup = ref val.gunSwitchGroup; PickupObject byId = PickupObjectDatabase.GetById(417); gunSwitchGroup = ((Gun)((byId is Gun) ? byId : null)).gunSwitchGroup; val.doesScreenShake = false; PickupObject byId2 = PickupObjectDatabase.GetById(86); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId2 is Gun) ? byId2 : null), true, false); val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.ammoCost = 0; val.DefaultModule.shootStyle = (ShootStyle)1; val.reloadTime = 2f; val.InfiniteAmmo = true; val.DefaultModule.cooldownTime = 0.1f; val.DefaultModule.numberOfShotsInClip = 13; val.muzzleFlashEffects.type = (VFXPoolType)0; ((PickupObject)val).quality = (ItemQuality)(-100); val.gunClass = (GunClass)50; val.gunHandedness = (GunHandedness)1; val.outOfAmmoAnimation = GunExt.UpdateAnimation(val, "empty", (tk2dSpriteCollectionData)null, false); val.emptyAnimation = GunExt.UpdateAnimation(val, "empty", (tk2dSpriteCollectionData)null, false); val.reloadAnimation = GunExt.UpdateAnimation(val, "reload", (tk2dSpriteCollectionData)null, false); val.emptyReloadAnimation = GunExt.UpdateAnimation(val, "empty_reload", (tk2dSpriteCollectionData)null, false); GunTools.TrimGunSprites(val); ((PickupObject)val).ForcedPositionInAmmonomicon = PickupObjectDatabase.GetById(380).ForcedPositionInAmmonomicon; val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("Alt Ankh Durability", "RPGworldMod/Resources/CustomGunAmmoTypes/alt_ankh_durability_clipfull", "RPGworldMod/Resources/CustomGunAmmoTypes/ankh_durability_clipempty"); Projectile val2 = ProjectileUtility.SetupProjectile(86); val.DefaultModule.projectiles[0] = val2; ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.enabled = false; val2.baseData.damage = 0f; val2.pierceMinorBreakables = true; val2.damagesWalls = false; Shield shield = ((Component)val2).gameObject.AddComponent<Shield>(); shield.DestroyBaseAfterFirstSlash = true; shield.DestroyBaseAfterFirstSlash = true; shield.soundToPlay = null; shield.InteractMode = SlashDoer.ProjInteractMode.DESTROY; shield.SlashVFX.type = (VFXPoolType)0; shield.SlashRange = 1f; shield.SlashDimensions = 180f; shield.playerKnockback = 0f; shield.slashKnockback = 0f; shield.SlashDamageUsesBaseProjectileDamage = true; Databases.Items.Add(val, (tk2dSpriteCollectionData)null, "ANY"); ID = ((PickupObject)val).PickupObjectId; val.usesContinuousFireAnimation = true; ((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.shootAnimation).wrapMode = (WrapMode)1; ((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.shootAnimation).loopStart = 1; ((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.idleAnimation).wrapMode = (WrapMode)1; ((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.idleAnimation).loopStart = 6; ((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.outOfAmmoAnimation).wrapMode = (WrapMode)1; ((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.outOfAmmoAnimation).loopStart = 2; ((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.emptyAnimation).wrapMode = (WrapMode)1; ((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.emptyAnimation).loopStart = 2; ((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.reloadAnimation).wrapMode = (WrapMode)1; ((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.reloadAnimation).loopStart = 13; ((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.emptyReloadAnimation).wrapMode = (WrapMode)1; ((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.emptyReloadAnimation).loopStart = 13; gun_fr = val; } public override void PostProcessProjectile(Projectile projectile) { GameActor currentOwner = base.gun.CurrentOwner; PlayerController val = (PlayerController)(object)((currentOwner is PlayerController) ? currentOwner : null); if ((Object)(object)val == (Object)null) { base.gun.ammo = base.gun.GetBaseMaxAmmo(); } base.gun.ClipShotsRemaining = base.gun.ClipCapacity - Damage; } public override void OwnedUpdate(GameActor owner, GunInventory inventory) { if ((Object)(object)Wielder != (Object)null && !base.gun.IsFiring && startedFiring) { startedFiring = false; ((BraveBehaviour)Wielder).healthHaver.damageTypeModifiers.Remove(poisonImmunity); ((BraveBehaviour)Wielder).healthHaver.damageTypeModifiers.Remove(fireImmunity); ((BraveBehaviour)Wielder).healthHaver.damageTypeModifiers.Remove(electricImmunity); PassiveItem.DecrementFlag(Wielder, typeof(LiveAmmoItem)); PassiveItem.DecrementFlag(Wielder, typeof(Alt_ankh_shield)); } ((GunBehaviour)this).OwnedUpdate(owner, inventory); } public override void OnDropped() { if (startedFiring) { startedFiring = false; ((BraveBehaviour)Wielder).healthHaver.damageTypeModifiers.Remove(poisonImmunity); ((BraveBehaviour)Wielder).healthHaver.damageTypeModifiers.Remove(fireImmunity); ((BraveBehaviour)Wielder).healthHaver.damageTypeModifiers.Remove(electricImmunity); PassiveItem.DecrementFlag(Wielder, typeof(LiveAmmoItem)); PassiveItem.DecrementFlag(Wielder, typeof(Alt_ankh_shield)); } ((GunBehaviour)this).OnDropped(); } public static int AmountOfMasterRounds(PlayerController player) { int num = 0; for (int i = 0; i < player.passiveItems.Count; i++) { if (((PickupObject)player.passiveItems[i]).PickupObjectId >= 467 && ((PickupObject)player.passiveItems[i]).PickupObjectId <= 471) { num++; } } return 13 + 12 * num; } public override void OnReloadPressed(PlayerController player, Gun gun, bool manual) { if (gun.IsReloading && HasReloaded) { HasReloaded = false; AkSoundEngine.PostEvent("Play_ENM_bombshee_scream_01", ((Component)this).gameObject); } ((GunBehaviour)this).OnReloadPressed(player, gun, manual); } public override void OnReloadEndedPlayer(PlayerController owner, Gun gun) { Damage = 0; playEmptyAnim = false; ((GunBehaviour)this).OnReloadEndedPlayer(owner, gun); } public override void Update() { gun_fr = base.gun; if ((Object)(object)Wielder != (Object)null && !base.gun.IsReloading && playEmptyAnim && !Wielder.PlayerHasActiveSynergy("RPGW Autumn Mirage")) { base.gun.Play(base.gun.emptyAnimation); } if ((Object)(object)Wielder != (Object)null && Wielder.PlayerHasActiveSynergy("RPGW Autumn Mirage")) { Damage = 0; } GameActor currentOwner = base.gun.CurrentOwner; PlayerController val = (PlayerController)(object)((currentOwner is PlayerController) ? currentOwner : null); if (val != null) { if ((Object)(object)Wielder != (Object)(object)val) { Wielder = val; } base.gun.DefaultModule.numberOfShotsInClip = AmountOfMasterRounds(val); if (Damage <= base.gun.ClipCapacity) { if (!base.gun.IsReloading) { base.gun.ClipShotsRemaining = base.gun.ClipCapacity - Damage; } } else if (!base.gun.IsReloading) { base.gun.ClipShotsRemaining = 0; } } GameActor currentOwner2 = base.gun.CurrentOwner; PlayerController val2 = (PlayerController)(object)((currentOwner2 is PlayerController) ? currentOwner2 : null); if (base.gun.IsFiring) { if (!startedFiring) { startedFiring = true; AkSoundEngine.PostEvent("Play_ITM_Crisis_Stone_Shield_01", ((Component)base.gun).gameObject); if ((Object)(object)val2 != (Object)null) { ((BraveBehaviour)val2).healthHaver.damageTypeModifiers.Add(poisonImmunity); ((BraveBehaviour)val2).healthHaver.damageTypeModifiers.Add(fireImmunity); ((BraveBehaviour)val2).healthHaver.damageTypeModifiers.Add(electricImmunity); ((BraveBehaviour)val2).knockbackDoer.TriggerTemporaryKnockbackInvulnerability(1f); PassiveItem.IncrementFlag(val2, typeof(LiveAmmoItem)); PassiveItem.IncrementFlag(val2, typeof(Alt_ankh_shield)); } } } else if (startedFiring) { startedFiring = false; if ((Object)(object)val2 != (Object)null) { ((BraveBehaviour)val2).healthHaver.damageTypeModifiers.Remove(poisonImmunity); ((BraveBehaviour)val2).healthHaver.damageTypeModifiers.Remove(fireImmunity); ((BraveBehaviour)val2).healthHaver.damageTypeModifiers.Remove(electricImmunity); PassiveItem.DecrementFlag(val2, typeof(LiveAmmoItem)); PassiveItem.DecrementFlag(val2, typeof(Alt_ankh_shield)); } } if (Object.op_Implicit((Object)(object)base.gun.CurrentOwner)) { if (!base.gun.PreventNormalFireAudio) { base.gun.PreventNormalFireAudio = true; } if (!base.gun.IsReloading && !HasReloaded) { HasReloaded = true; } } } public static void DoMacroBlank(Vector2 center) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown //IL_003f: Unknown result type (might be due to invalid IL or missing references) GameObject val = (GameObject)ResourceCache.Acquire("Global VFX/BlankVFX_Ghost"); AkSoundEngine.PostEvent("Play_OBJ_silenceblank_small_01", ((Component)Wielder).gameObject); GameObject val2 = new GameObject("silencer"); SilencerInstance val3 = val2.AddComponent<SilencerInstance>(); float num = 0.25f; val3.TriggerSilencer(center, 25f, 5f, val, 0f, 0f, 0f, 0f, 0f, 0f, num, Wielder, false, false); } } public static class AnimateBullet { public static List<T> ConstructListOfSameValues<T>(T value, int length) { List<T> list = new List<T>(); for (int i = 0; i < length; i++) { list.Add(value); } return list; } public static void AnimateProjectile(this Projectile proj, List<string> names, int fps, bool loops, List<IntVector2> pixelSizes, List<bool> lighteneds, List<Anchor> anchors, List<bool> anchorsChangeColliders, List<bool> fixesScales, List<Vector3?> manualOffsets, List<IntVector2?> overrideColliderPixelSizes, List<IntVector2?> overrideColliderOffsets, List<Projectile> overrideProjectilesToCopyFrom) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_0196: 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_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) tk2dSpriteAnimationClip val = new tk2dSpriteAnimationClip(); val.name = "idle"; val.fps = fps; List<tk2dSpriteAnimationFrame> list = new List<tk2dSpriteAnimationFrame>(); for (int i = 0; i < names.Count; i++) { string text = names[i]; IntVector2 val2 = pixelSizes[i]; IntVector2? val3 = overrideColliderPixelSizes[i]; IntVector2? val4 = overrideColliderOffsets[i]; Vector3? val5 = manualOffsets[i]; bool flag = anchorsChangeColliders[i]; bool flag2 = fixesScales[i]; if (!val5.HasValue) { val5 = Vector2.op_Implicit(Vector2.zero); } Anchor val6 = anchors[i]; bool flag3 = lighteneds[i]; Projectile val7 = overrideProjectilesToCopyFrom[i]; tk2dSpriteAnimationFrame val8 = new tk2dSpriteAnimationFrame(); val8.spriteId = Databases.Items.ProjectileCollection.inst.GetSpriteIdByName(text); val8.spriteCollection = Databases.Items.ProjectileCollection; list.Add(val8); int? num = null; int? num2 = null; if (val3.HasValue) { num = val3.Value.x; num2 = val3.Value.y; } int? num3 = null; int? num4 = null; if (val4.HasValue) { num3 = val4.Value.x; num4 = val4.Value.y; } tk2dSpriteDefinition val9 = GunTools.SetupDefinitionForProjectileSprite(text, val8.spriteId, val2.x, val2.y, flag3, num, num2, num3, num4, val7); GunTools.ConstructOffsetsFromAnchor(val9, val6, (Vector2?)Vector2.op_Implicit(val9.position3), flag2, flag); val9.position0 += val5.Value; val9.position1 += val5.Value; val9.position2 += val5.Value; val9.position3 += val5.Value; if (i == 0) { ETGMod.GetAnySprite((BraveBehaviour)(object)proj).SetSprite(val8.spriteCollection, val8.spriteId); } } val.wrapMode = (WrapMode)((!loops) ? 2 : 0); val.frames = list.ToArray(); if ((Object)(object)((BraveBehaviour)((BraveBehaviour)proj).sprite).spriteAnimator == (Object)null) { ((BraveBehaviour)((BraveBehaviour)proj).sprite).spriteAnimator = ((Component)((BraveBehaviour)proj).sprite).gameObject.AddComponent<tk2dSpriteAnimator>(); } ((BraveBehaviour)((BraveBehaviour)proj).sprite).spriteAnimator.playAutomatically = true; if ((Object)(object)((BraveBehaviour)((BraveBehaviour)proj).sprite).spriteAnimator.Library == (Object)null) { ((BraveBehaviour)((BraveBehaviour)proj).sprite).spriteAnimator.Library = ((Component)((BraveBehaviour)((BraveBehaviour)proj).sprite).spriteAnimator).gameObject.AddComponent<tk2dSpriteAnimation>(); ((BraveBehaviour)((BraveBehaviour)proj).sprite).spriteAnimator.Library.clips = (tk2dSpriteAnimationClip[])(object)new tk2dSpriteAnimationClip[0]; ((Behaviour)((BraveBehaviour)((BraveBehaviour)proj).sprite).spriteAnimator.Library).enabled = true; } ((BraveBehaviour)((BraveBehaviour)proj).sprite).spriteAnimator.Library.clips = ((BraveBehaviour)((BraveBehaviour)proj).sprite).spriteAnimator.Library.clips.Concat((IEnumerable<tk2dSpriteAnimationClip>)(object)new tk2dSpriteAnimationClip[1] { val }).ToArray(); ((BraveBehaviour)((BraveBehaviour)proj).sprite).spriteAnimator.DefaultClipId = ((BraveBehaviour)((BraveBehaviour)proj).sprite).spriteAnimator.Library.GetClipIdByName("idle"); ((BraveBehaviour)((BraveBehaviour)proj).sprite).spriteAnimator.deferNextStartClip = false; } } internal class Autumn_luxin_cannon : GunBehaviour { public bool synergyActive = false; public static string old_idle_animation; public static string old_shoot_animation; public static string old_empty_animation; public static string old_final_shoot_animation; public static VFXPool old_empty_reload_effects; public static VFXPool old_final_muzzle_flash_effects; public static VFXPool old_muzzle_flash_effects; public static string lastAnim; public static void Add() { PickupObject byId = PickupObjectDatabase.GetById(199); Gun val = (Gun)(object)((byId is Gun) ? byId : null); ((Component)val).gameObject.AddComponent<Autumn_luxin_cannon>(); old_idle_animation = val.idleAnimation; old_shoot_animation = val.shootAnimation; old_empty_animation = val.emptyAnimation; old_final_shoot_animation = val.finalShootAnimation; old_empty_reload_effects = val.emptyReloadEffects; old_final_muzzle_flash_effects = val.finalMuzzleFlashEffects; old_muzzle_flash_effects = val.muzzleFlashEffects; } public override void Update() { //IL_00a5: Unknown result type (might be due to invalid IL or missing references) if (!synergyActive && (Object)(object)((GunBehaviour)this).PlayerOwner != (Object)null && ((GunBehaviour)this).PlayerOwner.PlayerHasActiveSynergy("RPGW Autumn Mirage")) { base.gun.idleAnimation = GunExt.UpdateAnimation(base.gun, "autumn_idle", (tk2dSpriteCollectionData)null, false); base.gun.shootAnimation = GunExt.UpdateAnimation(base.gun, "autumn_shoot", (tk2dSpriteCollectionData)null, false); base.gun.finalShootAnimation = GunExt.UpdateAnimation(base.gun, "autumn_final_shoot", (tk2dSpriteCollectionData)null, false); ((Component)base.gun).GetComponent<tk2dSpriteAnimator>().GetClipByName(base.gun.finalShootAnimation).wrapMode = (WrapMode)1; ((Component)base.gun).GetComponent<tk2dSpriteAnimator>().GetClipByName(base.gun.finalShootAnimation).loopStart = 3; base.gun.emptyReloadEffects = old_empty_reload_effects; base.gun.finalMuzzleFlashEffects = old_final_muzzle_flash_effects; base.gun.muzzleFlashEffects = old_muzzle_flash_effects; synergyActive = true; } else if (synergyActive && ((Object)(object)((GunBehaviour)this).PlayerOwner == (Object)null || !((GunBehaviour)this).PlayerOwner.PlayerHasActiveSynergy("RPGW Autumn Mirage"))) { base.gun.idleAnimation = old_idle_animation; base.gun.shootAnimation = old_shoot_animation; base.gun.finalShootAnimation = old_final_shoot_animation; base.gun.emptyReloadEffects = old_empty_reload_effects; base.gun.finalMuzzleFlashEffects = old_final_muzzle_flash_effects; base.gun.muzzleFlashEffects = old_muzzle_flash_effects; synergyActive = false; } } } internal class Gravity_sign : PassiveItem { public bool messedup; public bool used_gravity = false; private bool isdropping = false; private bool cooldown = false; private bool isImmuneToKnockback = false; public static void Init() { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) string text = "Gravity Sign"; string text2 = "RPGworldMod/Resources/gravity_sign_sprite"; GameObject val = new GameObject(text); Gravity_sign gravity_sign = val.AddComponent<Gravity_sign>(); ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null); string text3 = "Down To The Core"; string text4 = "Grants an ability to cancel roll into instant drop. Impact sends a shockwave outwards, knocking back enemies and blanking bullets.\n\nThe green arrow on the T-shirt naturally directs the gaze of those around you downwards. To where you are about to end up."; ItemBuilder.SetupItem((PickupObject)(object)gravity_sign, text3, text4, "rpgworld"); GunExt.SetName((PickupObject)(object)gravity_sign, (GungeonSupportedLanguages)9, "Знак гравитации"); GunExt.SetShortDescription((PickupObject)(object)gravity_sign, (GungeonSupportedLanguages)9, "И камнем вниз"); GunExt.SetLongDescription((PickupObject)(object)gravity_sign, (GungeonSupportedLanguages)9, "Позволяет отменять перекат в моментальное приземление. Небольшая ударная волная отталкивает противников и уничтожает вражеские пули.\n\nЗелёная стрелка на футболке естественно направляет взгляд окружающих вниз. Туда, где Вы скоро окажетесь."); ((PickupObject)gravity_sign).quality = (ItemQuality)(-50); ((PickupObject)gravity_sign).ShouldBeExcludedFromShops = true; ((PickupObject)gravity_sign).ForcedPositionInAmmonomicon = PickupObjectDatabase.GetById(414).ForcedPositionInAmmonomicon; } public override void Pickup(PlayerController player) { player.OnIsRolling += Player_OnIsRolling; player.OnRolledIntoEnemy += Player_OnRolledIntoEnemy; ((PassiveItem)this).Pickup(player); } private void Player_OnRolledIntoEnemy(PlayerController arg1, AIActor arg2) { //IL_0039: Unknown result type (might be due to invalid IL or missing references) if (cooldown) { return; } Material outlineMaterial = SpriteOutlineManager.GetOutlineMaterial(((BraveBehaviour)arg1).sprite); messedup = false; if (!((GameActor)arg1).IsOverPitAtAll) { DoMicroBlank(((BraveBehaviour)arg1).specRigidbody.UnitCenter); } else if (!arg1.DodgeRollIsBlink) { ((GameActor)arg1).ForceFall(); ((BraveBehaviour)arg1).spriteAnimator.Stop(); arg1.QueueSpecificAnimation(((BraveBehaviour)arg1).spriteAnimator.GetClipByName((!arg1.UseArmorlessAnim) ? "pitfall_down" : "pitfall_down_armorless").name); ((BraveBehaviour)arg1).spriteAnimator.SetFrame(0, false); messedup = true; } if (arg1.PlayerHasActiveSynergy("RPGW Bounce Sign")) { if (!arg1.CheckDodgeRollDepth()) { if (arg1.DodgeRollIsBlink) { PassiveItem.IncrementFlag(arg1, typeof(Gravity_sign)); ((MonoBehaviour)this).StartCoroutine(CooldownCR()); } else { if (!messedup) { arg1.ForceStopDodgeRoll(); arg1.ToggleGunRenderers(true, ""); arg1.ToggleHandRenderers(true, ""); } PassiveItem.IncrementFlag(arg1, typeof(Gravity_sign)); ((BraveBehaviour)arg1).spriteAnimator.Stop(); arg1.QueueSpecificAnimation(((BraveBehaviour)arg1).spriteAnimator.GetClipByName((!arg1.UseArmorlessAnim) ? "pitfall_return" : "pitfall_return_armorless").name); ((BraveBehaviour)arg1).spriteAnimator.SetFrame(0, false); arg1.ToggleGunRenderers(false, ""); arg1.ToggleHandRenderers(false, ""); isdropping = true; if (!cooldown) { ((MonoBehaviour)this).StartCoroutine(CooldownCR()); } } } used_gravity = true; } else if (arg1.DodgeRollIsBlink) { PassiveItem.IncrementFlag(arg1, typeof(Gravity_sign)); ((MonoBehaviour)this).StartCoroutine(CooldownCR()); } else { if (!messedup) { arg1.ForceStopDodgeRoll(); arg1.ToggleGunRenderers(true, ""); arg1.ToggleHandRenderers(true, ""); } PassiveItem.IncrementFlag(arg1, typeof(Gravity_sign)); ((BraveBehaviour)arg1).spriteAnimator.Stop(); arg1.QueueSpecificAnimation(((BraveBehaviour)arg1).spriteAnimator.GetClipByName((!arg1.UseArmorlessAnim) ? "pitfall_return" : "pitfall_return_armorless").name); ((BraveBehaviour)arg1).spriteAnimator.SetFrame(0, false); arg1.ToggleGunRenderers(false, ""); arg1.ToggleHandRenderers(false, ""); isdropping = true; ((MonoBehaviour)this).StartCoroutine(CooldownCR()); } } private void Player_OnIsRolling(PlayerController obj) { //IL_003a: Unknown result type (might be due to invalid IL or missing references) if (!Key((GungeonActionType)9, obj) || cooldown) { return; } messedup = false; if (!((GameActor)obj).IsOverPitAtAll) { DoMicroBlank(((BraveBehaviour)obj).specRigidbody.UnitCenter); } else if (!obj.DodgeRollIsBlink) { ((GameActor)obj).ForceFall(); messedup = true; } Material outlineMaterial = SpriteOutlineManager.GetOutlineMaterial(((BraveBehaviour)obj).sprite); if (obj.PlayerHasActiveSynergy("RPGW Bounce Sign")) { if (!obj.CheckDodgeRollDepth()) { if (obj.DodgeRollIsBlink) { PassiveItem.IncrementFlag(obj, typeof(Gravity_sign)); ((MonoBehaviour)this).StartCoroutine(CooldownCR()); } else { if (!messedup) { obj.ForceStopDodgeRoll(); obj.ToggleGunRenderers(true, ""); obj.ToggleHandRenderers(true, ""); } PassiveItem.IncrementFlag(obj, typeof(Gravity_sign)); ((BraveBehaviour)obj).spriteAnimator.Stop(); obj.QueueSpecificAnimation(((BraveBehaviour)obj).spriteAnimator.GetClipByName((!obj.UseArmorlessAnim) ? "pitfall_return" : "pitfall_return_armorless").name); ((BraveBehaviour)obj).spriteAnimator.SetFrame(0, false); obj.ToggleGunRenderers(false, ""); obj.ToggleHandRenderers(false, ""); isdropping = true; if (!cooldown) { ((MonoBehaviour)this).StartCoroutine(CooldownCR()); } } } used_gravity = true; } else if (obj.DodgeRollIsBlink) { PassiveItem.IncrementFlag(obj, typeof(Gravity_sign)); ((MonoBehaviour)this).StartCoroutine(CooldownCR()); } else { if (!messedup) { obj.ForceStopDodgeRoll(); obj.ToggleGunRenderers(true, ""); obj.ToggleHandRenderers(true, ""); } PassiveItem.IncrementFlag(obj, typeof(Gravity_sign)); ((BraveBehaviour)obj).spriteAnimator.Stop(); obj.QueueSpecificAnimation(((BraveBehaviour)obj).spriteAnimator.GetClipByName((!obj.UseArmorlessAnim) ? "pitfall_return" : "pitfall_return_armorless").name); ((BraveBehaviour)obj).spriteAnimator.SetFrame(0, false); obj.ToggleGunRenderers(false, ""); obj.ToggleHandRenderers(false, ""); isdropping = true; ((MonoBehaviour)this).StartCoroutine(CooldownCR()); } } public override void Update() { //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) if (base.m_owner.IsDodgeRolling && !cooldown) { if (!isImmuneToKnockback) { isImmuneToKnockback = true; PassiveItem.IncrementFlag(base.m_owner, typeof(LiveAmmoItem)); } } else if (isImmuneToKnockback) { isImmuneToKnockback = false; PassiveItem.DecrementFlag(base.m_owner, typeof(LiveAmmoItem)); } Material outlineMaterial = SpriteOutlineManager.GetOutlineMaterial(((BraveBehaviour)base.m_owner).sprite); if (!cooldown) { outlineMaterial.SetColor("_OverrideColor", new Color(0f, 1f, 0f)); } else { outlineMaterial.SetColor("_OverrideColor", new Color(0f, 0f, 0f)); } if (used_gravity && !base.m_owner.IsDodgeRolling) { used_gravity = false; ((MonoBehaviour)this).StartCoroutine(CooldownCR()); } if (isdropping && !messedup && (((BraveBehaviour)base.m_owner).spriteAnimator.IsPlaying("pitfall_return") || ((BraveBehaviour)base.m_owner).spriteAnimator.IsPlaying("pitfall_return_armorless")) && ((BraveBehaviour)base.m_owner).spriteAnimator.CurrentFrame > 2) { ((BraveBehaviour)base.m_owner).spriteAnimator.Stop(); ((BraveBehaviour)base.m_owner).spriteAnimator.OnAnimationCompleted(); isdropping = false; base.m_owner.ToggleGunRenderers(true, ""); base.m_owner.ToggleHandRenderers(true, ""); } ((PassiveItem)this).Update(); } public override DebrisObject Drop(PlayerController player) { player.OnIsRolling -= Player_OnIsRolling; player.OnRolledIntoEnemy -= Player_OnRolledIntoEnemy; return ((PassiveItem)this).Drop(player); } public static bool Key(GungeonActionType action, PlayerController player) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) return !GameManager.Instance.IsLoadingLevel && ((OneAxisInputControl)BraveInput.GetInstanceForPlayer(player.PlayerIDX).ActiveActions.GetActionFromType(action)).WasPressed; } private void DoMicroBlank(Vector2 center) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown //IL_003b: Unknown result type (might be due to invalid IL or missing references) GameObject val = (GameObject)ResourceCache.Acquire("Global VFX/BlankVFX_Ghost"); AkSoundEngine.PostEvent("Play_OBJ_silenceblank_small_01", ((Component)this).gameObject); GameObject val2 = new GameObject("silencer"); SilencerInstance val3 = val2.AddComponent<SilencerInstance>(); float num = 0.25f; val3.TriggerSilencer(center, 25f, 5f, val, 0f, 3f, 3f, 3f, 250f, 5f, num, base.m_owner, false, false); } public IEnumerator CooldownCR() { if ((Object)(object)this == (Object)null || (Object)(object)((PassiveItem)this).Owner == (Object)null) { yield break; } cooldown = true; float chargeRollingInterval = 0.33f; float cooldownTime = 9f; if (((PassiveItem)this).Owner.PlayerHasActiveSynergy("RPGW Bounce Sign")) { cooldownTime = 6f; } cooldownTime -= chargeRollingInterval; float chargeSoundInterval = 0.4f; float soundWaitTime = cooldownTime - chargeSoundInterval; if (chargeRollingInterval > 0f) { yield return (object)new WaitForSeconds(chargeRollingInterval); } if ((Object)(object)this == (Object)null || (Object)(object)((PassiveItem)this).Owner == (Object)null) { yield break; } PassiveItem.DecrementFlag(((PassiveItem)this).Owner, typeof(Gravity_sign)); if (soundWaitTime > 0f) { yield return (object)new WaitForSeconds(soundWaitTime); } if (!((Object)(object)this == (Object)null) && !((Object)(object)((PassiveItem)this).Owner == (Object)null)) { AkSoundEngine.PostEvent("Play_WPN_woodbow_charge_02", ((Component)((PassiveItem)this).Owner).gameObject); if (chargeSoundInterval > 0f) { yield return (object)new WaitForSeconds(chargeSoundInterval); } if (!((Object)(object)this == (Object)null) && !((Object)(object)((PassiveItem)this).Owner == (Object)null)) { cooldown = false; } } } } public class Ankh_shield : GunBehaviour { public class Shield : ProjectileSlashingBehaviour { } public static int ID; public static Gun gun_fr; private bool startedFiring = false; private DamageTypeModifier poisonImmunity = new DamageTypeModifier { damageType = (CoreDamageTypes)16, damageMultiplier = 0f }; private DamageTypeModifier fireImmunity = new DamageTypeModifier { damageType = (CoreDamageTypes)4, damageMultiplier = 0f }; private DamageTypeModifier electricImmunity = new DamageTypeModifier { damageType = (CoreDamageTypes)64, damageMultiplier = 0f }; public static int Damage; public static PlayerController Wielder; public static bool playEmptyAnim; public static void Add() { //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0185: 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) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_0334: Unknown result type (might be due to invalid IL or missing references) //IL_0362: Unknown result type (might be due to invalid IL or missing references) //IL_0390: Unknown result type (might be due to invalid IL or missing references) //IL_03be: Unknown result type (might be due to invalid IL or missing references) //IL_03ed: Unknown result type (might be due to invalid IL or missing references) Gun val = Databases.Items.NewGun("Ankh Shield", "ankh_shield"); Game.Items.Rename("outdated_gun_mods:ankh_shield", "rpgworld:ankh_shield"); ((Component)val).gameObject.AddComponent<Ankh_shield>(); GunExt.SetShortDescription((PickupObject)(object)val, "Behind The Wall"); GunExt.SetLongDescription((PickupObject)(object)val, "Durable defensive tool. Stops bullets and grants immunity to contact damage, fire, poison and electricity while in use. More effective if you move away from the danger or don't move at all. Stopping bullets wastes durability. Has more durability the more master rounds wielder has.\n\nSuper strong ancient artifact. And even though it looks like an ordinary obsidian board, it is one of the most durable objects in the Gungeon. The shield was endowed with divine strength and protective properties by the Ankh amulet, located in its very center. There is probably nothing more reliable than holding in hands this piece of equipment under the protection of the ancient gods."); GunExt.SetName((PickupObject)(object)val, (GungeonSupportedLanguages)9, "Щит Анх"); GunExt.SetShortDescription((PickupObject)(object)val, (GungeonSupportedLanguages)9, "За стеной"); GunExt.SetLongDescription((PickupObject)(object)val, (GungeonSupportedLanguages)9, "Прочный защитный инструмент. Останавливает пули и дает иммунитет к контактному урону, огню, яду и электричеству во время использования. Наиболее эффективен если отступать или стоять на месте. Блокирование пуль тратит прочность. Имеет тем больше прочности, чем больше патронов мастера у владельца.\n\nСверхпрочный древний артефакт. И пусть с виду он выглядит как обычная обсидиановая доска, - он один из самых прочных предметов Оружелья. Божественной прочностью и свойствами оберега щит наделил амулет Анх, расположенный в самом его центре. Наверное, нет ничего более надёжного, чем держать этот элемент снаряжения под защитой древних богов."); GunExt.SetupSprite(val, (tk2dSpriteCollectionData)null, "ankh_shield_idle_001", 8); GunExt.SetAnimationFPS(val, val.idleAnimation, 10); GunExt.SetAnimationFPS(val, val.shootAnimation, 240); GunExt.SetAnimationFPS(val, val.reloadAnimation, 11); GunExt.SetAnimationFPS(val, val.outOfAmmoAnimation, 10); GunExt.SetAnimationFPS(val, val.emptyAnimation, 10); GunExt.SetAnimationFPS(val, val.emptyReloadAnimation, 11); ref string gunSwitchGroup = ref val.gunSwitchGroup; PickupObject byId = PickupObjectDatabase.GetById(417); gunSwitchGroup = ((Gun)((byId is Gun) ? byId : null)).gunSwitchGroup; val.doesScreenShake = false; PickupObject byId2 = PickupObjectDatabase.GetById(86); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId2 is Gun) ? byId2 : null), true, false); val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.ammoCost = 0; val.DefaultModule.shootStyle = (ShootStyle)1; val.reloadTime = 2f; val.InfiniteAmmo = true; val.DefaultModule.cooldownTime = 0.1f; val.DefaultModule.numberOfShotsInClip = 13; val.muzzleFlashEffects.type = (VFXPoolType)0; ((PickupObject)val).quality = (ItemQuality)4; val.gunClass = (GunClass)50; val.gunHandedness = (GunHandedness)1; val.outOfAmmoAnimation = GunExt.UpdateAnimation(val, "empty", (tk2dSpriteCollectionData)null, false); val.emptyAnimation = GunExt.UpdateAnimation(val, "empty", (tk2dSpriteCollectionData)null, false); val.reloadAnimation = GunExt.UpdateAnimation(val, "reload", (tk2dSpriteCollectionData)null, false); val.emptyReloadAnimation = GunExt.UpdateAnimation(val, "empty_reload", (tk2dSpriteCollectionData)null, false); GunTools.TrimGunSprites(val); ((PickupObject)val).ForcedPositionInAmmonomicon = PickupObjectDatabase.GetById(380).ForcedPositionInAmmonomicon; val.DefaultModule.ammoType = (AmmoType)14; val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("Ankh Durability", "RPGworldMod/Resources/CustomGunAmmoTypes/ankh_durability_clipfull", "RPGworldMod/Resources/CustomGunAmmoTypes/ankh_durability_clipempty"); Projectile val2 = ProjectileUtility.SetupProjectile(86); val.DefaultModule.projectiles[0] = val2; ((BraveBehaviour)((BraveBehaviour)val2).sprite).renderer.enabled = false; val2.baseData.damage = 0f; val2.pierceMinorBreakables = true; val2.damagesWalls = false; Shield shield = ((Component)val2).gameObject.AddComponent<Shield>(); shield.DestroyBaseAfterFirstSlash = true; shield.soundToPlay = null; shield.InteractMode = SlashDoer.ProjInteractMode.DESTROY; shield.SlashVFX.type = (VFXPoolType)0; shield.SlashRange = 1f; shield.SlashDimensions = 180f; shield.playerKnockback = 0f; shield.slashKnockback = 0f; shield.SlashDamageUsesBaseProjectileDamage = true; Databases.Items.Add(val, (tk2dSpriteCollectionData)null, "ANY"); ID = ((PickupObject)val).PickupObjectId; val.usesContinuousFireAnimation = true; ((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.shootAnimation).wrapMode = (WrapMode)1; ((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.shootAnimation).loopStart = 1; ((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.idleAnimation).wrapMode = (WrapMode)1; ((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.idleAnimation).loopStart = 6; ((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.outOfAmmoAnimation).wrapMode = (WrapMode)1; ((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.outOfAmmoAnimation).loopStart = 2; ((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.emptyAnimation).wrapMode = (WrapMode)1; ((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.emptyAnimation).loopStart = 2; ((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.reloadAnimation).wrapMode = (WrapMode)1; ((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.reloadAnimation).loopStart = 13; ((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.emptyReloadAnimation).wrapMode = (WrapMode)1; ((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.emptyReloadAnimation).loopStart = 13; gun_fr = val; } public override void PostProcessProjectile(Projectile projectile) { GameActor currentOwner = base.gun.CurrentOwner; PlayerController val = (PlayerController)(object)((currentOwner is PlayerController) ? currentOwner : null); if ((Object)(object)val == (Object)null) { base.gun.ammo = base.gun.GetBaseMaxAmmo(); } base.gun.ClipShotsRemaining = base.gun.ClipCapacity - Damage; } public override void OwnedUpdate(GameActor owner, GunInventory inventory) { if ((Object)(object)Wielder != (Object)null && !base.gun.IsFiring && startedFiring) { startedFiring = false; ((BraveBehaviour)Wielder).healthHaver.damageTypeModifiers.Remove(poisonImmunity); ((BraveBehaviour)Wielder).healthHaver.damageTypeModifiers.Remove(fireImmunity); ((BraveBehaviour)Wielder).healthHaver.damageTypeModifiers.Remove(electricImmunity); PassiveItem.DecrementFlag(Wielder, typeof(LiveAmmoItem)); PassiveItem.DecrementFlag(Wielder, typeof(Ankh_shield)); } ((GunBehaviour)this).OwnedUpdate(owner, inventory); } public override void OnDropped() { if (startedFiring) { startedFiring = false; ((BraveBehaviour)Wielder).healthHaver.damageTypeModifiers.Remove(poisonImmunity); ((BraveBehaviour)Wielder).healthHaver.damageTypeModifiers.Remove(fireImmunity); ((BraveBehaviour)Wielder).healthHaver.damageTypeModifiers.Remove(electricImmunity); PassiveItem.DecrementFlag(Wielder, typeof(LiveAmmoItem)); PassiveItem.DecrementFlag(Wielder, typeof(Ankh_shield)); } ((GunBehaviour)this).OnDropped(); } public static int AmountOfMasterRounds(PlayerController player) { int num = 0; for (int i = 0; i < player.passiveItems.Count; i++) { if (((PickupObject)player.passiveItems[i]).PickupObjectId >= 467 && ((PickupObject)player.passiveItems[i]).PickupObjectId <= 471) { num++; } } return 13 + 12 * num; } public override void OnReloadEndedPlayer(PlayerController owner, Gun gun) { Damage = 0; playEmptyAnim = false; ((GunBehaviour)this).OnReloadEndedPlayer(owner, gun); } public override void Update() { gun_fr = base.gun; if ((Object)(object)Wielder != (Object)null && !base.gun.IsReloading && playEmptyAnim && !Wielder.PlayerHasActiveSynergy("RPGW Autumn Mirage")) { base.gun.Play(base.gun.emptyAnimation); } if ((Object)(object)Wielder != (Object)null && Wielder.PlayerHasActiveSynergy("RPGW Autumn Mirage")) { Damage = 0; } GameActor currentOwner = base.gun.CurrentOwner; PlayerController val = (PlayerController)(object)((currentOwner is PlayerController) ? currentOwner : null); if (val != null) { if ((Object)(object)Wielder != (Object)(object)val) { Wielder = val; } base.gun.DefaultModule.numberOfShotsInClip = AmountOfMasterRounds(val); if (Damage <= base.gun.ClipCapacity) { if (!base.gun.IsReloading) { base.gun.ClipShotsRemaining = base.gun.ClipCapacity - Damage; } } else if (!base.gun.IsReloading) { base.gun.ClipShotsRemaining = 0; } } GameActor currentOwner2 = base.gun.CurrentOwner; PlayerController val2 = (PlayerController)(object)((currentOwner2 is PlayerController) ? currentOwner2 : null); if (base.gun.IsFiring) { if (!startedFiring) { startedFiring = true; AkSoundEngine.PostEvent("Play_ITM_Crisis_Stone_Shield_01", ((Component)base.gun).gameObject); if ((Object)(object)val2 != (Object)null) { ((BraveBehaviour)val2).healthHaver.damageTypeModifiers.Add(poisonImmunity); ((BraveBehaviour)val2).healthHaver.damageTypeModifiers.Add(fireImmunity); ((BraveBehaviour)val2).healthHaver.damageTypeModifiers.Add(electricImmunity); ((BraveBehaviour)val2).knockbackDoer.TriggerTemporaryKnockbackInvulnerability(1f); PassiveItem.IncrementFlag(val2, typeof(LiveAmmoItem)); PassiveItem.IncrementFlag(val2, typeof(Ankh_shield)); } } } else if (startedFiring) { startedFiring = false; if ((Object)(object)val2 != (Object)null) { ((BraveBehaviour)val2).healthHaver.damageTypeModifiers.Remove(poisonImmunity); ((BraveBehaviour)val2).healthHaver.damageTypeModifiers.Remove(fireImmunity); ((BraveBehaviour)val2).healthHaver.damageTypeModifiers.Remove(electricImmunity); PassiveItem.DecrementFlag(val2, typeof(LiveAmmoItem)); PassiveItem.DecrementFlag(val2, typeof(Ankh_shield)); } } if (Object.op_Implicit((Object)(object)base.gun.CurrentOwner) && !base.gun.PreventNormalFireAudio) { base.gun.PreventNormalFireAudio = true; } } public static void DoMacroBlank(Vector2 center) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown //IL_003f: Unknown result type (might be due to invalid IL or missing references) GameObject val = (GameObject)ResourceCache.Acquire("Global VFX/BlankVFX_Ghost"); AkSoundEngine.PostEvent("Play_OBJ_silenceblank_small_01", ((Component)Wielder).gameObject); GameObject val2 = new GameObject("silencer"); SilencerInstance val3 = val2.AddComponent<SilencerInstance>(); float num = 0.25f; val3.TriggerSilencer(center, 25f, 5f, val, 0f, 0f, 0f, 0f, 0f, 0f, num, Wielder, false, false); } } public class Dagger_bullets : PassiveItem { public GameObject critVFX = VFXToolbox.CreateVFX("Dagger Critical Impact", new List<string> { "RPGworldMod/Resources/VFX/rapid_dagger_critical_impact_001", "RPGworldMod/Resources/VFX/rapid_dagger_critical_impact_002", "RPGworldMod/Resources/VFX/rapid_dagger_critical_impact_003", "RPGworldMod/Resources/VFX/rapid_dagger_critical_impact_004" }, 12, new IntVector2(24, 24), (Anchor)4, usesZHeight: false, 0f, -1f, null, (WrapMode)2); public static void Init() { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Expected O, but got Unknown //IL_006f: Unknown result type (might be due to invalid IL or missing references) string text = "Dagger Bullets"; string text2 = "RPGworldMod/Resources/dagger_bullets_sprite"; GameObject val = new GameObject(text); Dagger_bullets dagger_bullets = val.AddComponent<Dagger_bullets>(); ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null); string text3 = "Right Behind You"; string text4 = "If shot in the back, oneshots normal enemies and deals double damage to bosses.\n\nBy shooting these bullets, you show everyone in the Gungeon that you think you can outsmart them. Maybe, maybe. But they've yet to meet one to outsmart bullet."; ItemBuilder.SetupItem((PickupObject)(object)dagger_bullets, text3, text4, "rpgworld"); GunExt.SetName((PickupObject)(object)dagger_bullets, (GungeonSupportedLanguages)9, "Пули-кинжалы"); GunExt.SetShortDescription((PickupObject)(object)dagger_bullets, (GungeonSupportedLanguages)9, "Он уже здесь"); GunExt.SetLongDescription((PickupObject)(object)dagger_bullets, (GungeonSupportedLanguages)9, "Попадание в спину моментально убивает обычных противников и наносит двойной урон боссам.\n\nИспользуя эти пули, Вы демонстрируете, что считаете себя умнее всех в Оружелье. Посмотрим, посмотрим. Они ещё не встречали никого умнее пули."); ((PickupObject)dagger_bullets).quality = (ItemQuality)3; AlexandriaTags.SetTag((PickupObject)(object)dagger_bullets, "bullet_modifier"); ItemBuilder.AddPassiveStatModifier((PickupObject)(object)dagger_bullets, (StatType)14, 1f, (ModifyMethod)0); ((PickupObject)dagger_bullets).ForcedPositionInAmmonomicon = PickupObjectDatabase.GetById(640).ForcedPositionInAmmonomicon; } private void PostProcessProjectile(Projectile proj, float flot) { proj.OnHitEnemy = (Action<Projectile, SpeculativeRigidbody, bool>)Delegate.Combine(proj.OnHitEnemy, new Action<Projectile, SpeculativeRigidbody, bool>(HitEnemy)); } private void HitEnemy(Projectile projectile, SpeculativeRigidbody enemy, bool killed) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) Vector2 val = Vector2.Lerp(((BraveBehaviour)projectile).specRigidbody.UnitCenter, enemy.UnitCenter, 0.5f); BounceProjModifier orAddComponent = GameObjectExtensions.GetOrAddComponent<BounceProjModifier>(((Component)projectile).gameObject); if (Math.Abs(VectorToDegrees(projectile.Direction) - ((GameActor)((BraveBehaviour)enemy).aiActor).FacingDirection) <= 120f && ((BraveBehaviour)enemy).aiActor.IsNormalEnemy && Object.op_Implicit((Object)(object)((BraveBehaviour)((BraveBehaviour)enemy).aiActor).healthHaver)) { AkSoundEngine.PostEvent("Play_WPN_Vorpal_Shot_Critical_01", ((Component)enemy).gameObject); AkSoundEngine.PostEvent("Play_WPN_Vorpal_Shot_Critical_01", ((Component)enemy).gameObject); SpawnManager.SpawnVFX(critVFX, Vector2.op_Implicit(val), Quaternion.identity); if (!((BraveBehaviour)((BraveBehaviour)enemy).aiActor).healthHaver.IsBoss) { ((BraveBehaviour)((BraveBehaviour)enemy).aiActor).healthHaver.ApplyDamage(100000f, Vector2.zero, "Backstab", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, false); } else { ((BraveBehaviour)((BraveBehaviour)enemy).aiActor).healthHaver.ApplyDamage(projectile.ModifiedDamage, Vector2.zero, "Backstab", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, false); } } } public static float VectorToDegrees(Vector2 v) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) return Mathf.Atan2(v.y, v.x) * 57.29578f; } public override void Pickup(PlayerController player) { player.PostProcessProjectile += PostProcessProjectile; ((PassiveItem)this).Pickup(player); } public override void DisableEffect(PlayerController player) { if (Object.op_Implicit((Object)(object)player)) { player.PostProcessProjectile -= PostProcessProjectile; } ((PassiveItem)this).DisableEffect(player); } } public class Gruv_machine_gun : GunBehaviour { public static int ID; public float cooldown = 0.01f; public static void Add() { //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) Gun val = Databases.Items.NewGun("GRUV Machine Gun", "gruv_machine_gun"); Game.Items.Rename("outdated_gun_mods:gruv_machine_gun", "rpgworld:gruv_machine_gun"); ((Component)val).gameObject.AddComponent<Gruv_machine_gun>(); GunExt.SetShortDescription((PickupObject)(object)val, "Infinite"); GunExt.SetLongDescription((PickupObject)(object)val, "Accelerates over time if there are enemies in the room. Resets after dodgerolling.\n\nThe once active «GRUV» corporation produced affordable and high-quality variations of weapons. This machine gun belongs to this product line, having infinite amounts of ammunition. But after the death of the planet Gruv, this antique item is good for nothing."); GunExt.SetName((PickupObject)(object)val, "«GRUV» Machine Gun"); GunExt.SetName((PickupObject)(object)val, (GungeonSupportedLanguages)9, "Пулемёт «GRUV»"); GunExt.SetShortDescription((PickupObject)(object)val, (GungeonSupportedLanguages)9, "Бесконечный"); GunExt.SetLongDescription((PickupObject)(object)val, (GungeonSupportedLanguages)9, "Ускоряется со временем, если владелец в бою. Сбрасывает скорость после переката.\n\nНекогда активная корпорация «GRUV» выпускала доступные и качественные вариации оружия. Этот пулемёт относится к этой линии продукции, обладая бесконечным боезапасом. Но после смерти планеты Грув, этот антикварынй предмет ни на что не годится."); GunExt.SetupSprite(val, (tk2dSpriteCollectionData)null, "gruv_machine_gun_idle_001", 8); GunExt.SetAnimationFPS(val, val.shootAnimation, 10); GunExt.SetAnimationFPS(val, val.reloadAnimation, 0); PickupObject byId = PickupObjectDatabase.GetById(84); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); val.DefaultModule.ammoCost = 1; val.DefaultModule.angleVariance = 6f; ((PickupObject)val).ForcedPositionInAmmonomicon = PickupObjectDatabase.GetById(88).ForcedPositionInAmmonomicon; val.DefaultModule.shootStyle = (ShootStyle)1; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; val.reloadTime = -1f; val.DefaultModule.cooldownTime = 0.4f; val.DefaultModule.numberOfShotsInClip = 1; ((Component)val.barrelOffset).transform.localPosition = new Vector3(2.0625f, 0.375f, 0f); val.InfiniteAmmo = true; ((PickupObject)val).quality = (ItemQuality)(-50); ((PickupObject)val).ShouldBeExcludedFromShops = true; ((PickupObject)val).CanBeDropped = false; Projectile val2 = ProjectileUtility.SetupProjectile(86); val.DefaultModule.projectiles[0] = val2; val2.baseData.damage = 5f; ProjectileData baseData = val2.baseData; baseData.speed *= 1f; val2.baseData.range = 18f; val2.AdditionalScaleMultiplier = 0.8f; val2.ignoreDamageCaps = true; ((Component)val2).gameObject.SetActive(false); val.gunClass = (GunClass)55; val.usesContinuousFireAnimation = true; ((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.shootAnimation).wrapMode = (WrapMode)1; ((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.shootAnimation).loopStart = 1; Databases.Items.Add(val, (tk2dSpriteCollectionData)null, "ANY"); ID = ((PickupObject)val).PickupObjectId; } public override void PostProcessProjectile(Projectile projectile) { GameActor currentOwner = base.gun.CurrentOwner; PlayerController val = (PlayerController)(object)((currentOwner is PlayerController) ? currentOwner : null); if ((Object)(object)val == (Object)null) { base.gun.ammo = base.gun.GetBaseMaxAmmo(); } base.gun.ClipShotsRemaining = 2; base.gun.GainAmmo(2); } public override void OnPostFired(PlayerController player, Gun gun) { AkSoundEngine.PostEvent("Play_WPN_minigun_shot_01", ((Component)this).gameObject); gun.ClearReloadData(); } public override void Update() { GameActor currentOwner = base.gun.CurrentOwner; PlayerController val = (PlayerController)(object)((currentOwner is PlayerController) ? currentOwner : null); if (base.gun.IsFiring && !val.IsDodgeRolling && (val.CurrentRoom == null || val.CurrentRoom.GetActiveEnemiesCount((ActiveEnemyType)0) != 0)) { if (cooldown > 0f) { cooldown -= BraveTime.DeltaTime; } if (cooldown <= 0f) { if (base.gun.DefaultModule.cooldownTime > 0.015f) { ProjectileModule defaultModule = base.gun.DefaultModule; defaultModule.cooldownTime -= 0.002f; } cooldown = 0.01f; } if (base.gun.DefaultModule.cooldownTime == 0.4f) { GunExt.SetAnimationFPS(base.gun, base.gun.shootAnimation, 10); } if (base.gun.DefaultModule.cooldownTime <= 0.365f) { GunExt.SetAnimationFPS(base.gun, base.gun.shootAnimation, 11); } if (base.gun.DefaultModule.cooldownTime <= 0.33f) { GunExt.SetAnimationFPS(base.gun, base.gun.shootAnimation, 12); } if (base.gun.DefaultModule.cooldownTime <= 0.295f) { GunExt.SetAnimationFPS(base.gun, base.gun.shootAnimation, 13); } if (base.gun.DefaultModule.cooldownTime <= 0.26f) { GunExt.SetAnimationFPS(base.gun, base.gun.shootAnimation, 14); } if (base.gun.DefaultModule.cooldownTime <= 0.225f) { GunExt.SetAnimationFPS(base.gun, base.gun.shootAnimation, 15); } if (base.gun.DefaultModule.cooldownTime <= 0.19f) { GunExt.SetAnimationFPS(base.gun, base.gun.shootAnimation, 16); } if (base.gun.DefaultModule.cooldownTime <= 0.155f) { GunExt.SetAnimationFPS(base.gun, base.gun.shootAnimation, 17); } if (base.gun.DefaultModule.cooldownTime <= 0.12f) { GunExt.SetAnimationFPS(base.gun, base.gun.shootAnimation, 18); } if (base.gun.DefaultModule.cooldownTime <= 0.085f) { GunExt.SetAnimationFPS(base.gun, base.gun.shootAnimation, 19); } if (base.gun.DefaultModule.cooldownTime <= 0.05f) { GunExt.SetAnimationFPS(base.gun, base.gun.shootAnimation, 20); } if (base.gun.DefaultModule.cooldownTime <= 0.015f) { GunExt.SetAnimationFPS(base.gun, base.gun.shootAnimation, 21); } } else { base.gun.DefaultModule.cooldownTime = 0.4f; } if (base.gun.DefaultModule.cooldownTime == 0.4f) { GunExt.SetAnimationFPS(base.gun, base.gun.shootAnimation, 10); } if ((Object)(object)((GunBehaviour)this).PlayerOwner != (Object)null && !((GunBehaviour)this).PlayerOwner.PlayerHasActiveSynergy("RPGW King Of The Fourth Chamber") && ((GunBehaviour)this).PlayerOwner.HasPickupID(ID)) { base.gun.m_owner = null; PlayerUtility.RemoveItemFromInventory(((GunBehaviour)this).PlayerOwner, (PickupObject)(object)base.gun); } if (Object.op_Implicit((Object)(object)base.gun.CurrentOwner) && !base.gun.PreventNormalFireAudio) { base.gun.PreventNormalFireAudio = true; } } } internal class Gruv_crown : PassiveItem { public static void Init() { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Expected O, but got Unknown //IL_0085: Unknown result type (might be due to invalid IL or missing references) string text = "Gruv Crown"; string text2 = "RPGworldMod/Resources/gruv_crown_sprite"; GameObject val = new GameObject(text); Gruv_crown gruv_crown = val.AddComponent<Gruv_crown>(); ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null); string text3 = "You Are In Power"; string text4 = "Grants weapons worthy of a king to those who have proven themselves worthy of them.\n\nSymbol of power of the great water-powered planet Gruv. It has a built-in water generator connected to Gruv's core, but it is currently not working."; ItemBuilder.SetupItem((PickupObject)(object)gruv_crown, text3, text4, "rpgworld"); GunExt.SetName((PickupObject)(object)gruv_crown, (GungeonSupportedLanguages)9, "Корона Грув"); GunExt.SetShortDescription((PickupObject)(object)gruv_crown, (GungeonSupportedLanguages)9, "Вы у власти"); GunExt.SetLongDescription((PickupObject)(object)gruv_crown, (GungeonSupportedLanguages)9, "Дарует оружие, достойное короля, тем, кто доказал, что достоин его.\n\nСимвол власти короля великой планеты Грув, запитанной энергией воды. Корона имеет встроенный генератор воды, подключённый к ядру Грув, но в настоящее время он не работает."); ((PickupObject)gruv_crown).ForcedPositionInAmmonomicon = PickupObjectDatabase.GetById(214).ForcedPositionInAmmonomicon; ((PickupObject)gruv_crown).quality = (ItemQuality)(-50); ((PickupObject)gruv_crown).ShouldBeExcludedFromShops = true; } public override void Update() { if ((Object)(object)base.m_owner != (Object)null) { if (base.m_owner.PlayerHasActiveSynergy("RPGW King Of The First Chamber") && !base.m_owner.HasPickupID(Gruv_shotgun.ID)) { LootEngine.GivePrefabToPlayer(((Component)PickupObjectDatabase.GetById(Gruv_shotgun.ID)).gameObject, base.m_owner); } if (base.m_owner.PlayerHasActiveSynergy("RPGW King Of The Second Chamber") && !base.m_owner.HasPickupID(Gruv_assault_rifle.ID)) { LootEngine.GivePrefabToPlayer(((Component)PickupObjectDatabase.GetById(Gruv_assault_rifle.ID)).gameObject, base.m_owner); } if (base.m_owner.PlayerHasActiveSynergy("RPGW King Of The Third Chamber") && !base.m_owner.HasPickupID(Gruv_sniper_rifle.ID)) { LootEngine.GivePrefabToPlayer(((Component)PickupObjectDatabase.GetById(Gruv_sniper_rifle.ID)).gameObject, base.m_owner); } if (base.m_owner.PlayerHasActiveSynergy("RPGW King Of The Fourth Chamber") && !base.m_owner.HasPickupID(Gruv_machine_gun.ID)) { LootEngine.GivePrefabToPlayer(((Component)PickupObjectDatabase.GetById(Gruv_machine_gun.ID)).gameObject, base.m_owner); } if (base.m_owner.PlayerHasActiveSynergy("RPGW King Of The Fifth Chamber") && !base.m_owner.HasPickupID(Gruv_rocket_launcher.ID)) { LootEngine.GivePrefabToPlayer(((Component)PickupObjectDatabase.GetById(Gruv_rocket_launcher.ID)).gameObject, base.m_owner); } } ((PassiveItem)this).Update(); } public override void Pickup(PlayerController player) { ((PassiveItem)this).Pickup(player); } public override DebrisObject Drop(PlayerController player) { return ((PassiveItem)this).Drop(player); } } public class Gruv_assault_rifle : GunBehaviour { public static int ID; private bool HasReloaded; public static void Add() { //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) Gun val = Databases.Items.NewGun("GRUV Assault Rifle", "gruv_assault_rifle"); Game.Items.Rename("outdated_gun_mods:gruv_assault_rifle", "rpgworld:gruv_assault_rifle"); ((Component)val).gameObject.AddComponent<Gruv_assault_rifle>(); GunExt.SetShortDescription((PickupObject)(object)val, "Quick reload"); GunExt.SetLongDescription((PickupObject)(object)val, "Reloading is instant if the magazine is empty.\n\nThe once active «GRUV» corporation produced affordable and high-quality variations of weapons. This assault rifle belongs to this product line, having a distinctive reload speed. But after the death of the planet Gruv, this antique item is good for nothing."); GunExt.SetName((PickupObject)(object)val, "«GRUV» Assault Rifle"); GunExt.SetName((PickupObject)(object)val, (GungeonSupportedLanguages)9, "Автомат «GRUV»"); GunExt.SetShortDescription((PickupObject)(object)val, (GungeonSupportedLanguages)9, "Быстрая перезарядка"); GunExt.SetLongDescription((PickupObject)(object)val, (GungeonSupportedLanguages)9, "Перезарядка моментальна, если магазин пуст.\n\nНекогда активная корпорация «GRUV» выпускала доступные и качественные вариации оружия. Этот автомат относится к этой линии продукции, обладая отличительной скоростью перезарядки. Но после смерти планеты Грув, этот антикварынй предмет ни на что не годится."); GunExt.SetupSprite(val, (tk2dSpriteCollectionData)null, "gruv_assault_rifle_idle_001", 8); GunExt.SetAnimationFPS(val, val.shootAnimation, 12); GunExt.SetAnimationFPS(val, val.reloadAnimation, 11); PickupObject byId = PickupObjectDatabase.GetById(86); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); val.DefaultModule.ammoCost = 1; val.DefaultModule.angleVariance = 3f; val.DefaultModule.shootStyle = (ShootStyle)1; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; val.reloadTime = 1.4f; val.DefaultModule.cooldownTime = 0.1f; val.DefaultModule.numberOfShotsInClip = 30; ((Component)val.barrelOffset).transform.localPosition = new Vector3(1.8125f, 0.5f, 0f); val.InfiniteAmmo = true; ((PickupObject)val).quality = (ItemQuality)(-50); ((PickupObject)val).ShouldBeExcludedFromShops = true; ((PickupObject)val).CanBeDropped = false; ((PickupObject)val).ForcedPositionInAmmonomicon = PickupObjectDatabase.GetById(88).ForcedPositionInAmmonomicon; Projectile val2 = ProjectileUtility.SetupProjectile(86); val.DefaultModule.projectiles[0] = val2; val2.baseData.damage = 5f; ProjectileData baseData = val2.baseData; baseData.speed *= 1.2f; val2.baseData.range = 18f; val2.AdditionalScaleMultiplier = 0.8f; ((Component)val2).gameObject.SetActive(false); val.gunClass = (GunClass)55; Databases.Items.Add(val, (tk2dSpriteCollectionData)null, "ANY"); ID = ((PickupObject)val).PickupObjectId; } public override void OnPostFired(PlayerController player, Gun gun) { AkSoundEngine.PostEvent("Play_WPN_thompson_shot_01", ((Component)this).gameObject); } public override void Update() { if (base.gun.ClipShotsRemaining <= 0) { base.gun.reloadTime = 0.1f; } else { base.gun.reloadTime = 1.4f; } if ((Object)(object)((GunBehaviour)this).PlayerOwner != (Object)null && !((GunBehaviour)this).PlayerOwner.PlayerHasActiveSynergy("RPGW King Of The Second Chamber") && ((GunBehaviour)this).PlayerOwner.HasPickupID(ID)) { base.gun.m_owner = null; PlayerUtility.RemoveItemFromInventory(((GunBehaviour)this).PlayerOwner, (PickupObject)(object)base.gun); } if (Object.op_Implicit((Object)(object)base.gun.CurrentOwner)) { if (!base.gun.PreventNormalFireAudio) { base.gun.PreventNormalFireAudio = true; } if (!base.gun.IsReloading && !HasReloaded) { HasReloaded = true; } } } public override void OnReloadPressed(PlayerController player, Gun gun, bool bSOMETHING) { if (gun.IsReloading && HasReloaded) { HasReloaded = false; AkSoundEngine.PostEvent("Stop_WPN_All", ((Component)this).gameObject); ((GunBehaviour)this).OnReloadPressed(player, gun, bSOMETHING); AkSoundEngine.PostEvent("SND_WPN_ak47_reload_01", ((Component)this).gameObject); } } } public class Alt_gruv_pistol : GunBehaviour { public static int ID; private bool HasReloaded; public static void Add() { //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_0326: Unknown result type (might be due to invalid IL or missing references) //IL_038e: Unknown result type (might be due to invalid IL or missing references) //IL_042f: Unknown result type (might be due to invalid IL or missing references) //IL_04c0: Unknown result type (might be due to invalid IL or missing references) //IL_0500: Unknown result type (might be due to invalid IL or missing references) //IL_0514: Unknown result type (might be due to invalid IL or missing references) //IL_0528: Unknown result type (might be due to invalid IL or missing references) //IL_053c: Unknown result type (might be due to invalid IL or missing references) //IL_0550: Unknown result type (might be due to invalid IL or missing references) //IL_0564: Unknown result type (might be due to invalid IL or missing references) //IL_0594: Unknown result type (might be due to invalid IL or missing references) Gun val = Databases.Items.NewGun("Alt GRUV Pistol", "alt_gruv_pistol"); Game.Items.Rename("outdated_gun_mods:alt_gruv_pistol", "rpgworld:alt_gruv_pistol"); ((Component)val).gameObject.AddComponent<Alt_gruv_pistol>(); GunExt.SetShortDescription((PickupObject)(object)val, "Shoots In Bursts"); GunExt.SetLongDescription((PickupObject)(object)val, "The once active «GRUV» corporation produced affordable and high-quality variations of weapons. This pistol belongs to this product line, with improvements such as a larger magazine and shooting versatility. But after the death of the planet Gruv, this antique item is good for nothing."); GunExt.SetName((PickupObject)(object)val, "«GRUV» Pistol"); GunExt.SetName((PickupObject)(object)val, (GungeonSupportedLanguages)9, "Пистолет «GRUV»"); GunExt.SetShortDescription((PickupObject)(object)val, (GungeonSupportedLanguages)9, "Стреляет очередями"); GunExt.SetLongDescription((PickupObject)(object)val, (GungeonSupportedLanguages)9, "Некогда активная корпорация «GRUV» выпускала доступные и качественные вариации оружия. Этот пистолет относится к этой линии продукции, имея такие улучшения как увеличенный магазин и вариативность стрельбы. Но после смерти планеты Грув, этот антикварынй предмет ни на что не годится."); GunExt.SetupSprite(val, (tk2dSpriteCollectionData)null, "alt_gruv_pistol_idle_001", 8); GunExt.SetAnimationFPS(val, val.idleAnimation, 9); GunExt.SetAnimationFPS(val, val.emptyAnimation, 9); GunExt.SetAnimationFPS(val, val.shootAnimation, 10); GunExt.SetAnimationFPS(val, val.reloadAnimation, 11); GunExt.SetAnimationFPS(val, val.emptyReloadAnimation, 11); PickupObject byId = PickupObjectDatabase.GetById(89); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); val.DefaultModule.ammoCost = 1; val.DefaultModule.angleVariance = 3f; val.DefaultModule.shootStyle = (ShootStyle)4; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; val.reloadTime = 1.4f; val.DefaultModule.cooldownTime = 0.35f; val.DefaultModule.numberOfShotsInClip = 12; val.DefaultModule.burstShotCount = 3; val.DefaultModule.burstCooldownTime = 0.15f; val.InfiniteAmmo = true; ((PickupObject)val).quality = (ItemQuality)(-100); ((PickupObject)val).ShouldBeExcludedFromShops = true; val.emptyAnimation = GunExt.UpdateAnimation(val, "empty", (tk2dSpriteCollectionData)null, false); val.emptyReloadAnimation = GunExt.UpdateAnimation(val, "empty_reload", (tk2dSpriteCollectionData)null, false); val.DefaultModule.ammoType = (AmmoType)14; val.muzzleFlashEffects = VFXToolbox.CreateVFXPool("Green Shadow Muzzleflash", new List<string> { "RPGworldMod/Resources/VFX/green_shadow_soul_flare_001", "RPGworldMod/Resources/VFX/green_shadow_soul_flare_002", "RPGworldMod/Resources/VFX/green_shadow_soul_flare_003" }, 10, new IntVector2(14, 7), (Anchor)3, usesZHeight: false, 0f, persist: false, (VFXAlignment)0, -1f, null, (WrapMode)2); val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("Green Shadow Soul", "RPGworldMod/Resources/CustomGunAmmoTypes/green_shadow_soul_clipfull", "RPGworldMod/Resources/CustomGunAmmoTypes/green_shadow_soul_clipempty"); ((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.emptyReloadAnimation).wrapMode = (WrapMode)1; ((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.emptyReloadAnimation).loopStart = 8; Projectile val2 = Object.Instantiate<Projectile>(val.DefaultModule.projectiles[0]); ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val.DefaultModule.projectiles[0] = val2; val2.baseData.damage = 5f; ProjectileData baseData = val2.baseData; baseData.speed *= 1f; val2.baseData.range = 14f; val2.hitEffects.overrideMidairDeathVFX = VFXToolbox.CreateVFX("Green Shadow Soul Impact", new List<string> { "RPGworldMod/Resources/VFX/green_shadow_soul_impact_enemy_001", "RPGworldMod/Resources/VFX/green_shadow_soul_impact_enemy_002", "RPGworldMod/Resources/VFX/green_shadow_soul_impact_enemy_003", "RPGworldMod/Resources/VFX/green_shadow_soul_impact_enemy_004" }, 12, new IntVector2(11, 11), (Anchor)4, usesZHeight: false, 0f, -1f, null, (WrapMode)2); VFXPool enemy = VFXToolbox.CreateVFXPool("Rapid Dagger Impact", new List<string> { "RPGworldMod/Resources/VFX/green_shadow_soul_impact_enemy_001", "RPGworldMod/Resources/VFX/green_shadow_soul_impact_enemy_002", "RPGworldMod/Resources/VFX/green_shadow_soul_impact_enemy_003", "RPGworldMod/Resources/VFX/green_shadow_soul_impact_enemy_004" }, 12, new IntVector2(16, 16), (Anchor)4, usesZHeight: false, 0f, persist: false, (VFXAlignment)1, -1f, null, (WrapMode)2); val2.hitEffects.enemy = enemy; VFXPool val3 = VFXToolbox.CreateVFXPool("Rapid Dagger Impact Tile", new List<string> { "RPGworldMod/Resources/VFX/green_shadow_soul_impact_horizontal_001", "RPGworldMod/Resources/VFX/green_shadow_soul_impact_horizontal_002", "RPGworldMod/Resources/VFX/green_shadow_soul_impact_horizontal_003", "RPGworldMod/Resources/VFX/green_shadow_soul_impact_horizontal_004", "RPGworldMod/Resources/VFX/green_shadow_soul_impact_horizontal_005", "RPGworldMod/Resources/VFX/green_shadow_soul_impact_horizontal_006", "RPGworldMod/Resources/VFX/green_shadow_soul_impact_horizontal_007", "RPGworldMod/Resources/VFX/green_shadow_soul_impact_horizontal_008" }, 12, new IntVector2(19, 23), (Anchor)3, usesZHeight: false, 0f, persist: false, (VFXAlignment)1, -1f, null, (WrapMode)2); val2.hitEffects.tileMapHorizontal = val3; val2.hitEffects.tileMapVertical = val3; val2.AnimateProjectile(new List<string> { "green_shadow_soul_001", "green_shadow_soul_002", "green_shadow_soul_003", "green_shadow_soul_004", "green_shadow_soul_005", "green_shadow_soul_006" }, 10, loops: true, AnimateBullet.ConstructListOfSameValues<IntVector2>(new IntVector2(21, 8), 6), AnimateBullet.ConstructListOfSameValues(value: false, 6), AnimateBullet.ConstructListOfSameValues<Anchor>((Anchor)4, 6), AnimateBullet.ConstructListOfSameValues(value: true, 6), AnimateBullet.ConstructListOfSameValues(value: false, 6), AnimateBullet.ConstructListOfSameValues<Vector3?>(null, 6), new List<IntVector2?> { (IntVector2?)new IntVector2(21, 8), (IntVector2?)new IntVector2(21, 8), (IntVector2?)new IntVector2(21, 8), (IntVector2?)new IntVector2(21, 8), (IntVector2?)new IntVector2(21, 8), (IntVector2?)new IntVector2(21, 8) }, AnimateBullet.ConstructListOfSameValues<IntVector2?>(null, 6), AnimateBullet.ConstructListOfSameValues<Projectile>(null, 6)); val.gunClass = (GunClass)55; Databases.Items.Add(val, (tk2dSpriteCollectionData)null, "ANY"); ID = ((PickupObject)val).PickupObjectId; } public override void OnPostFired(PlayerController player, Gun gun) { AkSoundEngine.PostEvent("Play_WPN_vertebraek47_shot_01", ((Component)this).gameObject); } public override void Update() { if (Object.op_Implicit((Object)(object)base.gun.CurrentOwner)) { if (!base.gun.PreventNormalFireAudio) { base.gun.PreventNormalFireAudio = true; } if (!base.gun.IsReloading && !HasReloaded) { HasReloaded = true; } } } public override void OnReloadPressed(PlayerController player, Gun gun, bool bSOMETHING) { if (gun.IsReloading && HasReloaded) { HasReloaded = false; AkSoundEngine.PostEvent("Stop_WPN_All", ((Component)this).gameObject); ((GunBehaviour)this).OnReloadPressed(player, gun, bSOMETHING); AkSoundEngine.PostEvent("Play_WPN_SAA_reload_01", ((Component)this).gameObject); } } } public class Gruv_rocket_launcher : GunBehaviour { public static int ID; private bool HasReloaded; public static void Add() { //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) Gun val = Databases.Items.NewGun("GRUV Rocket Launcher", "gruv_rocket_launcher"); Game.Items.Rename("outdated_gun_mods:gruv_rocket_launcher", "rpgworld:gruv_rocket_launcher"); ((Component)val).gameObject.AddComponent<Gruv_rocket_launcher>(); GunExt.SetShortDescription((PickupObject)(object)val, "Single Shot"); GunExt.SetLongDescription((PickupObject)(object)val, "The once active «GRUV» corporation produced affordable and high-quality variations of weapons. This rocket launcher belongs to this line of products, having such a simple but worthwhile improvement as double the damage. But after the death of the planet Gruv, this antique item is good for nothing."); GunExt.SetName((PickupObject)(object)val, "«GRUV» Rocket Launcher"); GunExt.SetName((PickupObject)(object)val, (GungeonSupportedLanguages)9, "Ракетница «GRUV»"); GunExt.SetShortDescription((PickupObject)(object)val, (GungeonSupportedLanguages)9, "Однозарядная"); GunExt.SetLongDescription((PickupObject)(object)val, (GungeonSupportedLanguages)9, "Некогда активная корпорация «GRUV» выпускала доступные и качественные вариации оружия. Эта ракетница относится к этой линии продукции, имея такое простое, но путное улучшение как вдвое увеличенный урон. Но после смерти планеты Грув, этот антикварынй предмет ни на что не годится."); GunExt.SetupSprite(val, (tk2dSpriteCollectionData)null, "gruv_rocket_launcher_idle_001", 8); GunExt.SetAnimationFPS(val, val.shootAnimation, 10); GunExt.SetAnimationFPS(val, val.reloadAnimation, 11); PickupObject byId = PickupObjectDatabase.GetById(39); GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false); val.DefaultModule.ammoCost = 1; val.DefaultModule.shootStyle = (ShootStyle)0; val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0; ((PickupObject)val).ForcedPositionInAmmonomicon = PickupObjectDatabase.GetById(88).ForcedPositionInAmmonomicon; val.reloadTime = 1.2f; val.DefaultModule.numberOfShotsInClip = 1; val.InfiniteAmmo = true; ((PickupObject)val).quality = (ItemQuality)(-50); ((PickupObject)val).ShouldBeExcludedFromShops = true; ((Component)val.barrelOffset).transform.localPosition = new Vector3(2.0625f, 0.4375f, 0f); ((PickupObject)val).CanBeDropped = false; Projectile val2 = Object.Instantiate<Projectile>(val.DefaultModule.projectiles[0]); ((Component)val2).gameObject.SetActive(false); FakePrefab.MarkAsFakePrefab(((Component)val2).gameObject); Object.DontDestroyOnLoad((Object)(object)val2); val.DefaultModule.projectiles[0] = val2; val2.baseData.damage = 40f; val2.baseData.speed = 50f; val2.ignoreDamageCaps = true; val2.pierceMinorBreakables = true; ((BraveBehaviour)val2).transform.parent = val.barrelOffset; val.gunClass = (GunClass)55; Databases.Items.Add(val, (tk2dSpriteCollectionData)null, "ANY"); ID = ((PickupObject)val).PickupObjectId; } public override void OnPostFired(PlayerController player, Gun gun) { AkSoundEngine.PostEvent("Play_WPN_RPG_shot_01", ((Component)this).gameObject); } public override void Update() { if ((Object)(object)((GunBehaviour)this).PlayerOwner != (Object)null && !((GunBehaviour)this).PlayerOwner.PlayerHasActiveSynergy("RPGW King Of The Fifth Chamber") && ((GunBehaviour)this).PlayerOwner.HasPickupID(ID)) { base.gun.m_owner = null; PlayerUtility.RemoveItemFromInventory(((GunBehaviour)this).PlayerOwner, (PickupObject)(object)base.gun); } if (Object.op_Implicit((Object)(object)base.gun.CurrentOwner)) { if (!base.gun.PreventNormalFireAudio) { base.gun.PreventNormalFireAudio = true; } if (!base.gun.IsReloading && !HasReloaded) { HasReloaded = true; } } } public override void OnReloadPressed(PlayerController player, Gun gun, bool bSOMETHING) { if (gun.IsReloading && HasReloaded) { HasReloaded = false; AkSoundEngine.PostEvent("Stop_WPN_All", ((Component)this).gameObject); ((GunBehaviour)this).OnReloadPressed(player, gun, bSOMETHING); AkSoundEngine.PostEvent("Play_WPN_rpg_reload_01", ((Component)this).gameObject); } } } public class ChildProjCleanup : MonoBehaviour { public float delay = 0.5f; public Color color; public Projectile parentProjectile; public Projectile childProj; public bool doColor = false; public bool doColorCleanup; private void Start() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) childProj = ((Component)this).GetComponent<Projectile>(); if (doColor) { childProj.ChangeColor(0.2f, color); } } private void Update() { //IL_0052: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)parentProjectile == (Object)null)) { return; } if (delay > 0f) { delay -= Time.deltaTime; return; } if (doColorCleanup) { childProj.ChangeColor(0f, Color.red); } childProj.DieInAir(false, true, true, false); } } public class ProjectileSlashingBehaviour : MonoBehaviour { public delegate void OnSlashHit(PlayerController player, AIActor hitEnemy, Vector2 forceDirection); public delegate void PostProcessSlashHandler(PlayerController player, ProjectileSlashingBehaviour slash); public delegate void OnSlashEnded(bool hitAnEnemy, PlayerController player); public delegate void OnHitFirstEnemy(PlayerController player, AIActor hitEnemy); public List<GameActorEffect> effects = new List<GameActorEffect>(); private float timer; public string soundToPlay; public float delayBeforeSlash; public VFXPool SlashVFX; public float timeBetweenSlashes; public bool doSpinAttack; public float playerKnockback; public float slashKnockback; public bool DoSound; public float SlashJammedMult; public float SlashBossMult; public float SlashDamage; public float SlashRange; public float SlashDimensions; public bool SlashDamageUsesBaseProjectileDamage; public SlashDoer.ProjInteractMode InteractMode; public bool DestroyBaseAfterFirstSlash; public bool DoesMultipleSlashes; public float MinSlashAngleOffset; public float MaxSlashAngleOffset; public bool UsesAngleVariance; public int AmountOfMultiSlashes; public float DelayBetweenMultiSlashes; public bool AppliesStun; public float StunApplyChance; public float StunTime; public bool NoCost; public float DeflectionDegree = 180f; private Projectile m_projectile; private PlayerController owner; public event PostProcessSlashHandler PostProcessSlash; public event OnSlashHit OnSlashHitEnemy; public event OnSlashEnded OnSlashEnd; public event OnHitFirstEnemy OnFirstEnemyHit; public ProjectileSlashingBehaviour() { DestroyBaseAfterFirstSlash = true; timeBetweenSlashes = 1f; DoSound = true; slashKnockback = 5f; SlashDamage = 15f; SlashBossMult = 1f; SlashJammedMult = 1f; playerKnockback = 1f; SlashDamageUsesBaseProjectileDamage = true; InteractMode = SlashDoer.ProjInteractMode.IGNORE; SlashDimensions = 90f; SlashRange = 2.5f; ref VFXPool slashVFX = ref SlashVFX; PickupObject obj = Databases.Items["wonderboy"]; slashVFX = ((Gun)((obj is Gun) ? obj : null)).muzzleFlashEffects; soundToPlay = "Play_WPN_blasphemy_shot_01"; DoesMultipleSlashes = false; UsesAngleVariance = false; MinSlashAngleOffset = 1f; MaxSlashAngleOffset = 4f; delayBeforeSlash = 0f; AppliesStun = false; StunApplyChance = 0f; StunTime = 0f; NoCost = false; } private void Start() { m_projectile = ((Component)this).GetComponent<Projectile>(); if (Object.op_Implicit((Object)(object)m_projectile.Owner) && m_projectile.Owner is PlayerController) { ref PlayerController reference = ref owner; GameActor obj = m_projectile.Owner; reference = (PlayerController)(object)((obj is PlayerController) ? obj : null); } ((BraveBehaviour)((BraveBehaviour)m_projectile).sprite).renderer.enabled = false; m_projectile.collidesWithEnemies = false; m_projectile.UpdateCollisionMask(); Projectile projectile = m_projectile; effects.AddRange(projectile.statusEffectsToApply); if (projectile.AppliesFire && Random.value <= projectile.FireApplyChance) { effects.Add((GameActorEffect)(object)projectile.fireEffect); } if (projectile.AppliesCharm && Random.value <= projectile.CharmApplyChance) { effects.Add((GameActorEffect)(object)projectile.charmEffect); } if (projectile.AppliesCheese && Random.value <= projectile.CheeseApplyChance) { effects.Add((GameActorEffect)(object)projectile.cheeseEffect); } if (projectile.AppliesBleed && Random.value <= projectile.BleedApplyChance) { effects.Add((GameActorEffect)(object)projectile.bleedEffect); } if (projectile.AppliesFreeze && Random.value <= projectile.FreezeApplyChance) { effects.Add((GameActorEffect)(object)projectile.freezeEffect); } if (projectile.AppliesPoison && Random.value <= projectile.PoisonApplyChance) { effects.Add((GameActorEffect)(object)projectile.healthEffect); } if (projectile.AppliesSpeedModifier && Random.value <= projectile.SpeedApplyChance) { effects.Add((GameActorEffect)(object)projectile.speedEffect); } if (Object.op_Implicit((Object)(object)m_projectile)) { if (doSpinAttack) { DestroyBaseAfterFirstSlash = false; ((MonoBehaviour)m_projectile).StartCoroutine(DoSlash(90f, 0.15f + delayBeforeSlash)); ((MonoBehaviour)m_projectile).StartCoroutine(DoSlash(180f, 0.3f + delayBeforeSlash)); ((MonoBehaviour)m_projectile).StartCoroutine(DoSlash(-90f, 0.45f + delayBeforeSlash)); ((MonoBehaviour)this).Invoke("Suicide", 0.01f); } else if (DoesMultipleSlashes) { ((MonoBehaviour)m_projectile).StartCoroutine(DoMultiSlash(0f, delayBeforeSlash, AmountOfMultiSlashes, DelayBetweenMultiSlashes)); } else { ((MonoBehaviour)m_projectile).StartCoroutine(DoSlash(0f, 0f + delayBeforeSlash)); } } } private void Update() { } private IEnumerator DoSlash(float angle, float delay) { yield return (object)new WaitForSeconds(delay); if (NoCost) { Projectile proj = ((Component)this).gameObject.GetComponent<Projectile>(); Gun gun = proj.PossibleSourceGun; gun.GainAmmo(1); gun.MoveBulletsIntoClip(1); } if (SlashDamageUsesBaseProjectileDamage) { SlashDamage = m_projectile.baseData.damage; SlashBossMult = m_projectile.BossDamageMultiplier; SlashJammedMult = m_projectile.BlackPhantomDamageMultiplier; slashKnockback = m_projectile.baseData.force; } if (UsesAngleVariance) { angle += Random.Range(MinSlashAngleOffset, MaxSlashAngleOffset); } ProjectileSlashingBehaviour slash = ((Component)this).GetComponent<ProjectileSlashingBehaviour>(); if ((Object)(object)slash != (Object)null && this.PostProcessSlash != null) { this.PostProcessSlash(owner, slash); } SlashDoer.GrabBoolsAndValuesAndShitForTheFuckingSlashingApplyEffect(AppliesStun, StunApplyChance, StunTime, DeflectionDegree); SlashDoer.DoSwordSlash(((BraveBehaviour)m_projectile).specRigidbody.UnitCenter, Vector2Extensions.ToAngle(m_projectile.Direction) + angle, owner, playerKnockback, InteractMode, SlashDamage, slashKnockback, effects, null, SlashJammedMult, SlashBossMult, SlashRange, SlashDimensions, m_projectile); if (DoSound) { AkSoundEngine.PostEvent(soundToPlay, ((Component)m_projectile).gameObject); } SlashVFX.SpawnAtPosition(Vector2.op_Implicit(((BraveBehaviour)m_projectile).specRigidbody.UnitCenter), Vector2Extensions.ToAngle(m_projectile.Direction) + angle, (Transform)null, (Vector2?)null, (Vector2?)null, (float?)(-0.05f), false, (SpawnMethod)null, (tk2dBaseSprite)null, false); if (DestroyBaseAfterFirstSlash) { Suicide(); } } public void DoOnHitEffects(AIActor enemy, Vector2 forceDir) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) if (this.OnSlashHitEnemy != null) { this.OnSlashHitEnemy(owner, enemy, forceDir); } } public void DoOnSlashEndEffects(bool hitEnemies) { if (this.OnSlashEnd != null) { this.OnSlashEnd(hitEnemies, owner); } } public void DoOnHitFirstEnemyEffects(AIActor enemy) { if (this.OnFirstEnemyHit != null) { this.OnFirstEnemyHit(owner, enemy); } } private IEnumerator DoMultiSlash(float angle, float delay, int AmountOfMultiSlashes, float DelayBetweenMultiSlashes) { yield return (object)new WaitForSeconds(delay); for (int i = 0; i < AmountOfMultiSlashes; i++) { if (SlashDamageUsesBaseProjectileDamage) { SlashDamage = m_projectile.baseData.damage; SlashBossMult = m_projectile.BossDamageMultiplier; SlashJammedMult = m_projectile.BlackPhantomDamageMultiplier; slashKnockback = m_projectile.baseData.force; } if (UsesAngleVariance) { angle += Random.Range(MinSlashAngleOffset, MaxSlashAngleOffset); } ProjectileSlashingBehaviour slash = ((Component)this).GetComponent<ProjectileSlashingBehaviour>(); if ((Object)(object)slash != (Object)null && this.PostProcessSlash != null) { PostProcessSlashHandler postProcessSlash = this.PostProcessSlash; GameActor obj = m_projectile.Owner; postProcessSlash((PlayerController)(object)((obj is PlayerController) ? obj : null), slash); } SlashDoer.GrabBoolsAndValuesAndShitForTheFuckingSlashingApplyEffect(AppliesStun, StunApplyChance, StunTime, DeflectionDegree); SlashDoer.DoSwordSlash(((BraveBehaviour)m_projectile).specRigidbody.UnitCenter, Vector2Extensions.ToAngle(m_projectile.Direction) + angle, owner, playerKnockback, InteractMode, SlashDamage, slashKnockback, m_projectile.statusEffectsToApply, null, SlashJammedMult, SlashBossMult, SlashRange, SlashDimensions); if (DoSound) { AkSoundEngine.PostEvent(soundToPlay, ((Component)m_projectile).gameObject); } SlashVFX.SpawnAtPosition(Vector2.op_Implicit(((BraveBehaviour)m_projectile).specRigidbody.UnitCenter), Vector2Extensions.ToAngle(m_projectile.Direction) + angle, (Transform)null, (Vector2?)null, (Vector2?)null, (float?)(-0.05f), false, (SpawnMethod)null, (tk2dBaseSprite)null, false); yield return (object)new WaitForSeconds(DelayBetweenMultiSlashes); } Suicide(); } private void ApplyOnHitEffects() { m_projectile = ((Component)this).GetComponent<Projectile>(); } private void Suicide() { Object.Destroy((Object)(object)((Component)m_projectile).gameObject); } } public class ProjectileSplitController : MonoBehaviour { private AIActor main; private Projectile parentProjectile; private PlayerController parentOwner; public bool distanceBasedSplit; public float distanceTillSplit; public bool splitOnEnemy; public float splitAngles; public int amtToSplitTo; public float dmgMultAfterSplit; public float sizeMultAfterSplit; public bool removeComponentAfterUse; public bool shorten; public int numberofsplits; public ProjectileSplitController() { distanceTillSplit = 7.5f; splitAngles = 35f; amtToSplitTo = 3; dmgMultAfterSplit = 0.66f; sizeMultAfterSplit = 0.8f; removeComponentAfterUse = true; splitOnEnemy = false; } private void Start() { parentProjectile = ((Component)this).GetComponent<Projectile>(); parentOwner = ProjectileUtility.ProjectilePlayerOwner(parentProjectile); Projectile obj = parentProjectile; obj.OnHitEnemy = (Action<Projectile, SpeculativeRigidbody, bool>)Delegate.Combine(obj.OnHitEnemy, new Action<Projectile, SpeculativeRigidbody, bool>(Splitprocess)); } private void Splitprocess(Projectile arg1, SpeculativeRigidbody arg2, bool arg3) { if (splitOnEnemy && Object.op_Implicit((Object)(object)((BraveBehaviour)arg2).aiActor)) { SplitProjectile(); main = ((BraveBehaviour)arg2).aiActor; } } private void Update() { if ((Object)(object)parentProjectile != (Object)null && distanceBasedSplit && parentProjectile.GetElapsedDistance() > distanceTillSplit) { SplitProjectile(); } } private void SplitProjectile() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Expected O, but got Unknown //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01dc