Пример #1
0
        public override IEnumerable <Wait> RoutineUse(Creature user, object target)
        {
            Consume();
            ShowSkill(user);
            user.VisualPose = user.FlickPose(CreaturePose.Cast, CreaturePose.Stand, 70);
            //TODO: roar?
            //TODO: jump visual, screenshake, screen distort
            yield return(user.WaitSome(50));

            user.VisualPosition = user.SlideJump(user.VisualPosition(), new Vector2(user.X, user.Y) * 16, 16, LerpHelper.Linear, 20);
            yield return(user.WaitSome(20));

            new ScreenShakeRandom(user.World, 6, 30, LerpHelper.Linear);
            new SeismArea(user.World, user.Tiles, 10);
            var            tileSet     = user.Tile.GetNearby(user.Mask.GetRectangle(user.X, user.Y), 6).Shuffle(Random);
            List <Wait>    quakes      = new List <Wait>();
            HashSet <Tile> tiles       = new HashSet <Tile>();
            PopupHelper    popupHelper = new PopupHelper();

            foreach (Tile tile in tileSet.Take(8))
            {
                quakes.Add(Scheduler.Instance.RunAndWait(RoutineQuake(user, tile, 3, tiles, popupHelper)));
            }
            new ScreenFlashLocal(user.World, () => ColorMatrix.Ender(), user.VisualTarget, 60, 150, 100, 50);
            yield return(new WaitAll(quakes));

            popupHelper.Finish();
            yield return(user.WaitSome(20));
        }
Пример #2
0
        public override IEnumerable <Wait> RoutineUse(Creature user, object target)
        {
            if (target is Creature targetCreature)
            {
                Consume();
                ShowSkill(user);
                user.VisualPose = user.FlickPose(CreaturePose.Cast, CreaturePose.Stand, 70);
                yield return(user.WaitSome(50));

                var effect = new FlareCharge(user.World, SpriteLoader.Instance.AddSprite("content/cinder_ender"), user, () => targetCreature.VisualTarget, 200);

                yield return(user.WaitSome(50));

                new ScreenShakeRandom(user.World, 2, 150, LerpHelper.Invert(LerpHelper.Linear));
                yield return(new WaitEffect(effect));

                new ScreenFlashLocal(user.World, () => ColorMatrix.Ender(), targetCreature.VisualTarget, 60, 150, 80, 50);
                new EnderNuke(user.World, SpriteLoader.Instance.AddSprite("content/nuke_ender"), targetCreature.VisualTarget, 0.6f, 80);
                new ScreenShakeRandom(user.World, 8, 80, LerpHelper.QuarticIn);
                //new BigExplosion(user.World, () => target.VisualTarget, (pos, time) => new EnderExplosion(user.World, pos, Vector2.Zero, time));
                yield return(user.WaitSome(10));

                var wait = user.Attack(targetCreature, SkillUtil.SafeNormalize(targetCreature.VisualTarget - user.VisualTarget), FlareAttack);
                yield return(wait);

                yield return(user.WaitSome(20));
            }
        }
Пример #3
0
        public override IEnumerable <Wait> RoutineUse(Creature user, object target)
        {
            Consume();
            user.VisualPose = user.FlickPose(CreaturePose.Cast, CreaturePose.Stand, 70);
            yield return(user.WaitSome(50));

            SpriteReference cinder = SpriteLoader.Instance.AddSprite("content/cinder_ender");

            new FlarePower(user.World, cinder, user, 50);
            new ScreenFlashPowerUp(user, () => ColorMatrix.Ender(), 100, 100, 50, 50);
            user.AddStatusEffect(new PoweredUp());
            yield return(user.WaitSome(20));
        }
Пример #4
0
        public override IEnumerable <Wait> RoutineUse(Creature user, object target)
        {
            Consume();
            yield return(user.WaitSome(50));

            var            tileSet = user.Tile.GetNearby(user.Mask.GetRectangle(user.X, user.Y), 1).Shuffle(Random);
            List <Wait>    quakes  = new List <Wait>();
            HashSet <Tile> tiles   = new HashSet <Tile>();

            foreach (Tile tile in tileSet.Take(5))
            {
                quakes.Add(Scheduler.Instance.RunAndWait(RoutineQuake(user, tile, 2, tiles)));
            }
            new ScreenFlashLocal(user.World, () => ColorMatrix.Ender(), user.VisualTarget, 60, 150, 100, 50);
            yield return(new WaitAll(quakes));

            yield return(user.WaitSome(20));
        }