Exemplo n.º 1
0
        public static void ApplyDirectLockdown(GameActor target, float duration, Color tintColour, Color deathTintColour, EffectResistanceType resistanceType, string identifier, bool tintsEnemy, bool tintsCorpse)
        {
            GameActorSpeedEffect lockdownToApply = new GameActorSpeedEffect
            {
                duration         = duration,
                TintColor        = tintColour,
                DeathTintColor   = deathTintColour,
                effectIdentifier = identifier,
                AppliesTint      = tintsEnemy,
                AppliesDeathTint = tintsCorpse,
                resistanceType   = resistanceType,
                SpeedMultiplier  = 0f,

                //Eh
                OverheadVFX        = LockdownStatusEffect.lockdownVFXObject,
                AffectsEnemies     = true,
                AffectsPlayers     = false,
                AppliesOutlineTint = false,
                OutlineTintColor   = tintColour,
                PlaysVFXOnActor    = false,
            };

            if (target && target.aiActor && target.healthHaver && target.healthHaver.IsAlive)
            {
                target.ApplyEffect(lockdownToApply, 1f, null);
            }
        }
Exemplo n.º 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);
                }
            }
        }
        private static float DealSwordDamageToEnemy(GameActor owner, GameActor targetEnemy, Vector2 arcOrigin, Vector2 contact, float angle, SlashData slashParameters)
        {
            if (targetEnemy.healthHaver)
            {
                float damageToDeal = slashParameters.damage;
                if (targetEnemy.healthHaver && targetEnemy.healthHaver.IsBoss)
                {
                    damageToDeal *= slashParameters.bossDamageMult;
                }
                if ((targetEnemy is AIActor) && (targetEnemy as AIActor).IsBlackPhantom)
                {
                    damageToDeal *= slashParameters.jammedDamageMult;
                }
                DamageCategory category = DamageCategory.Normal;
                if ((owner is AIActor) && (owner as AIActor).IsBlackPhantom)
                {
                    category = DamageCategory.BlackBullet;
                }

                bool wasAlivePreviously = targetEnemy.healthHaver.IsAlive;
                //VFX
                if (slashParameters.doHitVFX && slashParameters.hitVFX != null)
                {
                    slashParameters.hitVFX.SpawnAtPosition(new Vector3(contact.x, contact.y), 0, targetEnemy.transform);
                }
                targetEnemy.healthHaver.ApplyDamage(damageToDeal, contact - arcOrigin, owner.ActorName, CoreDamageTypes.None, category, false, null, false);

                bool fatal = false;
                if (wasAlivePreviously && targetEnemy.healthHaver.IsDead)
                {
                    fatal = true;
                }

                if (slashParameters.OnHitTarget != null)
                {
                    slashParameters.OnHitTarget(targetEnemy, fatal);
                }
            }
            if (targetEnemy.knockbackDoer)
            {
                targetEnemy.knockbackDoer.ApplyKnockback(contact - arcOrigin, slashParameters.enemyKnockbackForce, false);
            }
            if (slashParameters.statusEffects != null && slashParameters.statusEffects.Count > 0)
            {
                foreach (GameActorEffect effect in slashParameters.statusEffects)
                {
                    targetEnemy.ApplyEffect(effect);
                }
            }
            return(slashParameters.damage);
        }
Exemplo n.º 4
0
        public void PostProcessBeamTick(BeamController beam, SpeculativeRigidbody hitRigidbody, float tickRate)
        {
            GameActor gameActor = hitRigidbody.gameActor;

            if (!gameActor)
            {
                return;
            }
            if (UnityEngine.Random.value < BraveMathCollege.SliceProbability(this.chanceFromBeamPerSecond, tickRate))
            {
                if (this.AppliesFire)
                {
                    gameActor.ApplyEffect(this.FireModifierEffect, 1f, null);
                }
            }
        }
Exemplo n.º 5
0
        // Token: 0x060002BF RID: 703 RVA: 0x00016484 File Offset: 0x00014684
        public void PostProcessBeamTick(BeamController beam, SpeculativeRigidbody hitRigidbody, float tickRate)
        {
            GameActor gameActor = hitRigidbody.gameActor;
            bool      flag      = !gameActor;

            if (!flag)
            {
                bool flag2 = UnityEngine.Random.value < BraveMathCollege.SliceProbability(this.chanceFromBeamPerSecond, tickRate);
                if (flag2)
                {
                    bool appliesCharm = this.AppliesCharm;
                    if (appliesCharm)
                    {
                        gameActor.ApplyEffect(this.CharmModifierEffect, 1f, null);
                    }
                }
            }
        }