Beispiel #1
0
            public override bool Tick(Actor self)
            {
                if (IsCanceling)
                {
                    return(true);
                }

                if (target.Type != TargetType.Invalid && !move.CanEnterTargetNow(self, target))
                {
                    QueueChild(new MoveAdjacentTo(self, target, targetLineColor: Color.Red));
                    return(false);
                }

                if (!initiated)
                {
                    // If the target has died while we were moving, we should abort detonation.
                    if (target.Type == TargetType.Invalid)
                    {
                        return(true);
                    }

                    if (mad.conditionManager != null && !string.IsNullOrEmpty(mad.info.DeployedCondition))
                    {
                        mad.conditionManager.GrantCondition(self, mad.info.DeployedCondition);
                    }

                    self.World.AddFrameEndTask(w => EjectDriver());
                    if (mad.info.ThumpSequence != null)
                    {
                        wfsb.PlayCustomAnimationRepeating(self, mad.info.ThumpSequence);
                    }

                    IsInterruptible = false;
                    initiated       = true;
                }

                if (++ticks % mad.info.ThumpInterval == 0)
                {
                    if (mad.info.ThumpDamageWeapon != null)
                    {
                        // Use .FromPos since this weapon needs to affect more than just the MadTank actor
                        mad.info.ThumpDamageWeaponInfo.Impact(Target.FromPos(self.CenterPosition), self, Enumerable.Empty <int>());
                    }

                    screenShaker.AddEffect(mad.info.ThumpShakeTime, self.CenterPosition, mad.info.ThumpShakeIntensity, mad.info.ThumpShakeMultiplier);
                }

                if (ticks == mad.info.ChargeDelay)
                {
                    Game.Sound.Play(SoundType.World, mad.info.ChargeSound, self.CenterPosition);
                }

                return(ticks == mad.info.ChargeDelay + mad.info.DetonationDelay);
            }
Beispiel #2
0
		public void Tick(Actor self)
		{
			if (!deployed)
				return;

			if (++tick >= info.ThumpInterval)
			{
				if (info.ThumpDamageWeapon != null)
				{
					// Use .FromPos since this weapon needs to affect more than just the MadTank actor
					info.ThumpDamageWeaponInfo.Impact(Target.FromPos(self.CenterPosition), self, Enumerable.Empty<int>());
				}

				screenShaker.AddEffect(info.ThumpShakeTime, self.CenterPosition, info.ThumpShakeIntensity, info.ThumpShakeMultiplier);
				tick = 0;
			}
		}
Beispiel #3
0
        public void Tick(Actor self)
        {
            if (!deployed)
            {
                return;
            }

            if (++tick >= info.ThumpInterval)
            {
                if (info.ThumpDamageWeapon != null)
                {
                    Combat.DoExplosion(self, info.ThumpDamageWeapon, self.CenterPosition);
                }
                screenShaker.AddEffect(info.ThumpShakeTime, self.CenterPosition, info.ThumpShakeIntensity, info.ThumpShakeMultiplier);
                tick = 0;
            }
        }
Beispiel #4
0
        public void Tick(Actor self)
        {
            if (!deployed)
            {
                return;
            }

            if (++tick >= info.ThumpInterval)
            {
                if (info.ThumpDamageWeapon != null)
                {
                    var weapon = self.World.Map.Rules.Weapons[info.ThumpDamageWeapon.ToLowerInvariant()];
                    // Use .FromPos since this weapon needs to affect more than just the MadTank actor
                    weapon.Impact(Target.FromPos(self.CenterPosition), self, Enumerable.Empty <int>());
                }
                screenShaker.AddEffect(info.ThumpShakeTime, self.CenterPosition, info.ThumpShakeIntensity, info.ThumpShakeMultiplier);
                tick = 0;
            }
        }