public override IEnumerable<TickTimer> Run() { StartCooldown(EvalTag(PowerKeys.CooldownTime)); UsePrimaryResource(EvalTag(PowerKeys.ResourceCost)); if (Rune_C > 0) { // NOTE: not normal plague of toads right now but Obsidian runed "Toad of Hugeness" Vector3D userCastPosition = new Vector3D(User.Position); Vector3D inFrontOfUser = PowerMath.TranslateDirection2D(User.Position, TargetPosition, User.Position, 7f); var bigtoad = SpawnEffect(109906, inFrontOfUser, TargetPosition, WaitInfinite()); // HACK: holy hell there is alot of hardcoded animation timings here bigtoad.PlayActionAnimation(110766); // spawn ani yield return WaitSeconds(1f); bigtoad.PlayActionAnimation(110520); // attack ani TickTimer waitAttackEnd = WaitSeconds(1.5f); yield return WaitSeconds(0.3f); // wait for attack ani to play a bit var tongueEnd = SpawnProxy(TargetPosition, WaitInfinite()); bigtoad.AddRopeEffect(107892, tongueEnd); yield return WaitSeconds(0.3f); // have tongue hang there for a bit var tongueMover = new Implementations.KnockbackBuff(-0.01f, 3f, -0.1f); this.World.BuffManager.AddBuff(bigtoad, tongueEnd, tongueMover); if (ValidTarget()) this.World.BuffManager.AddBuff(bigtoad, Target, new Implementations.KnockbackBuff(-0.01f, 3f, -0.1f)); yield return tongueMover.ArrivalTime; tongueEnd.Destroy(); if (ValidTarget()) { _SetHiddenAttribute(Target, true); if (!waitAttackEnd.TimedOut) yield return waitAttackEnd; bigtoad.PlayActionAnimation(110636); // disgest ani, 5 seconds for (int n = 0; n < 5 && ValidTarget(); ++n) { WeaponDamage(Target, 0.039f, DamageType.Poison); yield return WaitSeconds(1f); } if (ValidTarget()) { _SetHiddenAttribute(Target, false); bigtoad.PlayActionAnimation(110637); // regurgitate ani this.World.BuffManager.AddBuff(bigtoad, Target, new Implementations.KnockbackBuff(36f)); Target.PlayEffectGroup(18281); // actual regurgitate efg isn't working so use generic acid effect yield return WaitSeconds(0.9f); } } bigtoad.PlayActionAnimation(110764); // despawn ani yield return WaitSeconds(0.7f); bigtoad.Destroy(); } TickTimer frog = WaitSeconds(ScriptFormula(5)); Vector3D inFrontOfminiToads = PowerMath.TranslateDirection2D(User.Position, TargetPosition, User.Position, 7f); var projectile = new Projectile(this, 105792, User.Position); projectile.LaunchArc(inFrontOfminiToads, 3f, -0.03f); projectile.OnCollision = (hit) => { //destroying it while in Launcharc causes an exception. //projectile.Destroy(); }; projectile.OnArrival = () => { }; yield return WaitSeconds(1.2f); projectile.LaunchArc(new Vector3D(RandomDirection(projectile.Position, 4f, 7f)), 3f, -0.03f); projectile.OnArrival = () => { }; yield return WaitSeconds(1.2f); /* * for regular toads, there is a max of 3 frogs per cast, they are classifyed as projectile with a lifetime of 3. */ }
public override IEnumerable <TickTimer> Run() { // NOTE: not normal plague of toads right now but Obsidian runed "Toad of Hugeness" Vector3D userCastPosition = new Vector3D(User.Position); Vector3D inFrontOfUser = PowerMath.TranslateDirection2D(User.Position, TargetPosition, User.Position, 7f); var bigtoad = SpawnEffect(109906, inFrontOfUser, TargetPosition, WaitInfinite()); // HACK: holy hell there is alot of hardcoded animation timings here bigtoad.PlayActionAnimation(110766); // spawn ani yield return(WaitSeconds(1f)); bigtoad.PlayActionAnimation(110520); // attack ani TickTimer waitAttackEnd = WaitSeconds(1.5f); yield return(WaitSeconds(0.3f)); // wait for attack ani to play a bit var tongueEnd = SpawnProxy(TargetPosition, WaitInfinite()); bigtoad.AddRopeEffect(107892, tongueEnd); yield return(WaitSeconds(0.3f)); // have tongue hang there for a bit var tongueMover = new Implementations.KnockbackBuff(-0.01f, 3f, -0.1f); this.World.BuffManager.AddBuff(bigtoad, tongueEnd, tongueMover); if (ValidTarget()) { this.World.BuffManager.AddBuff(bigtoad, Target, new Implementations.KnockbackBuff(-0.01f, 3f, -0.1f)); } yield return(tongueMover.ArrivalTime); tongueEnd.Destroy(); if (ValidTarget()) { _SetHiddenAttribute(Target, true); if (!waitAttackEnd.TimedOut) { yield return(waitAttackEnd); } bigtoad.PlayActionAnimation(110636); // disgest ani, 5 seconds for (int n = 0; n < 5 && ValidTarget(); ++n) { WeaponDamage(Target, 0.039f, DamageType.Poison); yield return(WaitSeconds(1f)); } if (ValidTarget()) { _SetHiddenAttribute(Target, false); bigtoad.PlayActionAnimation(110637); // regurgitate ani this.World.BuffManager.AddBuff(bigtoad, Target, new Implementations.KnockbackBuff(36f)); Target.PlayEffectGroup(18281); // actual regurgitate efg isn't working so use generic acid effect yield return(WaitSeconds(0.9f)); } } bigtoad.PlayActionAnimation(110764); // despawn ani yield return(WaitSeconds(0.7f)); bigtoad.Destroy(); }
public override IEnumerable<TickTimer> Run() { // NOTE: not normal plague of toads right now but Obsidian runed "Toad of Hugeness" Vector3D userCastPosition = new Vector3D(User.Position); Vector3D inFrontOfUser = PowerMath.TranslateDirection2D(User.Position, TargetPosition, User.Position, 7f); var bigtoad = SpawnEffect(109906, inFrontOfUser, TargetPosition, WaitInfinite()); // HACK: holy hell there is alot of hardcoded animation timings here bigtoad.PlayActionAnimation(110766); // spawn ani yield return WaitSeconds(1f); bigtoad.PlayActionAnimation(110520); // attack ani TickTimer waitAttackEnd = WaitSeconds(1.5f); yield return WaitSeconds(0.3f); // wait for attack ani to play a bit var tongueEnd = SpawnProxy(TargetPosition, WaitInfinite()); bigtoad.AddRopeEffect(107892, tongueEnd); yield return WaitSeconds(0.3f); // have tongue hang there for a bit var tongueMover = new Implementations.KnockbackBuff(-0.01f, 3f, -0.1f); this.World.BuffManager.AddBuff(bigtoad, tongueEnd, tongueMover); if (ValidTarget()) this.World.BuffManager.AddBuff(bigtoad, Target, new Implementations.KnockbackBuff(-0.01f, 3f, -0.1f)); yield return tongueMover.ArrivalTime; tongueEnd.Destroy(); if (ValidTarget()) { _SetHiddenAttribute(Target, true); if (!waitAttackEnd.TimedOut) yield return waitAttackEnd; bigtoad.PlayActionAnimation(110636); // disgest ani, 5 seconds for (int n = 0; n < 5 && ValidTarget(); ++n) { WeaponDamage(Target, 0.039f, DamageType.Poison); yield return WaitSeconds(1f); } if (ValidTarget()) { _SetHiddenAttribute(Target, false); bigtoad.PlayActionAnimation(110637); // regurgitate ani this.World.BuffManager.AddBuff(bigtoad, Target, new Implementations.KnockbackBuff(36f)); Target.PlayEffectGroup(18281); // actual regurgitate efg isn't working so use generic acid effect yield return WaitSeconds(0.9f); } } bigtoad.PlayActionAnimation(110764); // despawn ani yield return WaitSeconds(0.7f); bigtoad.Destroy(); }