Esempio n. 1
0
 // Token: 0x0600013D RID: 317 RVA: 0x0000DF55 File Offset: 0x0000C155
 public override void Pickup(PlayerController player)
 {
     base.Pickup(player);
     Honkhorn.fleeData               = new FleePlayerData();
     Honkhorn.fleeData.Player        = player;
     Honkhorn.fleeData.StartDistance = 100f;
 }
Esempio n. 2
0
            private void HandleFear(PlayerController user, bool active)
            {
                RoomHandler room = user.CurrentRoom;

                if (!room.HasActiveEnemies(RoomHandler.ActiveEnemyType.All))
                {
                    return;
                }

                if (active)
                {
                    foreach (var enemy in room.GetActiveEnemies(RoomHandler.ActiveEnemyType.All))
                    {
                        if (enemy.behaviorSpeculator != null)
                        {
                            enemy.behaviorSpeculator.FleePlayerData = this.fleeData;
                            FleePlayerData fleePlayerData = new FleePlayerData();
                        }
                    }
                }
                else
                {
                    foreach (var enemy in room.GetActiveEnemies(RoomHandler.ActiveEnemyType.All))
                    {
                        if (enemy.behaviorSpeculator != null && enemy.behaviorSpeculator.FleePlayerData != null)
                        {
                            enemy.behaviorSpeculator.FleePlayerData.Player = null;
                        }
                    }
                }
            }
Esempio n. 3
0
        private void HandleFear(PlayerController user, bool active)
        {
            RoomHandler currentRoom = user.CurrentRoom;
            bool        flag        = !currentRoom.HasActiveEnemies(RoomHandler.ActiveEnemyType.All);

            if (!flag)
            {
                if (active)
                {
                    foreach (AIActor aiactor in currentRoom.GetActiveEnemies(RoomHandler.ActiveEnemyType.All))
                    {
                        bool flag2 = aiactor.behaviorSpeculator != null;
                        if (flag2)
                        {
                            aiactor.behaviorSpeculator.FleePlayerData = this.fleeData;
                            FleePlayerData fleePlayerData = new FleePlayerData();
                        }
                    }
                }
                else
                {
                    foreach (AIActor aiactor2 in currentRoom.GetActiveEnemies(RoomHandler.ActiveEnemyType.All))
                    {
                        bool flag3 = aiactor2.behaviorSpeculator != null && aiactor2.behaviorSpeculator.FleePlayerData != null;
                        if (flag3)
                        {
                            aiactor2.behaviorSpeculator.FleePlayerData.Player = null;
                        }
                    }
                }
            }
        }
Esempio n. 4
0
 public override void Pickup(PlayerController player)
 {
     base.Pickup(player);
     if (fleeData == null || fleeData.Player != player)
     {
         fleeData               = new FleePlayerData();
         fleeData.Player        = player;
         fleeData.StartDistance = 100f;
     }
 }
Esempio n. 5
0
 protected override void DoEffect(PlayerController user)
 {
     if (fleeData == null || fleeData.Player != user)
     {
         fleeData                = new FleePlayerData();
         fleeData.Player         = user;
         fleeData.StartDistance *= 2;
     }
     user.PlayEffectOnActor(ResourceCache.Acquire("Global VFX/VFX_Curse") as GameObject, Vector3.zero, true, false, false);
     StartCoroutine(this.HandleDuration(user));
 }
 protected override void Update()
 {
     //fear effect on getting 3 quick kills
     if (recent_kills >= 3)
     {
         RoomHandler currentRoom = this.Owner.CurrentRoom;
         foreach (AIActor aiactor in currentRoom.GetActiveEnemies(RoomHandler.ActiveEnemyType.All))
         {
             aiactor.behaviorSpeculator.FleePlayerData = War_paint.fleeData;
             FleePlayerData fleePlayerData = new FleePlayerData();
             GameManager.Instance.StartCoroutine(War_paint.RemoveFear(aiactor));
         }
     }
 }
Esempio n. 7
0
        protected override void Update()
        {
            RoomHandler currentRoom = this.Owner.CurrentRoom;

            foreach (AIActor aiactor in currentRoom.GetActiveEnemies(RoomHandler.ActiveEnemyType.All))
            {
                if (aiactor.sprite.renderer.material.shader == ShaderCache.Acquire("Brave/Internal/GlitchUnlit"))
                {
                    aiactor.behaviorSpeculator.FleePlayerData = Malware.fleeData;
                    FleePlayerData fleePlayerData = new FleePlayerData();
                    GameManager.Instance.StartCoroutine(Malware.RemoveFear(aiactor));
                }
            }
            base.Update();
        }
 protected override void Update()
 {
     if (this.m_pickedUp && !GameManager.Instance.IsLoadingLevel && this.m_owner != null && this.Owner.Velocity.magnitude == 0 && !this.m_owner.IsFalling && this.m_owner.healthHaver && !this.m_owner.healthHaver.IsDead)
     {
         RoomHandler currentRoom = this.Owner.CurrentRoom;
         foreach (AIActor aiactor in currentRoom.GetActiveEnemies(RoomHandler.ActiveEnemyType.All))
         {
             bool flag3 = aiactor.behaviorSpeculator != null;
             if (flag3)
             {
                 aiactor.behaviorSpeculator.FleePlayerData = menacing_aura.fleeData;
                 FleePlayerData fleePlayerData = new FleePlayerData();
                 GameManager.Instance.StartCoroutine(menacing_aura.RemoveFear(aiactor));
             }
         }
     }
 }
        private IEnumerator HandleFear(PlayerController user, SpeculativeRigidbody enemy)
        {
            if (this.fleeData == null || this.fleeData.Player != Owner)
            {
                this.fleeData                = new FleePlayerData();
                this.fleeData.Player         = Owner;
                this.fleeData.StartDistance *= 2f;
            }
            if (enemy.aiActor.behaviorSpeculator != null)
            {
                enemy.aiActor.behaviorSpeculator.FleePlayerData = this.fleeData;
                FleePlayerData fleePlayerData = new FleePlayerData();
                yield return(new WaitForSeconds(7f));

                enemy.aiActor.behaviorSpeculator.FleePlayerData.Player = null;
            }
        }
Esempio n. 10
0
 public override void PostProcessProjectile(Projectile projectile)
 {
     PlayerController playerController = this.gun.CurrentOwner as PlayerController;
     {
         bool flag2 = this.Index == 1 || this.Index > 1;
         if (flag2)
         {
             projectile.sprite.renderer.enabled = true;
             projectile.baseData.damage         = 50f * playerController.stats.GetStatValue(PlayerStats.StatType.Damage);
             projectile.baseData.range          = 1000f;
             bool flagA = playerController.PlayerHasActiveSynergy("Pattersons Warning");
             if (flagA)
             {
                 projectile.OnHitEnemy += (Action <Projectile, SpeculativeRigidbody, bool>)Delegate.Combine(projectile.OnHitEnemy, new Action <Projectile, SpeculativeRigidbody, bool>(this.baboomer));
             }
         }
         bool flag3 = this.Index != this.LoadedShot && this.Index < 1;
         if (flag3)
         {
             //gun.ammo += 1;
             projectile.hitEffects.suppressMidairDeathVfx = true;
             projectile.baseData.range          = 1E-05f;
             projectile.baseData.damage         = 0f;
             projectile.sprite.renderer.enabled = false;
             bool flagA = playerController.PlayerHasActiveSynergy("Fear The Finale");
             if (flagA)
             {
                 RoomHandler currentRoom = playerController.CurrentRoom;
                 bool        a           = currentRoom.HasActiveEnemies(RoomHandler.ActiveEnemyType.All);
                 if (a)
                 {
                     foreach (AIActor aiactor in currentRoom.GetActiveEnemies(RoomHandler.ActiveEnemyType.All))
                     {
                         bool r = aiactor.behaviorSpeculator != null;
                         if (r)
                         {
                             aiactor.behaviorSpeculator.FleePlayerData = WarningShot.fleeData;
                             FleePlayerData fleePlayerData = new FleePlayerData();
                             GameManager.Instance.StartCoroutine(WarningShot.scare(aiactor));
                         }
                     }
                 }
             }
         }
     }
 }
Esempio n. 11
0
        private void Ohfuckitstheslayer()
        {
            RoomHandler currentRoom = Owner.CurrentRoom;
            bool        flag2       = currentRoom.HasActiveEnemies(RoomHandler.ActiveEnemyType.All);

            if (flag2)
            {
                foreach (AIActor aiactor in currentRoom.GetActiveEnemies(RoomHandler.ActiveEnemyType.All))
                {
                    bool flag3 = aiactor.behaviorSpeculator != null;
                    if (flag3)
                    {
                        aiactor.behaviorSpeculator.FleePlayerData = GunslayerHelmet.fleeData;
                        FleePlayerData fleePlayerData = new FleePlayerData();
                        GameManager.Instance.StartCoroutine(GunslayerHelmet.ohshitthatsnottheslayer(aiactor));
                    }
                }
            }
        }
Esempio n. 12
0
            public void FixedUpdate(PlayerController user)
            {
                if (user.CurrentInputState == PlayerInputState.NoMovement)
                {
                    HandleFear(user, true);
                }
                else
                {
                    HandleFear(user, false);
                }


                if (fleeData == null || fleeData.Player != user)
                {
                    fleeData                = new FleePlayerData();
                    fleeData.Player         = user;
                    fleeData.StartDistance *= 2;
                }
                FixedUpdate(user);
            }
Esempio n. 13
0
        // Token: 0x0600013E RID: 318 RVA: 0x0000DF60 File Offset: 0x0000C160F
        protected override void DoEffect(PlayerController user)
        {
            AkSoundEngine.PostEvent("Play_OBJ_charmhorn_use_01", base.gameObject);
            RoomHandler currentRoom = user.CurrentRoom;
            bool        flag        = currentRoom.HasActiveEnemies(RoomHandler.ActiveEnemyType.All);
            bool        flag2       = flag;

            if (flag2)
            {
                foreach (AIActor aiactor in currentRoom.GetActiveEnemies(RoomHandler.ActiveEnemyType.All))
                {
                    bool flag3 = aiactor.behaviorSpeculator != null;
                    if (flag3)
                    {
                        aiactor.behaviorSpeculator.FleePlayerData = Honkhorn.fleeData;
                        FleePlayerData fleePlayerData = new FleePlayerData();
                        GameManager.Instance.StartCoroutine(Honkhorn.ohshitthatsnottheslayer(aiactor));
                    }
                }
            }
        }
Esempio n. 14
0
        public void BlankModHook(Action <SilencerInstance, BlankModificationItem, Vector2, PlayerController> orig, SilencerInstance silencer, BlankModificationItem bmi, Vector2 centerPoint, PlayerController user)
        {
            orig(silencer, bmi, centerPoint, user);

            if (user.HasPickupID(WickerAmmoletID))
            {
                //AkSoundEngine.PostEvent("Play_ENM_bombshee_scream_01", Owner.gameObject);
                RoomHandler currentRoom = user.CurrentRoom;
                if (currentRoom.HasActiveEnemies(RoomHandler.ActiveEnemyType.All))
                {
                    foreach (AIActor aiactor in currentRoom.GetActiveEnemies(RoomHandler.ActiveEnemyType.All))
                    {
                        if (aiactor.behaviorSpeculator != null)
                        {
                            aiactor.behaviorSpeculator.FleePlayerData = fleeData;
                            FleePlayerData fleePlayerData = new FleePlayerData();
                            GameManager.Instance.StartCoroutine(WickerAmmolet.RemoveFear(aiactor));
                        }
                    }
                }
            }
        }
Esempio n. 15
0
        private IEnumerator HandleFear(PlayerController user, SpeculativeRigidbody enemy)
        {
            bool flag = this.fleeData == null || this.fleeData.Player != base.Owner;

            if (flag)
            {
                this.fleeData                = new FleePlayerData();
                this.fleeData.Player         = base.Owner;
                this.fleeData.StartDistance *= 2f;
            }
            bool flag2 = enemy.aiActor.behaviorSpeculator != null;

            if (flag2)
            {
                enemy.aiActor.behaviorSpeculator.FleePlayerData = this.fleeData;
                FleePlayerData fleePlayerData = new FleePlayerData();
                yield return(new WaitForSeconds(7f));

                enemy.aiActor.behaviorSpeculator.FleePlayerData.Player = null;
            }
            yield break;
        }
Esempio n. 16
0
        private void HandleFear(PlayerController user, bool active)
        {
            RoomHandler room = user.CurrentRoom;

            if (!room.HasActiveEnemies(RoomHandler.ActiveEnemyType.All))
            {
                return;
            }

            if (active)
            {
                foreach (var enemy in room.GetActiveEnemies(RoomHandler.ActiveEnemyType.All))
                {
                    if (enemy.behaviorSpeculator != null)
                    {
                        enemy.behaviorSpeculator.FleePlayerData = this.fleeData;
                        FleePlayerData fleePlayerData = new FleePlayerData();
                    }
                }

                /*
                 * room.ApplyActionToNearbyEnemies(user.sprite.WorldCenter, 9f, (AIActor enemy, float d) =>
                 * {
                 *  if (enemy.behaviorSpeculator != null)
                 *      enemy.behaviorSpeculator.FleePlayerData = this.fleeData;
                 * });
                 */
            }
            else
            {
                foreach (var enemy in room.GetActiveEnemies(RoomHandler.ActiveEnemyType.All))
                {
                    if (enemy.behaviorSpeculator != null && enemy.behaviorSpeculator.FleePlayerData != null)
                    {
                        enemy.behaviorSpeculator.FleePlayerData.Player = null;
                    }
                }
            }
        }