using System.Collections; using System.Collections.Generic; using UnityEngine; public abstract class BaseCard { protected BattleParticipant owner; protected string displayName; protected int cost; protected CardType type; protected string effectText; public BaseCard(BattleParticipant owner, string displayName, int cost, CardType type, string effectText) { this.owner = owner; this.displayName = displayName; this.cost = cost; this.type = type; this.effectText = effectText; } public string GetDisplayName() {return this.displayName;} public int GetCost() {return this.cost;} public string GetDisplayType() { switch (this.type) { case CardType.Attack: return "Attack"; case CardType.Skill: return "Skill"; case CardType.Enchantment: return "Enchantment"; default: throw new System.ArgumentException("CardType unknown", "cardType"); } } public string GetEffectText() {return this.effectText;} public bool IsPermanent() { return this.type == CardType.Enchantment; } }