Ejemplo n.º 1
0
    public void UpdateCardTexture(bool alwaysShow, BoardState board, Card card, CardStates State, string classType)
    {
        StringBuilder ImagePath = new StringBuilder(@"Textures/Cards/");
        ImagePath.Append(card.GetCardGFX());
        StringBuilder CardbackPath = new StringBuilder(@"Textures/");
        if (card.PlayerID == 0)
            CardbackPath.Append("Lannister cardback");
        else
            CardbackPath.Append("Stark cardback");

        int attack = board.GetCardAttack(card);
        string manaString = "<b>" + board.GetCardManaCost(card).ToString() + "</b>";
        string attackString = "<b>" + attack.ToString() + "</b>";
        string healthString = "<b>" + board.GetCardHealth(card).ToString() + "</b>";
        if (board.GetCardMaxHealth(card) > board.GetCardHealth(card))
            healthString = "<color=MAROON>" + healthString + "</color>";
           UpdateCard(alwaysShow || State == CardStates.InHand && card.PlayerID == 0,@"<b>" + card.GetName() + @"</b>", ImagePath.ToString(), CardbackPath.ToString(), manaString, attackString, attack > 0, healthString, State, classType);
    }