Beispiel #1
0
        public override IEnumerable<TickTimer> Run()
        {
            yield return WaitSeconds(0.25f); // wait for swing animation

            User.PlayEffectGroup(18662);

            if (CanHitMeleeTarget(Target))
            {
                var payload = new AttackPayload(this);
                payload.AddTarget(Target);
                payload.AddWeaponDamage(1.45f, DamageType.Physical);
                payload.OnHit = (hit) =>
                {
                    GeneratePrimaryResource(6f);

                    if (Rand.NextDouble() < 0.20)
                        Knockback(Target, 4f);
                };

                payload.Apply();
            }

            yield break;
        }