예제 #1
0
        internal static Part BuildSniper()
        {
            var tiles = new RotateChar[10] {
                vt, em, vt, em, vt, hz, vt, vt, sl, b3
            };

            var target   = new TargetZone(TargetShape.Ray, 50, 1);
            int cooldown = 15;

            ICommand attack(Mech m, IEnumerable <Loc> targets)
            {
                var anim = Option.Some <IAnimation>(new ExplosionAnimation(targets, Colors.Fire));

                return(new DelayAttackCommand(10, new AttackCommand(m, EngineConsts.TURN_TICKS * 3, 25, targets, anim, true)));
            }

            var p = new Part("Sniper", 2, 5, tiles);

            p.Add(new StabilityComponent(50));
            p.Add(new HeatComponent(1, 0, 0, 0));
            p.Add(new SpeedComponent(20));
            p.Add(new ActivateComponent(target, attack, cooldown));
            return(p);
        }
예제 #2
0
        internal static Part BuildLargeLaser()
        {
            var tiles = new RotateChar[8] {
                trn, trn, b4, b4, b3, b3, b2, b2
            };

            var target   = new TargetZone(TargetShape.Ray, 35, 2);
            var cooldown = 10;

            ICommand attack(Mech m, IEnumerable <Loc> targets)
            {
                var anim = Option.Some <IAnimation>(new ExplosionAnimation(targets, Colors.Fire));

                return(new DelayAttackCommand(60, new AttackCommand(m, EngineConsts.TURN_TICKS, 15, targets, anim, true)));
            }

            var p = new Part("Laser (large)", 2, 4, tiles);

            p.Add(new StabilityComponent(100));
            p.Add(new HeatComponent(8, 0, 0, 0));
            p.Add(new SpeedComponent(20));
            p.Add(new ActivateComponent(target, attack, cooldown));
            return(p);
        }