Exemple #1
0
        private void cold(Projectile arg1, SpeculativeRigidbody arg2, bool arg3)
        {
            PlayerController player = (GameManager.Instance.PrimaryPlayer);
            //FIX FIRE EFFECT
            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 Freezzecomponent = PickupObjectDatabase.GetById(278).GetComponent <BulletStatusEffectItem>();
                    GameActorFreezeEffect  gameActorFreeze  = Freezzecomponent.FreezeModifierEffect;
                    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(gameActorFreeze, 1f, null);
                        }
                    }
                }
            }
        }
Exemple #2
0
        private void PostProcessBeamTick(BeamController beam, SpeculativeRigidbody spec, float tickRate)
        {
            GameActor gameActor = spec.gameActor;

            if (!gameActor)
            {
                return;
            }

            PlayerController player = this.Owner;

            if (player.CurrentGun.PickupObjectId == 40)
            {
                beam.projectile.baseData.damage *= 1.003f;
            }

            BulletStatusEffectItem frostbullets = PickupObjectDatabase.GetById(278).GetComponent <BulletStatusEffectItem>();
            GameActorFreezeEffect  frostfreeze  = frostbullets.FreezeModifierEffect;

            if (player.CurrentGun.PickupObjectId == 464)
            {
                if (UnityEngine.Random.value < BraveMathCollege.SliceProbability(1f, tickRate))
                {
                    gameActor.ApplyEffect(frostfreeze, 0.015f, null);
                }
            }
        }
        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);
                        }
                    }
                }
            }
        }
Exemple #4
0
        private void AuraAction(AIActor aiactor, float d)
        {
            BulletStatusEffectItem frostbullets = PickupObjectDatabase.GetById(278).GetComponent <BulletStatusEffectItem>();
            GameActorFreezeEffect  frostfreeze  = frostbullets.FreezeModifierEffect;

            if (aiactor != null && aiactor.healthHaver.CanCurrentlyBeKilled)
            {
                aiactor.ApplyEffect(frostfreeze, 0.04f, null);
            }
        }
Exemple #5
0
 protected void FreezeAll(AIActor target)
 {
     if (target != null)
     {
         if (target != null && target.healthHaver.CanCurrentlyBeKilled)
         {
             BulletStatusEffectItem frostbullets = PickupObjectDatabase.GetById(278).GetComponent <BulletStatusEffectItem>();
             GameActorFreezeEffect  frostfreeze  = frostbullets.FreezeModifierEffect;
             target.ApplyEffect(frostfreeze, 5f, null);
         }
     }
 }
Exemple #6
0
        private void HandleRigidbodyCollision(CollisionData rigidbodyCollision)
        {
            BulletStatusEffectItem frostbullets = PickupObjectDatabase.GetById(278).GetComponent <BulletStatusEffectItem>();
            GameActorFreezeEffect  frostfreeze  = frostbullets.FreezeModifierEffect;

            if (Owner && rigidbodyCollision.OtherRigidbody)
            {
                AIActor aiActor = rigidbodyCollision.OtherRigidbody.aiActor;
                if (aiActor != null && aiActor.healthHaver.CanCurrentlyBeKilled)
                {
                    aiActor.ApplyEffect(frostfreeze, 5f, null);
                }
            }
        }
Exemple #7
0
 private void AuraAction(AIActor aiactor, float d)
 {
     if (this.roshamboItem.fireMode)
     {
         BulletStatusEffectItem f = (BulletStatusEffectItem)PickupObjectDatabase.GetById(295);
         aiactor.ApplyEffect(f.FireModifierEffect, 1, null);
     }
     else if (this.roshamboItem.poisonMode)
     {
         BulletStatusEffectItem f = (BulletStatusEffectItem)PickupObjectDatabase.GetById(204);
         aiactor.ApplyEffect(f.HealthModifierEffect, 1, null);
     }
     else if (this.roshamboItem.electricMode)
     {
         aiactor.healthHaver.ApplyDamage(0.45f, Vector2.zero, "Electricity", CoreDamageTypes.Electric, DamageCategory.Normal, false, null, false);
     }
 }
Exemple #8
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);
                    }
                }
            }
        }
        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));
                            }
                        }
                    }
                }
            }
        }
Exemple #10
0
        // Token: 0x060002BE RID: 702 RVA: 0x00016414 File Offset: 0x00014614
        private void PostProcessProjectile(Projectile sourceProjectile, float effectChanceScalar)
        {
            bool flag = UnityEngine.Random.Range(0, 1) < this.chanceOfActivating * effectChanceScalar;

            if (flag)
            {
                bool appliesCharm = this.AppliesCharm;
                if (appliesCharm)
                {
                    BulletStatusEffectItem charmBullet = PickupObjectDatabase.GetById(527).GetComponent <BulletStatusEffectItem>();
                    sourceProjectile.statusEffectsToApply.Add(charmBullet.CharmModifierEffect);
                    sourceProjectile.AdjustPlayerProjectileTint(this.TintColor.WithAlpha(this.TintColor.a / 2f), this.TintPriority, 0f);
                }

                float num   = 0.2f;
                float num2  = num * effectChanceScalar;
                bool  flag3 = UnityEngine.Random.Range(0, 1) > num2;
                if (flag)
                {
                    sourceProjectile.OnHitEnemy += this.AddFearEffect;
                }
            }
        }
Exemple #11
0
            private IEnumerator fail()
            {
                isFiring = true;
                this.m_aiActor.MovementSpeed = 0;
                this.m_aiActor.aiAnimator.PlayUntilFinished("attack_right");
                bool BadCode = true;

                while (this.m_aiActor.aiAnimator.IsPlaying("attack_right"))
                {
                    if (this.m_aiActor.spriteAnimator.CurrentFrame == 4 && BadCode)
                    {
                        BadCode = false;
                        bool PlayerHasSynergy = false;
                        if (Owner)
                        {
                            PlayerHasSynergy = Owner.PlayerHasActiveSynergy("Robot Influence");
                        }
                        for (int counter = 0; counter < (PlayerHasSynergy ? 18 : 12); counter++)
                        {
                            Projectile projectile2 = ((Gun)ETGMod.Databases.Items[88]).DefaultModule.projectiles[0];
                            GameObject gameObject  = SpawnManager.SpawnProjectile(projectile2.gameObject, this.m_aiActor.sprite.WorldCenter, Quaternion.Euler(0f, 0f, ((PlayerHasSynergy ? 20 : 30) * counter)), true);
                            Projectile component   = gameObject.GetComponent <Projectile>();
                            if (component != null)
                            {
                                component.baseData.damage = 5;
                                component.Owner           = Owner;
                                component.Shooter         = Owner.specRigidbody;
                                Owner.DoPostProcessProjectile(component);

                                BulletStatusEffectItem batteryBullets = (BulletStatusEffectItem)PickupObjectDatabase.GetById(410);
                                CoreDamageTypes        damageType     = batteryBullets.DamageTypesToAdd;
                                if (batteryBullets.AddsDamageType)
                                {
                                    component.damageTypes |= damageType;
                                }

                                GameObject particles = batteryBullets.ParticlesToAdd;
                                if (particles)
                                {
                                    GameObject particleObject = SpawnManager.SpawnVFX(particles, true);
                                    particleObject.transform.parent        = component.transform;
                                    particleObject.transform.localPosition = new Vector3(0f, 0f, 0.5f);
                                    ParticleKiller particleComponent = particleObject.GetComponent <ParticleKiller>();
                                    if (particleComponent != null)
                                    {
                                        particleComponent.Awake();
                                    }
                                }
                            }
                        }
                    }
                    yield return(null);
                }
                isFiring = false;
                this.m_aiActor.MovementSpeed = 5;
                this.attackTimer             = this.TickDelay;
                if (Owner && Owner.PlayerHasActiveSynergy("If the robot's paid"))
                {
                    float Nuts = Mathf.Min((float)Owner.carriedConsumables.Currency / 150, 1);
                    this.attackTimer -= Nuts;
                }
                yield break;
            }
Exemple #12
0
            private void AuraAction(AIActor aiactor, float d)
            {
                BulletStatusEffectItem f = (BulletStatusEffectItem)PickupObjectDatabase.GetById(295);

                aiactor.ApplyEffect(f.FireModifierEffect, 1, null);
            }