Esempio n. 1
0
        private void FireBlast()
        {
            base.PlayAnimation("FullBody, Override", "BufferEmpty");
            Util.PlayAttackSpeedSound(DiggerPlugin.Sounds.ToTheStarsExplosion, base.gameObject, 0.5f);

            if (base.isAuthority)
            {
                BlastAttack blastAttack = new BlastAttack();
                blastAttack.radius            = 20f;
                blastAttack.procCoefficient   = 1f;
                blastAttack.position          = base.characterBody.footPosition;
                blastAttack.attacker          = base.gameObject;
                blastAttack.crit              = base.RollCrit();
                blastAttack.baseDamage        = base.characterBody.damage * FallingComet.blastDamageCoefficient;
                blastAttack.falloffModel      = BlastAttack.FalloffModel.Linear;
                blastAttack.baseForce         = 2000f;
                blastAttack.teamIndex         = TeamComponent.GetObjectTeam(blastAttack.attacker);
                blastAttack.damageType        = DamageType.PercentIgniteOnHit;
                blastAttack.attackerFiltering = AttackerFiltering.NeverHit;
                blastAttack.Fire();

                EffectData effectData = new EffectData();
                effectData.origin = base.characterBody.footPosition;
                effectData.scale  = 20;

                EffectManager.SpawnEffect(DiggerPlugin.DiggerPlugin.backblastEffect, effectData, false);
            }
        }
Esempio n. 2
0
        private void Explode()
        {
            if (!this.hasExploded)
            {
                this.hasExploded = true;

                BlastAttack blastAttack = new BlastAttack();
                blastAttack.radius            = 8f;
                blastAttack.procCoefficient   = 1f;
                blastAttack.position          = base.characterBody.corePosition + (0.5f * base.characterDirection.forward) + (Vector3.up * -0.25f);
                blastAttack.attacker          = null;
                blastAttack.crit              = base.RollCrit();
                blastAttack.baseDamage        = base.characterBody.damage * 100f;
                blastAttack.falloffModel      = BlastAttack.FalloffModel.SweetSpot;
                blastAttack.baseForce         = 8000f;
                blastAttack.teamIndex         = TeamComponent.GetObjectTeam(blastAttack.attacker);
                blastAttack.damageType        = DamageType.BypassOneShotProtection;
                blastAttack.attackerFiltering = AttackerFiltering.AlwaysHit;
                blastAttack.Fire();

                EffectData effectData = new EffectData();
                effectData.origin = base.characterBody.footPosition;
                effectData.scale  = 32;

                EffectManager.SpawnEffect(Resources.Load <GameObject>("Prefabs/Effects/OmniEffect/OmniExplosionVFX"), effectData, false);
                Util.PlaySound(DiggerPlugin.Sounds.ToTheStarsExplosion, base.gameObject);
            }
        }
Esempio n. 3
0
        private void FireShockwave()
        {
            if (this.hasFiredShockwave)
            {
                return;
            }
            this.hasFiredShockwave = true;

            if (EntityStates.GrandParentBoss.SpawnState.spawnEffect)
            {
                EffectManager.SimpleMuzzleFlash(Resources.Load <GameObject>("prefabs/effects/impacteffects/GrandparentDeathEffect"), base.gameObject, "HandR", false);
            }

            if (base.isAuthority)
            {
                BlastAttack blastAttack = new BlastAttack();
                blastAttack.attacker          = base.gameObject;
                blastAttack.inflictor         = base.gameObject;
                blastAttack.teamIndex         = TeamComponent.GetObjectTeam(blastAttack.attacker);
                blastAttack.position          = base.characterBody.corePosition;
                blastAttack.procCoefficient   = 0f;
                blastAttack.radius            = GigaImpact.blastAttackRadius;
                blastAttack.baseForce         = GigaImpact.blastAttackForce;
                blastAttack.bonusForce        = Vector3.up * GigaImpact.blastAttackBonusForce;
                blastAttack.baseDamage        = GigaImpact.blastAttackDamageCoefficient * this.damageStat;
                blastAttack.falloffModel      = BlastAttack.FalloffModel.Linear;
                blastAttack.damageColorIndex  = DamageColorIndex.Item;
                blastAttack.attackerFiltering = AttackerFiltering.NeverHit;
                blastAttack.Fire();
            }
        }
Esempio n. 4
0
        private void LandingImpact()
        {
            base.characterMotor.velocity *= 0.1f;

            BlastAttack blastAttack = new BlastAttack();

            blastAttack.radius            = PeoplesElbow.slamRadius;
            blastAttack.procCoefficient   = PeoplesElbow.slamProcCoefficient;
            blastAttack.position          = base.characterBody.footPosition;
            blastAttack.attacker          = base.gameObject;
            blastAttack.crit              = base.RollCrit();
            blastAttack.baseDamage        = base.characterBody.damage * PeoplesElbow.slamDamageCoefficient;
            blastAttack.falloffModel      = BlastAttack.FalloffModel.SweetSpot;
            blastAttack.baseForce         = PeoplesElbow.slamForce;
            blastAttack.teamIndex         = TeamComponent.GetObjectTeam(blastAttack.attacker);
            blastAttack.damageType        = DamageType.Stun1s;
            blastAttack.attackerFiltering = AttackerFiltering.NeverHit;
            blastAttack.Fire();

            EffectManager.SpawnEffect(EntityStates.LemurianBruiserMonster.SpawnState.spawnEffectPrefab, new EffectData
            {
                origin = base.characterBody.footPosition,
                scale  = 4f
            }, true);
        }
Esempio n. 5
0
        private void Fire()
        {
            if (this.hasFired)
            {
                return;
            }
            this.hasFired = true;

            Util.PlaySound("Play_parent_attack1_slam", base.gameObject);
            if (EntityStates.BeetleGuardMonster.GroundSlam.slamEffectPrefab)
            {
                EffectManager.SimpleMuzzleFlash(EntityStates.BeetleGuardMonster.GroundSlam.slamEffectPrefab, base.gameObject, "HandR", false);
            }

            this.flashController.Flash();

            if (base.isAuthority)
            {
                BlastAttack blastAttack = new BlastAttack();
                blastAttack.attacker          = base.gameObject;
                blastAttack.inflictor         = base.gameObject;
                blastAttack.teamIndex         = TeamComponent.GetObjectTeam(blastAttack.attacker);
                blastAttack.position          = base.FindModelChild("HandR").position;
                blastAttack.procCoefficient   = 0f;
                blastAttack.radius            = GigaImpact.impactAttackRadius;
                blastAttack.baseForce         = GigaImpact.impactAttackForce;
                blastAttack.bonusForce        = Vector3.up * GigaImpact.impactAttackBonusForce;
                blastAttack.baseDamage        = GigaImpact.impactAttackDamageCoefficient * this.damageStat;
                blastAttack.falloffModel      = BlastAttack.FalloffModel.SweetSpot;
                blastAttack.damageColorIndex  = DamageColorIndex.Item;
                blastAttack.attackerFiltering = AttackerFiltering.NeverHit;
                blastAttack.Fire();
            }
        }
Esempio n. 6
0
        public override void FixedUpdate()
        {
            base.FixedUpdate();

            if (base.isAuthority)
            {
                Ray aimRay = base.GetAimRay();
                this.blastAttack.position = aimRay.origin;
                this.effectData.origin    = aimRay.origin;

                if (base.fixedAge >= this.duration && base.isAuthority)
                {
                    this.outer.SetNextStateToMain();
                    return;
                }

                float boost     = charged * (.8f + (.2f * base.attackSpeedStat));
                int   roundDown = Mathf.FloorToInt(boost);
                int   scale     = Mathf.Max(2, 40 - roundDown);

                if (this.frameCounter % scale == 0)
                {
                    BlastAttack.Result result = blastAttack.Fire();
                    int hitCount = result.hitCount;

                    //if (this.styleComponent) this.styleComponent.AddStyle(hitCount * DrillCharge.styleCoefficient);

                    EffectManager.SpawnEffect(this.explodePrefab, effectData, false);
                }

                this.frameCounter++;
            }
        }
Esempio n. 7
0
        // Token: 0x06002BC9 RID: 11209 RVA: 0x000B92A8 File Offset: 0x000B74A8
        protected override void Pulse()
        {
            BlastAttack blastAttack = new BlastAttack
            {
                baseDamage       = 0f,
                baseForce        = 0f,
                attacker         = (base.projectileController ? base.projectileController.owner : null),
                inflictor        = base.gameObject,
                bonusForce       = Vector3.zero,
                canHurtAttacker  = false,
                crit             = false,
                damageColorIndex = DamageColorIndex.Default,
                damageType       = DamageType.Stun1s,
                falloffModel     = BlastAttack.FalloffModel.None,
                procChainMask    = default(ProcChainMask),
                position         = base.transform.position,
                procCoefficient  = 0f,
                teamIndex        = (base.projectileController ? base.projectileController.teamFilter.teamIndex : TeamIndex.None),
                radius           = this.pulseRadius
            };

            blastAttack.Fire();
            EffectData effectData = new EffectData();

            effectData.origin = blastAttack.position;
            effectData.scale  = blastAttack.radius;
            EffectManager.SpawnEffect(Resources.Load <GameObject>("Prefabs/Effects/ImpactEffects/ExplosionVFX"), effectData, true);
        }
Esempio n. 8
0
 // Token: 0x06000571 RID: 1393 RVA: 0x00018B50 File Offset: 0x00016D50
 public override void FixedUpdate()
 {
     base.FixedUpdate();
     this.stopwatch += Time.fixedDeltaTime;
     if (this.stopwatch >= this.startDuration && !this.hasCastNova)
     {
         this.hasCastNova = true;
         EffectManager.instance.SpawnEffect(IceNova.novaEffectPrefab, new EffectData
         {
             origin = base.transform.position,
             scale  = IceNova.novaRadius
         }, true);
         BlastAttack blastAttack = new BlastAttack();
         blastAttack.radius          = IceNova.novaRadius;
         blastAttack.procCoefficient = IceNova.procCoefficient;
         blastAttack.position        = base.transform.position;
         blastAttack.attacker        = base.gameObject;
         blastAttack.crit            = Util.CheckRoll(base.characterBody.crit, base.characterBody.master);
         blastAttack.baseDamage      = base.characterBody.damage * IceNova.damageCoefficient;
         blastAttack.falloffModel    = BlastAttack.FalloffModel.None;
         blastAttack.damageType      = DamageType.Freeze2s;
         blastAttack.baseForce       = IceNova.force;
         blastAttack.teamIndex       = TeamComponent.GetObjectTeam(blastAttack.attacker);
         blastAttack.Fire();
     }
     if (this.stopwatch >= this.startDuration + this.endDuration && base.isAuthority)
     {
         this.outer.SetNextStateToMain();
         return;
     }
 }
Esempio n. 9
0
 // Token: 0x06002D99 RID: 11673 RVA: 0x000C1638 File Offset: 0x000BF838
 public override void OnExit()
 {
     EffectManager.SimpleMuzzleFlash(ChargeMeteor.muzzleflashEffect, base.gameObject, "Muzzle", false);
     if (this.areaIndicatorInstance)
     {
         if (this.fireMeteor)
         {
             float num = Util.Remap(Mathf.Clamp01(this.stopwatch / this.chargeDuration), 0f, 1f, ChargeMeteor.minDamageCoefficient, ChargeMeteor.maxDamageCoefficient);
             EffectManager.SpawnEffect(ChargeMeteor.meteorEffect, new EffectData
             {
                 origin = this.areaIndicatorInstance.transform.position,
                 scale  = this.radius
             }, true);
             BlastAttack blastAttack = new BlastAttack();
             blastAttack.radius          = this.radius;
             blastAttack.procCoefficient = ChargeMeteor.procCoefficient;
             blastAttack.position        = this.areaIndicatorInstance.transform.position;
             blastAttack.attacker        = base.gameObject;
             blastAttack.crit            = Util.CheckRoll(base.characterBody.crit, base.characterBody.master);
             blastAttack.baseDamage      = base.characterBody.damage * num;
             blastAttack.falloffModel    = BlastAttack.FalloffModel.SweetSpot;
             blastAttack.baseForce       = ChargeMeteor.force;
             blastAttack.teamIndex       = TeamComponent.GetObjectTeam(blastAttack.attacker);
             blastAttack.Fire();
         }
         EntityState.Destroy(this.areaIndicatorInstance.gameObject);
     }
     base.OnExit();
 }
Esempio n. 10
0
        public override void OnExit()
        {
            EffectData effectData = new EffectData();

            effectData.origin = this.swordController.sunPosition;

            EffectManager.SpawnEffect(Resources.Load <GameObject>("prefabs/effects/impacteffects/GrandparentSpawnImpact"), effectData, false);
            EffectManager.SpawnEffect(Resources.Load <GameObject>("prefabs/effects/ClayBossDeath"), effectData, false);

            if (base.isAuthority)
            {
                BlastAttack blastAttack = new BlastAttack();
                blastAttack.attacker          = base.gameObject;
                blastAttack.inflictor         = base.gameObject;
                blastAttack.teamIndex         = TeamComponent.GetObjectTeam(blastAttack.attacker);
                blastAttack.position          = this.swordController.sunPosition;
                blastAttack.procCoefficient   = ScepterCastCruelSun.flareProcCoefficient;
                blastAttack.radius            = ScepterCastCruelSun.flareRadius;
                blastAttack.baseForce         = ScepterCastCruelSun.flareForce;
                blastAttack.bonusForce        = Vector3.zero;
                blastAttack.baseDamage        = ScepterCastCruelSun.flareDamageCoefficient * this.damageStat;
                blastAttack.falloffModel      = BlastAttack.FalloffModel.Linear;
                blastAttack.damageColorIndex  = DamageColorIndex.Item;
                blastAttack.attackerFiltering = AttackerFiltering.NeverHit;
                blastAttack.Fire();
            }

            base.OnExit();

            base.PlayAnimation("Gesture, Override", "CastSunEnd", "Spell.playbackRate", 1.5f);
        }
 // Token: 0x06002D84 RID: 11652 RVA: 0x000C1058 File Offset: 0x000BF258
 public override void OnEnter()
 {
     base.OnEnter();
     Util.PlaySound(FlyUpState.beginSoundString, base.gameObject);
     this.modelTransform = base.GetModelTransform();
     this.flyVector      = Vector3.up;
     this.CreateBlinkEffect(Util.GetCorePosition(base.gameObject));
     base.PlayCrossfade("Body", "FlyUp", "FlyUp.playbackRate", FlyUpState.duration, 0.1f);
     base.characterMotor.Motor.ForceUnground();
     base.characterMotor.velocity = Vector3.zero;
     EffectManager.SimpleMuzzleFlash(FlyUpState.muzzleflashEffect, base.gameObject, "MuzzleLeft", false);
     EffectManager.SimpleMuzzleFlash(FlyUpState.muzzleflashEffect, base.gameObject, "MuzzleRight", false);
     if (base.isAuthority)
     {
         this.blastPosition = base.characterBody.corePosition;
     }
     if (NetworkServer.active)
     {
         BlastAttack blastAttack = new BlastAttack();
         blastAttack.radius          = FlyUpState.blastAttackRadius;
         blastAttack.procCoefficient = FlyUpState.blastAttackProcCoefficient;
         blastAttack.position        = this.blastPosition;
         blastAttack.attacker        = base.gameObject;
         blastAttack.crit            = Util.CheckRoll(base.characterBody.crit, base.characterBody.master);
         blastAttack.baseDamage      = base.characterBody.damage * FlyUpState.blastAttackDamageCoefficient;
         blastAttack.falloffModel    = BlastAttack.FalloffModel.SweetSpot;
         blastAttack.baseForce       = FlyUpState.blastAttackForce;
         blastAttack.teamIndex       = TeamComponent.GetObjectTeam(blastAttack.attacker);
         blastAttack.damageType      = DamageType.Stun1s;
         blastAttack.Fire();
     }
 }
 private void On_CMOnHitGround(On.RoR2.CharacterMotor.orig_OnHitGround orig, CharacterMotor self, CharacterMotor.HitGroundInfo ghi)
 {
     orig(self, ghi);
     if (!self.body)
     {
         return;
     }
     if (GetCount(self.body) > 0 && Math.Abs(ghi.velocity.y) > velThreshold)
     {
         float scalefac = Mathf.Lerp(0f, baseDamage + (GetCount(self.body) - 1f) * stackDamage,
                                     Mathf.InverseLerp(velThreshold, velMax + velThreshold, Math.Abs(ghi.velocity.y)));
         //most properties borrowed from H3AD-5T v2
         BlastAttack blastAttack = new BlastAttack {
             attacker          = self.body.gameObject,
             inflictor         = self.body.gameObject,
             teamIndex         = TeamComponent.GetObjectTeam(self.body.gameObject),
             position          = ghi.position,
             procCoefficient   = 0.5f,
             radius            = 10f,
             baseForce         = 2000f,
             bonusForce        = Vector3.up * 2000f,
             baseDamage        = self.body.damage * scalefac,
             falloffModel      = BlastAttack.FalloffModel.SweetSpot,
             crit              = Util.CheckRoll(self.body.crit, self.body.master),
             damageColorIndex  = DamageColorIndex.Item,
             attackerFiltering = AttackerFiltering.NeverHit
         };
         blastAttack.Fire();
         EffectData effectData = new EffectData {
             origin = ghi.position,
             scale  = 10f
         };
         EffectManager.SpawnEffect(Resources.Load <GameObject>("Prefabs/Effects/ImpactEffects/BootShockwave"), effectData, true);
     }
 }
Esempio n. 13
0
        private void FireShockwave()
        {
            Util.PlaySound("HenryFrenzyShockwave", base.gameObject);

            EffectData effectData = new EffectData();

            effectData.origin = base.characterBody.corePosition;
            effectData.scale  = 1;

            //EffectManager.SpawnEffect(Modules.Assets.frenzyShockwaveEffect, effectData, false);

            if (base.isAuthority)
            {
                BlastAttack blastAttack = new BlastAttack();
                blastAttack.attacker          = base.gameObject;
                blastAttack.inflictor         = base.gameObject;
                blastAttack.teamIndex         = TeamComponent.GetObjectTeam(blastAttack.attacker);
                blastAttack.position          = base.characterBody.corePosition;
                blastAttack.procCoefficient   = 0f;
                blastAttack.radius            = RageEnterOut.shockwaveRadius;
                blastAttack.baseForce         = RageEnterOut.shockwaveForce;
                blastAttack.bonusForce        = Vector3.up * RageEnterOut.shockwaveBonusForce;
                blastAttack.baseDamage        = 0f;
                blastAttack.falloffModel      = BlastAttack.FalloffModel.None;
                blastAttack.damageColorIndex  = DamageColorIndex.Item;
                blastAttack.attackerFiltering = AttackerFiltering.NeverHit;
                blastAttack.Fire();
            }

            if (this.rageController)
            {
                this.rageController.EnterBerserk();
            }
        }
Esempio n. 14
0
 public override void FixedUpdate()
 {
     base.FixedUpdate();
     if ((bool)modelAnimator && modelAnimator.GetFloat("Slam.hitBoxActive") > 0.5f && !hasAttacked)
     {
         if (base.isAuthority)
         {
             if ((bool)base.characterDirection)
             {
                 base.characterDirection.moveVector = base.characterDirection.forward;
             }
             if ((bool)modelTransform)
             {
                 Transform transform = FindModelChild("SlamZone");
                 if ((bool)transform)
                 {
                     attack            = new BlastAttack();
                     attack.attacker   = base.gameObject;
                     attack.inflictor  = base.gameObject;
                     attack.teamIndex  = TeamComponent.GetObjectTeam(base.gameObject);
                     attack.baseDamage = damageStat * damageCoefficient;
                     attack.baseForce  = forceMagnitude;
                     attack.position   = transform.position;
                     attack.radius     = radius;
                     attack.Fire();
                 }
             }
         }
         hasAttacked = true;
     }
     if (base.fixedAge >= duration / attackSpeedStat && base.isAuthority)
     {
         outer.SetNextStateToMain();
     }
 }
Esempio n. 15
0
        public override void ElementBurst()
        {
            base.ElementBurst();

            BlastAttack blastAttack = MakeBlastAttack();

            blastAttack.Fire();
        }
        public override void ElementBurst()
        {
            base.ElementBurst();

            BlastAttack blastAttack = MakeBlastAttack();

            FireLightningBurst(blastAttack.crit, blastAttack.baseDamage);
            blastAttack.Fire();
        }
Esempio n. 17
0
        public override void FixedUpdate()
        {
            base.FixedUpdate();

            if (base.fixedAge >= this.duration && base.isAuthority)
            {
                if (!base.characterMotor.disableAirControlUntilCollision)
                {
                    base.characterMotor.velocity *= 0.4f;
                }
                this.outer.SetNextStateToMain();
                return;
            }

            if (base.isAuthority)
            {
                if (this.attack.Fire())
                {
                    base.characterMotor.velocity = Vector3.zero;

                    if (base.characterMotor && !base.characterMotor.isGrounded)
                    {
                        base.SmallHop(base.characterMotor, 12f);
                    }

                    BlastAttack blastAttack = new BlastAttack();
                    blastAttack.radius            = 10f;
                    blastAttack.procCoefficient   = 1f;
                    blastAttack.position          = base.characterBody.corePosition;
                    blastAttack.attacker          = base.gameObject;
                    blastAttack.crit              = base.RollCrit();
                    blastAttack.baseDamage        = base.characterBody.damage * DrillBreak.damageCoefficient;
                    blastAttack.falloffModel      = BlastAttack.FalloffModel.None;
                    blastAttack.baseForce         = 3f;
                    blastAttack.teamIndex         = TeamComponent.GetObjectTeam(blastAttack.attacker);
                    blastAttack.damageType        = DamageType.Generic;
                    blastAttack.attackerFiltering = AttackerFiltering.NeverHit;
                    blastAttack.Fire();

                    EffectData effectData = new EffectData();
                    effectData.origin = base.characterBody.corePosition;
                    effectData.scale  = 6;

                    EffectManager.SpawnEffect(DiggerPlugin.DiggerPlugin.backblastEffect, effectData, false);

                    base.PlayAnimation("FullBody, Override", "Flip", "Flip.playbackRate", 0.4f);

                    this.outer.SetNextStateToMain();
                    return;
                }
            }
        }
Esempio n. 18
0
        public override void OnEnter()
        {
            base.OnEnter();
            bool flag  = base.characterBody;
            bool flag2 = flag;

            if (flag2)
            {
                base.characterBody.AddTimedBuff(Buffs.TemplarOverdriveBuff, 3f);
            }
            EffectManager.SimpleMuzzleFlash(FireTarball.effectPrefab, base.gameObject, "Root", false);
            RoR2.EffectManager.SpawnEffect(LegacyResourcesAPI.Load <GameObject>("Prefabs/Effects/ImpactEffects/ExplosivePotExplosion"), new RoR2.EffectData
            {
                origin = base.characterBody.corePosition,
                scale  = 12f
            }, true);

            BlastAttack blastAttack = new BlastAttack
            {
                attacker        = base.gameObject,
                inflictor       = base.gameObject,
                teamIndex       = base.teamComponent.teamIndex,
                baseForce       = TemplarOverdrive.pushForce,
                bonusForce      = Vector3.zero,
                position        = base.transform.position,
                radius          = 12f,
                falloffModel    = BlastAttack.FalloffModel.None,
                crit            = false,
                baseDamage      = 0f,
                procCoefficient = 0f,
                damageType      = DamageType.ClayGoo
            };

            blastAttack.Fire();
            this.modelTransform = base.GetModelTransform();
            bool flag3 = this.modelTransform;
            bool flag4 = flag3;

            if (flag4)
            {
                TemporaryOverlay temporaryOverlay = this.modelTransform.gameObject.AddComponent <TemporaryOverlay>();
                temporaryOverlay.duration              = 8f;
                temporaryOverlay.animateShaderAlpha    = true;
                temporaryOverlay.alphaCurve            = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f);
                temporaryOverlay.destroyComponentOnEnd = true;
                temporaryOverlay.originalMaterial      = LegacyResourcesAPI.Load <Material>("Materials/matClayGooDebuff");
                temporaryOverlay.AddToCharacerModel(this.modelTransform.GetComponent <CharacterModel>());
            }
            Util.PlayAttackSpeedSound(FireTarball.attackSoundString, base.gameObject, 0.75f);
            this.outer.SetNextStateToMain();
        }
Esempio n. 19
0
        public override void OnExit()
        {
            base.characterBody.RemoveBuff(RoR2Content.Buffs.HiddenInvincibility);
            base.characterBody.AddTimedBuff(RoR2Content.Buffs.HiddenInvincibility, 0.5f * 0.5f);

            blastAttack.radius = 5f;
            blastAttack.Fire();

            victimBodyList.Clear();
            getHitList(blastAttack);
            victimBodyList.ForEach(Stop);

            base.characterMotor.velocity.x *= 0.1f;
            base.characterMotor.velocity.y *= 0.1f;
            base.characterMotor.velocity.z *= 0.1f;

            base.OnExit();
        }
 // Token: 0x06002FDF RID: 12255 RVA: 0x000CD32C File Offset: 0x000CB52C
 public override void OnEnter()
 {
     base.OnEnter();
     this.duration = HeadstompersCooldown.baseDuration;
     if (this.body)
     {
         Inventory inventory = this.body.inventory;
         int       num       = inventory ? inventory.GetItemCount(ItemIndex.FallBoots) : 1;
         if (num > 0)
         {
             this.duration          /= (float)num;
             this.bodyMotor.velocity = Vector3.zero;
             if (NetworkServer.active && this.impactSpeed > 0f)
             {
                 float       num2        = 10f;
                 float       num3        = Mathf.Max(0f, this.impactSpeed - HeadstompersFall.fallSpeed);
                 float       num4        = 23f;
                 float       num5        = 7f;
                 float       num6        = num4 + num5 * num3;
                 BlastAttack blastAttack = new BlastAttack();
                 blastAttack.attacker         = this.body.gameObject;
                 blastAttack.inflictor        = this.body.gameObject;
                 blastAttack.teamIndex        = TeamComponent.GetObjectTeam(blastAttack.attacker);
                 blastAttack.position         = this.impactPosition;
                 blastAttack.procCoefficient  = 0.5f;
                 blastAttack.radius           = num2;
                 blastAttack.baseForce        = 2000f;
                 blastAttack.bonusForce       = Vector3.up * 2000f;
                 blastAttack.baseDamage       = this.body.damage * num6;
                 blastAttack.falloffModel     = BlastAttack.FalloffModel.SweetSpot;
                 blastAttack.crit             = Util.CheckRoll(this.body.crit, this.body.master);
                 blastAttack.damageColorIndex = DamageColorIndex.Item;
                 blastAttack.Fire();
                 EffectData effectData = new EffectData();
                 effectData.origin = this.impactPosition;
                 effectData.scale  = num2;
                 EffectManager.SpawnEffect(Resources.Load <GameObject>("Prefabs/Effects/ImpactEffects/BootShockwave"), effectData, true);
             }
         }
     }
 }
Esempio n. 21
0
        public override void ElementBurst()
        {
            base.ElementBurst();

            BlastAttack blastAttack = MakeBlastAttack();

            blastAttack.Fire();

            BlastAttack.HitPoint[] hits = blastAttack.CollectHits();
            foreach (BlastAttack.HitPoint hit in hits)
            {
                CharacterBody victimBody = hit.hurtBox.healthComponent.body;
                if (victimBody)
                {
                    if (!victimBody.HasBuff(Buffs.chillCooldown))
                    {
                        victimBody.AddTimedBuff(Buffs.chillDebuff, StaticValues.chillDebuffDuration, StaticValues.chillDebuffMaxStacks);
                    }
                }
            }
        }
Esempio n. 22
0
 public void FixedUpdate()
 {
     base.FixedUpdate();
     stopwatch += Time.fixedDeltaTime;
     if (characterMotor && characterDirection)
     {
         characterMotor.velocity    = Vector3.zero;
         characterMotor.rootMotion += blinkVector * (moveSpeedStat * BlinkState.speedCoefficient * Time.fixedDeltaTime);
     }
     if (stopwatch >= BlinkState.duration && isAuthority)
     {
         outer.SetNextStateToMain();
     }
     stopwatch2 += Time.fixedDeltaTime;
     if (stopwatch2 >= startDuration && !hasCastNova)
     {
         hasCastNova = true;
         EffectManager.instance.SpawnEffect(IceNova.novaEffectPrefab, new EffectData
         {
             origin = transform.position,
             scale  = 12f
         }, true);
         BlastAttack blastAttack = new BlastAttack();
         blastAttack.radius          = 12f;
         blastAttack.procCoefficient = IceNova.procCoefficient;
         blastAttack.position        = transform.position;
         blastAttack.attacker        = gameObject;
         blastAttack.crit            = Util.CheckRoll(characterBody.crit, characterBody.master);
         blastAttack.baseDamage      = characterBody.damage * IceNova.damageCoefficient;
         blastAttack.falloffModel    = 0;
         blastAttack.damageType      = DamageType.Freeze2s;
         blastAttack.baseForce       = IceNova.force;
         blastAttack.teamIndex       = TeamComponent.GetObjectTeam(blastAttack.attacker);
         blastAttack.Fire();
     }
     if (stopwatch2 >= startDuration + endDuration && isAuthority)
     {
         outer.SetNextStateToMain();
     }
 }
Esempio n. 23
0
        protected void Fire()
        {
            Ray aimRay = base.GetAimRay();

            this.aimDirection = aimRay.direction;

            //base.PlayAnimation("FullBody, Override", this.animString);

            base.characterBody.AddSpreadBloom(2f);
            EffectManager.SimpleMuzzleFlash(EntityStates.Commando.CommandoWeapon.FirePistol2.muzzleEffectPrefab, base.gameObject, "Muzzle", false);
            Util.PlaySound("HenryShootShotgun", base.gameObject);

            if (base.isAuthority)
            {
                base.characterMotor.velocity = -this.aimDirection * Burst.pushForce;
                //base.characterMotor.rootMotion = this.pushForce;
                base.AddRecoil(-1f * Burst.recoil, -2f * Burst.recoil, -0.5f * Burst.recoil, 0.5f * Burst.recoil);

                BlastAttack blastAttack = new BlastAttack();
                blastAttack.radius            = 10f;
                blastAttack.procCoefficient   = 1f;
                blastAttack.position          = aimRay.origin + 2 * aimRay.direction;
                blastAttack.attacker          = base.gameObject;
                blastAttack.crit              = base.RollCrit();
                blastAttack.baseDamage        = base.characterBody.damage * Burst.damageCoefficient;
                blastAttack.falloffModel      = BlastAttack.FalloffModel.None;
                blastAttack.baseForce         = Burst.blastForce;
                blastAttack.teamIndex         = TeamComponent.GetObjectTeam(blastAttack.attacker);
                blastAttack.damageType        = DamageType.Stun1s;
                blastAttack.attackerFiltering = AttackerFiltering.NeverHit;
                BlastAttack.Result result = blastAttack.Fire();

                EffectData effectData = new EffectData();
                effectData.origin = aimRay.origin + 2 * aimRay.direction;
                effectData.scale  = 8;

                EffectManager.SpawnEffect(Resources.Load <GameObject>("Prefabs/Effects/ImpactEffects/FusionCellExplosion"), effectData, true);
            }
        }
Esempio n. 24
0
        public override void Effect(GlobalEventManager globalEventManager, DamageInfo damageInfo, GameObject victim, int itemCount)
        {
            CharacterBody   body          = damageInfo.attacker.GetComponent <CharacterBody>();
            CharacterBody   Attacker      = damageInfo.attacker.GetComponent <CharacterBody>();
            CharacterBody   characterBody = victim ? victim.GetComponent <CharacterBody>() : null;
            CharacterMaster master        = Attacker.master;
            Inventory       inventory     = master.inventory;
            CharacterBody   component     = damageInfo.attacker.GetComponent <CharacterBody>();


            float ExplosionRadius   = (float)(1.5 + 2.5 * itemCount) * damageInfo.procCoefficient;
            float damageCoefficient = 0.6f;
            float Damage            = Util.OnHitProcDamage(damageInfo.damage, component.damage, damageCoefficient);

            EffectManager.instance.SpawnEffect(Resources.Load <GameObject>("Prefabs/Effects/OmniEffect/OmniExplosionVFXQuick"), new EffectData()
            {
                origin   = damageInfo.position,
                scale    = ExplosionRadius,
                rotation = Util.QuaternionSafeLookRotation(damageInfo.force)
            }, true);
            BlastAttack blastAttack = new BlastAttack()
            {
                position   = damageInfo.position,
                baseDamage = Damage,
                baseForce  = 0.0f,
                radius     = ExplosionRadius,
                attacker   = damageInfo.attacker,
                inflictor  = null
            };

            blastAttack.teamIndex        = TeamComponent.GetObjectTeam(blastAttack.attacker);
            blastAttack.crit             = damageInfo.crit;
            blastAttack.procChainMask    = damageInfo.procChainMask;
            blastAttack.procCoefficient  = 0.0f;
            blastAttack.damageColorIndex = DamageColorIndex.Item;
            blastAttack.falloffModel     = BlastAttack.FalloffModel.None;
            blastAttack.damageType       = damageInfo.damageType;
            blastAttack.Fire();
        }
Esempio n. 25
0
        public override void OnEnter()
        {
            base.OnEnter();
            aimRay        = base.GetAimRay();
            this.duration = this.baseDuration;
            if (base.isAuthority)
            {
                base.characterBody.AddBuff(RoR2Content.Buffs.HiddenInvincibility);

                blastAttack                   = new BlastAttack();
                blastAttack.radius            = 25f;
                blastAttack.procCoefficient   = 1f;
                blastAttack.position          = aimRay.origin;
                blastAttack.attacker          = base.gameObject;
                blastAttack.crit              = Util.CheckRoll(base.characterBody.crit, base.characterBody.master);
                blastAttack.baseDamage        = 0.1f;
                blastAttack.falloffModel      = BlastAttack.FalloffModel.None;
                blastAttack.baseForce         = 3f;
                blastAttack.teamIndex         = TeamComponent.GetObjectTeam(blastAttack.attacker);
                blastAttack.damageType        = DamageType.Stun1s;
                blastAttack.attackerFiltering = AttackerFiltering.NeverHit;
                blastAttack.Fire();

                EffectData effectData = new EffectData();
                effectData.origin = aimRay.origin;
                effectData.scale  = 15;

                EffectManager.SpawnEffect(slashPrefab, effectData, false);

                Util.PlaySound("Backblast", base.gameObject);

                getHitList(blastAttack);
                victimBodyList.ForEach(Suck);

                base.characterMotor.velocity = -60 * aimRay.direction;
            }
        }
Esempio n. 26
0
        public override void OnEnter()
        {
            base.OnEnter();
            Ray aimRay = base.GetAimRay();

            this.duration = this.baseDuration;

            Util.PlaySound(DiggerPlugin.Sounds.Backblast, base.gameObject);
            base.StartAimMode(0.6f, true);

            base.characterMotor.disableAirControlUntilCollision = false;

            float angle = Vector3.Angle(new Vector3(0, -1, 0), aimRay.direction);

            if (angle < 60)
            {
                base.PlayAnimation("FullBody, Override", "BackblastUp");
            }
            else if (angle > 120)
            {
                base.PlayAnimation("FullBody, Override", "BackblastDown");
            }
            else
            {
                base.PlayAnimation("FullBody, Override", "Backblast");
            }

            if (NetworkServer.active)
            {
                base.characterBody.AddBuff(RoR2Content.Buffs.HiddenInvincibility);
            }

            if (base.isAuthority)
            {
                Vector3 theSpot = aimRay.origin + 2 * aimRay.direction;

                BlastAttack blastAttack = new BlastAttack();
                blastAttack.radius            = 14f;
                blastAttack.procCoefficient   = 1f;
                blastAttack.position          = theSpot;
                blastAttack.attacker          = base.gameObject;
                blastAttack.crit              = Util.CheckRoll(base.characterBody.crit, base.characterBody.master);
                blastAttack.baseDamage        = base.characterBody.damage * BackBlast.damageCoefficient;
                blastAttack.falloffModel      = BlastAttack.FalloffModel.None;
                blastAttack.baseForce         = 500f;
                blastAttack.teamIndex         = TeamComponent.GetObjectTeam(blastAttack.attacker);
                blastAttack.damageType        = DamageType.Stun1s;
                blastAttack.attackerFiltering = AttackerFiltering.NeverHit;
                BlastAttack.Result result = blastAttack.Fire();

                EffectData effectData = new EffectData();
                effectData.origin = theSpot;
                effectData.scale  = 15;

                EffectManager.SpawnEffect(DiggerPlugin.DiggerPlugin.backblastEffect, effectData, false);

                base.characterMotor.velocity = -80 * aimRay.direction;

                Compacted?.Invoke(result.hitCount);
            }
        }
Esempio n. 27
0
        public override void FixedUpdate()
        {
            base.FixedUpdate();
            if (base.isAuthority && this.modelAnimator && this.modelAnimator.GetFloat("Hammer.hitBoxActive") > 0.5f)
            {
                if (!this.hasSwung)
                {
                    Ray aimRay = base.GetAimRay();
                    EffectManager.SimpleMuzzleFlash(this.swingEffectPrefab, base.gameObject, "SwingCenter", true);
                    blastAttack.Fire();

                    if (CheckIfAttackHit(3, base.transform.position + base.characterDirection.forward * 2f, 3f))
                    {
                        BeginHitPause();
                    }
                    if (BIGSLAM.notificationEffectPrefab)
                    {
                        EffectManager.SpawnEffect(BIGSLAM.notificationEffectPrefab, new EffectData
                        {
                            origin = aimRay.origin,
                            scale  = 15
                        }, true);
                    }
                    else
                    {
                        EffectManager.SpawnEffect(BIGSLAM.notificationEffectPrefab, new EffectData
                        {
                            origin = aimRay.origin,
                            scale  = 15
                        }, true);
                    }
                    if (BIGSLAM.rumbleEffectPrefab)
                    {
                        EffectManager.SpawnEffect(BIGSLAM.rumbleEffectPrefab, new EffectData
                        {
                            origin = aimRay.origin,
                            scale  = 15
                        }, true);
                    }
                    else
                    {
                        EffectManager.SpawnEffect(BIGSLAM.rumbleEffectPrefab, new EffectData
                        {
                            origin = aimRay.origin,
                            scale  = 15
                        }, true);
                    }
                    Util.PlaySound("Play_MULT_shift_hit", base.gameObject);
                    this.hasSwung = true;
                }
                this.attack.forceVector = this.hammerChildTransform.right * this.forceMagnitude;
                this.attack.Fire(null);
            }
            if (base.fixedAge >= this.duration && base.isAuthority)
            {
                this.outer.SetNextStateToMain();
                return;
            }
            else
            {
                if (base.isAuthority && this.enteredHitPause && this.hitPauseTimer > 0f && CheckIfAttackHit(3, base.transform.position + base.characterDirection.forward * 2f, 3f))
                {
                    this.hitPauseTimer          -= Time.fixedDeltaTime;
                    base.characterMotor.velocity = Vector3.zero;
                    if (this.hitPauseTimer <= 0f)
                    {
                        this.ExitHitPause();
                    }
                }
            }
        }
        private void HealthComponent_TakeDamage(On.RoR2.HealthComponent.orig_TakeDamage orig, HealthComponent self, DamageInfo di)
        {
            orig(self, di);
            if (di.inflictor)
            {
                if (self)
                {
                    var selfCharacterBody = self.GetComponent <CharacterBody>();
                    if (selfCharacterBody)
                    {
                        if (di.attacker)
                        {
                            var attackerCharacterBody = di.attacker.GetComponent <CharacterBody>();
                            if (attackerCharacterBody)
                            {
                                bool attackerIsTemplar = di.attacker.GetComponent <CharacterBody>().baseNameToken == "TEMPLAR_NAME";
                                if (attackerIsTemplar)
                                {
                                    bool validDamageType = di.damageType.HasFlag(DamageType.BypassOneShotProtection);
                                    if (validDamageType)
                                    {
                                        di.damageType = DamageType.AOE;

                                        //var buff21 = ArrayUtils.GetSafe<int>(characterBody.buffs, 21) > 0;
                                        //TODO: https://discordapp.com/channels/562704639141740588/562704639569428506/832713043158892596
                                        bool flag15 = selfCharacterBody.HasBuff((BuffIndex)21) && !selfCharacterBody.HasBuff(Modules.Buffs.igniteDebuff);
                                        if (flag15)
                                        {
                                            selfCharacterBody.AddTimedBuff(Modules.Buffs.igniteDebuff, 16f);

                                            var modelLocator = self.GetComponent <CharacterBody>().modelLocator;
                                            if (modelLocator)
                                            {
                                                Transform modelTransform = modelLocator.modelTransform;
                                                var       characterModel = modelTransform.GetComponent <CharacterModel>();
                                                if (characterModel)
                                                {
                                                    TemporaryOverlay temporaryOverlay = modelTransform.gameObject.AddComponent <TemporaryOverlay>();
                                                    temporaryOverlay.duration              = 16f;
                                                    temporaryOverlay.animateShaderAlpha    = true;
                                                    temporaryOverlay.alphaCurve            = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f);
                                                    temporaryOverlay.destroyComponentOnEnd = true;
                                                    temporaryOverlay.originalMaterial      = Resources.Load <Material>("Materials/matDoppelganger");
                                                    temporaryOverlay.AddToCharacerModel(characterModel);
                                                }
                                            }
                                            BlastAttack blastAttack = new BlastAttack
                                            {
                                                attacker        = di.attacker,
                                                inflictor       = di.inflictor,
                                                teamIndex       = attackerCharacterBody.teamComponent ? attackerCharacterBody.teamComponent.teamIndex : TeamIndex.Player,
                                                baseForce       = 0f,
                                                position        = self.transform.position,
                                                radius          = 12f,
                                                falloffModel    = BlastAttack.FalloffModel.None,
                                                crit            = di.crit,
                                                baseDamage      = di.damage * 0.2f,
                                                procCoefficient = di.procCoefficient,
                                            };
                                            blastAttack.damageType |= DamageType.Stun1s;
                                            blastAttack.Fire();
                                            BlastAttack blastAttack2 = new BlastAttack
                                            {
                                                attacker        = di.attacker,
                                                inflictor       = di.inflictor,
                                                teamIndex       = attackerCharacterBody.teamComponent ? attackerCharacterBody.teamComponent.teamIndex : TeamIndex.Player,
                                                baseForce       = 0f,
                                                position        = self.transform.position,
                                                radius          = 16f,
                                                falloffModel    = BlastAttack.FalloffModel.None,
                                                crit            = false,
                                                baseDamage      = 0f,
                                                procCoefficient = 0f,
                                                damageType      = DamageType.BypassOneShotProtection
                                            };
                                            blastAttack2.Fire();
                                            EffectManager.SpawnEffect(Resources.Load <GameObject>("Prefabs/Effects/ImpactEffects/MagmaOrbExplosion"), new EffectData
                                            {
                                                origin = self.transform.position,
                                                scale  = 16f
                                            }, true);
                                        }
                                    }
                                    else
                                    {
                                        bool hasGoo = di.damageType.HasFlag(DamageType.ClayGoo);
                                        if (hasGoo)
                                        {
                                            di.damageType = DamageType.Generic;
                                            self.GetComponent <CharacterBody>().AddTimedBuff((BuffIndex)21, 4f);
                                        }
                                        bool flag21 = di.procCoefficient == Modules.Config.rifleProcCoefficient.Value;
                                        bool flag22 = flag21;
                                        if (flag22)
                                        {
                                            self.GetComponent <CharacterBody>().AddTimedBuff((BuffIndex)21, 4f);
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
Esempio n. 29
0
        private void GenericGameEvents_OnHitEnemy(DamageInfo damageInfo, MysticsRisky2UtilsPlugin.GenericCharacterInfo attackerInfo, MysticsRisky2UtilsPlugin.GenericCharacterInfo victimInfo)
        {
            if (attackerInfo.body && victimInfo.body && attackerInfo.inventory && !damageInfo.rejected)
            {
                var isAshDamage = DamageAPI.HasModdedDamageType(damageInfo, ashDamageType);

                var itemCount = 0;
                var itemLevel = 1;
                var ashHelper = attackerInfo.body.GetComponent <MysticsItemsMarwanAshHelper>();
                if (ashHelper)
                {
                    itemCount = ashHelper.itemCount;
                    itemLevel = ashHelper.itemLevel;
                }

                if (!isAshDamage && victimInfo.healthComponent && attackerInfo.gameObject && damageInfo.procCoefficient > 0f)
                {
                    if (itemCount > 0)
                    {
                        var _damage = damage + damagePerLevel * (attackerInfo.body.level - 1f) * itemCount;
                        if (attackerInfo.teamIndex != TeamIndex.Player)
                        {
                            _damage = Mathf.Min(_damage, enemyExtraDamageCap);
                        }
                        var _crit = attackerInfo.body.RollCrit();
                        if (itemLevel < 3)
                        {
                            DamageInfo extraDamageInfo = new DamageInfo();
                            extraDamageInfo.damage           = _damage;
                            extraDamageInfo.attacker         = attackerInfo.gameObject;
                            extraDamageInfo.procCoefficient  = procCoefficient;
                            extraDamageInfo.position         = damageInfo.position;
                            extraDamageInfo.crit             = _crit;
                            extraDamageInfo.damageColorIndex = ashDamageColor;
                            extraDamageInfo.procChainMask    = damageInfo.procChainMask;
                            extraDamageInfo.damageType       = DamageType.Silent;
                            DamageAPI.AddModdedDamageType(extraDamageInfo, ashDamageType);
                            victimInfo.healthComponent.TakeDamage(extraDamageInfo);
                            GlobalEventManager.instance.OnHitEnemy(extraDamageInfo, victimInfo.healthComponent.gameObject);
                        }
                        else
                        {
                            var _radius = radius + radiusPerLevel * (attackerInfo.body.level - (float)upgradeLevel23) * itemCount;
                            if (attackerInfo.teamIndex != TeamIndex.Player)
                            {
                                _radius = Mathf.Min(_radius, enemySpreadRadiusCap);
                            }
                            var blastAttack = new BlastAttack
                            {
                                radius            = _radius,
                                baseDamage        = _damage,
                                procCoefficient   = procCoefficient,
                                crit              = _crit,
                                damageColorIndex  = ashDamageColor,
                                attackerFiltering = AttackerFiltering.Default,
                                falloffModel      = BlastAttack.FalloffModel.None,
                                attacker          = attackerInfo.gameObject,
                                teamIndex         = attackerInfo.teamIndex,
                                position          = damageInfo.position,
                            };
                            DamageAPI.AddModdedDamageType(blastAttack, ashDamageType);
                            blastAttack.Fire();
                        }
                    }
                }
                if (isAshDamage)
                {
                    EffectManager.SimpleImpactEffect(ashHitVFX, damageInfo.position, Vector3.Normalize(Random.onUnitSphere), true);

                    if (itemLevel >= 2)
                    {
                        var dotInfo = new InflictDotInfo
                        {
                            victimObject     = victimInfo.gameObject,
                            attackerObject   = attackerInfo.gameObject,
                            dotIndex         = Buffs.MarwanAshBurn.ashDotIndex,
                            duration         = dotDuration,
                            damageMultiplier = 1f,
                            totalDamage      = null
                        };

                        var strengthenBurnCount = attackerInfo.inventory.GetItemCount(DLC1Content.Items.StrengthenBurn);
                        if (strengthenBurnCount > 0)
                        {
                            dotInfo.dotIndex = Buffs.MarwanAshBurnStrong.ashDotIndex;
                            var multiplier = 1f + 3f * (float)strengthenBurnCount;
                            dotInfo.damageMultiplier *= multiplier;
                            dotInfo.duration         *= multiplier;
                        }

                        DotController.InflictDot(ref dotInfo);
                    }
                }
            }
        }
Esempio n. 30
0
        public override void FixedUpdate()
        {
            base.FixedUpdate();
            if (base.isAuthority && this.modelAnimator && this.modelAnimator.GetFloat("Hammer.hitBoxActive") > 0.5f)
            {
                if (!this.hasSwung)
                {
                    Ray aimRay = base.GetAimRay();
                    //EffectManager.SimpleMuzzleFlash(this.swingEffectPrefab, base.gameObject, "SwingCenter", true);
                    blastAttack.Fire();

                    /*for (float num = 0f; num < 9f; num += 1f)
                     * {
                     *  float num2 = 6.2831855f;
                     *  Vector3 forward = new Vector3(Mathf.Cos(num / 9f * num2), 0f, Mathf.Sin(num / 9f * num2));
                     *  FireProjectileInfo fireProjectileInfo2 = new FireProjectileInfo
                     *  {
                     *      projectilePrefab = gameObject,
                     *      position = base.characterBody.corePosition,
                     *      rotation = Quaternion.LookRotation(forward),
                     *      damage = this.damageStat * 1f,
                     *      force = 80f,
                     *      crit = RollCrit(),
                     *      damageColorIndex = DamageColorIndex.Default,
                     *      target = null,
                     *      owner = base.gameObject
                     *  };
                     *  ProjectileManager.instance.FireProjectile(fireProjectileInfo2);
                     * }*/
                    if (BIGSLAM.notificationEffectPrefab)
                    {
                        EffectManager.SpawnEffect(BIGSLAM.notificationEffectPrefab, new EffectData
                        {
                            origin = aimRay.origin,
                            scale  = 15
                        }, true);
                    }
                    else
                    {
                        EffectManager.SpawnEffect(BIGSLAM.notificationEffectPrefab, new EffectData
                        {
                            origin = aimRay.origin,
                            scale  = 15
                        }, true);
                    }
                    if (BIGSLAM.rumbleEffectPrefab)
                    {
                        EffectManager.SpawnEffect(BIGSLAM.rumbleEffectPrefab, new EffectData
                        {
                            origin = aimRay.origin,
                            scale  = 15
                        }, true);
                    }
                    else
                    {
                        EffectManager.SpawnEffect(BIGSLAM.rumbleEffectPrefab, new EffectData
                        {
                            origin = aimRay.origin,
                            scale  = 15
                        }, true);
                    }
                    Util.PlaySound("Play_MULT_shift_hit", base.gameObject);
                    this.hasSwung = true;
                }
                this.attack.forceVector = this.hammerChildTransform.right * this.forceMagnitude;
                this.attack.Fire(null);
            }
            if (base.fixedAge >= this.duration && base.isAuthority)
            {
                this.outer.SetNextStateToMain();
                return;
            }
            else
            {
                var enemies = CollectEnemies(3, base.transform.position + base.characterDirection.forward * 2f, 3f);
                if (base.isAuthority && this.enteredHitPause && this.hitPauseTimer > 0f && (CheckCollider(enemies)))
                {
                    this.hitPauseTimer          -= Time.fixedDeltaTime;
                    base.characterMotor.velocity = Vector3.zero;
                    if (this.hitPauseTimer <= 0f)
                    {
                        this.ExitHitPause();
                    }
                }
            }
        }