Exemplo n.º 1
0
        public override void Action(Player from, Player to)
        {
            TimedEvent te = new GameObjects.TimedEvent("Continued Healing", 12, 1000);

            te.OnTick += sender => from.HP += 3;
            from.Effects.Add(te);
            te.Start();
        }
Exemplo n.º 2
0
        public override void Action(Player from, Player to)
        {
            TimedEvent te = new GameObjects.TimedEvent("Continued Attack", 12, 1000);

            te.OnTick += sender =>
            {
                to.HP -= 3;
            };
            to.Effects.Add(te);
            te.Start();
        }
Exemplo n.º 3
0
        public override void Action(Player from, Player to)
        {
            TimedEvent te = new GameObjects.TimedEvent("Percentage Attack", 10, 200);

            te.OnTick += sender =>
            {
                to.HP = (int)(to.HP * (1 - 0.5d / 10));
            };
            to.Effects.Add(te);
            te.Start();
        }
Exemplo n.º 4
0
        public override void Action(Player from, Player to)
        {
            TimedEvent te = new GameObjects.TimedEvent("Percentage Heal", 10, 200);

            te.OnTick += sender =>
            {
                from.HP = (int)(from.HP * (1 + 0.5d / 10));
            };
            from.Effects.Add(te);
            te.Start();
        }
Exemplo n.º 5
0
        public override void Action(Player from, Player to)
        {
            TimedEvent te = new GameObjects.TimedEvent("Quick Heal", 10, 200);

            te.OnTick += sender =>
            {
                from.HP += 1;
            };
            from.Effects.Add(te);
            te.Start();
        }
Exemplo n.º 6
0
        public override void Action(Player from, Player to)
        {
            TimedEvent te = new GameObjects.TimedEvent("Delayed Attack", 3, 1000);

            te.OnFinished += sender =>
            {
                to.HP -= 50;
            };
            to.Effects.Add(te);
            te.Start();
        }
Exemplo n.º 7
0
        public override void Action(Player from, Player to)
        {
            TimedEvent te = new GameObjects.TimedEvent("HP Transfer", 20, 200);

            te.OnTick += sender =>
            {
                from.HP += 1;
                to.HP   -= 1;
            };
            from.Effects.Add(te);
            te.Start();
        }
Exemplo n.º 8
0
        public override void Action(Player from, Player to) //from is the one who use this card
        {
            //If this card has timed effect, add this section of code
            TimedEvent te = new GameObjects.TimedEvent("Continued Healing", 12, 1000); //parameters in bracket: ([effect name],[how many times will this effect repeat],[interval between each tick(in ms)])

            te.OnTick += sender =>
            { //what will this effect do every tick
                from.HP += 3;
            };

            te.OnFinished += sender =>
            { //what will this effect do after it ends (this will be done once only)
            };
            //who gets this effect (from or to)
            from.Effects.Add(te);

            //start effect
            te.Start();



            //if this card changes value of player, add this. You can change MP and HP or even cards for that player(not recommended)
            to.HP -= 40;
        }