public Card(int cardId, int healthPoints, int attackPoints, int mana, bool isTaunt, Battlecry baseBattlecry, Deathrattle baseDeathrattle, Dictionary <PlayRequirement, bool> playReqs) { Place = CardPlace.DECK; CardId = cardId; HealthPoints = healthPoints; AttackPoints = attackPoints; Mana = mana; CurrentHealthPoints = healthPoints; CurrentAttackPoints = attackPoints; CurrentMana = mana; if (baseBattlecry != null) { _battlecries += baseBattlecry; } if (baseDeathrattle != null) { _deathrattles += baseDeathrattle; } _playReqs = playReqs; IsTaunt = isTaunt; IsSpell = false; }
public Card(int cardId, int mana, Battlecry baseBattlecry, Dictionary <PlayRequirement, bool> playReqs) { Place = CardPlace.DECK; CardId = cardId; Mana = mana; CurrentMana = mana; if (baseBattlecry != null) { _battlecries += baseBattlecry; } _playReqs = playReqs; IsSpell = true; }
public BarbarianAbility CreateAbility(string name) { BarbarianAbility ability; switch (name) { case "Battlecry": ability = new Battlecry(); break; case "Ferocity": ability = new Ferocity(); break; default: throw new ArgumentException($"Invalid ability \"{name}\""); } return(ability); }
private void Start() { battlecry = GetComponent <Battlecry>(); deathrattle = GetComponent <Deathrattle>(); takeDamage = GetComponent <TakeDamage>(); }