public override Task Call(Card caller, GameHandler gameHandler, ulong curPlayer, ulong enemy, ExtraEffectInfo extraInf)
                {
                    CreatureData kws = gameHandler.players[curPlayer].creatureData.DeepCopy();

                    Aftermath aftermath = new Aftermath(kws);

                    aftermath.effectText  = "Aftermath: Gain ";
                    aftermath.displayMode = EffectDisplayMode.Private;

                    bool checkedFirst = false;

                    foreach (var keyword in kws.staticKeywords)
                    {
                        if (keyword.Value != 0)
                        {
                            if (!checkedFirst)
                            {
                                aftermath.effectText += $"{keyword.Key} x{keyword.Value}";
                                checkedFirst          = true;
                            }
                            else
                            {
                                aftermath.effectText += $", {keyword.Key} x{keyword.Value}";
                            }
                        }
                    }

                    aftermath.effectText += ".";

                    gameHandler.players[curPlayer].effects.Add(aftermath);

                    return(Task.CompletedTask);
                }
                public override Effect Copy()
                {
                    Aftermath ret = (Aftermath)base.Copy();

                    ret._reduction = this._reduction;
                    return(ret);
                }
                    public override Effect Copy()
                    {
                        Aftermath ret = (Aftermath)base.Copy();

                        ret.chosen = this.chosen;
                        return(ret);
                    }
Beispiel #4
0
    IEnumerator teachPost()
    {
        KillEm.SetActive(false);
        Aftermath.SetActive(true);

        yield return(new WaitUntil(() => Input.GetMouseButtonDown(0)));

        current = teachingPhase.Done;

        yield return(null);
    }
                public override async Task Call(Card caller, GameHandler gameHandler, ulong curPlayer, ulong enemy, ExtraEffectInfo extraInf)
                {
                    var           prompt   = new PlayerInteraction("Name a Rarity", "Common, Rare, Epic or Legendary", "Capitalisation is ignored");
                    List <string> rarities = new List <string>()
                    {
                        "common", "rare", "epic", "legendary"
                    };
                    string defaultAns = rarities[GameHandler.randomGenerator.Next(4)];

                    string ret = await prompt.SendInteractionAsync(gameHandler, curPlayer, (x, y, z) => rarities.Contains(x.ToLower()), defaultAns, extraInf.ctx);

                    Rarity chosenRarity;

                    if (ret.Equals("common", StringComparison.OrdinalIgnoreCase))
                    {
                        chosenRarity = Rarity.Common;
                    }
                    else if (ret.Equals("rare", StringComparison.OrdinalIgnoreCase))
                    {
                        chosenRarity = Rarity.Rare;
                    }
                    else if (ret.Equals("epic", StringComparison.OrdinalIgnoreCase))
                    {
                        chosenRarity = Rarity.Epic;
                    }
                    else if (ret.Equals("legendary", StringComparison.OrdinalIgnoreCase))
                    {
                        chosenRarity = Rarity.Legendary;
                    }
                    else
                    {
                        chosenRarity = Rarity.NO_RARITY;
                    }

                    //this.writtenEffect = $"Aftermath: Give all players' {this.chosenRarity} Upgrades in their shops +2/+2.";

                    Aftermath effect = new Aftermath(chosenRarity);

                    effect.effectText  = $"Aftermath: Give all players' {chosenRarity} Upgrades in their shops +2/+2.";
                    effect.displayMode = EffectDisplayMode.Private;

                    gameHandler.players[curPlayer].effects.Add(effect);
                }