From 6724d2b5c57f7c0546ea51247c0dc2d2566794bd Mon Sep 17 00:00:00 2001 From: henriquenakashima Date: Sat, 19 Sep 2020 17:30:40 -0400 Subject: [PATCH] Split Action into Attack and Skill --- Assets/Battle/BaseCard.cs | 11 ++++------- Assets/Battle/CardType.cs | 5 +++++ Assets/Battle/CardType.cs.meta | 11 +++++++++++ Assets/Battle/Cards/CardCover.cs | 2 +- Assets/Battle/Cards/CardCrashingPunch.cs | 2 +- Assets/Battle/Cards/CardLightningStrike.cs | 2 +- 6 files changed, 23 insertions(+), 10 deletions(-) create mode 100644 Assets/Battle/CardType.cs create mode 100644 Assets/Battle/CardType.cs.meta diff --git a/Assets/Battle/BaseCard.cs b/Assets/Battle/BaseCard.cs index ccfd61b..616017f 100644 --- a/Assets/Battle/BaseCard.cs +++ b/Assets/Battle/BaseCard.cs @@ -2,11 +2,6 @@ using System.Collections.Generic; using UnityEngine; -public enum CardType { - Action, - Enchantment, -} - public abstract class BaseCard { protected BattleParticipant owner; @@ -32,8 +27,10 @@ public abstract class BaseCard public int GetCost() {return this.cost;} public string GetDisplayType() { switch (this.type) { - case CardType.Action: - return "Action"; + case CardType.Attack: + return "Attack"; + case CardType.Skill: + return "Skill"; case CardType.Enchantment: return "Enchantment"; default: diff --git a/Assets/Battle/CardType.cs b/Assets/Battle/CardType.cs new file mode 100644 index 0000000..dad5d00 --- /dev/null +++ b/Assets/Battle/CardType.cs @@ -0,0 +1,5 @@ +public enum CardType { + Attack, + Skill, + Enchantment, +} diff --git a/Assets/Battle/CardType.cs.meta b/Assets/Battle/CardType.cs.meta new file mode 100644 index 0000000..d58c834 --- /dev/null +++ b/Assets/Battle/CardType.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0429b510893707547a1514ef50772203 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Battle/Cards/CardCover.cs b/Assets/Battle/Cards/CardCover.cs index 1303f07..1579cab 100644 --- a/Assets/Battle/Cards/CardCover.cs +++ b/Assets/Battle/Cards/CardCover.cs @@ -5,7 +5,7 @@ using UnityEngine; public class CardCover : BaseCard { public CardCover(BattleParticipant owner) - : base(owner, CardId.Cover, "Cover", 1, CardType.Action, + : base(owner, CardId.Cover, "Cover", 1, CardType.Skill, "Block 3 damage on another target ally.") { } diff --git a/Assets/Battle/Cards/CardCrashingPunch.cs b/Assets/Battle/Cards/CardCrashingPunch.cs index 6fad424..1e694fa 100644 --- a/Assets/Battle/Cards/CardCrashingPunch.cs +++ b/Assets/Battle/Cards/CardCrashingPunch.cs @@ -5,7 +5,7 @@ using UnityEngine; public class CardCrashingPunch : BaseCard { public CardCrashingPunch(BattleParticipant owner) - : base(owner, CardId.CrashingPunch, "Crashing Punch", 3, CardType.Action, + : base(owner, CardId.CrashingPunch, "Crashing Punch", 3, CardType.Attack, "Deals 3 damage to target.") { } diff --git a/Assets/Battle/Cards/CardLightningStrike.cs b/Assets/Battle/Cards/CardLightningStrike.cs index 272fecc..31f05b6 100644 --- a/Assets/Battle/Cards/CardLightningStrike.cs +++ b/Assets/Battle/Cards/CardLightningStrike.cs @@ -5,7 +5,7 @@ using UnityEngine; public class CardLightningStrike : BaseCard { public CardLightningStrike(BattleParticipant owner) - : base(owner, CardId.LightningStrike, "Lightning Strike", 2, CardType.Action, + : base(owner, CardId.LightningStrike, "Lightning Strike", 2, CardType.Attack, "Deals 3 damage to target.") { }