private void PostProcessProj(Projectile bullet, float num)
 {
     if (Owner && bullet && Owner.SpriteFlipped)
     {
         bullet.baseData.damage *= 1.3f;
         bullet.RuntimeUpdateScale(1.2f);
         if (Owner.PlayerHasActiveSynergy("Sinister Handed"))
         {
             AdvancedTransmogrifyComponent transmog             = bullet.gameObject.GetOrAddComponent <AdvancedTransmogrifyComponent>();
             AdvancedTransmogrifyComponent.TransmogData newData = new AdvancedTransmogrifyComponent.TransmogData()
             {
                 TargetGuid     = "76bc43539fc24648bff4568c75c686d1",
                 TransmogChance = 0.06f,
                 identifier     = "SinisterHanded",
             };
             transmog.TransmogDataList.Add(newData);
         }
     }
 }
        private void PostProcessProjectile(Projectile sourceProjectile, float effectChanceScalar)
        {
            try
            {
                if (sourceProjectile.GetComponent <HasBeenBulletShuffled>() == null)
                {
                    int num = UnityEngine.Random.Range(1, 55);
                    //VFXToolbox.DoStringSquirt(num.ToString(), sourceProjectile.ProjectilePlayerOwner().specRigidbody.UnitCenter, Color.red);
                    switch (num)
                    {
                    case 1:     //+1 Bullets ------------------------------- WORKS
                        sourceProjectile.baseData.damage *= 1.25f;
                        break;

                    case 2:     //Rocket Powered Bullets ------------------------------- WORKS
                        sourceProjectile.baseData.damage *= 1.1f;
                        sourceProjectile.baseData.speed  *= 1.5f;
                        sourceProjectile.UpdateSpeed();
                        break;

                    case 3:     //Devolver Bullets ------------------------------- WORKS
                        AdvancedTransmogrifyComponent advancedTransmog = sourceProjectile.gameObject.AddComponent <AdvancedTransmogrifyComponent>();
                        advancedTransmog.TransmogDataList = new List <AdvancedTransmogrifyComponent.TransmogData>()
                        {
                            new AdvancedTransmogrifyComponent.TransmogData()
                            {
                                identifier        = "BulletShuffle",
                                maintainHPPercent = false,
                                TargetGuid        = "05891b158cd542b1a5f3df30fb67a7ff",
                                TransmogChance    = 1,
                            }
                        };
                        break;

                    case 4:     //Vorpal Bullets
                        StartCoroutine(EraseAndReplace(sourceProjectile, PickupObjectDatabase.GetById(640).GetComponent <ComplexProjectileModifier>().CriticalProjectile));
                        break;

                    case 5:     //Katana Bullets ------------------------------- WORKS
                        sourceProjectile.OnHitEnemy += DoKatana;
                        break;

                    case 6:     //Hungry Bullets ------------------------------- WORKS
                        HungryProjectileModifier hungry = sourceProjectile.gameObject.GetOrAddComponent <HungryProjectileModifier>();
                        hungry.HungryRadius = 1.5f;
                        hungry.DamagePercentGainPerSnack = 0.25f;
                        hungry.MaxMultiplier             = 3f;
                        hungry.MaximumBulletsEaten       = 10;
                        sourceProjectile.AdjustPlayerProjectileTint(ExtendedColours.purple, 1);
                        break;

                    case 7:     //Heavy Bullets ------------------------------- WORKS
                        sourceProjectile.baseData.damage *= 1.25f;
                        sourceProjectile.baseData.speed  *= 0.5f;
                        sourceProjectile.baseData.force  *= 2f;
                        sourceProjectile.RuntimeUpdateScale(1.25f);
                        sourceProjectile.UpdateSpeed();
                        break;

                    case 8:     //Bouncy Bullets ------------------------------- WORKS
                        BounceProjModifier bounce = sourceProjectile.gameObject.GetOrAddComponent <BounceProjModifier>();
                        bounce.numberOfBounces++;
                        break;

                    case 9:     //Explosive Rounds ------------------------------- WORKS
                        ExplosiveModifier explosion = sourceProjectile.gameObject.AddComponent <ExplosiveModifier>();
                        explosion.doExplosion   = true;
                        explosion.explosionData = StaticExplosionDatas.explosiveRoundsExplosion;
                        break;

                    case 10:     //Ghost Bullets ------------------------------- WORKS
                        PierceProjModifier piercing = sourceProjectile.gameObject.AddComponent <PierceProjModifier>();
                        piercing.penetration++;
                        break;

                    case 11:     //Irradiated Lead ------------------------------- WORKS
                        sourceProjectile.statusEffectsToApply.Add(StaticStatusEffects.irradiatedLeadEffect);
                        sourceProjectile.AdjustPlayerProjectileTint(ExtendedColours.poisonGreen, 1);
                        break;

                    case 12:     //Hot Lead ------------------------------- WORKS
                        sourceProjectile.statusEffectsToApply.Add(StaticStatusEffects.hotLeadEffect);
                        sourceProjectile.AdjustPlayerProjectileTint(Color.red, 1);
                        break;

                    case 13:     //Battery Bullets ------------------------------- WORKS
                        sourceProjectile.damageTypes |= CoreDamageTypes.Electric;
                        break;

                    case 14:     //Frost Bullets (Actully just insta freeze but whatever)
                        sourceProjectile.statusEffectsToApply.Add(StaticStatusEffects.chaosBulletsFreeze);
                        sourceProjectile.AdjustPlayerProjectileTint(ExtendedColours.freezeBlue, 1);
                        break;

                    case 15:     //Charming Rounds ------------------------------- WORKS
                        sourceProjectile.statusEffectsToApply.Add(StaticStatusEffects.charmingRoundsEffect);
                        sourceProjectile.AdjustPlayerProjectileTint(ExtendedColours.charmPink, 1);
                        break;

                    case 16:     //Magic Bullets ------------------------------- WORKS
                        AdvancedTransmogrifyComponent advancedTransmog2 = sourceProjectile.gameObject.AddComponent <AdvancedTransmogrifyComponent>();
                        advancedTransmog2.TransmogDataList = new List <AdvancedTransmogrifyComponent.TransmogData>()
                        {
                            new AdvancedTransmogrifyComponent.TransmogData()
                            {
                                identifier        = "BulletShuffle",
                                maintainHPPercent = false,
                                TargetGuid        = "76bc43539fc24648bff4568c75c686d1",
                                TransmogChance    = 1,
                            }
                        };
                        break;

                    case 17:     //Fat Bullets ------------------------------- WORKS
                        sourceProjectile.baseData.force *= 2f;
                        sourceProjectile.RuntimeUpdateScale(2f);
                        sourceProjectile.baseData.damage *= 1.3f;
                        break;

                    case 18:     //Angry Bullets ------------------------------- WORKS
                        AngryBulletsProjectileBehaviour angry = sourceProjectile.gameObject.AddComponent <AngryBulletsProjectileBehaviour>();
                        break;

                    case 19:     //Blank Bullets
                        BlankOnHitModifier blanking = sourceProjectile.gameObject.GetOrAddComponent <BlankOnHitModifier>();
                        blanking.useTinyBlank = true;
                        break;

                    case 20:     //Orbital Bullets Behaviour ------------------------------- WORKS
                        OrbitalBulletsBehaviour orbiting = sourceProjectile.gameObject.GetOrAddComponent <OrbitalBulletsBehaviour>();
                        break;

                    case 21:     //Shadow Bullets ------------------------------- WORKS
                        sourceProjectile.SpawnChainedShadowBullets(1, 0.05f, 1, null, true);
                        break;

                    case 22:     //Stout Bullets ------------------------------- WORKS
                        sourceProjectile.RuntimeUpdateScale(1.5f);
                        sourceProjectile.gameObject.GetOrAddComponent <StoutBulletsProjectileBehaviour>();
                        break;

                    case 23:     //Snowballets ------------------------------- WORKS
                        ScalingProjectileModifier scalingProjectileModifier = sourceProjectile.gameObject.AddComponent <ScalingProjectileModifier>();
                        scalingProjectileModifier.ScaleToDamageRatio      = 2.5f / 10f;
                        scalingProjectileModifier.MaximumDamageMultiplier = 2.5f;
                        scalingProjectileModifier.IsSynergyContingent     = false;
                        scalingProjectileModifier.PercentGainPerUnit      = 10f;
                        break;

                    case 24:     //Remote Bullets ------------------------------- WORKS
                        sourceProjectile.gameObject.GetOrAddComponent <RemoteBulletsProjectileBehaviour>();
                        break;

                    case 25:     //Zombie Bullets ------------------------------- WORKS
                        sourceProjectile.OnDestruction += HandleZombieEffect;
                        break;

                    case 26:     //Flak Bullets ------------------------------- WORKS
                        sourceProjectile.gameObject.GetOrAddComponent <FlakBulletsProjectileBehaviour>();
                        break;

                    case 27:     //Silver Bullets ------------------------------- WORKS
                        sourceProjectile.BossDamageMultiplier         *= 1.25f;
                        sourceProjectile.BlackPhantomDamageMultiplier *= 2.25f;
                        sourceProjectile.AdjustPlayerProjectileTint(ExtendedColours.silvedBulletsSilver, 1);
                        break;

                    case 28:     //Gilded Bullets ------------------------------- WORKS
                        float gildnum = 0f;
                        ScalingStatBoostItem gildedbullets = PickupObjectDatabase.GetById(532).GetComponent <ScalingStatBoostItem>();
                        gildnum = Mathf.Clamp01(Mathf.InverseLerp(gildedbullets.ScalingTargetMin, gildedbullets.ScalingTargetMax, sourceProjectile.ProjectilePlayerOwner().carriedConsumables.Currency));
                        gildnum = gildedbullets.ScalingCurve.Evaluate(gildnum);
                        float gildnum2 = Mathf.Lerp(gildedbullets.MinScaling, gildedbullets.MaxScaling, gildnum);
                        sourceProjectile.baseData.damage *= gildnum2;
                        sourceProjectile.AdjustPlayerProjectileTint(gildedbullets.TintColor, gildedbullets.TintPriority, 0f);
                        break;

                    case 29:     //Cursed Bullets ------------------------------- WORKS
                        float cursenum = 0f;
                        ScalingStatBoostItem cursedBullets = PickupObjectDatabase.GetById(571).GetComponent <ScalingStatBoostItem>();
                        cursenum = Mathf.Clamp01(Mathf.InverseLerp(cursedBullets.ScalingTargetMin, cursedBullets.ScalingTargetMax, sourceProjectile.ProjectilePlayerOwner().stats.GetStatValue(PlayerStats.StatType.Curse)));
                        cursenum = cursedBullets.ScalingCurve.Evaluate(cursenum);
                        float cursenum2 = Mathf.Lerp(cursedBullets.MinScaling, cursedBullets.MaxScaling, cursenum);
                        sourceProjectile.baseData.damage *= cursenum2;
                        sourceProjectile.AdjustPlayerProjectileTint(cursedBullets.TintColor, cursedBullets.TintPriority, 0f);
                        sourceProjectile.CurseSparks = true;
                        break;

                    case 30:     //Chance Bullets
                        DoChanceBulletsEffect(sourceProjectile);
                        break;

                    case 31:     //Bumbullets
                        StartCoroutine(SpawnAdditionalProjectile(sourceProjectile, (PickupObjectDatabase.GetById(14) as Gun).DefaultModule.projectiles[0], 0));
                        break;

                    case 32:     //Bloody 9mm
                        StartCoroutine(EraseAndReplace(sourceProjectile, PickupObjectDatabase.GetById(524).GetComponent <RandomProjectileReplacementItem>().ReplacementProjectile));
                        break;

                    case 33:     //Slow ------------------------------- WORKS
                        sourceProjectile.statusEffectsToApply.Add(StaticStatusEffects.tripleCrossbowSlowEffect);
                        sourceProjectile.AdjustPlayerProjectileTint(Color.yellow, 1);
                        break;

                    case 34:     //Wallpierce
                        sourceProjectile.pierceMinorBreakables   = true;
                        sourceProjectile.PenetratesInternalWalls = true;
                        break;

                    case 35:     //Ignore DPS Cap
                        sourceProjectile.ignoreDamageCaps = true;
                        break;

                    case 36:     //Scattershot
                        sourceProjectile.baseData.damage *= 0.55f;
                        StartCoroutine(DoAdditionalShot(sourceProjectile, 0, 30f));
                        StartCoroutine(DoAdditionalShot(sourceProjectile, 0, 30f));
                        break;

                    case 37:     //Backup Gun
                        StartCoroutine(DoAdditionalShot(sourceProjectile, 180, 5f));
                        break;

                    case 38:     //Helix
                        StartCoroutine(DoAdditionalShot(sourceProjectile, 0, 0f, true));
                        sourceProjectile.ConvertToHelixMotion(false);
                        break;

                    case 39:     //Killed enemies become projectiles (Casey)
                        sourceProjectile.baseData.force *= 3f;
                        KilledEnemiesBecomeProjectileModifier caseymode = sourceProjectile.gameObject.AddComponent <KilledEnemiesBecomeProjectileModifier>();
                        caseymode.CompletelyBecomeProjectile = (PickupObjectDatabase.GetById(541) as Gun).DefaultModule.chargeProjectiles[0].Projectile.GetComponent <KilledEnemiesBecomeProjectileModifier>().CompletelyBecomeProjectile;
                        caseymode.BaseProjectile             = (PickupObjectDatabase.GetById(541) as Gun).DefaultModule.chargeProjectiles[0].Projectile.GetComponent <KilledEnemiesBecomeProjectileModifier>().BaseProjectile;
                        break;

                    case 40:     //Instant Cheese
                        sourceProjectile.statusEffectsToApply.Add(StaticStatusEffects.instantCheese);
                        sourceProjectile.AdjustPlayerProjectileTint(ExtendedColours.honeyYellow, 1);
                        break;

                    case 41:     //Stun
                        sourceProjectile.StunApplyChance     = 1;
                        sourceProjectile.AppliedStunDuration = 2;
                        sourceProjectile.AppliesStun         = true;
                        break;

                    case 42:     //High Kaliber Effect
                        sourceProjectile.OnHitEnemy += KaliberShit;
                        break;

                    case 43:     //Tangler Squarify
                        sourceProjectile.ApplyClonedShaderProjModifier((PickupObjectDatabase.GetById(175) as Gun).DefaultModule.projectiles[0].GetComponent <ShaderProjModifier>());
                        break;

                    case 44:     //Akey47
                        sourceProjectile.gameObject.AddComponent <KeyProjModifier>();
                        break;

                    case 45:     //Combine Vapourise
                        sourceProjectile.baseData.damage *= 2f;
                        CombineEvaporateEffect origEvap = (PickupObjectDatabase.GetById(519) as Gun).alternateVolley.projectiles[0].projectiles[0].GetComponent <CombineEvaporateEffect>();
                        CombineEvaporateEffect newEvap  = sourceProjectile.gameObject.AddComponent <CombineEvaporateEffect>();
                        newEvap.FallbackShader        = origEvap.FallbackShader;
                        newEvap.ParticleSystemToSpawn = origEvap.ParticleSystemToSpawn;
                        break;

                    case 46:     //Snakemaker Snakify
                        AdvancedTransmogrifyComponent advancedTransmogSnek = sourceProjectile.gameObject.AddComponent <AdvancedTransmogrifyComponent>();
                        advancedTransmogSnek.TransmogDataList = new List <AdvancedTransmogrifyComponent.TransmogData>()
                        {
                            new AdvancedTransmogrifyComponent.TransmogData()
                            {
                                identifier        = "BulletShuffle",
                                maintainHPPercent = false,
                                TargetGuid        = "1386da0f42fb4bcabc5be8feb16a7c38",
                                TransmogChance    = 1,
                            }
                        };
                        break;

                    case 47:     //Sunlight Burn
                        sourceProjectile.statusEffectsToApply.Add(StaticStatusEffects.SunlightBurn);
                        break;

                    case 48:     //Tiger
                        SummonTigerModifier tigerness = sourceProjectile.gameObject.AddComponent <SummonTigerModifier>();
                        tigerness.TigerProjectilePrefab = (PickupObjectDatabase.GetById(369) as Gun).DefaultModule.chargeProjectiles[0].Projectile.GetComponent <SummonTigerModifier>().TigerProjectilePrefab;
                        break;

                    case 49:     //Shield on Destroy
                        sourceProjectile.OnDestruction += SpawnShieldOnDestroy;
                        break;

                    case 50:     //Glitter
                        sourceProjectile.ApplyClonedShaderProjModifier((PickupObjectDatabase.GetById(28) as Gun).modifiedFinalVolley.projectiles[0].projectiles[1].GetComponent <ShaderProjModifier>());
                        break;

                    case 51:     //Finished Effect
                        sourceProjectile.gameObject.AddComponent <BlackRevolverModifier>();
                        break;

                    case 52:     //Mimic Gun Effect
                        sourceProjectile.gameObject.AddComponent <EnemyBulletsBecomeJammedModifier>();
                        break;

                    case 53:     //Green Fire
                        sourceProjectile.statusEffectsToApply.Add(StaticStatusEffects.greenFireEffect);
                        sourceProjectile.AdjustPlayerProjectileTint(Color.green, 1);
                        break;

                    case 54:     //Encircler
                        sourceProjectile.ApplyClonedShaderProjModifier((PickupObjectDatabase.GetById(648) as Gun).DefaultModule.projectiles[0].GetComponent <ShaderProjModifier>());
                        break;
                    }
                    sourceProjectile.gameObject.AddComponent <HasBeenBulletShuffled>();
                }
            }
            catch (Exception e)
            {
                ETGModConsole.Log(e.Message);
            }
        }