mixedcards/Assets/Battle/BaseCard.cs
2020-09-26 15:57:58 -04:00

47 lines
1.4 KiB
C#

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;
protected string stringId;
public BaseCard(BattleParticipant owner, string displayName, int cost, CardType type, string effectText, string stringId) {
this.owner = owner;
this.displayName = displayName;
this.cost = cost;
this.type = type;
this.effectText = effectText;
this.stringId = stringId;
}
public BattleParticipant Owner {get => this.owner;}
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;
}
public string StringId {
get => this.stringId;
}
}