예제 #1
0
        public static void Init()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Mimigun", "mimigun");

            Game.Items.Rename("outdated_gun_mods:mimigun", "spapi:mimigun");
            gun.gameObject.AddComponent <MimigunController>();
            GunExt.SetShortDescription(gun, "Baby Good Mimigun");
            GunExt.SetLongDescription(gun, "Despite most mimics being evil, and trying to stop gungeoneers in any ways, this one is good and will try to help it's owner as it can. It isn't very powerful, but as all mimics, it has the ability to mimic anything" +
                                      " it sees. It one will try to use it to help.");
            GunExt.SetupSprite(gun, null, "mimigun_idle_001", 8);
            GunExt.SetAnimationFPS(gun, gun.shootAnimation, 16);
            GunExt.AddProjectileModuleFrom(gun, Toolbox.GetGunById(734), true, false);
            gun.reloadTime = 2.0f;
            gun.SetBaseMaxAmmo(900);
            gun.quality = PickupObject.ItemQuality.A;
            gun.barrelOffset.transform.localPosition = new Vector3(1.85f, 0.6f, 0f);
            gun.encounterTrackable.EncounterGuid     = "mimigun_very_cute";
            gun.gunClass           = GunClass.SILLY;
            gun.gunSwitchGroup     = Toolbox.GetGunById(734).gunSwitchGroup;
            gun.muzzleFlashEffects = Toolbox.GetGunById(734).muzzleFlashEffects;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            gun.AddToCursulaShop();
            gun.AddToBlacksmithShop();
            gun.RemovePeskyQuestionmark();
            gun.PlaceItemInAmmonomiconAfterItemById(369);
            gun.SetupUnlockOnFlag(GungeonFlags.ITEMSPECIFIC_HAS_BEEN_PEDESTAL_MIMICKED, true);
            mimigunId = gun.PickupObjectId;
        }
예제 #2
0
        public static void Init()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Celebration", "mk1");

            Game.Items.Rename("outdated_gun_mods:celebration", "spapi:celebration");
            gun.gameObject.AddComponent <CelebrationMk1>();
            GunExt.SetShortDescription(gun, "Great For Gunparties!");
            GunExt.SetLongDescription(gun, "Shoots fireworks. Yes, fireworks.\n\nGun originally designed for being in highest-tier chests, but because of hate it got it was moved to lower-tier chests.");
            GunExt.SetupSprite(gun, null, "mk1_idle_001", 8);
            GunExt.SetAnimationFPS(gun, gun.shootAnimation, 16);
            for (int i = 0; i < 3; i++)
            {
                GunExt.AddProjectileModuleFrom(gun, "klobb", true, false);
            }
            foreach (ProjectileModule mod in gun.Volley.projectiles)
            {
                mod.shootStyle     = ProjectileModule.ShootStyle.SemiAutomatic;
                mod.angleVariance /= 1.25f;
                mod.ammoType       = GameUIAmmoType.AmmoType.GRENADE;
                Projectile projectile = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(275) as Gun).DefaultModule.projectiles[0]);
                projectile.gameObject.SetActive(false);
                FakePrefab.MarkAsFakePrefab(projectile.gameObject);
                UnityEngine.Object.DontDestroyOnLoad(projectile);
                mod.projectiles[0]          = projectile;
                projectile.transform.parent = gun.barrelOffset;
                projectile.name             = "Firework_Rocket";
                ExplosiveModifier explosiveMod = projectile.gameObject.AddComponent <ExplosiveModifier>();
                explosiveMod.explosionData = new ExplosionData();
                explosiveMod.explosionData.CopyFrom((PickupObjectDatabase.GetById(593) as Gun).DefaultModule.projectiles[0].GetComponent <ExplosiveModifier>().explosionData);
                explosiveMod.explosionData.effect = EnemyDatabase.GetOrLoadByGuid(RnGEnemyDatabase.GetRnGEnemyGuid(RnGEnemyDatabase.RnGEnemyType.DynaM80_Guy)).GetComponent <ExplodeOnDeath>().explosionData.effect;
                explosiveMod.IgnoreQueues         = true;
                projectile.SuppressHitEffects     = true;
                projectile.damageTypes            = CoreDamageTypes.None;
                projectile.AppliesFire            = false;
                mod.cooldownTime        = 1f;
                mod.numberOfShotsInClip = 1;
                if (mod != gun.DefaultModule)
                {
                    mod.ammoCost = 0;
                }
            }
            gun.Volley.UsesShotgunStyleVelocityRandomizer = true;
            gun.Volley.DecreaseFinalSpeedPercentMin       = -10f;
            gun.Volley.IncreaseFinalSpeedPercentMax       = 10f;
            gun.reloadTime     = 2.5f;
            gun.gunSwitchGroup = Toolbox.GetGunById(39).gunSwitchGroup;
            gun.SetBaseMaxAmmo(75);
            gun.quality = PickupObject.ItemQuality.A;
            gun.barrelOffset.transform.localPosition = new Vector3(1f, 0.35f, 0f);
            gun.encounterTrackable.EncounterGuid     = "celebration_mk1";
            gun.gunClass = GunClass.EXPLOSIVE;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            gun.AddToTrorkShop();
            gun.AddToCursulaShop();
            gun.AddToBlacksmithShop();
            gun.RemovePeskyQuestionmark();
            gun.PlaceItemInAmmonomiconAfterItemById(275);
        }
예제 #3
0
        public static void Init()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Suspicious Shotgun", "jail_npc_shotgun");

            Game.Items.Rename("outdated_gun_mods:suspicious_shotgun", "spapi:suspicious_shotgun");
            gun.gameObject.AddComponent <BowBowController>();
            GunExt.SetShortDescription(gun, "Covered in rainbow sparkles?");
            GunExt.SetLongDescription(gun, "A weird shotgun. Internal part of the barrel was painted in rainbow paint. A name \"Bow-Bow\" is also engraved on the barrel.\n\nThis strange shotgun was found in a cell. Probably someone forgot it there while they were moving to breach.");
            GunExt.SetupSprite(gun, null, "jail_npc_shotgun_idle_001", 8);
            GunExt.SetAnimationFPS(gun, gun.shootAnimation, 16);
            GunExt.SetAnimationFPS(gun, gun.reloadAnimation, 8);
            for (int i = 0; i < 5; i++)
            {
                GunExt.AddProjectileModuleFrom(gun, "klobb", true, false);
            }
            foreach (ProjectileModule mod in gun.Volley.projectiles)
            {
                mod.shootStyle = ProjectileModule.ShootStyle.SemiAutomatic;
                Projectile projectile = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(51) as Gun).DefaultModule.projectiles[0]);
                projectile.gameObject.SetActive(false);
                FakePrefab.MarkAsFakePrefab(projectile.gameObject);
                UnityEngine.Object.DontDestroyOnLoad(projectile);
                mod.projectiles[0]          = projectile;
                projectile.transform.parent = gun.barrelOffset;
                mod.numberOfShotsInClip     = 7;
                projectile.baseData.damage  = 7f;
                mod.cooldownTime            = 0.6f;
                projectile.baseData.range  /= 2.25f;
                projectile.name             = "Suspicious_Shotgun_Projectile";
                mod.ammoType = GameUIAmmoType.AmmoType.SHOTGUN;
                if (mod != gun.DefaultModule)
                {
                    mod.ammoCost = 0;
                }
            }
            gun.shellCasing                 = Toolbox.GetGunById(202).shellCasing;
            gun.reloadShellLaunchFrame      = 5;
            gun.shellCasingOnFireFrameDelay = 0;
            gun.shellsToLaunchOnFire        = 1;
            gun.shellsToLaunchOnReload      = 3;
            gun.reloadTime = 1f;
            gun.SetBaseMaxAmmo(200);
            gun.quality = PickupObject.ItemQuality.B;
            gun.encounterTrackable.EncounterGuid = "boiled_bowler_shotga";
            gun.gunClass = GunClass.SHOTGUN;
            gun.barrelOffset.transform.localPosition = new Vector3(1.4f, 0.2f, 0f);
            gun.muzzleFlashEffects = (PickupObjectDatabase.GetById(51) as Gun).muzzleFlashEffects;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            gun.AddToCursulaShop();
            gun.AddToBlacksmithShop();
            gun.RemovePeskyQuestionmark();
            gun.PlaceItemInAmmonomiconAfterItemById(100);
            gun.SetupUnlockOnFlag(GungeonFlags.BOWLER_ACTIVE_IN_FOYER, true);
        }
        public static void Init()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Aegis Gun", "aegis");

            Game.Items.Rename("outdated_gun_mods:aegis_gun", "spapi:aegis_gun");
            gun.gameObject.AddComponent <AegisGunController>();
            GunExt.SetShortDescription(gun, "En Guarde!");
            GunExt.SetLongDescription(gun, "Reloading shields enemy bullets.\n\nThis handgun was made out of a sword. Through, the melee abilities of the sword it was made from were completelly nullified, so this weapon doesn't anger the" +
                                      " jammed.");
            GunExt.SetupSprite(gun, null, "aegis_idle_001", 8);
            GunExt.SetAnimationFPS(gun, gun.shootAnimation, 16);
            GunExt.AddProjectileModuleFrom(gun, "klobb", true, false);
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.SemiAutomatic;
            gun.DefaultModule.angleVariance = 0;
            gun.DefaultModule.ammoType      = GameUIAmmoType.AmmoType.MEDIUM_BULLET;
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(464) as Gun).DefaultModule.projectiles[0]);

            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            gun.DefaultModule.projectiles[0] = projectile;
            projectile.transform.parent      = gun.barrelOffset;
            projectile.DefaultTintColor      = new Color(1, 1, 1).WithAlpha(0.45f);
            projectile.HasDefaultTint        = true;
            projectile.name = "Explosive_Aegis_Shell";
            ExplosionData data = (PickupObjectDatabase.GetById(81) as Gun).DefaultModule.projectiles[0].GetComponent <ExplosiveModifier>().explosionData.CopyExplosionData();

            data.doDestroyProjectiles = false;
            data.doForce = false;
            data.damage *= 0.35f;
            ExplosiveModifier mod = projectile.gameObject.GetOrAddComponent <ExplosiveModifier>();

            mod.explosionData                     = data;
            gun.reloadClipLaunchFrame             = 0;
            gun.DefaultModule.cooldownTime        = 0.2f;
            gun.DefaultModule.numberOfShotsInClip = 4;
            gun.reloadTime = 1.4f;
            gun.SetBaseMaxAmmo(150);
            gun.quality            = PickupObject.ItemQuality.B;
            gun.gunSwitchGroup     = Toolbox.GetGunById(380).gunSwitchGroup;
            gun.muzzleFlashEffects = Toolbox.GetGunById(334).muzzleFlashEffects;
            gun.barrelOffset.transform.localPosition = new Vector3(0.9f, 0.55f, 0f);
            gun.encounterTrackable.EncounterGuid     = "aegis_junk";
            AdvancedDualWieldSynergyProcessor dualWieldController = gun.gameObject.AddComponent <AdvancedDualWieldSynergyProcessor>();

            dualWieldController.SynergyNameToCheck = "#SHIELD_BROS";
            dualWieldController.PartnerGunID       = 380;
            gun.gunClass = GunClass.PISTOL;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            gun.AddToCursulaShop();
            gun.AddToBlacksmithShop();
            gun.RemovePeskyQuestionmark();
            gun.PlaceItemInAmmonomiconAfterItemById(380);
        }
예제 #5
0
        public static void Init()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("High-Quality Gun", "hd");

            Game.Items.Rename("outdated_gun_mods:high-quality_gun", "spapi:high_quality_gun");
            gun.gameObject.AddComponent <HDGun>();
            GunExt.SetShortDescription(gun, "HD!");
            GunExt.SetLongDescription(gun, "Bullets charm enemies.\n\nThis gun is just magnum, but but has 4 times more pixels. Because of that, it seems very weird among all other guns, but at the same time looks kinda cool!");
            GunExt.SetupSprite(gun, null, "hd_idle_001", 8);
            GunExt.SetAnimationFPS(gun, gun.shootAnimation, 13);
            GunExt.SetAnimationFPS(gun, gun.reloadAnimation, 12);
            GunExt.AddProjectileModuleFrom(gun, Toolbox.GetGunById(38), true, false);
            gun.gunSwitchGroup = "Magnum";
            VFXPool pool = new VFXPool();

            pool.type = VFXPoolType.All;
            VFXComplex complex = new VFXComplex();
            VFXObject  vfObj   = new VFXObject();
            GameObject obj     = new GameObject("hd_smoke");

            obj.SetActive(false);
            FakePrefab.MarkAsFakePrefab(obj);
            UnityEngine.Object.DontDestroyOnLoad(obj);
            tk2dSprite              sprite     = obj.AddComponent <tk2dSprite>();
            tk2dSpriteAnimator      animator   = obj.AddComponent <tk2dSpriteAnimator>();
            tk2dSpriteAnimationClip clip       = new tk2dSpriteAnimationClip();
            GameObject              origEffect = Toolbox.GetGunById(38).muzzleFlashEffects.effects[0].effects[0].effect;
            VFXObject origVfEffect             = Toolbox.GetGunById(38).muzzleFlashEffects.effects[0].effects[0];

            clip.fps    = origEffect.GetAnyComponent <tk2dSpriteAnimator>().DefaultClip.fps;
            clip.frames = new tk2dSpriteAnimationFrame[0];
            for (int i = 1; i < 4; i++)
            {
                tk2dSpriteAnimationFrame frame = new tk2dSpriteAnimationFrame();
                frame.spriteId = Toolbox.VFXCollection.GetSpriteIdByName("hd_smoke_00" + i);
                Toolbox.VFXCollection.inst.spriteDefinitions[frame.spriteId] = Toolbox.VFXCollection.inst.spriteDefinitions[origEffect.GetAnyComponent <tk2dSpriteAnimator>().DefaultClip.frames[i - 1].spriteId].CopyDefinitionFrom();
                frame.spriteCollection = Toolbox.VFXCollection;
                clip.frames            = clip.frames.Concat(new tk2dSpriteAnimationFrame[] { frame }).ToArray();
            }
            clip.wrapMode = tk2dSpriteAnimationClip.WrapMode.Once;
            clip.name     = "start";
            animator.spriteAnimator.Library       = animator.gameObject.AddComponent <tk2dSpriteAnimation>();
            animator.spriteAnimator.Library.clips = new tk2dSpriteAnimationClip[] { clip };
            animator.playAutomatically            = true;
            animator.DefaultClipId = animator.GetClipIdByName("start");
            SpriteAnimatorKiller kill = animator.gameObject.AddComponent <SpriteAnimatorKiller>();

            kill.fadeTime             = -1f;
            kill.animator             = animator;
            kill.delayDestructionTime = -1f;
            obj.gameObject.SetLayerRecursively(LayerMask.NameToLayer("Unpixelated"));
            vfObj.orphaned        = origVfEffect.orphaned;
            vfObj.attached        = origVfEffect.attached;
            vfObj.persistsOnDeath = origVfEffect.persistsOnDeath;
            vfObj.usesZHeight     = origVfEffect.usesZHeight;
            vfObj.zHeight         = origVfEffect.zHeight;
            vfObj.alignment       = origVfEffect.alignment;
            vfObj.destructible    = origVfEffect.destructible;
            vfObj.effect          = obj;
            VFXObject  vfObj2 = new VFXObject();
            GameObject obj2   = new GameObject("hd_flare");

            obj2.SetActive(false);
            FakePrefab.MarkAsFakePrefab(obj2);
            UnityEngine.Object.DontDestroyOnLoad(obj2);
            tk2dSprite              sprite2     = obj2.AddComponent <tk2dSprite>();
            tk2dSpriteAnimator      animator2   = obj2.AddComponent <tk2dSpriteAnimator>();
            tk2dSpriteAnimationClip clip2       = new tk2dSpriteAnimationClip();
            GameObject              origEffect2 = Toolbox.GetGunById(38).muzzleFlashEffects.effects[0].effects[1].effect;
            VFXObject origVfEffect2             = Toolbox.GetGunById(38).muzzleFlashEffects.effects[0].effects[1];

            clip2.fps    = origEffect2.GetAnyComponent <tk2dSpriteAnimator>().DefaultClip.fps;
            clip2.frames = new tk2dSpriteAnimationFrame[0];
            for (int i = 1; i < 6; i++)
            {
                tk2dSpriteAnimationFrame frame = new tk2dSpriteAnimationFrame();
                frame.spriteId = Toolbox.VFXCollection.GetSpriteIdByName("hd_flare_00" + i);
                Toolbox.VFXCollection.inst.spriteDefinitions[frame.spriteId] = Toolbox.VFXCollection.inst.spriteDefinitions[origEffect2.GetAnyComponent <tk2dSpriteAnimator>().DefaultClip.frames[i - 1].spriteId].CopyDefinitionFrom();
                frame.spriteCollection = Toolbox.VFXCollection;
                clip2.frames           = clip2.frames.Concat(new tk2dSpriteAnimationFrame[] { frame }).ToArray();
            }
            clip2.wrapMode = tk2dSpriteAnimationClip.WrapMode.Once;
            clip2.name     = "start";
            animator2.spriteAnimator.Library       = animator2.gameObject.AddComponent <tk2dSpriteAnimation>();
            animator2.spriteAnimator.Library.clips = new tk2dSpriteAnimationClip[] { clip2 };
            animator2.playAutomatically            = true;
            animator2.DefaultClipId = animator2.GetClipIdByName("start");
            SpriteAnimatorKiller kill2 = animator2.gameObject.AddComponent <SpriteAnimatorKiller>();

            kill2.fadeTime             = -1f;
            kill2.animator             = animator2;
            kill2.delayDestructionTime = -1f;
            obj2.gameObject.SetLayerRecursively(LayerMask.NameToLayer("Unpixelated"));
            vfObj2.orphaned        = origVfEffect2.orphaned;
            vfObj2.attached        = origVfEffect2.attached;
            vfObj2.persistsOnDeath = origVfEffect2.persistsOnDeath;
            vfObj2.usesZHeight     = origVfEffect2.usesZHeight;
            vfObj2.zHeight         = origVfEffect2.zHeight;
            vfObj2.alignment       = origVfEffect2.alignment;
            vfObj2.destructible    = origVfEffect2.destructible;
            vfObj2.effect          = obj2;
            complex.effects        = new VFXObject[] { vfObj, vfObj2 };
            pool.effects           = new VFXComplex[] { complex };
            gun.muzzleFlashEffects = pool;
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(38) as Gun).DefaultModule.projectiles[0]);

            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            gun.DefaultModule.projectiles[0] = projectile;
            gun.OverrideAngleSnap            = null;
            projectile.transform.parent      = gun.barrelOffset;
            projectile.AppliesCharm          = true;
            projectile.CharmApplyChance      = 100f;
            projectile.baseData.damage       = 20f;
            projectile.charmEffect           = (PickupObjectDatabase.GetById(527) as BulletStatusEffectItem).CharmModifierEffect;
            projectile.GetAnySprite().spriteId = ETGMod.Databases.Items.ProjectileCollection.inst.GetSpriteIdByName("hd_bullet_001");
            ETGMod.Databases.Items.ProjectileCollection.inst.spriteDefinitions[projectile.GetAnySprite().spriteId] =
                ETGMod.Databases.Items.ProjectileCollection.inst.spriteDefinitions[(PickupObjectDatabase.GetById(38) as Gun).DefaultModule.projectiles[0].GetAnySprite().spriteId].CopyDefinitionFrom();
            gun.DefaultModule.numberOfShotsInClip = 8;
            projectile.name = "Charmingly_HD_Projectile";
            gun.reloadTime  = 1.0f;
            gun.SetBaseMaxAmmo(280);
            gun.quality = PickupObject.ItemQuality.S;
            gun.encounterTrackable.EncounterGuid = "hd";
            gun.gunClass = GunClass.PISTOL;
            GameObject shellCasing = UnityEngine.Object.Instantiate(Toolbox.GetGunById(38).shellCasing);

            shellCasing.SetActive(false);
            FakePrefab.MarkAsFakePrefab(shellCasing);
            tk2dSpriteAnimator      gunAnim    = gun.GetComponent <tk2dSpriteAnimator>();
            tk2dSpriteAnimationClip reloadClip = gunAnim.GetClipByName(gun.reloadAnimation);

            reloadClip.frames = new tk2dSpriteAnimationFrame[0];
            foreach (string text in reloadFrames)
            {
                tk2dSpriteAnimationFrame frame = new tk2dSpriteAnimationFrame {
                    spriteCollection = ETGMod.Databases.Items.WeaponCollection, spriteId = ETGMod.Databases.Items.WeaponCollection.GetSpriteIdByName(text)
                };
                reloadClip.frames = reloadClip.frames.Concat(new tk2dSpriteAnimationFrame[] { frame }).ToArray();
            }
            UnityEngine.Object.DontDestroyOnLoad(shellCasing);
            shellCasing.GetAnyComponent <tk2dBaseSprite>().SetSprite(Toolbox.VFXCollection, Toolbox.VFXCollection.GetSpriteIdByName("hd_shell_001"));
            Toolbox.VFXCollection.spriteDefinitions[shellCasing.GetAnyComponent <tk2dBaseSprite>().spriteId] =
                Toolbox.GetGunById(38).shellCasing.GetAnyComponent <tk2dBaseSprite>().Collection.spriteDefinitions[Toolbox.GetGunById(38).shellCasing.GetAnyComponent <tk2dBaseSprite>().spriteId].CopyDefinitionFrom();
            shellCasing.AddComponent <AlwaysUnpixeledBehaviour>();
            gun.shellCasing            = shellCasing;
            gun.shellsToLaunchOnFire   = 0;
            gun.shellsToLaunchOnReload = 6;
            gun.reloadShellLaunchFrame = 2;
            gun.barrelOffset.transform.localPosition = new Vector3(1.0625f, 0.5625f, 0f);
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            gun.AddToCursulaShop();
            gun.AddToBlacksmithShop();
            gun.RemovePeskyQuestionmark();
            gun.PlaceItemInAmmonomiconAfterItemById(38);
            ItemBuilder.AddPassiveStatModifier(gun, PlayerStats.StatType.Coolness, 3, StatModifier.ModifyMethod.ADDITIVE);
            tk2dSpriteDefinition ammonomiconDef = AmmonomiconController.ForceInstance.EncounterIconCollection.spriteDefinitions[AmmonomiconController.ForceInstance.EncounterIconCollection.GetSpriteIdByName("hd_idle_001")];

            ammonomiconDef.position1                  = new Vector3(ammonomiconDef.position1.x / 2, ammonomiconDef.position1.y / 2, ammonomiconDef.position1.z / 2);
            ammonomiconDef.position2                  = new Vector3(ammonomiconDef.position2.x / 2, ammonomiconDef.position2.y / 2, ammonomiconDef.position2.z / 2);
            ammonomiconDef.position3                  = new Vector3(ammonomiconDef.position3.x / 2, ammonomiconDef.position3.y / 2, ammonomiconDef.position3.z / 2);
            ammonomiconDef.boundsDataCenter           = new Vector3(ammonomiconDef.boundsDataCenter.x / 2, ammonomiconDef.boundsDataCenter.y / 2, ammonomiconDef.boundsDataCenter.z / 2);
            ammonomiconDef.boundsDataExtents          = new Vector3(ammonomiconDef.boundsDataExtents.x / 2, ammonomiconDef.boundsDataExtents.y / 2, ammonomiconDef.boundsDataExtents.z / 2);
            ammonomiconDef.untrimmedBoundsDataCenter  = new Vector3(ammonomiconDef.untrimmedBoundsDataCenter.x / 2, ammonomiconDef.untrimmedBoundsDataCenter.y / 2, ammonomiconDef.untrimmedBoundsDataCenter.z / 2);
            ammonomiconDef.untrimmedBoundsDataExtents = new Vector3(ammonomiconDef.untrimmedBoundsDataExtents.x / 2, ammonomiconDef.untrimmedBoundsDataExtents.y / 2, ammonomiconDef.untrimmedBoundsDataExtents.z / 2);
            List <tk2dSpriteDefinition> affected = new List <tk2dSpriteDefinition>();

            foreach (tk2dSpriteAnimationClip clip3 in gun.GetGunAnimationClips())
            {
                if (clip3.frames != null)
                {
                    foreach (tk2dSpriteAnimationFrame frame in clip3.frames)
                    {
                        if (frame != null && frame.spriteCollection != null)
                        {
                            tk2dSpriteDefinition def = frame.spriteCollection.spriteDefinitions[frame.spriteId];
                            if (def != null && !affected.Contains(def))
                            {
                                def.position1                  = new Vector3(def.position1.x / 2, def.position1.y / 2, def.position1.z / 2);
                                def.position2                  = new Vector3(def.position2.x / 2, def.position2.y / 2, def.position2.z / 2);
                                def.position3                  = new Vector3(def.position3.x / 2, def.position3.y / 2, def.position3.z / 2);
                                def.boundsDataCenter           = new Vector3(def.boundsDataCenter.x / 2, def.boundsDataCenter.y / 2, def.boundsDataCenter.z / 2);
                                def.boundsDataExtents          = new Vector3(def.boundsDataExtents.x / 2, def.boundsDataExtents.y / 2, def.boundsDataExtents.z / 2);
                                def.untrimmedBoundsDataCenter  = new Vector3(def.untrimmedBoundsDataCenter.x / 2, def.untrimmedBoundsDataCenter.y / 2, def.untrimmedBoundsDataCenter.z / 2);
                                def.untrimmedBoundsDataExtents = new Vector3(def.untrimmedBoundsDataExtents.x / 2, def.untrimmedBoundsDataExtents.y / 2, def.untrimmedBoundsDataExtents.z / 2);
                                def.RemoveOffset();
                                affected.Add(def);
                            }
                        }
                    }
                }
            }
            affected.Clear();
            int index = 0;

            foreach (tk2dSpriteAnimationFrame frame in gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.idleAnimation).frames)
            {
                tk2dSpriteDefinition def = frame.spriteCollection.spriteDefinitions[frame.spriteId];
                if (def != null && !affected.Contains(def))
                {
                    def.MakeOffset(offsets[0][index]);
                    affected.Add(def);
                }
                index++;
            }
            index = 0;
            foreach (tk2dSpriteAnimationFrame frame in gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.shootAnimation).frames)
            {
                tk2dSpriteDefinition def = frame.spriteCollection.spriteDefinitions[frame.spriteId];
                if (def != null && !affected.Contains(def))
                {
                    def.MakeOffset(offsets[1][index]);
                    affected.Add(def);
                }
                index++;
            }
            index = 0;
            foreach (tk2dSpriteAnimationFrame frame in gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.reloadAnimation).frames)
            {
                tk2dSpriteDefinition def = frame.spriteCollection.spriteDefinitions[frame.spriteId];
                if (def != null && !affected.Contains(def))
                {
                    def.MakeOffset(offsets[2][index]);
                    affected.Add(def);
                }
                index++;
            }
            AdvancedHoveringGunSynergyProcessor processor = gun.gameObject.AddComponent <AdvancedHoveringGunSynergyProcessor>();

            processor.RequiredSynergy              = "#LOW-QUALITY_HELP";
            processor.TargetGunID                  = 38;
            processor.UsesMultipleGuns             = false;
            processor.PositionType                 = HoveringGunController.HoverPosition.CIRCULATE;
            processor.AimType                      = HoveringGunController.AimType.PLAYER_AIM;
            processor.FireType                     = HoveringGunController.FireType.ON_RELOAD;
            processor.FireCooldown                 = 0.2f;
            processor.FireDuration                 = 0f;
            processor.OnlyOnEmptyReload            = false;
            processor.ShootAudioEvent              = "";
            processor.OnEveryShotAudioEvent        = "";
            processor.FinishedShootingAudioEvent   = "";
            processor.Trigger                      = AdvancedHoveringGunSynergyProcessor.TriggerStyle.CONSTANT;
            processor.NumToTrigger                 = 1;
            processor.TriggerDuration              = 0f;
            processor.ConsumesTargetGunAmmo        = false;
            processor.ChanceToConsumeTargetGunAmmo = 0f;
        }