示例#1
0
 private void HandleStealthEffect(TableTechChaosEffectIdentifier identifier, FlippableCover obj)
 {
     if (identifier == TableTechChaosEffectIdentifier.STEALTH)
     {
         PlayerController owner = base.Owner;
         this.BreakStealth(owner);
         owner.OnItemStolen += this.BreakStealthOnSteal;
         owner.ChangeSpecialShaderFlag(1, 1f);
         owner.healthHaver.OnDamaged += this.OnDamaged;
         owner.SetIsStealthed(true, "table tech chaos");
         owner.SetCapableOfStealing(true, "table tech chaos", null);
         GameManager.Instance.StartCoroutine(this.Unstealthy());
         if (base.Owner.PlayerHasActiveSynergy("#HIDDEN_TECH_SUPER_CHAOS"))
         {
             float       num;
             RoomHandler room = obj.transform.position.GetAbsoluteRoom();
             if (room != null)
             {
                 AIActor aiactor = room.GetNearestEnemy(obj.specRigidbody.UnitCenter, out num, true, true);
                 if (aiactor != null)
                 {
                     aiactor.PlayEffectOnActor(RedpoofVFX, Vector3.zero, false, true, false);
                     aiactor.healthHaver.ApplyDamage(UnityEngine.Random.Range(15, 30), obj.specRigidbody.UnitCenter - aiactor.sprite.WorldCenter, "Hidden Tech Assassin", CoreDamageTypes.None, DamageCategory.Unstoppable, true, null, false);
                 }
             }
         }
     }
 }
示例#2
0
 private static void DamageEnemies(AIActor a)
 {
     if (a && a.healthHaver && !a.IsGone)
     {
         a.PlayEffectOnActor(vfx, Vector3.zero, false, true, false);
         a.healthHaver.ApplyDamage(20f, Vector2.zero, "projectile", CoreDamageTypes.None, DamageCategory.Normal, false, null, false);
     }
 }
 protected void BossDamage(AIActor randomActiveEnemy)
 {
     if (randomActiveEnemy && randomActiveEnemy.behaviorSpeculator)
     {
         randomActiveEnemy.PlayEffectOnActor(ResourceCache.Acquire("Global VFX/VFX_Curse") as GameObject, Vector3.zero, false, false, false);
         randomActiveEnemy.healthHaver.ApplyDamage(100f, Vector2.zero, "Cursed", CoreDamageTypes.None, DamageCategory.Normal, true, null, true);
     }
 }
示例#4
0
 private void MarkNearbyEnemies(AIActor target, float f)
 {
     if (!this.markedEnemies.Contains(target) && !this.enemiesToEat.Contains(target))
     {
         target.PlayEffectOnActor(KaliberAffliction.MarkVFX, new Vector3(0.0625f, target.specRigidbody.HitboxPixelCollider.UnitDimensions.y, 0f), true, false, true);
         this.markedEnemies.Add(target);
         AkSoundEngine.PostEvent("Play_WPN_kthulu_soul_01", base.gameObject);
     }
 }
        private void ProcessEnemy(AIActor target, float distance)
        {
            bool jamnation = target.IsBlackPhantom;

            if (!jamnation)
            {
                target.PlayEffectOnActor(ResourceCache.Acquire("Global VFX/VFX_Curse") as GameObject, Vector3.zero, true, false, false);
                target.BecomeBlackPhantom();
            }
        }
 protected void ActivateDeath(AIActor randomActiveEnemy)
 {
     if (randomActiveEnemy && randomActiveEnemy.behaviorSpeculator)
     {
         randomActiveEnemy.PlayEffectOnActor(ResourceCache.Acquire("Global VFX/VFX_Curse") as GameObject, Vector3.zero, false, false, false);
         SpawnEnemyOnDeath component = randomActiveEnemy.GetComponent <SpawnEnemyOnDeath>();
         if (component)
         {
             UnityEngine.Object.Destroy(component);
         }
         randomActiveEnemy.healthHaver.minimumHealth = 0f;
         randomActiveEnemy.healthHaver.ApplyDamage(10000f, Vector2.zero, "Cursed", CoreDamageTypes.None, DamageCategory.Unstoppable, true, null, false);
     }
 }
        public IEnumerator DelayedDamageToEnemy()
        {
            yield return(new WaitForSeconds(0.5f));

            if (this.gun != null && this.Player != null && this.Player.CurrentRoom != null && this.Player.CurrentRoom.HasActiveEnemies(RoomHandler.ActiveEnemyType.All))
            {
                AIActor aiactor = this.Player.CurrentRoom.GetRandomActiveEnemy(true);
                if (aiactor != null)
                {
                    aiactor.healthHaver.ApplyDamage(aiactor.IsBlackPhantom ? 30f : 10f, Vector2.zero, aiactor.IsBlackPhantom ? "The Curse" : "The Jammed's Curse", CoreDamageTypes.None, DamageCategory.Unstoppable, true, null, true);
                    aiactor.PlayEffectOnActor(ResourceCache.Acquire("Global VFX/VFX_Curse") as GameObject, Vector3.zero, true, false, false);
                }
            }
            yield break;
        }
 // Token: 0x0600754F RID: 30031 RVA: 0x002DBC9C File Offset: 0x002D9E9C
 private void ProcessEnemy(AIActor a, float distance)
 {
     if (a && a.IsNormalEnemy && a.healthHaver && !a.IsGone)
     {
         if (this.m_lastOwner)
         {
             a.healthHaver.ApplyDamage(this.m_storedSoulDamage * this.damageFraction, Vector2.zero, this.m_lastOwner.ActorName, CoreDamageTypes.None, DamageCategory.Normal, false, null, false);
         }
         else
         {
             a.healthHaver.ApplyDamage(this.m_storedSoulDamage * this.damageFraction, Vector2.zero, "projectile", CoreDamageTypes.None, DamageCategory.Normal, false, null, false);
         }
         if (this.OnBurstDamageVFX)
         {
             a.PlayEffectOnActor(this.OnBurstDamageVFX, Vector3.zero, true, false, false);
         }
     }
 }
示例#9
0
        private void EatEnemy(AIActor target)
        {
            if (!target)
            {
                return;
            }
            if (target.behaviorSpeculator)
            {
                target.behaviorSpeculator.Stun(1f, true);
            }
            if (target.knockbackDoer)
            {
                target.knockbackDoer.SetImmobile(true, "KaliberAffliction");
            }
            this.enemiesToEat.Add(target);
            GameObject gameObject = target.PlayEffectOnActor(KaliberAffliction.EraseVFX, new Vector3(0f, -1f, 0f), false, false, false);

            target.StartCoroutine(this.DelayedDestroyEnemy(target, gameObject.GetComponent <tk2dSpriteAnimator>()));
        }
示例#10
0
        private void EatEnemy(AIActor enemy)
        {
            if (!enemy)
            {
                return;
            }
            if (!enemy.healthHaver.IsBoss)
            {
                if (enemy.behaviorSpeculator)
                {
                    enemy.behaviorSpeculator.Stun(1f, true);
                }
                if (enemy.knockbackDoer)
                {
                    enemy.knockbackDoer.SetImmobile(true, "KillTheWeakBehaviour");
                }
            }
            GameObject gameObject = enemy.PlayEffectOnActor(KaliberAffliction.EraseVFX, new Vector3(0f, -1f, 0f), enemy.healthHaver.IsBoss, false, false);

            enemy.StartCoroutine(this.DelayedDestroyEnemy(enemy, gameObject.GetComponent <tk2dSpriteAnimator>()));
        }