Пример #1
0
        public override async Task MoveEffect(CombatInstance inst, List <BasicCard> targets)
        {
            foreach (BasicCard card in targets)
            {
                int heal = 80;
                var flip = RandomGen.CoinFlip();
                await MessageHandler.CoinFlip(inst.Location, flip);

                heal = inst.GetCardTurn().ApplyHealingBuffs(heal, true);
                heal = card.Heal(heal, true);

                string str = "";
                if (flip)
                {
                    card.AddBuff(new BuffDebuff()
                    {
                        Name           = "Champion's Favor",
                        Buff           = true,
                        Origin         = $"({inst.GetCardTurn().Signature})",
                        Description    = "invulnerable",
                        DefenseSetBuff = 5,
                        Rounds         = 2
                    });
                    str += " and are invulnerable for 1 turn";
                }

                await MessageHandler.SendMessage(inst.Location, $"{inst.GetCardTurn().Signature} blesses {card.Signature}. They heal for {heal} HP{str}.");
            }

            OnCooldown      = true;
            CurrentCooldown = Cooldown;
            inst.GetCardTurn().Actions--;
        }
Пример #2
0
        public override async Task MoveEffect(CombatInstance inst, List <BasicCard> targets)
        {
            foreach (BasicCard card in targets)
            {
                List <int> rolls = RandomGen.RollDice(15);
                var        flip  = RandomGen.CoinFlip();

                int damage = rolls[0];
                damage = inst.GetCardTurn().ApplyDamageBuffs(damage);
                var damages = card.TakeDamage(damage);
                await MessageHandler.DiceThrow(inst.Location, "1d15", rolls);

                await MessageHandler.SendMessage(inst.Location, $"{inst.GetCardTurn().Signature} crashes into {card.Signature}. {card.DamageTakenString(damages)}");

                await MessageHandler.CoinFlip(inst.Location, flip);

                if (!flip)
                {
                    await MessageHandler.SendMessage(inst.Location, $"{inst.GetCardTurn().Signature} gains a 15% boost on their next attack.");

                    inst.GetCardTurn().AddBuff(new BuffDebuff()
                    {
                        Name              = "Crashed",
                        Buff              = true,
                        Origin            = $"({inst.GetCardTurn().Signature})",
                        Description       = "15% increased damage on next attack.",
                        DamagePercentBuff = 0.15,
                        Attacks           = 1
                    });
                }
            }

            inst.GetCardTurn().Actions--;
        }
Пример #3
0
        public override async Task MoveEffect(CombatInstance inst, List <BasicCard> targets)
        {
            foreach (BasicCard card in targets)
            {
                List <int> rolls = RandomGen.RollDice(4, 8);
                await MessageHandler.DiceThrow(inst.Location, "4d8", rolls);

                int damage = 0;
                foreach (int roll in rolls)
                {
                    damage += roll;
                }

                damage = inst.GetCardTurn().ApplyDamageBuffs(damage);
                var damages = card.TakeDamage(damage);
                await MessageHandler.SendMessage(inst.Location, $"{inst.GetCardTurn().Signature} prances around {card.Signature}. {card.DamageTakenString(damages)}");

                var flip = RandomGen.CoinFlip();
                await MessageHandler.CoinFlip(inst.Location, flip);

                var flip2 = RandomGen.CoinFlip();
                await MessageHandler.CoinFlip(inst.Location, flip2);

                if (flip && flip2)
                {
                    await MessageHandler.SendMessage(inst.Location, $"{inst.GetCardTurn().Signature} is hyper! They may use another ability.");

                    inst.GetCardTurn().Actions++;
                }
            }

            inst.GetCardTurn().Actions--;
        }
Пример #4
0
        public override async Task MoveEffect(CombatInstance inst, List <BasicCard> targets)
        {
            foreach (BasicCard card in targets)
            {
                List <int> rolls = RandomGen.RollDice(2, 15);
                await MessageHandler.DiceThrow(inst.Location, "2d15", rolls);

                var flip = RandomGen.CoinFlip();
                await MessageHandler.CoinFlip(inst.Location, flip);

                var damage = 0;
                foreach (int roll in rolls)
                {
                    damage += roll;
                }

                if (flip)
                {
                    damage += 5;
                }

                damage = inst.GetCardTurn().ApplyDamageBuffs(damage);
                var damages = card.TakeDamage(damage);

                await MessageHandler.SendMessage(inst.Location, $"{inst.GetCardTurn().Signature} smashes {card.Signature} with clenched fists! {card.DamageTakenString(damages)}");
            }

            inst.GetCardTurn().Actions--;
        }
Пример #5
0
        public override async Task MoveEffect(CombatInstance inst, List <BasicCard> targets)
        {
            foreach (BasicCard card in targets)
            {
                await MessageHandler.SendMessage(inst.Location, $"{inst.GetCardTurn().Signature} plows through {card.Signature}, knocking them down!");

                card.AddBuff(new BuffDebuff()
                {
                    Name        = "Knocked Down",
                    Buff        = false,
                    Origin      = $"({inst.GetCardTurn().Signature})",
                    Description = "You are knocked down! You are disabled on your next turn.",
                    TurnSkip    = true,
                    Turns       = 1
                });

                var flip = RandomGen.CoinFlip();
                await MessageHandler.CoinFlip(inst.Location, flip);

                if (flip)
                {
                    List <int> rolls = RandomGen.RollDice(7, 10);
                    await MessageHandler.DiceThrow(inst.Location, "7d10", rolls);

                    var damage = 0;
                    foreach (int roll in rolls)
                    {
                        damage += roll;
                    }

                    damage = inst.GetCardTurn().ApplyDamageBuffs(damage);
                    var damages = card.TakeDamage(damage);

                    await MessageHandler.SendMessage(inst.Location, $"{card.Signature} hits the ground hard and takes damage. {card.DamageTakenString(damages)}");
                }
                else
                {
                    await MessageHandler.SendMessage(inst.Location, $"{card.Signature} is vulnerable! They take 200% more damage on the next hit to them.");

                    card.AddBuff(new BuffDebuff()
                    {
                        Name                 = "Vulnerable",
                        Buff                 = false,
                        Origin               = $"({inst.GetCardTurn().Signature})",
                        Description          = "You have been knocked down and are vulnerable! You take 200% more damage on the next hit to you.",
                        DefensePercentDebuff = 2.0,
                        Strikes              = 1
                    });
                }
            }

            OnCooldown      = true;
            CurrentCooldown = Cooldown;
            inst.GetCardTurn().Actions--;
        }
Пример #6
0
        public override async Task MoveEffect(CombatInstance inst, List <BasicCard> targets)
        {
            foreach (BasicCard card in targets)
            {
                card.AddBuff(new BuffDebuff()
                {
                    Name               = "Intimidated",
                    Buff               = false,
                    Origin             = $"({inst.GetCardTurn().Signature})",
                    Description        = "Damage reduced by 20.",
                    DamageStaticDebuff = 20,
                    Attacks            = 1
                });

                var flip = RandomGen.CoinFlip();
                await MessageHandler.CoinFlip(inst.Location, flip);

                var str = "";
                if (!flip)
                {
                    str += " and they were so scared they are Silenced on their next turn!";
                    card.AddBuff(new BuffDebuff()
                    {
                        Name        = "Terrified",
                        Buff        = false,
                        Origin      = $"({inst.GetCardTurn().Signature})",
                        Description = "Silenced.",
                        Silenced    = true,
                        Turns       = 1
                    });
                }
                else
                {
                    str += ".";
                }

                await MessageHandler.SendMessage(inst.Location, $"{inst.GetCardTurn().Signature} intimidates {card.Signature}. Their next attack is reduced by 20 damage{str}");
            }

            OnCooldown      = true;
            CurrentCooldown = Cooldown;
            inst.GetCardTurn().Actions--;
        }
Пример #7
0
        public override async Task MoveEffect(CombatInstance inst, List <BasicCard> targets)
        {
            foreach (BasicCard card in targets)
            {
                List <int> rolls = RandomGen.RollDice(5, 15);
                await MessageHandler.DiceThrow(inst.Location, "5d15", rolls);

                var flip = RandomGen.CoinFlip();
                await MessageHandler.CoinFlip(inst.Location, flip);

                var damage = 0;
                foreach (int roll in rolls)
                {
                    damage += roll;
                }

                damage = inst.GetCardTurn().ApplyDamageBuffs(damage);
                var damages = card.TakeDamage(damage);

                await MessageHandler.SendMessage(inst.Location, $"{inst.GetCardTurn().Signature} gores {card.Signature}! {card.DamageTakenString(damages)}");

                if (flip)
                {
                    await MessageHandler.SendMessage(inst.Location, $"{inst.GetCardTurn().Signature} digs into {card.Signature}, causing them to bleed!");

                    card.AddBuff(new BuffDebuff()
                    {
                        Name              = "Gored",
                        Buff              = false,
                        Origin            = $"({inst.GetCardTurn().Signature})",
                        Description       = "5 bleeding every time an attack is made for 2 turns.",
                        BleedAttackDamage = 5,
                        Turns             = 2
                    });
                }
            }

            inst.GetCardTurn().Actions--;
        }
Пример #8
0
        public override async Task MoveEffect(CombatInstance inst, List <BasicCard> targets)
        {
            foreach (BasicCard card in targets)
            {
                var flip = RandomGen.CoinFlip();
                await MessageHandler.CoinFlip(inst.Location, flip);

                var    damageFirst  = 60;
                var    damageSecond = 30;
                var    damage       = 0;
                string flavorText   = "";

                if (flip)
                {
                    damage    += damageFirst;
                    flavorText = $"{inst.GetCardTurn().Signature} rams {card.Signature} with their horns!";

                    var flip2 = RandomGen.CoinFlip();
                    await MessageHandler.CoinFlip(inst.Location, flip2);

                    if (!flip2)
                    {
                        damage    += damageSecond;
                        flavorText = $"{inst.GetCardTurn().Signature} rams {card.Signature} with their horns!";
                    }
                }

                damage = inst.GetCardTurn().ApplyDamageBuffs(damage);
                var damages = card.TakeDamage(damage);

                await MessageHandler.SendMessage(inst.Location, $"{flavorText} {card.DamageTakenString(damages)}");
            }

            OnCooldown      = true;
            CurrentCooldown = Cooldown;
            inst.GetCardTurn().Actions--;
        }
Пример #9
0
        public override async Task MoveEffect(CombatInstance inst)
        {
            List <int> rolls = RandomGen.RollDice(6, 6);
            await MessageHandler.DiceThrow(inst.Location, "6d6", rolls);

            var flip = RandomGen.CoinFlip();
            await MessageHandler.CoinFlip(inst.Location, flip);

            int damage = 0;

            foreach (int roll in rolls)
            {
                damage += roll;
            }

            damage = inst.GetCardTurn().ApplyDamageBuffs(damage);
            string str      = "";
            var    totalDam = 0;

            List <BasicCard> targets = inst.GetAOEEnemyTargets();

            foreach (BasicCard card in targets)
            {
                var tempDam = card.TakeDamage(damage);
                totalDam += tempDam[0];
                str      += $"\n{card.DamageTakenString(tempDam)}";
            }

            await MessageHandler.SendMessage(inst.Location, $"{inst.GetCardTurn().Signature} calls upon Artemis to barrage the enemy!{str}\n{inst.GetCardTurn().Signature} dealt a total of {totalDam} damage.");

            if (!flip)
            {
                OnCooldown      = true;
                CurrentCooldown = Cooldown;
            }
            inst.GetCardTurn().Actions--;
        }
Пример #10
0
        public override async Task MoveEffect(CombatInstance inst, List <BasicCard> targets)
        {
            foreach (BasicCard card in targets)
            {
                List <int> rolls      = RandomGen.RollDice(3, 15, true);
                var        flip       = RandomGen.CoinFlip();
                bool       latchState = false;

                int damage = 0;
                foreach (int roll in rolls)
                {
                    damage += roll;
                }

                damage = inst.GetCardTurn().ApplyDamageBuffs(damage);
                var damages = card.TakeDamage(damage);

                //If any latches are already detected, remove them.
                var latches = inst.SearchForMarker(inst.TurnNumber);
                if (latches.Count > 0)
                {
                    latchState = true;
                    foreach (BasicCard card2 in latches)
                    {
                        for (int i = card2.Markers.Count - 1; i >= 0; i--)
                        {
                            if (card2.Markers[i].OriginTurnNum == inst.TurnNumber)
                            {
                                card2.Markers.RemoveAt(i);
                            }
                        }
                    }
                }

                await MessageHandler.DiceThrow(inst.Location, "3d15!", rolls);

                await MessageHandler.SendMessage(inst.Location, $"{inst.GetCardTurn().Signature} chomps down on {card.Signature}! {card.DamageTakenString(damages)}");

                await MessageHandler.CoinFlip(inst.Location, flip);

                if (!latchState)
                {
                    if (flip)
                    {
                        await MessageHandler.SendMessage(inst.Location, $"{inst.GetCardTurn().Signature} is latched on!");

                        card.AddMarker(new Marker(true)
                        {
                            CardOrigin    = "Ghub",
                            MoveOrigin    = "Chomp",
                            MarkerName    = "Latched",
                            OriginTurnNum = inst.TurnNumber,
                            IgnoreBool    = false,
                            MarkerBool    = true
                        });
                    }
                }
                else
                {
                    await MessageHandler.SendMessage(inst.Location, $"{inst.GetCardTurn().Signature} is no longer latched!");
                }
            }

            inst.GetCardTurn().Actions--;
        }
Пример #11
0
        public override async Task MoveEffect(CombatInstance inst, List <BasicCard> targets)
        {
            foreach (BasicCard card in targets)
            {
                List <int> roll1 = RandomGen.RollDice(1, 20);
                await MessageHandler.DiceThrow(inst.Location, "1d20", roll1);

                var flip1 = RandomGen.CoinFlip();
                await MessageHandler.CoinFlip(inst.Location, flip1);

                var              damage = roll1[0];
                List <int>       tempDams;
                var              tempDam       = 0;
                var              totalDam      = 0;
                var              hits          = 0;
                var              shuffled      = false;
                List <BasicCard> shuffledCards = new List <BasicCard>();

                //If the first coin flip is heads...
                if (flip1)
                {
                    //Roll another d20 and multiply the first d20 by the second
                    List <int> roll2 = RandomGen.RollDice(1, 20);
                    await MessageHandler.DiceThrow(inst.Location, "1d20", roll2);

                    damage = roll1[0] * roll2[0];
                    await MessageHandler.SendMessage(inst.Location, $"{roll1[0]} * {roll2[0]} = {damage}");

                    tempDam   = inst.GetCardTurn().ApplyDamageBuffs(damage);
                    tempDams  = card.TakeDamage(tempDam);
                    totalDam += tempDams[0];
                    hits++;
                    await MessageHandler.SendMessage(inst.Location, $"{card.Signature} gets stomped on by {inst.GetCardTurn().Signature}. {card.DamageTakenString(tempDams)}");

                    await Task.Delay(1500);

                    //If the result is even...
                    if (damage % 2 == 0)
                    {
                        card.AddBuff(new BuffDebuff()
                        {
                            Name                = "Sticky",
                            Buff                = false,
                            Origin              = $"({inst.GetCardTurn().Signature})",
                            Description         = "Sticky syrup got on you! Your next attack is reduced by 50%",
                            DamagePercentDebuff = 0.5,
                            Attacks             = 1
                        });
                    }
                    //If the result is odd...
                    else
                    {
                        var count = 0;
                        foreach (BasicCard card2 in inst.CardList)
                        {
                            if (inst.GetCardTurn().Owner != card2.Owner && card.Owner != card2.Owner)
                            {
                                tempDam   = inst.GetCardTurn().ApplyDamageBuffs(damage);
                                tempDams  = card2.TakeDamage(tempDam);
                                totalDam += tempDams[0];
                                hits++;
                                await MessageHandler.SendMessage(inst.Location, $"{card2.Signature} gets stomped on by {inst.GetCardTurn().Signature}. {card.DamageTakenString(tempDams)}");

                                await Task.Delay(1500);

                                count++;
                            }

                            if (count == 2)
                            {
                                break;
                            }
                        }
                        if (count == 0)
                        {
                            tempDam   = inst.GetCardTurn().ApplyDamageBuffs(damage);
                            tempDams  = card.TakeDamage(tempDam);
                            totalDam += tempDams[0];
                            hits++;
                            await MessageHandler.SendMessage(inst.Location, $"{card.Signature} gets stomped on by {inst.GetCardTurn().Signature} a second time! {card.DamageTakenString(tempDams)}");

                            await Task.Delay(1500);

                            tempDam   = inst.GetCardTurn().ApplyDamageBuffs(damage);
                            tempDams  = card.TakeDamage(tempDam);
                            totalDam += tempDams[0];
                            hits++;
                            await MessageHandler.SendMessage(inst.Location, $"{card.Signature} gets stomped on by {inst.GetCardTurn().Signature} a third time! {card.DamageTakenString(tempDams)}");

                            await Task.Delay(1500);
                        }
                        if (count == 1)
                        {
                            tempDam   = inst.GetCardTurn().ApplyDamageBuffs(damage);
                            tempDams  = card.TakeDamage(damage);
                            totalDam += tempDams[0];
                            hits++;
                            await MessageHandler.SendMessage(inst.Location, $"{card.Signature} gets stomped on by {inst.GetCardTurn().Signature} a second time! {card.DamageTakenString(tempDams)}");

                            await Task.Delay(1500);
                        }
                    }
                }
                //If the first coin flip is tails...
                else
                {
                    //Flip another coin
                    var flip2 = RandomGen.CoinFlip();
                    await MessageHandler.CoinFlip(inst.Location, flip2);

                    //If the second coin flip is heads...
                    if (flip2)
                    {
                        List <BasicCard> initialCards = new List <BasicCard>();

                        foreach (BasicCard c in inst.CardList)
                        {
                            initialCards.Add(c);
                        }

                        //Put the current player at the top of the new turn order
                        for (int i = initialCards.Count - 1; i >= 0; i--)
                        {
                            if (initialCards[i].Owner == inst.GetCardTurn().Owner)
                            {
                                shuffledCards.Add(initialCards[i]);
                                initialCards.RemoveAt(i);
                            }
                        }

                        int rand = 0;
                        while (initialCards.Count > 0)
                        {
                            rand = RandomGen.RandomNum(0, initialCards.Count - 1);
                            shuffledCards.Add(initialCards[rand]);
                            initialCards.RemoveAt(rand);
                        }

                        inst.FixTurnNumber();
                        shuffled = true;

                        List <int> roll3 = RandomGen.RollDice(4, 4, true);
                        await MessageHandler.DiceThrow(inst.Location, "4d4!", roll3);

                        var temp = 0;
                        foreach (int roll in roll3)
                        {
                            temp += roll;
                        }

                        damage *= temp;
                        await MessageHandler.SendMessage(inst.Location, $"{roll1[0]} * {temp} = {damage}");

                        tempDam   = inst.GetCardTurn().ApplyDamageBuffs(damage);
                        tempDams  = card.TakeDamage(tempDam);
                        totalDam += tempDams[0];
                        hits++;

                        await MessageHandler.SendMessage(inst.Location, $"{card.Signature} gets stomped on by {inst.GetCardTurn().Signature}. {card.DamageTakenString(tempDams)}");

                        await Task.Delay(1500);

                        await MessageHandler.SendMessage(inst.Location, "The battlefield shakes, shuffling the turn order!");

                        await Task.Delay(1500);
                    }
                    else
                    {
                        List <int> roll4 = RandomGen.RollDice(1, 10);
                        await MessageHandler.DiceThrow(inst.Location, "1d10", roll4);

                        var x      = roll4[0];
                        var result = Math.Pow((Math.Abs((Math.Pow(x, 0.5)) / (Math.Pow(x, 8)) - Math.Log10(x) * x)), 3.14159);

                        damage += (int)result;
                        await MessageHandler.SendMessage(inst.Location, $"{roll1[0]} + {(int)result} = {damage}");

                        tempDam   = inst.GetCardTurn().ApplyDamageBuffs(damage);
                        tempDams  = card.TakeDamage(tempDam);
                        totalDam += tempDams[0];
                        hits++;

                        await MessageHandler.SendMessage(inst.Location, $"{card.Signature} gets super stomped by {inst.GetCardTurn().Signature}! {card.DamageTakenString(tempDams)}");

                        await Task.Delay(1500);
                    }
                }

                if (hits > 1)
                {
                    await MessageHandler.SendMessage(inst.Location, $"{inst.GetCardTurn().Signature} dealt a total of {totalDam} damage.");
                }

                if (shuffled)
                {
                    inst.CardList = shuffledCards;
                }
            }

            OnCooldown      = true;
            CurrentCooldown = Cooldown;
            inst.GetCardTurn().Actions--;
        }