mixedcards/Assets/Battle/BaseCard.cs
2020-10-09 01:43:37 -04:00

59 lines
1.7 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.Emotion:
return "Emotion";
case CardType.Attack:
return "Attack";
case CardType.Skill:
return "Skill";
case CardType.Enchantment:
return "Enchantment";
case CardType.Default:
return "Default";
default:
throw new System.ArgumentException("CardType unknown", "cardType");
}
}
public string GetEffectText() {return this.effectText;}
public bool IsPermanent() {
return this.type == CardType.Enchantment || this.type == CardType.Default;
}
public bool IsEphemeral() {
return this.type == CardType.Emotion;
}
public string StringId {
get => this.stringId;
}
public CardType Type {
get => this.type;
}
}