mixedcards/Assets/Battle/BaseCard.cs

41 lines
1.1 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public enum CardType {
Action
}
public abstract class BaseCard
{
protected BattleParticipant owner;
protected CardId id;
protected string displayName;
protected int cost;
protected CardType type;
protected string effectText;
public BaseCard(BattleParticipant owner, CardId id, string displayName, int cost, CardType type, string effectText) {
this.owner = owner;
this.id = id;
this.displayName = displayName;
this.cost = cost;
this.type = type;
this.effectText = effectText;
}
public abstract IEnumerator Use(BattlePlayerControls playerControls);
public CardId GetId() {return id;}
public string GetDisplayName() {return displayName;}
public int GetCost() {return cost;}
public string GetDisplayType() {
switch (type) {
case CardType.Action:
return "";
default:
throw new System.ArgumentException("CardType unknown", "cardType");
}
}
public string GetEffectText() {return effectText;}
}