Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [ImplementsPowerSNO(Skills.Skills.DemonHunter.Discipline.Vault)]
- public class DemonHunterVault : PowerScript
- {
- public override IEnumerable<TickTimer> Run()
- {
- //StartCooldown(WaitSeconds(10f));
- Vector3D delta = new Vector3D(TargetPosition - User.Position);
- float delta_length = (float)Math.Sqrt(delta.X * delta.X + delta.Y * delta.Y);
- Vector3D delta_normal = new Vector3D(delta.X / delta_length, delta.Y / delta_length, delta.Z / delta_length);
- float unitsMovedPerTick = 60f;
- Vector3D ramp = new Vector3D(delta_normal.X * (delta_length / unitsMovedPerTick),
- delta_normal.Y * (delta_length / unitsMovedPerTick),
- 0.1f); // usual leap height, possibly different when jumping up/down?
- // TODO: Generalize this and put it in Actor
- User.World.BroadcastIfRevealed(new ACDTranslateArcMessage()
- {
- ActorId = (int)User.DynamicID,
- Start = User.Position,
- Velocity = ramp,
- //Field3 = 69793, // used for male barb leap
- FlyingAnimationTagID = 69792, // used for female dh backflip
- LandingAnimationTagID = 69794,
- Field6 = -0.1f, // gravity
- Field7 = Skills.Skills.DemonHunter.Discipline.Vault,
- Field8 = 0,
- Field9 = TargetPosition.Z,
- }, User);
- User.Position = TargetPosition;
- // wait for leap to hit
- yield return WaitSeconds(0.6f);
- yield break;
- }
- }
- [ImplementsPowerSNO(Skills.Skills.DemonHunter.HatredSpenders.FanOfKnives)]
- public class DemonHunterFanOfKnives : PowerScript
- {
- public override IEnumerable<TickTimer> Run()
- {
- UsePrimaryResource(20f);
- //StartCooldown(WaitSeconds(10f));
- AttackPayload attack = new AttackPayload(this);
- attack.AddTargets(GetEnemiesInRadius(User.Position, 10));
- attack.AddWeaponDamage(0.5f, DamageType.Physical);
- attack.OnHit = (hit) =>
- {
- AddBuff(hit.Target, new DebuffSlowed(WaitSeconds(4f)));
- };
- attack.Apply();
- //WeaponDamage(GetEnemiesInRadius(User.Position, 10f), 1.00f, DamageType.Physical);
- User.PlayEffectGroup(77547);
- yield break;
- }
- }
Add Comment
Please, Sign In to add comment