コード例 #1
0
    }                              // The defense rating of the minion

    // Constructor (for minions with abilities)
    public CardMinion(string name, string description, int mana, Enums.CardType cardType, List <AbilityConnection> abilities, Enums.Rarity rarity, int attack, int defense)
    {
        this.Name        = name;
        this.Description = description;
        this.Mana        = mana;
        this.CardType    = cardType;
        this.Rarity      = rarity;
        this.Attack      = attack;
        this.Defense     = defense;

        // Check if we're inserting any abilities. If we are, good, if not, set this.abilities to null
        if (abilities.Count > 0)
        {
            this.Abilities = abilities;
        }
        else
        {
            this.Abilities = null;
        }
    }
コード例 #2
0
 public static CardBase CreateMinion(string name, string description, int mana, List <AbilityConnection> abilities, Enums.Rarity rarity, int attack, int defense)
 {
     return(new CardMinion(name, description, mana, Enums.CardType.MINION, abilities, rarity, attack, defense));
 }