Ejemplo n.º 1
0
        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());
        }
Ejemplo n.º 2
0
        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());
        }
Ejemplo n.º 3
0
        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());
        }
Ejemplo n.º 4
0
        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));
        }
Ejemplo n.º 5
0
        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());
        }