public override bool Update() { if (Timeout.TimedOut) { Target.PlayEffectGroup(RuneSelect(77573, 153727, 154073, 154074, 154072, 154070)); if (Rune_D > 0) { if (Rand.NextDouble() < ScriptFormula(31)) { GenerateSecondaryResource(ScriptFormula(32)); } } AttackPayload attack = new AttackPayload(this); attack.Targets = GetEnemiesInRadius(Target.Position, ScriptFormula(20)); attack.AddWeaponDamage(ScriptFormula(6), RuneSelect(DamageType.Fire, DamageType.Fire, DamageType.Poison, DamageType.Lightning, DamageType.Fire, DamageType.Arcane)); if (Rune_C > 0) { attack.OnHit = (hitPayload) => { if (Rand.NextDouble() < ScriptFormula(28)) { AddBuff(hitPayload.Target, new DebuffStunned(WaitSeconds(ScriptFormula(29)))); } }; } attack.Apply(); } return(base.Update()); }
IEnumerable <TickTimer> _RuneE() { float attackRadius = 8f; // value is not in formulas, just a guess Vector3D castedPosition = new Vector3D(User.Position); float castAngle = MovementHelpers.GetFacingAngle(castedPosition, TargetPosition); float waveOffset = 0f; int flyerCount = (int)ScriptFormula(15); for (int n = 0; n < flyerCount; ++n) { waveOffset += 3.0f; var wavePosition = PowerMath.TranslateDirection2D(castedPosition, TargetPosition, castedPosition, waveOffset); var flyerPosition = RandomDirection(wavePosition, 0f, attackRadius); var flyer = SpawnEffect(200561, flyerPosition, castAngle, WaitSeconds(ScriptFormula(20))); flyer.OnTimeout = () => { flyer.PlayEffectGroup(200819); AttackPayload attack = new AttackPayload(this); attack.Targets = GetEnemiesInRadius(flyerPosition, attackRadius); attack.AddWeaponDamage(ScriptFormula(11), DamageType.Physical); attack.OnHit = (hitPayload) => { Knockback(hitPayload.Target, 90f); }; attack.Apply(); }; yield return(WaitSeconds(ScriptFormula(4))); } }
public override IEnumerable <TickTimer> Main() { //StartCooldown(WaitSeconds(10f)); var projectile = new Projectile(this, 74636, User.Position); projectile.Timeout = WaitSeconds(0.5f); projectile.OnCollision = (hit) => { GeneratePrimaryResource(15f); _setupReturnProjectile(hit.Position); AttackPayload attack = new AttackPayload(this); attack.SetSingleTarget(hit); attack.AddWeaponDamage(1.00f, DamageType.Physical); attack.OnHit = (hitPayload) => { // GET OVER HERE Knockback(hitPayload.Target, -25f, 1f, -0.03f); }; attack.Apply(); projectile.Destroy(); }; projectile.OnTimeout = () => { _setupReturnProjectile(projectile.Position); }; projectile.Launch(TargetPosition, 1.9f); User.AddRopeEffect(79402, projectile); yield break; }
public override IEnumerable<TickTimer> Main() { float reachLength; float reachThickness; switch(ComboIndex) { case 0: reachLength = 13; reachThickness = 3f; break; case 1: reachLength = 14; reachThickness = 4.5f; break; case 2: reachLength = 18; reachThickness = 4.5f; break; default: yield break; } bool hitAnything = false; AttackPayload attack = new AttackPayload(this); attack.Targets = GetEnemiesInBeamDirection(User.Position, TargetPosition, reachLength, reachThickness); attack.AddWeaponDamage(1.20f, DamageType.Physical); attack.OnHit = hitPayload => { hitAnything = true; }; attack.Apply(); if (hitAnything) GeneratePrimaryResource(6f); yield break; }
public void WeaponDamage(TargetList targets, float damageMultiplier, DamageType damageType) { AttackPayload payload = new AttackPayload(this); payload.Targets = targets; payload.AddWeaponDamage(damageMultiplier, damageType); payload.Apply(); }
public void Damage(Actor target, float minDamage, float damageDelta, DamageType damageType) { AttackPayload payload = new AttackPayload(this); payload.SetSingleTarget(target); payload.AddDamage(minDamage, damageDelta, damageType); payload.Apply(); }
public void WeaponDamage(Actor target, float damageMultiplier, DamageType damageType) { AttackPayload payload = new AttackPayload(this); payload.SetSingleTarget(target); payload.AddWeaponDamage(damageMultiplier, damageType); payload.Apply(); }
public void Damage(TargetList targets, float minDamage, float damageDelta, DamageType damageType) { AttackPayload payload = new AttackPayload(this); payload.Targets = targets; payload.AddDamage(minDamage, damageDelta, damageType); payload.Apply(); }
public override IEnumerable<TickTimer> Main() { bool hitAnything = false; var ShockWavePos = PowerMath.TranslateDirection2D(User.Position, TargetPosition, User.Position, ScriptFormula(23)); var maxHits = ScriptFormula(1); for (int i = 0; i < maxHits; ++i) { AttackPayload attack = new AttackPayload(this); attack.Targets = GetBestMeleeEnemy(); if (i == 0) { attack.AddWeaponDamage(ScriptFormula(3), DamageType.Physical); } else { attack.AddWeaponDamage(ScriptFormula(12), DamageType.Physical); } attack.OnHit = hitPayload => { hitAnything = true; if (Rune_D > 0) { GeneratePrimaryResource(ScriptFormula(10)); } if (Rune_B > 0) { AddBuff(User, new AddDamageBuff()); } if (Rune_A > 0) { } else if (Rune_C > 0) { if (Rand.NextDouble() < ScriptFormula(14)) AddBuff(hitPayload.Target, new DebuffStunned(WaitSeconds(ScriptFormula(15)))); } else { if (Rand.NextDouble() < ScriptFormula(0)) Knockback(hitPayload.Target, ScriptFormula(5), ScriptFormula(6), ScriptFormula(7)); } }; attack.Apply(); yield return WaitSeconds(ScriptFormula(13)); if(hitAnything) GeneratePrimaryResource(EvalTag(PowerKeys.ResourceGainedOnFirstHit)); } //Shockwave -> capsule distance, at the moment using beamdirection if (Rune_E > 0) { User.PlayEffectGroup(93867); yield return WaitSeconds(0.5f); WeaponDamage(GetEnemiesInBeamDirection(ShockWavePos, TargetPosition, 30f, 8f), ScriptFormula(18), DamageType.Physical); } yield break; }
public override IEnumerable <TickTimer> Main() { AttackPayload attack = new AttackPayload(this); attack.Targets = GetBestMeleeEnemy(); attack.AddWeaponDamage(1.00f, DamageType.Physical); attack.Apply(); yield break; }
private void MeleeStageHit() { AttackPayload attack = new AttackPayload(this); attack.Targets = GetBestMeleeEnemy(); attack.AddWeaponDamage(1.20f, DamageType.Lightning); attack.OnHit = hitPayload => { GeneratePrimaryResource(6f); }; attack.Apply(); }
public override IEnumerable <TickTimer> Main() { AttackPayload attack = new AttackPayload(this); switch (ComboIndex) { case 0: case 1: attack.Targets = GetBestMeleeEnemy(); attack.AddWeaponDamage(ScriptFormula(0), DamageType.Physical); if (Rune_C > 0) { attack.AddBuffOnHit <RuneCDebuff>(); } break; case 2: if (Rune_B > 0) { attack.Targets = GetEnemiesInArcDirection(User.Position, TargetPosition, ScriptFormula(19), ScriptFormula(20)); int maxTargets = (int)ScriptFormula(18); if (maxTargets < attack.Targets.Actors.Count) { attack.Targets.Actors.RemoveRange(maxTargets, attack.Targets.Actors.Count - maxTargets); } } else { attack.Targets = GetBestMeleeEnemy(); } attack.AutomaticHitEffects = false; attack.AddBuffOnHit <MainDebuff>(); break; default: yield break; } bool hitAnything = false; attack.OnHit = hitPayload => { hitAnything = true; }; attack.Apply(); if (hitAnything) { GeneratePrimaryResource(6f); } yield break; }
public override IEnumerable <TickTimer> Main() { int effectSNO; switch (ComboIndex) { case 0: effectSNO = 18987; break; case 1: effectSNO = 18988; break; case 2: effectSNO = 96519; break; default: yield break; } User.PlayEffectGroup(effectSNO); bool hitAnything = false; AttackPayload attack = new AttackPayload(this); if (ComboIndex != 2) { attack.Targets = GetEnemiesInArcDirection(User.Position, TargetPosition, ScriptFormula(5), ScriptFormula(6)); } else { attack.Targets = GetEnemiesInRadius(User.Position, ScriptFormula(8)); } attack.AddWeaponDamage(1.10f, DamageType.Physical); attack.OnHit = hitPayload => { hitAnything = true; }; attack.Apply(); if (hitAnything) { GeneratePrimaryResource(6f); } yield break; }
public override IEnumerable<TickTimer> Main() { AttackPayload attack = new AttackPayload(this); attack.Targets = GetBestMeleeEnemy(); attack.AddWeaponDamage(1.45f, DamageType.Physical); attack.OnHit = hitPayload => { GeneratePrimaryResource(6f); if (Rand.NextDouble() < 0.20) Knockback(hitPayload.Target, ScriptFormula(5), ScriptFormula(6), ScriptFormula(7)); }; attack.Apply(); yield break; }
public override IEnumerable <TickTimer> Run() { UsePrimaryResource(25f); StartCooldown(WaitSeconds(15f)); yield return(WaitSeconds(0.350f)); // wait for wizard to land User.PlayEffectGroup(19356); AttackPayload attack = new AttackPayload(this); attack.Targets = GetEnemiesInRadius(User.Position, 20f); attack.AddWeaponDamage(2.05f, DamageType.Physical); attack.OnHit = hitPayload => { Knockback(hitPayload.Target, ScriptFormula(0), ScriptFormula(4), ScriptFormula(5)); }; attack.Apply(); yield break; }
public override bool Update() { if (base.Update()) { return(true); } if (_damageTimer == null || _damageTimer.TimedOut) { _damageTimer = WaitSeconds(_damageRate); AttackPayload attack = new AttackPayload(this); attack.SetSingleTarget(Target); attack.AddWeaponDamage(ScriptFormula(6) * _damageRate, DamageType.Physical); attack.AutomaticHitEffects = false; attack.Apply(); } return(false); }
public override void OnPayload(Payload payload) { if (payload.Target == Target && payload is DeathPayload) { AttackPayload attack = new AttackPayload(this); attack.Targets = GetEnemiesInRadius(Target.Position, ScriptFormula(11)); attack.AddDamage(ScriptFormula(9) * Target.Attributes[GameAttribute.Hitpoints_Max_Total], ScriptFormula(10), DamageType.Physical); if (Rune_D > 0) { attack.OnHit = (hitPayload) => { GeneratePrimaryResource(ScriptFormula(14)); }; } attack.Apply(); SpawnProxy(Target.Position).PlayEffectGroup(18991); } }
public override IEnumerable <TickTimer> Main() { AttackPayload attack = new AttackPayload(this); attack.Targets = GetBestMeleeEnemy(); attack.AddWeaponDamage(1.45f, DamageType.Physical); attack.OnHit = hitPayload => { GeneratePrimaryResource(6f); if (Rand.NextDouble() < 0.20) { Knockback(hitPayload.Target, ScriptFormula(5), ScriptFormula(6), ScriptFormula(7)); } }; attack.Apply(); yield break; }
public override IEnumerable <TickTimer> Main() { //StartCooldown(WaitSeconds(10f)); ActorMover mover = new ActorMover(User); mover.MoveArc(TargetPosition, 10, -0.1f, new ACDTranslateArcMessage { //Field3 = 303110, // used for male barb leap, not needed? FlyingAnimationTagID = AnimationSetKeys.Attack2.ID, LandingAnimationTagID = -1, Field7 = PowerSNO }); // wait for landing while (!mover.Update()) { yield return(WaitTicks(1)); } // extra wait for leap to finish yield return(WaitTicks(1)); // ground smash effect User.PlayEffectGroup(162811); bool hitAnything = false; AttackPayload attack = new AttackPayload(this); attack.Targets = GetEnemiesInRadius(TargetPosition, 8f); attack.AddWeaponDamage(0.70f, DamageType.Physical); attack.OnHit = hitPayload => { hitAnything = true; }; attack.Apply(); if (hitAnything) { GeneratePrimaryResource(15f); } yield break; }
public override IEnumerable <TickTimer> Main() { float reachLength; float reachThickness; switch (ComboIndex) { case 0: reachLength = 13; reachThickness = 3f; break; case 1: reachLength = 14; reachThickness = 4.5f; break; case 2: reachLength = 18; reachThickness = 4.5f; break; default: yield break; } bool hitAnything = false; AttackPayload attack = new AttackPayload(this); attack.Targets = GetEnemiesInBeamDirection(User.Position, TargetPosition, reachLength, reachThickness); attack.AddWeaponDamage(1.20f, DamageType.Physical); attack.OnHit = hitPayload => { hitAnything = true; }; attack.Apply(); if (hitAnything) { GeneratePrimaryResource(6f); } yield break; }
public override IEnumerable <TickTimer> Run() { UsePrimaryResource(45f); SpawnEffect(Wizard_Blizzard, TargetPosition); const int blizzard_duration = 3; for (int i = 0; i < blizzard_duration; ++i) { AttackPayload attack = new AttackPayload(this); attack.Targets = GetEnemiesInRadius(TargetPosition, 18f); attack.AddWeaponDamage(0.65f, DamageType.Cold); attack.OnHit = (hit) => { AddBuff(hit.Target, new DebuffChilled(WaitSeconds(3f))); }; attack.Apply(); yield return(WaitSeconds(1f)); } }
public override IEnumerable <TickTimer> Main() { StartDefaultCooldown(); UsePrimaryResource(EvalTag(PowerKeys.ResourceCost)); AttackPayload attack = new AttackPayload(this); attack.Targets = GetEnemiesInRadius(User.Position, ScriptFormula(1)); attack.OnHit = (hit) => { TickTimer waitBuffEnd = WaitSeconds(ScriptFormula(0)); // add main effect buff only if blind debuff took effect if (AddBuff(hit.Target, new DebuffBlind(waitBuffEnd))) { AddBuff(hit.Target, new MainEffectBuff(waitBuffEnd)); } }; attack.Apply(); yield break; }
IEnumerable <TickTimer> _RuneD() { int flyerCount = (int)ScriptFormula(14); for (int n = 0; n < flyerCount; ++n) { var flyerPosition = RandomDirection(TargetPosition, 0f, ScriptFormula(7)); var flyer = SpawnEffect(200808, flyerPosition, 0f, WaitSeconds(ScriptFormula(5))); flyer.OnTimeout = () => { flyer.PlayEffectGroup(200516); AttackPayload attack = new AttackPayload(this); attack.Targets = GetEnemiesInRadius(flyerPosition, ScriptFormula(13)); attack.AddWeaponDamage(ScriptFormula(12), DamageType.Fire); attack.OnHit = (hitPayload) => { AddBuff(hitPayload.Target, new DebuffStunned(WaitSeconds(ScriptFormula(37)))); }; attack.Apply(); }; yield return(WaitSeconds(ScriptFormula(4))); } }
public override IEnumerable <TickTimer> Main() { switch (TargetMessage.Field5) { case 0: case 1: MeleeStageHit(); break; case 2: //AddBuff(User, new ComboStage3Buff()); // put target position a little bit in front of the monk. represents the lightning ball TargetPosition = PowerMath.TranslateDirection2D(User.Position, TargetPosition, User.Position, 8f); bool hitAnything = false; AttackPayload attack = new AttackPayload(this); attack.Targets = GetEnemiesInRadius(TargetPosition, 7f); attack.AddWeaponDamage(1.20f, DamageType.Lightning); attack.OnHit = hitPayload => { hitAnything = true; Knockback(hitPayload.Target, 12f); }; attack.Apply(); if (hitAnything) { GeneratePrimaryResource(6f); } break; } yield break; }
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; }
private void MeleeStageHit() { if (Rune_D > 0) { if (Rand.NextDouble() < ScriptFormula(25)) { GeneratePrimaryResource(ScriptFormula(24)); } } bool hitAnything = false; AttackPayload attack = new AttackPayload(this); attack.Targets = GetBestMeleeEnemy(); attack.AddWeaponDamage(ScriptFormula(0), DamageType.Physical); attack.OnHit = hitPayload => { hitAnything = true; }; attack.Apply(); if (hitAnything) { GeneratePrimaryResource(EvalTag(PowerKeys.SpiritGained)); if (Rune_C > 0) { AddBuff(User, new RuneCbuff()); } } }
public override bool Update() { _mover.Update(); if (base.Update()) return true; if (_damageTimer == null || _damageTimer.TimedOut) { _damageTimer = WaitSeconds(_damageRate); AttackPayload attack = new AttackPayload(this); attack.AddWeaponDamage(ScriptFormula(16), DamageType.Physical); attack.Targets = GetEnemiesInRadius(User.Position, ScriptFormula(6)); attack.OnHit = hit => { hitAnything = true; Knockback(hit.Target, ScriptFormula(2)); if (Rune_B > 0) { User.Attributes[GameAttribute.Hitpoints_Granted] += ScriptFormula(21); User.Attributes.BroadcastChangedIfRevealed(); } if (Rune_D > 0) { GeneratePrimaryResource(ScriptFormula(11)); } if (Rune_C > 0) { if (hit.IsCriticalHit) { AddBuff(hit.Target, new DebuffStunned(WaitSeconds(ScriptFormula(8)))); } } if (Rune_E > 0) { int resourceHit = 0; while (resourceHit < ScriptFormula(10)) { //maybe this cannot go here? } } }; attack.Apply(); } return false; }
public override IEnumerable<TickTimer> Main() { bool hitAnything = false; AttackPayload attack = new AttackPayload(this); attack.Targets = GetBestMeleeEnemy(); attack.AddWeaponDamage(2f, DamageType.Physical); attack.OnHit = hitPayload => { hitAnything = true; AddBuff(User, new FrenzyBuff()); if (Rune_C > 0) { AddBuff(User, new ObsidianSpeedEffect()); } if (Rune_B > 0) { if (Rand.NextDouble() < ScriptFormula(17)) { Actor target = GetEnemiesInRadius(User.Position, 15f).GetClosestTo(User.Position); var proj = new Projectile(this, RuneSelect(6515, 130073, 215555, -1, 216040, 75650), User.Position); proj.Position.Z += 5f; // fix height proj.OnCollision = (hit) => { WeaponDamage(hit, ScriptFormula(18), DamageType.Physical); }; proj.Launch(target.Position, 2f); } } if (Rune_D > 0) { if (Rand.NextDouble() < 1) { hitPayload.Target.PlayEffectGroup(163470); AddBuff(hitPayload.Target, new DebuffStunned(WaitSeconds(ScriptFormula(0)))); } } }; attack.OnDeath = DeathPayload => { if (Rune_E > 0) { User.Attributes[GameAttribute.Hitpoints_Granted_Duration] += (int)ScriptFormula(12); User.Attributes[GameAttribute.Hitpoints_Granted] += ScriptFormula(10) * User.Attributes[GameAttribute.Hitpoints_Max_Total]; User.Attributes.BroadcastChangedIfRevealed(); } }; attack.Apply(); if (hitAnything) GeneratePrimaryResource(EvalTag(PowerKeys.ResourceGainedOnFirstHit) + ScriptFormula(19)); yield break; }
public override IEnumerable<TickTimer> Main() { bool hitAnything = false; StartCooldown(EvalTag(PowerKeys.CooldownTime)); User.PlayEffectGroup(RuneSelect(18685, 99685, 159415, 159416, 159397, 18685)); //Rune_E -> when stun wears off, use slow.efg AttackPayload attack = new AttackPayload(this); attack.Targets = GetEnemiesInRadius(User.Position, ScriptFormula(0)); attack.AddWeaponDamage(ScriptFormula(6), DamageType.Physical); attack.OnHit = hitPayload => { hitAnything = true; if (Rune_B > 0) { //push em away! Knockback(hitPayload.Target, ScriptFormula(13), ScriptFormula(14)); } if (Rune_C > 0) { //bring em in! Knockback(hitPayload.Target, ScriptFormula(11), ScriptFormula(12)); } AddBuff(hitPayload.Target, new GroundStompStun()); }; attack.Apply(); if (hitAnything) GeneratePrimaryResource(EvalTag(PowerKeys.ResourceGainedOnFirstHit) + ScriptFormula(19)); yield break; }
public override IEnumerable<TickTimer> Main() { //StartCooldown(WaitSeconds(10f)); if (Rune_B > 0) { Vector3D[] projDestinations = PowerMath.GenerateSpreadPositions(User.Position, TargetPosition, ScriptFormula(9), (int)ScriptFormula(11)); for (int i = 0; i < projDestinations.Length; i++) { var proj = new Projectile(this, 74636, User.Position); proj.Timeout = WaitSeconds(0.5f); proj.OnCollision = (hit) => { GeneratePrimaryResource(15f); _setupReturnProjectile(hit.Position); AttackPayload attack = new AttackPayload(this); attack.SetSingleTarget(hit); attack.AddWeaponDamage(ScriptFormula(0), DamageType.Physical); attack.OnHit = (hitPayload) => { hitPayload.Target.PlayEffectGroup(79420); Knockback(hitPayload.Target, -25f, ScriptFormula(3), ScriptFormula(4)); }; attack.Apply(); proj.Destroy(); }; proj.OnTimeout = () => { _setupReturnProjectile(proj.Position); }; proj.Launch(projDestinations[i], ScriptFormula(8)); User.AddRopeEffect(79402, proj); } } else if (Rune_A > 0) { //Straight line but brings all the zombies in that line back to you. } else { var projectile = new Projectile(this, 74636, User.Position); projectile.Timeout = WaitSeconds(0.5f); projectile.OnCollision = (hit) => { GeneratePrimaryResource(ScriptFormula(12) + ScriptFormula(13)); _setupReturnProjectile(hit.Position); AttackPayload attack = new AttackPayload(this); attack.SetSingleTarget(hit); attack.AddWeaponDamage(ScriptFormula(0), DamageType.Physical); attack.OnHit = (hitPayload) => { // GET OVER HERE //unknown on magnitude/knockback offset? hitPayload.Target.PlayEffectGroup(79420); Knockback(hitPayload.Target, -25f, ScriptFormula(3), ScriptFormula(4)); }; attack.Apply(); projectile.Destroy(); }; projectile.OnTimeout = () => { _setupReturnProjectile(projectile.Position); }; projectile.Launch(TargetPosition, ScriptFormula(8)); User.AddRopeEffect(79402, projectile); } yield break; }
public override IEnumerable<TickTimer> Main() { AttackPayload attack = new AttackPayload(this); attack.Targets = GetBestMeleeEnemy(); attack.AddWeaponDamage(2f, DamageType.Physical); attack.OnHit = hitPayload => { AddBuff(User, new FrenzyBuff()); if (Rune_C > 0) { AddBuff(User, new ObsidianSpeedEffect()); } if (Rune_B > 0) { if (Rand.NextDouble() < ScriptFormula(17)) { Actor target = GetEnemiesInRadius(User.Position, 15f).GetClosestTo(User.Position); var proj = new Projectile(this, RuneSelect(6515, 130073, 215555, -1, 216040, 75650), User.Position); proj.Position.Z += 5f; // fix height proj.OnCollision = (hit) => { WeaponDamage(hit, ScriptFormula(18), DamageType.Physical); }; proj.Launch(target.Position, 2f); } } if (Rune_D > 0) { if (Rand.NextDouble() < 1) { hitPayload.Target.PlayEffectGroup(163470); AddBuff(hitPayload.Target, new DebuffStunned(WaitSeconds(ScriptFormula(0)))); } } }; attack.OnDeath = DeathPayload => { //Rune_E -> heals. }; attack.Apply(); yield break; }
public override IEnumerable<TickTimer> Main() { StartCooldown(EvalTag(PowerKeys.CooldownTime)); UsePrimaryResource(EvalTag(PowerKeys.ResourceCost)); User.PlayEffectGroup(55689); WeaponDamage(GetEnemiesInRadius(User.Position, ScriptFormula(0)), ScriptFormula(19), DamageType.Physical); var Quake = SpawnEffect(168440, User.Position, 0, WaitSeconds(ScriptFormula(1))); Quake.UpdateDelay = 0.5f; Quake.OnUpdate = () => { AttackPayload attack = new AttackPayload(this); attack.Targets = GetEnemiesInRadius(User.Position, ScriptFormula(0)); attack.AddWeaponDamage(ScriptFormula(17), DamageType.Physical); attack.Apply(); }; //Secondary Tremor stuff.. yield break; }
public override IEnumerable<TickTimer> Main() { bool hitAnything = false; WeaponDamage(GetBestMeleeEnemy(), ScriptFormula(16), DamageType.Physical); AttackPayload attack = new AttackPayload(this); attack.Targets = GetEnemiesInArcDirection(User.Position, TargetPosition, ScriptFormula(27), ScriptFormula(26)); attack.AddWeaponDamage(ScriptFormula(16), DamageType.Physical); attack.OnHit = hitPayload => { hitAnything = true; if (Rune_B > 0) { foreach (Actor enemy in GetEnemiesInArcDirection(User.Position, TargetPosition, ScriptFormula(27), ScriptFormula(26)).Actors) { //Snare Duration = SF(14) //Snare Magnitude = SF(20) } } if (Rune_C > 0) { if (hitPayload.IsCriticalHit) { Knockback(hitPayload.Target, ScriptFormula(2), ScriptFormula(3)); //since its a max number of knockback jumps, but its UP TO that number, we will randomize it. int Jumps = Rand.Next((int)ScriptFormula(25)); for (int i = 0; i < Jumps; ++i) { WeaponDamage(hitPayload.Target, ScriptFormula(9), DamageType.Physical); Knockback(hitPayload.Target, ScriptFormula(7), ScriptFormula(8)); } } } if (Rune_D > 0) { //todo: is this right? int StackCount = 0; if (StackCount < ScriptFormula(23) + 1) { StackCount++; } GeneratePrimaryResource(ScriptFormula(22) * StackCount); } if (Rune_E > 0) { //this doesnt work either. attack.OnDeath = DeathPayload => { if (Rand.NextDouble() < ScriptFormula(12)) { AttackPayload explode = new AttackPayload(this); explode.Targets = GetEnemiesInRadius(DeathPayload.Target.Position, ScriptFormula(6)); explode.AddWeaponDamage(ScriptFormula(4), DamageType.Physical); explode.Apply(); } }; } }; attack.Apply(); if(hitAnything) GeneratePrimaryResource(EvalTag(PowerKeys.ResourceGainedOnFirstHit)); yield break; }
private void MultiHit() { if (Rune_D > 0) { if (Rand.NextDouble() < ScriptFormula(25)) { GeneratePrimaryResource(ScriptFormula(24)); } } //TODO: this needs to be redone when I figure out how to do multiple hits to certain MAX targets.. bool hitAnything = false; AttackPayload attack = new AttackPayload(this); attack.Targets = GetEnemiesInArcDirection(User.Position,TargetPosition, ScriptFormula(28), ScriptFormula(29)); attack.AddWeaponDamage(ScriptFormula(1), DamageType.Physical); attack.OnHit = hitPayload => { hitAnything = true; if (Rune_A > 0) { AddBuff(hitPayload.Target, new RuneA_DOT_100Fists()); } }; attack.Apply(); if (hitAnything) { GeneratePrimaryResource(EvalTag(PowerKeys.SpiritGained)); if (Rune_C > 0) { AddBuff(User, new RuneCbuff()); } } }
public override IEnumerable<TickTimer> Main() { AttackPayload attack = new AttackPayload(this); attack.Targets = GetEnemiesInRadius(User.Position, ScriptFormula(4)); attack.OnHit = hitPayload => { AddBuff(hitPayload.Target, new RendDebuff()); }; //this work? if it dies with rend debuff, infect others. attack.OnDeath = DeathPayload => { if (AddBuff(Target, new RendDebuff())) { AttackPayload BleedAgain = new AttackPayload(this); BleedAgain.Targets = GetEnemiesInRadius(Target.Position, ScriptFormula(19)); BleedAgain.OnHit = hitPayload2 => { AddBuff(hitPayload2.Target, new RendDebuff()); }; BleedAgain.Apply(); } }; attack.Apply(); yield break; }
public override bool Update() { if (base.Update()) return true; if (_damageTimer == null || _damageTimer.TimedOut) { _damageTimer = WaitSeconds(_damageRate); AttackPayload attack = new AttackPayload(this); attack.SetSingleTarget(Target); attack.AddWeaponDamage(ScriptFormula(6) * _damageRate, DamageType.Physical); attack.AutomaticHitEffects = false; attack.Apply(); } return false; }
public override IEnumerable<TickTimer> Main() { bool hitAnything = false; //StartCooldown(WaitSeconds(10f)); if (Rune_C > 0) { AttackPayload launch = new AttackPayload(this); launch.Targets = GetEnemiesInRadius(User.Position, ScriptFormula(31)); launch.AddWeaponDamage(ScriptFormula(30), DamageType.Physical); launch.OnHit = hitPayload => { hitAnything = true; }; launch.Apply(); User.PlayEffectGroup(165924); //Not sure if this is the only effect to be displayed in this case } ActorMover mover = new ActorMover(User); mover.MoveArc(TargetPosition, 10, -0.1f, new ACDTranslateArcMessage { //Field3 = 303110, // used for male barb leap, not needed? FlyingAnimationTagID = AnimationSetKeys.Attack2.ID, LandingAnimationTagID = -1, Field7 = PowerSNO }); // wait for landing while (!mover.Update()) yield return WaitTicks(1); // extra wait for leap to finish yield return WaitTicks(1); if (Rune_D > 0) { AddBuff(User, new LeapAttackArmorBuff()); } // ground smash effect User.PlayEffectGroup(162811); AttackPayload attack = new AttackPayload(this); attack.Targets = GetEnemiesInRadius(TargetPosition, ScriptFormula(0)); //ScriptFormula(1) states "% of willpower Damage", perhaps the damage should be calculated that way instead. attack.AddWeaponDamage(0.70f, DamageType.Physical); attack.OnHit = hitPayload => { hitAnything = true; if (Rune_E > 0) { if (Rand.NextDouble() < ScriptFormula(37)) { AddBuff(hitPayload.Target, new DebuffStunned(WaitSeconds(ScriptFormula(38)))); } } }; attack.Apply(); if (hitAnything) GeneratePrimaryResource(15f); //TODO: Eventually att visuals, and check if the current uber-drag is really intended :P if (Rune_A > 0) { TargetList targets = GetEnemiesInRadius(User.Position, ScriptFormula(3)); Actor curTarget; int affectedTargets = 0; while (affectedTargets < ScriptFormula(12)) //SF(11) states "Min number to Knockback", and is 5, what can that mean? { curTarget = targets.GetClosestTo(User.Position); if (curTarget != null) { targets.Actors.Remove(curTarget); if (curTarget.World != null) { Knockback(curTarget, ScriptFormula(8), ScriptFormula(9), ScriptFormula(10)); } affectedTargets++; } else { break; } } } yield break; }
public override IEnumerable<TickTimer> Main() { //Primary Target //WeaponDamage(Target, ScriptFormula(16), DamageType.Physical); WeaponDamage(GetBestMeleeEnemy(), ScriptFormula(16), DamageType.Physical); //Secondary Targets AttackPayload attack = new AttackPayload(this); //SF(27) is 120 degrees, SF(26) is range. attack.Targets = GetEnemiesInArcDirection(User.Position, TargetPosition, ScriptFormula(27), ScriptFormula(26)); attack.AddWeaponDamage(ScriptFormula(18), DamageType.Physical); attack.OnHit = hitPayload => { if (Rune_B > 0) { foreach (Actor enemy in GetEnemiesInRadius(User.Position, ScriptFormula(14)).Actors) { Knockback(enemy, ScriptFormula(13)); } foreach (Actor enemy in GetEnemiesInRadius(User.Position, ScriptFormula(21)).Actors) { Knockback(enemy, ScriptFormula(20)); } } if (Rune_C > 0) { if (hitPayload.IsCriticalHit) { Knockback(hitPayload.Target, ScriptFormula(2), ScriptFormula(3)); //since its a max number of knockback jumps, but its UP TO that number, we will randomize it. int Jumps = Rand.Next((int)ScriptFormula(25)); for (int i = 0; i < Jumps; ++i) { WeaponDamage(hitPayload.Target, ScriptFormula(9), DamageType.Physical); Knockback(hitPayload.Target, ScriptFormula(7), ScriptFormula(8)); } } } if (Rune_D > 0) { //todo: is this right? int StackCount = 0; if (StackCount < ScriptFormula(23) + 1) { StackCount++; } GeneratePrimaryResource(ScriptFormula(22)* StackCount); } if (Rune_E > 0) { //this doesnt work either. attack.OnDeath = DeathPayload => { if (Rand.NextDouble() < ScriptFormula(12)) { AttackPayload explode = new AttackPayload(this); explode.Targets = GetEnemiesInRadius(DeathPayload.Target.Position, ScriptFormula(6)); explode.AddWeaponDamage(ScriptFormula(4), DamageType.Physical); explode.Apply(); } }; } }; attack.Apply(); yield break; }
private void MeleeStageHit() { AttackPayload attack = new AttackPayload(this); attack.Targets = GetEnemiesInRadius(User.Position, ScriptFormula(1)); attack.AddWeaponDamage(ScriptFormula(4), DamageType.Physical); attack.Apply(); }
public override IEnumerable<TickTimer> Main() { UsePrimaryResource(EvalTag(PowerKeys.ResourceCost)); AttackPayload attack = new AttackPayload(this); attack.Targets = GetEnemiesInRadius(User.Position, ScriptFormula(4)); attack.OnHit = hitPayload => { AddBuff(hitPayload.Target, new RendDebuff()); if (Rune_D > 0) { float healMe = ScriptFormula(8) * hitPayload.TotalDamage; //User.Attributes[GameAttribute.Hitpoints_Granted] = healMe; //User.Attributes.BroadcastChangedIfRevealed(); } }; //this work? if it dies with rend debuff, infect others. attack.OnDeath = DeathPayload => { if (AddBuff(Target, new RendDebuff())) { AttackPayload BleedAgain = new AttackPayload(this); BleedAgain.Targets = GetEnemiesInRadius(Target.Position, ScriptFormula(19)); BleedAgain.OnHit = hitPayload2 => { AddBuff(hitPayload2.Target, new RendDebuff()); }; BleedAgain.Apply(); } }; attack.Apply(); yield break; }
public override bool Update() { if (base.Update()) return true; if (_damageTimer == null || _damageTimer.TimedOut) { _damageTimer = WaitSeconds(_damageRate); AttackPayload attack = new AttackPayload(this); attack.Targets = GetEnemiesInRadius(User.Position, ScriptFormula(13)); attack.AddWeaponDamage(_damagetotal, DamageType.Physical); //we divide by four because this is by second, and tick-intervals = 0.25 attack.AutomaticHitEffects = false; attack.Apply(); } return false; }
//there is a changed walking speed multiplier from 8101 patch. public override IEnumerable<TickTimer> Main() { //if (User.CurrentScene.NavMesh.WalkGrid[(int)((TargetPosition.X - //this.World.QuadTree.Query<Mooege.Core.GS.Map.Scene>(TargetPosition).FirstOrDefault().Bounds.Left) / 2.5f), //(int)((TargetPosition.Y - this.World.QuadTree.Query<Mooege.Core.GS.Map.Scene>(TargetPosition).FirstOrDefault().Bounds.Top) / 2.5f)] == 0) //yield break; bool hitAnything = false; StartCooldown(EvalTag(PowerKeys.CooldownTime)); if (Rune_C > 0) { AttackPayload launch = new AttackPayload(this); launch.Targets = GetEnemiesInRadius(User.Position, ScriptFormula(31)); launch.AddWeaponDamage(ScriptFormula(30), DamageType.Physical); launch.OnHit = hitPayload => { hitAnything = true; }; launch.Apply(); User.PlayEffectGroup(165924); //Not sure if this is the only effect to be displayed in this case } ActorMover mover = new ActorMover(User); mover.MoveArc(TargetPosition, 10, -0.1f, new ACDTranslateArcMessage { //Field3 = 303110, // used for male barb leap, not needed? FlyingAnimationTagID = AnimationSetKeys.Attack2.ID, LandingAnimationTagID = -1, Field7 = PowerSNO }); // wait for landing while (!mover.Update()) yield return WaitTicks(1); // extra wait for leap to finish yield return WaitTicks(1); if (Rune_D > 0) { AddBuff(User, new LeapAttackArmorBuff()); } // ground smash effect User.PlayEffectGroup(162811); AttackPayload attack = new AttackPayload(this); attack.Targets = GetEnemiesInRadius(TargetPosition, ScriptFormula(0)); //ScriptFormula(1) states "% of willpower Damage", perhaps the damage should be calculated that way instead. attack.AddWeaponDamage(0.70f, DamageType.Physical); attack.OnHit = hitPayload => { hitAnything = true; if (Rune_E > 0) { if (Rand.NextDouble() < ScriptFormula(37)) { AddBuff(hitPayload.Target, new DebuffStunned(WaitSeconds(ScriptFormula(38)))); } } }; attack.Apply(); if (hitAnything) GeneratePrimaryResource(EvalTag(PowerKeys.ResourceGainedOnFirstHit)); //TODO: Eventually att visuals, and check if the current uber-drag is really intended :P if (Rune_A > 0) { TargetList targets = GetEnemiesInRadius(User.Position, ScriptFormula(3)); Actor curTarget; int affectedTargets = 0; while (affectedTargets < ScriptFormula(12)) //SF(11) states "Min number to Knockback", and is 5, what can that mean? { curTarget = targets.GetClosestTo(User.Position); if (curTarget != null) { targets.Actors.Remove(curTarget); if (curTarget.World != null) { Knockback(curTarget, ScriptFormula(8), ScriptFormula(9), ScriptFormula(10)); } affectedTargets++; } else { break; } } } if (Rune_B > 0) { TargetList targets = GetEnemiesInRadius(User.Position, ScriptFormula(3)); foreach (Actor curTarget in targets.Actors) { Knockback(curTarget, ScriptFormula(17), ScriptFormula(18), ScriptFormula(19)); var secondKnockBack = GetEnemiesInRadius(curTarget.Position, 1f); // this will hackfully check for collision if (secondKnockBack.Actors.Count > 1) { foreach (Actor secondaryTarget in GetEnemiesInRadius(curTarget.Position, ScriptFormula(23)).Actors) { Knockback(secondaryTarget, ScriptFormula(24), ScriptFormula(25), ScriptFormula(26)); var thirdKnockBack = GetEnemiesInRadius(secondaryTarget.Position, 1f); if (thirdKnockBack.Actors.Count > 1) { foreach (Actor thirdTarget in GetEnemiesInRadius(secondaryTarget.Position, ScriptFormula(23)).Actors) { Knockback(thirdTarget, ScriptFormula(24), ScriptFormula(25), ScriptFormula(26)); } } } } } } yield break; }
public override IEnumerable<TickTimer> Main() { switch (TargetMessage.Field5) { case 0: if (Rune_A > 0) { //Dash } else { MeleeStageHit(); } break; case 1: //stage 2 get hit chance bonus MultiHit(); break; case 2: if (Rune_D > 0) { if(Rand.NextDouble() < ScriptFormula(25)) { GeneratePrimaryResource(ScriptFormula(24)); } } bool hitAnything = false; AttackPayload attack = new AttackPayload(this); attack.Targets = GetEnemiesInArcDirection(User.Position, TargetPosition, ScriptFormula(30), ScriptFormula(31)); attack.AddWeaponDamage(ScriptFormula(2), DamageType.Holy); attack.OnHit = hitPayload => { hitAnything = true; Knockback(hitPayload.Target, ScriptFormula(5), ScriptFormula(6)); if (Rune_A > 0) { AddBuff(hitPayload.Target, new RuneA_DOT_100Fists()); } }; attack.Apply(); if (hitAnything) { GeneratePrimaryResource(EvalTag(PowerKeys.SpiritGained)); if (Rune_C > 0) { AddBuff(User, new RuneCbuff()); } } //TODO: Range should be only 40f ahead. if (Rune_E > 0) { var proj = new Projectile(this, 136022, User.Position); proj.Launch(TargetPosition, ScriptFormula(23)); proj.OnCollision = (hit) => { //proj.Destroy(); WeaponDamage(hit, ScriptFormula(11), DamageType.Physical); }; } break; } yield break; }
public override IEnumerable<TickTimer> Main() { StartCooldown(EvalTag(PowerKeys.CooldownTime)); TickTimer Cooldown = WaitSeconds(ScriptFormula(5)); if (Rune_A > 0) { AddBuff(User, new DurationBuff()); } if (Rune_E > 0) { AddBuff(User, new ReflectBuff()); } AttackPayload attack = new AttackPayload(this); attack.Targets = GetEnemiesInRadius(User.Position, ScriptFormula(7)); attack.AddWeaponDamage(ScriptFormula(7), DamageType.Physical); attack.OnHit = HitPayload => { if (Rune_C > 0) { //TODO: is this the intended way to heal? User.Attributes[GameAttribute.Hitpoints_Cur] = Math.Min(User.Attributes[GameAttribute.Hitpoints_Cur] + ScriptFormula(23) * User.Attributes[GameAttribute.Hitpoints_Max], User.Attributes[GameAttribute.Hitpoints_Max]); User.Attributes.BroadcastChangedIfRevealed(); } if (Rune_D > 0) { GeneratePrimaryResource(ScriptFormula(28)); } if (HitPayload.IsCriticalHit) { Cooldown = WaitSeconds(0f); } }; attack.Apply(); if (Rune_B > 0) { //Throw up to SF(18) axes at nearby enemies which inflict SF(14) weapon damage each. //search radius SF(15), proj height SF(16), proj speed SF(17), proj delay time SF(19) } StartCooldown(Cooldown); yield break; }
public override IEnumerable <TickTimer> Main() { GeneratePrimaryResource(ScriptFormula(25)); float targetDistance = PowerMath.Distance2D(User.Position, TargetPosition); // create grenade projectiles with shared detonation timer TickTimer timeout = WaitSeconds(ScriptFormula(2)); Projectile[] grenades = new Projectile[Rune_C > 0 ? 1 : 3]; for (int i = 0; i < grenades.Length; ++i) { var projectile = new Projectile(this, Rune_C > 0 ? 212547 : 88244, User.Position); projectile.Timeout = timeout; grenades[i] = projectile; } // generate spread positions with distance-scaled spread amount. float scaledSpreadOffset = Math.Max(targetDistance - ScriptFormula(14), 0f); Vector3D[] projDestinations = PowerMath.GenerateSpreadPositions(User.Position, TargetPosition, ScriptFormula(11) - scaledSpreadOffset, grenades.Length); // launch and bounce grenades yield return(WaitTicks(1)); // helps make bounce timings more consistent float bounceOffset = 1f; float minHeight = ScriptFormula(21); float height = minHeight + ScriptFormula(22); float bouncePercent = 0.7f; // ScriptFormula(23); while (!timeout.TimedOut) { for (int i = 0; i < grenades.Length; ++i) { grenades[i].LaunchArc(PowerMath.TranslateDirection2D(projDestinations[i], User.Position, projDestinations[i], targetDistance * 0.3f * bounceOffset), height, ScriptFormula(20)); } height *= bouncePercent; bounceOffset *= 0.3f; yield return(grenades[0].ArrivalTime); // play "dink dink" grenade bounce sound grenades[0].PlayEffect(Effect.Unknown69); } // damage effects foreach (var grenade in grenades) { var grenadeN = grenade; SpawnEffect(RuneSelect(154027, 154045, 154028, 154044, 154046, 154043), grenade.Position); // poison pool effect if (Rune_A > 0) { var pool = SpawnEffect(154076, grenade.Position, 0, WaitSeconds(ScriptFormula(7))); pool.UpdateDelay = 1f; pool.OnUpdate = () => { WeaponDamage(GetEnemiesInRadius(grenadeN.Position, ScriptFormula(5)), ScriptFormula(6), DamageType.Poison); }; } AttackPayload attack = new AttackPayload(this); attack.Targets = GetEnemiesInRadius(grenade.Position, ScriptFormula(4)); attack.AddWeaponDamage(ScriptFormula(0), Rune_A > 0 ? DamageType.Poison : DamageType.Fire); attack.OnHit = (hitPayload) => { if (Rune_E > 0) { if (Rand.NextDouble() < ScriptFormula(9)) { AddBuff(hitPayload.Target, new DebuffStunned(WaitSeconds(ScriptFormula(10)))); } } if (Rune_C > 0) { Knockback(grenadeN.Position, hitPayload.Target, ScriptFormula(8)); } }; attack.Apply(); } // clusterbomb hits if (Rune_B > 0) { int damagePulses = (int)ScriptFormula(28); for (int pulse = 0; pulse < damagePulses; ++pulse) { yield return(WaitSeconds(ScriptFormula(12) / damagePulses)); foreach (var grenade in grenades) { WeaponDamage(GetEnemiesInRadius(grenade.Position, ScriptFormula(4)), ScriptFormula(0), DamageType.Fire); } } } }
public override IEnumerable<TickTimer> Main() { StartCooldown(EvalTag(PowerKeys.CooldownTime)); bool hitAnything = false; if (Rune_B > 0) { Vector3D[] projDestinations = PowerMath.GenerateSpreadPositions(User.Position, TargetPosition, ScriptFormula(9) / 5f, (int)ScriptFormula(11)); for (int i = 0; i < projDestinations.Length; i++) { var proj = new Projectile(this, 161891, User.Position); proj.Scale = 3f; proj.Timeout = WaitSeconds(0.5f); proj.OnCollision = (hit) => { hitAnything = true; _setupReturnProjectile(hit.Position); AttackPayload attack = new AttackPayload(this); attack.SetSingleTarget(hit); attack.AddWeaponDamage(ScriptFormula(0), DamageType.Physical); attack.OnHit = (hitPayload) => { hitPayload.Target.PlayEffectGroup(79420); Knockback(hitPayload.Target, -25f, ScriptFormula(3), ScriptFormula(4)); }; attack.Apply(); proj.Destroy(); }; proj.OnTimeout = () => { _setupReturnProjectile(proj.Position); }; proj.Launch(projDestinations[i], ScriptFormula(8)); User.AddRopeEffect(79402, proj); } } else if (Rune_E > 0) { Vector3D[] projDestinations = PowerMath.GenerateSpreadPositions(User.Position, TargetPosition, ScriptFormula(9) / 5f, (int)ScriptFormula(11)); for (int i = 0; i < projDestinations.Length; i++) { var proj = new Projectile(this, 161894, User.Position); proj.Scale = 3f; proj.Timeout = WaitSeconds(0.5f); proj.OnCollision = (hit) => { hitAnything = true; _setupReturnProjectile(hit.Position); AttackPayload attack = new AttackPayload(this); attack.SetSingleTarget(hit); attack.AddWeaponDamage(ScriptFormula(0), DamageType.Physical); attack.OnHit = (hitPayload) => { hitPayload.Target.PlayEffectGroup(79420); Knockback(hitPayload.Target, 25f, ScriptFormula(3), ScriptFormula(4)); }; attack.Apply(); proj.Destroy(); }; proj.OnTimeout = () => { _setupReturnProjectile(proj.Position); }; proj.Launch(projDestinations[i], ScriptFormula(8)); User.AddRopeEffect(79402, proj); } } else if (Rune_A > 0) { var projectile = new Projectile(this, 161890, User.Position); projectile.Scale = 3f; projectile.Timeout = WaitSeconds(0.5f); projectile.OnCollision = (hit) => { hitAnything = true; _setupReturnProjectile(hit.Position); AttackPayload attack = new AttackPayload(this); attack.SetSingleTarget(hit); attack.AddWeaponDamage(ScriptFormula(0), DamageType.Physical); attack.OnHit = (hitPayload) => { for (int i = 0; i < ScriptFormula(17); ++i) { hitPayload.Target.PlayEffectGroup(79420); Knockback(hitPayload.Target, -25f, ScriptFormula(3), ScriptFormula(4)); } }; attack.Apply(); }; projectile.OnTimeout = () => { _setupReturnProjectile(projectile.Position); }; projectile.Launch(TargetPosition, ScriptFormula(8)); User.AddRopeEffect(79402, projectile); } else { var projectile = new Projectile(this, RuneSelect(74636, -1, -1, 161892, 161893, -1), User.Position); projectile.Scale = 3f; projectile.Timeout = WaitSeconds(0.5f); projectile.OnCollision = (hit) => { hitAnything = true; _setupReturnProjectile(hit.Position); AttackPayload attack = new AttackPayload(this); attack.SetSingleTarget(hit); attack.AddWeaponDamage(ScriptFormula(0), DamageType.Physical); attack.OnHit = (hitPayload) => { // GET OVER HERE //unknown on magnitude/knockback offset? hitPayload.Target.PlayEffectGroup(79420); Knockback(hitPayload.Target, -25f, ScriptFormula(3), ScriptFormula(4)); if (Rune_C > 0) { float healMe = ScriptFormula(10) * hitPayload.TotalDamage; //User.Attributes[GameAttribute.Hitpoints_Granted] = healMe; //User.Attributes.BroadcastChangedIfRevealed(); } }; attack.Apply(); projectile.Destroy(); }; projectile.OnTimeout = () => { _setupReturnProjectile(projectile.Position); }; projectile.Launch(TargetPosition, ScriptFormula(8)); User.AddRopeEffect(79402, projectile); } if (hitAnything) GeneratePrimaryResource(EvalTag(PowerKeys.ResourceGainedOnFirstHit)); yield break; }
public override IEnumerable<TickTimer> Main() { AttackPayload attack = new AttackPayload(this); switch (ComboIndex) { case 0: case 1: attack.Targets = GetBestMeleeEnemy(); attack.AddWeaponDamage(ScriptFormula(0), DamageType.Physical); if (Rune_C > 0) attack.AddBuffOnHit<RuneCDebuff>(); break; case 2: if (Rune_B > 0) { attack.Targets = GetEnemiesInArcDirection(User.Position, TargetPosition, ScriptFormula(19), ScriptFormula(20)); int maxTargets = (int)ScriptFormula(18); if (maxTargets < attack.Targets.Actors.Count) attack.Targets.Actors.RemoveRange(maxTargets, attack.Targets.Actors.Count - maxTargets); } else { attack.Targets = GetBestMeleeEnemy(); } attack.AutomaticHitEffects = false; attack.AddBuffOnHit<MainDebuff>(); break; default: yield break; } bool hitAnything = false; attack.OnHit = hitPayload => { hitAnything = true; }; attack.Apply(); if (hitAnything) GeneratePrimaryResource(EvalTag(PowerKeys.SpiritGained)); yield break; }
public override IEnumerable<TickTimer> Main() { UsePrimaryResource(EvalTag(PowerKeys.ResourceCost)); if (Rune_B > 0) { AttackPayload attack = new AttackPayload(this); attack.Targets = GetEnemiesInArcDirection(User.Position, TargetPosition, ScriptFormula(14), ScriptFormula(15)); attack.AddWeaponDamage(ScriptFormula(23), DamageType.Physical); attack.Apply(); yield break; } else { TargetPosition = PowerMath.TranslateDirection2D(User.Position, TargetPosition, User.Position, ScriptFormula(11)); AttackPayload attack = new AttackPayload(this); attack.Targets = GetEnemiesInRadius(TargetPosition, ScriptFormula(11)); attack.AddWeaponDamage(ScriptFormula(4), DamageType.Physical); attack.OnHit = hitPayload => { if (Rune_D > 0) { if (hitPayload.IsCriticalHit) { if (Rand.NextDouble() < ScriptFormula(5)) { //drop treasure or health globes. } } } if (Rune_C > 0) { AddBuff(hitPayload.Target, new DebuffSlowed(ScriptFormula(8), WaitSeconds(ScriptFormula(10)))); } }; attack.OnDeath = DeathPayload => { if (Rune_E > 0) { //if (DeathPayload.Target)? Doesn't above handle this? { if (Rand.NextDouble() < ScriptFormula(16)) { AttackPayload Stunattack = new AttackPayload(this); Stunattack.Targets = GetEnemiesInRadius(User.Position, ScriptFormula(18)); Stunattack.OnHit = stun => { AddBuff(stun.Target, new DebuffStunned(WaitSeconds(ScriptFormula(17)))); }; Stunattack.Apply(); } } } }; attack.Apply(); if (Rune_C > 0) { var QuakeHammer = SpawnEffect(159030, User.Position, 0, WaitSeconds(ScriptFormula(10))); QuakeHammer.UpdateDelay = 1f; QuakeHammer.OnUpdate = () => { AttackPayload TremorAttack = new AttackPayload(this); TremorAttack.Targets = GetEnemiesInRadius(User.Position, ScriptFormula(7)); TremorAttack.AddWeaponDamage(ScriptFormula(9), DamageType.Physical); TremorAttack.Apply(); }; } } yield break; }
public override IEnumerable<TickTimer> Main() { int effectSNO; switch (ComboIndex) { case 0: effectSNO = 18987; break; case 1: effectSNO = 18988; break; case 2: effectSNO = 96519; break; default: yield break; } User.PlayEffectGroup(effectSNO); bool hitAnything = false; AttackPayload attack = new AttackPayload(this); if (ComboIndex != 2) attack.Targets = GetEnemiesInArcDirection(User.Position, TargetPosition, ScriptFormula(5), ScriptFormula(6)); else attack.Targets = GetEnemiesInRadius(User.Position, ScriptFormula(8)); //dmg all enemies around you, why is there Angle SF(9) - EDIT: oh because it adds them together 180+180=360 attack.AddWeaponDamage(ScriptFormula(0), DamageType.Physical); attack.OnHit = hitPayload => { hitAnything = true; if (ComboIndex == 2) { //Attack Slow Amount SF(20) AddBuff(hitPayload.Target, new DebuffSlowed(ScriptFormula(4), WaitSeconds(ScriptFormula(3)))); } if (Rune_D > 0) { if (hitPayload.IsCriticalHit) { //buff SF(15[Duration]+16[Generate Amount]) } } if (Rune_E > 0) { //buff[3] //Debuff to monsters that causes them to take 80% additional damage from all attacks } if (Rune_C > 0) { //buff[1] //Debuff to monsters that caused them to inflict 50% less damage } }; attack.Apply(); if (hitAnything) GeneratePrimaryResource(EvalTag(PowerKeys.SpiritGained)); yield break; }
public override bool Apply() { if (!base.Apply()) return false; User.Attributes[GameAttribute.Damage_Percent_Reduction_From_Melee] += ScriptFormula(10); User.Attributes[GameAttribute.Damage_Percent_Reduction_From_Ranged] += ScriptFormula(10); Target.Attributes.BroadcastChangedIfRevealed(); if (Rune_D > 0) { AttackPayload attack = new AttackPayload(this); attack.Targets = GetEnemiesInRadius(User.Position, ScriptFormula(8)); attack.AddWeaponDamage(ScriptFormula(11), DamageType.Physical); attack.OnHit = hitPayload => { Knockback(hitPayload.Target, ScriptFormula(6), ScriptFormula(7)); }; attack.Apply(); } return true; }
public override IEnumerable<TickTimer> Main() { float reachLength; float reachThickness; switch(ComboIndex) { //This may be ArcDirection instead of BeamDirection case 0: reachLength = ScriptFormula(5); reachThickness = ScriptFormula(9); break; case 1: reachLength = ScriptFormula(4); reachThickness = ScriptFormula(3); break; case 2: reachLength = ScriptFormula(20); reachThickness = ScriptFormula(19); break; default: yield break; } if (ComboIndex == 2 && Rune_C > 0) { bool hitAnything = false; AttackPayload attack = new AttackPayload(this); attack.Targets = GetEnemiesInRadius(User.Position, ScriptFormula(11), (int)ScriptFormula(8)); attack.AddWeaponDamage(ScriptFormula(0), DamageType.Physical); attack.OnHit = hitPayload => { hitAnything = true; if (Rune_D > 0) { if (hitPayload.IsCriticalHit) { GeneratePrimaryResource(ScriptFormula(7)); } } }; attack.Apply(); if (hitAnything) GeneratePrimaryResource(EvalTag(PowerKeys.SpiritGained)); } else { bool hitAnything = false; AttackPayload attack = new AttackPayload(this); attack.Targets = GetEnemiesInBeamDirection(User.Position, TargetPosition, reachLength, reachThickness); attack.AddWeaponDamage(ScriptFormula(0), DamageType.Physical); attack.OnHit = hitPayload => { hitAnything = true; if (Rune_D > 0) { if (hitPayload.IsCriticalHit) { GeneratePrimaryResource(ScriptFormula(7)); } } }; attack.Apply(); if (hitAnything) GeneratePrimaryResource(EvalTag(PowerKeys.SpiritGained)); } yield break; }