Esempio n. 1
0
        public void Run()
        {
            var world = Origin.GetWorld();

            new ScreenFlashSimple(world, ColorMatrix.Tint(new Color(192, 128, 255)), LerpHelper.QuadraticOut, 20);
            FireDaggers();
        }
Esempio n. 2
0
        public void Run()
        {
            var world  = Origin.GetWorld();
            var center = Origin.GetMainTile();
            var sword  = Origin.GetBehavior <BehaviorSword>();

            if (sword != null)
            {
                sword.HasHeart = false;
            }

            new ScreenFlashSimple(world, ColorMatrix.Tint(Color.Red), LerpHelper.QuadraticOut, 20);
            new ScreenShakeRandom(world, 15, 20, LerpHelper.QuadraticOut);
            foreach (var target in center.GetNearby(Radius).SelectMany(x => x.Contents))
            {
                if (target == Origin || !target.HasBehaviors <BehaviorAlive>())
                {
                    continue;
                }
                var actions = new List <ActionWrapper>();
                actions.Add(new ActionGib(Origin, target, Score, SoundLoader.AddSound("content/sound/big_splat.wav")).InSlot(ActionSlot.Active));
                actions.Apply(target);
            }
            Sound.Play(1.0f, 0f, 0f);
        }
Esempio n. 3
0
 public ColorMatrix GetColor()
 {
     if (CurrentDead)
     {
         return(ColorMatrix.Greyscale() * ColorMatrix.Tint(Color.IndianRed));
     }
     return(ColorMatrix.Identity);
 }
Esempio n. 4
0
        public void Run()
        {
            Random random = new Random();
            var    world  = Origin.GetWorld();
            var    alive  = Target.GetBehavior <BehaviorAlive>();

            Target.GetFlashHelper()?.AddFlash(ColorMatrix.Flat(Color.White), 20);
            Target.GetShakeHelper()?.AddShakeRandom(3, LerpHelper.QuadraticOut, 30);
            new HitStop(world, 0, 5);
            new ScreenShakeRandom(world, 10, 10, LerpHelper.QuadraticOut);
            new ScreenFlashSimple(world, ColorMatrix.Greyscale() * ColorMatrix.Tint(new Color(215, 63, 36)), LerpHelper.QuadraticOut, 10);
            HitSound.Play(1, Random.NextFloat(-0.5f, +0.5f), 0);

            alive.TakeDamage(Damage);
        }
Esempio n. 5
0
        public WizardFire(SceneGame world) : base(world)
        {
            Name        = "Pyromancer";
            Description = "";

            Render = new CreaturePaperdollRender()
            {
                HeadColor = ColorMatrix.Tint(new Color(255, 16, 16)),
                Head      = SpriteLoader.Instance.AddSprite("content/paperdoll_hat_gray"),
                BodyColor = ColorMatrix.Tint(new Color(255, 128, 16)),
                Body      = SpriteLoader.Instance.AddSprite("content/paperdoll_robe"),
            };
            Mask.Add(Point.Zero);

            Effect.ApplyInnate(new EffectStat(this, Stat.HP, 320));
            Effect.ApplyInnate(new EffectStat(this, Stat.Attack, 10));

            Skills.Add(new SkillMagicPower());
        }
Esempio n. 6
0
 public void Tick(SceneGame scene)
 {
     BellTime += scene.TimeModCurrent;
     if (BellTime.Done && BellTolls < 12)
     {
         new ScreenGlitchFlash(scene, slide => Params.WithIntensity(slide), 10);
         new ScreenFlashSimple(scene, ColorMatrix.Tint(Color.Red), LerpHelper.Flick, 10);
         SoundBell.Play(1, Random.NextFloat(0.5f, 0.0f), 0);
         BellTolls += 1;
         BellTime.Reset();
         if (BellTolls >= 12)
         {
             new ScreenBellWraiths(Curio.GetWorld(), this, 60, 300);
             foreach (var wraithEmitter in Manager.GetBehaviors().OfType <BehaviorWraithEmitter>())
             {
                 wraithEmitter.Activated = true;
             }
             SoundSummon.Play(1, 0, 0);
         }
     }
 }
Esempio n. 7
0
        private IEnumerable <Wait> RoutineHand(Creature user, Creature target, int hits)
        {
            List <Vector2> wingPositions = Wallhach.GetWingPositions(user.VisualTarget, 1.0f);
            Vector2        velocity      = Util.AngleToVector(Random.NextFloat() * MathHelper.TwoPi) * 160;
            Vector2        emitPos       = wingPositions.Pick(Random);
            int            moveTime      = 30 + Random.Next(30);
            var            bullet        = new MissileHand(user.World, emitPos, target.VisualTarget, velocity, ColorMatrix.Tint(Color.Goldenrod), moveTime, moveTime);

            yield return(new WaitBullet(bullet));

            if (hits % 3 >= 2)
            {
                user.Attack(target, Vector2.Zero, AttackSlap);
            }
        }
Esempio n. 8
0
        public override IEnumerable <Wait> RoutineUse(Creature user, object target)
        {
            Wallhach wallhach = user as Wallhach;

            if (target is Creature targetCreature)
            {
                Consume();
                ShowSkill(user);
                var chirality = user.GetStatusEffect <Chirality>();
                chirality?.AddBuildup(-8);
                if (wallhach != null)
                {
                    yield return(Scheduler.Instance.RunAndWait(wallhach.RoutineOpenWing(0.6f, 50, LerpHelper.Quadratic)));
                }
                user.VisualPose = user.FlickPose(CreaturePose.Cast, CreaturePose.Stand, 70);
                if (wallhach != null)
                {
                    Scheduler.Instance.Run(wallhach.RoutineFlashWing(15));
                }
                yield return(user.WaitSome(10));

                int         chiralStacks = user.GetStatusStacks <Chirality>();
                List <Wait> waits        = new List <Wait>();
                int         hands        = chiralStacks + 1;
                hands = 16;
                int timeLeft = hands + 90;
                for (int i = 0; i < hands; i++)
                {
                    List <Vector2> wingPositions = Wallhach.GetWingPositions(user.VisualTarget, 1.0f);
                    Vector2        velocity      = Util.AngleToVector(Random.NextFloat() * MathHelper.TwoPi) * 160;
                    Vector2        emitPos       = wingPositions.Pick(Random);
                    var            bullet        = new MissileHand(user.World, emitPos, targetCreature.VisualTarget, velocity, ColorMatrix.Tint(Color.Goldenrod), 60, timeLeft - i);
                    waits.Add(new WaitBullet(bullet));
                    yield return(user.WaitSome(1));
                }
                yield return(new WaitAll(waits));

                targetCreature.AddStatusEffect(new Wedlock(user)
                {
                    Duration = new Slider(float.PositiveInfinity),
                    Buildup  = 1.0,
                });
                if (wallhach != null)
                {
                    Scheduler.Instance.Run(wallhach.RoutineOpenWing(1f, 50, LerpHelper.Linear));
                }
                yield return(user.WaitSome(50));
            }
        }
Esempio n. 9
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 bullet = new BulletDelta(user.World, SpriteLoader.Instance.AddSprite("content/delta"), user.VisualTarget, ColorMatrix.Tint(Color.Goldenrod), MathHelper.ToRadians(20), 50);
                bullet.Move(targetCreature.VisualTarget, 30);
                yield return(user.WaitSome(30));

                new RockTremor(user.World, targetCreature, 30);
                yield return(new WaitBullet(bullet));

                var wait = user.Attack(targetCreature, SkillUtil.SafeNormalize(targetCreature.VisualTarget - user.VisualTarget), AttackDelta);
                yield return(wait);
            }
        }
Esempio n. 10
0
        private IEnumerable <Wait> RoutineSlap(Creature user, Creature target)
        {
            var offset = Util.AngleToVector(Random.NextFloat() * MathHelper.TwoPi) * (40 + Random.Next(30));
            var bullet = new BulletSpeed(user.World, SpriteLoader.Instance.AddSprite("content/highspeed"), target.VisualTarget + offset, ColorMatrix.Tint(Color.Black), 6);

            bullet.Move(target.VisualTarget, 6);
            yield return(new WaitBullet(bullet));

            user.Attack(target, Vector2.Zero, AttackSlap);
        }
Esempio n. 11
0
        public override IEnumerable <Wait> RoutineUse(Creature user, object target)
        {
            if (target is Creature targetCreature)
            {
                List <Creature> targets = new List <Creature>();
                Consume();
                ShowSkill(user);
                var chirality = user.GetStatusEffect <Chirality>();
                chirality?.AddBuildup(-5);
                user.VisualPose = user.FlickPose(CreaturePose.Cast, CreaturePose.Stand, 70);
                yield return(user.WaitSome(50));

                var bullet = new BulletSpeed(user.World, SpriteLoader.Instance.AddSprite("content/highspeed"), user.VisualTarget, ColorMatrix.Tint(Color.Black), 15);
                bullet.Move(targetCreature.VisualTarget, 15);
                yield return(new WaitBullet(bullet));

                SpriteReference triangle = SpriteLoader.Instance.AddSprite("content/triangle");
                for (int i = 0; i < 50; i++)
                {
                    Vector2 emitPos   = new Vector2(targetCreature.X * 16, targetCreature.Y * 16) + targetCreature.Mask.GetRandomPixel(Random);
                    Vector2 centerPos = targetCreature.VisualTarget;
                    Vector2 velocity  = Vector2.Normalize(emitPos - centerPos) * (Random.NextFloat() + 0.5f) * 40f;
                    new Triangle(user.World, triangle, emitPos, velocity, MathHelper.ToRadians(40 * (Random.NextFloat() - 0.5f)), Color.Black, Random.Next(80) + 5);
                }
                yield return(user.WaitSome(20));

                List <Wait> waits = new List <Wait>();
                for (int i = 0; i < 10; i++)
                {
                    targets.Add(targetCreature);
                    waits.Add(Scheduler.Instance.RunAndWait(RoutineSlap(user, targetCreature)));
                    yield return(user.WaitSome(4));
                }
                yield return(new WaitAll(waits));

                yield return(new WaitAll(targets.Select(GetCurrentAction)));
            }
        }
Esempio n. 12
0
        public void Draw(SceneGame scene, DrawPass pass)
        {
            var tile   = Curio.GetMainTile();
            var shadow = SpriteLoader.Instance.AddSprite("content/ring_shadow");

            if (pass == DrawPass.EffectLow)
            {
                scene.FlushSpriteBatch();
                scene.DrawCircle(shadow, SamplerState, Curio.GetVisualTarget(), 20, 0, MathHelper.TwoPi, 12, 0, 1, 0, 1, ColorMatrix.Tint(Color.Black), scene.NonPremultiplied);
            }
            if (pass == DrawPass.EffectLowAdditive)
            {
                scene.SpriteBatch.Draw(scene.Pixel, tile.VisualPosition, new Rectangle(0, 0, 16, 16), new Color(159, 74, 153, 32));
            }
        }