Ejemplo n.º 1
0
            public Vector2 GetAimPoint(PlayerController player)
            {
                BraveInput instanceForPlayer = BraveInput.GetInstanceForPlayer(player.PlayerIDX);
                bool       flag2             = instanceForPlayer == null;
                Vector2    a = Vector2.zero;

                if (!flag2)
                {
                    bool flag3 = instanceForPlayer.IsKeyboardAndMouse(false);
                    if (flag3)
                    {
                        a = player.unadjustedAimPoint.XY() - (base.transform.position.XY() + base.sprite.GetRelativePositionFromAnchor(tk2dBaseSprite.Anchor.MiddleLeft).Rotate(base.transform.eulerAngles.z));
                    }
                    else
                    {
                        bool flag4 = instanceForPlayer.ActiveActions == null;
                        if (flag4)
                        {
                            return(a);
                        }
                        a = instanceForPlayer.ActiveActions.Aim.Vector;
                    }
                }
                return(a);
            }
Ejemplo n.º 2
0
        protected override void DoEffect(PlayerController user)
        {
            Projectile proj = ((Gun)ETGMod.Databases.Items["burning_hand"]).DefaultModule.projectiles[0];
            BraveInput instanceForPlayer = BraveInput.GetInstanceForPlayer(this.LastOwner.PlayerIDX);
            bool       flag2             = instanceForPlayer == null;
            float      z = 0;

            if (!flag2)
            {
                bool    flag3 = instanceForPlayer.IsKeyboardAndMouse(false);
                Vector2 a;
                if (flag3)
                {
                    a = this.LastOwner.unadjustedAimPoint.XY() - base.sprite.WorldCenter;
                }
                else
                {
                    bool flag4 = instanceForPlayer.ActiveActions == null;
                    if (flag4)
                    {
                        return;
                    }
                    a = instanceForPlayer.ActiveActions.Aim.Vector;
                }
                a.Normalize();
                z = BraveMathCollege.Atan2Degrees(a);
            }
            GameObject obj       = SpawnManager.SpawnProjectile(proj.gameObject, user.sprite.WorldCenter, Quaternion.Euler(0, 0, z));
            Projectile component = obj.GetComponent <Projectile>();

            if (component != null)
            {
                component.Owner           = user;
                component.Shooter         = user.specRigidbody;
                component.AppliesFire     = false;
                component.FireApplyChance = 0f;
                component.baseData.damage = 20f;
                if (UnityEngine.Random.value < 0.26f)
                {
                    component.damageTypes = CoreDamageTypes.Void;
                    component.AdditionalScaleMultiplier *= 2f;
                    component.baseData.speed            *= 2f;
                    component.DefaultTintColor           = Color.black;
                    component.HasDefaultTint             = true;
                }
                else
                {
                    component.damageTypes      = CoreDamageTypes.None;
                    component.DefaultTintColor = Color.white;
                    component.HasDefaultTint   = true;
                }
                PierceProjModifier component2 = component.GetComponent <PierceProjModifier>();
                if (component2 != null)
                {
                    component2.penetratesBreakables = true;
                }
            }
            this.usesLeft -= 1;
        }
Ejemplo n.º 3
0
            static void Postfix(PlayerController __instance)
            {
                if (__instance.AcceptingNonMotionInput)
                {
                    BraveInput instanceForPlayer = BraveInput.GetInstanceForPlayer(__instance.PlayerIDX);
                    bool       isKeyboard        = instanceForPlayer.IsKeyboardAndMouse(false);
                    if (isKeyboard)
                    {
                        if (Input.GetKeyDown(KeyCode.H))
                        {
                            util.ToggleHealthBars();
                            logger.LogInfo($"Toggled health bars to {util.healthBars}");
                        }
                        if (Input.GetKeyDown(KeyCode.Z))
                        {
                            util.ToggleAutoBlank();
                            logger.LogInfo($"Toggled auto blank to {util.autoBlank}");
                        }

                        if (Input.GetKeyDown(KeyCode.G))
                        {
                            SilencerInstance.DestroyBulletsInRange(GameManager.Instance.PrimaryPlayer.CenterPosition, 10000, true, true);
                        }
                        if (Input.GetKeyDown(KeyCode.I))
                        {
                            ReadFiles();
                        }
                        if (Input.GetKeyDown(KeyCode.U))
                        {
                            SpawnItems();
                        }

                        if (Input.GetKeyDown(KeyCode.O))
                        {
                            BraveTime.RegisterTimeScaleMultiplier(0.5f, __instance.gameObject);
                            logger.LogInfo($"Applied time multiplier");
                        }

                        if (Input.GetKeyDown(KeyCode.P))
                        {
                            BraveTime.ClearMultiplier(__instance.gameObject);
                            logger.LogInfo($"Cleared time multiplier");
                        }

                        if (Input.GetKeyDown(KeyCode.K))
                        {
                            configGodModeEnabled.Value = !configGodModeEnabled.Value;
                            logger.LogInfo($"Toggled godmode to {configGodModeEnabled.Value}");
                        }

                        if (Input.GetKeyDown(KeyCode.J))
                        {
                            configInfiniteAmmoEnabled.Value = !configInfiniteAmmoEnabled.Value;
                            logger.LogInfo($"Toggled infinite ammo to {configInfiniteAmmoEnabled.Value}");
                        }
                    }
                }
            }
Ejemplo n.º 4
0
        private static void PreMoveProjectileModifier(Projectile p)
        {
            PlayerController player = this_gun.CurrentOwner as PlayerController;

            if (player && p && p.Owner is PlayerController)
            {
                BraveInput instanceForPlayer = BraveInput.GetInstanceForPlayer(player.PlayerIDX);
                if (instanceForPlayer == null)
                {
                    return;
                }
                Vector2 vector = Vector2.zero;
                if (instanceForPlayer.IsKeyboardAndMouse(false))
                {
                    vector = (p.Owner as PlayerController).unadjustedAimPoint.XY() - p.specRigidbody.UnitCenter;
                }
                else
                {
                    if (instanceForPlayer.ActiveActions == null)
                    {
                        return;
                    }
                    vector = instanceForPlayer.ActiveActions.Aim.Vector;
                }
                float target  = vector.ToAngle();
                float current = BraveMathCollege.Atan2Degrees(p.Direction);
                float num     = 0f;
                if (p.ElapsedTime < trackingTime)
                {
                    num = trackingCurve.Evaluate(p.ElapsedTime / trackingTime) * trackingSpeed;
                }
                float   target2 = Mathf.MoveTowardsAngle(current, target, num * BraveTime.DeltaTime);
                Vector2 vector2 = Quaternion.Euler(0f, 0f, Mathf.DeltaAngle(current, target2)) * p.Direction;
                if (p is HelixProjectile)
                {
                    HelixProjectile helixProjectile = p as HelixProjectile;
                    helixProjectile.AdjustRightVector(Mathf.DeltaAngle(current, target2));
                }
                if (p.OverrideMotionModule != null)
                {
                    p.OverrideMotionModule.AdjustRightVector(Mathf.DeltaAngle(current, target2));
                }
                p.Direction = vector2.normalized;
                if (p.shouldRotate)
                {
                    p.transform.eulerAngles = new Vector3(0f, 0f, p.Direction.ToAngle());
                }
            }
        }
        public IEnumerator direction(Projectile bullet)
        {
            if (bullet != null)
            {
                BraveInput instanceForPlayer = BraveInput.GetInstanceForPlayer(this.Owner.PlayerIDX);
                if (instanceForPlayer != null)
                {
                    if (instanceForPlayer.IsKeyboardAndMouse() == false)
                    {
                        Projectile         projectile2 = bullet;
                        GameObject         gameObject  = SpawnManager.SpawnProjectile(projectile2.gameObject, this.Owner.CurrentGun.sprite.WorldCenter, Quaternion.Euler(0f, 0f, (this.Owner.CurrentGun == null) ? 0f : this.Owner.CurrentGun.CurrentAngle), true);
                        Projectile         component   = gameObject.GetComponent <Projectile>();
                        PierceProjModifier peirce      = gameObject.GetOrAddComponent <PierceProjModifier>();
                        peirce.penetration = 90;
                        bool flag = component != null;
                        if (flag)
                        {
                            component.Owner                     = this.Owner;
                            component.Shooter                   = this.Owner.specRigidbody;
                            component.baseData.damage           = 0f;
                            component.baseData.speed           *= 1.8f;
                            component.AdditionalScaleMultiplier = .0001f;
                        }

                        yield return(new WaitForSecondsRealtime(.25f));

                        if (bullet.gameObject != null)
                        {
                            Vector2 vector = bullet.sprite.WorldCenter;
                            Vector2 Aim    = component.sprite.WorldCenter;
                            bullet.SendInDirection(Aim - vector, false, true);
                        }
                    }
                    else
                    {
                        yield return(new WaitForSecondsRealtime(.25f));

                        if (bullet != null)
                        {
                            Vector2 vector = bullet.sprite.WorldCenter;
                            Vector2 Aim    = this.Owner.unadjustedAimPoint;
                            bullet.SendInDirection(Aim - vector, false, true);
                        }
                    }
                }
            }
        }
Ejemplo n.º 6
0
 public static void InvokerHook(Action <Invoker, PlayerController> orig, Invoker self, PlayerController user)
 {
     if (user.HasPickupID(203))
     {
         self.damageCooldown = 200;
     }
     else
     {
         self.damageCooldown = 400;
     }
     orig(self, user);
     if (user.HasPickupID(203))
     {
         Projectile proj = (PickupObjectDatabase.GetById(38) as Gun).DefaultModule.projectiles[0];
         BraveInput instanceForPlayer = BraveInput.GetInstanceForPlayer(user.PlayerIDX);
         bool       flag2             = instanceForPlayer == null;
         float      z = 0;
         if (!flag2)
         {
             bool    flag3 = instanceForPlayer.IsKeyboardAndMouse(false);
             Vector2 a;
             if (flag3)
             {
                 a = user.unadjustedAimPoint.XY() - self.sprite.WorldCenter;
             }
             else
             {
                 bool flag4 = instanceForPlayer.ActiveActions == null;
                 if (flag4)
                 {
                     return;
                 }
                 a = instanceForPlayer.ActiveActions.Aim.Vector;
             }
             a.Normalize();
             z = BraveMathCollege.Atan2Degrees(a);
         }
         GameObject obj   = SpawnManager.SpawnProjectile(proj.gameObject, user.sprite.WorldCenter, Quaternion.Euler(0, 0, z));
         Projectile proj2 = obj.GetComponent <Projectile>();
         if (proj2 != null)
         {
             proj2.Owner            = user;
             proj2.Shooter          = user.specRigidbody;
             proj2.baseData.damage *= ((user.stats.GetStatValue(PlayerStats.StatType.Coolness) / 2) + 1);
         }
     }
 }
Ejemplo n.º 7
0
            void FixedUpdate()
            {
                if (owner == null)
                {
                    return;
                }
                BraveInput instanceForPlayer = BraveInput.GetInstanceForPlayer(this.owner.PlayerIDX);
                Vector2    vector;

                if (instanceForPlayer == null)
                {
                    return;
                }

                if (instanceForPlayer.IsKeyboardAndMouse(false))
                {
                    vector = owner.unadjustedAimPoint.XY() - this.sprite.WorldCenter;
                }
                else
                {
                    if (instanceForPlayer.ActiveActions == null)
                    {
                        return;
                    }
                    vector = instanceForPlayer.ActiveActions.Aim.Vector;
                }

                vector.Normalize();
                float speed = (owner.HasMTGConsoleID("remote_bullets") || owner.HasMTGConsoleID("3rd_party_controller")) ? droneMoveSpeed * 2f : droneMoveSpeed;

                if (Vector2.Distance(owner.unadjustedAimPoint.XY(), this.sprite.WorldCenter) < .2f)
                {
                    velocity = Vector2.Lerp(velocity, Vector2.zero, .5f);
                }
                else
                {
                    velocity = Vector2.Lerp(velocity, vector * speed, .1f);
                }
                specRigidbody.Velocity = velocity;

                string clip = GetAnimationDirection(velocity);

                if (clip != spriteAnimator.CurrentClip.name)
                {
                    spriteAnimator.Play(clip);
                }
            }
Ejemplo n.º 8
0
        // Token: 0x0600001B RID: 27 RVA: 0x00003110 File Offset: 0x00001310
        private void UpdateAimTargetPosition()
        {
            PlayerController playerController  = this.owner;
            BraveInput       instanceForPlayer = BraveInput.GetInstanceForPlayer(playerController.PlayerIDX);
            GungeonActions   activeActions     = instanceForPlayer.ActiveActions;
            Vector3          position          = this.m_aiActor.CenterPosition + BraveMathCollege.DegreesToVector(this.owner.FacingDirection, 1f) * 5f;
            bool             flag = instanceForPlayer.IsKeyboardAndMouse(false);

            if (flag)
            {
                this.m_fakeTargetRigidbody.transform.position = position;
            }
            else
            {
                this.m_fakeTargetRigidbody.transform.position = position;
            }
            this.m_fakeTargetRigidbody.Reinitialize();
        }
Ejemplo n.º 9
0
        protected override void DoEffect(PlayerController user)
        {
            this.thrown = true;
            BraveInput instanceForPlayer = BraveInput.GetInstanceForPlayer(this.LastOwner.PlayerIDX);
            bool       flag2             = instanceForPlayer == null;
            float      z = 0;

            if (!flag2)
            {
                bool    flag3 = instanceForPlayer.IsKeyboardAndMouse(false);
                Vector2 a;
                if (flag3)
                {
                    a = this.LastOwner.unadjustedAimPoint.XY() - base.sprite.WorldCenter;
                }
                else
                {
                    bool flag4 = instanceForPlayer.ActiveActions == null;
                    if (flag4)
                    {
                        return;
                    }
                    a = instanceForPlayer.ActiveActions.Aim.Vector;
                }
                a.Normalize();
                z = BraveMathCollege.Atan2Degrees(a);
            }
            GameObject obj  = SpawnManager.SpawnProjectile((PickupObjectDatabase.GetById(38) as Gun).DefaultModule.projectiles[0].gameObject, user.sprite.WorldCenter, Quaternion.Euler(0, 0, z));
            Projectile proj = obj.GetComponent <Projectile>();

            if (proj != null)
            {
                proj.Owner           = user;
                proj.Shooter         = user.specRigidbody;
                proj.baseData.damage = 0;
                proj.baseData.force  = 0;
                CatchProjectileBehaviour pokemonBehaviour = proj.gameObject.AddComponent <CatchProjectileBehaviour>();
                pokemonBehaviour.thrower             = user;
                pokemonBehaviour.parentItem          = this;
                pokemonBehaviour.hasEvolutionSynergy = user.PlayerHasActiveSynergy("#GEN_2");
            }
        }
        public override void OnPostFired(PlayerController player, Gun gun)
        {
            //This determines what sound you want to play when you fire a gun.
            //Sounds names are based on the Gungeon sound dump, which can be found at EnterTheGungeon/Etg_Data/StreamingAssets/Audio/GeneratedSoundBanks/Windows/sfx.txt
            gun.PreventNormalFireAudio = false;

            BraveInput instanceForPlayer = BraveInput.GetInstanceForPlayer(player.PlayerIDX);

            if (instanceForPlayer.IsKeyboardAndMouse() == false)
            {
                // special controls for controller
                StartCoroutine(nytraPlacerCtrl(player));
            }
            else
            {
                // standard controls for keyboard
                nytraPlacer(player);
            }

            AkSoundEngine.PostEvent("Play_BOSS_FuseBomb_Attack_Toys_01", base.gameObject);
        }
        public override void PostProcessProjectile(Projectile projectile)
        {
            base.PostProcessProjectile(projectile);
            float      length            = 0;
            BraveInput instanceForPlayer = BraveInput.GetInstanceForPlayer((this.gun.CurrentOwner as PlayerController).PlayerIDX);
            bool       flag2             = instanceForPlayer == null;

            if (!flag2)
            {
                bool flag3 = instanceForPlayer.IsKeyboardAndMouse(false);
                if (flag3)
                {
                    Vector2 a;
                    a = (this.gun.CurrentOwner as PlayerController).unadjustedAimPoint.XY();
                    a.Normalize();
                    length = Vector2.Distance(projectile.sprite.WorldCenter, a) * 8f;
                    float magnitude = (projectile.sprite.WorldCenter - a).magnitude;
                }
                else
                {
                    length = 8f;
                }
            }
            bool isMiddleProj = false;

            if (this.lastUp == null)
            {
                projectile.OverrideMotionModule = new HelixProjectileMotionModule
                {
                    helixAmplitude  = 2f,
                    helixWavelength = 8f,
                    ForceInvert     = false
                };
                projectile.gameObject.AddComponent <EyeProjUp>();
                this.lastUp = projectile;
            }
            else if (this.lastDown == null)
            {
                projectile.OverrideMotionModule = new HelixProjectileMotionModule
                {
                    helixAmplitude  = 2f,
                    helixWavelength = 8f,
                    ForceInvert     = true
                };
                projectile.gameObject.AddComponent <EyeProjDown>();
                this.lastDown = projectile;
            }
            else
            {
                projectile.gameObject.AddComponent <EyeProjMain>().boundUp   = this.lastUp;
                projectile.gameObject.GetComponent <EyeProjMain>().boundDown = this.lastDown;
                projectile.gameObject.GetComponent <EyeProjMain>().ownerHasThunderstormSynergy = this.gun.CurrentOwner is PlayerController && (this.gun.CurrentOwner as PlayerController).PlayerHasActiveSynergy("#GUNDERSTORM");
                if (this.gun.CurrentOwner != null && this.gun.CurrentOwner is PlayerController)
                {
                    projectile.gameObject.GetComponent <EyeProjMain>().divider = (this.gun.CurrentOwner as PlayerController).stats.GetStatValue(PlayerStats.StatType.ProjectileSpeed);
                }
                this.lastUp   = null;
                this.lastDown = null;
                isMiddleProj  = true;
            }
            if (this.gun.CurrentOwner is PlayerController && (this.gun.CurrentOwner as PlayerController).PlayerHasActiveSynergy("#GUNDERSTORM"))
            {
                ComplexProjectileModifier shockRounds    = PickupObjectDatabase.GetById(298) as ComplexProjectileModifier;
                ChainLightningModifier    orAddComponent = projectile.gameObject.GetOrAddComponent <ChainLightningModifier>();
                orAddComponent.LinkVFXPrefab       = shockRounds.ChainLightningVFX;
                orAddComponent.damageTypes         = shockRounds.ChainLightningDamageTypes;
                orAddComponent.maximumLinkDistance = shockRounds.ChainLightningMaxLinkDistance;
                orAddComponent.damagePerHit        = shockRounds.ChainLightningDamagePerHit;
                orAddComponent.damageCooldown      = shockRounds.ChainLightningDamageCooldown;
                if (isMiddleProj)
                {
                    orAddComponent.maximumLinkDistance    *= 3f;
                    orAddComponent.CanChainToAnyProjectile = true;
                }
                if (shockRounds.ChainLightningDispersalParticles != null)
                {
                    orAddComponent.UsesDispersalParticles        = true;
                    orAddComponent.DispersalParticleSystemPrefab = shockRounds.ChainLightningDispersalParticles;
                    orAddComponent.DispersalDensity      = shockRounds.ChainLightningDispersalDensity;
                    orAddComponent.DispersalMinCoherency = shockRounds.ChainLightningDispersalMinCoherence;
                    orAddComponent.DispersalMaxCoherency = shockRounds.ChainLightningDispersalMaxCoherence;
                }
                else
                {
                    orAddComponent.UsesDispersalParticles = false;
                }
            }
        }
Ejemplo n.º 12
0
 private void OnPostProcessProjectile(Projectile proj, float f)
 {
     if (this.m_owner.HasPickupID(351))
     {
         ExplosiveModifier mod = proj.gameObject.AddComponent <ExplosiveModifier>();
         mod.explosionData = GameManager.Instance.Dungeon.sharedSettingsPrefab.DefaultExplosionData;
     }
     if (this.m_owner.HasPickupID(348))
     {
         proj.baseData.speed  *= 2f;
         proj.baseData.damage *= 1.5f;
     }
     if (this.m_owner.HasPickupID(349))
     {
         proj.baseData.speed  /= 2f;
         proj.baseData.damage *= 2f;
         proj.baseData.force  *= 1.5f;
     }
     if (this.m_owner.HasPickupID(350))
     {
         PierceProjModifier pierceMod = proj.gameObject.GetOrAddComponent <PierceProjModifier>();
         pierceMod.penetratesBreakables       = true;
         pierceMod.preventPenetrationOfActors = false;
         pierceMod.penetration = 999;
     }
     if (this.m_owner.HasPickupID(303))
     {
         proj.BossDamageMultiplier *= 2f;
         proj.ignoreDamageCaps      = true;
     }
     if (this.m_owner.HasPickupID(491) || this.m_owner.PlayerHasCompletionGun())
     {
         if (UnityEngine.Random.value <= 0.05f)
         {
             Projectile proj2             = ((Gun)PickupObjectDatabase.GetById(16)).DefaultModule.projectiles[UnityEngine.Random.Range(0, ((Gun)PickupObjectDatabase.GetById(476)).DefaultModule.projectiles.Count)];
             BraveInput instanceForPlayer = BraveInput.GetInstanceForPlayer(this.m_owner.PlayerIDX);
             bool       flag2             = instanceForPlayer == null;
             float      z     = 0;
             bool       notDo = false;
             if (!flag2)
             {
                 bool    flag3 = instanceForPlayer.IsKeyboardAndMouse(false);
                 Vector2 a     = Vector2.zero;
                 if (flag3)
                 {
                     a = this.m_owner.unadjustedAimPoint.XY() - base.sprite.WorldCenter;
                 }
                 else
                 {
                     bool flag4 = instanceForPlayer.ActiveActions == null;
                     if (flag4)
                     {
                         notDo = true;
                     }
                     else
                     {
                         a = instanceForPlayer.ActiveActions.Aim.Vector;
                     }
                 }
                 if (!notDo)
                 {
                     a.Normalize();
                     z = BraveMathCollege.Atan2Degrees(a);
                 }
             }
             if (!notDo)
             {
                 GameObject obj       = SpawnManager.SpawnProjectile(proj2.gameObject, this.m_owner.sprite.WorldCenter, Quaternion.Euler(0, 0, z));
                 Projectile component = obj.GetComponent <Projectile>();
                 if (component != null)
                 {
                     component.Owner   = this.m_owner;
                     component.Shooter = this.m_owner.specRigidbody;
                 }
             }
         }
     }
     if (this.m_owner.HasPickupID(492) || this.m_owner.PlayerHasCompletionGun())
     {
         if (UnityEngine.Random.value <= 0.1f)
         {
             proj.AdjustPlayerProjectileTint(Color.red, 0);
             proj.OnHitEnemy += delegate(Projectile proj3, SpeculativeRigidbody enemyRigidbody, bool fatal)
             {
                 if (enemyRigidbody.aiActor != null)
                 {
                     AIActor             aiactor      = enemyRigidbody.aiActor;
                     AIActorDebuffEffect debuffEffect = null;
                     foreach (AttackBehaviorBase attackBehaviour in EnemyDatabase.GetOrLoadByGuid((PickupObjectDatabase.GetById(492) as CompanionItem).CompanionGuid).behaviorSpeculator.AttackBehaviors)
                     {
                         if (attackBehaviour is WolfCompanionAttackBehavior)
                         {
                             debuffEffect = (attackBehaviour as WolfCompanionAttackBehavior).EnemyDebuff;
                         }
                     }
                     if (debuffEffect != null)
                     {
                         aiactor.ApplyEffect(debuffEffect, 1, null);
                     }
                 }
             };
         }
     }
     if (this.m_owner.HasPickupID(493) || this.m_owner.PlayerHasCompletionGun())
     {
         if (UnityEngine.Random.value <= 0.1f)
         {
             Projectile proj2             = ((Gun)PickupObjectDatabase.GetById(476)).DefaultModule.projectiles[UnityEngine.Random.Range(0, ((Gun)PickupObjectDatabase.GetById(476)).DefaultModule.projectiles.Count)];
             BraveInput instanceForPlayer = BraveInput.GetInstanceForPlayer(this.m_owner.PlayerIDX);
             bool       flag2             = instanceForPlayer == null;
             float      z     = 0;
             bool       notDo = false;
             if (!flag2)
             {
                 bool    flag3 = instanceForPlayer.IsKeyboardAndMouse(false);
                 Vector2 a     = Vector2.zero;
                 if (flag3)
                 {
                     a = this.m_owner.unadjustedAimPoint.XY() - base.sprite.WorldCenter;
                 }
                 else
                 {
                     bool flag4 = instanceForPlayer.ActiveActions == null;
                     if (flag4)
                     {
                         notDo = true;
                     }
                     else
                     {
                         a = instanceForPlayer.ActiveActions.Aim.Vector;
                     }
                 }
                 if (!notDo)
                 {
                     a.Normalize();
                     z = BraveMathCollege.Atan2Degrees(a);
                 }
             }
             if (!notDo)
             {
                 GameObject obj       = SpawnManager.SpawnProjectile(proj2.gameObject, this.m_owner.sprite.WorldCenter, Quaternion.Euler(0, 0, z));
                 Projectile component = obj.GetComponent <Projectile>();
                 if (component != null)
                 {
                     component.Owner   = this.m_owner;
                     component.Shooter = this.m_owner.specRigidbody;
                 }
             }
         }
     }
     if (this.m_owner.HasPickupID(494) || this.m_owner.PlayerHasCompletionGun())
     {
         if (UnityEngine.Random.value <= 0.05f)
         {
             proj.AdjustPlayerProjectileTint(Color.cyan, 0, 0);
             proj.BossDamageMultiplier *= 2;
             proj.ignoreDamageCaps      = true;
         }
     }
     if (this.m_owner.HasPickupID(573) || this.m_owner.PlayerHasCompletionGun())
     {
         if (UnityEngine.Random.value <= 0.25f)
         {
             proj.AdjustPlayerProjectileTint(Color.white, 0, 0);
             proj.OnHitEnemy += delegate(Projectile proj2, SpeculativeRigidbody enemyRigidbody, bool fatal)
             {
                 if (enemyRigidbody.aiActor != null && enemyRigidbody.aiActor.behaviorSpeculator != null)
                 {
                     enemyRigidbody.aiActor.behaviorSpeculator.Stun(2f, true);
                 }
             };
         }
     }
     if (this.m_owner.HasPickupID(572) || this.m_owner.PlayerHasCompletionGun())
     {
         if (this.m_owner.healthHaver != null && this.m_owner.healthHaver.GetCurrentHealthPercentage() >= 1f)
         {
             proj.baseData.damage *= 1.5f;
             proj.AdjustPlayerProjectileTint(Color.magenta, 0, 0);
         }
     }
 }