Example #1
0
        protected override void DoEffect(PlayerController user)
        {
            List <AIActor> activeEnemies = base.LastOwner.CurrentRoom.GetActiveEnemies(RoomHandler.ActiveEnemyType.All);

            if (activeEnemies != null)
            {
                AkSoundEngine.PostEvent("Play_OBJ_lock_unlock_01", base.gameObject);
                BulletStatusEffectItem Freezecomponent      = PickupObjectDatabase.GetById(278).GetComponent <BulletStatusEffectItem>();
                GameActorFreezeEffect  freezeModifierEffect = Freezecomponent.FreezeModifierEffect;
                int count = activeEnemies.Count;
                for (int i = 0; i < count; i++)
                {
                    if (activeEnemies[i] && activeEnemies[i].HasBeenEngaged && activeEnemies[i].healthHaver && activeEnemies[i].IsNormalEnemy && !activeEnemies[i].healthHaver.IsDead && !activeEnemies[i].healthHaver.IsBoss && !activeEnemies[i].IsTransmogrified)
                    {
                        activeEnemies[i].ApplyEffect(freezeModifierEffect, 10f, null);
                    }
                }
                bool synergy = user.PlayerHasActiveSynergy("The Flames' Embrace");
                if (synergy)
                {
                    BulletStatusEffectItem Firecomponent = PickupObjectDatabase.GetById(295).GetComponent <BulletStatusEffectItem>();
                    GameActorFireEffect    gameActorFire = Firecomponent.FireModifierEffect;
                    int count1 = activeEnemies.Count;
                    for (int i = 0; i < count1; i++)
                    {
                        if (activeEnemies[i] && activeEnemies[i].HasBeenEngaged && activeEnemies[i].healthHaver && activeEnemies[i].IsNormalEnemy && !activeEnemies[i].healthHaver.IsDead && !activeEnemies[i].healthHaver.IsBoss && !activeEnemies[i].IsTransmogrified)
                        {
                            activeEnemies[i].ApplyEffect(gameActorFire, 10f, null);
                        }
                    }
                }
            }
        }
        public static GameActorFireEffect GenerateFireEffect(float dps = 3, bool damagesEnemies = true, float duration = 4)
        {
            GameActorFireEffect customFire = new GameActorFireEffect
            {
                duration                 = duration,
                TintColor                = StaticStatusEffects.hotLeadEffect.TintColor,
                DeathTintColor           = StaticStatusEffects.hotLeadEffect.DeathTintColor,
                effectIdentifier         = StaticStatusEffects.hotLeadEffect.effectIdentifier,
                AppliesTint              = true,
                AppliesDeathTint         = true,
                resistanceType           = EffectResistanceType.Fire,
                DamagePerSecondToEnemies = dps,
                ignitesGoops             = true,

                //Eh
                OverheadVFX        = StaticStatusEffects.hotLeadEffect.OverheadVFX,
                AffectsEnemies     = damagesEnemies,
                AffectsPlayers     = StaticStatusEffects.hotLeadEffect.AffectsPlayers,
                AppliesOutlineTint = StaticStatusEffects.hotLeadEffect.AppliesOutlineTint,
                OutlineTintColor   = StaticStatusEffects.hotLeadEffect.OutlineTintColor,
                PlaysVFXOnActor    = StaticStatusEffects.hotLeadEffect.PlaysVFXOnActor,

                FlameVfx              = StaticStatusEffects.hotLeadEffect.FlameVfx,
                flameBuffer           = StaticStatusEffects.hotLeadEffect.flameBuffer,
                flameFpsVariation     = StaticStatusEffects.hotLeadEffect.flameFpsVariation,
                flameMoveChance       = StaticStatusEffects.hotLeadEffect.flameMoveChance,
                flameNumPerSquareUnit = StaticStatusEffects.hotLeadEffect.flameNumPerSquareUnit,
                maxStackedDuration    = StaticStatusEffects.hotLeadEffect.maxStackedDuration,
                stackMode             = StaticStatusEffects.hotLeadEffect.stackMode,
                IsGreenFire           = StaticStatusEffects.hotLeadEffect.IsGreenFire,
            };

            return(customFire);
        }
Example #3
0
        private void Flares(Projectile projectile)
        {
            float            d      = 0;
            PlayerController player = gun.CurrentOwner as PlayerController;

            for (int i = 0; i < 4; i++)
            {
                Projectile projectile2 = ((Gun)ETGMod.Databases.Items[275]).DefaultModule.projectiles[0];
                GameObject gameObject  = SpawnManager.SpawnProjectile(projectile2.gameObject, projectile.sprite.WorldCenter, Quaternion.Euler(0f, 0f, d), true);
                Projectile component   = gameObject.GetComponent <Projectile>();
                if (component != null)
                {
                    component.Owner = player;
                    HomingModifier homingModifier = component.gameObject.AddComponent <HomingModifier>();
                    homingModifier.HomingRadius    = 100f;
                    homingModifier.AngularVelocity = 500f;
                    component.Shooter                   = player.specRigidbody;
                    component.baseData.speed            = 20f;
                    component.baseData.damage           = 2.5f;
                    component.AdditionalScaleMultiplier = .3120069f;
                    GameActorFireEffect fire = component.fireEffect;
                    fire.duration = .5f;
                }
                d += 90f;
            }
            d = 0;
        }
Example #4
0
        // Token: 0x060002BC RID: 700 RVA: 0x00016370 File Offset: 0x00014570
        public override void Pickup(PlayerController player)
        {
            bool pickedUp = this.m_pickedUp;

            if (!pickedUp)
            {
                base.Pickup(player);
                player.PostProcessProjectile += this.PostProcessProjectile;
                player.PostProcessBeam       += this.PostProcessBeam;
                player.PostProcessBeamTick   += this.PostProcessBeamTick;

                GameActorFireEffect fireModifierEffect = new GameActorFireEffect
                {
                    IsGreenFire              = false,
                    AffectsEnemies           = true,
                    DamagePerSecondToEnemies = 50f
                };
                this.chanceOfActivating      = 0.01f;
                this.chanceFromBeamPerSecond = 0.08f;
                this.TintColor             = new Color(0f, 0f, 0f);
                this.TintPriority          = 5;
                this.FreezeAmountPerDamage = 1f;
                this.TintBeams             = true;
                this.FireModifierEffect    = fireModifierEffect;
                this.quality = PickupObject.ItemQuality.S;
                this.sprite.IsPerpendicular = true;
            }
        }
Example #5
0
        // Token: 0x060002BB RID: 699 RVA: 0x00016278 File Offset: 0x00014478
        public static void Init()
        {
            string        name          = "Kingly Bullets";
            string        resourcePath  = "CakeMod/Resources/KinglyBullets";
            GameObject    gameObject    = new GameObject(name);
            KinglyBullets KinglyBullets = gameObject.AddComponent <KinglyBullets>();

            ItemBuilder.AddSpriteToObject(name, resourcePath, gameObject);
            string shortDesc = "Checker Dance";
            string longDesc  = "Shots are imbued with wrathful flame.\n\nYour bullets are burnt by it's power.";

            KinglyBullets.SetupItem(shortDesc, longDesc, "cak");
            KinglyBullets.AddPassiveStatModifier(PlayerStats.StatType.Curse, 2f, StatModifier.ModifyMethod.ADDITIVE);
            KinglyBullets.AppliesFire = true;
            KinglyBullets.AddToSubShop(ItemBuilder.ShopType.Cursula, 1f);
            GameActorFireEffect fireModifierEffect = new GameActorFireEffect
            {
                IsGreenFire              = false,
                AffectsEnemies           = true,
                DamagePerSecondToEnemies = 20f
            };

            KinglyBullets.chanceOfActivating      = 0.15f;
            KinglyBullets.chanceFromBeamPerSecond = 0.08f;
            KinglyBullets.TintColor             = new Color(2f, 0.5f, 1f);
            KinglyBullets.TintPriority          = 5;
            KinglyBullets.FreezeAmountPerDamage = 1f;
            KinglyBullets.TintBeams             = true;
            KinglyBullets.FireModifierEffect    = fireModifierEffect;
            KinglyBullets.quality = PickupObject.ItemQuality.EXCLUDED;
            KinglyBullets.sprite.IsPerpendicular = true;
        }
 public override void EffectTick(GameActor actor, RuntimeGameActorEffectData effectData)
 {
     base.EffectTick(actor, effectData);
     if (GameManager.Options.ShaderQuality == GameOptions.GenericHighMedLowOption.HIGH && effectData.actor && effectData.actor.specRigidbody.HitboxPixelCollider != null)
     {
         Vector2 unitBottomLeft = effectData.actor.specRigidbody.HitboxPixelCollider.UnitBottomLeft;
         Vector2 unitTopRight   = effectData.actor.specRigidbody.HitboxPixelCollider.UnitTopRight;
         this.m_emberCounter += 30f * BraveTime.DeltaTime;
         if (this.m_emberCounter > 1f)
         {
             int num = Mathf.FloorToInt(this.m_emberCounter);
             this.m_emberCounter -= (float)num;
             GlobalSparksDoer.DoRandomParticleBurst(num, unitBottomLeft, unitTopRight, new Vector3(1f, 1f, 0f), 120f, 0.75f, null, null, null, GlobalSparksDoer.SparksType.BLACK_PHANTOM_SMOKE);
         }
     }
     if (actor && actor.specRigidbody)
     {
         Vector2 unitDimensions = actor.specRigidbody.HitboxPixelCollider.UnitDimensions;
         Vector2 a    = unitDimensions / 2f;
         int     num2 = Mathf.RoundToInt((float)this.flameNumPerSquareUnit * 0.5f * Mathf.Min(30f, Mathf.Min(new float[]
         {
             unitDimensions.x *unitDimensions.y
         })));
         this.m_particleTimer += BraveTime.DeltaTime * (float)num2;
         if (this.m_particleTimer > 1f)
         {
             int           num3          = Mathf.FloorToInt(this.m_particleTimer);
             Vector2       vector        = actor.specRigidbody.HitboxPixelCollider.UnitBottomLeft;
             Vector2       vector2       = actor.specRigidbody.HitboxPixelCollider.UnitTopRight;
             PixelCollider pixelCollider = actor.specRigidbody.GetPixelCollider(ColliderType.Ground);
             if (pixelCollider != null && pixelCollider.ColliderGenerationMode == PixelCollider.PixelColliderGeneration.Manual)
             {
                 vector  = Vector2.Min(vector, pixelCollider.UnitBottomLeft);
                 vector2 = Vector2.Max(vector2, pixelCollider.UnitTopRight);
             }
             vector    += Vector2.Min(a * 0.15f, new Vector2(0.25f, 0.25f));
             vector2   -= Vector2.Min(a * 0.15f, new Vector2(0.25f, 0.25f));
             vector2.y -= Mathf.Min(a.y * 0.1f, 0.1f);
             GlobalSparksDoer.DoRandomParticleBurst(num3, vector, vector2, Vector3.zero, 0f, 0f, null, null, null, GlobalSparksDoer.SparksType.BLACK_PHANTOM_SMOKE);
             this.m_particleTimer -= Mathf.Floor(this.m_particleTimer);
         }
     }
     if (actor.IsGone)
     {
         effectData.elapsed = 10000f;
     }
     if ((actor.IsFalling || actor.IsGone) && effectData.vfxObjects != null && effectData.vfxObjects.Count > 0)
     {
         GameActorFireEffect.DestroyFlames(effectData);
     }
 }
Example #7
0
        public static void Init()
        {
            string itemName     = "Imp's Horn";
            string resourceName = "Items/Resources/imps_horn.png";

            GameObject obj = new GameObject(itemName);

            var item = obj.AddComponent <ImpsHorn>();

            ItemBuilder.AddSpriteToObject(itemName, resourceName, obj);

            string shortDesc = "Don't Die Above Lava!";
            string longDesc  = "Shots inflict green fire.\n\n" +
                               "From the corpse of one of Bullet Hell's denizens, this horn still retains some of its magical energy.";


            ItemBuilder.SetupItem(item, shortDesc, longDesc, "cel");


            ItemBuilder.AddPassiveStatModifier(item, PlayerStats.StatType.Curse, 1);

            item.AppliesFire = true;
            item.AddToSubShop(ItemBuilder.ShopType.Cursula);



            var effect = new GameActorFireEffect()
            {
                IsGreenFire              = true,
                AffectsEnemies           = true,
                DamagePerSecondToEnemies = 10f,
            };



            item.chanceOfActivating      = .08f;
            item.chanceFromBeamPerSecond = .08f;
            item.TintPriority            = 5;
            item.FreezeAmountPerDamage   = 1f;
            item.TintBeams = true;


            item.FireModifierEffect = effect;

            item.quality = PickupObject.ItemQuality.B;
            item.sprite.IsPerpendicular = true;
        }
Example #8
0
        public static void DoRadialIgnite(GameActorFireEffect fire, Vector3 position, float radius, VFXPool hitVFX = null)
        {
            List <HealthHaver> allHealthHavers = StaticReferenceManager.AllHealthHavers;

            if (allHealthHavers != null)
            {
                float num = radius * radius;
                for (int i = 0; i < allHealthHavers.Count; i++)
                {
                    HealthHaver healthHaver = allHealthHavers[i];
                    if (healthHaver)
                    {
                        if (healthHaver.gameObject.activeSelf)
                        {
                            if (healthHaver.aiActor)
                            {
                                AIActor aiActor = healthHaver.aiActor;
                                if (!aiActor.IsGone)
                                {
                                    if (aiActor.isActiveAndEnabled)
                                    {
                                        if ((aiActor.CenterPosition - position.XY()).sqrMagnitude <= num)
                                        {
                                            aiActor.ApplyEffect(fire, 1f, null);
                                            if (hitVFX != null)
                                            {
                                                if (aiActor.specRigidbody.HitboxPixelCollider != null)
                                                {
                                                    PixelCollider pixelCollider = aiActor.specRigidbody.GetPixelCollider(ColliderType.HitBox);
                                                    Vector2       v             = BraveMathCollege.ClosestPointOnRectangle(position, pixelCollider.UnitBottomLeft, pixelCollider.UnitDimensions);
                                                    hitVFX.SpawnAtPosition(v, 0f, null, null, null, null, false, null, null, false);
                                                }
                                                else
                                                {
                                                    hitVFX.SpawnAtPosition(aiActor.CenterPosition, 0f, null, null, null, null, false, null, null, false);
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
Example #9
0
        protected override void Update()
        {
            base.Update();
            List <AIActor> activeEnemies  = base.Owner.CurrentRoom.GetActiveEnemies(RoomHandler.ActiveEnemyType.All);
            Vector2        centerPosition = base.Owner.CenterPosition;

            foreach (AIActor aiactor in activeEnemies)
            {
                BulletStatusEffectItem Firecomponent = PickupObjectDatabase.GetById(295).GetComponent <BulletStatusEffectItem>();
                GameActorFireEffect    gameActorFire = Firecomponent.FireModifierEffect;
                bool flag3 = Vector2.Distance(aiactor.CenterPosition, centerPosition) < 4f && aiactor.healthHaver.GetMaxHealth() > 0f && aiactor != null && aiactor.specRigidbody != null && base.Owner != null;
                bool flag4 = flag3;
                if (flag4)
                {
                    {
                        aiactor.ApplyEffect(gameActorFire, 1f, null);
                    }
                }
            }
        }
Example #10
0
        private void somethingrelatedtojammed(PlayerController player, Gun playerGun)
        {
            bool flag = playerGun.ClipShotsRemaining == 0;

            if (flag)
            {
                bool flagA = player.PlayerHasActiveSynergy("Reunion");
                if (flagA)
                {
                    List <AIActor> activeEnemies = base.Owner.CurrentRoom.GetActiveEnemies(RoomHandler.ActiveEnemyType.All);
                    if (activeEnemies != null)
                    {
                        BulletStatusEffectItem Firecomponent = PickupObjectDatabase.GetById(295).GetComponent <BulletStatusEffectItem>();
                        GameActorFireEffect    gameActorFire = Firecomponent.FireModifierEffect;
                        int count1 = activeEnemies.Count;
                        for (int i = 0; i < count1; i++)
                        {
                            if (activeEnemies[i] && activeEnemies[i].HasBeenEngaged && activeEnemies[i].healthHaver && activeEnemies[i].IsNormalEnemy && !activeEnemies[i].healthHaver.IsDead && !activeEnemies[i].healthHaver.IsBoss && !activeEnemies[i].IsTransmogrified)
                            {
                                activeEnemies[i].ApplyEffect(gameActorFire, 10f, null);
                            }
                        }
                    }
                }
                else
                {
                    List <AIActor> activeEnemies = player.CurrentRoom.GetActiveEnemies(RoomHandler.ActiveEnemyType.All);
                    if (activeEnemies != null)
                    {
                        int count = activeEnemies.Count;
                        for (int i = 0; i < count; i++)
                        {
                            if (activeEnemies[i] && activeEnemies[i].HasBeenEngaged && activeEnemies[i].healthHaver && activeEnemies[i].IsNormalEnemy && !activeEnemies[i].healthHaver.IsDead && !activeEnemies[i].healthHaver.IsBoss && !activeEnemies[i].IsTransmogrified && activeEnemies[i].IsBlackPhantom)
                            {
                                GameManager.Instance.StartCoroutine(this.Heatfuck(player));
                            }
                        }
                    }
                }
            }
        }
Example #11
0
 private void OnHitEnemy(Projectile arg1, SpeculativeRigidbody arg2, bool arg3)
 {
     if (bighead2 == 6)
     {
         base.StartCoroutine(this.HandleFear(gun.CurrentOwner as PlayerController, arg2));
     }
     if (bighead2 == 5)
     {
         GameActorHealthEffect irradiatedLeadEffect = PickupObjectDatabase.GetById(204).GetComponent <BulletStatusEffectItem>().HealthModifierEffect;
         arg2.aiActor.ApplyEffect(irradiatedLeadEffect, 2f, arg1);
     }
     if (bighead2 == 2)
     {
         GameActorFireEffect hotLeadEffect = PickupObjectDatabase.GetById(295).GetComponent <BulletStatusEffectItem>().FireModifierEffect;
         arg2.aiActor.ApplyEffect(hotLeadEffect, 2f, arg1);
     }
     if (bighead2 == 1)
     {
         arg2.aiActor.healthHaver.ApplyDamage(1f * (gun.CurrentOwner as PlayerController).stats.GetStatValue(PlayerStats.StatType.Damage), Vector2.zero, "Erasure", CoreDamageTypes.None, DamageCategory.Normal, true, null, false);
         GlobalSparksDoer.DoRadialParticleBurst(50, arg2.specRigidbody.HitboxPixelCollider.UnitCenter, arg2.specRigidbody.HitboxPixelCollider.UnitCenter, 90f, 2f, 0f, null, null, Color.red, GlobalSparksDoer.SparksType.BLOODY_BLOOD);
     }
     if (bighead2 == 3)
     {
         arg2.aiActor.ApplyEffect(this.cheeseEffect, 3f, null);
     }
     if (bighead2 == 7)
     {
         GameActorCharmEffect charmingRoundsEffect = PickupObjectDatabase.GetById(527).GetComponent <BulletStatusEffectItem>().CharmModifierEffect;
         arg2.aiActor.ApplyEffect(charmingRoundsEffect, 3f, null);
     }
     if (bighead2 == 4)
     {
         GameActorFreezeEffect frostBulletsEffect = PickupObjectDatabase.GetById(278).GetComponent <BulletStatusEffectItem>().FreezeModifierEffect;
         arg2.aiActor.ApplyEffect(frostBulletsEffect, 3f, null);
     }
     if (bighead2 == 8)
     {
         GameActorSpeedEffect tripleCrossbowSlowEffect = (PickupObjectDatabase.GetById(381) as Gun).DefaultModule.projectiles[0].speedEffect;
         arg2.aiActor.ApplyEffect(tripleCrossbowSlowEffect, 3f, null);
     }
 }
Example #12
0
        private IEnumerator HandleHeatEffectsCR(float Radius, float Duration, GameActorFireEffect HeatEffect, tk2dBaseSprite Psprite)
        {
            Psprite = Owner.sprite;
            this.HandleRadialIndicator(TRadius, Psprite);
            float                   elapsed     = 0f;
            RoomHandler             r           = Psprite.transform.position.GetAbsoluteRoom();
            Vector3                 tableCenter = Psprite.WorldCenter.ToVector3ZisY(0f);
            Action <AIActor, float> AuraAction  = delegate(AIActor actor, float dist)
            {
                actor.ApplyEffect(THeatEffect, 1f, null);
            };

            while (elapsed < TDuration)
            {
                elapsed += BraveTime.DeltaTime;
                r.ApplyActionToNearbyEnemies(tableCenter.XY(), TRadius, AuraAction);
                yield return(null);
            }
            this.UnhandleRadialIndicator();
            yield break;
        }
Example #13
0
        private void fire(Projectile arg1, SpeculativeRigidbody arg2, bool arg3)
        {
            PlayerController player     = (GameManager.Instance.PrimaryPlayer);
            bool             isInCombat = player.IsInCombat;

            if (isInCombat)
            {
                List <AIActor> activeEnemies  = player.CurrentRoom.GetActiveEnemies(RoomHandler.ActiveEnemyType.All);
                Vector2        centerPosition = arg1.sprite.WorldCenter;
                foreach (AIActor aiactor in activeEnemies)
                {
                    BulletStatusEffectItem Firecomponent = PickupObjectDatabase.GetById(295).GetComponent <BulletStatusEffectItem>();
                    GameActorFireEffect    gameActorFire = Firecomponent.FireModifierEffect;
                    bool flag3 = Vector2.Distance(aiactor.CenterPosition, centerPosition) < 3f && aiactor.healthHaver.GetMaxHealth() > 0f && aiactor != null && aiactor.specRigidbody != null && player != null;
                    bool flag4 = flag3;
                    if (flag4)
                    {
                        {
                            aiactor.ApplyEffect(gameActorFire, 1f, null);
                        }
                    }
                }
            }
        }
Example #14
0
        // Token: 0x0600017E RID: 382 RVA: 0x00013C60 File Offset: 0x00011E60
        public static GameActorFireEffect CopyFireFrom(this GameActorFireEffect self, GameActorFireEffect other)
        {
            bool flag = self == null;

            if (flag)
            {
                self = new GameActorFireEffect();
            }
            bool flag2 = other == null;
            GameActorFireEffect result;

            if (flag2)
            {
                result = self;
            }
            else
            {
                self          = (GameActorFireEffect)self.CopyEffectFrom(other);
                self.FlameVfx = new List <GameObject>();
                foreach (GameObject item in other.FlameVfx)
                {
                    self.FlameVfx.Add(item);
                }
                self.flameNumPerSquareUnit = other.flameNumPerSquareUnit;
                self.flameBuffer           = new Vector2
                {
                    x = other.flameBuffer.x,
                    y = other.flameBuffer.y
                };
                self.flameFpsVariation = other.flameFpsVariation;
                self.flameMoveChance   = other.flameMoveChance;
                self.IsGreenFire       = other.IsGreenFire;
                result = self;
            }
            return(result);
        }
 public override void OnEffectRemoved(GameActor actor, RuntimeGameActorEffectData effectData)
 {
     base.OnEffectRemoved(actor, effectData);
     actor.healthHaver.OnPreDeath -= effectData.OnActorPreDeath;
     GameActorFireEffect.DestroyFlames(effectData);
 }