public IEnumerable <Wait> RoutineExplosion(Creature creature, double force, int reactionLevel) { new AcidExplosion(creature.World, creature.VisualTarget, Vector2.Zero, 0, 20); yield return(creature.WaitSome(10)); new ScreenShakeRandom(creature.World, 5, 20, LerpHelper.Linear); new RingExplosion(creature.World, creature.VisualTarget, (pos, vel, angle, time) => new SteamExplosion(creature.World, pos, vel, angle, time), 12, 24, 10); int radius = 2; int dryRadius = 1; IEnumerable <Tile> dryArea = SkillUtil.GetCircularArea(creature, dryRadius); IEnumerable <Tile> explosionArea = SkillUtil.GetCircularArea(creature, radius); foreach (var tile in dryArea) { if (tile is Water) { tile.Replace(new FloorCave()); } } var explosion = new Skills.Explosion(creature, explosionArea, creature.VisualTarget); explosion.Fault = this; explosion.ReactionLevel = reactionLevel; explosion.Attack = (a, b) => ExplosionAttack(a, b, force, reactionLevel); yield return(explosion.Run()); }
public override IEnumerable <Wait> RoutineExplode(DeathEvent death) { Creature creature = death.Creature; var explosion = new Skills.Explosion(creature, SkillUtil.GetCircularArea(creature, 1), creature.VisualTarget); explosion.Attack = ExplosionAttack; explosion.Fault = this; yield return(explosion.Run()); }
private IEnumerable <Wait> RoutineExplode(Creature attacker, Tile explosionTarget, int radius, int reactionLevel) { yield return(new WaitTime(5 + Random.Next(5))); new FireExplosion(attacker.World, explosionTarget.VisualTarget, Vector2.Zero, 0, 15); new ScreenShakeRandom(attacker.World, 6, 30, LerpHelper.Linear); var explosion = new Skills.Explosion(attacker, SkillUtil.GetCircularArea(explosionTarget, radius), explosionTarget.VisualTarget); explosion.Attack = (a, b) => ExplosionAttack(a, b, reactionLevel + 1); explosion.Fault = this; explosion.ReactionLevel = reactionLevel + 1; explosion.MiningPower = 100; yield return(explosion.Run()); }
public override IEnumerable <Wait> RoutineExplode(DeathEvent death) { Creature creature = death.Creature; List <Wait> waits = new List <Wait>(); foreach (var minion in creature.GetSlaves().OfType <Creature>()) { var explosion = new Skills.Explosion(minion, SkillUtil.GetCircularArea(minion, 1), minion.VisualTarget); explosion.Attack = ExplosionAttack; explosion.Fault = this; waits.Add(explosion.Run()); } yield return(new WaitAll(waits)); }
public override IEnumerable <Wait> RoutineExplode(DeathEvent death) { Creature creature = death.Creature; new ScreenShakeRandom(creature.World, 5, 15, LerpHelper.Linear); new FireExplosion(creature.World, creature.VisualTarget, Vector2.Zero, 0, 30); yield return(creature.WaitSome(4)); new RingExplosion(creature.World, creature.VisualTarget, (pos, vel, angle, time) => new FireExplosion(creature.World, pos, vel, angle, time), 12, 24, 10); var explosion = new Skills.Explosion(creature, SkillUtil.GetCircularArea(creature, 2), creature.VisualTarget); explosion.Attack = ExplosionAttack; explosion.Fault = this; yield return(explosion.Run()); }