Ejemplo n.º 1
0
        private void On_ToolbotDashExit(On.EntityStates.Toolbot.ToolbotDash.orig_OnExit orig, EntityStates.Toolbot.ToolbotDash self)
        {
            orig(self);
            var cpt = self.outer.commonComponents.characterBody.GetComponent <ScepterToolbotDashTracker>();

            if (!cpt || !cpt.enabled)
            {
                return;
            }
            new BlastAttack
            {
                attacker          = self.outer.commonComponents.characterBody.gameObject,
                attackerFiltering = AttackerFiltering.NeverHit,
                baseDamage        = cpt.trackedDamageTaken * 2f,
                baseForce         = 1000f,
                bonusForce        = Vector3.up * 500f,
                crit             = self.outer.commonComponents.characterBody.RollCrit(),
                damageColorIndex = DamageColorIndex.Default,
                damageType       = DamageType.Stun1s,
                falloffModel     = BlastAttack.FalloffModel.Linear,
                losType          = BlastAttack.LoSType.None,
                position         = self.outer.commonComponents.transform.position,
                procCoefficient  = 1f,
                radius           = 20f,
                teamIndex        = self.outer.commonComponents.teamComponent?.teamIndex ?? TeamIndex.Count
            }.Fire();
            EffectManager.SpawnEffect(Resources.Load <GameObject>("prefabs/effects/omnieffect/OmniExplosionVFX"),
                                      new EffectData
            {
                origin = self.outer.commonComponents.transform.position,
                scale  = 20f
            }, true);

            cpt.enabled = false;
        }
Ejemplo n.º 2
0
        private void On_ToolbotDashExit(On.EntityStates.Toolbot.ToolbotDash.orig_OnExit orig, EntityStates.Toolbot.ToolbotDash self)
        {
            orig(self);
            var cpt = self.outer.commonComponents.characterBody.GetComponent <ScepterToolbotDashTracker>();

            if (!cpt || !cpt.enabled)
            {
                return;
            }
            new BlastAttack {
                attacker          = self.outer.commonComponents.characterBody.gameObject,
                attackerFiltering = AttackerFiltering.NeverHitSelf,
                baseDamage        = cpt.trackedDamageTaken * 2f,
                baseForce         = 1000f,
                bonusForce        = Vector3.up * 500f,
                crit             = self.outer.commonComponents.characterBody.RollCrit(),
                damageColorIndex = default,