Add Cover card and implement block
This commit is contained in:
parent
ba5b890c2a
commit
b4dd6c3496
8 changed files with 266 additions and 3 deletions
17
Assets/Battle/Cards/CardCover.cs
Normal file
17
Assets/Battle/Cards/CardCover.cs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class CardCover : BaseCard
|
||||
{
|
||||
public CardCover() : base(CardId.Cover, "Cover", 1, CardType.Action, "Block 3 damage on another target ally.") {
|
||||
|
||||
}
|
||||
|
||||
public override IEnumerator Use(BattlePlayerControls playerControls) {
|
||||
List<BattleParticipant> target = new List<BattleParticipant>();
|
||||
yield return playerControls.StartCoroutine(playerControls.ChooseTarget((t) => {target.Add(t);}));
|
||||
Debug.Log("Covering " + target[0]);
|
||||
target[0].AddBlock(3);
|
||||
}
|
||||
}
|
||||
11
Assets/Battle/Cards/CardCover.cs.meta
Normal file
11
Assets/Battle/Cards/CardCover.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: adec885589bc619409ad04df50ddd568
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Loading…
Add table
Add a link
Reference in a new issue